Skip to content
GitLab
Menu
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
460501fe
Commit
460501fe
authored
Jan 10, 2013
by
Ronald S. Bultje
Committed by
Gerrit Code Review
Jan 10, 2013
Browse files
Merge "Merge superblocks64 experiment." into experimental
parents
51bae955
6884a83f
Changes
17
Hide whitespace changes
Inline
Side-by-side
configure
View file @
460501fe
...
...
@@ -239,8 +239,6 @@ HAVE_LIST="
EXPERIMENT_LIST
=
"
csm
comp_intra_pred
superblocks
superblocks64
pred_filter
lossless
subpelrefmv
...
...
vp9/common/vp9_blockd.h
View file @
460501fe
...
...
@@ -232,9 +232,7 @@ typedef enum {
typedef
enum
{
BLOCK_SIZE_MB16X16
=
0
,
BLOCK_SIZE_SB32X32
=
1
,
#if CONFIG_SUPERBLOCKS64
BLOCK_SIZE_SB64X64
=
2
,
#endif
}
BLOCK_SIZE_TYPE
;
typedef
struct
{
...
...
vp9/common/vp9_findnearmv.c
View file @
460501fe
...
...
@@ -198,7 +198,6 @@ void vp9_find_best_ref_mvs(MACROBLOCKD *xd,
above_src
+
16
,
xd
->
dst
.
y_stride
,
&
sse
);
score
+=
sse
;
}
#if CONFIG_SUPERBLOCKS64
if
(
xd
->
mode_info_context
->
mbmi
.
sb_type
>=
BLOCK_SIZE_SB64X64
)
{
vp9_sub_pixel_variance16x2
(
above_ref
+
offset
+
32
,
ref_y_stride
,
...
...
@@ -213,7 +212,6 @@ void vp9_find_best_ref_mvs(MACROBLOCKD *xd,
above_src
+
48
,
xd
->
dst
.
y_stride
,
&
sse
);
score
+=
sse
;
}
#endif
}
if
(
xd
->
left_available
)
{
vp9_sub_pixel_variance2x16_c
(
left_ref
+
offset
,
ref_y_stride
,
...
...
@@ -230,7 +228,6 @@ void vp9_find_best_ref_mvs(MACROBLOCKD *xd,
xd
->
dst
.
y_stride
,
&
sse
);
score
+=
sse
;
}
#if CONFIG_SUPERBLOCKS64
if
(
xd
->
mode_info_context
->
mbmi
.
sb_type
>=
BLOCK_SIZE_SB64X64
)
{
vp9_sub_pixel_variance2x16_c
(
left_ref
+
offset
+
ref_y_stride
*
32
,
ref_y_stride
,
...
...
@@ -247,7 +244,6 @@ void vp9_find_best_ref_mvs(MACROBLOCKD *xd,
xd
->
dst
.
y_stride
,
&
sse
);
score
+=
sse
;
}
#endif
}
#else
row_offset
=
(
this_mv
.
as_mv
.
row
>
0
)
?
...
...
@@ -263,14 +259,12 @@ void vp9_find_best_ref_mvs(MACROBLOCKD *xd,
score
+=
vp9_sad16x3
(
above_src
+
16
,
xd
->
dst
.
y_stride
,
above_ref
+
offset
+
16
,
ref_y_stride
);
}
#if CONFIG_SUPERBLOCKS64
if
(
xd
->
mode_info_context
->
mbmi
.
sb_type
>=
BLOCK_SIZE_SB64X64
)
{
score
+=
vp9_sad16x3
(
above_src
+
32
,
xd
->
dst
.
y_stride
,
above_ref
+
offset
+
32
,
ref_y_stride
);
score
+=
vp9_sad16x3
(
above_src
+
48
,
xd
->
dst
.
y_stride
,
above_ref
+
offset
+
48
,
ref_y_stride
);
}
#endif
}
if
(
xd
->
left_available
)
{
score
+=
vp9_sad3x16
(
left_src
,
xd
->
dst
.
y_stride
,
...
...
@@ -281,7 +275,6 @@ void vp9_find_best_ref_mvs(MACROBLOCKD *xd,
left_ref
+
offset
+
ref_y_stride
*
16
,
ref_y_stride
);
}
#if CONFIG_SUPERBLOCKS64
if
(
xd
->
mode_info_context
->
mbmi
.
sb_type
>=
BLOCK_SIZE_SB64X64
)
{
score
+=
vp9_sad3x16
(
left_src
+
xd
->
dst
.
y_stride
*
32
,
xd
->
dst
.
y_stride
,
...
...
@@ -292,7 +285,6 @@ void vp9_find_best_ref_mvs(MACROBLOCKD *xd,
left_ref
+
offset
+
ref_y_stride
*
48
,
ref_y_stride
);
}
#endif
}
#endif
// Add the entry to our list and then resort the list on score.
...
...
vp9/common/vp9_onyxc_int.h
View file @
460501fe
...
...
@@ -240,9 +240,7 @@ typedef struct VP9Common {
vp9_prob
prob_last_coded
;
vp9_prob
prob_gf_coded
;
vp9_prob
sb32_coded
;
#if CONFIG_SUPERBLOCKS64
vp9_prob
sb64_coded
;
#endif // CONFIG_SUPERBLOCKS64
// Context probabilities when using predictive coding of segment id
vp9_prob
segment_pred_probs
[
PREDICTION_PROBS
];
...
...
vp9/common/vp9_reconinter.c
View file @
460501fe
...
...
@@ -614,7 +614,6 @@ void vp9_build_inter32x32_predictors_sb(MACROBLOCKD *x,
#endif
}
#if CONFIG_SUPERBLOCKS64
void
vp9_build_inter64x64_predictors_sb
(
MACROBLOCKD
*
x
,
uint8_t
*
dst_y
,
uint8_t
*
dst_u
,
...
...
@@ -678,7 +677,6 @@ void vp9_build_inter64x64_predictors_sb(MACROBLOCKD *x,
}
#endif
}
#endif // CONFIG_SUPERBLOCKS64
/*
* The following functions should be called after an initial
...
...
vp9/common/vp9_reconinter.h
View file @
460501fe
...
...
@@ -54,14 +54,12 @@ extern void vp9_build_inter32x32_predictors_sb(MACROBLOCKD *x,
int
dst_ystride
,
int
dst_uvstride
);
#if CONFIG_SUPERBLOCKS64
extern
void
vp9_build_inter64x64_predictors_sb
(
MACROBLOCKD
*
x
,
uint8_t
*
dst_y
,
uint8_t
*
dst_u
,
uint8_t
*
dst_v
,
int
dst_ystride
,
int
dst_uvstride
);
#endif // CONFIG_SUPERBLOCKS64
extern
void
vp9_build_inter_predictors_mb
(
MACROBLOCKD
*
xd
);
...
...
vp9/common/vp9_reconintra.c
View file @
460501fe
...
...
@@ -703,7 +703,6 @@ void vp9_build_interintra_32x32_predictors_sb(MACROBLOCKD *xd,
vp9_build_interintra_32x32_predictors_sbuv
(
xd
,
upred
,
vpred
,
uvstride
);
}
#if CONFIG_SUPERBLOCKS64
void
vp9_build_interintra_64x64_predictors_sby
(
MACROBLOCKD
*
xd
,
uint8_t
*
ypred
,
int
ystride
)
{
...
...
@@ -744,7 +743,6 @@ void vp9_build_interintra_64x64_predictors_sb(MACROBLOCKD *xd,
vp9_build_interintra_64x64_predictors_sby
(
xd
,
ypred
,
ystride
);
vp9_build_interintra_64x64_predictors_sbuv
(
xd
,
upred
,
vpred
,
uvstride
);
}
#endif // CONFIG_SUPERBLOCKS64
#endif // CONFIG_COMP_INTERINTRA_PRED
void
vp9_build_intra_predictors_mby
(
MACROBLOCKD
*
xd
)
{
...
...
@@ -768,14 +766,12 @@ void vp9_build_intra_predictors_sby_s(MACROBLOCKD *xd) {
xd
->
up_available
,
xd
->
left_available
);
}
#if CONFIG_SUPERBLOCKS64
void
vp9_build_intra_predictors_sb64y_s
(
MACROBLOCKD
*
xd
)
{
vp9_build_intra_predictors_internal
(
xd
->
dst
.
y_buffer
,
xd
->
dst
.
y_stride
,
xd
->
dst
.
y_buffer
,
xd
->
dst
.
y_stride
,
xd
->
mode_info_context
->
mbmi
.
mode
,
64
,
xd
->
up_available
,
xd
->
left_available
);
}
#endif // CONFIG_SUPERBLOCKS64
#if CONFIG_COMP_INTRA_PRED
void
vp9_build_comp_intra_predictors_mby
(
MACROBLOCKD
*
xd
)
{
...
...
@@ -834,14 +830,12 @@ void vp9_build_intra_predictors_sbuv_s(MACROBLOCKD *xd) {
16
);
}
#if CONFIG_SUPERBLOCKS64
void
vp9_build_intra_predictors_sb64uv_s
(
MACROBLOCKD
*
xd
)
{
vp9_build_intra_predictors_mbuv_internal
(
xd
,
xd
->
dst
.
u_buffer
,
xd
->
dst
.
v_buffer
,
xd
->
dst
.
uv_stride
,
xd
->
mode_info_context
->
mbmi
.
uv_mode
,
32
);
}
#endif // CONFIG_SUPERBLOCKS64
#if CONFIG_COMP_INTRA_PRED
void
vp9_build_comp_intra_predictors_mbuv
(
MACROBLOCKD
*
xd
)
{
...
...
vp9/common/vp9_rtcd_defs.sh
View file @
460501fe
...
...
@@ -172,16 +172,12 @@ specialize vp9_build_intra_predictors_mbuv_s;
prototype void vp9_build_comp_intra_predictors_mbuv
"struct macroblockd *x"
specialize vp9_build_comp_intra_predictors_mbuv
;
if
[
"
$CONFIG_SUPERBLOCKS64
"
=
"yes"
]
;
then
prototype void vp9_build_intra_predictors_sb64y_s
"struct macroblockd *x"
specialize vp9_build_intra_predictors_sb64y_s
;
prototype void vp9_build_intra_predictors_sb64uv_s
"struct macroblockd *x"
specialize vp9_build_intra_predictors_sb64uv_s
;
fi
prototype void vp9_intra4x4_predict
"struct blockd *x, int b_mode, uint8_t *predictor"
specialize vp9_intra4x4_predict
;
...
...
vp9/decoder/vp9_decodframe.c
View file @
460501fe
...
...
@@ -172,13 +172,10 @@ static void mb_init_dequantizer(VP9D_COMP *pbi, MACROBLOCKD *xd) {
*/
static
void
skip_recon_mb
(
VP9D_COMP
*
pbi
,
MACROBLOCKD
*
xd
)
{
if
(
xd
->
mode_info_context
->
mbmi
.
ref_frame
==
INTRA_FRAME
)
{
#if CONFIG_SUPERBLOCKS64
if
(
xd
->
mode_info_context
->
mbmi
.
sb_type
==
BLOCK_SIZE_SB64X64
)
{
vp9_build_intra_predictors_sb64uv_s
(
xd
);
vp9_build_intra_predictors_sb64y_s
(
xd
);
}
else
#endif // CONFIG_SUPERBLOCKS64
if
(
xd
->
mode_info_context
->
mbmi
.
sb_type
==
BLOCK_SIZE_SB32X32
)
{
}
else
if
(
xd
->
mode_info_context
->
mbmi
.
sb_type
==
BLOCK_SIZE_SB32X32
)
{
vp9_build_intra_predictors_sbuv_s
(
xd
);
vp9_build_intra_predictors_sby_s
(
xd
);
}
else
{
...
...
@@ -186,7 +183,6 @@ static void skip_recon_mb(VP9D_COMP *pbi, MACROBLOCKD *xd) {
vp9_build_intra_predictors_mby_s
(
xd
);
}
}
else
{
#if CONFIG_SUPERBLOCKS64
if
(
xd
->
mode_info_context
->
mbmi
.
sb_type
==
BLOCK_SIZE_SB64X64
)
{
vp9_build_inter64x64_predictors_sb
(
xd
,
xd
->
dst
.
y_buffer
,
...
...
@@ -194,9 +190,7 @@ static void skip_recon_mb(VP9D_COMP *pbi, MACROBLOCKD *xd) {
xd
->
dst
.
v_buffer
,
xd
->
dst
.
y_stride
,
xd
->
dst
.
uv_stride
);
}
else
#endif // CONFIG_SUPERBLOCKS64
if
(
xd
->
mode_info_context
->
mbmi
.
sb_type
==
BLOCK_SIZE_SB32X32
)
{
}
else
if
(
xd
->
mode_info_context
->
mbmi
.
sb_type
==
BLOCK_SIZE_SB32X32
)
{
vp9_build_inter32x32_predictors_sb
(
xd
,
xd
->
dst
.
y_buffer
,
xd
->
dst
.
u_buffer
,
...
...
@@ -701,7 +695,6 @@ static void decode_4x4_sb(VP9D_COMP *pbi, MACROBLOCKD *xd,
xd
->
dst
.
uv_stride
,
xd
->
eobs
+
16
,
xd
);
};
#if CONFIG_SUPERBLOCKS64
static
void
decode_superblock64
(
VP9D_COMP
*
pbi
,
MACROBLOCKD
*
xd
,
int
mb_row
,
unsigned
int
mb_col
,
BOOL_DECODER
*
const
bc
)
{
...
...
@@ -831,7 +824,6 @@ static void decode_superblock64(VP9D_COMP *pbi, MACROBLOCKD *xd,
xd
->
left_context
=
pc
->
left_context
;
xd
->
mode_info_context
=
orig_mi
;
}
#endif // CONFIG_SUPERBLOCKS64
static
void
decode_superblock32
(
VP9D_COMP
*
pbi
,
MACROBLOCKD
*
xd
,
int
mb_row
,
unsigned
int
mb_col
,
...
...
@@ -1184,16 +1176,13 @@ static void decode_sb_row(VP9D_COMP *pbi, VP9_COMMON *pc,
vpx_memset
(
pc
->
left_context
,
0
,
sizeof
(
pc
->
left_context
));
for
(
mb_col
=
0
;
mb_col
<
pc
->
mb_cols
;
mb_col
+=
4
)
{
#if CONFIG_SUPERBLOCKS64
if
(
vp9_read
(
bc
,
pc
->
sb64_coded
))
{
set_offsets
(
pbi
,
64
,
mb_row
,
mb_col
);
vp9_decode_mb_mode_mv
(
pbi
,
xd
,
mb_row
,
mb_col
,
bc
);
set_refs
(
pbi
,
64
,
mb_row
,
mb_col
);
decode_superblock64
(
pbi
,
xd
,
mb_row
,
mb_col
,
bc
);
xd
->
corrupted
|=
bool_error
(
bc
);
}
else
#endif // CONFIG_SUPERBLOCKS64
{
}
else
{
int
j
;
for
(
j
=
0
;
j
<
4
;
j
++
)
{
...
...
@@ -1596,9 +1585,7 @@ int vp9_decode_frame(VP9D_COMP *pbi, const unsigned char **p_data_end) {
}
}
#if CONFIG_SUPERBLOCKS64
pc
->
sb64_coded
=
vp9_read_literal
(
&
header_bc
,
8
);
#endif
pc
->
sb32_coded
=
vp9_read_literal
(
&
header_bc
,
8
);
/* Read the loop filter level and type */
...
...
vp9/encoder/vp9_bitstream.c
View file @
460501fe
...
...
@@ -1122,13 +1122,10 @@ static void write_modes(VP9_COMP *cpi, vp9_writer* const bc) {
for
(
mb_row
=
0
;
mb_row
<
c
->
mb_rows
;
mb_row
+=
4
,
m_ptr
+=
4
*
mis
)
{
m
=
m_ptr
;
for
(
mb_col
=
0
;
mb_col
<
c
->
mb_cols
;
mb_col
+=
4
,
m
+=
4
)
{
#if CONFIG_SUPERBLOCKS64
vp9_write
(
bc
,
m
->
mbmi
.
sb_type
==
BLOCK_SIZE_SB64X64
,
c
->
sb64_coded
);
if
(
m
->
mbmi
.
sb_type
==
BLOCK_SIZE_SB64X64
)
{
write_modes_b
(
cpi
,
m
,
bc
,
&
tok
,
tok_end
,
mb_row
,
mb_col
);
}
else
#endif
{
}
else
{
int
j
;
for
(
j
=
0
;
j
<
4
;
j
++
)
{
...
...
@@ -1689,10 +1686,8 @@ void vp9_pack_bitstream(VP9_COMP *cpi, unsigned char *dest,
}
}
#if CONFIG_SUPERBLOCKS64
pc
->
sb64_coded
=
get_binary_prob
(
cpi
->
sb64_count
[
0
],
cpi
->
sb64_count
[
1
]);
vp9_write_literal
(
&
header_bc
,
pc
->
sb64_coded
,
8
);
#endif
pc
->
sb32_coded
=
get_binary_prob
(
cpi
->
sb32_count
[
0
],
cpi
->
sb32_count
[
1
]);
vp9_write_literal
(
&
header_bc
,
pc
->
sb32_coded
,
8
);
...
...
vp9/encoder/vp9_block.h
View file @
460501fe
...
...
@@ -180,9 +180,7 @@ typedef struct macroblock {
PICK_MODE_CONTEXT
mb_context
[
4
][
4
];
// when 4 MBs share coding parameters:
PICK_MODE_CONTEXT
sb32_context
[
4
];
#if CONFIG_SUPERBLOCKS64
PICK_MODE_CONTEXT
sb64_context
;
#endif // CONFIG_SUPERBLOCKS64
void
(
*
vp9_short_fdct4x4
)(
int16_t
*
input
,
int16_t
*
output
,
int
pitch
);
void
(
*
vp9_short_fdct8x4
)(
int16_t
*
input
,
int16_t
*
output
,
int
pitch
);
...
...
vp9/encoder/vp9_encodeframe.c
View file @
460501fe
...
...
@@ -888,7 +888,6 @@ static void pick_sb_modes(VP9_COMP *cpi,
}
}
#if CONFIG_SUPERBLOCKS64
static
void
pick_sb64_modes
(
VP9_COMP
*
cpi
,
int
mb_row
,
int
mb_col
,
...
...
@@ -924,7 +923,6 @@ static void pick_sb64_modes(VP9_COMP *cpi,
totaldist
);
}
}
#endif // CONFIG_SUPERBLOCKS64
static
void
update_stats
(
VP9_COMP
*
cpi
)
{
VP9_COMMON
*
const
cm
=
&
cpi
->
common
;
...
...
@@ -1054,7 +1052,6 @@ static void encode_sb(VP9_COMP *cpi,
#endif
}
#if CONFIG_SUPERBLOCKS64
static
void
encode_sb64
(
VP9_COMP
*
cpi
,
int
mb_row
,
int
mb_col
,
...
...
@@ -1094,7 +1091,6 @@ static void encode_sb64(VP9_COMP *cpi,
}
}
}
#endif // CONFIG_SUPERBLOCKS64
static
void
encode_sb_row
(
VP9_COMP
*
cpi
,
int
mb_row
,
...
...
@@ -1114,14 +1110,12 @@ static void encode_sb_row(VP9_COMP *cpi,
int
i
;
int
sb32_rate
=
0
,
sb32_dist
=
0
;
int
is_sb
[
4
];
#if CONFIG_SUPERBLOCKS64
int
sb64_rate
=
INT_MAX
,
sb64_dist
;
ENTROPY_CONTEXT_PLANES
l
[
4
],
a
[
4
];
TOKENEXTRA
*
tp_orig
=
*
tp
;
memcpy
(
&
a
,
cm
->
above_context
+
mb_col
,
sizeof
(
a
));
memcpy
(
&
l
,
cm
->
left_context
,
sizeof
(
l
));
#endif // CONFIG_SUPERBLOCKS64
for
(
i
=
0
;
i
<
4
;
i
++
)
{
const
int
x_idx
=
(
i
&
1
)
<<
1
,
y_idx
=
i
&
2
;
int
mb_rate
=
0
,
mb_dist
=
0
;
...
...
@@ -1163,11 +1157,9 @@ static void encode_sb_row(VP9_COMP *cpi,
// pixels of the lower level; also, inverting SB/MB order (big->small
// instead of small->big) means we can use as threshold for small, which
// may enable breakouts if RD is not good enough (i.e. faster)
encode_sb
(
cpi
,
mb_row
+
y_idx
,
mb_col
+
x_idx
,
!
CONFIG_SUPERBLOCKS64
,
tp
,
is_sb
[
i
]);
encode_sb
(
cpi
,
mb_row
+
y_idx
,
mb_col
+
x_idx
,
0
,
tp
,
is_sb
[
i
]);
}
#if CONFIG_SUPERBLOCKS64
memcpy
(
cm
->
above_context
+
mb_col
,
&
a
,
sizeof
(
a
));
memcpy
(
cm
->
left_context
,
&
l
,
sizeof
(
l
));
sb32_rate
+=
vp9_cost_bit
(
cm
->
sb64_coded
,
0
);
...
...
@@ -1184,17 +1176,13 @@ static void encode_sb_row(VP9_COMP *cpi,
RDCOST
(
x
->
rdmult
,
x
->
rddiv
,
sb32_rate
,
sb32_dist
))
{
is_sb
[
0
]
=
2
;
*
totalrate
+=
sb64_rate
;
}
else
#endif
{
}
else
{
*
totalrate
+=
sb32_rate
;
}
#if CONFIG_SUPERBLOCKS64
assert
(
tp_orig
==
*
tp
);
encode_sb64
(
cpi
,
mb_row
,
mb_col
,
tp
,
is_sb
);
assert
(
tp_orig
<
*
tp
);
#endif // CONFIG_SUPERBLOCKS64
}
}
...
...
@@ -1244,9 +1232,7 @@ static void init_encode_frame_mb_context(VP9_COMP *cpi) {
vp9_zero
(
cpi
->
common
.
fc
.
mv_ref_ct
)
vp9_zero
(
cpi
->
sb_ymode_count
)
vp9_zero
(
cpi
->
sb32_count
);
#if CONFIG_SUPERBLOCKS64
vp9_zero
(
cpi
->
sb64_count
);
#endif // CONFIG_SUPERBLOCKS64
#if CONFIG_COMP_INTERINTRA_PRED
vp9_zero
(
cpi
->
interintra_count
);
vp9_zero
(
cpi
->
interintra_select_count
);
...
...
@@ -1458,7 +1444,6 @@ static void reset_skip_txfm_size_sb32(VP9_COMP *cpi, MODE_INFO *mi,
}
}
#if CONFIG_SUPERBLOCKS64
static
void
reset_skip_txfm_size_sb64
(
VP9_COMP
*
cpi
,
MODE_INFO
*
mi
,
int
mis
,
TX_SIZE
txfm_max
,
int
mb_rows_left
,
int
mb_cols_left
)
{
...
...
@@ -1479,7 +1464,6 @@ static void reset_skip_txfm_size_sb64(VP9_COMP *cpi, MODE_INFO *mi,
set_txfm_flag
(
mi
,
mis
,
ymbs
,
xmbs
,
txfm_max
);
}
}
#endif
static
void
reset_skip_txfm_size
(
VP9_COMP
*
cpi
,
TX_SIZE
txfm_max
)
{
VP9_COMMON
*
const
cm
=
&
cpi
->
common
;
...
...
@@ -1490,13 +1474,10 @@ static void reset_skip_txfm_size(VP9_COMP *cpi, TX_SIZE txfm_max) {
for
(
mb_row
=
0
;
mb_row
<
cm
->
mb_rows
;
mb_row
+=
4
,
mi_ptr
+=
4
*
mis
)
{
mi
=
mi_ptr
;
for
(
mb_col
=
0
;
mb_col
<
cm
->
mb_cols
;
mb_col
+=
4
,
mi
+=
4
)
{
#if CONFIG_SUPERBLOCKS64
if
(
mi
->
mbmi
.
sb_type
==
BLOCK_SIZE_SB64X64
)
{
reset_skip_txfm_size_sb64
(
cpi
,
mi
,
mis
,
txfm_max
,
cm
->
mb_rows
-
mb_row
,
cm
->
mb_cols
-
mb_col
);
}
else
#endif // CONFIG_SUPERBLOCKS64
{
}
else
{
int
i
;
for
(
i
=
0
;
i
<
4
;
i
++
)
{
...
...
@@ -1924,7 +1905,6 @@ static void update_sb_skip_coeff_state(VP9_COMP *cpi,
}
}
#if CONFIG_SUPERBLOCKS64
static
void
update_sb64_skip_coeff_state
(
VP9_COMP
*
cpi
,
ENTROPY_CONTEXT_PLANES
ta
[
16
],
ENTROPY_CONTEXT_PLANES
tl
[
16
],
...
...
@@ -2038,7 +2018,6 @@ static void update_sb64_skip_coeff_state(VP9_COMP *cpi,
}
}
}
#endif // CONFIG_SUPERBLOCKS64
static
void
encode_macroblock
(
VP9_COMP
*
cpi
,
TOKENEXTRA
**
t
,
int
recon_yoffset
,
int
recon_uvoffset
,
...
...
@@ -2541,7 +2520,6 @@ static void encode_superblock32(VP9_COMP *cpi, TOKENEXTRA **t,
}
}
#if CONFIG_SUPERBLOCKS64
static
void
encode_superblock64
(
VP9_COMP
*
cpi
,
TOKENEXTRA
**
t
,
int
recon_yoffset
,
int
recon_uvoffset
,
int
output_enabled
,
int
mb_row
,
int
mb_col
)
{
...
...
@@ -2823,4 +2801,3 @@ static void encode_superblock64(VP9_COMP *cpi, TOKENEXTRA **t,
}
}
}
#endif // CONFIG_SUPERBLOCKS64
vp9/encoder/vp9_onyx_if.c
View file @
460501fe
...
...
@@ -1618,9 +1618,7 @@ VP9_PTR vp9_create_compressor(VP9_CONFIG *oxcf) {
cm
->
prob_gf_coded
=
128
;
cm
->
prob_intra_coded
=
63
;
cm
->
sb32_coded
=
200
;
#if CONFIG_SUPERBLOCKS64
cm
->
sb64_coded
=
200
;
#endif
for
(
i
=
0
;
i
<
COMP_PRED_CONTEXTS
;
i
++
)
cm
->
prob_comppred
[
i
]
=
128
;
for
(
i
=
0
;
i
<
TX_SIZE_MAX_SB
-
1
;
i
++
)
...
...
@@ -1825,12 +1823,10 @@ VP9_PTR vp9_create_compressor(VP9_CONFIG *oxcf) {
vp9_variance_halfpixvar32x32_hv
,
vp9_sad32x32x3
,
vp9_sad32x32x8
,
vp9_sad32x32x4d
)
#if CONFIG_SUPERBLOCKS64
BFP
(
BLOCK_64X64
,
vp9_sad64x64
,
vp9_variance64x64
,
vp9_sub_pixel_variance64x64
,
vp9_variance_halfpixvar64x64_h
,
vp9_variance_halfpixvar64x64_v
,
vp9_variance_halfpixvar64x64_hv
,
vp9_sad64x64x3
,
vp9_sad64x64x8
,
vp9_sad64x64x4d
)
#endif
BFP
(
BLOCK_16X16
,
vp9_sad16x16
,
vp9_variance16x16
,
vp9_sub_pixel_variance16x16
,
vp9_variance_halfpixvar16x16_h
,
vp9_variance_halfpixvar16x16_v
,
...
...
vp9/encoder/vp9_onyx_int.h
View file @
460501fe
...
...
@@ -292,9 +292,7 @@ enum BlockSize {
BLOCK_16X16
,
BLOCK_MAX_SEGMENTS
,
BLOCK_32X32
=
BLOCK_MAX_SEGMENTS
,
#if CONFIG_SUPERBLOCKS64
BLOCK_64X64
,
#endif // CONFIG_SUPERBLOCKS64
BLOCK_MAX_SB_SEGMENTS
,
};
...
...
@@ -475,9 +473,7 @@ typedef struct VP9_COMP {
int
cq_target_quality
;
int
sb32_count
[
2
];
#if CONFIG_SUPERBLOCKS64
int
sb64_count
[
2
];
#endif
int
sb_ymode_count
[
VP9_I32X32_MODES
];
int
ymode_count
[
VP9_YMODES
];
/* intra MB type cts this frame */
int
bmode_count
[
VP9_NKF_BINTRAMODES
];
...
...
vp9/encoder/vp9_rdopt.c
View file @
460501fe
...
...
@@ -982,7 +982,6 @@ static void super_block_yrd(VP9_COMP *cpi,
xd
->
left_context
=
orig_left
;
}
#if CONFIG_SUPERBLOCKS64
static
void
super_block_64_yrd
(
VP9_COMP
*
cpi
,
MACROBLOCK
*
x
,
int
*
rate
,
int
*
distortion
,
int
*
skip
,
...
...
@@ -1080,7 +1079,6 @@ static void super_block_64_yrd(VP9_COMP *cpi,
xd
->
above_context
=
orig_above
;
xd
->
left_context
=
orig_left
;
}
#endif // CONFIG_SUPERBLOCKS64
static
void
copy_predictor_8x8
(
uint8_t
*
dst
,
const
uint8_t
*
predictor
)
{
const
unsigned
int
*
p
=
(
const
unsigned
int
*
)
predictor
;
...
...
@@ -1374,7 +1372,6 @@ static int64_t rd_pick_intra_sby_mode(VP9_COMP *cpi,
return
best_rd
;
}
#if CONFIG_SUPERBLOCKS64
static
int64_t
rd_pick_intra_sb64y_mode
(
VP9_COMP
*
cpi
,
MACROBLOCK
*
x
,
int
*
rate
,
...
...
@@ -1414,7 +1411,6 @@ static int64_t rd_pick_intra_sb64y_mode(VP9_COMP *cpi,
return
best_rd
;
}
#endif // CONFIG_SUPERBLOCKS64
static
int64_t
rd_pick_intra16x16mby_mode
(
VP9_COMP
*
cpi
,
MACROBLOCK
*
x
,
...
...
@@ -1893,7 +1889,6 @@ static int64_t rd_inter32x32_uv(VP9_COMP *cpi, MACROBLOCK *x, int *rate,
return
RDCOST
(
x
->
rdmult
,
x
->
rddiv
,
*
rate
,
*
distortion
);
}
#if CONFIG_SUPERBLOCKS64
static
void
super_block_64_uvrd
(
MACROBLOCK
*
x
,
int
*
rate
,
int
*
distortion
,
int
*
skip
);
static
int64_t
rd_inter64x64_uv
(
VP9_COMP
*
cpi
,
MACROBLOCK
*
x
,
int
*
rate
,
...
...
@@ -1901,7 +1896,6 @@ static int64_t rd_inter64x64_uv(VP9_COMP *cpi, MACROBLOCK *x, int *rate,
super_block_64_uvrd
(
x
,
rate
,
distortion
,
skip
);
return
RDCOST
(
x
->
rdmult
,
x
->
rddiv
,
*
rate
,
*
distortion
);
}
#endif // CONFIG_SUPERBLOCKS64
static
int64_t
rd_inter4x4_uv
(
VP9_COMP
*
cpi
,
MACROBLOCK
*
x
,
int
*
rate
,
int
*
distortion
,
int
*
skip
,
int
fullpixel
)
{
...
...
@@ -2102,7 +2096,6 @@ static void super_block_uvrd(MACROBLOCK *x,
}
}
#if CONFIG_SUPERBLOCKS64
static
void
super_block_64_uvrd
(
MACROBLOCK
*
x
,
int
*
rate
,
int
*
distortion
,
...
...
@@ -2184,7 +2177,6 @@ static void super_block_64_uvrd(MACROBLOCK *x,
xd
->
left_context
=
tl_orig
;
xd
->
above_context
=
ta_orig
;
}
#endif // CONFIG_SUPERBLOCKS64
static
int64_t
rd_pick_intra_sbuv_mode
(
VP9_COMP
*
cpi
,
MACROBLOCK
*
x
,
...
...
@@ -2223,7 +2215,6 @@ static int64_t rd_pick_intra_sbuv_mode(VP9_COMP *cpi,
return
best_rd
;
}
#if CONFIG_SUPERBLOCKS64
static
int64_t
rd_pick_intra_sb64uv_mode
(
VP9_COMP
*
cpi
,
MACROBLOCK
*
x
,
int
*
rate
,
...
...
@@ -2260,7 +2251,6 @@ static int64_t rd_pick_intra_sb64uv_mode(VP9_COMP *cpi,
return
best_rd
;
}
#endif // CONFIG_SUPERBLOCKS64
int
vp9_cost_mv_ref
(
VP9_COMP
*
cpi
,
MB_PREDICTION_MODE
m
,
...
...
@@ -3548,7 +3538,6 @@ static int64_t handle_inter_mode(VP9_COMP *cpi, MACROBLOCK *x,
}
#endif
#if CONFIG_SUPERBLOCKS64
if
(
block_size
==
BLOCK_64X64
)
{
vp9_build_inter64x64_predictors_sb
(
xd
,
xd
->
dst
.
y_buffer
,
...
...
@@ -3556,9 +3545,7 @@ static int64_t handle_inter_mode(VP9_COMP *cpi, MACROBLOCK *x,
xd
->
dst
.
v_buffer
,
xd
->
dst
.
y_stride
,
xd
->
dst
.
uv_stride
);
}
else
#endif // CONFIG_SUPERBLOCKS64
if
(
block_size
==
BLOCK_32X32
)
{
}
else
if
(
block_size
==
BLOCK_32X32
)
{
vp9_build_inter32x32_predictors_sb
(
xd
,
xd
->
dst
.
y_buffer
,
xd
->
dst
.
u_buffer
,
...
...
@@ -3587,13 +3574,10 @@ static int64_t handle_inter_mode(VP9_COMP *cpi, MACROBLOCK *x,
if
(
threshold
<
x
->
encode_breakout
)
threshold
=
x
->
encode_breakout
;
#if CONFIG_SUPERBLOCKS64
if
(
block_size
==
BLOCK_64X64
)
{
var
=
vp9_variance64x64
(
*
(
b
->
base_src
),
b
->
src_stride
,
xd
->
dst
.
y_buffer
,
xd
->
dst
.
y_stride
,
&
sse
);
}
else
#endif // CONFIG_SUPERBLOCKS64
if
(
block_size
==
BLOCK_32X32
)
{
}
else
if
(
block_size
==
BLOCK_32X32
)
{
var
=
vp9_variance32x32
(
*
(
b
->
base_src
),
b
->
src_stride
,
xd
->
dst
.
y_buffer
,
xd
->
dst
.
y_stride
,
&
sse
);
}
else
{
...
...
@@ -3611,7 +3595,6 @@ static int64_t handle_inter_mode(VP9_COMP *cpi, MACROBLOCK *x,
// Check u and v to make sure skip is ok
int
sse2
;
#if CONFIG_SUPERBLOCKS64
if
(
block_size
==
BLOCK_64X64
)
{
unsigned
int
sse2u
,
sse2v
;
var
=
vp9_variance32x32
(
x
->
src
.
u_buffer
,
x
->
src
.
uv_stride
,
...
...
@@ -3619,9 +3602,7 @@ static int64_t handle_inter_mode(VP9_COMP *cpi, MACROBLOCK *x,
var
=
vp9_variance32x32
(
x
->
src
.
v_buffer
,
x
->
src
.
uv_stride
,
xd
->
dst
.
v_buffer
,
xd
->
dst
.
uv_stride
,
&
sse2v
);
sse2
=
sse2u
+
sse2v
;
}
else
#endif // CONFIG_SUPERBLOCKS64
if
(
block_size
==
BLOCK_32X32
)
{
}
else
if
(
block_size
==
BLOCK_32X32
)
{
unsigned
int
sse2u
,
sse2v
;
var
=
vp9_variance16x16
(
x
->
src
.
u_buffer
,
x
->
src
.
uv_stride
,
xd
->
dst
.
u_buffer
,
xd
->
dst
.
uv_stride
,
&
sse2u
);
...
...
@@ -3661,7 +3642,6 @@ static int64_t handle_inter_mode(VP9_COMP *cpi, MACROBLOCK *x,
}
if
(
!
x
->
skip
)
{
#if CONFIG_SUPERBLOCKS64
if
(
block_size
==
BLOCK_64X64
)
{
int
skippable_y
,
skippable_uv
;
...
...
@@ -3677,9 +3657,7 @@ static int64_t handle_inter_mode(VP9_COMP *cpi, MACROBLOCK *x,
*
rate2
+=
*
rate_uv
;