diff options
author | Ronald S. Bultje <rsbultje@gmail.com> | 2013-01-21 11:02:33 -0800 |
---|---|---|
committer | Ronald S. Bultje <rsbultje@gmail.com> | 2013-01-21 18:08:55 -0800 |
commit | 4a73fbd9c5d5ba6b32a116b296a8cb199f8940ed (patch) | |
tree | 52037eaebd840fedbad4a6e3e959d4d0b6fc2551 /libavcodec/vp3dsp.c | |
parent | 4f56e773fe8a554b8c2662650aaf799c2ece2721 (diff) | |
download | ffmpeg-4a73fbd9c5d5ba6b32a116b296a8cb199f8940ed.tar.gz |
vp3/5: move put_no_rnd_pixels_l2 from dsputil to VP3DSPContext.
The function is only used in VP3 and VP5, so no need to have it in
DSPContext.
Diffstat (limited to 'libavcodec/vp3dsp.c')
-rw-r--r-- | libavcodec/vp3dsp.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/libavcodec/vp3dsp.c b/libavcodec/vp3dsp.c index 9e6209dfdd..1883099002 100644 --- a/libavcodec/vp3dsp.c +++ b/libavcodec/vp3dsp.c @@ -274,8 +274,27 @@ static void vp3_h_loop_filter_c(uint8_t *first_pixel, int stride, } } +static void put_no_rnd_pixels_l2(uint8_t *dst, const uint8_t *src1, + const uint8_t *src2, ptrdiff_t stride, int h) +{ + int i; + + for (i = 0; i < h; i++) { + uint32_t a, b; + + a = AV_RN32A(&src1[i * stride]); + b = AV_RN32A(&src2[i * stride]); + AV_WN32A(&dst[i * stride], no_rnd_avg32(a, b)); + a = AV_RN32A(&src1[i * stride + 4]); + b = AV_RN32A(&src2[i * stride + 4]); + AV_WN32A(&dst[i * stride + 4], no_rnd_avg32(a, b)); + } +} + av_cold void ff_vp3dsp_init(VP3DSPContext *c, int flags) { + c->put_no_rnd_pixels_l2 = put_no_rnd_pixels_l2; + c->idct_put = vp3_idct_put_c; c->idct_add = vp3_idct_add_c; c->idct_dc_add = vp3_idct_dc_add_c; |