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 53998480EB for ; Mon, 11 Dec 2023 01:46:58 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 8266C68D17A; Mon, 11 Dec 2023 03:45:06 +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 171FD68D14E for ; Mon, 11 Dec 2023 03:44:56 +0200 (EET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pkh.me; s=selector1; t=1702259077; 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=KHml5dWrGJ6BzLdk1rJUTQyx1mpfMSjQR6ZRNM48UO0=; b=OJL9WSuWOob0Ns9g+pUKc49VtZKzl4MdUsdqfL3XqMp6rqQ/DTp+YdiSPYVu5GfpebcQKN X3aaYgOUJSrrp6kejHG6IruUya49bJlUeVoNXwF87YNtZyI5/7p7dfMXQj+hh0Fo91+ESB 7XSDtAcWgjs49ise8alMebHPSXoIGIY= Received: from localhost (ssq0.pkh.me [local]) by ssq0.pkh.me (OpenSMTPD) with ESMTPA id 2f7dc0bf; Mon, 11 Dec 2023 01:44:37 +0000 (UTC) From: =?UTF-8?q?Cl=C3=A9ment=20B=C5=93sch?= To: ffmpeg-devel@ffmpeg.org Date: Mon, 11 Dec 2023 02:35:17 +0100 Message-ID: <20231211014429.1841681-17-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 16/35] avcodec/proresenc_anatoliy: execute codebook FFMIN() at assignment 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 makes the function closer to encode_dcs() in proresenc_kostya. --- libavcodec/proresenc_anatoliy.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/proresenc_anatoliy.c b/libavcodec/proresenc_anatoliy.c index e79c465590..f8feff850f 100644 --- a/libavcodec/proresenc_anatoliy.c +++ b/libavcodec/proresenc_anatoliy.c @@ -285,9 +285,9 @@ static void encode_dc_coeffs(PutBitContext *pb, int16_t *in, diff_sign = DIFF_SIGN(delta, sign); code = TO_GOLOMB2(get_level(delta), diff_sign); - encode_vlc_codeword(pb, ff_prores_dc_codebook[FFMIN(codebook, 6)], code); + encode_vlc_codeword(pb, ff_prores_dc_codebook[codebook], code); - codebook = code; + codebook = FFMIN(code, 6); sign = delta >> 31; prev_dc = new_dc; } -- 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".