This macro is not shortening the code nor aiding readability.
Showing the changes to libavfilter (1 of 1 file). Show all
Unified · Split
| @@ -682,20 +682,18 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *insamples) · 681 unmodified lines | |||
| 682 | #endif | 682 | #endif |
| 683 | 683 | ||
| 684 | for (idx_insample = ebur128->idx_insample; idx_insample < nb_samples; idx_insample++) { | 684 | for (idx_insample = ebur128->idx_insample; idx_insample < nb_samples; idx_insample++) { |
| 685 | const int bin_id_400 = ebur128->i400.cache_pos; | 685 | const int bin_id_400 = ebur128->i400.cache_pos++; |
| 686 | const int bin_id_3000 = ebur128->i3000.cache_pos; | 686 | const int bin_id_3000 = ebur128->i3000.cache_pos++; |
| 687 | 687 | ||
| 688 | #define MOVE_TO_NEXT_CACHED_ENTRY(time) do { \ | 688 | if (ebur128->i400.cache_pos == ebur128->i400.cache_size) { |
| 689 | ebur128->i##time.cache_pos++; \ | 689 | ebur128->i400.filled = 1; |
| 690 | if (ebur128->i##time.cache_pos == \ | 690 | ebur128->i400.cache_pos = 0; |
| 691 | ebur128->i##time.cache_size) { \ | 691 | } |
| 692 | ebur128->i##time.filled = 1; \ | ||
| 693 | ebur128->i##time.cache_pos = 0; \ | ||
| 694 | } \ | ||
| 695 | } while (0) | ||
| 696 | 692 | ||
| 697 | MOVE_TO_NEXT_CACHED_ENTRY(400); | 693 | if (ebur128->i3000.cache_pos == ebur128->i3000.cache_size) { |
| 698 | MOVE_TO_NEXT_CACHED_ENTRY(3000); | 694 | ebur128->i3000.filled = 1; |
| 695 | ebur128->i3000.cache_pos = 0; | ||
| 696 | } | ||
| 699 | 697 | ||
| 700 | dsp->filter_channels(dsp, &samples[idx_insample * nb_channels], | 698 | dsp->filter_channels(dsp, &samples[idx_insample * nb_channels], |
| 701 | &ebur128->i400.cache[bin_id_400 * nb_channels], | 699 | &ebur128->i400.cache[bin_id_400 * nb_channels], |