Log in

View Full Version : 1080-60i to 480i DVD test renders


nhope
1st May 2011, 09:35
Further to much recent debate on ways to improve interlaced HD>SD downscaling for DVD, I set up a minute's project of various 60i HD footage and converted it to SD NTSC MPEG-2 in a variety of ways. I have put 4 of my renders into a ready-to-burn DVD project which you can download here (http://www.mediafire.com/file/dcdbgaju848mayy/HD-to-DVD-tests-d.zip) (193 MB).

Settings:
Sony Vegas Pro 10.0c.
Full-resolution rendering quality: "Best".
Deinterlace method: "Interpolate".
Color Curves and Levels applied to video events.
Events conformed to 16-235 (broadcast-legal) levels.
"Reduce interlace flicker" switch: OFF.
No blur or sharpen applied in Vegas Pro.
Debugmode Frameserver 2.10
AviSynth 2.5.8 single-threaded used in tests 2 and 3.
All encoded in CCE Basic at 8000 kbps 1-pass CBR, upper field first.
The Belle Nuit test chart is the 1920x1080 version from here (http://www.belle-nuit.com/testchart.html).

Test 1 - Rendering time 309 seconds (100%)
Demonstrates Vegas Pro resizing without blurring or sharpening.
HD clips in NTSC widescreen project, modified with upper field first and PAR 1.1852.
Frameserved in RGB24.

Test 2 - Rendering time 431 seconds (139%)
Demonstrates AviSynth "IResize" function (http://forum.doom9.org/showthread.php?t=140233) developed by Gavino, IanB and others.
Script does low-pass filter "automatically" during resizing to reduce twitter/shimmer/aliasing etc..
HD clips in 1080-60i project.
Frameserved in YUY2 (slightly faster than RGB24).
AviSynth Script:
source=AviSource("d:\fs.avi").ColorYUV(levels="TV->PC").AssumeTFF #Expands levels if frameserved in YUY2
IResize(source,720,480)
function IResize(clip Clip, int NewWidth, int NewHeight) {
Clip
SeparateFields()
Shift=(GetParity() ? -0.25 : 0.25) * (Height()/Float(NewHeight/2)-1.0)
E = SelectEven().Spline36resize(NewWidth, NewHeight/2, 0, Shift)
O = SelectOdd( ).Spline36resize(NewWidth, NewHeight/2, 0, -Shift)
Ec = SelectEven().Spline36Resize(NewWidth, NewHeight/2, 0, 2*Shift)
Oc = SelectOdd( ).Spline36Resize(NewWidth, NewHeight/2, 0, -2*shift)
Interleave(E, O)
IsYV12() ? MergeChroma(Interleave(Ec, Oc)) : Last
Weave()
}

Test 3 - Rendering time 1504 secs (486% - multi-threaded would be much faster)
Demonstrates more advanced method adapted from a suggestion by Didée (http://forum.doom9.org/showthread.php?p=1492392#post1492392).
HD clips in 1080-60i project.
Frameserved in YUY2 (RGB not supported by script).
High quality Bob using TDeint.
Resizing by sequential bicubic passes.
Smoothing with QTGMC.
Sequential blur and sharpen filters.
AviSynth Script:
AviSource("d:\fs.avi")
ColorYUV(levels="TV->PC") #Expands levels if frameserved in YUY2
AssumeTFF
TDeint(mode=1)
bicubicresize(1440,960)
bicubicresize(720,960,-.8,.6)
p1 = bicubicresize(720,480,-.8,.6)
p2 = p1.QTGMC(TR0=1,TR1=1,TR2=2,InputType=1)
p2.blur(0,1).sharpen(0,.51).blur(0,1).sharpen(0,.85)
i1 = assumetff().separatefields().selectevery(4,0,3).weave()
# p1 # straight to 60p
# p2 # plus more calmed
i1 # re-interlaced p2
return(last)

Test 4 - Total Rendering time 1822 secs (589%)
Demonstrates down-converting of HDV to DV in my Sony Z1P camera.
HD clips in 1080-60i project.
Render to HDV (quality 31)
Down-convert to DV in Sony Z1P camera.

If you have the time and inclination, please burn the 2 folders to a DVD and let me know any reactions/preferences you have to it, and please tell us what gear you watched it on (CRT, LCD, DVD software etc.).

Also please let me know if I have correctly described what the scripts in tests 2 and 3 are actually doing.

There is another thread with feedback about this on the Vegas forum here (http://www.sonycreativesoftware.com/forums/ShowMessage.asp?ForumID=4&MessageID=761227), but I think you would have to own Sony software to contribute.

Thanks to everyone who allowed me to use and upload footage.

javlak
3rd May 2011, 21:07
Hi there. Just a couple of remarks.

a) I suppose you set the deinterlace method of Sony Vegas to None and the field order to progressive when you use the avisynth deinterlacers but you forgot to mention it?
b) Disabling the resampling of Sony Vegas (default is Smart Resample iirc) can also increase the picture quality in some cases, as Smart Resampling can introduce blurriness, maybe you should use that as well?

nhope
4th May 2011, 10:46
Hi there. Just a couple of remarks.

a) I suppose you set the deinterlace method of Sony Vegas to None and the field order to progressive when you use the avisynth deinterlacers but you forgot to mention it?
No, that would have deinterlaced the video before it reached the AviSynth deinterlacers.

b) Disabling the resampling of Sony Vegas (default is Smart Resample iirc) can also increase the picture quality in some cases, as Smart Resampling can introduce blurriness, maybe you should use that as well?
The resample setting should make no difference because there is no change in frame rate.

javlak
4th May 2011, 14:17
No, that would have deinterlaced the video before it reached the AviSynth deinterlacers.

Not if you set the Field Order to None... It doesn't make a difference really, just best practice I guess.


The resample setting should make no difference because there is no change in frame rate.

Indeed. Again, I only use it as best practice and that's the only way I meant it (although I am aware that some people prefer blurriness to choppiness).

henryho_hk
13th May 2011, 03:56
What about:

avisource("some_1080_60i.avi")
assumetff()
bob(0.3782,0.3109) # Robidoux filter is mathematically optimized for cylindrical resizers (which are painfully slow)
spline36resize(704,480).addborders(8,0,8,0,align=true) # maintain a better NTSC 16:9 aspect ratio
ColorYUV(levels="TV->PC")
separatefields()
selectevery(4,0,3)
weave()

nhope
13th May 2011, 05:56
Interesting stuff Henry. I'll try it out. At the moment I'm using:

AviSource("some_1080_60i.avi")
ColorYUV(levels="TV->PC")
AssumeTFF
LanczosResize(720,height)
TDeint(mode=1)
LanczosResize(width,480)
blur(0.0,1.0)
sharpen(0.0,0.75) # adjust 2nd value between 0.5 and 1.0 to taste
assumetff()
separatefields()
SelectEvery(4,0,3)
Weave()

One thing that interests me is that TDeint(mode=1) gives a very different bob to other methods. If you bob a 1920x1080 Belle Nuit test card (http://www.belle-nuit.com/testchart.html) it gives you smooth grey in the area of alternating black/white horizontal 1px lines, whereas Bob(), Yadif(mode=1) and QTGMC(sharpness=0) all give alternating black and white frames. I'm not sure which is preferable in an HD>DVD scenario.

henryho_hk
13th May 2011, 11:19
I apply ColorYUV() later so that it can deal with less data. Yet, I do not apply a horizontal resizer first because bob() is pretty fast and I also want to leave more data for spline36resize() to help hiding the jagginess of slant edges.

And I do suggest looking more into the aspect ratio correction.

Technically, if we have an image of alternating black/white horizontal 1px lines, we really don't know whether it is a static picture of black/white lines or two alternate black/white pictures. Nevertheless, it is weird to produce a grey picture. Perhaps TDeint() has applied some vertical filtering beforehand. Let me try tonight what QTGMC(border=true) will produce.

nhope
13th May 2011, 12:09
My thinking was to apply ColorYUV earlier so that the bobbing/resizing/filtering has more dynamic range (a little more contrast) to work with. But I didn't really see a difference in the quality of the output. Ideally I would prefer to use SmoothLevels in the same place in the script that you have ColorYUV, but it doesn't support YUY2 and YV12 gives me a chroma error (http://forum.doom9.org/showthread.php?t=161011) :(

I've read a number of times about a slight speed increase from doing the horizontal resize before deinterlacing, but if there's a good reason not to do that then I'll change. Also it seems like most of the experienced AviSynth users prefer Spline36 resize over Lanczos3. I might swap to that, although I couldn't really see any difference in the result.

Won't 704x480 + addborders give slight letterboxing (EDIT: I meant pillarboxing)? I'd prefer to avoid that if possible. Not a problem with CRT overscan but it would show up in DVD software, wouldn't it?

Finally I tend to agree that the TDeint bob is slightly weird to produce a grey picture in the 1px area. Maybe it's related to its motion adaptivity. However I get the feeling that might be a happy accident that actually helps reduce twitter/flicker/shimmer in the DVD. The downscaled output from that looks good.

By the way, the "very fast" QTGMC seems to be good enough for applying to HD in this workflow.

henryho_hk
14th May 2011, 16:03
Letterboxing is unavoidable because NTSC 16:9 DVD is really "wider" than 1920x1080 HD.

wonkey_monkey
14th May 2011, 16:43
Letterboxing is unavoidable because NTSC 16:9 DVD is really "wider" than 1920x1080 HD.

But any correct playback implementation should discard the outermost 8 pixels on either side and use only the central 704x480 when displaying the output.

Or you can just render to DVD straight from 704x480.

David

henryho_hk
15th May 2011, 17:40
Yes, 704x480 is a valid DVD resolution too.

nhope
5th July 2011, 16:53
I do not apply a horizontal resizer first because bob() is pretty fast and I also want to leave more data for spline36resize() to help hiding the jagginess of slant edges

I'm puzzled by this. I thought AviSynth resizers work in 2 separate passes, so it wouldn't make any difference to the result to do the horizontal resize before a bob and the vertical resize after :confused: But I do see very small differences in the result... I think.

Also there seems to be an error with addborders(8,0,8,0,align=true) in your script. align=true works for crop but doesn't seem to be a valid option for addborders. It works OK without that option.

henryho_hk
6th July 2011, 01:06
Yup, I was just writing the script on scratch on the forum and so I put the ",align=true" incorrectly.

By "leaving more data to bob()", I mean "spline36resize(704,last.height).bob(0.3782,0.3109).spline36resize(704,480)" vs "bob(0.3782,0.3109).spline36resize(704,480)". I am trying to leave more horizontal data to bob(), and then hide the imperfection of bob()'s field-interpolation by the final shrink. Of course, if the video is grainy, you may try shrinking horizontally first, then feed the "hopefully-cleaner" data into bob() for field-interpolation, hoping for better result.

2Bdecided
6th July 2011, 10:48
dumb bob is a linear operation (as is resizing!), so I can't see why the order matters at all. Except for tiny rounding differences maybe?

The various smart bobs aren't linear at all, so difference between resizing before vs after are somewhat unpredictable - except for the speed advantage.

Cheers,
David.