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 CAB444746B for ; Fri, 8 Sep 2023 08:16:16 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id AB36D68C8A0; Fri, 8 Sep 2023 11:15:31 +0300 (EEST) Received: from smtp1-g21.free.fr (unknown [212.27.42.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 1CE4168C88A for ; Fri, 8 Sep 2023 11:15:24 +0300 (EEST) Received: from localhost.localdomain (unknown [IPv6:2a01:e0a:8a7:6440:5540:d7b2:7ae2:c181]) (Authenticated sender: christophe.gisquet@free.fr) by smtp1-g21.free.fr (Postfix) with ESMTPSA id 7F33EB0053D for ; Fri, 8 Sep 2023 10:15:22 +0200 (CEST) From: Christophe Gisquet To: ffmpeg-devel@ffmpeg.org Date: Fri, 8 Sep 2023 10:15:07 +0200 Message-ID: <20230908081508.510-6-christophe.gisquet@gmail.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20230908081508.510-1-christophe.gisquet@gmail.com> References: <20230908081508.510-1-christophe.gisquet@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 6/7] proresdec2: remove a useless DC codebook entry 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-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: --- libavcodec/proresdec2.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libavcodec/proresdec2.c b/libavcodec/proresdec2.c index 02e1d82d00..b20021c622 100644 --- a/libavcodec/proresdec2.c +++ b/libavcodec/proresdec2.c @@ -534,9 +534,9 @@ static int decode_picture_header(AVCodecContext *avctx, const uint8_t *buf, cons #define FIRST_DC_CB 0xB8 -static const char dc_codebook[7][4] = { +static const char dc_codebook[6][4] = { { 0, 0, 1, -1 }, { 0, 1, 2, -2 }, { 0, 1, 2, -2 }, - { 1, 2, 2, 0 }, { 1, 2, 2, 0 }, { 0, 3, 4, -8 }, { 0, 3, 4, -8 } + { 1, 2, 2, 0 }, { 1, 2, 2, 0 }, { 0, 3, 4, -8 } }; static av_always_inline int decode_dc_coeffs(GetBitContext *gb, int16_t *out, @@ -553,7 +553,7 @@ static av_always_inline int decode_dc_coeffs(GetBitContext *gb, int16_t *out, code = 5; sign = 0; for (i = 1; i < blocks_per_slice; i++, out += 64) { - unsigned int dccb = FFMIN(code, 6U); + unsigned int dccb = FFMIN(code, 5U); DECODE_CODEWORD2(code, dc_codebook[dccb][0], dc_codebook[dccb][1], dc_codebook[dccb][2], dc_codebook[dccb][3]); if(code) sign ^= -(code & 1); -- 2.42.0 _______________________________________________ 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".