Revision 50e23ae9 libavcodec/dsputil.c

View differences:

libavcodec/dsputil.c
4102 4102
    else return a;
4103 4103
}
4104 4104

  
4105
static void vector_clipf_c_opposite_sign(float *dst, float *src, float *min, float *max, int len){
4105
static void vector_clipf_c_opposite_sign(float *dst, const float *src, float *min, float *max, int len){
4106 4106
    int i;
4107 4107
    uint32_t mini = *(uint32_t*)min;
4108 4108
    uint32_t maxi = *(uint32_t*)max;
4109 4109
    uint32_t maxisign = maxi ^ (1<<31);
4110 4110
    uint32_t *dsti = (uint32_t*)dst;
4111
    uint32_t *srci = (uint32_t*)src;
4111
    const uint32_t *srci = (const uint32_t*)src;
4112 4112
    for(i=0; i<len; i+=8) {
4113 4113
        dsti[i + 0] = clipf_c_one(srci[i + 0], mini, maxi, maxisign);
4114 4114
        dsti[i + 1] = clipf_c_one(srci[i + 1], mini, maxi, maxisign);
......
4120 4120
        dsti[i + 7] = clipf_c_one(srci[i + 7], mini, maxi, maxisign);
4121 4121
    }
4122 4122
}
4123
static void vector_clipf_c(float *dst, float *src, float min, float max, int len){
4123
static void vector_clipf_c(float *dst, const float *src, float min, float max, int len){
4124 4124
    int i;
4125 4125
    if(min < 0 && max > 0) {
4126 4126
        vector_clipf_c_opposite_sign(dst, src, &min, &max, len);

Also available in: Unified diff