[FFmpeg-soc] [soc]: r1266 - in qcelp: qcelpdata.h qcelpdec.c
reynaldo
subversion at mplayerhq.hu
Fri Aug 31 04:10:24 CEST 2007
Author: reynaldo
Date: Fri Aug 31 04:10:20 2007
New Revision: 1266
Log:
Gets rid of two subused macros -- Another from Michael's review
Modified:
qcelp/qcelpdata.h
qcelp/qcelpdec.c
Modified: qcelp/qcelpdata.h
==============================================================================
--- qcelp/qcelpdata.h (original)
+++ qcelp/qcelpdata.h Fri Aug 31 04:10:20 2007
@@ -344,13 +344,11 @@ static const qcelp_vector qcelp_lspvq5[]
{ 539,1564},{1142, 533},{ 984, 391},{2130,1089}};
/**
- * Gain parameters
- * TIA/EIA/IS-733 2.4.6.2.1-(1 through 3)
+ * Table for computing Ga (Decoded linear codebook gain magnitude).
+ *
+ * TIA/EIA/IS-733 2.4.6.2.1-3
*/
-#define QCELP_CBSIGN2GS(a) ((a) == 0? 1:-1)
-#define QCELP_CBGAIN2G0(a) (a*4)
-
static const float qcelp_g12ga[]={
1.000, 1.125, 1.250, 1.375, 1.625, 1.750, 2.000, 2.250,
2.500, 2.875, 3.125, 3.500, 4.000, 4.500, 5.000, 5.625,
Modified: qcelp/qcelpdec.c
==============================================================================
--- qcelp/qcelpdec.c (original)
+++ qcelp/qcelpdec.c Fri Aug 31 04:10:20 2007
@@ -159,8 +159,8 @@ void qcelp_decode_params(AVCodecContext
{
if(frame->rate == RATE_HALF && i>=4) break;
- gs[i]=QCELP_CBSIGN2GS(cbsign[i]);
- g0[i]=QCELP_CBGAIN2G0(cbgain[i]);
+ gs[i]=cbsign[i]? -1:1;
+ g0[i]=4*cbgain[i];
/*
* Spec has errors on the predictor determination formula
@@ -194,7 +194,7 @@ void qcelp_decode_params(AVCodecContext
case RATE_QUARTER:
for(i=0; i<5; i++)
{
- g0[i]=g1[i]=QCELP_CBGAIN2G0(cbgain[i]);
+ g0[i]=g1[i]=4*cbgain[i];
gs[i]=1;
ga[i]=qcelp_g12ga[g1[i]];
}
More information about the FFmpeg-soc
mailing list