Upsampling interlaced YUV420 to YUV422 ?
I have DVD's that were converted from VHS with a low grade toshiba dvd recorder and the video format of the DVD is interlaced YUV 4:2:0. Re-capturing the VHS video is not an option, they have been destroyed. I have some heavy noise reduction, color and chroma correction, drop frames to fix. From what I've read and understand filters and plugins have less information to work with YUV 4:2:0 than YUV 4:2:2. Will filters work better if I were to upsample from YUV 4:2:0 uncompressed to huffyuv 4:2:2?
From what I understand certain filters are meant to be used in certain color spaces. Which filters work better in which color spaces (the most common ones for VHS restoration)? I've read that avisynth is better than virtualdub at converting color spaces due to their modified algorithm. Is this still the case? Is there a better alternative? |
Quote:
Quote:
Quote:
Sometimes a higher chroma resolution is a better choice (cleaner, more detail retention, less destructive, fewer interpolation errors, etc.), sometimes it isn't. If a filter isn't designed to work in a particular colorspace, it can't be used in other colorspaces anyway. Many filters can work in more than one colorspace, most can't. Some multispace filters work better in one colorspace than in another. How do you find out? You use it, you find discussions about it (usually in doom9.org), you perform very specific and highly controlled experiments -- the latter means you have to know a lot about programming and filter design. To a general extent, a filter that can work in a higher color resolution gives superior results. How superior? Again, it depends. Usually the differences are subtle, but not always. One recommendation used by colorists and mastering experts is that resizing is cleaner when the color resolution is higher -- of course, much also depends on the resizer. As you can guess, there are different resizers. Try some of these in Avisynth: http://avisynth.nl/index.php/Resize. There are also special resizing filters or procedures. One favorite for downsizing is iResize, which basically uses the Spline36Resize algorithm (http://blog.davidesp.com/archives/269). The coded text in that link that begins with "function IResize" is saved as an .avs text file for use as an Avisynth plugin. It was designed primarily for use with interlaced material, but it can be used as-is with either interlaced or progressive. How do you know which colorspaces a filter can use? Look at the documentation. For a quick reference you can look at the following plugin listing that includes a column of allowed colorspaces: http://avisynth.nl/index.php/External_filters. For Avisynth built-in functions such as ColorYUV, consult the documentation or browse this page that lists filters and their intended color formats: http://avisynth.nl/index.php/Internal_filters. Which filters work better in which color spaces (the most common ones for VHS restoration)?[/QUOTE] There is no answer. Most of the classic Avisynth filters for VHS restoration use Yv12 only, some are YUY2 only, many can use YUY2 and YV12. The filters used depend on the problems they address. The deinterlacer QTGMC has the original basic version that works only in Yv12, but there are newer versions that can use multiple colorspaces. The advantage of the original, which is still a favorite, is that it's time-proven and always works. The problem with the newer versions is that they change every few months, they often work only in the computers of those who designed them, revisions almost always have bugs that are "fixed" in new revisions a week later, etc., etc. Newer versions of QTGMC can also work with 16-bit dithering if you're willing to master the specialized and complex procedures and support plugins required. I'd suggest that you start with what most refer to as the old classics and gradually move up to the newer stuff, keeping in mind that newer isn't always better and is often a pain in the neck. Most tried and true classics are 32-bit, but there are 64-bit versions if you don't mind waiting around for new updates from 32-bit (which in many cases will never happen). The newer 64-bit guys use more colorspaces. If they can fill the bill for you, go for it. I find the current choices too limited and poorly documented. Another consideration is that if you're using a batch of filters some of which require different colorspaces, it's best to stay within one colorspace before moving to the next, rather than jockey back and forth between colorspaces. Colorspace conversions involve math rounding and interpolation errors. Change colorspaces often enough and those errors add up, degrading quality. Quote:
Quote:
There is still a [supposed] problem with the way VirtualDub converts interlaced YV12 to RGB, but the rumor/report/assumption is that it's [supposed to be] fixed in v1.9 and later. Most people don't worry about it. But if you're really concerned you can always use an Avisynth script to open your Yv12 video and convert it to RGB formerly and properly before applying VirtualDub filters (http://avisynth.nl/index.php/Convert). If you're not applying RGB filters, no need to convert. Some people say that Davinci Resolve does good color conversion. Others disagree. Those who discuss it give no information one way or the other about how DaVinci does it (or doesn't do it) and no one seems to know how to post comparative results. The word "Pro" in software names has nothing to do what actually happens. For VHS work the gargantuan software bloat is often overkill and a silver bullet fantasy by those who don't know very much about color work and who think the pricey software will automatically solve all their processing problems for them. If you're going to get involved with complex software of that nature it's strongly advised that you get advanced knowledge of what you're doing and how the product works. Most people use Adobe and DaVinci the same way they would use a cheap $50 editor. On those terms you can accomplish more with Avisynth and VirtualDub, and they're free. It depends on how much you're willing to learn to to get the best from any product or method. Opinions otherwise are welcome and necessary. |
Thank you for such a detailed response, I've learned so much from reading all of your posts. You have a great eye for detail. I'm actually compiling a file with all the responses on the forum, so that it is easier for me to reference. If you wouldn't mind I'd also like to post it in order to help someone new to this, like me, get up to speed quicker.
Quote:
Quote:
Forgive me if this has been answered elsewhere, but what situations would deinterlacing be necessary? I'm guessing this should be done for truly interlaced videos before converted in a format that will be played back in a environment that does not handle interlaced videos well, such as streaming. Or does it depend on the quality of the videos and filters being used? Quote:
Quote:
"A tool is only as good as the hands that wield it" |
Quote:
Quote:
VHS always plays as interlaced and is captured that way. But the frames might be physically interlaced or not. Video created by consumer VHS cameras is always physically interlaced. Retail VHS tape could have several structures, depending on how it's mastered and its original source. A live TV broadcast (not film based) would be phsyically interlaced, but it could also have newsfilm segments that are telecined. Almost all early Sitcoms like I Love Lucy and even later were created on film at 23.976fps and are telecined for 29.97fps playback, meaning that they consist of 3 progressive frames and 2 interlaced frames in every group of 5 frames. Movie based retail tapes are almost always telecined. On tape, telecine plays back as if interlaced, even though you have the physical 3:2 pulldown in every 5 frames (this is called "hard telecine"). 3:2 pulldown is broken down to all-progressive film speed by using inverse telecine (Avisynth's TIVTC plugin). On retail tape you can also have speed adjustment by using periodic duplicate frames, in which case you'll need TIVTC's TDecimate function or other plugins. You'll encounter a complex system of duped and telecined frames in animation, although Disney's Hollywood classics like Snow White and others were created as 23.976 on film and as plain vanilla 3:2 pulldown on tape and DVD. Years ago a video guru named Neuron2 posted a famous HTML page that described basic ways to analyze frames. The page disappeared from the 'net years ago, but I posted a copy at digitalfaq a while back: Neuron2_How To Analyze Video Frame Structure.zip. Quote:
It's processing situations that get down to specific cases. If you want to use QTGMC's sometimes superior EZDenoise feature or try to get its motion smoothing and edge cleaning help against aliasing, sawtooth edges, and excessive interlace combing, you'll have to use QTGMC (which will automatically deinterlace) and manually set some of its special preset templates or other options. QTGMC's options are explained in great detail in the html doc that comes with the plugin and in the top several hundred lines of the .avsi text file itself. If you want to see how advanced users implement those options, browse forum posts of Avisynth scripts that use QTGMC. Or submit unfiltered video samples to get advice on specific real-life issues. Color and levels correction don't require deinterlace or inverse telecine. However, chroma shift and bleeding correction usually require it, along with filters that help clean up edge ghosts, halos, and DCT ringing (noise along edges, such as mosquito noise). Hard edges in large surfaces that should be smooth gradations will almost always require progressive frames for gradient smoothing and elimination of macroblocks. Common denoisers that don't usually (repeat usually) require purely progressive frames but can use SeparateFields() are MCTemporalDenoise, MDegrain2, RemoveSpots variations, RemoveDirt variations, and TemporalDegrain, along with some temporal smoothers such as TemporalSoften or TemporalSmoother. How to determine? it's largley a matter of using the filters and observing their behavior, as well as browsing forum posts for samples of noise and damage to see how they've been handled by others. Quote:
Don't go crazy with colorspace obsession. If you find that you must go from YUY2 to YV12 to use a YV12 filter to get somewhere and return to YUY2 to finish up, so be it. It's moving back and forth on and on that gets messy. I've had to work in YV12, then go to RGB for something, then come back to YUY2 and even 16-bit YV12 to clean up some pretty messy videos. Try to keep it simple and consistent. I've seen scripts where the user went haywire with repeated and circular colorspace conversions without rhyme or reason. It's not difficult to avoid that sort of thing. |
Quote:
sanlyn, this is all pure gold. I have a good idea of how to tackle the issues I'm having. I appreciate that your taking the time to pass the knowledge on. |
Site design, images and content © 2002-2024 The Digital FAQ, www.digitalFAQ.com
Forum Software by vBulletin · Copyright © 2024 Jelsoft Enterprises Ltd.