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 6th September 2011, 19:31   #1  |  Link
Dogway
Registered User
 
Join Date: Nov 2009
Posts: 2,352
Scanlines on interlaced source

Hello, I ripped a DVD guide of a game, it is interlaced so I thought on using QTGMC, but it was slow and results were far from desired. Then I thought about adding scanlines, and I think I'm almost there (I'm still open to suggestions), but the main concern is about the bob-flicker and certain "jumps" every few seconds, is this supposed to be correct?

Now after testing a bit it seems these "jumps" are something related to mpc-hc. I used a simple bob() and in avspmod there's flicker, then I preview the script in mpc-hc and even by frameskipping there's no flicker...

source 9Mb:
http://www.mediafire.com/?mfci31cc4uwzenj


Code:
separatefields
Deblock_QED(quant1=30, quant2=40)
LSFmod(defaults="slow",strength=50,edgemode=0,soothe=true,ss_x=1.0,ss_y=1.0)
raw=last
weave(interleave(last,mt_lut("26",u=2,v=2)))
SmoothContrast(0.2,sat=0,limit=true)
LumaMask(SmoothLevels(16,1.2,235,16,235,smooth=10,show=false,dither=100,limiter=0),raw.bob,black=64, white=255, brightfilt=false,show=false)
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread
Dogway is offline   Reply With Quote
Old 6th September 2011, 20:10   #2  |  Link
creaothceann
Registered User
 
Join Date: Jul 2010
Location: Germany
Posts: 357
If you're adding scanlines you can just throw away half the lines:

Code:
AssumeFrameBased.AssumeTFF.SeparateFields
SelectEven
Weave(Interleave(last, BlankClip(last)))

Last edited by creaothceann; 6th September 2011 at 20:31. Reason: oops, didn't know that!
creaothceann is offline   Reply With Quote
Old 6th September 2011, 20:17   #3  |  Link
Dogway
Registered User
 
Join Date: Nov 2009
Posts: 2,352
Well, that's practically the same I just did, but removing selecteven (every field is unique), and adding some nice effects for scanline blending...
But the question is about bob-flicker, your code also shows the flicker.... is this ok?
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread
Dogway is offline   Reply With Quote
Old 6th September 2011, 20:24   #4  |  Link
Gavino
Avisynth language lover
 
Join Date: Dec 2007
Location: Spain
Posts: 3,431
Quote:
Originally Posted by creaothceann View Post
... BlankClip(last, last.FrameCount) ...
Note that BlankClip(last) already inherits the framecount, along with all the other properties of 'last'.
__________________
GScript and GRunT - complex Avisynth scripting made easier
Gavino is offline   Reply With Quote
Old 7th September 2011, 10:22   #5  |  Link
Dogway
Registered User
 
Join Date: Nov 2009
Posts: 2,352
well, I guess that if I want to get rid of the bob-flicker I'd need to use a motion compensated (qtgmc). At last I used Didée's code in this thread, so I don't have to use "weave" which causes the flicker. Result is not so as authentic but at least it's not so tiring to watch.

Code:
separatefields
Deblock_QED(quant1=30, quant2=40)
LSFmod(defaults="slow",strength=50,edgemode=0,soothe=true,ss_x=1.0,ss_y=1.0)
weave
QTGMC(tr2=3,preset="very slow",Lossless=2,sourcematch=3,sharpness=0.3,MatchEnhance=0.3,MatchPreset="Slow", MatchPreset2="Slow")
raw=last
scanrate=2
mt_lutxy(mt_lutspa(relative=false,expr="y "+string(scanrate)+" % 0.01 < 16 235 ?")  ,"x 16 - y 16 - * 219 / 16 +",U=2,V=2)
SmoothContrast(0.2,sat=0,limit=true)
LumaMask(SmoothLevels(16,1.2,235,16,235,smooth=10,show=false,dither=100,limiter=0),raw,black=64, white=255, brightfilt=false,show=false)
RatioResize(4320/4739.0,"par")




If anyone has any tip, I'd be very welcome. Still I haven't figured out why the bobbed source showed different in mpc-hc.


btw, for the people who wants to know how is the infix of RPN equations, or the opposite so you can modify it, use the next code (yes, don't know how I didn't try before):

Code:
a = mt_infix("y 2 % 0.01 < 16 235 ?")
# use mt_polish() for converting to polish notation from infix syntax
blankclip(length=1,width=1000,height=40)
subtitle(string(a),x=30,y=10)


EDIT: I refined and optimized the code a bit in the scanline creation lines and blending. I just tested over a raw screenshot:

Code:
PointResize(width,height*2)
LinearResize(576,height,linear=false,kernel="spline64",fh=1.0,fv=1.0,lsb_out=true)
r=selectevery(3,0)
g=selectevery(3,1)
b=selectevery(3,2)
Dither_convert_rgb_to_yuv(r,g,b,tv_range=true,lsb=false,mode=6,ampn=0.0,output="yv12")
mergeluma(blur(0.3,0.6))
raw=last

strength=128
scanrate=2
mt_lutxy(mt_lutspa(relative=false,expr="y "+string(scanrate)+" % 0.01 < "+string(strength)+" 235 ?"),"x 16 - y 16 - * 219 / 16 +",U=2,V=2)

# you can replace the next 2 lines with mt_merge(raw,raw.greyscale) for 8 bits merging
Dither_convert_8_to_16()
Dither_merge16_8(raw.Dither_convert_8_to_16(),raw.greyscale)

# Use ditherpost() for video or next line for RGB (still images)
Dither_convert_yuv_to_rgb(tv_range=true,output="rgb32",lsb_in=true,mode=6,ampn=0.0)
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread

Last edited by Dogway; 8th September 2011 at 18:52.
Dogway is offline   Reply With Quote
Reply

Tags
arcade, bob, flicker, interlaced, scanlines

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 18:46.


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