Lines Matching refs:sconf
197 ALSSpecificConfig sconf;
267 ALSSpecificConfig *sconf = &ctx->sconf;
269 ff_dlog(avctx, "resolution = %i\n", sconf->resolution);
270 ff_dlog(avctx, "floating = %i\n", sconf->floating);
271 ff_dlog(avctx, "frame_length = %i\n", sconf->frame_length);
272 ff_dlog(avctx, "ra_distance = %i\n", sconf->ra_distance);
273 ff_dlog(avctx, "ra_flag = %i\n", sconf->ra_flag);
274 ff_dlog(avctx, "adapt_order = %i\n", sconf->adapt_order);
275 ff_dlog(avctx, "coef_table = %i\n", sconf->coef_table);
276 ff_dlog(avctx, "long_term_prediction = %i\n", sconf->long_term_prediction);
277 ff_dlog(avctx, "max_order = %i\n", sconf->max_order);
278 ff_dlog(avctx, "block_switching = %i\n", sconf->block_switching);
279 ff_dlog(avctx, "bgmc = %i\n", sconf->bgmc);
280 ff_dlog(avctx, "sb_part = %i\n", sconf->sb_part);
281 ff_dlog(avctx, "joint_stereo = %i\n", sconf->joint_stereo);
282 ff_dlog(avctx, "mc_coding = %i\n", sconf->mc_coding);
283 ff_dlog(avctx, "chan_config = %i\n", sconf->chan_config);
284 ff_dlog(avctx, "chan_sort = %i\n", sconf->chan_sort);
285 ff_dlog(avctx, "RLSLMS = %i\n", sconf->rlslms);
286 ff_dlog(avctx, "chan_config_info = %i\n", sconf->chan_config_info);
299 ALSSpecificConfig *sconf = &ctx->sconf;
322 sconf->samples = get_bits_long(&gb, 32);
332 sconf->resolution = get_bits(&gb, 3);
333 sconf->floating = get_bits1(&gb);
334 sconf->msb_first = get_bits1(&gb);
335 sconf->frame_length = get_bits(&gb, 16) + 1;
336 sconf->ra_distance = get_bits(&gb, 8);
337 sconf->ra_flag = get_bits(&gb, 2);
338 sconf->adapt_order = get_bits1(&gb);
339 sconf->coef_table = get_bits(&gb, 2);
340 sconf->long_term_prediction = get_bits1(&gb);
341 sconf->max_order = get_bits(&gb, 10);
342 sconf->block_switching = get_bits(&gb, 2);
343 sconf->bgmc = get_bits1(&gb);
344 sconf->sb_part = get_bits1(&gb);
345 sconf->joint_stereo = get_bits1(&gb);
346 sconf->mc_coding = get_bits1(&gb);
347 sconf->chan_config = get_bits1(&gb);
348 sconf->chan_sort = get_bits1(&gb);
349 sconf->crc_enabled = get_bits1(&gb);
350 sconf->rlslms = get_bits1(&gb);
367 ctx->cur_frame_length = sconf->frame_length;
370 if (sconf->chan_config)
371 sconf->chan_config_info = get_bits(&gb, 16);
376 if (sconf->chan_sort && avctx->ch_layout.nb_channels > 1) {
382 if (!(sconf->chan_pos = av_malloc_array(avctx->ch_layout.nb_channels, sizeof(*sconf->chan_pos))))
388 sconf->chan_pos[i] = -1;
395 if (idx >= avctx->ch_layout.nb_channels || sconf->chan_pos[idx] != -1) {
400 sconf->chan_pos[idx] = i;
433 if (sconf->crc_enabled) {
458 ALSSpecificConfig *sconf = &ctx->sconf;
471 MISSING_ERR(sconf->rlslms, "Adaptive RLS-LMS prediction", AVERROR_PATCHWELCOME);
544 ALSSpecificConfig *sconf = &ctx->sconf;
549 if (sconf->block_switching) {
550 unsigned int bs_info_len = 1 << (sconf->block_switching + 2);
574 div_blocks[b] = ctx->sconf.frame_length >> div_blocks[b];
576 if (ctx->cur_frame_length != ctx->sconf.frame_length) {
596 ALSSpecificConfig *sconf = &ctx->sconf;
611 unsigned int const_val_bits = sconf->floating ? 24 : avctx->bits_per_raw_sample;
640 ALSSpecificConfig *sconf = &ctx->sconf;
663 if (!sconf->bgmc && !sconf->sb_part) {
666 if (sconf->bgmc && sconf->sb_part)
684 if (sconf->bgmc) {
685 s[0] = get_bits(gb, 8 + (sconf->resolution > 1));
694 s[0] = get_bits(gb, 4 + (sconf->resolution > 1));
710 if (!sconf->rlslms) {
711 if (sconf->adapt_order && sconf->max_order) {
713 2, sconf->max_order + 1));
715 if (*bd->opt_order > sconf->max_order) {
716 *bd->opt_order = sconf->max_order;
721 *bd->opt_order = sconf->max_order;
728 if (sconf->coef_table == 3) {
748 int rice_param = parcor_rice_table[sconf->coef_table][k][1];
749 int offset = parcor_rice_table[sconf->coef_table][k][0];
780 if (sconf->long_term_prediction) {
809 av_assert0(sb_length <= sconf->frame_length);
825 if (sconf->bgmc) {
915 ALSSpecificConfig *sconf = &ctx->sconf;
965 memcpy(bd->prev_raw_samples, raw_samples - sconf->max_order,
966 sizeof(*bd->prev_raw_samples) * sconf->max_order);
980 for (sb = -1; sb >= -sconf->max_order; sb--)
986 for (sb = -1; sb >= -sconf->max_order; sb--)
1013 memcpy(raw_samples - sconf->max_order, bd->prev_raw_samples,
1014 sizeof(*raw_samples) * sconf->max_order);
1026 ALSSpecificConfig *sconf = &ctx->sconf;
1040 if (!sconf->mc_coding || ctx->js_switch)
1148 ALSSpecificConfig *sconf = &ctx->sconf;
1216 memmove(ctx->raw_samples[c] - sconf->max_order,
1217 ctx->raw_samples[c] - sconf->max_order + sconf->frame_length,
1218 sizeof(*ctx->raw_samples[c]) * sconf->max_order);
1291 unsigned int channel_size = ctx->sconf.frame_length + ctx->sconf.max_order;
1641 ALSSpecificConfig *sconf = &ctx->sconf;
1652 if (sconf->ra_flag == RA_FLAG_FRAMES && ra_frame)
1655 if (sconf->mc_coding && sconf->joint_stereo) {
1660 if (!sconf->mc_coding || ctx->js_switch) {
1661 int independent_bs = !sconf->joint_stereo;
1672 if (sconf->joint_stereo && sconf->block_switching)
1695 memmove(ctx->raw_samples[c] - sconf->max_order,
1696 ctx->raw_samples[c] - sconf->max_order + sconf->frame_length,
1697 sizeof(*ctx->raw_samples[c]) * sconf->max_order);
1778 memmove(ctx->raw_samples[c] - sconf->max_order,
1779 ctx->raw_samples[c] - sconf->max_order + sconf->frame_length,
1780 sizeof(*ctx->raw_samples[c]) * sconf->max_order);
1783 if (sconf->floating) {
1802 ALSSpecificConfig *sconf = &ctx->sconf;
1813 // (sconf->ra_distance == 0) no frame is treated as a random access frame.
1816 ra_frame = sconf->ra_distance && !(ctx->frame_id % sconf->ra_distance);
1819 if (sconf->samples != 0xFFFFFFFF)
1820 ctx->cur_frame_length = FFMIN(sconf->samples - ctx->frame_id * (uint64_t) sconf->frame_length,
1821 sconf->frame_length);
1823 ctx->cur_frame_length = sconf->frame_length;
1858 *dest++ = raw_samples[sconf->chan_pos[c]*raw_step + sample] * (1U << shift);\
1869 if (sconf->crc_enabled && (avctx->err_recognition & (AV_EF_CRCCHECK|AV_EF_CAREFUL))) {
1870 int swap = HAVE_BIGENDIAN != sconf->msb_first;
1917 if (ctx->cur_frame_length != sconf->frame_length &&
1941 av_freep(&ctx->sconf.chan_pos);
1995 ALSSpecificConfig *sconf = &ctx->sconf;
2013 if (sconf->bgmc) {
2018 if (sconf->floating) {
2022 avctx->sample_fmt = sconf->resolution > 1
2024 avctx->bits_per_raw_sample = (sconf->resolution + 1) * 8;
2035 ctx->s_max = sconf->resolution > 1 ? 31 : 15;
2042 num_buffers = sconf->mc_coding ? channels : 1;
2048 ctx->quant_cof_buffer = av_malloc_array(num_buffers * sconf->max_order,
2050 ctx->lpc_cof_buffer = av_malloc_array(num_buffers * sconf->max_order,
2052 ctx->lpc_cof_reversed_buffer = av_malloc_array(sconf->max_order,
2064 ctx->quant_cof[c] = ctx->quant_cof_buffer + c * sconf->max_order;
2065 ctx->lpc_cof[c] = ctx->lpc_cof_buffer + c * sconf->max_order;
2090 if (sconf->mc_coding) {
2110 if (sconf->floating) {
2137 channel_size = sconf->frame_length + sconf->max_order;
2140 ctx->prev_raw_samples = av_malloc_array(sconf->max_order, sizeof(*ctx->prev_raw_samples));
2149 ctx->raw_samples[0] = ctx->raw_buffer + sconf->max_order;
2154 if (HAVE_BIGENDIAN != sconf->msb_first && sconf->crc_enabled &&