public int getWithI32Buffer(int bnum, bool get_then_del_in_buf = true) { var value = _getWithI32Buffer(bnum, get_then_del_in_buf); #if DEBUG_BIT_READER Console.WriteLine("MaiBitReader.getWithI32Buffer({0}) : {1}", bnum, value); #endif return value; }
//used in decodeTable2 0:2 1:2 static int MAPCDSF_decodeTable2_Route2(MaiBitReader mbr0, MaiAT3PlusCoreDecoderChnInfo chn_info) { int rs = 0; uint read_counter = chn_info.joint_chn_info.num_band_splited_used; if (mbr0.getWithI32Buffer(1) != 0) { read_counter = (uint)mbr0.getWithI32Buffer(5); } MaiAT3PlusCoreDecoderSearchTableDes huff_table_now0; MaiAT3PlusCoreDecoderSearchTableDes huff_table_now1; if (0 == chn_info.joint_chn_info.var90) { huff_table_now0 = MaiAT3PlusCoreDecoder_StaticData.MAPCDSD_huff_table2[0]; huff_table_now1 = MaiAT3PlusCoreDecoder_StaticData.MAPCDSD_huff_table2[0]; } else { huff_table_now0 = MaiAT3PlusCoreDecoder_StaticData.MAPCDSD_huff_table2[1]; huff_table_now1 = MaiAT3PlusCoreDecoder_StaticData.MAPCDSD_huff_table2[2]; } uint ptmp = 0; while (read_counter != 0) { if (chn_info.check_table0[0] == 1) { chn_info.table2[0] = MAPCDSF_getHuffValue(huff_table_now0, mbr0); ptmp = chn_info.table2[0]; } else if (chn_info.check_table0[0] == 0) chn_info.table2[0] = 0; else if (chn_info.check_table0[0] == 2) chn_info.table2[0] = (uint)mbr0.getWithI32Buffer(1); else { rs = -14; break; } for (uint a0 = 1; a0 < read_counter; a0++) { if (chn_info.check_table0[a0] == 1) { chn_info.table2[a0] = MAPCDSF_getHuffValue(huff_table_now1, mbr0); chn_info.table2[a0] += ptmp; chn_info.table2[a0] &= huff_table_now1.mask; ptmp = chn_info.table2[a0]; } else if (chn_info.check_table0[a0] == 0) chn_info.table2[a0] = 0; else if (chn_info.check_table0[a0] == 2) chn_info.table2[a0] = (uint)mbr0.getWithI32Buffer(1); else { rs = -15; break; } } break; } return rs; }