aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/utvideoenc.c
diff options
context:
space:
mode:
authorMartin Vignali <martin.vignali@gmail.com>2018-01-14 14:23:05 +0100
committerMartin Vignali <martin.vignali@gmail.com>2018-01-28 20:23:11 +0100
commit8f9c38b19629838066def1207703cfcdc19fcbc9 (patch)
tree014bb7a09a155e2227e35c2a20ade7b566ec054a /libavcodec/utvideoenc.c
parent3a230ce5fa10b21312236b362df9eeddd99e7ac2 (diff)
downloadffmpeg-8f9c38b19629838066def1207703cfcdc19fcbc9.tar.gz
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.c20
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: