[FFmpeg-soc] [soc]: r375 - qcelp/qcelpdec.c
reynaldo
subversion at mplayerhq.hu
Wed Jul 11 22:26:02 CEST 2007
Author: reynaldo
Date: Wed Jul 11 22:26:02 2007
New Revision: 375
Log:
- Fixes outbound reading spoted by benjamin
- Sketches qcelp_compute_cdn()
Modified:
qcelp/qcelpdec.c
Modified: qcelp/qcelpdec.c
==============================================================================
--- qcelp/qcelpdec.c (original)
+++ qcelp/qcelpdec.c Wed Jul 11 22:26:02 2007
@@ -149,10 +149,10 @@ void qcelp_ctc2GI(const QCELPFrame *fram
g0[i]=QCELP_CBGAIN2G0(cbgain[i]);
/* FIXME this needs to be further examinated */
- if(frame->rate == RATE_HALF || !((i+1)%4))
- predictor=0;
- else
+ if(frame->rate == RATE_FULL && i > 0 && !((i+1)%4))
predictor=av_clip(6, 38, (g1[i-1]+g1[i-2]+g1[i-3])/3);
+ else
+ predictor=0;
g1[i]=g0[i]+predictor;
ga[i]=qcelp_g12ga[g1[i]];
@@ -196,6 +196,23 @@ void qcelp_ctc2GI(const QCELPFrame *fram
}
}
+/**
+ * Computes the scaled codebook vector Cdn From INDEX and GAIN
+ * For all rates
+ */
+static int qcelp_compute_cdn(qcelp_packet_rate rate, const float *gain,
+ const int *index, float *cdn_vector)
+{
+ switch(rate)
+ {
+ case RATE_FULL:
+ case RATE_HALF:
+ break;
+ case RATE_QUARTER;
+ case RATE_OCTAVE;
+ }
+}
+
static int qcelp_decode_frame(AVCodecContext *avctx, void *data,
int *data_size, uint8_t *buf, int buf_size)
{
More information about the FFmpeg-soc
mailing list