YUV 4:2:2 chroma sub-sampling


#1

Hi I’m new to using Natron. Can anyone tell me, for sure, what chroma resampling modality (Bilinear, Bicubic, Nearest-Neighbor/Point etc) Natron uses (by default) for sub-sampling RGB/444 to (Rec709) YUV 422 at export -that is to say, when there is no change in resolution, only format ?

Also, is there any setting that allows choice of the resampling modality ? Can’t find anything in the Natron User Guide.

Thanks.


(Frédéric Devernay) #2

ffmpeg does it, so see the ffmpeg documentation


#3

FFmpeg uses its own swscale library for both resizing and pixel format conversions. According to the documentation (linked in previous sentence), it should default to bicubic interpolation.

… However, if you actually use FFmpeg, you’ll find that is not accurate. If you’re actually using the scale filter and specify the flags filter parameter without actually setting a scaling algorithm, yes it defaults to bicubic - but if you leave out the flags parameter entirely, it uses bilinear instead.

At least, it used to. I’m not 100% sure if it still does, but I felt I should chime in just in case. I’m also not sure if this behavior is the same when you use the APIs more directly (rather than calling the ffmpeg command-line application, which is where most of my experience with FFmpeg is).


#4

Thanks guys. Actually I figured it out using a two-color 5X5 pixel/block checkerboard image (created in Natron) exported to ProRes_4444 and ProRes_HQ (10bit 422). I then compared the block patterns and scope profiles when the ProRes_4444 file was converted to Uncompressed 10bit 422 (v210) with AVISynth and Vaporsynth using different chroma resamplers. The results were consistent with simple Box kernel sub-sampling.