Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/videolan/dav1d.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHenrik Gramner <gramner@twoorioles.com>2020-05-10 14:40:14 +0300
committerHenrik Gramner <henrik@gramner.com>2020-05-10 15:36:21 +0300
commit631d7720fd5cb4c5072aec5270bb444b68b9e0f7 (patch)
tree4a16f1d24277879ba218a749cb4078876ebc9b57 /src
parenteaedb95de65fb5612297b148a306398240e8ad6f (diff)
msac: Avoid attempting to refill after eob has already been reached
Utilize the unsigned representation of a signed integer to skip the refill code if the count was already negative to begin with, which saves a few clock cycles at the end of each tile.
Diffstat (limited to 'src')
-rw-r--r--src/arm/64/msac.S2
-rw-r--r--src/x86/msac.asm4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/arm/64/msac.S b/src/arm/64/msac.S
index 31cc46f..4f9493a 100644
--- a/src/arm/64/msac.S
+++ b/src/arm/64/msac.S
@@ -216,7 +216,7 @@ L(renorm2):
lsl x7, x7, x5 // (~dif + (v << 48)) << d
str w4, [x0, #RNG]
mvn x7, x7 // ~dif
- b.ge 9f
+ b.hs 9f
// refill
ldp x3, x4, [x0] // BUF_POS, BUF_END
diff --git a/src/x86/msac.asm b/src/x86/msac.asm
index f678714..756e19b 100644
--- a/src/x86/msac.asm
+++ b/src/x86/msac.asm
@@ -157,7 +157,7 @@ cglobal msac_decode_symbol_adapt4, 0, 6, 6
mov [t7+msac.rng], t2d
not t4
sub t1d, ecx
- jge .end ; no refill required
+ jae .end ; no refill required
; refill:
mov t2, [t7+msac.buf]
@@ -504,7 +504,7 @@ cglobal msac_decode_bool, 0, 6, 0
mov [t7+msac.rng], t2d
not t4
sub t5d, ecx
- jge %%end
+ jae %%end
mov t2, [t7+msac.buf]
mov rcx, [t7+msac.end]
%if UNIX64 == 0