From patchwork Mon Dec 11 01:35:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?Q2zDqW1lbnQgQsWTc2No?= X-Patchwork-Id: 45050 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:1225:b0:181:818d:5e7f with SMTP id v37csp2652491pzf; Sun, 10 Dec 2023 17:48:04 -0800 (PST) X-Google-Smtp-Source: AGHT+IFmMkX65wsi3FPcvoACTathbxwf9iHRwWP/juarRZ3KR/nuWw1N24VwWh6N/TJ0sEAqaWnL X-Received: by 2002:a17:906:d6:b0:a1f:aca1:6bc with SMTP id 22-20020a17090600d600b00a1faca106bcmr108729eji.100.1702259284452; Sun, 10 Dec 2023 17:48:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702259284; cv=none; d=google.com; s=arc-20160816; b=mcbi2gB2Acvn+LD7NrywvuztY18RjNhuX+KRY8JjlQOLbiiWNOifMVN/qUl7l8fNa3 s/+aEiE+MsLSTCpIT874v0W7kELtUHcNM+a++fjKy8qumC9j++AE0wdJijNX4tkBUYzw KOawpSpKlWrhm5ZeCBSxgVWg4FXvKaJ/IkvoRpv47xcr55EQEA7jeZzs4TntDHevf6za Tsfdnnr9teOCO0MRu1omkUBIHb7RY9za1B0UjzRMn54UqPSjOes9R2Id3T4xJtaaSLOn C3fPJcrbJz++YCEsxkjENYme8/H0xMhgnO7wveqiDpeZAI3mcwasp0+oqPi8HuyIU1/p VfOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:mime-version:references:in-reply-to :message-id:date:to:from:dkim-signature:delivered-to; bh=qKeLKNFvFdXdLkSGqwkVLnH0pylzZamv9iuyRbLB7Qc=; fh=Jgo3TCyoG8OdFLqA8BuM7Wbf1w27210JU6p+E8x39/M=; b=TbtVz/sLyGSQmKj/VJk5bAh3UY9E+qrJFY7Pymf/69YlUtxaIvEBLIiVi0BFV3fSnY nL5RQD0marJYNMOQ6pJKlP1/ddshm+pA/TpuPKdnMv70OkLj2NeOt104TXctr6Rx60VV jrd44a3kp2pkrLeOR8kRValcyoIXGgewi/TSOlfndLdeizSXR5WfMCGiJlDu6P3SZ4cM Ug/QzK9BZN00blBQKYCDpkKbE6FSXFIeB0sbl45glb1ghviz9xwxKfRgbBTvh/ingKPA hJ+gxnnsxgHW6hx+n0Mq/tTWoIjwu95rE7MA84PwcDfqBdhVRfBqUeo4ainCg7iU7buH VDLQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@pkh.me header.s=selector1 header.b=Hw43YmvA; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=pkh.me Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id cb11-20020a170906a44b00b00a1cc1be1150si3120367ejb.650.2023.12.10.17.48.03; Sun, 10 Dec 2023 17:48:04 -0800 (PST) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@pkh.me header.s=selector1 header.b=Hw43YmvA; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=pkh.me Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 3093068D1E9; Mon, 11 Dec 2023 03:45:16 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org 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 9E3B968D15D 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=1702259078; 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=FGQOV1YCxupRiNVZG0dnHYCZjujP22XjL+tdSKSEBo4=; b=Hw43YmvABAuNB/R7nzl056ofYH+s9M8lolED7NoWznv6BZYcSDpaflARY5MPJr8MRMsD7e Ap6PdFLXGBgOkcIOrFz5UvvBJTPQrHXxGEKYy6G0dPR93bCUGujIjuQhtTUNYbPYugxcOk PoS1Nfz/IHnvVjyJFXHJo6NuEBV7oWs= Received: from localhost (ssq0.pkh.me [local]) by ssq0.pkh.me (OpenSMTPD) with ESMTPA id db284abc; Mon, 11 Dec 2023 01:44:38 +0000 (UTC) From: =?utf-8?b?Q2zDqW1lbnQgQsWTc2No?= To: ffmpeg-devel@ffmpeg.org Date: Mon, 11 Dec 2023 02:35:25 +0100 Message-ID: <20231211014429.1841681-25-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 24/35] avcodec/proresenc_anatoliy: rename TO_GOLOMB() to MAKE_CODE() 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?b?Q2zDqW1lbnQgQsWTc2No?= Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: Cor712zfiNfs This matches the name 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 43dee7f79b..4b72798689 100644 --- a/libavcodec/proresenc_anatoliy.c +++ b/libavcodec/proresenc_anatoliy.c @@ -256,7 +256,7 @@ static void encode_vlc_codeword(PutBitContext *pb, unsigned codebook, int val) } #define GET_SIGN(x) ((x) >> 31) -#define TO_GOLOMB(val) (((val) * 2) ^ GET_SIGN(val)) +#define MAKE_CODE(x) (((x) * 2) ^ GET_SIGN(x)) #define TO_GOLOMB2(val,sign) ((val)==0 ? 0 : ((val) << 1) + (sign)) static av_always_inline int get_level(int val) @@ -274,7 +274,7 @@ static void encode_dcs(PutBitContext *pb, int16_t *blocks, int dc, delta, diff_sign, code; prev_dc = (blocks[0] - 0x4000) / qmat[0]; - codebook = TO_GOLOMB(prev_dc); + codebook = MAKE_CODE(prev_dc); encode_vlc_codeword(pb, FIRST_DC_CB, codebook); blocks += 64;