On Mon, Jun 22, 2020 at 12:12 AM <gautamr...@gmail.com> wrote:
>
> From: Gautam Ramakrishnan <gautamr...@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 |
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to