You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
ra144enc: use int16_t* for input samples rather than void*
This commit is contained in:
@@ -441,6 +441,7 @@ static int ra144_encode_frame(AVCodecContext *avctx, uint8_t *frame,
|
|||||||
int16_t block_coefs[NBLOCKS][LPC_ORDER];
|
int16_t block_coefs[NBLOCKS][LPC_ORDER];
|
||||||
int lpc_refl[LPC_ORDER]; /**< reflection coefficients of the frame */
|
int lpc_refl[LPC_ORDER]; /**< reflection coefficients of the frame */
|
||||||
unsigned int refl_rms[NBLOCKS]; /**< RMS of the reflection coefficients */
|
unsigned int refl_rms[NBLOCKS]; /**< RMS of the reflection coefficients */
|
||||||
|
const int16_t *samples = data;
|
||||||
int energy = 0;
|
int energy = 0;
|
||||||
int i, idx;
|
int i, idx;
|
||||||
|
|
||||||
@@ -515,7 +516,7 @@ static int ra144_encode_frame(AVCodecContext *avctx, uint8_t *frame,
|
|||||||
ractx->lpc_refl_rms[1] = ractx->lpc_refl_rms[0];
|
ractx->lpc_refl_rms[1] = ractx->lpc_refl_rms[0];
|
||||||
FFSWAP(unsigned int *, ractx->lpc_coef[0], ractx->lpc_coef[1]);
|
FFSWAP(unsigned int *, ractx->lpc_coef[0], ractx->lpc_coef[1]);
|
||||||
for (i = 0; i < NBLOCKS * BLOCKSIZE; i++)
|
for (i = 0; i < NBLOCKS * BLOCKSIZE; i++)
|
||||||
ractx->curr_block[i] = *((int16_t *)data + i) >> 2;
|
ractx->curr_block[i] = samples[i] >> 2;
|
||||||
return FRAMESIZE;
|
return FRAMESIZE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user