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

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

Details

Message ID 20171210131436.15791-10-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/ljpegenc.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

Patch hide | download patch | download mbox

diff --git a/libavcodec/ljpegenc.c b/libavcodec/ljpegenc.c
index 924d2e2fff..2d7235dd96 100644
--- a/libavcodec/ljpegenc.c
+++ b/libavcodec/ljpegenc.c
@@ -289,10 +289,7 @@  static av_cold int ljpeg_encode_init(AVCodecContext *avctx)
 {
     LJpegEncContext *s = avctx->priv_data;
 
-    if ((avctx->pix_fmt == AV_PIX_FMT_YUV420P ||
-         avctx->pix_fmt == AV_PIX_FMT_YUV422P ||
-         avctx->pix_fmt == AV_PIX_FMT_YUV444P ||
-         avctx->color_range == AVCOL_RANGE_MPEG) &&
+    if (avctx->color_range == AVCOL_RANGE_MPEG &&
         avctx->strict_std_compliance > FF_COMPLIANCE_UNOFFICIAL) {
         av_log(avctx, AV_LOG_ERROR,
                "Limited range YUV is non-standard, set strict_std_compliance to "
@@ -363,7 +360,6 @@  AVCodec ff_ljpeg_encoder = {
     .capabilities   = AV_CODEC_CAP_FRAME_THREADS | AV_CODEC_CAP_INTRA_ONLY,
     .pix_fmts       = (const enum AVPixelFormat[]){
         AV_PIX_FMT_BGR24   , AV_PIX_FMT_BGRA    , AV_PIX_FMT_BGR0,
-        AV_PIX_FMT_YUVJ420P, AV_PIX_FMT_YUVJ444P, AV_PIX_FMT_YUVJ422P,
         AV_PIX_FMT_YUV420P , AV_PIX_FMT_YUV444P , AV_PIX_FMT_YUV422P,
         AV_PIX_FMT_NONE},
 };