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

Gautam Ramakrishnan gautamramk at gmail.com
Sun Jun 21 21:44:39 EEST 2020


On Mon, Jun 22, 2020 at 12:12 AM <gautamramk at gmail.com> wrote:
>
> 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
>
This patch has to be discussed. I do not see any other formats having
a check like this,
but that is probably because the pixel format is determined from the
headers and not
from the codestream.
-- 
-------------
Gautam |


More information about the ffmpeg-devel mailing list