diff options
| author | Tim Redfern <tim@eclectronics.org> | 2013-12-29 12:19:38 +0000 |
|---|---|---|
| committer | Tim Redfern <tim@eclectronics.org> | 2013-12-29 12:19:38 +0000 |
| commit | f7813a5324be39d13ab536c245d15dfc602a7849 (patch) | |
| tree | fad99148b88823d34a5df2f0a25881a002eb291b /ffmpeg/libavcodec/ra288.c | |
| parent | b7a5a477b8ff4d4e3028b9dfb9a9df0a41463f92 (diff) | |
basic type mechanism working
Diffstat (limited to 'ffmpeg/libavcodec/ra288.c')
| -rw-r--r-- | ffmpeg/libavcodec/ra288.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/ffmpeg/libavcodec/ra288.c b/ffmpeg/libavcodec/ra288.c index 393ea0b..c1b9b6b 100644 --- a/ffmpeg/libavcodec/ra288.c +++ b/ffmpeg/libavcodec/ra288.c @@ -95,7 +95,7 @@ static void decode(RA288Context *ractx, float gain, int cb_coef) memmove(ractx->sp_hist + 70, ractx->sp_hist + 75, 36*sizeof(*block)); /* block 46 of G.728 spec */ - sum = 32.; + sum = 32.0; for (i=0; i < 10; i++) sum -= gain_block[9-i] * ractx->gain_lpc[i]; @@ -111,7 +111,7 @@ static void decode(RA288Context *ractx, float gain, int cb_coef) sum = avpriv_scalarproduct_float_c(buffer, buffer, 5); - sum = FFMAX(sum, 5. / (1<<24)); + sum = FFMAX(sum, 5.0 / (1<<24)); /* shift and store */ memmove(gain_block, gain_block + 1, 9 * sizeof(*gain_block)); @@ -157,7 +157,7 @@ static void do_hybrid_window(RA288Context *ractx, } /* Multiply by the white noise correcting factor (WNCF). */ - *out *= 257./256.; + *out *= 257.0 / 256.0; } /** @@ -202,7 +202,7 @@ static int ra288_decode_frame(AVCodecContext * avctx, void *data, return ret; out = (float *)frame->data[0]; - init_get_bits(&gb, buf, avctx->block_align * 8); + init_get_bits8(&gb, buf, avctx->block_align); for (i=0; i < RA288_BLOCKS_PER_FRAME; i++) { float gain = amptable[get_bits(&gb, 3)]; @@ -229,11 +229,11 @@ static int ra288_decode_frame(AVCodecContext * avctx, void *data, AVCodec ff_ra_288_decoder = { .name = "real_288", + .long_name = NULL_IF_CONFIG_SMALL("RealAudio 2.0 (28.8K)"), .type = AVMEDIA_TYPE_AUDIO, .id = AV_CODEC_ID_RA_288, .priv_data_size = sizeof(RA288Context), .init = ra288_decode_init, .decode = ra288_decode_frame, .capabilities = CODEC_CAP_DR1, - .long_name = NULL_IF_CONFIG_SMALL("RealAudio 2.0 (28.8K)"), }; |
