Commit bf828f93 authored by Rupert Swarbrick's avatar Rupert Swarbrick

Fix build of encodeframe.c without motion-var or warped-motion

This patch surrounds two uses of motion_mode_cost and motion_mode_cdf
with preprocessor #if lines.

Both uses were added by commit bdc8dab2.

Change-Id: I7e4a74e97b9179e42bae6ee17e9b2094acb992f2
parent 766c9d59
...@@ -4639,11 +4639,13 @@ static void encode_rd_sb_row(AV1_COMP *cpi, ThreadData *td, ...@@ -4639,11 +4639,13 @@ static void encode_rd_sb_row(AV1_COMP *cpi, ThreadData *td,
#endif // CONFIG_SPEED_REFS #endif // CONFIG_SPEED_REFS
} }
} }
#if CONFIG_MOTION_VAR || CONFIG_WARPED_MOTION
// TODO(yuec) Suboptimal fix. Need to implement per-block update // TODO(yuec) Suboptimal fix. Need to implement per-block update
for (int i = BLOCK_8X8; i < BLOCK_SIZES_ALL; i++) { for (int i = BLOCK_8X8; i < BLOCK_SIZES_ALL; i++) {
av1_cost_tokens_from_cdf(x->motion_mode_cost[i], av1_cost_tokens_from_cdf(x->motion_mode_cost[i],
xd->tile_ctx->motion_mode_cdf[i], NULL); xd->tile_ctx->motion_mode_cdf[i], NULL);
} }
#endif
} }
static void init_encode_frame_mb_context(AV1_COMP *cpi) { static void init_encode_frame_mb_context(AV1_COMP *cpi) {
...@@ -4885,10 +4887,12 @@ void av1_encode_tile(AV1_COMP *cpi, ThreadData *td, int tile_row, ...@@ -4885,10 +4887,12 @@ void av1_encode_tile(AV1_COMP *cpi, ThreadData *td, int tile_row,
av1_setup_across_tile_boundary_info(cm, tile_info); av1_setup_across_tile_boundary_info(cm, tile_info);
#if CONFIG_MOTION_VAR || CONFIG_WARPED_MOTION
for (int i = BLOCK_8X8; i < BLOCK_SIZES_ALL; i++) { for (int i = BLOCK_8X8; i < BLOCK_SIZES_ALL; i++) {
av1_cost_tokens_from_cdf(td->mb.motion_mode_cost[i], av1_cost_tokens_from_cdf(td->mb.motion_mode_cost[i],
cm->fc->motion_mode_cdf[i], NULL); cm->fc->motion_mode_cdf[i], NULL);
} }
#endif
for (mi_row = tile_info->mi_row_start; mi_row < tile_info->mi_row_end; for (mi_row = tile_info->mi_row_start; mi_row < tile_info->mi_row_end;
mi_row += cm->mib_size) { mi_row += cm->mib_size) {
encode_rd_sb_row(cpi, td, this_tile, mi_row, &tok); encode_rd_sb_row(cpi, td, this_tile, mi_row, &tok);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment