From: Niklas Haas <g...@haasn.dev> 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-requ...@ffmpeg.org with subject "unsubscribe".