diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-01-20 22:21:24 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-01-20 22:21:24 +0100 |
commit | 883570e6b70ae4d1413d2d2f552687d80b32e1e5 (patch) | |
tree | 4f9afd8807f21df02164cb0802ee4822352987f4 /libavcodec/lossless_videodsp.c | |
parent | f9c7b14c040fe1c5f9253d7abd474f8b2282903c (diff) | |
download | ffmpeg-883570e6b70ae4d1413d2d2f552687d80b32e1e5.tar.gz |
Move add_hfyu_left_prediction_int16 to losslessviddsp
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/lossless_videodsp.c')
-rw-r--r-- | libavcodec/lossless_videodsp.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/libavcodec/lossless_videodsp.c b/libavcodec/lossless_videodsp.c index 7654f3ef67..e494072ae3 100644 --- a/libavcodec/lossless_videodsp.c +++ b/libavcodec/lossless_videodsp.c @@ -59,10 +59,31 @@ static void diff_int16_c(uint16_t *dst, const uint16_t *src1, const uint16_t *sr dst[i] = (src1[i] - src2[i]) & mask; } +static int add_hfyu_left_prediction_int16_c(uint16_t *dst, const uint16_t *src, unsigned mask, int w, int acc){ + int i; + + for(i=0; i<w-1; i++){ + acc+= src[i]; + dst[i]= acc & mask; + i++; + acc+= src[i]; + dst[i]= acc & mask; + } + + for(; i<w; i++){ + acc+= src[i]; + dst[i]= acc & mask; + } + + return acc; +} + + void ff_llviddsp_init(LLVidDSPContext *c) { c->add_int16 = add_int16_c; c->diff_int16= diff_int16_c; + c->add_hfyu_left_prediction_int16 = add_hfyu_left_prediction_int16_c; if (ARCH_X86) ff_llviddsp_init_x86(c); |