1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-01-13 21:28:01 +02:00

resample: reindent

This commit is contained in:
Anton Khirnov 2014-03-03 22:28:07 +01:00
parent f20892eb67
commit 3c84f6b5d2

View File

@ -67,30 +67,29 @@ static void SET_TYPE(resample_one)(ResampleContext *c,
{ {
FELEM *dst = dst0; FELEM *dst = dst0;
const FELEM *src = src0; const FELEM *src = src0;
int i;
int sample_index = index >> c->phase_shift;
FELEM2 val = 0;
FELEM *filter = ((FELEM *)c->filter_bank) +
c->filter_length * (index & c->phase_mask);
int i; if (sample_index < 0) {
int sample_index = index >> c->phase_shift; for (i = 0; i < c->filter_length; i++)
FELEM2 val = 0; val += src[FFABS(sample_index + i) % src_size] *
FELEM *filter = ((FELEM *)c->filter_bank) + (FELEM2)filter[i];
c->filter_length * (index & c->phase_mask); } else if (c->linear) {
FELEM2 v2 = 0;
if (sample_index < 0) { for (i = 0; i < c->filter_length; i++) {
for (i = 0; i < c->filter_length; i++) val += src[abs(sample_index + i)] * (FELEM2)filter[i];
val += src[FFABS(sample_index + i) % src_size] * v2 += src[abs(sample_index + i)] * (FELEM2)filter[i + c->filter_length];
(FELEM2)filter[i];
} else if (c->linear) {
FELEM2 v2 = 0;
for (i = 0; i < c->filter_length; i++) {
val += src[abs(sample_index + i)] * (FELEM2)filter[i];
v2 += src[abs(sample_index + i)] * (FELEM2)filter[i + c->filter_length];
}
val += (v2 - val) * (FELEML)frac / c->src_incr;
} else {
for (i = 0; i < c->filter_length; i++)
val += src[sample_index + i] * (FELEM2)filter[i];
} }
val += (v2 - val) * (FELEML)frac / c->src_incr;
} else {
for (i = 0; i < c->filter_length; i++)
val += src[sample_index + i] * (FELEM2)filter[i];
}
OUT(dst[dst_index], val); OUT(dst[dst_index], val);
} }
static void SET_TYPE(set_filter)(void *filter0, double *tab, int phase, static void SET_TYPE(set_filter)(void *filter0, double *tab, int phase,