diff mbox

[FFmpeg-devel] x86/h264_weight: use appropriate register size for weight parameters

Message ID 20160923082127.8092-1-h.leppkes@gmail.com
State Accepted
Commit 5ae0ad001a653e71b14c92a0d7861de87901752c
Headers show

Commit Message

Hendrik Leppkes Sept. 23, 2016, 8:21 a.m. UTC
Fixes trac 5579
---
 libavcodec/x86/h264_weight.asm | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

Comments

Ronald S. Bultje Sept. 23, 2016, 12:25 p.m. UTC | #1
Hi,

On Fri, Sep 23, 2016 at 4:21 AM, Hendrik Leppkes <h.leppkes@gmail.com>
wrote:

> Fixes trac 5579
> ---
>  libavcodec/x86/h264_weight.asm | 12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/libavcodec/x86/h264_weight.asm b/libavcodec/x86/h264_weight.
> asm
> index 6c57d57..0975d74 100644
> --- a/libavcodec/x86/h264_weight.asm
> +++ b/libavcodec/x86/h264_weight.asm
> @@ -134,16 +134,16 @@ WEIGHT_FUNC_HALF_MM 8, 8
>      mov  off_regd, r7m
>      add  off_regd, 1
>      or   off_regd, 1
> -    add        r4, 1
> -    cmp        r6d, 128
> +    add       r4d, 1
> +    cmp       r6d, 128
>      je .nonnormal
> -    cmp        r5, 128
> +    cmp       r5d, 128
>      jne .normal
>  .nonnormal:
> -    sar        r5, 1
> -    sar        r6, 1
> +    sar       r5d, 1
> +    sar       r6d, 1
>      sar  off_regd, 1
> -    sub        r4, 1
> +    sub       r4d, 1
>  .normal:
>  %if cpuflag(ssse3)
>      movd       m4, r5d
>

LGTM.

Ronald
Michael Niedermayer Sept. 23, 2016, 2:19 p.m. UTC | #2
On Fri, Sep 23, 2016 at 10:21:27AM +0200, Hendrik Leppkes wrote:
> Fixes trac 5579
> ---
>  libavcodec/x86/h264_weight.asm | 12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)

acked-by: michael
i saw these too but hadnt had the time to write and test a fix yet

thanks!

[...]
Hendrik Leppkes Sept. 23, 2016, 2:42 p.m. UTC | #3
On Fri, Sep 23, 2016 at 4:19 PM, Michael Niedermayer
<michael@niedermayer.cc> wrote:
> On Fri, Sep 23, 2016 at 10:21:27AM +0200, Hendrik Leppkes wrote:
>> Fixes trac 5579
>> ---
>>  libavcodec/x86/h264_weight.asm | 12 ++++++------
>>  1 file changed, 6 insertions(+), 6 deletions(-)
>
> acked-by: michael
> i saw these too but hadnt had the time to write and test a fix yet
>
> thanks!
>

Pushed, thanks.
diff mbox

Patch

diff --git a/libavcodec/x86/h264_weight.asm b/libavcodec/x86/h264_weight.asm
index 6c57d57..0975d74 100644
--- a/libavcodec/x86/h264_weight.asm
+++ b/libavcodec/x86/h264_weight.asm
@@ -134,16 +134,16 @@  WEIGHT_FUNC_HALF_MM 8, 8
     mov  off_regd, r7m
     add  off_regd, 1
     or   off_regd, 1
-    add        r4, 1
-    cmp        r6d, 128
+    add       r4d, 1
+    cmp       r6d, 128
     je .nonnormal
-    cmp        r5, 128
+    cmp       r5d, 128
     jne .normal
 .nonnormal:
-    sar        r5, 1
-    sar        r6, 1
+    sar       r5d, 1
+    sar       r6d, 1
     sar  off_regd, 1
-    sub        r4, 1
+    sub       r4d, 1
 .normal:
 %if cpuflag(ssse3)
     movd       m4, r5d