[FFmpeg-devel] [PATCH] libopenjpegdec: add pix fmt gbrp (9-14 bit)
mjbshaw at gmail.com
Thu Jan 24 15:31:41 CET 2013
On Thu, Jan 24, 2013 at 3:14 AM, Paul B Mahol <onemda at gmail.com> wrote:
> On 1/24/13, Michael Bradshaw <mjbshaw at gmail.com> wrote:
> > On Wed, Jan 23, 2013 at 11:01 PM, Michael Cinquin
> > <mc at michaelcinquin.com>wrote:
> >> On 23 janv. 2013, at 22:05, Michael Bradshaw wrote:
> >> > On Wed, Jan 23, 2013 at 2:05 PM, Michael Bradshaw <mjbshaw at gmail.com>
> >> wrote:
> >> >
> >> >> Added support for decoding gbrp (9-14 bit) images. I didn't add 8 and
> >> >> 16
> >> >> bit because these should just be decoded as RGB 8 and 16 bit.
> >> >>
> >> >> Note that this hasn't been tested. I don't have any samples, and I
> >> >> can't
> >> >> figure out how to get image_to_j2k to output 9-14 bit rgb samples
> >> >> I
> >> >> couldn't generate any with FFmpeg since there's no rgb48 -> gbr
> >> converter).
> >> Here is a j2c in xyz colorspace :
> >> www.michaelcinquin.com/get/12bpc_xyz.j2c
> >> , and another j2c in rgb colorspace, both of them 12 bpc.
> >> www.michaelcinquin.com/get/12bpc_rgb.j2c
> > Thanks for the samples!
> > To devs: this patch may not even be needed, actually (and after testing,
> > doesn't even work anyway). It looks like rgb48 pix fmt is selected and
> > avctx->bits_per_raw_sample is properly set to 12 bpc (tested with the
> > 12bpc_rgb.j2c sample).
> You have no single clue what you are doing.
You devs know FFmpeg far better than I do, which is why I appreciate your
feedback and reviews of patches I send in. I don't pretend to be an expert.
> Did you ever notice that RGB48 case is pure hack
> because you manully deinterleave/planarize RGB48.
I assume you're talking about the
libopenjpeg_copy_to_packed8/libopenjpeg_copy_to_packed16 functions in the
decoder, right? A) that code has roots that go back to before I ever
touched FFmpeg, and those functions weren't even written by me, so
I'm not sure what that has to do with me, and B) while the GBRP formats
were added a few days after my first FFmpeg patch (despite GBR24P
existing before), the decoder still needed to support RGB because it
would've been completely useless without it and without swscale's support
for the GBRP formats. But yes, I have noticed and felt this.
> Obviously you do not care for performance.
I care about performance, but I'll be honest I care more about whether or
not something is useful.
More information about the ffmpeg-devel