idct.js
/**
 * Initialized cache of precomputed values for IDCT 
 */
Initialized cache of precomputed values for IDCT
Initialized cache of precomputed values for IDCT
function initIDCTCache() {
    idctCache = [
        [], [], [], [], [], [], [], [],
    ];
    for (let j = 0; j < DATA_UNIT_SIZE; j++) {
        for (let i = 0; i < DATA_UNIT_SIZE; i++) {
            idctCache[i][j] = Math.cos((((2*i)+1) * j * Math.PI) / 16);
        }
    }
}
function initIDCTCache ( ) { idctCache = [ [ ] , [ ] , [ ] , [ ] , [ ] , [ ] , [ ] , [ ] , ] ; for ( let j = 0 ; j < DATA_UNIT_SIZE ; j ++ ) { for ( let i = 0 ; i < DATA_UNIT_SIZE ; i ++ ) { idctCache [ i ] [ j ] = Math . cos ( ( ( ( 2 * i ) + 1 ) * j * Math . PI ) / 16 ) ; } } }
Initialized cache of precomputed values for IDCT
Initialized cache of precomputed values for IDCT