[FFmpeg-devel] v210 decoder patch

Francois Oligny-Lemieux eucloid
Wed Jul 18 23:55:08 CEST 2007


I have questions/comments:

About the automatic generic function to extract YUV info. I began to draft
it out yesterday and I found out it would work well on byte-aligned format.

However luma components in V210 are not byte-aligned. For example the first
Y luma begins at bit 3. I think V210 wouldn't fit in this hypothetical
generic yuv reader function.

Does anyone know other YUV formats that are not byte-aligned. I don't want
to make it complicated just for one format.

So for V210 I'm thinking to use the backup plan which is to add a
YUV422_16BIT pix format and V210 to have it's own libavcodec/v210.c file.

> > Do you mean adding swscale functions calls inside libavcodec/raw.c ?
> no
> the only change needed in raw.c is likely adding a single line to
> ff_raw_pixelFormatTags

Then where would the sws function be called? Would it be in ffmpeg.c (around
line 746) ? If yes, I think YUV formats should be converted right away in
libavcodec to the closest (and non-degrading) swscale-supported YUV format
and should not reach this stage in ffmpeg.c. Otherwise it will mean these
redondant YUV formats will be spread around ffmpeg.

What I propose is to do a CODEC_ID_MISCYUV that will load a
libavcodec/miscyuv.c file which will contain the generic yuv reader
function. This function will output YUV420P, YUV422{P}, YUV444P,
YUV422_16BIT. Like this swscale has no need to have knowledge of V210 (which
is the way it should be). And the generic yuv reader function can be used by
integrators (libavcodec users) that don't compile swscale.

Let me know,

More information about the ffmpeg-devel mailing list