Revision 9c76bd48 libavcodec/dsputil.c

View differences:

libavcodec/dsputil.c
144 144
}
145 145

  
146 146

  
147
static int pix_norm_c(UINT8 * pix1, UINT8 * pix2, int line_size)
148
{
149
    int s, i, j;
150
    UINT32 *sq = squareTbl + 256;
151

  
152
    s = 0;
153
    for (i = 0; i < 16; i++) {
154
        for (j = 0; j < 16; j += 8) {
155
            s += sq[pix1[0] - pix2[0]];
156
            s += sq[pix1[1] - pix2[1]];
157
            s += sq[pix1[2] - pix2[2]];
158
            s += sq[pix1[3] - pix2[3]];
159
            s += sq[pix1[4] - pix2[4]];
160
            s += sq[pix1[5] - pix2[5]];
161
            s += sq[pix1[6] - pix2[6]];
162
            s += sq[pix1[7] - pix2[7]];
163
            pix1 += 8;
164
            pix2 += 8;
165
        }
166
        pix1 += line_size - 16;
167
        pix2 += line_size - 16;
168
    }
169
    return s;
170
}
171

  
147 172
static void get_pixels_c(DCTELEM *restrict block, const UINT8 *pixels, int line_size)
148 173
{
149 174
    int i;
......
1404 1429
    c->clear_blocks = clear_blocks_c;
1405 1430
    c->pix_sum = pix_sum_c;
1406 1431
    c->pix_norm1 = pix_norm1_c;
1432
    c->pix_norm = pix_norm_c;
1407 1433

  
1408 1434
    /* TODO [0] 16  [1] 8 */
1409 1435
    c->pix_abs16x16     = pix_abs16x16_c;

Also available in: Unified diff