[FFmpeg-soc] [soc]: r2526 - alacenc/alacenc.c
jai_menon
subversion at mplayerhq.hu
Sun Jun 22 07:33:26 CEST 2008
Author: jai_menon
Date: Sun Jun 22 07:33:26 2008
New Revision: 2526
Log:
handle 32 bit sample data internally
Modified:
alacenc/alacenc.c
Modified: alacenc/alacenc.c
==============================================================================
--- alacenc/alacenc.c (original)
+++ alacenc/alacenc.c Sun Jun 22 07:33:26 2008
@@ -44,7 +44,7 @@ typedef struct AlacEncodeContext {
int compression_level;
int max_coded_frame_size;
int write_sample_size;
- int16_t *sample_buf[MAX_CHANNELS];
+ int32_t *sample_buf[MAX_CHANNELS];
PutBitContext pbctx;
RiceContext rc;
AVCodecContext *avctx;
@@ -66,7 +66,7 @@ static void allocate_sample_buffers(Alac
int i = s->channels;
while(i) {
- s->sample_buf[i-1] = av_mallocz(s->avctx->frame_size*s->avctx->bits_per_sample>>3);
+ s->sample_buf[i-1] = av_mallocz(s->avctx->frame_size*sizeof(int32_t));
i--;
}
}
@@ -131,7 +131,7 @@ static void write_frame_header(AlacEncod
put_bits(&s->pbctx, 32, s->avctx->frame_size); // No. of samples in the frame
}
-static void alac_entropy_coder(AlacEncodeContext *s, int16_t *samples)
+static void alac_entropy_coder(AlacEncodeContext *s, int32_t *samples)
{
unsigned int history = s->rc.initial_history;
int sign_modifier = 0, i = 0, k;
More information about the FFmpeg-soc
mailing list