Commit 3f07ef1d authored by Michael Bradshaw's avatar Michael Bradshaw Committed by Michael Niedermayer

Added RGBA and YUV440 decoding support for libopenjpeg decoder

Reviewed-by: 's avatarJean First <jeanfirst@gmail.com>
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent d1669e5f
...@@ -52,6 +52,7 @@ static enum PixelFormat check_image_attributes(AVCodecContext *avctx, opj_image_ ...@@ -52,6 +52,7 @@ static enum PixelFormat check_image_attributes(AVCodecContext *avctx, opj_image_
switch (compRatio) { switch (compRatio) {
case 0111111: goto libopenjpeg_yuv444_rgb; case 0111111: goto libopenjpeg_yuv444_rgb;
case 0111212: return PIX_FMT_YUV440P;
case 0112121: goto libopenjpeg_yuv422; case 0112121: goto libopenjpeg_yuv422;
case 0112222: goto libopenjpeg_yuv420; case 0112222: goto libopenjpeg_yuv420;
default: goto libopenjpeg_rgb; default: goto libopenjpeg_rgb;
...@@ -296,6 +297,7 @@ static int libopenjpeg_decode_frame(AVCodecContext *avctx, ...@@ -296,6 +297,7 @@ static int libopenjpeg_decode_frame(AVCodecContext *avctx,
libopenjpeg_copyto16(picture, image); libopenjpeg_copyto16(picture, image);
break; break;
case 3: case 3:
case 4:
if (ispacked) { if (ispacked) {
libopenjpeg_copy_to_packed8(picture, image); libopenjpeg_copy_to_packed8(picture, image);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment