Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
A
aom-rav1e
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Xiph.Org
aom-rav1e
Commits
3c5ed6f5
Commit
3c5ed6f5
authored
12 years ago
by
Scott LaVarnway
Committed by
Gerrit Code Review
12 years ago
Browse files
Options
Downloads
Plain Diff
Merge "MB_MODE_INFO size reduction"
parents
6dc21bce
31322c5f
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
vp8/common/blockd.h
+7
-6
7 additions, 6 deletions
vp8/common/blockd.h
vp8/decoder/decodemv.c
+4
-0
4 additions, 0 deletions
vp8/decoder/decodemv.c
vp8/decoder/detokenize.c
+9
-11
9 additions, 11 deletions
vp8/decoder/detokenize.c
with
20 additions
and
17 deletions
vp8/common/blockd.h
+
7
−
6
View file @
3c5ed6f5
...
...
@@ -150,14 +150,15 @@ typedef enum
typedef
struct
{
MB_PREDICTION_MODE
mode
,
uv_mode
;
MV_REFERENCE_FRAME
ref_frame
;
uint8_t
mode
,
uv_mode
;
uint8_t
ref_frame
;
uint8_t
is_4x4
;
int_mv
mv
;
u
nsigned
char
partitioning
;
u
nsigned
char
mb_skip_coeff
;
/* does this mb has coefficients at all, 1=no coefficients, 0=need decode tokens */
u
nsigned
char
need_to_clamp_mvs
;
u
nsigned
char
segment_id
;
/* Which set of segmentation parameters should be used for this MB */
u
int8_t
partitioning
;
u
int8_t
mb_skip_coeff
;
/* does this mb has coefficients at all, 1=no coefficients, 0=need decode tokens */
u
int8_t
need_to_clamp_mvs
;
u
int8_t
segment_id
;
/* Which set of segmentation parameters should be used for this MB */
}
MB_MODE_INFO
;
typedef
struct
...
...
This diff is collapsed.
Click to expand it.
vp8/decoder/decodemv.c
+
4
−
0
View file @
3c5ed6f5
...
...
@@ -57,6 +57,7 @@ static void read_kf_modes(VP8D_COMP *pbi, MODE_INFO *mi)
if
(
mi
->
mbmi
.
mode
==
B_PRED
)
{
int
i
=
0
;
mi
->
mbmi
.
is_4x4
=
1
;
do
{
...
...
@@ -485,6 +486,7 @@ static void read_mb_modes_mv(VP8D_COMP *pbi, MODE_INFO *mi, MB_MODE_INFO *mbmi)
mb_to_bottom_edge
);
mbmi
->
mv
.
as_int
=
mi
->
bmi
[
15
].
mv
.
as_int
;
mbmi
->
mode
=
SPLITMV
;
mbmi
->
is_4x4
=
1
;
}
else
{
...
...
@@ -557,6 +559,7 @@ static void read_mb_modes_mv(VP8D_COMP *pbi, MODE_INFO *mi, MB_MODE_INFO *mbmi)
if
((
mbmi
->
mode
=
read_ymode
(
bc
,
pbi
->
common
.
fc
.
ymode_prob
))
==
B_PRED
)
{
int
j
=
0
;
mbmi
->
is_4x4
=
1
;
do
{
mi
->
bmi
[
j
].
as_mode
=
read_bmode
(
bc
,
pbi
->
common
.
fc
.
bmode_prob
);
...
...
@@ -603,6 +606,7 @@ static void decode_mb_mode_mvs(VP8D_COMP *pbi, MODE_INFO *mi,
else
mi
->
mbmi
.
mb_skip_coeff
=
0
;
mi
->
mbmi
.
is_4x4
=
0
;
if
(
pbi
->
common
.
frame_type
==
KEY_FRAME
)
read_kf_modes
(
pbi
,
mi
);
else
...
...
This diff is collapsed.
Click to expand it.
vp8/decoder/detokenize.c
+
9
−
11
View file @
3c5ed6f5
...
...
@@ -17,17 +17,16 @@
void
vp8_reset_mb_tokens_context
(
MACROBLOCKD
*
x
)
{
ENTROPY_CONTEXT
*
a_ctx
=
((
ENTROPY_CONTEXT
*
)
x
->
above_context
);
ENTROPY_CONTEXT
*
l_ctx
=
((
ENTROPY_CONTEXT
*
)
x
->
left_context
);
vpx_memset
(
a_ctx
,
0
,
sizeof
(
ENTROPY_CONTEXT_PLANES
)
-
1
);
vpx_memset
(
l_ctx
,
0
,
sizeof
(
ENTROPY_CONTEXT_PLANES
)
-
1
);
/* Clear entropy contexts for Y2 blocks */
if
(
x
->
mode_info_context
->
mbmi
.
mode
!=
B_PRED
&&
x
->
mode_info_context
->
mbmi
.
mode
!=
SPLITMV
)
{
vpx_memset
(
x
->
above_context
,
0
,
sizeof
(
ENTROPY_CONTEXT_PLANES
));
vpx_memset
(
x
->
left_context
,
0
,
sizeof
(
ENTROPY_CONTEXT_PLANES
));
}
else
if
(
!
x
->
mode_info_context
->
mbmi
.
is_4x4
)
{
vpx_memset
(
x
->
above_context
,
0
,
sizeof
(
ENTROPY_CONTEXT_PLANES
)
-
1
);
vpx_memset
(
x
->
left_context
,
0
,
sizeof
(
ENTROPY_CONTEXT_PLANES
)
-
1
);
a_ctx
[
8
]
=
l_ctx
[
8
]
=
0
;
}
}
...
...
@@ -187,8 +186,7 @@ int vp8_decode_mb_tokens(VP8D_COMP *dx, MACROBLOCKD *x)
qcoeff_ptr
=
&
x
->
qcoeff
[
0
];
if
(
x
->
mode_info_context
->
mbmi
.
mode
!=
B_PRED
&&
x
->
mode_info_context
->
mbmi
.
mode
!=
SPLITMV
)
if
(
!
x
->
mode_info_context
->
mbmi
.
is_4x4
)
{
a
=
a_ctx
+
8
;
l
=
l_ctx
+
8
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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