summaryrefslogtreecommitdiff
path: root/libavcodec/ac3dsp.c
diff options
context:
space:
mode:
authorLynne <dev@lynne.ee>2021-01-09 03:19:18 +0100
committerLynne <dev@lynne.ee>2021-01-14 01:44:20 +0100
commit9e05421dbe0c733dca2a39f8399db86acc7e82bc (patch)
tree246b41e3723eb779091bd535858de1e83eec767f /libavcodec/ac3dsp.c
parent238b2d4155d9779d770fccb3594076bb32742c82 (diff)
ac3enc_fixed: drop unnecessary fixed-point DSP code
Diffstat (limited to 'libavcodec/ac3dsp.c')
-rw-r--r--libavcodec/ac3dsp.c60
1 files changed, 0 insertions, 60 deletions
diff --git a/libavcodec/ac3dsp.c b/libavcodec/ac3dsp.c
index 382f87c05f..85c721dd3b 100644
--- a/libavcodec/ac3dsp.c
+++ b/libavcodec/ac3dsp.c
@@ -46,49 +46,6 @@ static void ac3_exponent_min_c(uint8_t *exp, int num_reuse_blocks, int nb_coefs)
}
}
-static int ac3_max_msb_abs_int16_c(const int16_t *src, int len)
-{
- int i, v = 0;
- for (i = 0; i < len; i++)
- v |= abs(src[i]);
- return v;
-}
-
-static void ac3_lshift_int16_c(int16_t *src, unsigned int len,
- unsigned int shift)
-{
- uint32_t *src32 = (uint32_t *)src;
- const uint32_t mask = ~(((1 << shift) - 1) << 16);
- int i;
- len >>= 1;
- for (i = 0; i < len; i += 8) {
- src32[i ] = (src32[i ] << shift) & mask;
- src32[i+1] = (src32[i+1] << shift) & mask;
- src32[i+2] = (src32[i+2] << shift) & mask;
- src32[i+3] = (src32[i+3] << shift) & mask;
- src32[i+4] = (src32[i+4] << shift) & mask;
- src32[i+5] = (src32[i+5] << shift) & mask;
- src32[i+6] = (src32[i+6] << shift) & mask;
- src32[i+7] = (src32[i+7] << shift) & mask;
- }
-}
-
-static void ac3_rshift_int32_c(int32_t *src, unsigned int len,
- unsigned int shift)
-{
- do {
- *src++ >>= shift;
- *src++ >>= shift;
- *src++ >>= shift;
- *src++ >>= shift;
- *src++ >>= shift;
- *src++ >>= shift;
- *src++ >>= shift;
- *src++ >>= shift;
- len -= 8;
- } while (len > 0);
-}
-
static void float_to_fixed24_c(int32_t *dst, const float *src, unsigned int len)
{
const float scale = 1 << 24;
@@ -376,19 +333,6 @@ void ff_ac3dsp_downmix_fixed(AC3DSPContext *c, int32_t **samples, int16_t **matr
ac3_downmix_c_fixed(samples, matrix, out_ch, in_ch, len);
}
-static void apply_window_int16_c(int16_t *output, const int16_t *input,
- const int16_t *window, unsigned int len)
-{
- int i;
- int len2 = len >> 1;
-
- for (i = 0; i < len2; i++) {
- int16_t w = window[i];
- output[i] = (MUL16(input[i], w) + (1 << 14)) >> 15;
- output[len-i-1] = (MUL16(input[len-i-1], w) + (1 << 14)) >> 15;
- }
-}
-
void ff_ac3dsp_downmix(AC3DSPContext *c, float **samples, float **matrix,
int out_ch, int in_ch, int len)
{
@@ -424,9 +368,6 @@ void ff_ac3dsp_downmix(AC3DSPContext *c, float **samples, float **matrix,
av_cold void ff_ac3dsp_init(AC3DSPContext *c, int bit_exact)
{
c->ac3_exponent_min = ac3_exponent_min_c;
- c->ac3_max_msb_abs_int16 = ac3_max_msb_abs_int16_c;
- c->ac3_lshift_int16 = ac3_lshift_int16_c;
- c->ac3_rshift_int32 = ac3_rshift_int32_c;
c->float_to_fixed24 = float_to_fixed24_c;
c->bit_alloc_calc_bap = ac3_bit_alloc_calc_bap_c;
c->update_bap_counts = ac3_update_bap_counts_c;
@@ -438,7 +379,6 @@ av_cold void ff_ac3dsp_init(AC3DSPContext *c, int bit_exact)
c->out_channels = 0;
c->downmix = NULL;
c->downmix_fixed = NULL;
- c->apply_window_int16 = apply_window_int16_c;
if (ARCH_ARM)
ff_ac3dsp_init_arm(c, bit_exact);