Revision 295ab2af libavcodec/ac3enc.c

View differences:

libavcodec/ac3enc.c
44 44
#define SCALE_FLOAT(a, bits) lrintf((a) * (float)(1 << (bits)))
45 45

  
46 46
/** Scale a float value by 2^15, convert to an integer, and clip to int16_t range. */
47
#define FIX15(a) av_clip_int16(SCALE_FLOAT(a, 15))
47
#define FIX15(a) av_clip(SCALE_FLOAT(a, 15), -32767, 32767)
48 48

  
49 49

  
50 50
/**

Also available in: Unified diff