[FFmpeg-cvslog] Allow encoding YUVJ422P and YUVJ444P with libx264.
Carl Eugen Hoyos
git at videolan.org
Sat Sep 21 14:25:29 CEST 2013
ffmpeg | branch: master | Carl Eugen Hoyos <cehoyos at ag.or.at> | Sat Sep 21 09:52:47 2013 +0200| [79209f5d6ca31c73260f1c5f5dbaa8395102d9f1] | committer: Carl Eugen Hoyos
Allow encoding YUVJ422P and YUVJ444P with libx264.
Reviewed-by: Reimar
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=79209f5d6ca31c73260f1c5f5dbaa8395102d9f1
---
libavcodec/libx264.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/libavcodec/libx264.c b/libavcodec/libx264.c
index ea7e905..0d8ba29 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[] = {
More information about the ffmpeg-cvslog
mailing list