aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVitor Sessak <vitor1001@gmail.com>2008-09-17 19:26:37 +0000
committerVitor Sessak <vitor1001@gmail.com>2008-09-17 19:26:37 +0000
commitfaf6d6964b72e4710426efb218f13b8a87f34eae (patch)
tree2fbbee3417e5b2d76115d65a14a06fd6a19d91c1
parent00cc0ce91e26a207057d8ba986c663823f41a4fc (diff)
downloadffmpeg-faf6d6964b72e4710426efb218f13b8a87f34eae.tar.gz
Use SAMPLE_FMT_FLT instead of doing the float->int conversion in the
decoder. This changes the output very little and any difference should be inaudible. Originally committed as revision 15343 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavcodec/ra288.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libavcodec/ra288.c b/libavcodec/ra288.c
index 8c4a9c32aa..1f177b5f5d 100644
--- a/libavcodec/ra288.c
+++ b/libavcodec/ra288.c
@@ -48,7 +48,7 @@ typedef struct {
static av_cold int ra288_decode_init(AVCodecContext *avctx)
{
- avctx->sample_fmt = SAMPLE_FMT_S16;
+ avctx->sample_fmt = SAMPLE_FMT_FLT;
return 0;
}
@@ -189,7 +189,7 @@ static int ra288_decode_frame(AVCodecContext * avctx, void *data,
int *data_size, const uint8_t * buf,
int buf_size)
{
- int16_t *out = data;
+ float *out = data;
int i, j;
RA288Context *ractx = avctx->priv_data;
GetBitContext gb;
@@ -201,7 +201,7 @@ static int ra288_decode_frame(AVCodecContext * avctx, void *data,
return 0;
}
- if (*data_size < 32*5*2)
+ if (*data_size < 32*5*4)
return -1;
init_get_bits(&gb, buf, avctx->block_align * 8);
@@ -213,7 +213,7 @@ static int ra288_decode_frame(AVCodecContext * avctx, void *data,
decode(ractx, gain, cb_coef);
for (j=0; j < 5; j++)
- *(out++) = 8 * ractx->sp_hist[70 + 36 + j];
+ *(out++) = (1/4096.) * ractx->sp_hist[70 + 36 + j];
if ((i & 7) == 3)
backward_filter(ractx);