[FFmpeg-devel] [PATCH] y41p encoder and decoder

Paul B Mahol onemda at gmail.com
Sun Jan 1 19:12:56 CET 2012


On 1/1/12, Michael Niedermayer <michaelni at gmx.at> wrote:
> On Sun, Jan 01, 2012 at 11:28:16AM +0000, Paul B Mahol wrote:
>> On 12/31/11, Carl Eugen Hoyos <cehoyos at ag.or.at> wrote:
>> > Paul B Mahol <onemda <at> gmail.com> writes:
>> >
>> >> y41p is a packed 12-bit 4:1:1 YUV format used by Brooktree.
>> >
>> > (Fixes issue 1123 / ticket 102)
>> > Just two nits:
>> >
>> >> +    avctx->pix_fmt             = PIX_FMT_YUV411P;
>> >
>> >> +    avctx->bits_per_raw_sample = 12;
>> >
>> > Isn't 12 the default anyway?
>> >
>> > [...]
>> >
>> >> +    .long_name    = NULL_IF_CONFIG_SMALL("Uncompressed YUV 4:1:1
>> >> 12-bit"),
>> >
>> > Imo, this should be "Uncompressed packed YUV 4:1:1"
>> > (But please feel free to ignore)
>> >
>> > Is encoding odd widths allowed?
>>
>> Mplayer with bt411 driver crashes when trying to play Y41P muxed in
>> avi with ffmpeg. (Even if I use -vcodec copy).
>>
>> Another issue is that frame(for the only sample we have) is apparently
>> vertically flipped, this is related to
>> http://roundup.libav.org/issue2395. (Will try mentioned hack).
>>
>
>> So probably encoder should not do vertical flip, and decoder is busted
>> until there is way to find out if biHeight is positive or negative.
>
> See BottomUp in avidec.c, same could be implemented in avienc.c

According to this http://www.fourcc.org/fccbihgt.php
there is no point to check biHeight for this codec and
http://msdn.microsoft.com/en-us/library/windows/desktop/dd318229(v=vs.85).aspx
says same.

Note that Y41P description from first site contradicts with this.


More information about the ffmpeg-devel mailing list