diff options
author | Martin Vignali <martin.vignali@gmail.com> | 2018-01-14 16:23:05 +0300 |
---|---|---|
committer | Martin Vignali <martin.vignali@gmail.com> | 2018-01-28 22:23:11 +0300 |
commit | 8f9c38b19629838066def1207703cfcdc19fcbc9 (patch) | |
tree | 014bb7a09a155e2227e35c2a20ade7b566ec054a /libavcodec/utvideoenc.c | |
parent | 3a230ce5fa10b21312236b362df9eeddd99e7ac2 (diff) |
avcodec/utvideoenc : add SIMD (avx) for sub_left_prediction
asm code by Henrik Gramner
Diffstat (limited to 'libavcodec/utvideoenc.c')
-rw-r--r-- | libavcodec/utvideoenc.c | 20 |
1 files changed, 1 insertions, 19 deletions
diff --git a/libavcodec/utvideoenc.c b/libavcodec/utvideoenc.c index a829b7aaac..db00e1eff5 100644 --- a/libavcodec/utvideoenc.c +++ b/libavcodec/utvideoenc.c @@ -283,23 +283,6 @@ static void mangle_rgb_planes(uint8_t *dst[4], ptrdiff_t dst_stride, } } -/* Write data to a plane with left prediction */ -static void left_predict(uint8_t *src, uint8_t *dst, ptrdiff_t stride, - int width, int height) -{ - int i, j; - uint8_t prev; - - 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; - } -} - #undef A #undef B @@ -436,8 +419,7 @@ static int encode_plane(AVCodecContext *avctx, uint8_t *src, for (i = 0; i < c->slices; i++) { sstart = send; send = height * (i + 1) / c->slices & cmask; - left_predict(src + sstart * stride, dst + sstart * width, - stride, width, send - sstart); + c->llvidencdsp.sub_left_predict(dst + sstart * width, src + sstart * stride, stride, width, send - sstart); } break; case PRED_MEDIAN: |