summaryrefslogtreecommitdiff
path: root/vp9/encoder/vp9_encodeframe.c
diff options
context:
space:
mode:
authorYunqing Wang <yunqingwang@google.com>2021-07-23 22:34:01 -0700
committerYunqing Wang <yunqingwang@google.com>2021-07-23 22:37:01 -0700
commit7c00f0ce18811dbe6d538ebda9fec7339fed3a90 (patch)
tree1df499d73fcf8bea1f72fea4d3c8fc3c7a3a8fbc /vp9/encoder/vp9_encodeframe.c
parentcf64eb2805c73f4feaac3fec2b890d2fb3eef7da (diff)
downloadlibvpx-7c00f0ce18811dbe6d538ebda9fec7339fed3a90.tar.gz
Clean up allow_partition_search_skip code
Change-Id: Ia05157fc3e613d93f10df5abddd77a740a0005ca
Diffstat (limited to 'vp9/encoder/vp9_encodeframe.c')
-rw-r--r--vp9/encoder/vp9_encodeframe.c22
1 files changed, 2 insertions, 20 deletions
diff --git a/vp9/encoder/vp9_encodeframe.c b/vp9/encoder/vp9_encodeframe.c
index 969fad59b..3c54aa548 100644
--- a/vp9/encoder/vp9_encodeframe.c
+++ b/vp9/encoder/vp9_encodeframe.c
@@ -160,6 +160,7 @@ unsigned int vp9_high_get_sby_perpixel_variance(VP9_COMP *cpi,
#endif // CONFIG_VP9_HIGHBITDEPTH
#if !CONFIG_REALTIME_ONLY
+#if CONFIG_FP_MB_STATS
static unsigned int get_sby_perpixel_diff_variance(VP9_COMP *cpi,
const struct buf_2d *ref,
int mi_row, int mi_col,
@@ -174,20 +175,8 @@ static unsigned int get_sby_perpixel_diff_variance(VP9_COMP *cpi,
var = cpi->fn_ptr[bs].vf(ref->buf, ref->stride, last_y, last->y_stride, &sse);
return ROUND_POWER_OF_TWO(var, num_pels_log2_lookup[bs]);
}
+#endif
-static BLOCK_SIZE get_rd_var_based_fixed_partition(VP9_COMP *cpi, MACROBLOCK *x,
- int mi_row, int mi_col) {
- unsigned int var = get_sby_perpixel_diff_variance(
- cpi, &x->plane[0].src, mi_row, mi_col, BLOCK_64X64);
- if (var < 8)
- return BLOCK_64X64;
- else if (var < 128)
- return BLOCK_32X32;
- else if (var < 2048)
- return BLOCK_16X16;
- else
- return BLOCK_8X8;
-}
#endif // !CONFIG_REALTIME_ONLY
static void set_segment_index(VP9_COMP *cpi, MACROBLOCK *const x, int mi_row,
@@ -4705,13 +4694,6 @@ static void encode_rd_sb_row(VP9_COMP *cpi, ThreadData *td,
set_fixed_partitioning(cpi, tile_info, mi, mi_row, mi_col, bsize);
rd_use_partition(cpi, td, tile_data, mi, tp, mi_row, mi_col, BLOCK_64X64,
&dummy_rate, &dummy_dist, 1, td->pc_root);
- } else if (cpi->partition_search_skippable_frame) {
- BLOCK_SIZE bsize;
- set_offsets(cpi, tile_info, x, mi_row, mi_col, BLOCK_64X64);
- bsize = get_rd_var_based_fixed_partition(cpi, x, mi_row, mi_col);
- set_fixed_partitioning(cpi, tile_info, mi, mi_row, mi_col, bsize);
- rd_use_partition(cpi, td, tile_data, mi, tp, mi_row, mi_col, BLOCK_64X64,
- &dummy_rate, &dummy_dist, 1, td->pc_root);
} else if (sf->partition_search_type == VAR_BASED_PARTITION &&
cm->frame_type != KEY_FRAME) {
choose_partitioning(cpi, tile_info, x, mi_row, mi_col);