📄 mpeglayer2.cc
字号:
c[LS][i] = ctableB2[j]; d[LS][i] = dtableB2[j]; } else if (i <= 22) { codelength[LS][i] = codelengthtableB3[j]; factor[LS][i] = factortableB3[j]; c[LS][i] = ctableB3[j]; d[LS][i] = dtableB3[j]; } else { codelength[LS][i] = codelengthtableB4[j]; factor[LS][i] = factortableB4[j]; c[LS][i] = ctableB4[j]; d[LS][i] = dtableB4[j]; } } } else { /* tableindex == 2 */ if (i <= 3) { group[LS][i] = grouptableB234[j]; codelength[LS][i] = codelengthtableIIa[j]; factor[LS][i] = factortableIIa[j]; c[LS][i] = ctableIIa[j]; d[LS][i] = dtableIIa[j]; } else { group[LS][i] = grouptableA[j]; codelength[LS][i] = codelengthtableIIb[j]; factor[LS][i] = factortableIIb[j]; c[LS][i] = ctableIIb[j]; d[LS][i] = dtableIIb[j]; } } switch (scaleselector[LS][i]) { case 0: scalefactor[LS][0][i] = scalefactorstable[getbits(6)]; scalefactor[LS][1][i] = scalefactorstable[getbits(6)]; scalefactor[LS][2][i] = scalefactorstable[getbits(6)]; break; case 1: scalefactor[LS][0][i] = scalefactor[LS][1][i] = scalefactorstable[getbits(6)]; scalefactor[LS][2][i] = scalefactorstable[getbits(6)]; break; case 2: scalefactor[LS][0][i] = scalefactor[LS][1][i] = scalefactor[LS][2][i] = scalefactorstable[getbits(6)]; break; case 3: scalefactor[LS][0][i] = scalefactorstable[getbits(6)]; scalefactor[LS][1][i] = scalefactor[LS][2][i] = scalefactorstable[getbits(6)]; break; } } if (inputstereo && (j = bitalloc[RS][i])) { if (tableindex == 0) { group[RS][i] = grouptableA[j]; codelength[RS][i] = codelengthtableA[j]; factor[RS][i] = factortableA[j]; c[RS][i] = ctableA[j]; d[RS][i] = dtableA[j]; } else if (tableindex == 1) { if (i <= 2) { group[RS][i] = grouptableB1[j]; codelength[RS][i] = codelengthtableB1[j]; factor[RS][i] = factortableB1[j]; c[RS][i] = ctableB1[j]; d[RS][i] = dtableB1[j]; } else { group[RS][i] = grouptableB234[j]; if (i <= 10) { codelength[RS][i] = codelengthtableB2[j]; factor[RS][i] = factortableB2[j]; c[RS][i] = ctableB2[j]; d[RS][i] = dtableB2[j]; } else if (i <= 22) { codelength[RS][i] = codelengthtableB3[j]; factor[RS][i] = factortableB3[j]; c[RS][i] = ctableB3[j]; d[RS][i] = dtableB3[j]; } else { codelength[RS][i] = codelengthtableB4[j]; factor[RS][i] = factortableB4[j]; c[RS][i] = ctableB4[j]; d[RS][i] = dtableB4[j]; } } } else { if (i <= 3) { group[RS][i] = grouptableB234[j]; codelength[RS][i] = codelengthtableIIa[j]; factor[RS][i] = factortableIIa[j]; c[RS][i] = ctableIIa[j]; d[RS][i] = dtableIIa[j]; } else { group[RS][i] = grouptableA[j]; codelength[RS][i] = codelengthtableIIb[j]; factor[RS][i] = factortableIIb[j]; c[RS][i] = ctableIIb[j]; d[RS][i] = dtableIIb[j]; } } switch (scaleselector[RS][i]) { case 0: scalefactor[RS][0][i] = scalefactorstable[getbits(6)]; scalefactor[RS][1][i] = scalefactorstable[getbits(6)]; scalefactor[RS][2][i] = scalefactorstable[getbits(6)]; break; case 1: scalefactor[RS][0][i] = scalefactor[RS][1][i] = scalefactorstable[getbits(6)]; scalefactor[RS][2][i] = scalefactorstable[getbits(6)]; break; case 2: scalefactor[RS][0][i] = scalefactor[RS][1][i] = scalefactor[RS][2][i] = scalefactorstable[getbits(6)]; break; case 3: scalefactor[RS][0][i] = scalefactorstable[getbits(6)]; scalefactor[RS][1][i] = scalefactor[RS][2][i] = scalefactorstable[getbits(6)]; break; } } } }// Read Sample { register int i; for (int l = 0; l < SCALEBLOCK; l++) { // Read Sample for (i = 0; i < s; i++) { if (bitalloc[LS][i]) { if (group[LS][i]) { register const REAL *s; int code = getbits(codelength[LS][i]); code += code << 1; s = group[LS][i] + code; fraction[LS][0][i] = s[0]; fraction[LS][1][i] = s[1]; fraction[LS][2][i] = s[2]; } else { fraction[LS][0][i] = getbits(codelength[LS][i]) * factor[LS][i] - 1.0; fraction[LS][1][i] = getbits(codelength[LS][i]) * factor[LS][i] - 1.0; fraction[LS][2][i] = getbits(codelength[LS][i]) * factor[LS][i] - 1.0; } } else fraction[LS][0][i] = fraction[LS][1][i] = fraction[LS][2][i] = 0.0; if (inputstereo && bitalloc[RS][i]) { if (group[RS][i]) { const REAL *s; int code = getbits(codelength[RS][i]); code += code << 1; s = group[RS][i] + code; fraction[RS][0][i] = s[0]; fraction[RS][1][i] = s[1]; fraction[RS][2][i] = s[2]; } else { fraction[RS][0][i] = getbits(codelength[RS][i]) * factor[RS][i] - 1.0; fraction[RS][1][i] = getbits(codelength[RS][i]) * factor[RS][i] - 1.0; fraction[RS][2][i] = getbits(codelength[RS][i]) * factor[RS][i] - 1.0; } } else fraction[RS][0][i] = fraction[RS][1][i] = fraction[RS][2][i] = 0.0; } for (; i < n; i++) { if (bitalloc[LS][i]) { if (group[LS][i]) { register const REAL *s; int code = getbits(codelength[LS][i]); code += code << 1; s = group[LS][i] + code; fraction[LS][0][i] = fraction[RS][0][i] = s[0]; fraction[LS][1][i] = fraction[RS][1][i] = s[1]; fraction[LS][2][i] = fraction[RS][2][i] = s[2]; } else { fraction[LS][0][i] = fraction[RS][0][i] = getbits(codelength[LS][i]) * factor[LS][i] - 1.0; fraction[LS][1][i] = fraction[RS][1][i] = getbits(codelength[LS][i]) * factor[LS][i] - 1.0; fraction[LS][2][i] = fraction[RS][2][i] = getbits(codelength[LS][i]) * factor[LS][i] - 1.0; } } else fraction[LS][0][i] = fraction[LS][1][i] = fraction[LS][2][i] = fraction[RS][0][i] = fraction[RS][1][i] = fraction[RS][2][i] = 0.0; } //Fraction if (outputstereo) for (i = 0; i < n; i++) { if (bitalloc[LS][i]) { if (!group[LS][i]) { fraction[LS][0][i] = (fraction[LS][0][i] + d[LS][i]) * c[LS][i]; fraction[LS][1][i] = (fraction[LS][1][i] + d[LS][i]) * c[LS][i]; fraction[LS][2][i] = (fraction[LS][2][i] + d[LS][i]) * c[LS][i]; } REAL t = scalefactor[LS][l >> 2][i]; fraction[LS][0][i] *= t; fraction[LS][1][i] *= t; fraction[LS][2][i] *= t; } if (bitalloc[RS][i]) { if (!group[RS][i]) { fraction[RS][0][i] = (fraction[RS][0][i] + d[RS][i]) * c[LS][i]; fraction[RS][1][i] = (fraction[RS][1][i] + d[RS][i]) * c[LS][i]; fraction[RS][2][i] = (fraction[RS][2][i] + d[RS][i]) * c[LS][i]; } REAL t = scalefactor[RS][l >> 2][i]; fraction[RS][0][i] *= t; fraction[RS][1][i] *= t; fraction[RS][2][i] *= t; } } else for (i = 0; i < n; i++) if (bitalloc[LS][i]) { if (!group[LS][i]) { fraction[LS][0][i] = (fraction[LS][0][i] + d[LS][i]) * c[LS][i]; fraction[LS][1][i] = (fraction[LS][1][i] + d[LS][i]) * c[LS][i]; fraction[LS][2][i] = (fraction[LS][2][i] + d[LS][i]) * c[LS][i]; } REAL t = scalefactor[LS][l >> 2][i]; fraction[LS][0][i] *= t; fraction[LS][1][i] *= t; fraction[LS][2][i] *= t; } for (; i < MAXSUBBAND; i++) fraction[LS][0][i] = fraction[LS][1][i] = fraction[LS][2][i] = fraction[RS][0][i] = fraction[RS][1][i] = fraction[RS][2][i] = 0.0; for (i = 0; i < 3; i++) subbandsynthesis(fraction[LS][i], fraction[RS][i]); } }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -