[FFmpeg-devel] [PATCH] libopenjpegdec: respect JP2 color space, fix ticket 1179

Michael Bradshaw mbradshaw at sorensonmedia.com
Wed May 2 20:20:25 CEST 2012

Attached patch fixes ticket 1179 for me (mostly*) by respecting the
JP2 color space, if it is set. It also adds support for yuv444p. It
still has to guess the color space for J2K frames.

Feel free to be nitpicky about the patch; for example there were times
I debated between a switch and a for with an if, trying do what is
consistent with the rest of ffmpeg, and it's possible I may done
something inconsistent.

*I say mostly because it fixes it for JP2 frames, but J2K frames still
have the potential to be guessed incorrectly (i.e. yuv444p and rgb24
can get mixed up). However, it is not possible, as far as I know, to
correctly guess between yuv444p and rgb24 in a J2K frame without
hinting from the user, so this patch fixes it as much as can be
automatically guessed. I tried passing a "-pix_fmt yuv444p" as an
input option to see if the user could hint the input pixel format, but
ffmpeg rejected it ("Option pixel_format not found."). Should I add a
"-pix_fmt" option for the decoder so the user can hint the input pixel


-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-libopenjpegdec-respect-JP2-color-space-fix-ticket-11.patch
Type: application/octet-stream
Size: 7095 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20120502/86ce205d/attachment.obj>

More information about the ffmpeg-devel mailing list