View Full Version : old topic, latest thinking ? sharpening an interlaced source
hydra3333
6th August 2011, 05:26
I have PAL 576i TV captures which are fast sports action. I want to convert these to DVD and also to MP4.
Recently, a lot of them seem blurry. What are the latest function(s) which you would use to sharpen the captures (including de-interlacing, if that's part of it) ?
Something like this ?
DGMultiSource("file.dgi",deinterlace=2) #deinterlace=2 means double rate deinterlacing
trim(1,-999999) # fix a double-framerate bug in NV per http://forum.doom9.org/showthread.php?p=1391556#post1391556
#LimitedSharpenFaster(smode=4,strength=100)
UnFilter(15,15)
# Re-Interlace and halve framerate, back to 25i
AssumeTFF()
Blur(0,1).SeparateFields().SelectEvery(4,0,3).Weave() #reinterlace - ASSUMED TFF HERE # BLUR(0,1) per http://forum.doom9.org/showthread.php?p=1488308#post1488308
AssumeTFF()
TheSkiller
6th August 2011, 10:24
Yeah, that's how to sharpen an interlaced source (well, if you activate LSF ;)). You should throw out the Blur(0,1) this is not neccessary for a SD source. This is a suggestion for downscaling high definition to DVD to avoid extreme line twittering.
Mounir
6th August 2011, 12:46
SelectEvery(4,0,3) is for BFF no?
Gavino
6th August 2011, 14:13
SelectEvery(4,0,3), when used as above, preserves whatever field parity you have before the call to SeparateFields(). So here (because of the preceding AssumeTFF) it gives TFF. (The second call to AssumeTFF() is unnecessary.)
Mini-Me
6th August 2011, 17:31
Everyone else already seems to have the parity covered for reinterlacing. What I would suggest though is to try QTGMC(preset = "super fast", lossless = 1) for deinterlacing in place of DGMultiSource. It might be a bit more temporally stable, which should help prevent temporal aliasing as a result of the sharpening operation.
wonkey_monkey
6th August 2011, 19:41
You should throw out the Blur(0,1) this is not neccessary for a SD source. This is a suggestion for downscaling high definition to DVD to avoid extreme line twittering.
Won't sharpening the video also induce twittering, because you're undoing the vertical blur that would have been performed before broadcast to avoid it?
David
hydra3333
6th August 2011, 23:48
David, does that mean I should not bother sharpening ?
I recall testing QTGMC with the highest of hopes. Per http://forum.doom9.org/showthread.php?p=1488308#post1488308 it was with HD->SD to find in the end that I was not comfortable with bang for the cpu-cycle as it was comparatively slow.
Maybe the cost/benefit will be better here with 576i source. Suggestions for QTGMC settings (or a link to them) to use on large grassed arena/fast ball sports action 567i TV captures welcomed.
(Was it QTGMC that required a plugin with a special non-standard MS C runtime ?)
TheSkiller
7th August 2011, 10:33
Won't sharpening the video also induce twittering, because you're undoing the vertical blur that would have been performed before broadcast to avoid it?
Sharpening will amplify any present line twittering, it won't "add" new because for that to work new details are required which no sharpener can simply produce. A loss of detail can't be undone. I really doubt you can make a rather blurry video so sharp without looking ugly (overdone) that this would become an issue. If there aren't many details then there isn't much that could cause line twittering in case of reasonable sharpening.
Why should there be a vertical blur before boadcast, this is not neccessary if the video is filmed with SD cameras (which is probably not so likely, instead it is a blurry downscaled HD video with too much vertical blur I guess).
Since you're going to reinterlace the video there is no need for a very elaborate bob-deinterlacing. You just need to "fill in the missing lines" with something stable to give the sharpener a reasonable video to chew on. What Mini-Me suggested is what I would suggest as well, QTGMC(preset="super fast", lossless=1). Lossless=1 keeps the original fields untouched, "super fast" will give sufficient quality interpolated lines. Those will be thrown away with the final reinterlace (as long as you don't change the field order in between; if the source is TFF then it should stay TFF to keep the original and sharpened, not interpolated, lines when reinterlacing).
Mini-Me
7th August 2011, 17:50
David, does that mean I should not bother sharpening ?
I recall testing QTGMC with the highest of hopes. Per http://forum.doom9.org/showthread.php?p=1488308#post1488308 it was with HD->SD to find in the end that I was not comfortable with bang for the cpu-cycle as it was comparatively slow.
Maybe the cost/benefit will be better here with 576i source. Suggestions for QTGMC settings (or a link to them) to use on large grassed arena/fast ball sports action 567i TV captures welcomed.
(Was it QTGMC that required a plugin with a special non-standard MS C runtime ?)
I don't think QTGMC requires anything strange (other than what FFT3D requires), but it does have a long list of required plugins (some depending on settings). -Vit- has packaged them all together into a single .zip for simplicity on page 1 of the thread though (http://forum.doom9.org/showthread.php?t=156028).
If you're deinterlacing for final rendering, everyone has their own subjective preferences for the best settings, and there's a lot of discussion over that.
However, if you're deinterlacing just to apply a filter to interlaced input, and you're planning on interlacing again, I would definitely use:
source.QTGMC(preset = "super fast", lossless = 1)
In fact, I'm using exactly that in a function I've been working on. As TheSkiller said, your goal is to fill in the missing lines with something reasonable and temporally stable. That will give the original lines good neighbors for applying spatial filters to the interlaced video.
I would also use those same settings for real-time playback deinterlacing. Unlike some other presets, "super fast" is fast enough for single-threaded real-time playback on most recent processors. At the same time, I've never seen any faster deinterlacer look as good, but you can try yourself by interleaving and comparing frames!
That's the short version. For a bit of justification, lossless = 1 is important for both use cases for different reasons:
For filtering interlaced content: By default, QTGMC modifies the original fields. Lossless mode 1 allows you to keep the original fields exactly as they were (and simply give them good neighbors), which is precisely what you need for deinterlace->sharpen->reinterlace. If you were to simply deinterlace->reinterlace forever in a loop, you would lose nothing with lossless mode 1.*
For real-time playback: By default, QTGMC modifies the original fields (as mentioned before). The original fields become noticeably softer with "super fast", and the final output is much less detailed than with "placebo." Simply using lossless mode 1 restores about half of that difference. For the "super fast" preset, I pretty much can't do without lossless mode 1. :p The generated fields are also soft enough with "super fast" that the untouched original fields fit with them very well. Ironically, lossless mode 1 doesn't work as well with the medium-speed presets, where the generated fields are a bit sharper. With those presets, using lossless mode 1 makes bob shimmer more noticeable on thin horizontal details...but once you get to the slowest presets, it's awesome again (though lossless mode 2, "almost lossless," can be better here).
Deinterlacing->filtering->reinterlacing is a great general technique for using spatial filters on interlaced content. As others said, using sharpening filters in particular is not always the best idea when your final output will be interlaced...but I'd like to think that in your case it will probably be alright: Your source lines are probably soft enough for it, since a.) they're the result of interlacing and may have been low-passed beforehand (and you're not downscaling), and b.) you seem to think the source could use sharpening, so I'm assuming it's softer than usual. If you have problems with the sharpened output, perhaps you could sharpen only in stationary areas (similar to what Didee suggests here (http://forum.doom9.org/showthread.php?p=1492037#post1492037) about low-passing only areas with motion).
*To be precise, you do have to careful with a few other settings for lossless mode 1 to work perfectly: If you're using NoiseProcess = 1, you should set NoiseRestore to 1.0, GrainRestore to 0.0, and StabilizeNoise to False. If you're using NoiseProcess = 2, you should set NoiseRestore to 0.0 instead. You don't want to use EZDenoise or EZKeepGrain for lossless, because they set those values differently.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.