Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Xiph.Org
aom-rav1e
Commits
e8dfbcf3
Commit
e8dfbcf3
authored
May 12, 2017
by
Luc Trudeau
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[CFL] Remove explicit dependency on EC_ADAPT
Change-Id: I3e3d458aec7e26abc366992ac20f9fa838fe35bb
parent
04120190
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
12 deletions
+31
-12
av1/encoder/encodemb.c
av1/encoder/encodemb.c
+11
-7
av1/encoder/encodemb.h
av1/encoder/encodemb.h
+2
-1
av1/encoder/rdopt.c
av1/encoder/rdopt.c
+18
-4
No files found.
av1/encoder/encodemb.c
View file @
e8dfbcf3
...
...
@@ -1436,8 +1436,15 @@ void av1_encode_block_intra(int plane, int block, int blk_row, int blk_col,
uint8_t
*
dst
=
&
pd
->
dst
.
buf
[(
blk_row
*
dst_stride
+
blk_col
)
<<
tx_size_wide_log2
[
0
]];
#if CONFIG_CFL
av1_predict_intra_block_encoder_facade
(
x
,
plane
,
block
,
blk_col
,
blk_row
,
tx_size
,
plane_bsize
);
#if CONFIG_EC_ADAPT
FRAME_CONTEXT
*
const
ec_ctx
=
xd
->
tile_ctx
;
#else
FRAME_CONTEXT
*
const
ec_ctx
=
cm
->
fc
;
#endif // CONFIG_EC_ADAPT
av1_predict_intra_block_encoder_facade
(
x
,
ec_ctx
,
plane
,
block
,
blk_col
,
blk_row
,
tx_size
,
plane_bsize
);
#else
av1_predict_intra_block_facade
(
xd
,
plane
,
block
,
blk_col
,
blk_row
,
tx_size
);
#endif
...
...
@@ -1630,7 +1637,8 @@ static int cfl_compute_alpha_ind(MACROBLOCK *const x, const CFL_CTX *const cfl,
return
ind
;
}
void
av1_predict_intra_block_encoder_facade
(
MACROBLOCK
*
x
,
int
plane
,
void
av1_predict_intra_block_encoder_facade
(
MACROBLOCK
*
x
,
FRAME_CONTEXT
*
ec_ctx
,
int
plane
,
int
block_idx
,
int
blk_col
,
int
blk_row
,
TX_SIZE
tx_size
,
BLOCK_SIZE
plane_bsize
)
{
...
...
@@ -1638,10 +1646,6 @@ void av1_predict_intra_block_encoder_facade(MACROBLOCK *x, int plane,
MB_MODE_INFO
*
mbmi
=
&
xd
->
mi
[
0
]
->
mbmi
;
if
(
plane
!=
AOM_PLANE_Y
&&
mbmi
->
uv_mode
==
DC_PRED
)
{
if
(
blk_col
==
0
&&
blk_row
==
0
&&
plane
==
AOM_PLANE_U
)
{
#if !CONFIG_EC_ADAPT
#error "CfL rate estimation requires ec_adapt."
#endif
FRAME_CONTEXT
*
const
ec_ctx
=
xd
->
tile_ctx
;
assert
(
ec_ctx
->
cfl_alpha_cdf
[
CFL_ALPHABET_SIZE
-
1
]
==
AOM_ICDF
(
CDF_PROB_TOP
));
const
int
prob_den
=
CDF_PROB_TOP
;
...
...
av1/encoder/encodemb.h
View file @
e8dfbcf3
...
...
@@ -86,7 +86,8 @@ void av1_store_pvq_enc_info(PVQ_INFO *pvq_info, int *qg, int *theta, int *k,
#endif
#if CONFIG_CFL
void
av1_predict_intra_block_encoder_facade
(
MACROBLOCK
*
x
,
int
plane
,
void
av1_predict_intra_block_encoder_facade
(
MACROBLOCK
*
x
,
FRAME_CONTEXT
*
ec_ctx
,
int
plane
,
int
block_idx
,
int
blk_col
,
int
blk_row
,
TX_SIZE
tx_size
,
BLOCK_SIZE
plane_bsize
);
...
...
av1/encoder/rdopt.c
View file @
e8dfbcf3
...
...
@@ -1538,8 +1538,15 @@ static void block_rd_txfm(int plane, int block, int blk_row, int blk_col,
if (!is_inter_block(mbmi)) {
#if CONFIG_CFL
av1_predict_intra_block_encoder_facade(x, plane, block, blk_col, blk_row,
tx_size, plane_bsize);
#if CONFIG_EC_ADAPT
FRAME_CONTEXT *const ec_ctx = xd->tile_ctx;
#else
FRAME_CONTEXT *const ec_ctx = cm->fc;
#endif // CONFIG_EC_ADAPT
av1_predict_intra_block_encoder_facade(x, ec_ctx, plane, block, blk_col,
blk_row, tx_size, plane_bsize);
#else
av1_predict_intra_block_facade(xd, plane, block, blk_col, blk_row, tx_size);
#endif
...
...
@@ -2356,8 +2363,15 @@ static int64_t intra_model_yrd(const AV1_COMP *const cpi, MACROBLOCK *const x,
#if CONFIG_CFL
const struct macroblockd_plane *const pd = &xd->plane[0];
const BLOCK_SIZE plane_bsize = get_plane_block_size(bsize, pd);
av1_predict_intra_block_encoder_facade(x, 0, block, col, row, tx_size,
plane_bsize);
#if CONFIG_EC_ADAPT
FRAME_CONTEXT *const ec_ctx = xd->tile_ctx;
#else
FRAME_CONTEXT *const ec_ctx = cm->fc;
#endif // CONFIG_EC_ADAPT
av1_predict_intra_block_encoder_facade(x, ec_ctx, 0, block, col, row,
tx_size, plane_bsize);
#else
av1_predict_intra_block_facade(xd, 0, block, col, row, tx_size);
#endif
...
...
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