Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Xiph.Org
aom-rav1e
Commits
b30182c7
Commit
b30182c7
authored
Apr 16, 2013
by
Dmitry Kovalev
Committed by
Gerrit Code Review
Apr 16, 2013
Browse files
Options
Browse Files
Download
Plain Diff
Merge "Adding mv_joint_vertical and mv_joint_horizontal functions." into experimental
parents
e87c7f09
fd61b7ea
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
10 deletions
+18
-10
vp9/common/vp9_entropymv.c
vp9/common/vp9_entropymv.c
+2
-2
vp9/common/vp9_entropymv.h
vp9/common/vp9_entropymv.h
+8
-0
vp9/decoder/vp9_decodemv.c
vp9/decoder/vp9_decodemv.c
+4
-4
vp9/encoder/vp9_encodemv.c
vp9/encoder/vp9_encodemv.c
+4
-4
No files found.
vp9/common/vp9_entropymv.c
View file @
b30182c7
...
...
@@ -212,10 +212,10 @@ void vp9_increment_nmv(const MV *mv, const MV *ref, nmv_context_counts *mvctx,
const
MV_JOINT_TYPE
type
=
vp9_get_mv_joint
(
*
mv
);
mvctx
->
joints
[
type
]
++
;
usehp
=
usehp
&&
vp9_use_nmv_hp
(
ref
);
if
(
type
==
MV_JOINT_HZVNZ
||
type
==
MV_JOINT_HNZVNZ
)
if
(
mv_joint_vertical
(
type
)
)
increment_nmv_component_count
(
mv
->
row
,
&
mvctx
->
comps
[
0
],
1
,
usehp
);
if
(
type
==
MV_JOINT_HNZVZ
||
type
==
MV_JOINT_HNZVNZ
)
if
(
mv_joint_horizontal
(
type
)
)
increment_nmv_component_count
(
mv
->
col
,
&
mvctx
->
comps
[
1
],
1
,
usehp
);
}
...
...
vp9/common/vp9_entropymv.h
View file @
b30182c7
...
...
@@ -45,6 +45,14 @@ typedef enum {
MV_JOINT_HNZVNZ
=
3
,
/* Both components nonzero */
}
MV_JOINT_TYPE
;
static
INLINE
int
mv_joint_vertical
(
MV_JOINT_TYPE
type
)
{
return
type
==
MV_JOINT_HZVNZ
||
type
==
MV_JOINT_HNZVNZ
;
}
static
INLINE
int
mv_joint_horizontal
(
MV_JOINT_TYPE
type
)
{
return
type
==
MV_JOINT_HNZVZ
||
type
==
MV_JOINT_HNZVNZ
;
}
extern
const
vp9_tree_index
vp9_mv_joint_tree
[
2
*
MV_JOINTS
-
2
];
extern
struct
vp9_token
vp9_mv_joint_encodings
[
MV_JOINTS
];
...
...
vp9/decoder/vp9_decodemv.c
View file @
b30182c7
...
...
@@ -273,10 +273,10 @@ static void read_nmv(vp9_reader *r, MV *mv, const MV *ref,
const
MV_JOINT_TYPE
j
=
treed_read
(
r
,
vp9_mv_joint_tree
,
mvctx
->
joints
);
mv
->
row
=
mv
->
col
=
0
;
if
(
j
==
MV_JOINT_HZVNZ
||
j
==
MV_JOINT_HNZVNZ
)
if
(
mv_joint_vertical
(
j
)
)
mv
->
row
=
read_nmv_component
(
r
,
ref
->
row
,
&
mvctx
->
comps
[
0
]);
if
(
j
==
MV_JOINT_HNZVZ
||
j
==
MV_JOINT_HNZVNZ
)
if
(
mv_joint_horizontal
(
j
)
)
mv
->
col
=
read_nmv_component
(
r
,
ref
->
col
,
&
mvctx
->
comps
[
1
]);
}
...
...
@@ -284,11 +284,11 @@ static void read_nmv_fp(vp9_reader *r, MV *mv, const MV *ref,
const
nmv_context
*
mvctx
,
int
usehp
)
{
const
MV_JOINT_TYPE
j
=
vp9_get_mv_joint
(
*
mv
);
usehp
=
usehp
&&
vp9_use_nmv_hp
(
ref
);
if
(
j
==
MV_JOINT_HZVNZ
||
j
==
MV_JOINT_HNZVNZ
)
if
(
mv_joint_vertical
(
j
)
)
mv
->
row
=
read_nmv_component_fp
(
r
,
mv
->
row
,
ref
->
row
,
&
mvctx
->
comps
[
0
],
usehp
);
if
(
j
==
MV_JOINT_HNZVZ
||
j
==
MV_JOINT_HNZVNZ
)
if
(
mv_joint_horizontal
(
j
)
)
mv
->
col
=
read_nmv_component_fp
(
r
,
mv
->
col
,
ref
->
col
,
&
mvctx
->
comps
[
1
],
usehp
);
}
...
...
vp9/encoder/vp9_encodemv.c
View file @
b30182c7
...
...
@@ -561,10 +561,10 @@ void vp9_encode_nmv(vp9_writer* const bc, const MV* const mv,
MV_JOINT_TYPE
j
=
vp9_get_mv_joint
(
*
mv
);
write_token
(
bc
,
vp9_mv_joint_tree
,
mvctx
->
joints
,
vp9_mv_joint_encodings
+
j
);
if
(
j
==
MV_JOINT_HZVNZ
||
j
==
MV_JOINT_HNZVNZ
)
{
if
(
mv_joint_vertical
(
j
)
)
{
encode_nmv_component
(
bc
,
mv
->
row
,
ref
->
col
,
&
mvctx
->
comps
[
0
]);
}
if
(
j
==
MV_JOINT_HNZVZ
||
j
==
MV_JOINT_HNZVNZ
)
{
if
(
mv_joint_horizontal
(
j
)
)
{
encode_nmv_component
(
bc
,
mv
->
col
,
ref
->
col
,
&
mvctx
->
comps
[
1
]);
}
}
...
...
@@ -574,10 +574,10 @@ void vp9_encode_nmv_fp(vp9_writer* const bc, const MV* const mv,
int
usehp
)
{
MV_JOINT_TYPE
j
=
vp9_get_mv_joint
(
*
mv
);
usehp
=
usehp
&&
vp9_use_nmv_hp
(
ref
);
if
(
j
==
MV_JOINT_HZVNZ
||
j
==
MV_JOINT_HNZVNZ
)
{
if
(
mv_joint_vertical
(
j
)
)
{
encode_nmv_component_fp
(
bc
,
mv
->
row
,
ref
->
row
,
&
mvctx
->
comps
[
0
],
usehp
);
}
if
(
j
==
MV_JOINT_HNZVZ
||
j
==
MV_JOINT_HNZVNZ
)
{
if
(
mv_joint_horizontal
(
j
)
)
{
encode_nmv_component_fp
(
bc
,
mv
->
col
,
ref
->
col
,
&
mvctx
->
comps
[
1
],
usehp
);
}
}
...
...
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