Commit 567c67c6 authored by James Almer's avatar James Almer

avcodec/ac3dsp: make len a size_t in float_to_fixed24

Should simplify asm implementations, and prevent UB on at least win64.
Signed-off-by: 's avatarJames Almer <jamrial@gmail.com>
parent 4af412be
......@@ -54,7 +54,7 @@ static void ac3_exponent_min_c(uint8_t *exp, int num_reuse_blocks, int nb_coefs)
}
}
static void float_to_fixed24_c(int32_t *dst, const float *src, unsigned int len)
static void float_to_fixed24_c(int32_t *dst, const float *src, size_t len)
{
const float scale = 1 << 24;
do {
......
......@@ -53,7 +53,7 @@ typedef struct AC3DSPContext {
* @param len number of elements to convert.
* constraints: multiple of 32 greater than zero
*/
void (*float_to_fixed24)(int32_t *dst, const float *src, unsigned int len);
void (*float_to_fixed24)(int32_t *dst, const float *src, size_t len);
/**
* Calculate bit allocation pointers.
......
......@@ -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_float_to_fixed24_neon(int32_t *dst, const float *src, unsigned int len);
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_sum_square_butterfly_int32_neon(int64_t sum[4],
const int32_t *coef0,
......
......@@ -203,7 +203,7 @@ static void ac3_update_bap_counts_mips(uint16_t mant_cnt[16], uint8_t *bap,
#if HAVE_MIPSFPU
#if !HAVE_MIPS32R6 && !HAVE_MIPS64R6
static void float_to_fixed24_mips(int32_t *dst, const float *src, unsigned int len)
static void float_to_fixed24_mips(int32_t *dst, const float *src, size_t len)
{
const float scale = 1 << 24;
float src0, src1, src2, src3, src4, src5, src6, src7;
......
......@@ -26,7 +26,7 @@
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, unsigned int len);
void ff_float_to_fixed24_sse2 (int32_t *dst, const float *src, size_t len);
int ff_ac3_compute_mantissa_size_sse2(uint16_t mant_cnt[6][16]);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment