Revision b35a8469 libavcodec/vorbisdec.c

View differences:

libavcodec/vorbisdec.c
1138 1138
    uint_fast16_t floor1_Y[258];
1139 1139
    uint_fast16_t floor1_Y_final[258];
1140 1140
    int floor1_flag[258];
1141
    uint_fast8_t class;
1141
    uint_fast8_t partition_class;
1142 1142
    uint_fast8_t cdim;
1143 1143
    uint_fast8_t cbits;
1144 1144
    uint_fast8_t csub;
......
1162 1162

  
1163 1163
    offset = 2;
1164 1164
    for (i = 0; i < vf->partitions; ++i) {
1165
        class = vf->partition_class[i];
1166
        cdim   = vf->class_dimensions[class];
1167
        cbits  = vf->class_subclasses[class];
1165
        partition_class = vf->partition_class[i];
1166
        cdim   = vf->class_dimensions[partition_class];
1167
        cbits  = vf->class_subclasses[partition_class];
1168 1168
        csub = (1 << cbits) - 1;
1169 1169
        cval = 0;
1170 1170

  
1171 1171
        AV_DEBUG("Cbits %d \n", cbits);
1172 1172

  
1173 1173
        if (cbits) // this reads all subclasses for this partition's class
1174
            cval = get_vlc2(gb, vc->codebooks[vf->class_masterbook[class]].vlc.table,
1175
                            vc->codebooks[vf->class_masterbook[class]].nb_bits, 3);
1174
            cval = get_vlc2(gb, vc->codebooks[vf->class_masterbook[partition_class]].vlc.table,
1175
                            vc->codebooks[vf->class_masterbook[partition_class]].nb_bits, 3);
1176 1176

  
1177 1177
        for (j = 0; j < cdim; ++j) {
1178
            book = vf->subclass_books[class][cval & csub];
1178
            book = vf->subclass_books[partition_class][cval & csub];
1179 1179

  
1180 1180
            AV_DEBUG("book %d Cbits %d cval %d  bits:%d \n", book, cbits, cval, get_bits_count(gb));
1181 1181

  

Also available in: Unified diff