1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-08-04 22:03:09 +02:00

avfilter/f_ebur128: remove pointless macro

This macro is not shortening the code nor aiding readability.
This commit is contained in:
Niklas Haas
2025-06-13 16:42:09 +02:00
parent 53e03ec8af
commit a96175e76f

View File

@ -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;
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)
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],