uint8_t *data; ///< current frame data
uint8_t *data_end; ///< frame data end
- uint8_t *ptr; ///< current position in frame data
- uint8_t *last_ptr; ///< position where last 4608-sample block ended
+ const uint8_t *ptr; ///< current position in frame data
+ const uint8_t *last_ptr; ///< position where last 4608-sample block ended
} APEContext;
// TODO: dsputilize
/* Keep a count of the blocks decoded in this frame */
ctx->blocksdecoded = 0;
- /* Initialise the rice structs */
+ /* Initialize the rice structs */
ctx->riceX.k = 10;
ctx->riceX.ksum = (1 << ctx->riceX.k) * 16;
ctx->riceY.k = 10;
memset(p->historybuffer, 0, PREDICTOR_SIZE * sizeof(int32_t));
p->buf = p->historybuffer;
- /* Initialise and zero the co-efficients */
+ /* Initialize and zero the coefficients */
memcpy(p->coeffsA[0], initial_coeffs, sizeof(initial_coeffs));
memcpy(p->coeffsA[1], initial_coeffs, sizeof(initial_coeffs));
memset(p->coeffsB, 0, sizeof(p->coeffsB));
static int ape_decode_frame(AVCodecContext * avctx,
void *data, int *data_size,
- uint8_t * buf, int buf_size)
+ const uint8_t * buf, int buf_size)
{
APEContext *s = avctx->priv_data;
int16_t *samples = data;
if(!s->samples){
s->data = av_realloc(s->data, (buf_size + 3) & ~3);
- s->dsp.bswap_buf(s->data, buf, buf_size >> 2);
+ s->dsp.bswap_buf((uint32_t*)s->data, (const uint32_t*)buf, buf_size >> 2);
s->ptr = s->last_ptr = s->data;
s->data_end = s->data + buf_size;