Showing the changes to libavfilter (1 of 1 file). Show all
Unified · Split
| @@ -267,6 +267,7 @@ static int fn(fir_quantum)(AVFilterContext *ctx, AVFrame *out, int ch, int offse · 266 unmodified lines | ||
| 267 | 267 | ftype *sumin = (ftype *)seg->sumin->extended_data[ch]; |
| 268 | 268 | ftype *sumout = (ftype *)seg->sumout->extended_data[ch]; |
| 269 | 269 | int *output_offset = &seg->output_offset[ch]; |
| 270 | + const int nb_partitions = seg->nb_partitions; | |
| 270 | 271 | const int input_offset = seg->input_offset; |
| 271 | 272 | const int part_size = seg->part_size; |
| 272 | 273 | int j; |
| @@ -306,7 +307,7 @@ static int fn(fir_quantum)(AVFilterContext *ctx, AVFrame *out, int ch, int offse · 33 unmodified lines | ||
| 306 | 307 | |
| 307 | 308 | j = seg->part_index[ch]; |
| 308 | 309 | |
| 309 | − for (int i = 0; i < seg->nb_partitions; i++) { | |
| 310 | + for (int i = 0; i < nb_partitions; i++) { | |
| 310 | 311 | const int coffset = j * seg->coeff_size; |
| 311 | 312 | const ftype *blockout = (const ftype *)seg->blockout->extended_data[ch] + i * seg->block_size; |
| 312 | 313 | const ctype *coeff = (const ctype *)seg->coeff->extended_data[ch * !s->one2many] + coffset; |
| @@ -317,7 +318,7 @@ static int fn(fir_quantum)(AVFilterContext *ctx, AVFrame *out, int ch, int offse · 4 unmodified lines | ||
| 317 | 318 | s->afirdsp.dcmul_add(sumin, blockout, (const ftype *)coeff, part_size); |
| 318 | 319 | #endif |
| 319 | 320 | if (j == 0) |
| 320 | − j = seg->nb_partitions; | |
| 321 | + j = nb_partitions; | |
| 321 | 322 | j--; |
| 322 | 323 | } |
| 323 | 324 | |
| @@ -331,7 +332,7 @@ static int fn(fir_quantum)(AVFilterContext *ctx, AVFrame *out, int ch, int offse · 7 unmodified lines | ||
| 331 | 332 | buf = (ftype *)seg->buffer->extended_data[ch]; |
| 332 | 333 | memcpy(buf, sumout + part_size, part_size * sizeof(*buf)); |
| 333 | 334 | |
| 334 | − seg->part_index[ch] = (seg->part_index[ch] + 1) % seg->nb_partitions; | |
| 335 | + seg->part_index[ch] = (seg->part_index[ch] + 1) % nb_partitions;; | |
| 335 | 336 | |
| 336 | 337 | memmove(src, src + min_part_size, (seg->input_size - min_part_size) * sizeof(*src)); |
| 337 | 338 | |