From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id 0D38342855 for ; Sat, 4 Jun 2022 13:36:14 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 2A7E068B6F3; Sat, 4 Jun 2022 16:36:12 +0300 (EEST) Received: from mail-qt1-f169.google.com (mail-qt1-f169.google.com [209.85.160.169]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 0279268B5BB for ; Sat, 4 Jun 2022 16:36:05 +0300 (EEST) Received: by mail-qt1-f169.google.com with SMTP id hf10so7548063qtb.7 for ; Sat, 04 Jun 2022 06:36:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:date:mime-version:user-agent:subject:content-language:to :references:from:in-reply-to:content-transfer-encoding; bh=AeXRmytmYbVl1la0Z5oKFLYnFy3ReziEVFnUL1AClNk=; b=C7JCeA0GjebJSJXuoRHnhmRdXrXaDJwOMptL50lgLimZxxWP0Och0XVHa+rzuanYEI U3XYxbDV3Uzw9XljL0kqJqjs3k8GG1riXWRm2irXYxXZPrV2aD+2YW4AxclqDs1xY3S9 MC2yK385Tzay2XQ0m3hV8a4kx0qmxSIdcVRTy1tPqyRvYkYdFP+4DuDusJ/xYA9L3sBx Mu8YZARoJHh7R5BCxreJBKCl8Jdw8HjT0pfK9A4TSNgHEcZxIgyJvxIq4rQjwco3UX1D hfRuL69MNtV2Wqc512AVR1+tM2LsMYM6ViX0f8ZF0Jweg4BKsgeWs5i21H5SZ4VXCwOV hK4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:references:from:in-reply-to :content-transfer-encoding; bh=AeXRmytmYbVl1la0Z5oKFLYnFy3ReziEVFnUL1AClNk=; b=iPSnO21lzTXwz8qtA4Ru2PJAd3dAp4bnADkjFZtY5ZzlrGsPeaFR+8RqFEg3PtKS9s UU+3GCfXOr//PRVSfTKTv8nNWCagV194+6xpNOia6pvDLbROVizlY1wt/bvBQ/I7BMHI i7YgqElU5NrFxzq9METKXiIRHs0x+cR3AtuMLkmg8sXIInQ1as0vSJXq0iOB9KfKwLrf wXdk7IY+40LUGAnV7Jmzc8SYqjg8D9/AxT9wCZU53P4FXZyffziMPs6toJsatbMF+6BE l4FjbPiiZouriSG448A8tRAzi42jJvMJTVmOvxh2MdzuhYQwHd6p2LxGGbYw4Jmh8/e7 0Dpg== X-Gm-Message-State: AOAM530T21FtmJnrLDtWNmT8nADmbvXvWOumtdbA1fIZvcOOb+nvaiyj 3x+AZ+ylmhDa84ZaEgsPEthr67XDSWqDyQ== X-Google-Smtp-Source: ABdhPJzT1OqiWy+GRPkIEoJsZMGAMs7ZPCDHMZPazKBL1Ab4Y1ZqDtm46TjRj7SYjmu05ECjkno8Gg== X-Received: by 2002:ac8:578f:0:b0:2f9:317a:bd25 with SMTP id v15-20020ac8578f000000b002f9317abd25mr11676057qta.456.1654349763840; Sat, 04 Jun 2022 06:36:03 -0700 (PDT) Received: from [192.168.1.35] (c-68-41-54-207.hsd1.mi.comcast.net. [68.41.54.207]) by smtp.gmail.com with ESMTPSA id h12-20020a05620a13ec00b0069fc13ce20asm105726qkl.59.2022.06.04.06.36.02 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 04 Jun 2022 06:36:03 -0700 (PDT) Message-ID: <51af4a36-15af-14a9-6716-b328571fb413@gmail.com> Date: Sat, 4 Jun 2022 09:36:02 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 Content-Language: en-US-large To: FFmpeg Development References: <20220525161012.1077373-1-leo.izen@gmail.com> From: Leo Izen In-Reply-To: <20220525161012.1077373-1-leo.izen@gmail.com> Subject: Re: [FFmpeg-devel] [PATCH v2] avformat/jpegxl_probe: fix incorrect cw_mask and extensions probing X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: On 5/25/22 12:10, Leo Izen wrote: > - Fix incorrectly skipping over the upX_weights > if the cw_mask is present and it is not a multiple of 4. > > - Fix not skipping over the extensions payload if an extension > is present. > --- > libavformat/jpegxl_probe.c | 15 +++++++++++---- > 1 file changed, 11 insertions(+), 4 deletions(-) > > diff --git a/libavformat/jpegxl_probe.c b/libavformat/jpegxl_probe.c > index 9cd00da194..b5aac4869b 100644 > --- a/libavformat/jpegxl_probe.c > +++ b/libavformat/jpegxl_probe.c > @@ -359,24 +359,31 @@ int ff_jpegxl_verify_codestream_header(const uint8_t *buf, int buflen) > > extensions = jxl_u64(); > if (extensions) { > + uint64_t extensions_len = 0; > for (int i = 0; i < 64; i++) { > if (extensions & (UINT64_C(1) << i)) > - jxl_u64(); > + extensions_len += jxl_u64(); > } > + if (extensions_len) > + jxl_bits_skip(extensions_len); > } > } > > /* default transform */ > if (!jxl_bits(1)) { > + uint32_t cw_mask; > + > /* opsin inverse matrix */ > if (xyb_encoded && !jxl_bits(1)) > jxl_bits_skip(16 * 16); > + > /* cw_mask and default weights */ > - if (jxl_bits(1)) > + cw_mask = jxl_bits(3); > + if (cw_mask & 1) > jxl_bits_skip(16 * 15); > - if (jxl_bits(1)) > + if (cw_mask & 2) > jxl_bits_skip(16 * 55); > - if (jxl_bits(1)) > + if (cw_mask & 4) > jxl_bits_skip(16 * 210); > } > Bumping for review. - Leo Izen (thebombzen) _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".