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
49bb6df0
Commit
49bb6df0
authored
11 years ago
by
Dmitry Kovalev
Browse files
Options
Download
Patches
Plain Diff
Cleaning up vp9_entropymv.c.
Change-Id: I01b3530779da89acb84c71bac5ccac456f00c5ac
parent
c9a8c32b
v1.14.0-linphone
1.4.X
feature/update_to_v1.9.0-linphone
feature/uwp_nuget
frame_parallel
highbitdepth
indianrunnerduck
javanwhistlingduck
khakicampbell
linphone
linphone-android
linphone-old
longtailedduck
m49-2623
m52-2743
m54-2840
m56-2924
m66-3359
m68-3440
mandarinduck
nextgen
nextgenv2
playground
sandbox/Jingning/experimental
sandbox/Jingning/transcode
sandbox/Jingning/vpx
sandbox/aconverse@google.com/ansbench
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
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
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
vp9/common/vp9_entropymv.c
+26
-25
vp9/common/vp9_entropymv.c
with
26 additions
and
25 deletions
vp9/common/vp9_entropymv.c
+
26
−
25
View file @
49bb6df0
...
...
@@ -8,14 +8,13 @@
* be found in the AUTHORS file in the root of the source tree.
*/
#include
"vp9/common/vp9_onyxc_int.h"
#include
"vp9/common/vp9_entropymv.h"
#define MV_COUNT_SAT 20
#define MV_MAX_UPDATE_FACTOR 128
/
*
Integer pel reference mv threshold for use of high-precision 1/8 mv
*/
/
/
Integer pel reference mv threshold for use of high-precision 1/8 mv
#define COMPANDED_MVREF_THRESH 8
const
vp9_tree_index
vp9_mv_joint_tree
[
TREE_SIZE
(
MV_JOINTS
)]
=
{
...
...
@@ -49,32 +48,30 @@ const vp9_tree_index vp9_mv_fp_tree[TREE_SIZE(MV_FP_SIZE)] = {
static
const
nmv_context
default_nmv_context
=
{
{
32
,
64
,
96
},
{
// NOLINT
{
/
* vert component */
// NOLINT
128
,
/
*
sign
*/
{
224
,
144
,
192
,
168
,
192
,
176
,
192
,
198
,
198
,
245
},
/
*
class
*/
{
216
},
/
*
class0
*/
{
136
,
140
,
148
,
160
,
176
,
192
,
224
,
234
,
234
,
240
},
/
*
bits
*/
{{
128
,
128
,
64
},
{
96
,
112
,
64
}},
/
*
class0_fp
*/
{
64
,
96
,
64
},
/
*
fp
*/
160
,
/
*
class0_hp bit
*/
128
,
/
*
hp
*/
{
{
/
/ Vertical component
128
,
/
/
sign
{
224
,
144
,
192
,
168
,
192
,
176
,
192
,
198
,
198
,
245
},
/
/
class
{
216
},
/
/
class0
{
136
,
140
,
148
,
160
,
176
,
192
,
224
,
234
,
234
,
240
},
/
/
bits
{{
128
,
128
,
64
},
{
96
,
112
,
64
}},
/
/
class0_fp
{
64
,
96
,
64
},
/
/
fp
160
,
/
/
class0_hp bit
128
,
/
/
hp
},
{
/
* hor component */
// NOLINT
128
,
/
*
sign
*/
{
216
,
128
,
176
,
160
,
176
,
176
,
192
,
198
,
198
,
208
},
/
*
class
*/
{
208
},
/
*
class0
*/
{
136
,
140
,
148
,
160
,
176
,
192
,
224
,
234
,
234
,
240
},
/
*
bits
*/
{{
128
,
128
,
64
},
{
96
,
112
,
64
}},
/
*
class0_fp
*/
{
64
,
96
,
64
},
/
*
fp
*/
160
,
/
*
class0_hp bit
*/
128
,
/
*
hp
*/
{
/
/ Horizontal component
128
,
/
/
sign
{
216
,
128
,
176
,
160
,
176
,
176
,
192
,
198
,
198
,
208
},
/
/
class
{
208
},
/
/
class0
{
136
,
140
,
148
,
160
,
176
,
192
,
224
,
234
,
234
,
240
},
/
/
bits
{{
128
,
128
,
64
},
{
96
,
112
,
64
}},
/
/
class0_fp
{
64
,
96
,
64
},
/
/
fp
160
,
/
/
class0_hp bit
128
,
/
/
hp
}
},
};
#define mv_class_base(c) ((c) ? (CLASS0_SIZE << (c + 2)) : 0)
static
const
uint8_t
log_in_base_2
[]
=
{
0
,
0
,
1
,
1
,
2
,
2
,
2
,
2
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
4
,
4
,
4
,
4
,
4
,
4
,
4
,
4
,
4
,
4
,
4
,
4
,
4
,
4
,
4
,
4
,
5
,
5
,
5
,
5
,
5
,
5
,
5
,
5
,
5
,
5
,
5
,
5
,
5
,
5
,
5
,
5
,
...
...
@@ -121,9 +118,13 @@ static const uint8_t log_in_base_2[] = {
9
,
9
,
9
,
9
,
9
,
9
,
9
,
9
,
9
,
9
,
9
,
9
,
9
,
9
,
9
,
9
,
10
};
static
INLINE
int
mv_class_base
(
MV_CLASS_TYPE
c
)
{
return
c
?
CLASS0_SIZE
<<
(
c
+
2
)
:
0
;
}
MV_CLASS_TYPE
vp9_get_mv_class
(
int
z
,
int
*
offset
)
{
const
MV_CLASS_TYPE
c
=
(
z
>=
CLASS0_SIZE
*
4096
)
?
MV_CLASS_10
:
(
MV_CLASS_TYPE
)
log_in_base_2
[
z
>>
3
];
const
MV_CLASS_TYPE
c
=
(
z
>=
CLASS0_SIZE
*
4096
)
?
MV_CLASS_10
:
(
MV_CLASS_TYPE
)
log_in_base_2
[
z
>>
3
];
if
(
offset
)
*
offset
=
z
-
mv_class_base
(
c
);
return
c
;
...
...
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