diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-07-05 12:15:41 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-07-05 12:15:48 +0200 |
commit | 4ea705114c17a155246e9c194f4790d51cf596f0 (patch) | |
tree | e13be982f9de69c88ba70c25ae55719bcf366980 | |
parent | 1fe6cb448a85d7768851f818850456c39eaa7926 (diff) | |
parent | d3b84fdccc849b5eef036f4e11e35788793c7f83 (diff) | |
download | ffmpeg-4ea705114c17a155246e9c194f4790d51cf596f0.tar.gz |
Merge git://github.com/mjbshaw/FFmpeg-OpenJPEG-J2K-Encoder
* git://github.com/mjbshaw/FFmpeg-OpenJPEG-J2K-Encoder:
libopenjpegdec: add support for decoding YUV420/422/444P12/14
libopenjpegenc: cosmetics: reorder pix_fmts
libopenjpegenc: add support for YUV420/422/444P12/14
Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavcodec/libopenjpegdec.c | 2 | ||||
-rw-r--r-- | libavcodec/libopenjpegenc.c | 22 |
2 files changed, 20 insertions, 4 deletions
diff --git a/libavcodec/libopenjpegdec.c b/libavcodec/libopenjpegdec.c index 5b5d27bc38..0643698653 100644 --- a/libavcodec/libopenjpegdec.c +++ b/libavcodec/libopenjpegdec.c @@ -44,6 +44,8 @@ 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_YUV420P12,PIX_FMT_YUV422P12,PIX_FMT_YUV444P12, \ + PIX_FMT_YUV420P14,PIX_FMT_YUV422P14,PIX_FMT_YUV444P14, \ PIX_FMT_YUV420P16,PIX_FMT_YUV422P16,PIX_FMT_YUV444P16 static const enum PixelFormat libopenjpeg_rgb_pix_fmts[] = {RGB_PIXEL_FORMATS}; diff --git a/libavcodec/libopenjpegenc.c b/libavcodec/libopenjpegenc.c index 5bd1f9c82f..96cca283b8 100644 --- a/libavcodec/libopenjpegenc.c +++ b/libavcodec/libopenjpegenc.c @@ -104,6 +104,12 @@ static opj_image_t *mj2_create_image(AVCodecContext *avctx, opj_cparameters_t *p case PIX_FMT_YUV420P10: case PIX_FMT_YUV422P10: case PIX_FMT_YUV444P10: + case PIX_FMT_YUV420P12: + case PIX_FMT_YUV422P12: + case PIX_FMT_YUV444P12: + case PIX_FMT_YUV420P14: + case PIX_FMT_YUV422P14: + case PIX_FMT_YUV444P14: case PIX_FMT_YUV420P16: case PIX_FMT_YUV422P16: case PIX_FMT_YUV444P16: @@ -350,14 +356,20 @@ static int libopenjpeg_encode_frame(AVCodecContext *avctx, AVPacket *pkt, break; case PIX_FMT_GRAY16: case PIX_FMT_YUV420P9: - case PIX_FMT_YUV420P10: - case PIX_FMT_YUV420P16: case PIX_FMT_YUV422P9: - case PIX_FMT_YUV422P10: - case PIX_FMT_YUV422P16: case PIX_FMT_YUV444P9: case PIX_FMT_YUV444P10: + case PIX_FMT_YUV422P10: + case PIX_FMT_YUV420P10: + case PIX_FMT_YUV420P12: + case PIX_FMT_YUV422P12: + case PIX_FMT_YUV444P12: + case PIX_FMT_YUV420P14: + case PIX_FMT_YUV422P14: + case PIX_FMT_YUV444P14: case PIX_FMT_YUV444P16: + case PIX_FMT_YUV422P16: + case PIX_FMT_YUV420P16: cpyresult = libopenjpeg_copy_unpacked16(avctx, frame, image); break; default: @@ -460,6 +472,8 @@ AVCodec ff_libopenjpeg_encoder = { 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_YUV420P12, PIX_FMT_YUV422P12, PIX_FMT_YUV444P12, + PIX_FMT_YUV420P14, PIX_FMT_YUV422P14, PIX_FMT_YUV444P14, PIX_FMT_YUV420P16, PIX_FMT_YUV422P16, PIX_FMT_YUV444P16, PIX_FMT_NONE }, |