Revision 4138ad96

View differences:

libavcodec/ra288.c
88 88

  
89 89
    /* output */
90 90
    for (x=0; x < 5; x++) {
91
        float f = glob->sb[4-x] + buffer[x];
92

  
93
        if (f > 4095)
94
            f = 4095;
95
        else if (f < -4095)
96
            f = -4095;
97

  
98
        glob->output[glob->phase*5+x] = glob->sb[4-x] = f;
91
        glob->output[glob->phase*5+x] = glob->sb[4-x] =
92
            av_clipf(glob->sb[4-x] + buffer[x], -4095, 4095);
99 93
    }
100 94
}
101 95

  
libavutil/common.h
225 225
    else                    return a;
226 226
}
227 227

  
228
/**
229
 * clip a float value into the amin-amax range
230
 * @param a value to clip
231
 * @param amin minimum value of the clip range
232
 * @param amax maximum value of the clip range
233
 * @return clipped value
234
 */
235
static inline av_const float av_clipf(float a, float amin, float amax)
236
{
237
    if      (a < amin) return amin;
238
    else if (a > amax) return amax;
239
    else               return a;
240
}
241

  
228 242
/* math */
229 243
int64_t av_const ff_gcd(int64_t a, int64_t b);
230 244

  

Also available in: Unified diff