From e17ec6c7369200a1423d82df636655a80b7e8249 Mon Sep 17 00:00:00 2001 From: Martin Storsjo Date: Tue, 6 Sep 2016 11:17:01 +0300 Subject: [PATCH] armv8: Fix ime_calculate_sad3_prog_av8 Previously, this used x5 (which is a stride parameter) as destination pointer, and overwrote the destination in x6 with a counter, and looped to a label in another function. In practice, this function is never used, which is why this hasn't been noticed before. Change-Id: Iab87a2960c36b7dc4de4216b1d4bbbe4e9f03578 --- encoder/armv8/ime_distortion_metrics_av8.s | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/encoder/armv8/ime_distortion_metrics_av8.s b/encoder/armv8/ime_distortion_metrics_av8.s index d9e2b04..00d11c0 100644 --- a/encoder/armv8/ime_distortion_metrics_av8.s +++ b/encoder/armv8/ime_distortion_metrics_av8.s @@ -476,7 +476,7 @@ ime_calculate_sad3_prog_av8: push_v_regs sxtw x4, w4 sxtw x5, w5 - mov x6, #16 + mov x7, #16 movi v29.8h, #0 movi v30.8h, #0 movi v31.8h, #0 @@ -507,15 +507,15 @@ core_loop_ime_calculate_sad3_prog_av8: uabal v31.8h, v6.8b, v7.8b uabal2 v31.8h, v6.16b, v7.16b - subs x6, x6, #1 - bne core_loop_ime_calculate_sad2_prog_av8 + subs x7, x7, #1 + bne core_loop_ime_calculate_sad3_prog_av8 addp v30.8h, v30.8h, v31.8h uaddlp v30.4s, v30.8h addp v30.2s, v30.2s, v30.2s shl v30.2s, v30.2s, #1 - st1 {v30.2s}, [x5] + st1 {v30.2s}, [x6] pop_v_regs ret