Author: andoma Date: Tue Mar 25 16:33:44 2008 New Revision: 2036 Log: Correctly decode intensity stereo when in short window mode. Modified: aac/aac.c Modified: aac/aac.c ============================================================================== --- aac/aac.c (original) +++ aac/aac.c Tue Mar 25 16:33:44 2008 @@ -1489,8 +1489,8 @@ static void ms_tool(AACContext * ac, cpe static void intensity_tool(AACContext * ac, cpe_struct * cpe) { const ics_struct * ics = &cpe->ch[1].ics; - sce_struct * sce0 = &cpe->ch[0]; sce_struct * sce1 = &cpe->ch[1]; + float *coef0 = cpe->ch[0].coeffs, *coef1 = cpe->ch[1].coeffs; if (ics->intensity_present) { const uint16_t * offsets = ics->swb_offset; int g, gp, i, k; @@ -1504,11 +1504,13 @@ static void intensity_tool(AACContext * if (cpe->ms.present) c *= 1 - 2 * cpe->ms.mask[g][i]; scale = c * sce1->sf[g][i]; - for (k = offsets[i] + gp*128; k < offsets[i+1] + gp*128; k++) { - sce1->coeffs[k] = scale * sce0->coeffs[k]; + for (k = offsets[i]; k < offsets[i+1]; k++) { + coef1[k] = scale * coef0[k]; } } } + coef0 += 128; + coef1 += 128; } } }
andoma wrote:
Author: andoma Date: Tue Mar 25 16:33:44 2008 New Revision: 2036
Log: Correctly decode intensity stereo when in short window mode.
This (and the previous commit) squashes the last bug i've seen with the reference streams: Output from tiny_psnr: al00_48.mp4: stddev: 0.70 PSNR:99.34 bytes:716800 al01_48.mp4: stddev: 0.69 PSNR:99.43 bytes:786432 al02_48.mp4: stddev: 0.69 PSNR:99.42 bytes:786432 al03_48.mp4: stddev: 0.69 PSNR:99.43 bytes:786432 al04_48.mp4: stddev: 0.69 PSNR:99.44 bytes:786432 al05_48.mp4: stddev: 0.70 PSNR:99.36 bytes:1417216 There are other reference streams available, but some of their wav counterpart does not match the number of channels (?), others utilize noise substitution so it won't be of any interest to to any PSNR measurements. Thus, I'm quite satisfied with this.
participants (3)
-
andoma -
Andreas Öman -
Diego Biurrun