Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Xiph.Org
aom-rav1e
Commits
d53fc9ee
Commit
d53fc9ee
authored
Jul 25, 2013
by
Dmitry Kovalev
Committed by
Gerrit Code Review
Jul 25, 2013
Browse files
Merge "Adding lookup table for size group."
parents
e862c6f9
08fd41cc
Changes
4
Hide whitespace changes
Inline
Side-by-side
vp9/common/vp9_common_data.c
View file @
d53fc9ee
...
...
@@ -31,6 +31,11 @@ const int mi_height_log2_lookup[BLOCK_SIZE_TYPES] =
const
int
num_8x8_blocks_high_lookup
[
BLOCK_SIZE_TYPES
]
=
{
1
,
1
,
1
,
1
,
2
,
1
,
2
,
4
,
2
,
4
,
8
,
4
,
8
};
// MIN(3, MIN(b_width_log2(bsize), b_height_log2(bsize)))
const
int
size_group_lookup
[
BLOCK_SIZE_TYPES
]
=
{
0
,
0
,
0
,
1
,
1
,
1
,
2
,
2
,
2
,
3
,
3
,
3
,
3
};
const
PARTITION_TYPE
partition_lookup
[][
BLOCK_SIZE_TYPES
]
=
{
{
// 4X4
// 4X4, 4X8,8X4,8X8,8X16,16X8,16X16,16X32,32X16,32X32,32X64,64X32,64X64
...
...
vp9/common/vp9_common_data.h
View file @
d53fc9ee
...
...
@@ -21,8 +21,9 @@ extern const int num_8x8_blocks_wide_lookup[BLOCK_SIZE_TYPES];
extern
const
int
num_8x8_blocks_high_lookup
[
BLOCK_SIZE_TYPES
];
extern
const
int
num_4x4_blocks_high_lookup
[
BLOCK_SIZE_TYPES
];
extern
const
int
num_4x4_blocks_wide_lookup
[
BLOCK_SIZE_TYPES
];
extern
const
PARTITION_TYPE
partition_lookup
[][
BLOCK_SIZE_TYPES
];
extern
const
int
size_group_lookup
[
BLOCK_SIZE_TYPES
];
extern
const
PARTITION_TYPE
partition_lookup
[][
BLOCK_SIZE_TYPES
];
extern
const
BLOCK_SIZE_TYPE
subsize_lookup
[
PARTITION_TYPES
][
BLOCK_SIZE_TYPES
];
...
...
vp9/decoder/vp9_decodemv.c
View file @
d53fc9ee
...
...
@@ -385,15 +385,14 @@ static void read_intra_block_modes(VP9D_COMP *pbi, MODE_INFO *mi,
VP9_COMMON
*
const
cm
=
&
pbi
->
common
;
MB_MODE_INFO
*
const
mbmi
=
&
mi
->
mbmi
;
const
BLOCK_SIZE_TYPE
bsize
=
mi
->
mbmi
.
sb_type
;
const
int
bwl
=
b_width_log2
(
bsize
),
bhl
=
b_height_log2
(
bsize
);
if
(
bsize
>=
BLOCK_SIZE_SB8X8
)
{
const
int
size_group
=
MIN
(
3
,
MIN
(
bwl
,
bhl
))
;
const
int
size_group
=
size_group_lookup
[
bsize
]
;
mbmi
->
mode
=
read_intra_mode
(
r
,
cm
->
fc
.
y_mode_prob
[
size_group
]);
cm
->
counts
.
y_mode
[
size_group
][
mbmi
->
mode
]
++
;
}
else
{
// Only 4x4, 4x8, 8x4 blocks
const
int
bw
=
1
<<
b
wl
,
bh
=
1
<<
bhl
;
const
int
bw
=
1
<<
b
_width_log2
(
bsize
),
bh
=
1
<<
b_height_log2
(
bsize
)
;
int
idx
,
idy
;
for
(
idy
=
0
;
idy
<
2
;
idy
+=
bh
)
{
...
...
vp9/encoder/vp9_bitstream.c
View file @
d53fc9ee
...
...
@@ -443,9 +443,7 @@ static void pack_inter_mode_mvs(VP9_COMP *cpi, MODE_INFO *m,
#endif
if
(
bsize
>=
BLOCK_SIZE_SB8X8
)
{
const
int
bwl
=
b_width_log2
(
bsize
),
bhl
=
b_height_log2
(
bsize
);
const
int
bsl
=
MIN
(
bwl
,
bhl
);
write_intra_mode
(
bc
,
mode
,
pc
->
fc
.
y_mode_prob
[
MIN
(
3
,
bsl
)]);
write_intra_mode
(
bc
,
mode
,
pc
->
fc
.
y_mode_prob
[
size_group_lookup
[
bsize
]]);
}
else
{
int
idx
,
idy
;
int
num_4x4_blocks_wide
=
num_4x4_blocks_wide_lookup
[
bsize
];
...
...
Write
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!
Cancel
Please
register
or
sign in
to comment