aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/libx264.c
diff options
context:
space:
mode:
authorCarl Eugen Hoyos <cehoyos@ag.or.at>2015-03-17 13:29:05 +0000
committerVittorio Giovara <vittorio.giovara@gmail.com>2015-03-17 13:34:22 +0000
commitc0f504e947cc0a3c73770419bf7d1af98288fc59 (patch)
tree75f4568b1cfe177878dfdb40c1112d6519ecd91c /libavcodec/libx264.c
parentc9ed48e80ef807ab0c1bb946ac8db5f34d83d9c9 (diff)
downloadffmpeg-c0f504e947cc0a3c73770419bf7d1af98288fc59.tar.gz
libx264: Allow full-range yuv422 and yuv444 pixel formats
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
Diffstat (limited to 'libavcodec/libx264.c')
-rw-r--r--libavcodec/libx264.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libavcodec/libx264.c b/libavcodec/libx264.c
index 6e707a867a..8e19be4782 100644
--- a/libavcodec/libx264.c
+++ b/libavcodec/libx264.c
@@ -290,8 +290,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;
case AV_PIX_FMT_NV12: return X264_CSP_NV12;
@@ -487,6 +489,8 @@ 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 ||
+ avctx->pix_fmt == AV_PIX_FMT_YUVJ422P ||
+ avctx->pix_fmt == AV_PIX_FMT_YUVJ444P ||
avctx->color_range == AVCOL_RANGE_JPEG;
if (avctx->flags & CODEC_FLAG_GLOBAL_HEADER)
@@ -554,7 +558,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_NV12,
AV_PIX_FMT_NV16,
AV_PIX_FMT_NONE