aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorMartin Vignali <martin.vignali@gmail.com>2017-12-02 18:33:25 +0100
committerMartin Vignali <martin.vignali@gmail.com>2017-12-09 15:12:59 +0100
commitdc9a187c3d1bcc14b9f1e04632c5912b2fef313d (patch)
tree58cfff801d81163070008ac018643878a7147bad /libavcodec
parent001173b8ff8eae862822fdfb101ce3cc15372937 (diff)
downloadffmpeg-dc9a187c3d1bcc14b9f1e04632c5912b2fef313d.tar.gz
avcodec/huffyuvenc : sub_left_prediction_bgr32, call dsp after 32 first byte of the line in order to try to call the align version (diff bytes have avx2 version)
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/huffyuvenc.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libavcodec/huffyuvenc.c b/libavcodec/huffyuvenc.c
index 6e2e83bd3e..aa71d20fcc 100644
--- a/libavcodec/huffyuvenc.c
+++ b/libavcodec/huffyuvenc.c
@@ -90,8 +90,9 @@ static inline void sub_left_prediction_bgr32(HYuvContext *s, uint8_t *dst,
g = *green;
b = *blue;
a = *alpha;
+ int min_width = FFMIN(w, 8);
- for (i = 0; i < FFMIN(w, 4); i++) {
+ for (i = 0; i < min_width; i++) {
const int rt = src[i * 4 + R];
const int gt = src[i * 4 + G];
const int bt = src[i * 4 + B];
@@ -106,7 +107,7 @@ static inline void sub_left_prediction_bgr32(HYuvContext *s, uint8_t *dst,
a = at;
}
- s->llvidencdsp.diff_bytes(dst + 16, src + 16, src + 12, w * 4 - 16);
+ s->llvidencdsp.diff_bytes(dst + 32, src + 32, src + 32 - 4, w * 4 - 32);
*red = src[(w - 1) * 4 + R];
*green = src[(w - 1) * 4 + G];