Mercurial > libavcodec.hg
diff liba52.c @ 5525:bc4791868c52 libavcodec
various simplifications around recent av_clip_int16() usage
author | aurel |
---|---|
date | Sat, 11 Aug 2007 23:17:03 +0000 |
parents | c2ab2ac31edb |
children | f6b691720c7d |
line wrap: on
line diff
--- a/liba52.c Sat Aug 11 23:09:28 2007 +0000 +++ b/liba52.c Sat Aug 11 23:17:03 2007 +0000 @@ -120,12 +120,7 @@ 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 @@ 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); } }