[FFmpeg-devel,20/29] avcodec/libx264: do not use YUVJ pixel formats

Submitted by Paul B Mahol on Dec. 10, 2017, 1:14 p.m.

Details

Message ID 20171210131436.15791-20-onemda@gmail.com
State New
Headers show

Commit Message

Paul B Mahol Dec. 10, 2017, 1:14 p.m.
Signed-off-by: Paul B Mahol <onemda@gmail.com>
---
 libavcodec/libx264.c | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)

Patch hide | download patch | download mbox

diff --git a/libavcodec/libx264.c b/libavcodec/libx264.c
index 9c67c91f33..7a7f21c3d0 100644
--- a/libavcodec/libx264.c
+++ b/libavcodec/libx264.c
@@ -152,7 +152,6 @@  static int avfmt2_num_planes(int avfmt)
 {
     switch (avfmt) {
     case AV_PIX_FMT_YUV420P:
-    case AV_PIX_FMT_YUVJ420P:
     case AV_PIX_FMT_YUV420P9:
     case AV_PIX_FMT_YUV420P10:
     case AV_PIX_FMT_YUV444P:
@@ -414,14 +413,11 @@  static int convert_pix_fmt(enum AVPixelFormat pix_fmt)
 {
     switch (pix_fmt) {
     case AV_PIX_FMT_YUV420P:
-    case AV_PIX_FMT_YUVJ420P:
     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;
 #if CONFIG_LIBX264RGB_ENCODER
@@ -743,10 +739,7 @@  FF_ENABLE_DEPRECATION_WARNINGS
 
     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;
+    x4->params.vui.b_fullrange = avctx->color_range == AVCOL_RANGE_JPEG;
 
     if (avctx->colorspace != AVCOL_SPC_UNSPECIFIED)
         x4->params.vui.i_colmatrix = avctx->colorspace;
@@ -838,11 +831,8 @@  FF_ENABLE_DEPRECATION_WARNINGS
 
 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,
 #ifdef X264_CSP_NV21