Revision 3ae079a3 libavcodec/vp8dsp.c

View differences:

libavcodec/vp8dsp.c
109 109
    }
110 110
}
111 111

  
112
static void vp8_idct_dc_add4_c(uint8_t *dst, DCTELEM block[4][16], int stride)
112
static void vp8_idct_dc_add4uv_c(uint8_t *dst, DCTELEM block[4][16], int stride)
113 113
{
114
    int i, j;
115
    for (j = 0; j < 4; j++) {
116
        uint8_t *pix = dst+j*4;
117
        int dc = (block[j][0] + 4) >> 3;
118
        uint8_t *cm = ff_cropTbl + MAX_NEG_CROP + dc;
119
        block[j][0] = 0;
120
        if (!dc)
121
            continue;
122
        for (i = 0; i < 4; i++) {
123
            pix[0] = cm[pix[0]];
124
            pix[1] = cm[pix[1]];
125
            pix[2] = cm[pix[2]];
126
            pix[3] = cm[pix[3]];
127
            pix += stride;
128
        }
129
    }
114
    vp8_idct_dc_add_c(dst+stride*0+0, block[0], stride);
115
    vp8_idct_dc_add_c(dst+stride*0+4, block[1], stride);
116
    vp8_idct_dc_add_c(dst+stride*4+0, block[2], stride);
117
    vp8_idct_dc_add_c(dst+stride*4+4, block[3], stride);
118
}
119

  
120
static void vp8_idct_dc_add4y_c(uint8_t *dst, DCTELEM block[4][16], int stride)
121
{
122
    vp8_idct_dc_add_c(dst+ 0, block[0], stride);
123
    vp8_idct_dc_add_c(dst+ 4, block[1], stride);
124
    vp8_idct_dc_add_c(dst+ 8, block[2], stride);
125
    vp8_idct_dc_add_c(dst+12, block[3], stride);
130 126
}
131 127

  
132 128
// because I like only having two parameters to pass functions...
......
479 475

  
480 476
av_cold void ff_vp8dsp_init(VP8DSPContext *dsp)
481 477
{
482
    dsp->vp8_luma_dc_wht  = vp8_luma_dc_wht_c;
483
    dsp->vp8_idct_add     = vp8_idct_add_c;
484
    dsp->vp8_idct_dc_add  = vp8_idct_dc_add_c;
485
    dsp->vp8_idct_dc_add4 = vp8_idct_dc_add4_c;
478
    dsp->vp8_luma_dc_wht    = vp8_luma_dc_wht_c;
479
    dsp->vp8_idct_add       = vp8_idct_add_c;
480
    dsp->vp8_idct_dc_add    = vp8_idct_dc_add_c;
481
    dsp->vp8_idct_dc_add4y  = vp8_idct_dc_add4y_c;
482
    dsp->vp8_idct_dc_add4uv = vp8_idct_dc_add4uv_c;
486 483

  
487 484
    dsp->vp8_v_loop_filter16y = vp8_v_loop_filter16_c;
488 485
    dsp->vp8_h_loop_filter16y = vp8_h_loop_filter16_c;

Also available in: Unified diff