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 09E084AE2E for ; Mon, 24 Jun 2024 16:05:05 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 12FDB68D5D1; Mon, 24 Jun 2024 19:05:02 +0300 (EEST) Received: from haasn.dev (haasn.dev [78.46.187.166]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id BA61368D271 for ; Mon, 24 Jun 2024 19:04:55 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=haasn.xyz; s=mail; t=1719245095; bh=A3151g2HdihLyvdobIoHqGKYch1QTkjeF/1yBFsVfH4=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=L6SE0TLhZxso7YFBkGzFg/FuYjEOyZc7qi3gPs8R1qwfuwWx/iUhCOM1OzH1EDuOG 66yS3b3XYLqjuO/xzGifTsPSS2hqFPrM1o2f4RAzVxuxK8yhT/yxM3iJHaabYH5XPG mrSY4XoSxPXt6JwCAmOJI3ElqSGjr1dvp6Oe65BM= Received: from haasn.dev (unknown [10.30.0.2]) by haasn.dev (Postfix) with ESMTP id 7C22C40675; Mon, 24 Jun 2024 18:04:55 +0200 (CEST) Date: Mon, 24 Jun 2024 18:04:55 +0200 Message-ID: <20240624180455.GB64891@haasn.xyz> From: Niklas Haas To: Cosmin Stejerean via ffmpeg-devel , "ffmpeg-devel@ffmpeg.org" In-Reply-To: <010101904af64855-eaa1bbd4-320a-4f56-a337-55ce25099fa3-000000@us-west-2.amazonses.com> References: <20240624155609.51649-1-cosmin@cosmin.at> <010101904af64855-eaa1bbd4-320a-4f56-a337-55ce25099fa3-000000@us-west-2.amazonses.com> MIME-Version: 1.0 Content-Disposition: inline Subject: Re: [FFmpeg-devel] [PATCH] avcodec/dovi_rpudec: fix reading el_bit_depth_minus8 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 Cc: Cosmin Stejerean Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: On Mon, 24 Jun 2024 15:56:12 +0000 Cosmin Stejerean via ffmpeg-devel wrote: > From: Cosmin Stejerean > > now that we are reading ext_mapping_idc as the upper 8 bits of > el_bit_depth_minus8 we need to use get_ue_golomb_long rather than > get_ue_golomb_31 for reading it > > --- > libavcodec/dovi_rpudec.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/libavcodec/dovi_rpudec.c b/libavcodec/dovi_rpudec.c > index 8cafdcf5e6..c025800206 100644 > --- a/libavcodec/dovi_rpudec.c > +++ b/libavcodec/dovi_rpudec.c > @@ -420,7 +420,7 @@ int ff_dovi_rpu_parse(DOVIContext *s, const uint8_t *rpu, size_t rpu_size, > > if ((hdr->rpu_format & 0x700) == 0) { > int bl_bit_depth_minus8 = get_ue_golomb_31(gb); > - int el_bit_depth_minus8 = get_ue_golomb_31(gb); > + int el_bit_depth_minus8 = get_ue_golomb_long(gb); > int vdr_bit_depth_minus8 = get_ue_golomb_31(gb); > int reserved_zero_3bits; > /* ext_mapping_idc is in the upper 8 bits of el_bit_depth_minus8 */ > -- > 2.42.1 LGTM. I checked also the equivalent for set_ue_golomb(), but it's fine up to 2^16-2, which is enough for the max value of (0xFF << 8) | 8. > > > _______________________________________________ > 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". _______________________________________________ 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".