diff options
author | Aurelien Jacobs <aurel@gnuage.org> | 2007-08-11 23:17:03 +0000 |
---|---|---|
committer | Aurelien Jacobs <aurel@gnuage.org> | 2007-08-11 23:17:03 +0000 |
commit | 295f37379269e2df0e8983fbe89787ef1f49dc93 (patch) | |
tree | 917a4d87f90782008ce0de378f34cbbc623604c0 /libavcodec/liba52.c | |
parent | b0f3382873d275c4bd2e04f6f4f74f75162e5325 (diff) | |
download | ffmpeg-295f37379269e2df0e8983fbe89787ef1f49dc93.tar.gz |
various simplifications around recent av_clip_int16() usage
Originally committed as revision 10080 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/liba52.c')
-rw-r--r-- | libavcodec/liba52.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/libavcodec/liba52.c b/libavcodec/liba52.c index ce0f822d93..68147a125e 100644 --- a/libavcodec/liba52.c +++ b/libavcodec/liba52.c @@ -120,12 +120,7 @@ static int a52_decode_init(AVCodecContext *avctx) return 0; } -/**** the following two functions comes from a52dec */ -static inline int blah (int32_t i) -{ - return av_clip_int16(i - 0x43c00000); -} - +/**** the following function comes from a52dec */ static inline void float_to_int (float * _f, int16_t * s16, int nchannels) { int i, j, c; @@ -135,7 +130,7 @@ static inline void float_to_int (float * _f, int16_t * s16, int nchannels) nchannels *= 256; for (i = 0; i < 256; i++) { for (c = 0; c < nchannels; c += 256) - s16[j++] = blah (f[i + c]); + s16[j++] = av_clip_int16(f[i + c] - 0x43c00000); } } |