|
@@ -257,7 +257,8 @@ static int scale_vector(int16_t *dst, const int16_t *vector, int length) |
|
|
for (i = 0; i < length; i++) |
|
|
for (i = 0; i < length; i++) |
|
|
max |= FFABS(vector[i]); |
|
|
max |= FFABS(vector[i]); |
|
|
|
|
|
|
|
|
bits = normalize_bits(max, 15); |
|
|
|
|
|
|
|
|
bits= 14 - av_log2_16bit(max); |
|
|
|
|
|
bits= FFMAX(bits, 0); |
|
|
|
|
|
|
|
|
for (i = 0; i < length; i++) |
|
|
for (i = 0; i < length; i++) |
|
|
dst[i] = vector[i] << bits >> 3; |
|
|
dst[i] = vector[i] << bits >> 3; |
|
|