[FFmpeg-devel] [PATCH] libopenjpegenc: add 9-15 bit RGB output

Michael Bradshaw mjbshaw at gmail.com
Thu Jan 24 16:55:27 CET 2013


On Thu, Jan 24, 2013 at 2:31 AM, Carl Eugen Hoyos <cehoyos at ag.or.at> wrote:

> Michael Bradshaw <mjbshaw <at> gmail.com> writes:
>
> > As far as I can tell, it's working fine, but I'd
> > really appreciate a sanity check on this. Also,
> > I'm not a big fan of the "shr" (reminiscent of IA32
> > shift right) option name but I couldn't think of a
> > particularly good name suggestion. Feel free to
> > suggest a better name.
>
> Do I understand correctly that output files made
> with this patch can be read by current FFmpeg?
>

To answer your question: yes*


> You could add a warning to this workaround saying that
> it will be removed once swscale supports gbr output
> and the option will be unneeded.
>

I think that would be a good idea.


> (And this is of course orthogonal to your gbr encoding
> patch, if it works with gbr input, it should be merged.)


Ok.

*There's a catch. Yes, it works, however I think it's uncovered a bug in
the encoder. If in input format is rgb48 (12 bpc), for example, the encoder
just uses the pixel format's component's depth_minus1 + 1 to set the depth
for the openjpeg image. I think the codec context's bits_per_raw_sample
should be involved somehow. Exactly how, I'm not sure, and hopefully
someone else will be able to verify this and fix it (with or without this
patch).

Thanks,

Michael


More information about the ffmpeg-devel mailing list