diff options
Diffstat (limited to 'ffmpeg/libavcodec/ra144dec.c')
| -rw-r--r-- | ffmpeg/libavcodec/ra144dec.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/ffmpeg/libavcodec/ra144dec.c b/ffmpeg/libavcodec/ra144dec.c index 5531fd2..b7add7f 100644 --- a/ffmpeg/libavcodec/ra144dec.c +++ b/ffmpeg/libavcodec/ra144dec.c @@ -45,7 +45,7 @@ static av_cold int ra144_decode_init(AVCodecContext * avctx) return 0; } -static void do_output_subblock(RA144Context *ractx, const uint16_t *lpc_coefs, +static void do_output_subblock(RA144Context *ractx, const int16_t *lpc_coefs, int gval, GetBitContext *gb) { int cba_idx = get_bits(gb, 7); // index of the adaptive CB, 0 if none @@ -66,7 +66,7 @@ static int ra144_decode_frame(AVCodecContext * avctx, void *data, int buf_size = avpkt->size; static const uint8_t sizes[LPC_ORDER] = {6, 5, 5, 4, 4, 3, 3, 3, 3, 2}; unsigned int refl_rms[NBLOCKS]; // RMS of the reflection coefficients - uint16_t block_coefs[NBLOCKS][LPC_ORDER]; // LPC coefficients of each sub-block + int16_t block_coefs[NBLOCKS][LPC_ORDER]; // LPC coefficients of each sub-block unsigned int lpc_refl[LPC_ORDER]; // LPC reflection coefficients of the frame int i, j; int ret; @@ -76,7 +76,7 @@ static int ra144_decode_frame(AVCodecContext * avctx, void *data, RA144Context *ractx = avctx->priv_data; GetBitContext gb; - if (buf_size < FRAMESIZE) { + if (buf_size < FRAME_SIZE) { av_log(avctx, AV_LOG_ERROR, "Frame too small (%d bytes). Truncated file?\n", buf_size); *got_frame_ptr = 0; @@ -89,7 +89,7 @@ static int ra144_decode_frame(AVCodecContext * avctx, void *data, return ret; samples = (int16_t *)frame->data[0]; - init_get_bits(&gb, buf, FRAMESIZE * 8); + init_get_bits8(&gb, buf, FRAME_SIZE); for (i = 0; i < LPC_ORDER; i++) lpc_refl[i] = ff_lpc_refl_cb[i][get_bits(&gb, sizes[i])]; @@ -122,16 +122,16 @@ static int ra144_decode_frame(AVCodecContext * avctx, void *data, *got_frame_ptr = 1; - return FRAMESIZE; + return FRAME_SIZE; } AVCodec ff_ra_144_decoder = { .name = "real_144", + .long_name = NULL_IF_CONFIG_SMALL("RealAudio 1.0 (14.4K)"), .type = AVMEDIA_TYPE_AUDIO, .id = AV_CODEC_ID_RA_144, .priv_data_size = sizeof(RA144Context), .init = ra144_decode_init, .decode = ra144_decode_frame, .capabilities = CODEC_CAP_DR1, - .long_name = NULL_IF_CONFIG_SMALL("RealAudio 1.0 (14.4K)"), }; |
