ref: fcc94fa905ba4d87f3383d517fbf6fcb08006ffc
parent: 9d34160a4a8b675f29d6398416f67d721a7c54b5
author: Ronald S. Bultje <[email protected]>
date: Wed Apr 1 06:48:53 EDT 2020
x86: use btc instead of xor+test in fgy_32x32xn_avx2
--- a/src/x86/film_grain.asm
+++ b/src/x86/film_grain.asm
@@ -1313,9 +1313,8 @@
jz .end_y_v_overlap
; 2 lines get vertical overlap, then fall back to non-overlap code for
; remaining (up to) 30 lines
- xor hd, 0x10000
- test hd, 0x10000
- jnz .loop_y_v_overlap
+ btc hd, 16
+ jnc .loop_y_v_overlap
jmp .loop_y
.end_y_v_overlap:
@@ -1446,9 +1445,8 @@
jz .end_y_hv_overlap
; 2 lines get vertical overlap, then fall back to non-overlap code for
; remaining (up to) 30 lines
- xor hd, 0x10000
- test hd, 0x10000
- jnz .loop_y_hv_overlap
+ btc hd, 16
+ jnc .loop_y_hv_overlap
jmp .loop_y_h_overlap
.end_y_hv_overlap: