diff options
author | Martin Vignali <martin.vignali@gmail.com> | 2017-10-01 21:37:15 +0200 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2017-10-01 17:35:30 -0300 |
commit | ac5908b13f16cbda396730c35f5f3125ca24577a (patch) | |
tree | 01f49a554ed8199b7aaa5d095c859796c6c10c18 /libavcodec/exrdsp.c | |
parent | 59924d5eb11646f82f70c206be8a867468f102b9 (diff) | |
download | ffmpeg-ac5908b13f16cbda396730c35f5f3125ca24577a.tar.gz |
libavcodec/exr : add x86 SIMD for predictor
Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavcodec/exrdsp.c')
-rw-r--r-- | libavcodec/exrdsp.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libavcodec/exrdsp.c b/libavcodec/exrdsp.c index 871b6f1276..42dbf1f54a 100644 --- a/libavcodec/exrdsp.c +++ b/libavcodec/exrdsp.c @@ -38,9 +38,18 @@ static void reorder_pixels_scalar(uint8_t *dst, const uint8_t *src, ptrdiff_t si } } +static void predictor_scalar(uint8_t *src, ptrdiff_t size) +{ + ptrdiff_t i; + + for (i = 1; i < size; i++) + src[i] += src[i-1] - 128; +} + av_cold void ff_exrdsp_init(ExrDSPContext *c) { c->reorder_pixels = reorder_pixels_scalar; + c->predictor = predictor_scalar; if (ARCH_X86) ff_exrdsp_init_x86(c); |