1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

Remove cast, now tables are signed.

Originally committed as revision 15252 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Vitor Sessak 2008-09-07 14:32:10 +00:00
parent fc1d3e004f
commit b1547a7817

View File

@ -260,12 +260,12 @@ static inline int16_t mace_broken_clip_int16(int n)
static void chomp3(ChannelData *ctx, int16_t *output, uint8_t val, static void chomp3(ChannelData *ctx, int16_t *output, uint8_t val,
const uint16_t tab1[], const uint16_t tab1[],
const uint16_t *tab2, int tab2_stride, const int16_t *tab2, int tab2_stride,
uint32_t numChannels) uint32_t numChannels)
{ {
short current; short current;
current = (short)tab2[((ctx->index & 0x7f0) >> 4)*tab2_stride + val]; current = tab2[((ctx->index & 0x7f0) >> 4)*tab2_stride + val];
current = mace_broken_clip_int16(current + ctx->lev); current = mace_broken_clip_int16(current + ctx->lev);
@ -277,12 +277,12 @@ static void chomp3(ChannelData *ctx, int16_t *output, uint8_t val,
static void chomp6(ChannelData *ctx, int16_t *output, uint8_t val, static void chomp6(ChannelData *ctx, int16_t *output, uint8_t val,
const uint16_t tab1[], const uint16_t tab1[],
const uint16_t *tab2, int tab2_stride, const int16_t *tab2, int tab2_stride,
uint32_t numChannels) uint32_t numChannels)
{ {
short current; short current;
current = (short)tab2[((ctx->index & 0x7f0) >> 4)*tab2_stride + val]; current = tab2[((ctx->index & 0x7f0) >> 4)*tab2_stride + val];
if ((ctx->previous ^ current) >= 0) { if ((ctx->previous ^ current) >= 0) {
ctx->factor = FFMIN(ctx->factor + 506, 32767); ctx->factor = FFMIN(ctx->factor + 506, 32767);