mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2026-10-24 02:09:03 +03:00
avcodec/ac3dsp: Constify
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
@@ -26,7 +26,7 @@
|
||||
#include "config.h"
|
||||
|
||||
void ff_ac3_exponent_min_neon(uint8_t *exp, int num_reuse_blocks, int nb_coefs);
|
||||
void ff_ac3_extract_exponents_neon(uint8_t *exp, int32_t *coef, int nb_coefs);
|
||||
void ff_ac3_extract_exponents_neon(uint8_t *exp, const int32_t *coef, int nb_coefs);
|
||||
void ff_float_to_fixed24_neon(int32_t *dst, const float *src, size_t len);
|
||||
void ff_ac3_sum_square_butterfly_int32_neon(int64_t sum[4],
|
||||
const int32_t *coef0,
|
||||
|
||||
@@ -97,7 +97,7 @@ static void ac3_bit_alloc_calc_bap_c(int16_t *mask, int16_t *psd,
|
||||
} while (end > band_end);
|
||||
}
|
||||
|
||||
static void ac3_update_bap_counts_c(uint16_t mant_cnt[16], uint8_t *bap,
|
||||
static void ac3_update_bap_counts_c(uint16_t mant_cnt[16], const uint8_t bap[],
|
||||
int len)
|
||||
{
|
||||
while (len-- > 0)
|
||||
@@ -108,7 +108,7 @@ DECLARE_ALIGNED(16, const uint16_t, ff_ac3_bap_bits)[16] = {
|
||||
0, 0, 0, 3, 0, 4, 5, 6, 7, 8, 9, 10, 11, 12, 14, 16
|
||||
};
|
||||
|
||||
static int ac3_compute_mantissa_size_c(uint16_t mant_cnt[6][16])
|
||||
static int ac3_compute_mantissa_size_c(const uint16_t mant_cnt[6][16])
|
||||
{
|
||||
int blk, bap;
|
||||
int bits = 0;
|
||||
@@ -128,7 +128,7 @@ static int ac3_compute_mantissa_size_c(uint16_t mant_cnt[6][16])
|
||||
return bits;
|
||||
}
|
||||
|
||||
static void ac3_extract_exponents_c(uint8_t *exp, int32_t *coef, int nb_coefs)
|
||||
static void ac3_extract_exponents_c(uint8_t *exp, const int32_t *coef, int nb_coefs)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
||||
@@ -82,7 +82,7 @@ typedef struct AC3DSPContext {
|
||||
* @param[in] bap array of bap, pointing to start coef bin
|
||||
* @param[in] len number of elements to process
|
||||
*/
|
||||
void (*update_bap_counts)(uint16_t mant_cnt[16], uint8_t *bap, int len);
|
||||
void (*update_bap_counts)(uint16_t mant_cnt[16], const uint8_t bap[], int len);
|
||||
|
||||
/**
|
||||
* Calculate the number of bits needed to encode a set of mantissas.
|
||||
@@ -90,9 +90,9 @@ typedef struct AC3DSPContext {
|
||||
* @param[in] mant_cnt bap counts for all blocks
|
||||
* @return mantissa bit count
|
||||
*/
|
||||
int (*compute_mantissa_size)(uint16_t mant_cnt[6][16]);
|
||||
int (*compute_mantissa_size)(const uint16_t mant_cnt[6][16]);
|
||||
|
||||
void (*extract_exponents)(uint8_t *exp, int32_t *coef, int nb_coefs);
|
||||
void (*extract_exponents)(uint8_t *exp, const int32_t *coef, int nb_coefs);
|
||||
|
||||
void (*sum_square_butterfly_int32)(int64_t sum[4], const int32_t *coef0,
|
||||
const int32_t *coef1, int len);
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
|
||||
void ff_ac3_exponent_min_neon(uint8_t *exp, int num_reuse_blocks, int nb_coefs);
|
||||
void ff_float_to_fixed24_neon(int32_t *dst, const float *src, size_t len);
|
||||
void ff_ac3_extract_exponents_neon(uint8_t *exp, int32_t *coef, int nb_coefs);
|
||||
void ff_ac3_extract_exponents_neon(uint8_t *exp, const int32_t *coef, int nb_coefs);
|
||||
void ff_ac3_sum_square_butterfly_int32_neon(int64_t sum[4],
|
||||
const int32_t *coef0,
|
||||
const int32_t *coef1,
|
||||
@@ -42,7 +42,7 @@ void ff_ac3_bit_alloc_calc_bap_armv6(int16_t *mask, int16_t *psd,
|
||||
int snr_offset, int floor,
|
||||
const uint8_t *bap_tab, uint8_t *bap);
|
||||
|
||||
void ff_ac3_update_bap_counts_arm(uint16_t mant_cnt[16], uint8_t *bap, int len);
|
||||
void ff_ac3_update_bap_counts_arm(uint16_t mant_cnt[16], const uint8_t bap[], int len);
|
||||
|
||||
av_cold void ff_ac3dsp_init_arm(AC3DSPContext *c)
|
||||
{
|
||||
|
||||
@@ -142,7 +142,7 @@ static void ac3_bit_alloc_calc_bap_mips(int16_t *mask, int16_t *psd,
|
||||
} while (end > band_end);
|
||||
}
|
||||
|
||||
static void ac3_update_bap_counts_mips(uint16_t mant_cnt[16], uint8_t *bap,
|
||||
static void ac3_update_bap_counts_mips(uint16_t mant_cnt[16], const uint8_t bap[],
|
||||
int len)
|
||||
{
|
||||
void *temp0, *temp2, *temp4, *temp5, *temp6, *temp7;
|
||||
|
||||
@@ -28,8 +28,8 @@
|
||||
|
||||
void ff_ac3_exponent_min_rvb(uint8_t *exp, int, int);
|
||||
void ff_ac3_exponent_min_rvv(uint8_t *exp, int, int);
|
||||
void ff_extract_exponents_rvb(uint8_t *exp, int32_t *coef, int nb_coefs);
|
||||
void ff_extract_exponents_rvvb(uint8_t *exp, int32_t *coef, int nb_coefs);
|
||||
void ff_extract_exponents_rvb(uint8_t *exp, const int32_t *coef, int nb_coefs);
|
||||
void ff_extract_exponents_rvvb(uint8_t *exp, const int32_t *coef, int nb_coefs);
|
||||
void ff_float_to_fixed24_rvv(int32_t *dst, const float *src, size_t len);
|
||||
void ff_sum_square_butterfly_int32_rvv(int64_t *, const int32_t *,
|
||||
const int32_t *, int);
|
||||
|
||||
@@ -153,7 +153,7 @@ cglobal float_to_fixed24, 3, 3, 5, dst, src, len
|
||||
RET
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
; int ff_ac3_compute_mantissa_size(uint16_t mant_cnt[6][16])
|
||||
; int ff_ac3_compute_mantissa_size(const uint16_t mant_cnt[6][16])
|
||||
;------------------------------------------------------------------------------
|
||||
|
||||
%macro PHADDD4 2 ; xmm src, xmm tmp
|
||||
@@ -201,7 +201,7 @@ cglobal ac3_compute_mantissa_size, 1, 2, 4, mant_cnt, sum
|
||||
RET
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
; void ff_ac3_extract_exponents(uint8_t *exp, int32_t *coef, int nb_coefs)
|
||||
; void ff_ac3_extract_exponents(uint8_t *exp, const int32_t *coef, int nb_coefs)
|
||||
;------------------------------------------------------------------------------
|
||||
|
||||
%macro PABSD 1-2 ; src/dst, unused
|
||||
|
||||
@@ -28,10 +28,10 @@ void ff_ac3_exponent_min_sse2 (uint8_t *exp, int num_reuse_blocks, int nb_coefs
|
||||
void ff_float_to_fixed24_sse2 (int32_t *dst, const float *src, size_t len);
|
||||
void ff_float_to_fixed24_avx (int32_t *dst, const float *src, size_t len);
|
||||
|
||||
int ff_ac3_compute_mantissa_size_sse2(uint16_t mant_cnt[6][16]);
|
||||
int ff_ac3_compute_mantissa_size_sse2(const uint16_t mant_cnt[6][16]);
|
||||
|
||||
void ff_ac3_extract_exponents_sse2 (uint8_t *exp, int32_t *coef, int nb_coefs);
|
||||
void ff_ac3_extract_exponents_ssse3(uint8_t *exp, int32_t *coef, int nb_coefs);
|
||||
void ff_ac3_extract_exponents_sse2 (uint8_t *exp, const int32_t *coef, int nb_coefs);
|
||||
void ff_ac3_extract_exponents_ssse3(uint8_t *exp, const int32_t *coef, int nb_coefs);
|
||||
|
||||
av_cold void ff_ac3dsp_init_x86(AC3DSPContext *c)
|
||||
{
|
||||
|
||||
@@ -95,7 +95,7 @@ static void check_ac3_extract_exponents(AC3DSPContext *c) {
|
||||
LOCAL_ALIGNED_16(uint8_t, v2, [MAX_EXPS]);
|
||||
int n;
|
||||
|
||||
declare_func(void, uint8_t *, int32_t *, int);
|
||||
declare_func(void, uint8_t *, const int32_t *, int);
|
||||
|
||||
for (n = 512; n <= MAX_EXPS; n += 256) {
|
||||
if (check_func(c->extract_exponents, "ac3_extract_exponents_n%d", n)) {
|
||||
|
||||
Reference in New Issue
Block a user