Skip to content
GitLab
Explore
Projects
Groups
Topics
Snippets
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
BC
public
external
libvpx
Commits
61fe678f
Commit
61fe678f
authored
11 years ago
by
Ronald S. Bultje
Committed by
Gerrit Code Review
11 years ago
Browse files
Options
Download
Plain Diff
Merge "Use pmovmskb to skip quantize loops over empty coefficients."
parents
98c493a1
e5fb4b61
v1.14.0-linphone
1.4.X
experimental
feature/update_to_v1.9.0-linphone
feature/uwp_nuget
forest
frame_parallel
highbitdepth
indianrunnerduck
javanwhistlingduck
khakicampbell
linphone
linphone-android
linphone-old
longtailedduck
m31-baseline
m49-2623
m52-2743
m54-2840
m56-2924
m66-3359
m68-3440
mandarinduck
mcw
mcw2
nextgen
nextgenv2
pcs-2013
playground
sandbox/Jingning/experimental
sandbox/Jingning/transcode
sandbox/Jingning/vpx
sandbox/aconverse@google.com/ansbench
sandbox/debargha/playground
sandbox/hkuang/frame_parallel
sandbox/hkuang@google.com/decode
sandbox/jimbankoski@google.com/proposed-aom
sandbox/jingning@google.com/decoder_test_suite
sandbox/jingning@google.com/experimental
sandbox/jzern@google.com/test
sandbox/wangch@google.com/vp9
sandbox/yaowu@google.com/mergeaom
stable-vp9-decoder
v1.12.0-linphone
v1.6.1_linphone
v1.7.0-linphone
v1.9.0-linphone
v1.9.0
v1.9.0-rc1
v1.8.2
v1.8.1
v1.8.0
v1.7.0
v1.6.1
v1.6.0
v1.5.0
v1.4.0
v1.3.0
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
vp9/encoder/x86/vp9_quantize_ssse3.asm
+25
-9
vp9/encoder/x86/vp9_quantize_ssse3.asm
with
25 additions
and
9 deletions
vp9/encoder/x86/vp9_quantize_ssse3.asm
+
25
−
9
View file @
61fe678f
...
@@ -15,10 +15,10 @@ pw_1: times 8 dw 1
...
@@ -15,10 +15,10 @@ pw_1: times 8 dw 1
SECTION
.text
SECTION
.text
%macro QUANTIZE_FN
1
%macro QUANTIZE_FN
2
cglobal
quantize_
%
1
,
0
,
6
,
15
,
coeff
,
ncoeff
,
skip
,
zbin
,
round
,
quant
,
\
cglobal
quantize_
%
1
,
0
,
%
2
,
15
,
coeff
,
ncoeff
,
skip
,
zbin
,
round
,
quant
,
\
shift
,
qcoeff
,
dqcoeff
,
dequant
,
zbin_oq
,
\
shift
,
qcoeff
,
dqcoeff
,
dequant
,
zbin_oq
,
\
eob
,
scan
,
iscan
eob
,
scan
,
iscan
cmp
dword
skipm
,
0
cmp
dword
skipm
,
0
jne
.blank
jne
.blank
...
@@ -43,9 +43,8 @@ cglobal quantize_%1, 0, 6, 15, coeff, ncoeff, skip, zbin, round, quant, \
...
@@ -43,9 +43,8 @@ cglobal quantize_%1, 0, 6, 15, coeff, ncoeff, skip, zbin, round, quant, \
mova
m4
,
[
r2
]
; m4 = shift
mova
m4
,
[
r2
]
; m4 = shift
mov
r4
,
dqcoeffmp
mov
r4
,
dqcoeffmp
mov
r5
,
iscanmp
mov
r5
,
iscanmp
mov
r2
,
eobmp
pxor
m5
,
m5
; m5 = dedicated zero
pxor
m5
,
m5
; m5 = dedicated zero
DEFINE_ARGS
coeff
,
ncoeff
,
eob
,
qcoeff
,
dqcoeff
,
iscan
DEFINE_ARGS
coeff
,
ncoeff
,
d1
,
qcoeff
,
dqcoeff
,
iscan
,
d2
,
d3
,
d4
,
d5
,
d6
,
eob
lea
coeffq
,
[
coeffq
+
ncoeffq
*
2
]
lea
coeffq
,
[
coeffq
+
ncoeffq
*
2
]
lea
iscanq
,
[
iscanq
+
ncoeffq
*
2
]
lea
iscanq
,
[
iscanq
+
ncoeffq
*
2
]
lea
qcoeffq
,
[
qcoeffq
+
ncoeffq
*
2
]
lea
qcoeffq
,
[
qcoeffq
+
ncoeffq
*
2
]
...
@@ -119,6 +118,12 @@ cglobal quantize_%1, 0, 6, 15, coeff, ncoeff, skip, zbin, round, quant, \
...
@@ -119,6 +118,12 @@ cglobal quantize_%1, 0, 6, 15, coeff, ncoeff, skip, zbin, round, quant, \
%endif
%endif
pcmpgtw
m7
,
m6
,
m0
; m7 = c[i] >= zbin
pcmpgtw
m7
,
m6
,
m0
; m7 = c[i] >= zbin
pcmpgtw
m12
,
m11
,
m0
; m12 = c[i] >= zbin
pcmpgtw
m12
,
m11
,
m0
; m12 = c[i] >= zbin
%ifidn %1, b_32x32
pmovmskb
r6
,
m7
pmovmskb
r2
,
m12
or
r6
,
r2
jz
.skip_iter
%endif
paddw
m6
,
m1
; m6 += round
paddw
m6
,
m1
; m6 += round
paddw
m11
,
m1
; m11 += round
paddw
m11
,
m1
; m11 += round
pmulhw
m14
,
m6
,
m2
; m14 = m6*q>>16
pmulhw
m14
,
m6
,
m2
; m14 = m6*q>>16
...
@@ -159,16 +164,27 @@ cglobal quantize_%1, 0, 6, 15, coeff, ncoeff, skip, zbin, round, quant, \
...
@@ -159,16 +164,27 @@ cglobal quantize_%1, 0, 6, 15, coeff, ncoeff, skip, zbin, round, quant, \
pmaxsw
m8
,
m13
pmaxsw
m8
,
m13
add
ncoeffq
,
mmsize
add
ncoeffq
,
mmsize
jl
.ac_only_loop
jl
.ac_only_loop
%ifidn %1, b_32x32
jmp
.accumulate_eob
.skip_iter:
mova
[
qcoeffq
+
ncoeffq
*
2
+
0
],
m5
mova
[
qcoeffq
+
ncoeffq
*
2
+
16
],
m5
mova
[
dqcoeffq
+
ncoeffq
*
2
+
0
],
m5
mova
[
dqcoeffq
+
ncoeffq
*
2
+
16
],
m5
add
ncoeffq
,
mmsize
jl
.ac_only_loop
%endif
.accumulate_eob:
.accumulate_eob:
; horizontally accumulate/max eobs and write into [eob] memory pointer
; horizontally accumulate/max eobs and write into [eob] memory pointer
mov
r2
,
eobmp
pshufd
m7
,
m8
,
0xe
pshufd
m7
,
m8
,
0xe
pmaxsw
m8
,
m7
pmaxsw
m8
,
m7
pshuflw
m7
,
m8
,
0xe
pshuflw
m7
,
m8
,
0xe
pmaxsw
m8
,
m7
pmaxsw
m8
,
m7
pshuflw
m7
,
m8
,
0x1
pshuflw
m7
,
m8
,
0x1
pmaxsw
m8
,
m7
pmaxsw
m8
,
m7
pextrw
[
eobq
],
m8
,
0
pextrw
[
r2
],
m8
,
0
RET
RET
; skip-block, i.e. just write all zeroes
; skip-block, i.e. just write all zeroes
...
@@ -194,5 +210,5 @@ cglobal quantize_%1, 0, 6, 15, coeff, ncoeff, skip, zbin, round, quant, \
...
@@ -194,5 +210,5 @@ cglobal quantize_%1, 0, 6, 15, coeff, ncoeff, skip, zbin, round, quant, \
%endmacro
%endmacro
INIT_XMM
ss
se3
INIT_XMM
ss
se3
QUANTIZE_FN
b
QUANTIZE_FN
b
,
6
QUANTIZE_FN
b_32x32
QUANTIZE_FN
b_32x32
,
7
This diff is collapsed.
Click to expand it.
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Topics
Snippets