[FFmpeg-devel] [PATCH v2] avcodec/libjxl: add JPEG XL decoding via libjxl

Michael Niedermayer michael at niedermayer.cc
Wed Oct 20 21:27:29 EEST 2021


On Wed, Oct 20, 2021 at 01:33:57PM -0400, Leo Izen wrote:
[...]
> --- a/libavformat/img2dec.c
> +++ b/libavformat/img2dec.c
> @@ -830,6 +830,16 @@ static int jpegls_probe(const AVProbeData *p)
>      return 0;
>  }
>  
> +static int jpegxl_probe(const AVProbeData *p)
> +{
> +    const uint8_t *b = p->buf;
> +
> +    if (AV_RB16(b) == 0xff0a ||
> +        AV_RB64(b) == 0x0000000c4a584c20)
> +        return AVPROBE_SCORE_EXTENSION + 1;
> +    return 0;
> +}

only 16bit for detection is a bit weak

thx

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Rewriting code that is poorly written but fully understood is good.
Rewriting code that one doesnt understand is a sign that one is less smart
than the original author, trying to rewrite it will not make it better.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20211020/c1011243/attachment.sig>


More information about the ffmpeg-devel mailing list