avcodec/x86/h264_weight: handle weight1=128
authorMichael Niedermayer <michaelni@gmx.at>
Tue, 9 Jun 2015 03:11:09 +0000 (05:11 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Wed, 10 Jun 2015 00:13:12 +0000 (02:13 +0200)
Fix ticket4596

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit e1009665759d4a3938dd2dd07b7e84d8bc9c5290)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/x86/h264_weight.asm

index 4759a06..f6b9d5f 100644 (file)
@@ -135,8 +135,11 @@ WEIGHT_FUNC_HALF_MM 8, 8
     add  off_regd, 1
     or   off_regd, 1
     add        r4, 1
+    cmp        r6d, 128
+     je .nonnormal
     cmp        r5, 128
      jne .normal
+.nonnormal
     sar        r5, 1
     sar        r6, 1
     sar  off_regd, 1