使用哪个标志可以提高 sws_scale 的质量?

Ser*_*gey 6 ffmpeg

/* values for the flags, the stuff on the command line is different */
#define SWS_FAST_BILINEAR     1
#define SWS_BILINEAR          2
#define SWS_BICUBIC           4
#define SWS_X                 8
#define SWS_POINT          0x10
#define SWS_AREA           0x20
#define SWS_BICUBLIN       0x40
#define SWS_GAUSS          0x80
#define SWS_SINC          0x100
#define SWS_LANCZOS       0x200
#define SWS_SPLINE        0x400
Run Code Online (Sandbox Code Playgroud)

哪一种的图像质量更好?有哪些差异?都是有损的吗?我正在尝试将 RGB24 转换为 YUV420P。

Mat*_*ias 2

RGB24 到 YUV420 的转换本身是有损的。缩放算法可能用于缩小颜色信息。我想说的质量是:点 << 双线性 < 双三次 < lanczos/sinc/spline 我真的不知道其他的。在极少数情况下,sinc 是理想的缩放器并且是无损的,但通常不满足这些条件。您是否也缩放视频?否则我会选择双三次。