Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Usage

Reply
 
Thread Tools Search this Thread Display Modes
Old 26th May 2014, 18:00   #1  |  Link
otherman
Registered User
 
Join Date: Jun 2013
Posts: 19
Deinterlace and interpolate RGB channels

Hi!
I've this source
It's interlaced, and this is simple to resolve; the real problem is that odd fields lack blue channel, and the even fields lack red channel.
Before deinterlacing, I need to interpolate the blue channel from the even and put it on the odd fields, and interpolate the red channel from the odd fields and put it on the even.
Green channel is present in the odd and in the even fields, so it has full temphoral resolution, and I would like to use it to make a full motion estimation for red and blue channels interpolation.
I've a preatty cleare idea on how to do it with MVFlowFps, but I can't make this complex script. Anyone can help me?
otherman is offline   Reply With Quote
Old 27th May 2014, 09:20   #2  |  Link
otherman
Registered User
 
Join Date: Jun 2013
Posts: 19
I'm so near!
I've sinthetized the new red channel, but I'm getting a ghosts of original frames too. Please, help me to delete them.

this is my scrpit

Code:
###################################
#this first part is to make any normal source look like my case
###################################
original=YOUR_SOURCE.ConvertToRGB.AssumeFPS(24).separatefields
originalR=original.selectodd.selectodd.RGBAdjust(1.0, 1.0, 0).AssumeFPS(12)
originalB=original.selecteven.selecteven.RGBAdjust(0, 1.0, 1.0).AssumeFPS(12)
interlaced=interleave(originalB, originalR).AssumeFPS(12).weave

###################################
#now "extract" odd field red channel
#even field blue channel
#and full green channel
###################################
r12=interlaced.separatefields.selectodd.showred.ConvertToYV12
b12=interlaced.separatefields.selecteven.showblue.ConvertToYV12
fullg=interlaced.showgreen.Bob().ConvertToYV12.BilinearResize(interlaced.width, interlaced.height/2).AssumeFPS(24)

###################################
#the tricky part
###################################
fullg
super = MSuper(pel=2)
coso2= Msuper(r12, pel=2)
backward_vec = MAnalyse(super, overlap=4, isb = true, search=3).selectodd
forward_vec = MAnalyse(super, overlap=4, isb = false, search=3).selectodd
r12
MFlowFps(coso2, backward_vec, forward_vec, num=12)

Last edited by otherman; 27th May 2014 at 10:00.
otherman is offline   Reply With Quote
Old 27th May 2014, 11:23   #3  |  Link
foxyshadis
ангел смерти
 
foxyshadis's Avatar
 
Join Date: Nov 2004
Location: Lost
Posts: 9,563
If you're talking about that clip you uploaded, that's because the channels have an extreme amount of ghosting already present. I gave it a few shots but the red and blue channels just seem completely broken, possibly due to encoding interlaced material as progressive. You seem to be re-encoding into divx everything you upload asking for help, can you stop that? Use UT Video, HuffYUV, or anything that supports interlaced encoding.
foxyshadis is offline   Reply With Quote
Old 27th May 2014, 12:06   #4  |  Link
otherman
Registered User
 
Join Date: Jun 2013
Posts: 19
Ok, sorry for that. Otherwise, the source I posted is made with the first part of the script.

I need this script for a source that actualy not exists yet XD
And it never will if I don't find a solution for this case-scenario: it's a project for a new function "Magic Lantern" firmware for Canon cameras.

Last edited by otherman; 27th May 2014 at 12:15.
otherman is offline   Reply With Quote
Old 27th May 2014, 12:58   #5  |  Link
Reel.Deel
Registered User
 
Join Date: Mar 2012
Location: Texas
Posts: 1,335
Quote:
Originally Posted by otherman View Post
showred.ConvertToYV12
use ShowRed("YV12"), it's faster and more correct.

Quote:
Originally Posted by IanB View Post
Hint: ShowRed("YV12") is a lot faster than ShowRed().ConvertToYV12()
Quote:
Originally Posted by Gavino View Post
It's also more correct here, as it will preserve the 0-255 range instead of converting to 16-235.
Reel.Deel is offline   Reply With Quote
Old 29th May 2014, 16:56   #6  |  Link
otherman
Registered User
 
Join Date: Jun 2013
Posts: 19
thank you: it helped with ghost in some way also, but it is still there
otherman is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 08:30.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2022, vBulletin Solutions Inc.