History

avfilter/f_ebur128: remove pointless macro

This macro is not shortening the code nor aiding readability.

Niklas Haas committed 1 year ago

Commit a96175e1 parent 53e03ec1 file · +11 −13Browse files

Unified · Split

libavfilter/f_ebur128.c+11−13
@@ -682,20 +682,18 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *insamples) · 681 unmodified lines
682682 #endif
683683
684684 for (idx_insample = ebur128->idx_insample; idx_insample < nb_samples; idx_insample++) {
685− const int bin_id_400 = ebur128->i400.cache_pos;
686− const int bin_id_3000 = ebur128->i3000.cache_pos;
687−
688−#define MOVE_TO_NEXT_CACHED_ENTRY(time) do { \
689− ebur128->i##time.cache_pos++; \
690− if (ebur128->i##time.cache_pos == \
691− ebur128->i##time.cache_size) { \
692− ebur128->i##time.filled = 1; \
693− ebur128->i##time.cache_pos = 0; \
694− } \
695−} while (0)
685+ const int bin_id_400 = ebur128->i400.cache_pos++;
686+ const int bin_id_3000 = ebur128->i3000.cache_pos++;
687+
688+ if (ebur128->i400.cache_pos == ebur128->i400.cache_size) {
689+ ebur128->i400.filled = 1;
690+ ebur128->i400.cache_pos = 0;
691+ }
696692
697− MOVE_TO_NEXT_CACHED_ENTRY(400);
698− MOVE_TO_NEXT_CACHED_ENTRY(3000);
693+ if (ebur128->i3000.cache_pos == ebur128->i3000.cache_size) {
694+ ebur128->i3000.filled = 1;
695+ ebur128->i3000.cache_pos = 0;
696+ }
699697
700698 dsp->filter_channels(dsp, &samples[idx_insample * nb_channels],
701699 &ebur128->i400.cache[bin_id_400 * nb_channels],

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t