134 "Unsupported channel count: %d!\n", avctx->
channels);
177 for (ch = 0; ch < 2; ch++) {
201 int i, sb, ch,
qu, nspeclines, RNG_index;
208 for (ch = 0; ch < num_channels; ch++)
209 memset(
out[ch], 0, ATRAC3P_FRAME_SAMPLES *
sizeof(*
out[ch]));
218 sb_RNG_index[sb] = RNG_index & 0x3FC;
221 for (ch = 0; ch < num_channels; ch++) {
223 memset(
out[ch], 0, ATRAC3P_FRAME_SAMPLES *
sizeof(*
out[ch]));
228 nspeclines = ff_atrac3p_qu_to_spec_pos[qu + 1] -
229 ff_atrac3p_qu_to_spec_pos[
qu];
234 for (i = 0; i < nspeclines; i++)
241 sb_RNG_index[sb], sb);
248 FFSWAP(
float,
out[0][sb * ATRAC3P_SUBBAND_SAMPLES + i],
249 out[1][sb * ATRAC3P_SUBBAND_SAMPLES + i]);
255 out[1][sb * ATRAC3P_SUBBAND_SAMPLES + i] = -(
out[1][sb * ATRAC3P_SUBBAND_SAMPLES + i]);
265 for (ch = 0; ch < num_channels; ch++) {
270 &ctx->
mdct_buf[ch][sb * ATRAC3P_SUBBAND_SAMPLES],
276 &ctx->
mdct_buf[ch][sb * ATRAC3P_SUBBAND_SAMPLES],
277 &ch_unit->
prev_buf[ch][sb * ATRAC3P_SUBBAND_SAMPLES],
280 ATRAC3P_SUBBAND_SAMPLES,
281 &ctx->
time_buf[ch][sb * ATRAC3P_SUBBAND_SAMPLES]);
288 ATRAC3P_SUBBAND_SAMPLES *
293 ATRAC3P_SUBBAND_SAMPLES *
313 for (ch = 0; ch < num_channels; ch++) {
326 int *got_frame_ptr,
AVPacket *avpkt)
330 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",