Logo Search packages:      
Sourcecode: ffmpeg-debian version File versions

void ff_ref_idct ( short *  block  ) 

Transform 8x8 block of data with a double precision inverse DCT
This is a reference implementation.

Parameters:
block pointer to 8x8 block of data to transform

Definition at line 93 of file dctref.c.

{
    /* implement the equation: block = (coefficients') * block * coefficients */

    unsigned int i, j, k;
    double out[8 * 8];

    /* out = block * coefficients */
    for (i = 0; i < 64; i += 8) {
        for (j = 0; j < 8; ++j) {
            double tmp = 0;
            for (k = 0; k < 8; ++k) {
                tmp += block[i + k] * coefficients[k * 8 + j];
            }
            out[i + j] = tmp;
        }
    }

    /* block = (coefficients') * out */
    for (i = 0; i < 8; ++i) {
        for (j = 0; j < 8; ++j) {
            double tmp = 0;
            for (k = 0; k < 64; k += 8) {
                tmp += coefficients[k + i] * out[k + j];
            }
            block[i * 8 + j] = floor(tmp + 0.5);
        }
    }
}


Generated by  Doxygen 1.6.0   Back to index