Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
aom-rav1e
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Xiph.Org
aom-rav1e
Commits
87e1fa76
Commit
87e1fa76
authored
Jun 18, 2013
by
Dmitry Kovalev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Renaming 'nmv' to 'mv' for several functions.
Change-Id: I183a38997a9d01e4a1b869e92509f6915216fa09
parent
2319b7aa
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
31 additions
and
35 deletions
+31
-35
vp9/common/vp9_entropymv.c
vp9/common/vp9_entropymv.c
+21
-25
vp9/common/vp9_entropymv.h
vp9/common/vp9_entropymv.h
+2
-2
vp9/common/vp9_findnearmv.c
vp9/common/vp9_findnearmv.c
+1
-1
vp9/decoder/vp9_decodemv.c
vp9/decoder/vp9_decodemv.c
+1
-1
vp9/decoder/vp9_decodframe.c
vp9/decoder/vp9_decodframe.c
+1
-1
vp9/encoder/vp9_encodemv.c
vp9/encoder/vp9_encodemv.c
+1
-1
vp9/encoder/vp9_mcomp.c
vp9/encoder/vp9_mcomp.c
+3
-3
vp9/encoder/vp9_onyx_if.c
vp9/encoder/vp9_onyx_if.c
+1
-1
No files found.
vp9/common/vp9_entropymv.c
View file @
87e1fa76
...
...
@@ -114,7 +114,7 @@ MV_CLASS_TYPE vp9_get_mv_class(int z, int *offset) {
return
c
;
}
int
vp9_use_
n
mv_hp
(
const
MV
*
ref
)
{
int
vp9_use_mv_hp
(
const
MV
*
ref
)
{
return
(
abs
(
ref
->
row
)
>>
3
)
<
COMPANDED_MVREF_THRESH
&&
(
abs
(
ref
->
col
)
>>
3
)
<
COMPANDED_MVREF_THRESH
;
}
...
...
@@ -123,54 +123,50 @@ int vp9_get_mv_mag(MV_CLASS_TYPE c, int offset) {
return
mv_class_base
(
c
)
+
offset
;
}
static
void
increment_nmv_component_count
(
int
v
,
nmv_component_counts
*
mvcomp
,
int
incr
,
int
usehp
)
{
assert
(
v
!=
0
);
/* should not be zero */
mvcomp
->
mvcount
[
MV_MAX
+
v
]
+=
incr
;
static
void
inc_mv_component_count
(
int
v
,
nmv_component_counts
*
comp_counts
,
int
incr
)
{
assert
(
v
!=
0
);
comp_counts
->
mvcount
[
MV_MAX
+
v
]
+=
incr
;
}
static
void
increment_nmv_component
(
int
v
,
nmv_component_counts
*
mvcomp
,
int
incr
,
int
usehp
)
{
static
void
inc_mv_component
(
int
v
,
nmv_component_counts
*
comp_counts
,
int
incr
,
int
usehp
)
{
int
s
,
z
,
c
,
o
,
d
,
e
,
f
;
if
(
!
incr
)
return
;
assert
(
v
!=
0
);
/* should not be zero */
s
=
v
<
0
;
mvcomp
->
sign
[
s
]
+=
incr
;
comp_counts
->
sign
[
s
]
+=
incr
;
z
=
(
s
?
-
v
:
v
)
-
1
;
/* magnitude - 1 */
c
=
vp9_get_mv_class
(
z
,
&
o
);
mvcomp
->
classes
[
c
]
+=
incr
;
comp_counts
->
classes
[
c
]
+=
incr
;
d
=
(
o
>>
3
);
/* int mv data */
f
=
(
o
>>
1
)
&
3
;
/* fractional pel mv data */
e
=
(
o
&
1
);
/* high precision mv data */
if
(
c
==
MV_CLASS_0
)
{
mvcomp
->
class0
[
d
]
+=
incr
;
comp_counts
->
class0
[
d
]
+=
incr
;
}
else
{
int
i
;
int
b
=
c
+
CLASS0_BITS
-
1
;
// number of bits
for
(
i
=
0
;
i
<
b
;
++
i
)
mvcomp
->
bits
[
i
][((
d
>>
i
)
&
1
)]
+=
incr
;
comp_counts
->
bits
[
i
][((
d
>>
i
)
&
1
)]
+=
incr
;
}
/* Code the fractional pel bits */
if
(
c
==
MV_CLASS_0
)
{
mvcomp
->
class0_fp
[
d
][
f
]
+=
incr
;
comp_counts
->
class0_fp
[
d
][
f
]
+=
incr
;
}
else
{
mvcomp
->
fp
[
f
]
+=
incr
;
comp_counts
->
fp
[
f
]
+=
incr
;
}
/* Code the high precision bit */
if
(
usehp
)
{
if
(
c
==
MV_CLASS_0
)
{
mvcomp
->
class0_hp
[
e
]
+=
incr
;
comp_counts
->
class0_hp
[
e
]
+=
incr
;
}
else
{
mvcomp
->
hp
[
e
]
+=
incr
;
comp_counts
->
hp
[
e
]
+=
incr
;
}
}
}
...
...
@@ -197,8 +193,8 @@ static void counts_to_context(nmv_component_counts *mvcomp, int usehp) {
int
v
;
vpx_memset
(
mvcomp
->
sign
,
0
,
sizeof
(
nmv_component_counts
)
-
sizeof
(
mvcomp
->
mvcount
));
for
(
v
=
1
;
v
<=
MV_MAX
;
v
++
)
{
inc
rement_n
mv_component
(
-
v
,
mvcomp
,
mvcomp
->
mvcount
[
MV_MAX
-
v
],
usehp
);
inc
rement_n
mv_component
(
v
,
mvcomp
,
mvcomp
->
mvcount
[
MV_MAX
+
v
],
usehp
);
inc
_
mv_component
(
-
v
,
mvcomp
,
mvcomp
->
mvcount
[
MV_MAX
-
v
],
usehp
);
inc
_
mv_component
(
v
,
mvcomp
,
mvcomp
->
mvcount
[
MV_MAX
+
v
],
usehp
);
}
}
...
...
@@ -206,12 +202,12 @@ void vp9_increment_nmv(const MV *mv, const MV *ref, nmv_context_counts *mvctx,
int
usehp
)
{
const
MV_JOINT_TYPE
j
=
vp9_get_mv_joint
(
mv
);
mvctx
->
joints
[
j
]
++
;
usehp
=
usehp
&&
vp9_use_
n
mv_hp
(
ref
);
usehp
=
usehp
&&
vp9_use_mv_hp
(
ref
);
if
(
mv_joint_vertical
(
j
))
inc
rement_nmv_component_count
(
mv
->
row
,
&
mvctx
->
comps
[
0
],
1
,
usehp
);
inc
_mv_component_count
(
mv
->
row
,
&
mvctx
->
comps
[
0
],
1
);
if
(
mv_joint_horizontal
(
j
))
inc
rement_nmv_component_count
(
mv
->
col
,
&
mvctx
->
comps
[
1
],
1
,
usehp
);
inc
_mv_component_count
(
mv
->
col
,
&
mvctx
->
comps
[
1
],
1
);
}
static
void
adapt_prob
(
vp9_prob
*
dest
,
vp9_prob
prep
,
unsigned
int
ct
[
2
])
{
...
...
@@ -332,7 +328,7 @@ static unsigned int adapt_probs(unsigned int i,
}
void
vp9_adapt_
n
mv_probs
(
VP9_COMMON
*
cm
,
int
usehp
)
{
void
vp9_adapt_mv_probs
(
VP9_COMMON
*
cm
,
int
usehp
)
{
int
i
,
j
;
#ifdef MV_COUNT_TESTING
printf
(
"joints count: "
);
...
...
vp9/common/vp9_entropymv.h
View file @
87e1fa76
...
...
@@ -21,8 +21,8 @@ struct VP9Common;
void
vp9_entropy_mv_init
();
void
vp9_init_mv_probs
(
struct
VP9Common
*
cm
);
void
vp9_adapt_
n
mv_probs
(
struct
VP9Common
*
cm
,
int
usehp
);
int
vp9_use_
n
mv_hp
(
const
MV
*
ref
);
void
vp9_adapt_mv_probs
(
struct
VP9Common
*
cm
,
int
usehp
);
int
vp9_use_mv_hp
(
const
MV
*
ref
);
#define VP9_NMV_UPDATE_PROB 252
...
...
vp9/common/vp9_findnearmv.c
View file @
87e1fa76
...
...
@@ -16,7 +16,7 @@
#include "vp9/common/vp9_subpelvar.h"
static
void
lower_mv_precision
(
int_mv
*
mv
,
int
usehp
)
{
if
(
!
usehp
||
!
vp9_use_
n
mv_hp
(
&
mv
->
as_mv
))
{
if
(
!
usehp
||
!
vp9_use_mv_hp
(
&
mv
->
as_mv
))
{
if
(
mv
->
as_mv
.
row
&
1
)
mv
->
as_mv
.
row
+=
(
mv
->
as_mv
.
row
>
0
?
-
1
:
1
);
if
(
mv
->
as_mv
.
col
&
1
)
...
...
vp9/decoder/vp9_decodemv.c
View file @
87e1fa76
...
...
@@ -461,7 +461,7 @@ static INLINE void decode_mv(vp9_reader *r, MV *mv, const MV *ref,
const
MV_JOINT_TYPE
j
=
treed_read
(
r
,
vp9_mv_joint_tree
,
ctx
->
joints
);
MV
diff
=
{
0
,
0
};
usehp
=
usehp
&&
vp9_use_
n
mv_hp
(
ref
);
usehp
=
usehp
&&
vp9_use_mv_hp
(
ref
);
if
(
mv_joint_vertical
(
j
))
diff
.
row
=
read_mv_component
(
r
,
&
ctx
->
comps
[
0
],
usehp
);
...
...
vp9/decoder/vp9_decodframe.c
View file @
87e1fa76
...
...
@@ -1187,7 +1187,7 @@ int vp9_decode_frame(VP9D_COMP *pbi, const uint8_t **p_data_end) {
if
((
!
keyframe
)
&&
(
!
pc
->
intra_only
))
{
vp9_adapt_mode_probs
(
pc
);
vp9_adapt_mode_context
(
pc
);
vp9_adapt_
n
mv_probs
(
pc
,
xd
->
allow_high_precision_mv
);
vp9_adapt_mv_probs
(
pc
,
xd
->
allow_high_precision_mv
);
}
}
...
...
vp9/encoder/vp9_encodemv.c
View file @
87e1fa76
...
...
@@ -541,7 +541,7 @@ void vp9_encode_mv(vp9_writer* w, const MV* mv, const MV* ref,
const
MV
diff
=
{
mv
->
row
-
ref
->
row
,
mv
->
col
-
ref
->
col
};
const
MV_JOINT_TYPE
j
=
vp9_get_mv_joint
(
&
diff
);
usehp
=
usehp
&&
vp9_use_
n
mv_hp
(
ref
);
usehp
=
usehp
&&
vp9_use_mv_hp
(
ref
);
write_token
(
w
,
vp9_mv_joint_tree
,
mvctx
->
joints
,
&
vp9_mv_joint_encodings
[
j
]);
if
(
mv_joint_vertical
(
j
))
...
...
vp9/encoder/vp9_mcomp.c
View file @
87e1fa76
...
...
@@ -366,7 +366,7 @@ int vp9_find_best_sub_pixel_step_iteratively(MACROBLOCK *x,
}
if
(
xd
->
allow_high_precision_mv
)
{
usehp
=
vp9_use_
n
mv_hp
(
&
ref_mv
->
as_mv
);
usehp
=
vp9_use_mv_hp
(
&
ref_mv
->
as_mv
);
}
else
{
usehp
=
0
;
}
...
...
@@ -556,7 +556,7 @@ int vp9_find_best_sub_pixel_comp(MACROBLOCK *x,
}
if
(
xd
->
allow_high_precision_mv
)
{
usehp
=
vp9_use_
n
mv_hp
(
&
ref_mv
->
as_mv
);
usehp
=
vp9_use_mv_hp
(
&
ref_mv
->
as_mv
);
}
else
{
usehp
=
0
;
}
...
...
@@ -930,7 +930,7 @@ int vp9_find_best_sub_pixel_step(MACROBLOCK *x,
}
if
(
x
->
e_mbd
.
allow_high_precision_mv
)
{
usehp
=
vp9_use_
n
mv_hp
(
&
ref_mv
->
as_mv
);
usehp
=
vp9_use_mv_hp
(
&
ref_mv
->
as_mv
);
}
else
{
usehp
=
0
;
}
...
...
vp9/encoder/vp9_onyx_if.c
View file @
87e1fa76
...
...
@@ -2993,7 +2993,7 @@ static void encode_frame_to_data_rate(VP9_COMP *cpi,
!
cpi
->
common
.
frame_parallel_decoding_mode
)
{
vp9_adapt_mode_probs
(
&
cpi
->
common
);
vp9_adapt_mode_context
(
&
cpi
->
common
);
vp9_adapt_
n
mv_probs
(
&
cpi
->
common
,
cpi
->
mb
.
e_mbd
.
allow_high_precision_mv
);
vp9_adapt_mv_probs
(
&
cpi
->
common
,
cpi
->
mb
.
e_mbd
.
allow_high_precision_mv
);
}
}
...
...
Write
Preview
Markdown
is supported
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