Lines Matching refs:channel

85 static void aptx_decode_channel(Channel *channel, int32_t samples[4])
90 subband_samples[subband] = channel->prediction[subband].previous_reconstructed_sample;
91 aptx_qmf_tree_synthesis(&channel->qmf, subband_samples, samples);
94 static void aptx_unpack_codeword(Channel *channel, uint16_t codeword)
96 channel->quantize[0].quantized_sample = sign_extend(codeword >> 0, 7);
97 channel->quantize[1].quantized_sample = sign_extend(codeword >> 7, 4);
98 channel->quantize[2].quantized_sample = sign_extend(codeword >> 11, 2);
99 channel->quantize[3].quantized_sample = sign_extend(codeword >> 13, 3);
100 channel->quantize[3].quantized_sample = (channel->quantize[3].quantized_sample & ~1)
101 | aptx_quantized_parity(channel);
104 static void aptxhd_unpack_codeword(Channel *channel, uint32_t codeword)
106 channel->quantize[0].quantized_sample = sign_extend(codeword >> 0, 9);
107 channel->quantize[1].quantized_sample = sign_extend(codeword >> 9, 6);
108 channel->quantize[2].quantized_sample = sign_extend(codeword >> 15, 4);
109 channel->quantize[3].quantized_sample = sign_extend(codeword >> 19, 5);
110 channel->quantize[3].quantized_sample = (channel->quantize[3].quantized_sample & ~1)
111 | aptx_quantized_parity(channel);
118 int channel, ret;
120 for (channel = 0; channel < NB_CHANNELS; channel++) {
121 ff_aptx_generate_dither(&ctx->channels[channel]);
124 aptxhd_unpack_codeword(&ctx->channels[channel],
125 AV_RB24(input + 3*channel));
127 aptx_unpack_codeword(&ctx->channels[channel],
128 AV_RB16(input + 2*channel));
129 ff_aptx_invert_quantize_and_prediction(&ctx->channels[channel], ctx->hd);
134 for (channel = 0; channel < NB_CHANNELS; channel++)
135 aptx_decode_channel(&ctx->channels[channel], samples[channel]);
144 int pos, opos, channel, sample, ret;
166 for (channel = 0; channel < NB_CHANNELS; channel++)
168 AV_WN32A(&frame->data[channel][4*(opos+sample)],
169 samples[channel][sample] * 256);