parent 84cdd2fd
...@@ -66,7 +66,7 @@ typedef struct QCELPFrame { ...@@ -66,7 +66,7 @@ typedef struct QCELPFrame {
} QCELPFrame; } QCELPFrame;
/** /**
* pre-calculated table for hammsinc function * Pre-calculated table for hammsinc function.
* Only half of the table is needed because of symmetry. * Only half of the table is needed because of symmetry.
* *
* TIA/EIA/IS-733 2.4.5.2-2/3 * TIA/EIA/IS-733 2.4.5.2-2/3
...@@ -82,7 +82,7 @@ typedef struct QCELPBitmap { ...@@ -82,7 +82,7 @@ typedef struct QCELPBitmap {
#define QCELP_OF(variable, bit, len) {offsetof(QCELPFrame, variable), bit, len} #define QCELP_OF(variable, bit, len) {offsetof(QCELPFrame, variable), bit, len}
/** /**
* bitmap unpacking tables for RATE_FULL * Bitmap unpacking tables for RATE_FULL
* *
* TIA/EIA/IS-733 Table 2.4.7.1-1 * TIA/EIA/IS-733 Table 2.4.7.1-1
*/ */
...@@ -169,7 +169,7 @@ static const QCELPBitmap qcelp_rate_full_bitmap[] = { ...@@ -169,7 +169,7 @@ static const QCELPBitmap qcelp_rate_full_bitmap[] = {
}; };
/** /**
* bitmap unpacking tables for RATE_HALF * Bitmap unpacking tables for RATE_HALF
* *
* TIA/EIA/IS-733 Table 2.4.7.2-1 * TIA/EIA/IS-733 Table 2.4.7.2-1
*/ */
...@@ -211,7 +211,7 @@ static const QCELPBitmap qcelp_rate_half_bitmap[] = { ...@@ -211,7 +211,7 @@ static const QCELPBitmap qcelp_rate_half_bitmap[] = {
}; };
/** /**
* bitmap unpacking tables for RATE_QUARTER * Bitmap unpacking tables for RATE_QUARTER
* *
* TIA/EIA/IS-733 Table 2.4.7.3-1 * TIA/EIA/IS-733 Table 2.4.7.3-1
*/ */
...@@ -232,7 +232,7 @@ static const QCELPBitmap qcelp_rate_quarter_bitmap[] = { ...@@ -232,7 +232,7 @@ static const QCELPBitmap qcelp_rate_quarter_bitmap[] = {
}; };
/** /**
* bitmap unpacking tables for RATE_OCTAVE * Bitmap unpacking tables for RATE_OCTAVE
* *
* trick: CBSEED is written into QCELPContext.cbsign[15], * trick: CBSEED is written into QCELPContext.cbsign[15],
* which is not used for RATE_OCTAVE. * which is not used for RATE_OCTAVE.
...@@ -262,7 +262,7 @@ static const QCELPBitmap qcelp_rate_octave_bitmap[] = { ...@@ -262,7 +262,7 @@ static const QCELPBitmap qcelp_rate_octave_bitmap[] = {
}; };
/** /**
* position of the bitmapping data for each packet type in * Bitmapping data position for each packet type in
* the QCELPContext * the QCELPContext
*/ */
static const QCELPBitmap * const qcelp_unpacking_bitmaps_per_rate[5] = { static const QCELPBitmap * const qcelp_unpacking_bitmaps_per_rate[5] = {
...@@ -420,12 +420,12 @@ static const qcelp_vector * const qcelp_lspvq[5] = { ...@@ -420,12 +420,12 @@ static const qcelp_vector * const qcelp_lspvq[5] = {
}; };
/** /**
* the final gain scalefactor before clipping into a usable output float * The final gain scalefactor before clipping into a usable output float
*/ */
#define QCELP_SCALE 8192. #define QCELP_SCALE 8192.
/** /**
* table for computing Ga (decoded linear codebook gain magnitude) * Table for computing Ga (decoded linear codebook gain magnitude)
* *
* @note The table could fit in int16_t in x*8 form, but it seems * @note The table could fit in int16_t in x*8 form, but it seems
* to be slower on x86 * to be slower on x86
...@@ -452,7 +452,7 @@ static const float qcelp_g12ga[61] = { ...@@ -452,7 +452,7 @@ static const float qcelp_g12ga[61] = {
1000.000/QCELP_SCALE}; 1000.000/QCELP_SCALE};
/** /**
* circular codebook for rate 1 frames in x*100 form * Circular codebook for rate 1 frames in x*100 form
* *
* TIA/EIA/IS-733 2.4.6.1-2 * TIA/EIA/IS-733 2.4.6.1-2
*/ */
...@@ -477,7 +477,7 @@ static const int16_t qcelp_rate_full_codebook[128] = { ...@@ -477,7 +477,7 @@ static const int16_t qcelp_rate_full_codebook[128] = {
#define QCELP_RATE_FULL_CODEBOOK_RATIO .01 #define QCELP_RATE_FULL_CODEBOOK_RATIO .01
/** /**
* circular codebook for rate 1/2 frames in x*2 form * Circular codebook for rate 1/2 frames in x*2 form
* *
* TIA/EIA/IS-733 2.4.6.1-1 * TIA/EIA/IS-733 2.4.6.1-1
*/ */
...@@ -511,7 +511,7 @@ static const int8_t qcelp_rate_half_codebook[128] = { ...@@ -511,7 +511,7 @@ static const int8_t qcelp_rate_half_codebook[128] = {
#define QCELP_SQRT1887 1.373681186 #define QCELP_SQRT1887 1.373681186
/** /**
* table for impulse response of BPF used to filter * Table for impulse response of BPF used to filter
* the white excitation for bitrate 1/4 synthesis * the white excitation for bitrate 1/4 synthesis
* *
* Only half the tables are needed because of symmetry. * Only half the tables are needed because of symmetry.
...@@ -526,14 +526,14 @@ static const double qcelp_rnd_fir_coefs[11] = { ...@@ -526,14 +526,14 @@ static const double qcelp_rnd_fir_coefs[11] = {
/** /**
* This spread factor is used, for bitrate 1/8 and I_F_Q, * This spread factor is used, for bitrate 1/8 and I_F_Q,
* to force the LSP frequencies to be at least 80 Hz apart. * to force LSP frequencies to be at least 80 Hz apart.
* *
* TIA/EIA/IS-733 2.4.3.3.2 * TIA/EIA/IS-733 2.4.3.3.2
*/ */
#define QCELP_LSP_SPREAD_FACTOR 0.02 #define QCELP_LSP_SPREAD_FACTOR 0.02
/** /**
* predictor coefficient for the conversion of LSP codes * Predictor coefficient for the conversion of LSP codes
* to LSP frequencies for 1/8 and I_F_Q * to LSP frequencies for 1/8 and I_F_Q
* *
* TIA/EIA/IS-733 2.4.3.2.7-2 * TIA/EIA/IS-733 2.4.3.2.7-2
...@@ -541,7 +541,7 @@ static const double qcelp_rnd_fir_coefs[11] = { ...@@ -541,7 +541,7 @@ static const double qcelp_rnd_fir_coefs[11] = {
#define QCELP_LSP_OCTAVE_PREDICTOR 29.0/32 #define QCELP_LSP_OCTAVE_PREDICTOR 29.0/32
/** /**
* initial coefficient to perform bandwidth expansion on LPC * Initial coefficient to perform bandwidth expansion on LPC
* *
* @note: 0.9883 looks like an approximation of 253/256. * @note: 0.9883 looks like an approximation of 253/256.
* *
......
...@@ -633,7 +633,7 @@ static qcelp_packet_rate determine_bitrate(AVCodecContext *avctx, ...@@ -633,7 +633,7 @@ static qcelp_packet_rate determine_bitrate(AVCodecContext *avctx,
(*buf)++; (*buf)++;
} else if ((bitrate = buf_size2bitrate(buf_size + 1)) >= 0) { } else if ((bitrate = buf_size2bitrate(buf_size + 1)) >= 0) {
av_log(avctx, AV_LOG_WARNING, av_log(avctx, AV_LOG_WARNING,
"Bitrate byte is missing, guessing the bitrate from packet size.\n"); "Bitrate byte missing, guessing bitrate from packet size.\n");
} else } else
return I_F_Q; return I_F_Q;
...@@ -703,7 +703,7 @@ static int qcelp_decode_frame(AVCodecContext *avctx, void *data, ...@@ -703,7 +703,7 @@ static int qcelp_decode_frame(AVCodecContext *avctx, void *data,
outbuffer = (float *)frame->data[0]; outbuffer = (float *)frame->data[0];
if ((q->bitrate = determine_bitrate(avctx, buf_size, &buf)) == I_F_Q) { if ((q->bitrate = determine_bitrate(avctx, buf_size, &buf)) == I_F_Q) {
warn_insufficient_frame_quality(avctx, "bitrate cannot be determined."); warn_insufficient_frame_quality(avctx, "Bitrate cannot be determined.");
goto erasure; goto erasure;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment