return ptr;
}
-static int init_cplscales_table (COOKContext *q) {
+static void init_cplscales_table (COOKContext *q) {
int i;
for (i=0;i<5;i++)
q->cplscales[i] = maybe_reformat_buffer32 (q, cplscales[i], (1<<(i+2))-1);
* Why? No idea, some checksum/error detection method maybe.
*
* Out buffer size: extra bytes are needed to cope with
- * padding/missalignment.
+ * padding/misalignment.
* Subpackets passed to the decoder can contain two, consecutive
* half-subpackets, of identical but arbitrary size.
* 1234 1234 1234 1234 extraA extraB
* @param mlt_p pointer into the mlt buffer
*/
-static void scalar_dequant(COOKContext *q, int index, int quant_index,
+static void scalar_dequant_float(COOKContext *q, int index, int quant_index,
int* subband_coef_index, int* subband_coef_sign,
float* mlt_p){
int i;
* @param gain_index_next index for the next block multiplier
*/
-static void interpolate(COOKContext *q, float* buffer,
+static void interpolate_float(COOKContext *q, float* buffer,
int gain_index, int gain_index_next){
int i;
float fc1, fc2;
int i,j;
int decouple_tab[SUBBAND_SIZE];
float *decode_buffer = q->decode_buffer_0;
- int idx, cpl_tmp,tmp_idx;
+ int idx, cpl_tmp;
float f1,f2;
float* cplscale;
*/
for (j = 0; j < q->samples_per_channel; j++) {
out[chan + q->nb_channels * j] =
- av_clip(lrintf(output[j]), -32768, 32767);
+ av_clip_int16(lrintf(output[j]));
}
}
/* Initialize COOK signal arithmetic handling */
if (1) {
- q->scalar_dequant = scalar_dequant;
+ q->scalar_dequant = scalar_dequant_float;
q->decouple = decouple_float;
q->imlt_window = imlt_window_float;
- q->interpolate = interpolate;
+ q->interpolate = interpolate_float;
q->saturate_output = saturate_output_float;
}