[FFmpeg-cvslog] libopenjpeg: YUVA422P and YUVA444P support

Paul B Mahol git at videolan.org
Sat Jun 9 20:38:33 CEST 2012


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Sat Jun  9 18:33:29 2012 +0000| [1ef5561a662e96c9b3f554ee76d3a6e7327aba4c] | committer: Paul B Mahol

libopenjpeg: YUVA422P and YUVA444P support

Signed-off-by: Paul B Mahol <onemda at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1ef5561a662e96c9b3f554ee76d3a6e7327aba4c
---

 libavcodec/libopenjpegdec.c |    6 +++---
 libavcodec/libopenjpegenc.c |    8 ++++++--
 2 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/libavcodec/libopenjpegdec.c b/libavcodec/libopenjpegdec.c
index 3194c68..73e738f 100644
--- a/libavcodec/libopenjpegdec.c
+++ b/libavcodec/libopenjpegdec.c
@@ -39,9 +39,9 @@
 // similar pix_fmts with higher bpp.
 #define RGB_PIXEL_FORMATS   PIX_FMT_RGB24,PIX_FMT_RGBA,PIX_FMT_RGB48,PIX_FMT_RGBA64
 #define GRAY_PIXEL_FORMATS  PIX_FMT_GRAY8,PIX_FMT_GRAY8A,PIX_FMT_GRAY16
-#define YUV_PIXEL_FORMATS   PIX_FMT_YUV410P,PIX_FMT_YUV411P, \
-                            PIX_FMT_YUV420P,PIX_FMT_YUV422P,PIX_FMT_YUVA420P, \
-                            PIX_FMT_YUV440P,PIX_FMT_YUV444P, \
+#define YUV_PIXEL_FORMATS   PIX_FMT_YUV410P,PIX_FMT_YUV411P,PIX_FMT_YUVA420P, \
+                            PIX_FMT_YUV420P,PIX_FMT_YUV422P,PIX_FMT_YUVA422P, \
+                            PIX_FMT_YUV440P,PIX_FMT_YUV444P,PIX_FMT_YUVA444P, \
                             PIX_FMT_YUV420P9,PIX_FMT_YUV422P9,PIX_FMT_YUV444P9, \
                             PIX_FMT_YUV420P10,PIX_FMT_YUV422P10,PIX_FMT_YUV444P10, \
                             PIX_FMT_YUV420P16,PIX_FMT_YUV422P16,PIX_FMT_YUV444P16
diff --git a/libavcodec/libopenjpegenc.c b/libavcodec/libopenjpegenc.c
index da12498..4fd942e 100644
--- a/libavcodec/libopenjpegenc.c
+++ b/libavcodec/libopenjpegenc.c
@@ -96,6 +96,8 @@ static opj_image_t *mj2_create_image(AVCodecContext *avctx, opj_cparameters_t *p
     case PIX_FMT_YUV440P:
     case PIX_FMT_YUV444P:
     case PIX_FMT_YUVA420P:
+    case PIX_FMT_YUVA422P:
+    case PIX_FMT_YUVA444P:
     case PIX_FMT_YUV420P9:
     case PIX_FMT_YUV422P9:
     case PIX_FMT_YUV444P9:
@@ -342,6 +344,8 @@ static int libopenjpeg_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
     case PIX_FMT_YUV440P:
     case PIX_FMT_YUV444P:
     case PIX_FMT_YUVA420P:
+    case PIX_FMT_YUVA422P:
+    case PIX_FMT_YUVA444P:
         cpyresult = libopenjpeg_copy_unpacked8(avctx, frame, image);
         break;
     case PIX_FMT_GRAY16:
@@ -451,8 +455,8 @@ AVCodec ff_libopenjpeg_encoder = {
     .pix_fmts = (const enum PixelFormat[]){PIX_FMT_RGB24,PIX_FMT_RGBA,PIX_FMT_RGB48,PIX_FMT_RGBA64,
                                            PIX_FMT_GRAY8,PIX_FMT_GRAY8A,PIX_FMT_GRAY16,
                                            PIX_FMT_YUV420P,PIX_FMT_YUV422P,PIX_FMT_YUVA420P,
-                                           PIX_FMT_YUV440P,PIX_FMT_YUV444P,
-                                           PIX_FMT_YUV411P,PIX_FMT_YUV410P,
+                                           PIX_FMT_YUV440P,PIX_FMT_YUV444P,PIX_FMT_YUVA422P,
+                                           PIX_FMT_YUV411P,PIX_FMT_YUV410P,PIX_FMT_YUVA444P,
                                            PIX_FMT_YUV420P9,PIX_FMT_YUV422P9,PIX_FMT_YUV444P9,
                                            PIX_FMT_YUV420P10,PIX_FMT_YUV422P10,PIX_FMT_YUV444P10,
                                            PIX_FMT_YUV420P16,PIX_FMT_YUV422P16,PIX_FMT_YUV444P16,



More information about the ffmpeg-cvslog mailing list