Log in

View Full Version : “full chroma interpolation” and “full chroma input” in ffmpeg?


Grojm
3rd March 2018, 00:10
What do the options “full chroma interpolation” and “full chroma input” do in video scaling?

In ffmpeg, there are options full_chroma_int and full_chroma_inp that can be passed to the video scaling filter. These options are sometimes present in command line examples for the resizing filter, such as in FFmpeg Wiki: Scaling. (https://trac.ffmpeg.org/wiki/Scaling)

The documentation just describes these options as "Enable full chroma interpolation." and "Select full chroma input." respectively. However, it is not clear to me what these options are for and how they affect quality or encoding time.

Does anyone have an intuitive explanation and/or a rule of thumb when to use these options?

LoRd_MuldeR
3rd March 2018, 13:00
I think these options directly map to the flags of the "swscale" library, i.e. the software scaling library used by FFmpeg:

from swscale.h:
//internal chrominance subsampling info
#define SWS_FULL_CHR_H_INT 0x2000
//input subsampling info
#define SWS_FULL_CHR_H_INP 0x4000

To my understanding, this is about chroma subsampling (https://en.wikipedia.org/wiki/Chroma_subsampling#Sampling_systems_and_ratios). So, the SWS_FULL_CHR_H_INP flag would indicate that the input has "full" chroma resolution (YUV 4:4:4), whereas the absence of the flag would indicate chroma sub-sampling (e.g. YUV 4:2:2 or YUV 4:2:0). At the same time, the SWS_FULL_CHR_H_INT seems to indicate the chroma resolution that libswscale uses internally.