137 "Unsupported channel count: %d!\n", avctx->
channels);
179 for (ch = 0; ch < 2; ch++) {
203 int i, sb, ch,
qu, nspeclines, RNG_index;
210 for (ch = 0; ch < num_channels; ch++)
211 memset(
out[ch], 0, ATRAC3P_FRAME_SAMPLES *
sizeof(*
out[ch]));
220 sb_RNG_index[sb] = RNG_index & 0x3FC;
223 for (ch = 0; ch < num_channels; ch++) {
225 memset(
out[ch], 0, ATRAC3P_FRAME_SAMPLES *
sizeof(*
out[ch]));
230 nspeclines = ff_atrac3p_qu_to_spec_pos[qu + 1] -
231 ff_atrac3p_qu_to_spec_pos[
qu];
236 for (i = 0; i < nspeclines; i++)
243 sb_RNG_index[sb], sb);
250 FFSWAP(
float,
out[0][sb * ATRAC3P_SUBBAND_SAMPLES + i],
251 out[1][sb * ATRAC3P_SUBBAND_SAMPLES + i]);
257 out[1][sb * ATRAC3P_SUBBAND_SAMPLES + i] = -(
out[1][sb * ATRAC3P_SUBBAND_SAMPLES + i]);
267 for (ch = 0; ch < num_channels; ch++) {
272 &ctx->
mdct_buf[ch][sb * ATRAC3P_SUBBAND_SAMPLES],
278 &ctx->
mdct_buf[ch][sb * ATRAC3P_SUBBAND_SAMPLES],
279 &ch_unit->
prev_buf[ch][sb * ATRAC3P_SUBBAND_SAMPLES],
282 ATRAC3P_SUBBAND_SAMPLES,
283 &ctx->
time_buf[ch][sb * ATRAC3P_SUBBAND_SAMPLES]);
290 ATRAC3P_SUBBAND_SAMPLES *
295 ATRAC3P_SUBBAND_SAMPLES *
315 for (ch = 0; ch < num_channels; ch++) {
328 int *got_frame_ptr,
AVPacket *avpkt)
332 int i,
ret, ch_unit_id, ch_block = 0, out_ch_index = 0, channels_to_process;
356 "Frame data doesn't match channel configuration!\n");
361 channels_to_process = ch_unit_id + 1;
370 channels_to_process, avctx);
372 channels_to_process, avctx);
374 for (i = 0; i < channels_to_process; i++)
375 memcpy(samples_p[out_ch_index + i], ctx->
outp_buf[i],
379 out_ch_index += channels_to_process;
388 .
name =
"atrac3plus",