Mercurial > libavcodec.hg
comparison cook.c @ 5353:7e4703e16bbd libavcodec
fixpoint: renaming all lowlevel arithmetic routines to xxx_float
author | mhoffman |
---|---|
date | Tue, 17 Jul 2007 11:06:12 +0000 |
parents | 503498b93901 |
children | 20bea6a9950c |
comparison
equal
deleted
inserted
replaced
5352:4cd6e59c64eb | 5353:7e4703e16bbd |
---|---|
536 * @param subband_coef_index array of indexes to quant_centroid_tab | 536 * @param subband_coef_index array of indexes to quant_centroid_tab |
537 * @param subband_coef_sign signs of coefficients | 537 * @param subband_coef_sign signs of coefficients |
538 * @param mlt_p pointer into the mlt buffer | 538 * @param mlt_p pointer into the mlt buffer |
539 */ | 539 */ |
540 | 540 |
541 static void scalar_dequant(COOKContext *q, int index, int quant_index, | 541 static void scalar_dequant_float(COOKContext *q, int index, int quant_index, |
542 int* subband_coef_index, int* subband_coef_sign, | 542 int* subband_coef_index, int* subband_coef_sign, |
543 float* mlt_p){ | 543 float* mlt_p){ |
544 int i; | 544 int i; |
545 float f1; | 545 float f1; |
546 | 546 |
675 * @param buffer pointer to the timedomain buffer | 675 * @param buffer pointer to the timedomain buffer |
676 * @param gain_index index for the block multiplier | 676 * @param gain_index index for the block multiplier |
677 * @param gain_index_next index for the next block multiplier | 677 * @param gain_index_next index for the next block multiplier |
678 */ | 678 */ |
679 | 679 |
680 static void interpolate(COOKContext *q, float* buffer, | 680 static void interpolate_float(COOKContext *q, float* buffer, |
681 int gain_index, int gain_index_next){ | 681 int gain_index, int gain_index_next){ |
682 int i; | 682 int i; |
683 float fc1, fc2; | 683 float fc1, fc2; |
684 fc1 = q->pow2tab[gain_index+63]; | 684 fc1 = q->pow2tab[gain_index+63]; |
685 | 685 |
1162 if ( init_cook_mlt(q) != 0 ) | 1162 if ( init_cook_mlt(q) != 0 ) |
1163 return -1; | 1163 return -1; |
1164 | 1164 |
1165 /* Initialize COOK signal arithmetic handling */ | 1165 /* Initialize COOK signal arithmetic handling */ |
1166 if (1) { | 1166 if (1) { |
1167 q->scalar_dequant = scalar_dequant; | 1167 q->scalar_dequant = scalar_dequant_float; |
1168 q->decouple = decouple_float; | 1168 q->decouple = decouple_float; |
1169 q->imlt_window = imlt_window_float; | 1169 q->imlt_window = imlt_window_float; |
1170 q->interpolate = interpolate; | 1170 q->interpolate = interpolate_float; |
1171 q->saturate_output = saturate_output_float; | 1171 q->saturate_output = saturate_output_float; |
1172 } | 1172 } |
1173 | 1173 |
1174 /* Try to catch some obviously faulty streams, othervise it might be exploitable */ | 1174 /* Try to catch some obviously faulty streams, othervise it might be exploitable */ |
1175 if (q->total_subbands > 53) { | 1175 if (q->total_subbands > 53) { |