Revision d6f8476b

View differences:

libavcodec/dsputil.c
2657 2657
}
2658 2658
#endif /* CONFIG_RV40_DECODER */
2659 2659

  
2660
#if CONFIG_VP8_DECODER
2661
void ff_put_vp8_pixels16_c(uint8_t *dst, uint8_t *src, int stride, int h, int x, int y) {
2662
    put_pixels16_c(dst, src, stride, h);
2663
}
2664
void ff_put_vp8_pixels8_c(uint8_t *dst, uint8_t *src, int stride, int h, int x, int y) {
2665
    put_pixels8_c(dst, src, stride, h);
2666
}
2667
void ff_put_vp8_pixels4_c(uint8_t *dst, uint8_t *src, int stride, int h, int x, int y) {
2668
    put_pixels4_c(dst, src, stride, h);
2669
}
2670
#endif
2671

  
2672 2660
static void wmv2_mspel8_v_lowpass(uint8_t *dst, uint8_t *src, int dstStride, int srcStride, int w){
2673 2661
    uint8_t *cm = ff_cropTbl + MAX_NEG_CROP;
2674 2662
    int i;
libavcodec/vp8.c
912 912
                          uint8_t *dst, uint8_t *src, const VP56mv *mv,
913 913
                          int x_off, int y_off, int block_w, int block_h,
914 914
                          int width, int height, int linesize,
915
                          h264_chroma_mc_func mc_func[3][3])
915
                          vp8_mc_func mc_func[3][3])
916 916
{
917 917
    static const uint8_t idx[8] = { 0, 1, 2, 1, 2, 1, 2, 1 };
918 918
    int mx = (mv->x << luma)&7, mx_idx = idx[mx];
......
931 931
        src = s->edge_emu_buffer + 2 + linesize * 2;
932 932
    }
933 933

  
934
    mc_func[my_idx][mx_idx](dst, src, linesize, block_h, mx, my);
934
    mc_func[my_idx][mx_idx](dst, linesize, src, linesize, block_h, mx, my);
935 935
}
936 936

  
937 937
/**
libavcodec/vp8dsp.c
250 250
    { 0,   1,  12, 123,   6,   0 },
251 251
};
252 252

  
253
#define PUT_PIXELS(WIDTH) \
254
static void put_vp8_pixels ## WIDTH ##_c(uint8_t *dst, int dststride, uint8_t *src, int srcstride, int h, int x, int y) { \
255
    for (int y = 0; y < h; y++, dst+= dststride, src+= srcstride) { \
256
        memcpy(dst, src, WIDTH); \
257
    } \
258
}
259

  
260
PUT_PIXELS(16)
261
PUT_PIXELS(8)
262
PUT_PIXELS(4)
253 263

  
254 264
#define FILTER_6TAP(src, F, stride) \
255 265
    av_clip_uint8((F[2]*src[x+0*stride] - F[1]*src[x-1*stride] + F[0]*src[x-2*stride] + \
......
260 270
                   F[3]*src[x+1*stride] - F[4]*src[x+2*stride] + 64) >> 7)
261 271

  
262 272
#define VP8_EPEL_H(SIZE, FILTER, FILTERNAME) \
263
static void put_vp8_epel ## SIZE ## _ ## FILTERNAME ## _c(uint8_t *dst, uint8_t *src, int stride, int h, int mx, int my) \
273
static void put_vp8_epel ## SIZE ## _ ## FILTERNAME ## _c(uint8_t *dst, int dststride, uint8_t *src, int srcstride, int h, int mx, int my) \
264 274
{ \
265 275
    const uint8_t *filter = subpel_filters[mx-1]; \
266 276
    int x, y; \
......
268 278
    for (y = 0; y < h; y++) { \
269 279
        for (x = 0; x < SIZE; x++) \
270 280
            dst[x] = FILTER(src, filter, 1); \
271
        dst += stride; \
272
        src += stride; \
281
        dst += dststride; \
282
        src += srcstride; \
273 283
    } \
274 284
}
275 285
#define VP8_EPEL_V(SIZE, FILTER, FILTERNAME) \
276
static void put_vp8_epel ## SIZE ## _ ## FILTERNAME ## _c(uint8_t *dst, uint8_t *src, int stride, int h, int mx, int my) \
286
static void put_vp8_epel ## SIZE ## _ ## FILTERNAME ## _c(uint8_t *dst, int dststride, uint8_t *src, int srcstride, int h, int mx, int my) \
277 287
{ \
278 288
    const uint8_t *filter = subpel_filters[my-1]; \
279 289
    int x, y; \
280 290
\
281 291
    for (y = 0; y < h; y++) { \
282 292
        for (x = 0; x < SIZE; x++) \
283
            dst[x] = FILTER(src, filter, stride); \
284
        dst += stride; \
285
        src += stride; \
293
            dst[x] = FILTER(src, filter, srcstride); \
294
        dst += dststride; \
295
        src += srcstride; \
286 296
    } \
287 297
}
288 298
#define VP8_EPEL_HV(SIZE, FILTERX, FILTERY, FILTERNAME) \
289
static void put_vp8_epel ## SIZE ## _ ## FILTERNAME ## _c(uint8_t *dst, uint8_t *src, int stride, int h, int mx, int my) \
299
static void put_vp8_epel ## SIZE ## _ ## FILTERNAME ## _c(uint8_t *dst, int dststride, uint8_t *src, int srcstride, int h, int mx, int my) \
290 300
{ \
291 301
    const uint8_t *filter = subpel_filters[mx-1]; \
292 302
    int x, y; \
293 303
    uint8_t tmp_array[(2*SIZE+5)*SIZE]; \
294 304
    uint8_t *tmp = tmp_array; \
295
    src -= 2*stride; \
305
    src -= 2*srcstride; \
296 306
\
297 307
    for (y = 0; y < h+5; y++) { \
298 308
        for (x = 0; x < SIZE; x++) \
299 309
            tmp[x] = FILTERX(src, filter, 1); \
300 310
        tmp += SIZE; \
301
        src += stride; \
311
        src += srcstride; \
302 312
    } \
303 313
\
304 314
    tmp = tmp_array + 2*SIZE; \
......
307 317
    for (y = 0; y < h; y++) { \
308 318
        for (x = 0; x < SIZE; x++) \
309 319
            dst[x] = FILTERY(tmp, filter, SIZE); \
310
        dst += stride; \
320
        dst += dststride; \
311 321
        tmp += SIZE; \
312 322
    } \
313 323
}
......
338 348
VP8_EPEL_HV(4,  FILTER_6TAP, FILTER_6TAP, h6v6)
339 349

  
340 350
#define VP8_MC_FUNC(IDX, SIZE) \
341
    dsp->put_vp8_epel_pixels_tab[IDX][0][0] = ff_put_vp8_pixels ## SIZE ## _c; \
351
    dsp->put_vp8_epel_pixels_tab[IDX][0][0] = put_vp8_pixels ## SIZE ## _c; \
342 352
    dsp->put_vp8_epel_pixels_tab[IDX][0][1] = put_vp8_epel ## SIZE ## _h4_c; \
343 353
    dsp->put_vp8_epel_pixels_tab[IDX][0][2] = put_vp8_epel ## SIZE ## _h6_c; \
344 354
    dsp->put_vp8_epel_pixels_tab[IDX][1][0] = put_vp8_epel ## SIZE ## _v4_c; \
libavcodec/vp8dsp.h
27 27

  
28 28
#include "dsputil.h"
29 29

  
30
typedef void (*vp8_mc_func)(uint8_t *dst/*align 8*/, int dstStride, uint8_t *src/*align 1*/, int srcStride, int h, int x, int y);
31

  
30 32
typedef struct VP8DSPContext {
31 33
    void (*vp8_luma_dc_wht)(DCTELEM block[4][4][16], DCTELEM dc[16]);
32 34
    void (*vp8_idct_add)(uint8_t *dst, DCTELEM block[16], int stride);
......
55 57
     * third dimension: same as second dimention, for horizontal interpolation
56 58
     * so something like put_vp8_epel_pixels_tab[width>>3][2*!!my-(my&1)][2*!!mx-(mx&1)](..., mx, my)
57 59
     */
58
    h264_chroma_mc_func put_vp8_epel_pixels_tab[3][3][3];
60
    vp8_mc_func put_vp8_epel_pixels_tab[3][3][3];
59 61
} VP8DSPContext;
60 62

  
61 63
void ff_put_vp8_pixels16_c(uint8_t *dst, uint8_t *src, int stride, int h, int x, int y);

Also available in: Unified diff