diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-01-22 14:54:06 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-01-22 15:33:23 +0100 |
commit | 26345acb0e723d28aa28e09126ea383b2f679f5b (patch) | |
tree | f8d7a9f62d7557aca5ad56dd244fa415fdab56f2 /libavcodec/vp3dsp.c | |
parent | 9774251c45eadfe0ba7b0381344451fa8840cc0d (diff) | |
parent | 0881cbf314982cce8448bd12644ce2a6e0b8c576 (diff) | |
download | ffmpeg-26345acb0e723d28aa28e09126ea383b2f679f5b.tar.gz |
Merge remote-tracking branch 'qatar/master'
* qatar/master:
proresdec: support mixed interlaced/non-interlaced content
vp3/5: move put_no_rnd_pixels_l2 from dsputil to VP3DSPContext.
Merged-by: Michael Niedermayer <michaelni@gmx.at>
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 6502a158e6..6db80c8d00 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; |