mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-24 13:56:33 +02:00
Mark parameter src of vector_clipf() as const
Originally committed as revision 19729 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
0a68cd876e
commit
50e23ae9d3
@ -4102,13 +4102,13 @@ static inline uint32_t clipf_c_one(uint32_t a, uint32_t mini,
|
|||||||
else return a;
|
else return a;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void vector_clipf_c_opposite_sign(float *dst, float *src, float *min, float *max, int len){
|
static void vector_clipf_c_opposite_sign(float *dst, const float *src, float *min, float *max, int len){
|
||||||
int i;
|
int i;
|
||||||
uint32_t mini = *(uint32_t*)min;
|
uint32_t mini = *(uint32_t*)min;
|
||||||
uint32_t maxi = *(uint32_t*)max;
|
uint32_t maxi = *(uint32_t*)max;
|
||||||
uint32_t maxisign = maxi ^ (1<<31);
|
uint32_t maxisign = maxi ^ (1<<31);
|
||||||
uint32_t *dsti = (uint32_t*)dst;
|
uint32_t *dsti = (uint32_t*)dst;
|
||||||
uint32_t *srci = (uint32_t*)src;
|
const uint32_t *srci = (const uint32_t*)src;
|
||||||
for(i=0; i<len; i+=8) {
|
for(i=0; i<len; i+=8) {
|
||||||
dsti[i + 0] = clipf_c_one(srci[i + 0], mini, maxi, maxisign);
|
dsti[i + 0] = clipf_c_one(srci[i + 0], mini, maxi, maxisign);
|
||||||
dsti[i + 1] = clipf_c_one(srci[i + 1], mini, maxi, maxisign);
|
dsti[i + 1] = clipf_c_one(srci[i + 1], mini, maxi, maxisign);
|
||||||
@ -4120,7 +4120,7 @@ static void vector_clipf_c_opposite_sign(float *dst, float *src, float *min, flo
|
|||||||
dsti[i + 7] = clipf_c_one(srci[i + 7], mini, maxi, maxisign);
|
dsti[i + 7] = clipf_c_one(srci[i + 7], mini, maxi, maxisign);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
static void vector_clipf_c(float *dst, float *src, float min, float max, int len){
|
static void vector_clipf_c(float *dst, const float *src, float min, float max, int len){
|
||||||
int i;
|
int i;
|
||||||
if(min < 0 && max > 0) {
|
if(min < 0 && max > 0) {
|
||||||
vector_clipf_c_opposite_sign(dst, src, &min, &max, len);
|
vector_clipf_c_opposite_sign(dst, src, &min, &max, len);
|
||||||
|
@ -396,7 +396,7 @@ typedef struct DSPContext {
|
|||||||
void (*vector_fmul_window)(float *dst, const float *src0, const float *src1, const float *win, float add_bias, int len);
|
void (*vector_fmul_window)(float *dst, const float *src0, const float *src1, const float *win, float add_bias, int len);
|
||||||
/* assume len is a multiple of 8, and arrays are 16-byte aligned */
|
/* assume len is a multiple of 8, and arrays are 16-byte aligned */
|
||||||
void (*int32_to_float_fmul_scalar)(float *dst, const int *src, float mul, int len);
|
void (*int32_to_float_fmul_scalar)(float *dst, const int *src, float mul, int len);
|
||||||
void (*vector_clipf)(float *dst /* align 16 */, float *src /* align 16 */, float min, float max, int len /* align 16 */);
|
void (*vector_clipf)(float *dst /* align 16 */, const float *src /* align 16 */, float min, float max, int len /* align 16 */);
|
||||||
|
|
||||||
/* C version: convert floats from the range [384.0,386.0] to ints in [-32768,32767]
|
/* C version: convert floats from the range [384.0,386.0] to ints in [-32768,32767]
|
||||||
* simd versions: convert floats from [-32768.0,32767.0] without rescaling and arrays are 16byte aligned */
|
* simd versions: convert floats from [-32768.0,32767.0] without rescaling and arrays are 16byte aligned */
|
||||||
|
@ -2346,7 +2346,7 @@ static void int32_to_float_fmul_scalar_sse2(float *dst, const int *src, float mu
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void vector_clipf_sse(float *dst, float *src, float min, float max,
|
static void vector_clipf_sse(float *dst, const float *src, float min, float max,
|
||||||
int len)
|
int len)
|
||||||
{
|
{
|
||||||
x86_reg i = (len-16)*4;
|
x86_reg i = (len-16)*4;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user