[FFmpeg-user] 4K RGB->YUV realtime conversion.

Anders Degerberg anders at europasound.se
Mon Mar 8 20:58:44 EET 2021


Hi Peter,

On Mon, 8 Mar 2021 at 19:18, Peter White <peter.white at posteo.net> wrote:
> Try:
>
> ffmpeg -i input_file -sws_flags show_info ... output_file
'-sws_flags print_info' gives:
[swscaler @ 0x4752f00] bicubic scaler, from gbrp10le to yuv444p16le using MMXEXT

> Do you really have to use RGB on the Decklink? Seems pointless to me, if
> it has to be converted anyway. Why not simply keep it in YUV-mode?
Basically because the SDI signal I feed to the Decklink card is
received from a RGB-10 bit monitor feed.
I've been thinking about inserting a hardware RGB->YUV converter in
between, but unfortunately the ffmpeg decklink input device doesn't
support yuv444p10.
Therefore, doing so will introduce an unnecessary chroma subsampling
step which I'm trying to avoid.

> Maybe it is because of the massive amount of data that needs to be
> shifted around. Not sure, but 4K is four times as much data as 1080p.
Yes, converting RGB 10bit ->YUV in 1920x1080 creates about 40% load on
the 4GHz Ryzen processor thread at 25fps. So I guess 4K would need
4x40%=160%(impossible) load on that one thread, or a multi-thread
solution for libswscale's rgb2yuv conversion?


More information about the ffmpeg-user mailing list