From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.ffmpeg.org (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTPS id D92034F332 for ; Mon, 16 Jun 2025 11:21:37 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTP id 7AF3068DCA2; Mon, 16 Jun 2025 14:20:23 +0300 (EEST) Received: from haasn.dev (haasn.dev [78.46.187.166]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTP id 31E8A68DC26 for ; Mon, 16 Jun 2025 14:20:11 +0300 (EEST) Received: from haasn.dev (unknown [10.30.1.1]) by haasn.dev (Postfix) with UTF8SMTP id 9364B42D5A; Mon, 16 Jun 2025 13:20:06 +0200 (CEST) From: Niklas Haas To: ffmpeg-devel@ffmpeg.org Date: Mon, 16 Jun 2025 13:19:56 +0200 Message-ID: <20250616112003.10665-8-ffmpeg@haasn.xyz> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250616112003.10665-1-ffmpeg@haasn.xyz> References: <20250616112003.10665-1-ffmpeg@haasn.xyz> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v2 08/13] avfilter/f_ebur128: remove pointless macro 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: Niklas Haas 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: From: Niklas Haas This macro is not shortening the code nor aiding readability. --- libavfilter/f_ebur128.c | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/libavfilter/f_ebur128.c b/libavfilter/f_ebur128.c index 2d94cefce7..2e1eedd855 100644 --- a/libavfilter/f_ebur128.c +++ b/libavfilter/f_ebur128.c @@ -682,20 +682,18 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *insamples) #endif for (idx_insample = ebur128->idx_insample; idx_insample < nb_samples; idx_insample++) { - const int bin_id_400 = ebur128->i400.cache_pos; - const int bin_id_3000 = ebur128->i3000.cache_pos; - -#define MOVE_TO_NEXT_CACHED_ENTRY(time) do { \ - ebur128->i##time.cache_pos++; \ - if (ebur128->i##time.cache_pos == \ - ebur128->i##time.cache_size) { \ - ebur128->i##time.filled = 1; \ - ebur128->i##time.cache_pos = 0; \ - } \ -} while (0) + const int bin_id_400 = ebur128->i400.cache_pos++; + const int bin_id_3000 = ebur128->i3000.cache_pos++; + + if (ebur128->i400.cache_pos == ebur128->i400.cache_size) { + ebur128->i400.filled = 1; + ebur128->i400.cache_pos = 0; + } - MOVE_TO_NEXT_CACHED_ENTRY(400); - MOVE_TO_NEXT_CACHED_ENTRY(3000); + if (ebur128->i3000.cache_pos == ebur128->i3000.cache_size) { + ebur128->i3000.filled = 1; + ebur128->i3000.cache_pos = 0; + } dsp->filter_channels(dsp, &samples[idx_insample * nb_channels], &ebur128->i400.cache[bin_id_400 * nb_channels], -- 2.49.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".