summaryrefslogtreecommitdiff
path: root/libavcodec/libx264.c
diff options
context:
space:
mode:
authorCarl Eugen Hoyos <cehoyos@ag.or.at>2013-09-21 09:52:47 +0200
committerCarl Eugen Hoyos <cehoyos@ag.or.at>2013-09-21 09:54:06 +0200
commit79209f5d6ca31c73260f1c5f5dbaa8395102d9f1 (patch)
tree7ba0f13b7611e5980b12611c8dc4dc10fc1b3a13 /libavcodec/libx264.c
parentf76b633a94e19dc8aca0b80143272ce9b497f94c (diff)
Allow encoding YUVJ422P and YUVJ444P with libx264.
Reviewed-by: Reimar
Diffstat (limited to 'libavcodec/libx264.c')
-rw-r--r--libavcodec/libx264.c8
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[] = {