History

avfilter/af_headphone: Use more appropriate variable name

Also unify incrementing the variable containing the pointer to the currently used HRIR data.

Andreas Rheinhardt committed 6 years ago

Commit 8dda0d61 parent bb8ab731 file · +3 −5Browse files

Showing the changes to libavfilter (1 of 1 file). Show all

Unified · Split

libavfilter/af_headphone.c+3−5
@@ -163,19 +163,18 @@ static int headphone_convolute(AVFilterContext *ctx, void *arg, int jobnr, int n · 162 unmodified lines
163163 }
164164
165165 for (i = 0; i < in->nb_samples; i++) {
166− const float *temp_ir = ir;
166+ const float *cur_ir = ir;
167167
168168 *dst = 0;
169169 for (l = 0; l < in_channels; l++) {
170170 *(buffer[l] + wr) = src[l];
171171 }
172172
173− for (l = 0; l < in_channels; l++) {
173+ for (l = 0; l < in_channels; cur_ir += air_len, l++) {
174174 const float *const bptr = buffer[l];
175175
176176 if (l == s->lfe_channel) {
177177 *dst += *(buffer[s->lfe_channel] + wr) * s->gain_lfe;
178− temp_ir += air_len;
179178 continue;
180179 }
181180
@@ -190,8 +189,7 @@ static int headphone_convolute(AVFilterContext *ctx, void *arg, int jobnr, int n · 8 unmodified lines
190189 memcpy(temp_src + len, bptr, (air_len - len) * sizeof(*temp_src));
191190 }
192191
193− dst[0] += s->scalarproduct_float(temp_ir, temp_src, FFALIGN(ir_len, 32));
194− temp_ir += air_len;
192+ dst[0] += s->scalarproduct_float(cur_ir, temp_src, FFALIGN(ir_len, 32));
195193 }
196194
197195 if (fabsf(dst[0]) > 1)

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