Lines Matching defs:channel

47     uint8_t         min_channel;         ///< The index of the first channel coded in this substream.
48 uint8_t max_channel; ///< The index of the last channel coded in this substream.
65 uint8_t outch[MAX_MATRICES]; ///< output channel for each matrix
150 unsigned int one_sample_buffer_size; ///< Number of samples*channel for one access unit.
159 uint8_t channel_arrangement; ///< channel arrangement for MLP streams
161 uint8_t ch_modifier_thd0; ///< channel modifier for TrueHD stream 0
162 uint8_t ch_modifier_thd1; ///< channel modifier for TrueHD stream 1
163 uint8_t ch_modifier_thd2; ///< channel modifier for TrueHD stream 2
270 for (unsigned int channel = rh->min_channel; channel <= rh->max_channel; channel++)
271 if (prev->fbits[channel] != mp->fbits[channel])
278 for (unsigned int channel = 0; channel < ctx->num_channels; channel++)
279 if (prev->coeff[mat][channel] != mp->coeff[mat][channel])
365 for (unsigned int channel = 0; channel < MAX_CHANNELS; channel++) {
367 dst->fbits[channel] = src->fbits[channel];
368 dst->shift[channel] = src->shift[channel];
371 dst->coeff[count][channel] = src->coeff[count][channel];
386 for (unsigned int channel = 0; channel < ctx->avctx->ch_layout.nb_channels; channel++) {
387 ChannelParams *cp = ctx->seq_channel_params + index*(ctx->avctx->ch_layout.nb_channels) + channel;
389 dp->quant_step_size[channel] = ctx->cur_decoding_params->quant_step_size[channel];
390 dp->matrix_params.shift[channel] = ctx->cur_decoding_params->matrix_params.shift[channel];
394 copy_filter_params(cp, &ctx->cur_channel_params[channel], filter);
414 for (unsigned channel = 0; channel < nb_channels; channel++) {
415 ChannelParams *cp = &channel_params[channel];
590 ctx->num_substreams = 1; // TODO: change this after adding multi-channel support for TrueHD
607 av_log(avctx, AV_LOG_ERROR, "Unsupported channel arrangement\n");
635 av_log(avctx, AV_LOG_ERROR, "Unsupported channel arrangement\n");
807 for (unsigned int channel = 0; channel < ctx->num_channels; channel++) {
808 int32_t coeff = mp->coeff[mat][channel];
825 unsigned int channel, unsigned int filter)
827 FilterParams *fp = &ctx->cur_channel_params[channel].filter_params[filter];
832 int32_t *fcoeff = ctx->cur_channel_params[channel].coeff[filter];
1182 for (unsigned int channel = 0; channel <= rh->max_channel; channel++) {
1192 temp_lossless_check_data ^= (sample & 0x00ffffff) << channel;
1219 for (unsigned int channel = 0; channel < ctx->avctx->ch_layout.nb_channels; channel++)
1258 for (unsigned int channel = 0; channel <= rh->max_channel; channel++)
1259 sample_mask[channel] |= *sample_buffer++;
1264 for (unsigned int channel = 0; channel <= rh->max_channel; channel++)
1265 dp->quant_step_size[channel] = number_trailing_zeroes(sample_mask[channel]) - mp->shift[channel];
1302 unsigned int channel, unsigned int filter,
1305 ChannelParams *cp = &ctx->cur_channel_params[channel];
1316 int32_t *sample_buffer = ctx->sample_buffer + channel;
1319 int32_t *fcoeff = ctx->cur_channel_params[channel].coeff[filter];
1352 for (int channel = rh->min_channel; channel <= rh->max_channel; channel++) {
1354 set_filter_params(ctx, channel, filter, 0);
1405 for (unsigned int channel = 0; channel < ctx->num_channels; channel++) {
1406 int32_t coeff = mp->coeff[mat][channel];
1458 for (unsigned int channel = 0; channel < ctx->num_channels; channel++)
1459 mp->shift[channel] = shift;
1475 unsigned int channel, int16_t offset,
1504 unsigned int channel,
1544 unsigned int channel, int codebook,
1550 int32_t *sample_buffer = ctx->sample_buffer + channel;
1576 int32_t sample = *sample_buffer >> dp->quant_step_size[channel];
1607 unsigned int channel, int codebook,
1621 codebook_bits_offset(ctx, channel, codebook,
1651 for (unsigned int channel = 0; channel <= rh->max_channel; channel++) {
1652 ChannelParams *cp = &ctx->cur_channel_params[channel];
1653 int32_t *sample_buffer = ctx->sample_buffer + channel;
1661 int32_t sample = *sample_buffer >> dp->quant_step_size[channel];
1674 no_codebook_bits(ctx, channel, min, max, &ctx->cur_best_offset[channel][0]);
1677 no_codebook_bits_offset(ctx, channel, offset, min, max, &ctx->cur_best_offset[channel][0]);
1684 codebook_bits_offset(ctx, channel, i - 1,
1691 codebook_bits(ctx, channel, i - 1, temp_bo.min - 1,
1693 codebook_bits(ctx, channel, i - 1, offset_max + 1,
1697 ctx->cur_best_offset[channel][i] = temp_bo;
1716 static int apply_filter(MLPEncodeContext *ctx, unsigned int channel)
1718 FilterParams *fp[NUM_FILTERS] = { &ctx->cur_channel_params[channel].filter_params[FIR],
1719 &ctx->cur_channel_params[channel].filter_params[IIR], };
1720 int32_t mask = MSB_MASK(ctx->cur_decoding_params->quant_step_size[channel]);
1721 int32_t *sample_buffer = ctx->sample_buffer + channel;
1739 int32_t *fcoeff = ctx->cur_channel_params[channel].coeff[filter];
1759 sample_buffer = ctx->sample_buffer + channel;
1773 for (int channel = rh->min_channel; channel <= rh->max_channel; channel++) {
1774 if (apply_filter(ctx, channel) < 0) {
1777 set_filter_params(ctx, channel, FIR, 1);
1778 set_filter_params(ctx, channel, IIR, 1);
1779 apply_filter(ctx, channel);
1854 static int best_codebook_path_cost(MLPEncodeContext *ctx, unsigned int channel,
1858 const BestOffset *cur_bo = ctx->best_offset[idx][channel],
1859 *prev_bo = idx ? ctx->best_offset[idx - 1][channel] :
1878 for (unsigned int channel = rh->min_channel; channel <= rh->max_channel; channel++) {
1890 cur_bo = ctx->best_offset[index][channel];
1911 temp_bitcount = best_codebook_path_cost(ctx, channel, src_path, codebook);
1938 ChannelParams *cp = ctx->seq_channel_params + index*(ctx->avctx->ch_layout.nb_channels) + channel;
1941 cur_bo = &ctx->best_offset[index][channel][best_codebook];
1944 cp->huff_lsbs = cur_bo->lsb_bits + dp->quant_step_size[channel];
1965 for (unsigned int channel = 0; channel < channels; channel++) {
1966 uint8_t huff_lsbs = (seq_cp + index*(channels) + channel)->huff_lsbs;
1969 memcpy(&ctx->major_channel_params[index][channel],
1970 (seq_cp + index*(channels) + channel),