[FFmpeg-devel] [PATCH] libopenjpeg GRAY16 decoding

Paul B Mahol onemda at gmail.com
Mon Jan 30 22:02:20 CET 2012


On 1/30/12, Michael Bradshaw <mbradshaw at sorensonmedia.com> wrote:
> On Mon, Jan 30, 2012 at 1:18 PM, Paul B Mahol <onemda at gmail.com> wrote:
>
>> On 1/30/12, Michael Bradshaw <mbradshaw at sorensonmedia.com> wrote:
>> > Hi, attached patch adds support for decoding GRAY16 video with
>> libopenjpeg.
>> >
>>
>> Unrelated to this but if libopenjpeg supports planar YUVA444 it will
>> be interpreted as rgba.
>
>
> That is true, and YUV444 is currently interpreted as RGB (now that you
> mention it I'll have to add YUVA444 to the encoder sometime).  Currently
> the decoder doesn't check for any pixel format flags.  Would it be
> beneficial if I (or someone) made a patch for the decoder that would allow
> the user to force a decoding pixel format (only if it's a potentially valid
> match)?  The only case I can think of it being needed is in decoding YUV444
> and YUVA444.

Decoder should not lie, e.g. claiming picture is rgba when infact it is not,
and this should be correctly implemented from the begining.

If pixel format is not supported it should be explicitly checked and
file ignored.

It is bad idea to do pixel conversion in decoder itself.


More information about the ffmpeg-devel mailing list