Browse Source

mpegaudio: remove OUT_MIN/MAX macros

These macros are no longer needed after the s32 output was removed.
Change the relevant code to use av_clip_int16() instead of using
explicit limits.

Signed-off-by: Mans Rullgard <mans@mansr.com>
tags/n0.8
Mans Rullgard 14 years ago
parent
commit
92ea249d7d
2 changed files with 1 additions and 3 deletions
  1. +0
    -2
      libavcodec/mpegaudio.h
  2. +1
    -1
      libavcodec/mpegaudiodec.c

+ 0
- 2
libavcodec/mpegaudio.h View File

@@ -70,8 +70,6 @@ typedef float OUT_INT;
#define OUT_FMT AV_SAMPLE_FMT_FLT #define OUT_FMT AV_SAMPLE_FMT_FLT
#else #else
typedef int16_t OUT_INT; typedef int16_t OUT_INT;
#define OUT_MAX INT16_MAX
#define OUT_MIN INT16_MIN
#define OUT_SHIFT (WFRAC_BITS + FRAC_BITS - 15) #define OUT_SHIFT (WFRAC_BITS + FRAC_BITS - 15)
#define OUT_FMT AV_SAMPLE_FMT_S16 #define OUT_FMT AV_SAMPLE_FMT_S16
#endif #endif


+ 1
- 1
libavcodec/mpegaudiodec.c View File

@@ -490,7 +490,7 @@ static inline int round_sample(int64_t *sum)
int sum1; int sum1;
sum1 = (int)((*sum) >> OUT_SHIFT); sum1 = (int)((*sum) >> OUT_SHIFT);
*sum &= (1<<OUT_SHIFT)-1; *sum &= (1<<OUT_SHIFT)-1;
return av_clip(sum1, OUT_MIN, OUT_MAX);
return av_clip_int16(sum1);
} }


# define MULS(ra, rb) MUL64(ra, rb) # define MULS(ra, rb) MUL64(ra, rb)


Loading…
Cancel
Save