diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-10-13 14:35:42 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-10-13 14:35:42 +0200 |
commit | d6c342fdc0b434b514f99e1feaa108ab17bba806 (patch) | |
tree | 244b8c09cff87b34e1c94cfe3e8e2e15b415ce3c /libavcodec/s302m.c | |
parent | d197bd4f5ee752c95ebaf7d94257ca5121309674 (diff) | |
parent | d5c62122a7b26704bf867a1262df358623bf5edf (diff) | |
download | ffmpeg-d6c342fdc0b434b514f99e1feaa108ab17bba806.tar.gz |
Merge commit 'd5c62122a7b26704bf867a1262df358623bf5edf'
* commit 'd5c62122a7b26704bf867a1262df358623bf5edf':
Move av_reverse table to libavcodec
Conflicts:
libavcodec/asvenc.c
libavcodec/vble.c
libavutil/common.h
libavutil/mathematics.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/s302m.c')
-rw-r--r-- | libavcodec/s302m.c | 39 |
1 files changed, 20 insertions, 19 deletions
diff --git a/libavcodec/s302m.c b/libavcodec/s302m.c index 90406a9f0f..5058ba0fbc 100644 --- a/libavcodec/s302m.c +++ b/libavcodec/s302m.c @@ -20,9 +20,10 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "libavutil/common.h" #include "libavutil/intreadwrite.h" +#include "libavutil/log.h" #include "avcodec.h" +#include "mathops.h" #define AES3_HEADER_LEN 4 @@ -118,34 +119,34 @@ static int s302m_decode_frame(AVCodecContext *avctx, void *data, if (avctx->bits_per_coded_sample == 24) { uint32_t *o = (uint32_t *)s->frame.data[0]; for (; buf_size > 6; buf_size -= 7) { - *o++ = (av_reverse[buf[2]] << 24) | - (av_reverse[buf[1]] << 16) | - (av_reverse[buf[0]] << 8); - *o++ = (av_reverse[buf[6] & 0xf0] << 28) | - (av_reverse[buf[5]] << 20) | - (av_reverse[buf[4]] << 12) | - (av_reverse[buf[3] & 0x0f] << 4); + *o++ = (ff_reverse[buf[2]] << 24) | + (ff_reverse[buf[1]] << 16) | + (ff_reverse[buf[0]] << 8); + *o++ = (ff_reverse[buf[6] & 0xf0] << 28) | + (ff_reverse[buf[5]] << 20) | + (ff_reverse[buf[4]] << 12) | + (ff_reverse[buf[3] & 0x0f] << 4); buf += 7; } } else if (avctx->bits_per_coded_sample == 20) { uint32_t *o = (uint32_t *)s->frame.data[0]; for (; buf_size > 5; buf_size -= 6) { - *o++ = (av_reverse[buf[2] & 0xf0] << 28) | - (av_reverse[buf[1]] << 20) | - (av_reverse[buf[0]] << 12); - *o++ = (av_reverse[buf[5] & 0xf0] << 28) | - (av_reverse[buf[4]] << 20) | - (av_reverse[buf[3]] << 12); + *o++ = (ff_reverse[buf[2] & 0xf0] << 28) | + (ff_reverse[buf[1]] << 20) | + (ff_reverse[buf[0]] << 12); + *o++ = (ff_reverse[buf[5] & 0xf0] << 28) | + (ff_reverse[buf[4]] << 20) | + (ff_reverse[buf[3]] << 12); buf += 6; } } else { uint16_t *o = (uint16_t *)s->frame.data[0]; for (; buf_size > 4; buf_size -= 5) { - *o++ = (av_reverse[buf[1]] << 8) | - av_reverse[buf[0]]; - *o++ = (av_reverse[buf[4] & 0xf0] << 12) | - (av_reverse[buf[3]] << 4) | - (av_reverse[buf[2]] >> 4); + *o++ = (ff_reverse[buf[1]] << 8) | + ff_reverse[buf[0]]; + *o++ = (ff_reverse[buf[4] & 0xf0] << 12) | + (ff_reverse[buf[3]] << 4) | + (ff_reverse[buf[2]] >> 4); buf += 5; } } |