Lines Matching refs:res_setup
674 vorbis_residue *res_setup = &vc->residues[i];
678 res_setup->type = get_bits(gb, 16);
680 av_dlog(NULL, " %u. residue type %d\n", i, res_setup->type);
682 res_setup->begin = get_bits(gb, 24);
683 res_setup->end = get_bits(gb, 24);
684 res_setup->partition_size = get_bits(gb, 24) + 1;
686 if (res_setup->begin>res_setup->end ||
687 res_setup->end > (res_setup->type == 2 ? vc->avccontext->channels : 1) * vc->blocksize[1] / 2 ||
688 (res_setup->end-res_setup->begin) / res_setup->partition_size > V_MAX_PARTITIONS) {
691 res_setup->type, res_setup->begin, res_setup->end,
692 res_setup->partition_size, vc->blocksize[1] / 2);
696 res_setup->classifications = get_bits(gb, 6) + 1;
697 GET_VALIDATED_INDEX(res_setup->classbook, 8, vc->codebook_count)
699 res_setup->ptns_to_read =
700 (res_setup->end - res_setup->begin) / res_setup->partition_size;
701 res_setup->classifs = av_malloc(res_setup->ptns_to_read *
703 sizeof(*res_setup->classifs));
704 if (!res_setup->classifs)
708 res_setup->begin, res_setup->end, res_setup->partition_size,
709 res_setup->classifications, res_setup->classbook);
711 for (j = 0; j < res_setup->classifications; ++j) {
721 res_setup->maxpass = 0;
722 for (j = 0; j < res_setup->classifications; ++j) {
725 GET_VALIDATED_INDEX(res_setup->books[j][k], 8, vc->codebook_count)
728 j, k, res_setup->books[j][k]);
730 if (k>res_setup->maxpass)
731 res_setup->maxpass = k;
733 res_setup->books[j][k] = -1;