diff options
author | Martin Vignali <martin.vignali@gmail.com> | 2018-01-14 14:23:05 +0100 |
---|---|---|
committer | Martin Vignali <martin.vignali@gmail.com> | 2018-01-28 20:23:11 +0100 |
commit | 8f9c38b19629838066def1207703cfcdc19fcbc9 (patch) | |
tree | 014bb7a09a155e2227e35c2a20ade7b566ec054a /libavcodec/lossless_videoencdsp.c | |
parent | 3a230ce5fa10b21312236b362df9eeddd99e7ac2 (diff) | |
download | ffmpeg-8f9c38b19629838066def1207703cfcdc19fcbc9.tar.gz |
avcodec/utvideoenc : add SIMD (avx) for sub_left_prediction
asm code by Henrik Gramner
Diffstat (limited to 'libavcodec/lossless_videoencdsp.c')
-rw-r--r-- | libavcodec/lossless_videoencdsp.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/libavcodec/lossless_videoencdsp.c b/libavcodec/lossless_videoencdsp.c index 5cc4934c0e..ed70329628 100644 --- a/libavcodec/lossless_videoencdsp.c +++ b/libavcodec/lossless_videoencdsp.c @@ -74,10 +74,25 @@ static void sub_median_pred_c(uint8_t *dst, const uint8_t *src1, *left_top = lt; } +static void sub_left_predict_c(uint8_t *dst, uint8_t *src, + ptrdiff_t stride, ptrdiff_t width, int height) +{ + int i, j; + uint8_t prev = 0x80; /* Set the initial value */ + for (j = 0; j < height; j++) { + for (i = 0; i < width; i++) { + *dst++ = src[i] - prev; + prev = src[i]; + } + src += stride; + } +} + av_cold void ff_llvidencdsp_init(LLVidEncDSPContext *c) { c->diff_bytes = diff_bytes_c; c->sub_median_pred = sub_median_pred_c; + c->sub_left_predict = sub_left_predict_c; if (ARCH_X86) ff_llvidencdsp_init_x86(c); |