- int numSubbands, codingMode, cnt, first, last, subbWidth, *pIn;
- int subband_vlc_index[32], SF_idxs[32];
- int mantissas[128];
- float SF;
-
- numSubbands = get_bits(gb, 5); // number of coded subbands
- codingMode = get_bits1(gb); // coding Mode: 0 - VLC/ 1-CLC
-
- /* Get the VLC selector table for the subbands, 0 means not coded. */
- for (cnt = 0; cnt <= numSubbands; cnt++)
- subband_vlc_index[cnt] = get_bits(gb, 3);
-
- /* Read the scale factor indexes from the stream. */
- for (cnt = 0; cnt <= numSubbands; cnt++) {
- if (subband_vlc_index[cnt] != 0)
- SF_idxs[cnt] = get_bits(gb, 6);
+ int num_subbands, coding_mode, i, j, first, last, subband_size;
+ int subband_vlc_index[32], sf_index[32];
+ int mantissas[128];
+ float scale_factor;
+
+ num_subbands = get_bits(gb, 5); // number of coded subbands
+ coding_mode = get_bits1(gb); // coding Mode: 0 - VLC/ 1-CLC
+
+ /* get the VLC selector table for the subbands, 0 means not coded */
+ for (i = 0; i <= num_subbands; i++)
+ subband_vlc_index[i] = get_bits(gb, 3);
+
+ /* read the scale factor indexes from the stream */
+ for (i = 0; i <= num_subbands; i++) {
+ if (subband_vlc_index[i] != 0)
+ sf_index[i] = get_bits(gb, 6);