[FFmpeg-cvslog] mpegaudio: remove OUT_MIN/MAX macros
Mans Rullgard
git at videolan.org
Tue May 17 05:19:49 CEST 2011
ffmpeg | branch: master | Mans Rullgard <mans at mansr.com> | Mon May 16 17:13:23 2011 +0100| [92ea249d7db4baf64680f412c6bd99ff85860723] | committer: Mans Rullgard
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 at mansr.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=92ea249d7db4baf64680f412c6bd99ff85860723
---
libavcodec/mpegaudio.h | 2 --
libavcodec/mpegaudiodec.c | 2 +-
2 files changed, 1 insertions(+), 3 deletions(-)
diff --git a/libavcodec/mpegaudio.h b/libavcodec/mpegaudio.h
index f12b897..47d10e9 100644
--- a/libavcodec/mpegaudio.h
+++ b/libavcodec/mpegaudio.h
@@ -70,8 +70,6 @@ typedef float OUT_INT;
#define OUT_FMT AV_SAMPLE_FMT_FLT
#else
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_FMT AV_SAMPLE_FMT_S16
#endif
diff --git a/libavcodec/mpegaudiodec.c b/libavcodec/mpegaudiodec.c
index 7fd6bd2..10a63c5 100644
--- a/libavcodec/mpegaudiodec.c
+++ b/libavcodec/mpegaudiodec.c
@@ -490,7 +490,7 @@ static inline int round_sample(int64_t *sum)
int sum1;
sum1 = (int)((*sum) >> OUT_SHIFT);
*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)
More information about the ffmpeg-cvslog
mailing list