134 "Unsupported channel count: %d!\n", avctx->
channels);
175 for (ch = 0; ch < 2; ch++) {
199 int i, sb, ch,
qu, nspeclines, RNG_index;
206 for (ch = 0; ch < num_channels; ch++)
207 memset(
out[ch], 0, ATRAC3P_FRAME_SAMPLES *
sizeof(*
out[ch]));
216 sb_RNG_index[sb] = RNG_index & 0x3FC;
219 for (ch = 0; ch < num_channels; ch++) {
221 memset(
out[ch], 0, ATRAC3P_FRAME_SAMPLES *
sizeof(*
out[ch]));
226 nspeclines = ff_atrac3p_qu_to_spec_pos[qu + 1] -
227 ff_atrac3p_qu_to_spec_pos[
qu];
232 for (i = 0; i < nspeclines; i++)
239 sb_RNG_index[sb], sb);
246 FFSWAP(
float,
out[0][sb * ATRAC3P_SUBBAND_SAMPLES + i],
247 out[1][sb * ATRAC3P_SUBBAND_SAMPLES + i]);
253 out[1][sb * ATRAC3P_SUBBAND_SAMPLES + i] = -(
out[1][sb * ATRAC3P_SUBBAND_SAMPLES + i]);
263 for (ch = 0; ch < num_channels; ch++) {
268 &ctx->
mdct_buf[ch][sb * ATRAC3P_SUBBAND_SAMPLES],
274 &ctx->
mdct_buf[ch][sb * ATRAC3P_SUBBAND_SAMPLES],
275 &ch_unit->
prev_buf[ch][sb * ATRAC3P_SUBBAND_SAMPLES],
278 ATRAC3P_SUBBAND_SAMPLES,
279 &ctx->
time_buf[ch][sb * ATRAC3P_SUBBAND_SAMPLES]);
286 ATRAC3P_SUBBAND_SAMPLES *
291 ATRAC3P_SUBBAND_SAMPLES *
311 for (ch = 0; ch < num_channels; ch++) {
324 int *got_frame_ptr,
AVPacket *avpkt)
328 int i, ret, ch_unit_id, ch_block = 0, out_ch_index = 0, channels_to_process;
354 "Frame data doesn't match channel configuration!\n");
359 channels_to_process = ch_unit_id + 1;
368 channels_to_process, avctx);
370 channels_to_process, avctx);
372 for (i = 0; i < channels_to_process; i++)
373 memcpy(samples_p[out_ch_index + i], ctx->
outp_buf[i],
377 out_ch_index += channels_to_process;
386 .
name =
"atrac3plus",