Revision f53e96ed libavcodec/wmaprodec.c
libavcodec/wmaprodec.c  

161  161 
int i; 
162  162  
163  163 
for (i = 0; i < s>num_chgroups; i++) { 
164  
165 
if (s>chgroup[i].transform == 1) { 

166 
/** M/S stereo decoding */ 

167 
int16_t* sfb_offsets = s>cur_sfb_offsets; 

168 
float* ch0 = *sfb_offsets + s>channel[0].coeffs; 

169 
float* ch1 = *sfb_offsets++ + s>channel[1].coeffs; 

170 
const char* tb = s>chgroup[i].transform_band; 

171 
const char* tb_end = tb + s>num_bands; 

172  
173 
while (tb < tb_end) { 

174 
const float* ch0_end = s>channel[0].coeffs + 

175 
FFMIN(*sfb_offsets, s>subframe_len); 

176 
if (*tb++ == 1) { 

177 
while (ch0 < ch0_end) { 

178 
const float v1 = *ch0; 

179 
const float v2 = *ch1; 

180 
*ch0++ = v1  v2; 

181 
*ch1++ = v1 + v2; 

182 
} 

183 
} else { 

184 
while (ch0 < ch0_end) { 

185 
*ch0++ *= 181.0 / 128; 

186 
*ch1++ *= 181.0 / 128; 

187 
} 

188 
} 

189 
++sfb_offsets; 

190 
} 

191 
} else if (s>chgroup[i].transform) { 

164 
if (s>chgroup[i].transform) { 

192  165 
float data[WMAPRO_MAX_CHANNELS]; 
193  166 
const int num_channels = s>chgroup[i].num_channels; 
194  167 
float** ch_data = s>chgroup[i].channel_data; 
...  ...  
199  172 
/** multichannel decorrelation */ 
200  173 
for (sfb = s>cur_sfb_offsets; 
201  174 
sfb < s>cur_sfb_offsets + s>num_bands;sfb++) { 
175 
int y; 

202  176 
if (*tb++ == 1) { 
203 
int y; 

204  177 
/** multiply values with the decorrelation_matrix */ 
205  178 
for (y = sfb[0]; y < FFMIN(sfb[1], s>subframe_len); y++) { 
206  179 
const float* mat = s>chgroup[i].decorrelation_matrix; 
...  ...  
220  193 
(*ch)[y] = sum; 
221  194 
} 
222  195 
} 
196 
} else if (s>num_channels == 2) { 

197 
for (y = sfb[0]; y < FFMIN(sfb[1], s>subframe_len); y++) { 

198 
ch_data[0][y] *= 181.0 / 128; 

199 
ch_data[1][y] *= 181.0 / 128; 

200 
} 

223  201 
} 
224  202 
} 
225  203 
} 
Also available in: Unified diff