avcodec/apedec: move 'coeffs[256] and delay[256]' into, long_filter_high_3800
Signed-off-by: Zeng Zhaoxiu <zhaoxiu.zeng@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
9e6198f0a4
commit
0073c8e345
@ -899,11 +899,11 @@ static av_always_inline int filter_3800(APEPredictor *p,
|
|||||||
return p->filterA[filter];
|
return p->filterA[filter];
|
||||||
}
|
}
|
||||||
|
|
||||||
static void long_filter_high_3800(int32_t *buffer, int order, int shift,
|
static void long_filter_high_3800(int32_t *buffer, int order, int shift, int length)
|
||||||
int32_t *coeffs, int32_t *delay, int length)
|
|
||||||
{
|
{
|
||||||
int i, j;
|
int i, j;
|
||||||
int32_t dotprod, sign;
|
int32_t dotprod, sign;
|
||||||
|
int32_t coeffs[256], delay[256];
|
||||||
|
|
||||||
memset(coeffs, 0, order * sizeof(*coeffs));
|
memset(coeffs, 0, order * sizeof(*coeffs));
|
||||||
for (i = 0; i < order; i++)
|
for (i = 0; i < order; i++)
|
||||||
@ -947,13 +947,12 @@ static void predictor_decode_stereo_3800(APEContext *ctx, int count)
|
|||||||
APEPredictor *p = &ctx->predictor;
|
APEPredictor *p = &ctx->predictor;
|
||||||
int32_t *decoded0 = ctx->decoded[0];
|
int32_t *decoded0 = ctx->decoded[0];
|
||||||
int32_t *decoded1 = ctx->decoded[1];
|
int32_t *decoded1 = ctx->decoded[1];
|
||||||
int32_t coeffs[256], delay[256];
|
|
||||||
int start = 4, shift = 10;
|
int start = 4, shift = 10;
|
||||||
|
|
||||||
if (ctx->compression_level == COMPRESSION_LEVEL_HIGH) {
|
if (ctx->compression_level == COMPRESSION_LEVEL_HIGH) {
|
||||||
start = 16;
|
start = 16;
|
||||||
long_filter_high_3800(decoded0, 16, 9, coeffs, delay, count);
|
long_filter_high_3800(decoded0, 16, 9, count);
|
||||||
long_filter_high_3800(decoded1, 16, 9, coeffs, delay, count);
|
long_filter_high_3800(decoded1, 16, 9, count);
|
||||||
} else if (ctx->compression_level == COMPRESSION_LEVEL_EXTRA_HIGH) {
|
} else if (ctx->compression_level == COMPRESSION_LEVEL_EXTRA_HIGH) {
|
||||||
int order = 128, shift2 = 11;
|
int order = 128, shift2 = 11;
|
||||||
|
|
||||||
@ -965,8 +964,8 @@ static void predictor_decode_stereo_3800(APEContext *ctx, int count)
|
|||||||
long_filter_ehigh_3830(decoded1 + order, count - order);
|
long_filter_ehigh_3830(decoded1 + order, count - order);
|
||||||
}
|
}
|
||||||
start = order;
|
start = order;
|
||||||
long_filter_high_3800(decoded0, order, shift2, coeffs, delay, count);
|
long_filter_high_3800(decoded0, order, shift2, count);
|
||||||
long_filter_high_3800(decoded1, order, shift2, coeffs, delay, count);
|
long_filter_high_3800(decoded1, order, shift2, count);
|
||||||
}
|
}
|
||||||
|
|
||||||
while (count--) {
|
while (count--) {
|
||||||
@ -1002,12 +1001,11 @@ static void predictor_decode_mono_3800(APEContext *ctx, int count)
|
|||||||
{
|
{
|
||||||
APEPredictor *p = &ctx->predictor;
|
APEPredictor *p = &ctx->predictor;
|
||||||
int32_t *decoded0 = ctx->decoded[0];
|
int32_t *decoded0 = ctx->decoded[0];
|
||||||
int32_t coeffs[256], delay[256];
|
|
||||||
int start = 4, shift = 10;
|
int start = 4, shift = 10;
|
||||||
|
|
||||||
if (ctx->compression_level == COMPRESSION_LEVEL_HIGH) {
|
if (ctx->compression_level == COMPRESSION_LEVEL_HIGH) {
|
||||||
start = 16;
|
start = 16;
|
||||||
long_filter_high_3800(decoded0, 16, 9, coeffs, delay, count);
|
long_filter_high_3800(decoded0, 16, 9, count);
|
||||||
} else if (ctx->compression_level == COMPRESSION_LEVEL_EXTRA_HIGH) {
|
} else if (ctx->compression_level == COMPRESSION_LEVEL_EXTRA_HIGH) {
|
||||||
int order = 128, shift2 = 11;
|
int order = 128, shift2 = 11;
|
||||||
|
|
||||||
@ -1018,7 +1016,7 @@ static void predictor_decode_mono_3800(APEContext *ctx, int count)
|
|||||||
long_filter_ehigh_3830(decoded0 + order, count - order);
|
long_filter_ehigh_3830(decoded0 + order, count - order);
|
||||||
}
|
}
|
||||||
start = order;
|
start = order;
|
||||||
long_filter_high_3800(decoded0, order, shift2, coeffs, delay, count);
|
long_filter_high_3800(decoded0, order, shift2, count);
|
||||||
}
|
}
|
||||||
|
|
||||||
while (count--) {
|
while (count--) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user