[FFmpeg-devel] r210 and r10k

Thomas Worth dev at rarevision.com
Mon Jul 18 13:29:34 CEST 2011


Hi, the r210 / r10k decoder is using the RGB48 pixel format, but I
think this is a waste of data. These formats only ever use 32 bits per
R,G,B. Would it not be a better idea to create a new pixel format like
"PIX_FMT_RGB44410LE" and unpack/pack only 32 bits? A couple reasons
why this might be better:

1. 32 bit packed 10-10-10-2 is native for Blackmagic and Aja SDI devices
2. OpenGL supports the GL_UNSIGNED_INT_10_10_10_2 data type, which is
32 bit packed RGB10.

This way, these values could be passed back-and-forth natively without
having to keep unpacking and packing them.

In the case of encoding (which still needs to be implemented), I'm not
sure of is how the discrete 10 bit rgb values would be handed over to
the encoder since they must be packed first. Perhaps instead of
supplying planes of 16 bit values for r,g,b you could just pass a 32
bit value containing all 3 values plus padding. So instead of
data[0]=r, data[1]=g, data[2]=b, it could just be
data[0]=(uint32_t)32bitrgb. Or something like that.


More information about the ffmpeg-devel mailing list