Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Xiph.Org
aom-rav1e
Commits
467bb162
Commit
467bb162
authored
Jun 22, 2016
by
Hui Su
Committed by
Gerrit Code Review
Jun 22, 2016
Browse files
Merge "Skip optimizing larger coefficients in trellis quant module" into nextgenv2
parents
5d145863
e0677559
Changes
1
Hide whitespace changes
Inline
Side-by-side
vp10/encoder/encodemb.c
View file @
467bb162
...
...
@@ -205,22 +205,27 @@ int vp10_optimize_b(MACROBLOCK *mb, int plane, int block,
rate0
=
tokens
[
next
][
0
].
rate
;
rate1
=
tokens
[
next
][
1
].
rate
;
// The threshold of 3 is empirically obtained.
if
(
abs
(
x
)
>
3
)
{
shortcut
=
0
;
}
else
{
#if CONFIG_NEW_QUANT
shortcut
=
(
(
dequant_abscoeff_nuq
(
abs
(
x
),
dequant_ptr
[
rc
!=
0
],
dequant_val
[
band_translate
[
i
]])
>
(
abs
(
coeff
[
rc
])
<<
shift
))
&&
(
dequant_abscoeff_nuq
(
abs
(
x
)
-
1
,
dequant_ptr
[
rc
!=
0
],
dequant_val
[
band_translate
[
i
]])
<
(
abs
(
coeff
[
rc
])
<<
shift
)));
shortcut
=
(
(
dequant_abscoeff_nuq
(
abs
(
x
),
dequant_ptr
[
rc
!=
0
],
dequant_val
[
band_translate
[
i
]])
>
(
abs
(
coeff
[
rc
])
<<
shift
))
&&
(
dequant_abscoeff_nuq
(
abs
(
x
)
-
1
,
dequant_ptr
[
rc
!=
0
],
dequant_val
[
band_translate
[
i
]])
<
(
abs
(
coeff
[
rc
])
<<
shift
)));
#else // CONFIG_NEW_QUANT
if
((
abs
(
x
)
*
dequant_ptr
[
rc
!=
0
]
>
(
abs
(
coeff
[
rc
])
<<
shift
))
&&
(
abs
(
x
)
*
dequant_ptr
[
rc
!=
0
]
<
(
abs
(
coeff
[
rc
])
<<
shift
)
+
dequant_ptr
[
rc
!=
0
]))
shortcut
=
1
;
else
shortcut
=
0
;
if
((
abs
(
x
)
*
dequant_ptr
[
rc
!=
0
]
>
(
abs
(
coeff
[
rc
])
<<
shift
))
&&
(
abs
(
x
)
*
dequant_ptr
[
rc
!=
0
]
<
(
abs
(
coeff
[
rc
])
<<
shift
)
+
dequant_ptr
[
rc
!=
0
]))
shortcut
=
1
;
else
shortcut
=
0
;
#endif // CONFIG_NEW_QUANT
}
if
(
shortcut
)
{
sz
=
-
(
x
<
0
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment