[FFmpeg-devel] AVPixelFormat for YUYV 10 bit.
Devin Heitmueller
dheitmueller at ltnglobal.com
Mon Mar 25 15:59:12 EET 2019
Hello Yufei,
> On Mar 25, 2019, at 9:53 AM, Yufei He <yhe at matrox.com> wrote:
>
> Hi
>
> I think there may be one format missing in AVPixelFormat.
>
> AV_PIX_FMT_YUYV210
>
>
> [cid:part1.002B7405.3138ACFB at matrox.com]
>
>
> The start of each line in the V210 video buffer format must be
> aligned to a multiple of 48 pixels (128 bytes). This means that if a line is not a
> multiple of 48, each line of video data must be padded out to the nearest 48 pixel
> boundary. For example, a 1280 × 720 video buffer is 1280 pixels wide, which is not a
> multiple of 48. Each line of the video buffer must be padded to 1296 pixels (3456
> bytes) in order to make each line a multiple of 48.
>
> It's popular when video is in 10bit.
>
So V210 video is supported, but not as a pixel format. It’s treated as a packet format. Hence in order to use v210 video, you have to pass the video frame through the v210enc or v210 decoder module, at which point you end up with video in AV_PIX_FMT_YUV422P10 format.
We can argue about whether that was the right approach, but that’s what is done in ffmpeg today, and we use it regularly with the Blackmagic cards (i.e. you can look at libavdevice/decklink_enc.cpp, decklink_dec.cpp for usage).
Devin
---
Devin Heitmueller - LTN Global Communications
dheitmueller at ltnglobal.com
More information about the ffmpeg-devel
mailing list