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 48E5248104 for ; Mon, 11 Dec 2023 01:49:42 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 31F9468D23F; Mon, 11 Dec 2023 03:45:28 +0200 (EET) Received: from ssq0.pkh.me (laubervilliers-656-1-228-164.w92-154.abo.wanadoo.fr [92.154.28.164]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 5024E68D1A7 for ; Mon, 11 Dec 2023 03:44:55 +0200 (EET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pkh.me; s=selector1; t=1702259075; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=u/pmh2u1ZKVyN/GHUX8oWJxhylv7ErcxEkhVB1xY7ho=; b=e4yK2uuajUHBjUlm5B8fmKvEgDk6DllQgkCi0r0czpG/lSVoEuGrbSRW1I3j8XofluhzIb DcPQbNBg67/Jzbyl8wi+zxt3r7/XzY3VpSkykyGN3nfQ/NNHR4J5/fmohujtGrHjkFeiWz GyCC4bIQucbUggxVaHWJxQfvTAKZzFM= Received: from localhost (ssq0.pkh.me [local]) by ssq0.pkh.me (OpenSMTPD) with ESMTPA id 6c560db9; Mon, 11 Dec 2023 01:44:35 +0000 (UTC) From: =?UTF-8?q?Cl=C3=A9ment=20B=C5=93sch?= To: ffmpeg-devel@ffmpeg.org Date: Mon, 11 Dec 2023 02:35:08 +0100 Message-ID: <20231211014429.1841681-8-u@pkh.me> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231211014429.1841681-1-u@pkh.me> References: <20231211014429.1841681-1-u@pkh.me> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 07/35] avcodec/proresenc_anatoliy: move DC codebook LUT to shared proresdata 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: =?UTF-8?q?Cl=C3=A9ment=20B=C5=93sch?= 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: This is going to be shared with proresenc_kostya in the upcoming commit. --- libavcodec/proresdata.c | 2 ++ libavcodec/proresdata.h | 1 + libavcodec/proresenc_anatoliy.c | 3 +-- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/libavcodec/proresdata.c b/libavcodec/proresdata.c index 12ee43bddd..866839c8d1 100644 --- a/libavcodec/proresdata.c +++ b/libavcodec/proresdata.c @@ -44,6 +44,8 @@ const uint8_t ff_prores_interlaced_scan[64] = { 46, 39, 47, 54, 61, 62, 55, 63 }; +const uint8_t ff_prores_dc_codebook[7] = { 0x04, 0x28, 0x28, 0x4D, 0x4D, 0x70, 0x70 }; + const uint8_t ff_prores_run_to_cb[16] = { 0x06, 0x06, 0x05, 0x05, 0x04, 0x29, 0x29, 0x29, 0x29, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x4C }; diff --git a/libavcodec/proresdata.h b/libavcodec/proresdata.h index 4d16992892..e24472d844 100644 --- a/libavcodec/proresdata.h +++ b/libavcodec/proresdata.h @@ -29,6 +29,7 @@ extern const uint8_t ff_prores_progressive_scan[64]; extern const uint8_t ff_prores_interlaced_scan[64]; +extern const uint8_t ff_prores_dc_codebook[7]; extern const uint8_t ff_prores_run_to_cb[16]; extern const uint8_t ff_prores_lev_to_cb[10]; diff --git a/libavcodec/proresenc_anatoliy.c b/libavcodec/proresenc_anatoliy.c index c6f49be9b8..d6f5cefc16 100644 --- a/libavcodec/proresenc_anatoliy.c +++ b/libavcodec/proresenc_anatoliy.c @@ -266,7 +266,6 @@ static av_always_inline int get_level(int val) return (val ^ sign) - sign; } -static const uint8_t dc_codebook[7] = { 0x04, 0x28, 0x28, 0x4D, 0x4D, 0x70, 0x70}; static void encode_dc_coeffs(PutBitContext *pb, int16_t *in, int blocks_per_slice, int *qmat) @@ -286,7 +285,7 @@ static void encode_dc_coeffs(PutBitContext *pb, int16_t *in, diff_sign = DIFF_SIGN(delta, sign); new_code = TO_GOLOMB2(get_level(delta), diff_sign); - encode_codeword(pb, new_code, dc_codebook[FFMIN(code, 6)]); + encode_codeword(pb, new_code, ff_prores_dc_codebook[FFMIN(code, 6)]); code = new_code; sign = delta >> 31; -- 2.43.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".