nyanmisaka / ffmpeg-rockchip

FFmpeg with async and zero-copy Rockchip MPP & RGA support
Other
326 stars 48 forks source link

lavf/rkrga: add `force_{yuv,chroma}` options for vpp filter #15

Closed nyanmisaka closed 5 months ago

nyanmisaka commented 5 months ago

They are used to set the output to an uncompact and linear format while maintaining the same chroma sub-sampling with the input. The user does not have to know the input format in advance.

A more user-friendly version of #13. It is impossible for FFmpeg noobs to know nv15 and nv20. Also since the only use case is for EGL based video players, there is no point to add additional RGB formats.

-vf "scale_rkrga=force_yuv=8bit" // auto cast nv15->nv12, or nv20->nv16
-vf "scale_rkrga=force_yuv=10bit" // auto cast nv15->p010, or nv20->p210
-vf "scale_rkrga=force_yuv=8bit:force_chroma=422sp" // enforce 8bit 422sp format
hbiyik commented 5 months ago

Tested and works fine

nyanmisaka commented 5 months ago

Merged in 4c1997e