diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-09-21 14:07:36 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-09-21 14:07:41 +0200 |
commit | 8ad2465987d31bb818235303c0b02b897cd02133 (patch) | |
tree | da7e3f47944830550e476b0422ec0ae5134abe20 | |
parent | ac82155204f1587f1f900c734ce316c36f2430cb (diff) | |
parent | 79209f5d6ca31c73260f1c5f5dbaa8395102d9f1 (diff) | |
download | ffmpeg-8ad2465987d31bb818235303c0b02b897cd02133.tar.gz |
Merge remote-tracking branch 'cehoyos/master'
* cehoyos/master:
Allow encoding YUVJ422P and YUVJ444P with libx264.
Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavcodec/libx264.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/libavcodec/libx264.c b/libavcodec/libx264.c index ea7e905a85..0d8ba2959d 100644 --- a/libavcodec/libx264.c +++ b/libavcodec/libx264.c @@ -262,8 +262,10 @@ static int convert_pix_fmt(enum AVPixelFormat pix_fmt) case AV_PIX_FMT_YUV420P9: case AV_PIX_FMT_YUV420P10: return X264_CSP_I420; case AV_PIX_FMT_YUV422P: + case AV_PIX_FMT_YUVJ422P: case AV_PIX_FMT_YUV422P10: return X264_CSP_I422; case AV_PIX_FMT_YUV444P: + case AV_PIX_FMT_YUVJ444P: case AV_PIX_FMT_YUV444P9: case AV_PIX_FMT_YUV444P10: return X264_CSP_I444; #ifdef X264_CSP_BGR @@ -530,7 +532,9 @@ static av_cold int X264_init(AVCodecContext *avctx) x4->params.i_slice_count = avctx->slices; - x4->params.vui.b_fullrange = avctx->pix_fmt == AV_PIX_FMT_YUVJ420P; + x4->params.vui.b_fullrange = avctx->pix_fmt == AV_PIX_FMT_YUVJ420P || + avctx->pix_fmt == AV_PIX_FMT_YUVJ422P || + avctx->pix_fmt == AV_PIX_FMT_YUVJ444P; if (avctx->flags & CODEC_FLAG_GLOBAL_HEADER) x4->params.b_repeat_headers = 0; @@ -595,7 +599,9 @@ static const enum AVPixelFormat pix_fmts_8bit[] = { AV_PIX_FMT_YUV420P, AV_PIX_FMT_YUVJ420P, AV_PIX_FMT_YUV422P, + AV_PIX_FMT_YUVJ422P, AV_PIX_FMT_YUV444P, + AV_PIX_FMT_YUVJ444P, AV_PIX_FMT_NONE }; static const enum AVPixelFormat pix_fmts_9bit[] = { |