[FFmpeg-cvslog] libopenjpeg: YUV410P and YUV411P support
Paul B Mahol
git at videolan.org
Mon Jun 4 13:47:35 CEST 2012
ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Fri Jun 1 12:18:05 2012 +0000| [b0f6df28de4f78decd0acec88d860e1719ea8b05] | committer: Paul B Mahol
libopenjpeg: YUV410P and YUV411P support
Signed-off-by: Paul B Mahol <onemda at gmail.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b0f6df28de4f78decd0acec88d860e1719ea8b05
---
libavcodec/libopenjpegdec.c | 3 ++-
libavcodec/libopenjpegenc.c | 5 +++++
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/libavcodec/libopenjpegdec.c b/libavcodec/libopenjpegdec.c
index 9928adb..9829e74 100644
--- a/libavcodec/libopenjpegdec.c
+++ b/libavcodec/libopenjpegdec.c
@@ -39,7 +39,8 @@
// 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_YUV420P,PIX_FMT_YUV422P,PIX_FMT_YUVA420P, \
+#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, \
PIX_FMT_YUV420P9,PIX_FMT_YUV422P9,PIX_FMT_YUV444P9, \
PIX_FMT_YUV420P10,PIX_FMT_YUV422P10,PIX_FMT_YUV444P10, \
diff --git a/libavcodec/libopenjpegenc.c b/libavcodec/libopenjpegenc.c
index b357fcd..da12498 100644
--- a/libavcodec/libopenjpegenc.c
+++ b/libavcodec/libopenjpegenc.c
@@ -89,6 +89,8 @@ static opj_image_t *mj2_create_image(AVCodecContext *avctx, opj_cparameters_t *p
case PIX_FMT_RGBA64:
color_space = CLRSPC_SRGB;
break;
+ case PIX_FMT_YUV410P:
+ case PIX_FMT_YUV411P:
case PIX_FMT_YUV420P:
case PIX_FMT_YUV422P:
case PIX_FMT_YUV440P:
@@ -333,6 +335,8 @@ static int libopenjpeg_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
cpyresult = libopenjpeg_copy_packed16(avctx, frame, image);
break;
case PIX_FMT_GRAY8:
+ case PIX_FMT_YUV410P:
+ case PIX_FMT_YUV411P:
case PIX_FMT_YUV420P:
case PIX_FMT_YUV422P:
case PIX_FMT_YUV440P:
@@ -448,6 +452,7 @@ AVCodec ff_libopenjpeg_encoder = {
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_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