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
4956fcd3
Commit
4956fcd3
authored
Nov 19, 2013
by
Dmitry Kovalev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding MV_FP_SIZE constant.
Change-Id: I98d750ee92ff51fb714980418ea28be3b1d0f3c6
parent
82f8ae4c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
14 deletions
+15
-14
vp9/common/vp9_entropymv.h
vp9/common/vp9_entropymv.h
+6
-5
vp9/decoder/vp9_decodeframe.c
vp9/decoder/vp9_decodeframe.c
+2
-2
vp9/encoder/vp9_encodemv.c
vp9/encoder/vp9_encodemv.c
+7
-7
No files found.
vp9/common/vp9_entropymv.h
View file @
4956fcd3
...
...
@@ -62,6 +62,7 @@ typedef enum {
#define CLASS0_BITS 1
/* bits at integer precision for class 0 */
#define CLASS0_SIZE (1 << CLASS0_BITS)
#define MV_OFFSET_BITS (MV_CLASSES + CLASS0_BITS - 2)
#define MV_FP_SIZE 4
#define MV_MAX_BITS (MV_CLASSES + CLASS0_BITS + 2)
#define MV_MAX ((1 << MV_MAX_BITS) - 1)
...
...
@@ -80,7 +81,7 @@ extern struct vp9_token vp9_mv_class_encodings[MV_CLASSES];
extern
const
vp9_tree_index
vp9_mv_class0_tree
[
TREE_SIZE
(
CLASS0_SIZE
)];
extern
struct
vp9_token
vp9_mv_class0_encodings
[
CLASS0_SIZE
];
extern
const
vp9_tree_index
vp9_mv_fp_tree
[
TREE_SIZE
(
4
)];
extern
const
vp9_tree_index
vp9_mv_fp_tree
[
TREE_SIZE
(
MV_FP_SIZE
)];
extern
struct
vp9_token
vp9_mv_fp_encodings
[
4
];
typedef
struct
{
...
...
@@ -88,8 +89,8 @@ typedef struct {
vp9_prob
classes
[
MV_CLASSES
-
1
];
vp9_prob
class0
[
CLASS0_SIZE
-
1
];
vp9_prob
bits
[
MV_OFFSET_BITS
];
vp9_prob
class0_fp
[
CLASS0_SIZE
][
4
-
1
];
vp9_prob
fp
[
4
-
1
];
vp9_prob
class0_fp
[
CLASS0_SIZE
][
MV_FP_SIZE
-
1
];
vp9_prob
fp
[
MV_FP_SIZE
-
1
];
vp9_prob
class0_hp
;
vp9_prob
hp
;
}
nmv_component
;
...
...
@@ -116,8 +117,8 @@ typedef struct {
unsigned
int
classes
[
MV_CLASSES
];
unsigned
int
class0
[
CLASS0_SIZE
];
unsigned
int
bits
[
MV_OFFSET_BITS
][
2
];
unsigned
int
class0_fp
[
CLASS0_SIZE
][
4
];
unsigned
int
fp
[
4
];
unsigned
int
class0_fp
[
CLASS0_SIZE
][
MV_FP_SIZE
];
unsigned
int
fp
[
MV_FP_SIZE
];
unsigned
int
class0_hp
[
2
];
unsigned
int
hp
[
2
];
}
nmv_component_counts
;
...
...
vp9/decoder/vp9_decodeframe.c
View file @
4956fcd3
...
...
@@ -159,7 +159,7 @@ static void update_mv_probs(vp9_prob *p, int n, vp9_reader *r) {
int
i
;
for
(
i
=
0
;
i
<
n
;
++
i
)
if
(
vp9_read
(
r
,
NMV_UPDATE_PROB
))
p
[
i
]
=
(
vp9_read_literal
(
r
,
7
)
<<
1
)
|
1
;
p
[
i
]
=
(
vp9_read_literal
(
r
,
7
)
<<
1
)
|
1
;
}
static
void
read_mv_probs
(
nmv_context
*
ctx
,
int
allow_hp
,
vp9_reader
*
r
)
{
...
...
@@ -178,7 +178,7 @@ static void read_mv_probs(nmv_context *ctx, int allow_hp, vp9_reader *r) {
for
(
i
=
0
;
i
<
2
;
++
i
)
{
nmv_component
*
const
comp_ctx
=
&
ctx
->
comps
[
i
];
for
(
j
=
0
;
j
<
CLASS0_SIZE
;
++
j
)
update_mv_probs
(
comp_ctx
->
class0_fp
[
j
],
3
,
r
);
update_mv_probs
(
comp_ctx
->
class0_fp
[
j
],
MV_FP_SIZE
-
1
,
r
);
update_mv_probs
(
comp_ctx
->
fp
,
3
,
r
);
}
...
...
vp9/encoder/vp9_encodemv.c
View file @
4956fcd3
...
...
@@ -68,7 +68,7 @@ static void build_nmv_component_cost_table(int *mvcost,
int
i
,
v
;
int
sign_cost
[
2
],
class_cost
[
MV_CLASSES
],
class0_cost
[
CLASS0_SIZE
];
int
bits_cost
[
MV_OFFSET_BITS
][
2
];
int
class0_fp_cost
[
CLASS0_SIZE
][
4
],
fp_cost
[
4
];
int
class0_fp_cost
[
CLASS0_SIZE
][
MV_FP_SIZE
],
fp_cost
[
MV_FP_SIZE
];
int
class0_hp_cost
[
2
],
hp_cost
[
2
];
sign_cost
[
0
]
=
vp9_cost_zero
(
mvcomp
->
sign
);
...
...
@@ -145,8 +145,8 @@ static void counts_to_nmv_context(
unsigned
int
(
*
branch_ct_classes
)[
MV_CLASSES
-
1
][
2
],
unsigned
int
(
*
branch_ct_class0
)[
CLASS0_SIZE
-
1
][
2
],
unsigned
int
(
*
branch_ct_bits
)[
MV_OFFSET_BITS
][
2
],
unsigned
int
(
*
branch_ct_class0_fp
)[
CLASS0_SIZE
][
4
-
1
][
2
],
unsigned
int
(
*
branch_ct_fp
)[
4
-
1
][
2
],
unsigned
int
(
*
branch_ct_class0_fp
)[
CLASS0_SIZE
][
MV_FP_SIZE
-
1
][
2
],
unsigned
int
(
*
branch_ct_fp
)[
MV_FP_SIZE
-
1
][
2
],
unsigned
int
(
*
branch_ct_class0_hp
)[
2
],
unsigned
int
(
*
branch_ct_hp
)[
2
])
{
int
i
,
j
,
k
;
...
...
@@ -205,8 +205,8 @@ void vp9_write_nmv_probs(VP9_COMP* const cpi, int usehp, vp9_writer* const bc) {
unsigned
int
branch_ct_classes
[
2
][
MV_CLASSES
-
1
][
2
];
unsigned
int
branch_ct_class0
[
2
][
CLASS0_SIZE
-
1
][
2
];
unsigned
int
branch_ct_bits
[
2
][
MV_OFFSET_BITS
][
2
];
unsigned
int
branch_ct_class0_fp
[
2
][
CLASS0_SIZE
][
4
-
1
][
2
];
unsigned
int
branch_ct_fp
[
2
][
4
-
1
][
2
];
unsigned
int
branch_ct_class0_fp
[
2
][
CLASS0_SIZE
][
MV_FP_SIZE
-
1
][
2
];
unsigned
int
branch_ct_fp
[
2
][
MV_FP_SIZE
-
1
][
2
];
unsigned
int
branch_ct_class0_hp
[
2
][
2
];
unsigned
int
branch_ct_hp
[
2
][
2
];
nmv_context
*
mvc
=
&
cpi
->
common
.
fc
.
nmvc
;
...
...
@@ -238,12 +238,12 @@ void vp9_write_nmv_probs(VP9_COMP* const cpi, int usehp, vp9_writer* const bc) {
for
(
i
=
0
;
i
<
2
;
++
i
)
{
for
(
j
=
0
;
j
<
CLASS0_SIZE
;
++
j
)
{
int
k
;
for
(
k
=
0
;
k
<
3
;
++
k
)
for
(
k
=
0
;
k
<
MV_FP_SIZE
-
1
;
++
k
)
update_mv
(
bc
,
branch_ct_class0_fp
[
i
][
j
][
k
],
&
mvc
->
comps
[
i
].
class0_fp
[
j
][
k
],
NMV_UPDATE_PROB
);
}
for
(
j
=
0
;
j
<
3
;
++
j
)
for
(
j
=
0
;
j
<
MV_FP_SIZE
-
1
;
++
j
)
update_mv
(
bc
,
branch_ct_fp
[
i
][
j
],
&
mvc
->
comps
[
i
].
fp
[
j
],
NMV_UPDATE_PROB
);
}
...
...
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