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
9f988a2e
Commit
9f988a2e
authored
Aug 05, 2013
by
Jim Bankoski
Committed by
Gerrit Code Review
Aug 05, 2013
Browse files
Options
Browse Files
Download
Plain Diff
Merge "cleanups after bw bh code"
parents
9ab47772
5d2cb7ea
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
34 additions
and
36 deletions
+34
-36
vp9/common/vp9_common_data.c
vp9/common/vp9_common_data.c
+4
-4
vp9/common/vp9_common_data.h
vp9/common/vp9_common_data.h
+0
-3
vp9/encoder/vp9_bitstream.c
vp9/encoder/vp9_bitstream.c
+9
-8
vp9/encoder/vp9_encodeframe.c
vp9/encoder/vp9_encodeframe.c
+13
-13
vp9/encoder/vp9_rdopt.c
vp9/encoder/vp9_rdopt.c
+8
-8
No files found.
vp9/common/vp9_common_data.c
View file @
9f988a2e
...
...
@@ -48,25 +48,25 @@ const PARTITION_TYPE partition_lookup[][BLOCK_SIZE_TYPES] = {
PARTITION_INVALID
,
PARTITION_INVALID
,
PARTITION_INVALID
,
PARTITION_INVALID
},
{
// 8X8
// 4X4, 4X8,8X4,8X8,8X16,16X8,16X16,16X32,32X16,32X32,32X64,64X32,64X64
// 4X4, 4X8,8X4,8X8,8X16,16X8,16X16,16X32,32X16,32X32,32X64,64X32,64X64
PARTITION_SPLIT
,
PARTITION_VERT
,
PARTITION_HORZ
,
PARTITION_NONE
,
PARTITION_INVALID
,
PARTITION_INVALID
,
PARTITION_INVALID
,
PARTITION_INVALID
,
PARTITION_INVALID
,
PARTITION_INVALID
,
PARTITION_INVALID
,
PARTITION_INVALID
,
PARTITION_INVALID
},
{
// 16X16
// 4X4, 4X8,8X4,8X8,8X16,16X8,16X16,16X32,32X16,32X32,32X64,64X32,64X64
// 4X4, 4X8,8X4,8X8,8X16,16X8,16X16,16X32,32X16,32X32,32X64,64X32,64X64
PARTITION_SPLIT
,
PARTITION_SPLIT
,
PARTITION_SPLIT
,
PARTITION_SPLIT
,
PARTITION_VERT
,
PARTITION_HORZ
,
PARTITION_NONE
,
PARTITION_INVALID
,
PARTITION_INVALID
,
PARTITION_INVALID
,
PARTITION_INVALID
,
PARTITION_INVALID
,
PARTITION_INVALID
},
{
// 32X32
// 4X4, 4X8,8X4,8X8,8X16,16X8,16X16,16X32,32X16,32X32,32X64,64X32,64X64
// 4X4, 4X8,8X4,8X8,8X16,16X8,16X16,16X32,32X16,32X32,32X64,64X32,64X64
PARTITION_SPLIT
,
PARTITION_SPLIT
,
PARTITION_SPLIT
,
PARTITION_SPLIT
,
PARTITION_SPLIT
,
PARTITION_SPLIT
,
PARTITION_SPLIT
,
PARTITION_VERT
,
PARTITION_HORZ
,
PARTITION_NONE
,
PARTITION_INVALID
,
PARTITION_INVALID
,
PARTITION_INVALID
},
{
// 64X64
// 4X4, 4X8,8X4,8X8,8X16,16X8,16X16,16X32,32X16,32X32,32X64,64X32,64X64
// 4X4, 4X8,8X4,8X8,8X16,16X8,16X16,16X32,32X16,32X32,32X64,64X32,64X64
PARTITION_SPLIT
,
PARTITION_SPLIT
,
PARTITION_SPLIT
,
PARTITION_SPLIT
,
PARTITION_SPLIT
,
PARTITION_SPLIT
,
PARTITION_SPLIT
,
PARTITION_SPLIT
,
PARTITION_SPLIT
,
PARTITION_SPLIT
,
PARTITION_VERT
,
PARTITION_HORZ
,
...
...
vp9/common/vp9_common_data.h
View file @
9f988a2e
...
...
@@ -23,10 +23,7 @@ extern const int num_4x4_blocks_high_lookup[BLOCK_SIZE_TYPES];
extern
const
int
num_4x4_blocks_wide_lookup
[
BLOCK_SIZE_TYPES
];
extern
const
int
size_group_lookup
[
BLOCK_SIZE_TYPES
];
extern
const
int
num_pels_log2_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
];
extern
const
TX_SIZE
max_txsize_lookup
[
BLOCK_SIZE_TYPES
];
extern
const
TX_SIZE
max_uv_txsize_lookup
[
BLOCK_SIZE_TYPES
];
...
...
vp9/encoder/vp9_bitstream.c
View file @
9f988a2e
...
...
@@ -449,13 +449,14 @@ static void pack_inter_mode_mvs(VP9_COMP *cpi, MODE_INFO *m, vp9_writer *bc) {
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
];
int
num_4x4_blocks_high
=
num_4x4_blocks_high_lookup
[
bsize
];
for
(
idy
=
0
;
idy
<
2
;
idy
+=
num_4x4_blocks_high
)
const
int
num_4x4_blocks_wide
=
num_4x4_blocks_wide_lookup
[
bsize
];
const
int
num_4x4_blocks_high
=
num_4x4_blocks_high_lookup
[
bsize
];
for
(
idy
=
0
;
idy
<
2
;
idy
+=
num_4x4_blocks_high
)
{
for
(
idx
=
0
;
idx
<
2
;
idx
+=
num_4x4_blocks_wide
)
{
const
MB_PREDICTION_MODE
bm
=
m
->
bmi
[
idy
*
2
+
idx
].
as_mode
;
write_intra_mode
(
bc
,
bm
,
pc
->
fc
.
y_mode_prob
[
0
]);
}
}
}
write_intra_mode
(
bc
,
mi
->
uv_mode
,
pc
->
fc
.
uv_mode_prob
[
mode
]);
}
else
{
...
...
@@ -489,8 +490,8 @@ static void pack_inter_mode_mvs(VP9_COMP *cpi, MODE_INFO *m, vp9_writer *bc) {
int
j
;
MB_PREDICTION_MODE
blockmode
;
int_mv
blockmv
;
int
num_4x4_blocks_wide
=
num_4x4_blocks_wide_lookup
[
bsize
];
int
num_4x4_blocks_high
=
num_4x4_blocks_high_lookup
[
bsize
];
const
int
num_4x4_blocks_wide
=
num_4x4_blocks_wide_lookup
[
bsize
];
const
int
num_4x4_blocks_high
=
num_4x4_blocks_high_lookup
[
bsize
];
int
idx
,
idy
;
for
(
idy
=
0
;
idy
<
2
;
idy
+=
num_4x4_blocks_high
)
{
for
(
idx
=
0
;
idx
<
2
;
idx
+=
num_4x4_blocks_wide
)
{
...
...
@@ -553,11 +554,11 @@ static void write_mb_modes_kf(const VP9_COMP *cpi, MODE_INFO *m,
write_intra_mode
(
bc
,
ym
,
vp9_kf_y_mode_prob
[
A
][
L
]);
}
else
{
int
idx
,
idy
;
int
num_4x4_blocks_wide
=
num_4x4_blocks_wide_lookup
[
m
->
mbmi
.
sb_type
];
int
num_4x4_blocks_high
=
num_4x4_blocks_high_lookup
[
m
->
mbmi
.
sb_type
];
const
int
num_4x4_blocks_wide
=
num_4x4_blocks_wide_lookup
[
m
->
mbmi
.
sb_type
];
const
int
num_4x4_blocks_high
=
num_4x4_blocks_high_lookup
[
m
->
mbmi
.
sb_type
];
for
(
idy
=
0
;
idy
<
2
;
idy
+=
num_4x4_blocks_high
)
{
for
(
idx
=
0
;
idx
<
2
;
idx
+=
num_4x4_blocks_wide
)
{
int
i
=
idy
*
2
+
idx
;
const
int
i
=
idy
*
2
+
idx
;
const
MB_PREDICTION_MODE
A
=
above_block_mode
(
m
,
i
,
mis
);
const
MB_PREDICTION_MODE
L
=
(
xd
->
left_available
||
idx
)
?
left_block_mode
(
m
,
i
)
:
DC_PRED
;
...
...
vp9/encoder/vp9_encodeframe.c
View file @
9f988a2e
...
...
@@ -340,8 +340,8 @@ static void update_state(VP9_COMP *cpi, PICK_MODE_CONTEXT *ctx,
int
mb_mode_index
=
ctx
->
best_mode_index
;
const
int
mis
=
cpi
->
common
.
mode_info_stride
;
const
int
mi_height
=
num_8x8_blocks_high_lookup
[
bsize
];
const
int
mi_width
=
num_8x8_blocks_wide_lookup
[
bsize
];
const
int
mi_height
=
num_8x8_blocks_high_lookup
[
bsize
];
assert
(
mi
->
mbmi
.
mode
<
MB_MODE_COUNT
);
assert
(
mb_mode_index
<
MAX_MODES
);
...
...
@@ -697,12 +697,12 @@ static void restore_context(VP9_COMP *cpi, int mi_row, int mi_col,
ENTROPY_CONTEXT
l
[
16
*
MAX_MB_PLANE
],
PARTITION_CONTEXT
sa
[
8
],
PARTITION_CONTEXT
sl
[
8
],
BLOCK_SIZE_TYPE
bsize
)
{
VP9_COMMON
*
const
cm
=
&
cpi
->
common
;
MACROBLOCK
*
const
x
=
&
cpi
->
mb
;
MACROBLOCKD
*
const
xd
=
&
x
->
e_mbd
;
VP9_COMMON
*
const
cm
=
&
cpi
->
common
;
MACROBLOCK
*
const
x
=
&
cpi
->
mb
;
MACROBLOCKD
*
const
xd
=
&
x
->
e_mbd
;
int
p
;
int
num_4x4_blocks_wide
=
num_4x4_blocks_wide_lookup
[
bsize
];
int
num_4x4_blocks_high
=
num_4x4_blocks_high_lookup
[
bsize
];
const
int
num_4x4_blocks_wide
=
num_4x4_blocks_wide_lookup
[
bsize
];
const
int
num_4x4_blocks_high
=
num_4x4_blocks_high_lookup
[
bsize
];
int
mi_width
=
num_8x8_blocks_wide_lookup
[
bsize
];
int
mi_height
=
num_8x8_blocks_high_lookup
[
bsize
];
for
(
p
=
0
;
p
<
MAX_MB_PLANE
;
p
++
)
{
...
...
@@ -728,12 +728,12 @@ static void save_context(VP9_COMP *cpi, int mi_row, int mi_col,
ENTROPY_CONTEXT
l
[
16
*
MAX_MB_PLANE
],
PARTITION_CONTEXT
sa
[
8
],
PARTITION_CONTEXT
sl
[
8
],
BLOCK_SIZE_TYPE
bsize
)
{
VP9_COMMON
*
const
cm
=
&
cpi
->
common
;
MACROBLOCK
*
const
x
=
&
cpi
->
mb
;
MACROBLOCKD
*
const
xd
=
&
x
->
e_mbd
;
const
VP9_COMMON
*
const
cm
=
&
cpi
->
common
;
const
MACROBLOCK
*
const
x
=
&
cpi
->
mb
;
const
MACROBLOCKD
*
const
xd
=
&
x
->
e_mbd
;
int
p
;
int
num_4x4_blocks_wide
=
num_4x4_blocks_wide_lookup
[
bsize
];
int
num_4x4_blocks_high
=
num_4x4_blocks_high_lookup
[
bsize
];
const
int
num_4x4_blocks_wide
=
num_4x4_blocks_wide_lookup
[
bsize
];
const
int
num_4x4_blocks_high
=
num_4x4_blocks_high_lookup
[
bsize
];
int
mi_width
=
num_8x8_blocks_wide_lookup
[
bsize
];
int
mi_height
=
num_8x8_blocks_high_lookup
[
bsize
];
...
...
@@ -1199,8 +1199,8 @@ static void rd_use_partition(VP9_COMP *cpi, MODE_INFO *m, TOKENEXTRA **tp,
MACROBLOCKD
*
xd
=
&
cpi
->
mb
.
e_mbd
;
const
int
mis
=
cm
->
mode_info_stride
;
int
bsl
=
b_width_log2
(
bsize
);
int
num_4x4_blocks_wide
=
num_4x4_blocks_wide_lookup
[
bsize
];
int
num_4x4_blocks_high
=
num_4x4_blocks_high_lookup
[
bsize
];
const
int
num_4x4_blocks_wide
=
num_4x4_blocks_wide_lookup
[
bsize
];
const
int
num_4x4_blocks_high
=
num_4x4_blocks_high_lookup
[
bsize
];
int
ms
=
num_4x4_blocks_wide
/
2
;
int
mh
=
num_4x4_blocks_high
/
2
;
int
bss
=
(
1
<<
bsl
)
/
4
;
...
...
vp9/encoder/vp9_rdopt.c
View file @
9f988a2e
...
...
@@ -1199,8 +1199,8 @@ static int64_t rd_pick_intra4x4block(VP9_COMP *cpi, MACROBLOCK *x, int ib,
ENTROPY_CONTEXT
ta
[
2
],
tempa
[
2
];
ENTROPY_CONTEXT
tl
[
2
],
templ
[
2
];
TX_TYPE
tx_type
=
DCT_DCT
;
int
num_4x4_blocks_wide
=
num_4x4_blocks_wide_lookup
[
bsize
];
int
num_4x4_blocks_high
=
num_4x4_blocks_high_lookup
[
bsize
];
const
int
num_4x4_blocks_wide
=
num_4x4_blocks_wide_lookup
[
bsize
];
const
int
num_4x4_blocks_high
=
num_4x4_blocks_high_lookup
[
bsize
];
int
idx
,
idy
,
block
;
uint8_t
best_dst
[
8
*
8
];
...
...
@@ -1313,8 +1313,8 @@ static int64_t rd_pick_intra_sub_8x8_y_mode(VP9_COMP * const cpi,
int
i
,
j
;
MACROBLOCKD
*
const
xd
=
&
mb
->
e_mbd
;
BLOCK_SIZE_TYPE
bsize
=
xd
->
mode_info_context
->
mbmi
.
sb_type
;
int
num_4x4_blocks_wide
=
num_4x4_blocks_wide_lookup
[
bsize
];
int
num_4x4_blocks_high
=
num_4x4_blocks_high_lookup
[
bsize
];
const
int
num_4x4_blocks_wide
=
num_4x4_blocks_wide_lookup
[
bsize
];
const
int
num_4x4_blocks_high
=
num_4x4_blocks_high_lookup
[
bsize
];
int
idx
,
idy
;
int
cost
=
0
;
int64_t
total_distortion
=
0
;
...
...
@@ -1598,8 +1598,8 @@ static int labels2mode(MACROBLOCK *x, int i,
MB_MODE_INFO
*
mbmi
=
&
mic
->
mbmi
;
int
cost
=
0
,
thismvcost
=
0
;
int
idx
,
idy
;
int
num_4x4_blocks_wide
=
num_4x4_blocks_wide_lookup
[
mbmi
->
sb_type
];
int
num_4x4_blocks_high
=
num_4x4_blocks_high_lookup
[
mbmi
->
sb_type
];
const
int
num_4x4_blocks_wide
=
num_4x4_blocks_wide_lookup
[
mbmi
->
sb_type
];
const
int
num_4x4_blocks_high
=
num_4x4_blocks_high_lookup
[
mbmi
->
sb_type
];
/* We have to be careful retrieving previously-encoded motion vectors.
Ones from this macroblock have to be pulled from the BLOCKD array
...
...
@@ -1818,8 +1818,8 @@ static void rd_check_segment_txsize(VP9_COMP *cpi, MACROBLOCK *x,
int
label_mv_thresh
;
int
segmentyrate
=
0
;
BLOCK_SIZE_TYPE
bsize
=
mbmi
->
sb_type
;
int
num_4x4_blocks_wide
=
num_4x4_blocks_wide_lookup
[
bsize
];
int
num_4x4_blocks_high
=
num_4x4_blocks_high_lookup
[
bsize
];
const
int
num_4x4_blocks_wide
=
num_4x4_blocks_wide_lookup
[
bsize
];
const
int
num_4x4_blocks_high
=
num_4x4_blocks_high_lookup
[
bsize
];
vp9_variance_fn_ptr_t
*
v_fn_ptr
;
ENTROPY_CONTEXT
t_above
[
2
],
t_left
[
2
];
BEST_SEG_INFO
*
bsi
=
bsi_buf
+
filter_idx
;
...
...
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