[FFmpeg-devel] [PATCH 5/5] libavcodec/jpeg2000dec.c: Remove log2_chroma check in pixel format selection

gautamramk at gmail.com gautamramk at gmail.com
Sun Jun 21 21:42:08 EEST 2020


From: Gautam Ramakrishnan <gautamramk at gmail.com>

The log2_chroma_wh is derived from the sample separations of the
codestream if the file is a j2k codestream. Not sure if sample
separation is same is subsampling and whether using sample
separation values from the codestream to determine pixel format.
---
 libavcodec/jpeg2000dec.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/libavcodec/jpeg2000dec.c b/libavcodec/jpeg2000dec.c
index c8c89803ac..2b9659bf96 100644
--- a/libavcodec/jpeg2000dec.c
+++ b/libavcodec/jpeg2000dec.c
@@ -225,8 +225,6 @@ static int pix_fmt_match(enum AVPixelFormat pix_fmt, int components,
 
     case 1:
         match = match && desc->comp[0].depth >= bpc &&
-                         (log2_chroma_wh >>  2 & 3) == 0 &&
-                         (log2_chroma_wh       & 3) == 0 &&
                          (desc->flags & AV_PIX_FMT_FLAG_PAL) == pal8 * AV_PIX_FMT_FLAG_PAL;
     }
     return match;
-- 
2.17.1



More information about the ffmpeg-devel mailing list