Remove CONSTRAIN_NEIGHBORING_MIN_MAX.
Remove one of the auto partition size cases. This case can behaves badly in some types of animated content and was only used for the rd encode path. A subsequent patch will add additional checks to help further improve visual quality. Change-Id: I0ebd8da3d45ab8501afa45d7959ced8c2d60ee4e
This commit is contained in:
parent
e0786c280e
commit
287b0c6da9
@ -2157,7 +2157,6 @@ static void rd_auto_partition_range(VP9_COMP *cpi, const TileInfo *const tile,
|
|||||||
int bh, bw;
|
int bh, bw;
|
||||||
BLOCK_SIZE min_size = BLOCK_4X4;
|
BLOCK_SIZE min_size = BLOCK_4X4;
|
||||||
BLOCK_SIZE max_size = BLOCK_64X64;
|
BLOCK_SIZE max_size = BLOCK_64X64;
|
||||||
int i = 0;
|
|
||||||
int bs_hist[BLOCK_SIZES] = {0};
|
int bs_hist[BLOCK_SIZES] = {0};
|
||||||
|
|
||||||
// Trap case where we do not have a prediction.
|
// Trap case where we do not have a prediction.
|
||||||
@ -2187,36 +2186,10 @@ static void rd_auto_partition_range(VP9_COMP *cpi, const TileInfo *const tile,
|
|||||||
bs_hist);
|
bs_hist);
|
||||||
}
|
}
|
||||||
|
|
||||||
// adjust observed min and max
|
// Adjust observed min and max for "relaxed" auto partition case.
|
||||||
if (cpi->sf.auto_min_max_partition_size == RELAXED_NEIGHBORING_MIN_MAX) {
|
if (cpi->sf.auto_min_max_partition_size == RELAXED_NEIGHBORING_MIN_MAX) {
|
||||||
min_size = min_partition_size[min_size];
|
min_size = min_partition_size[min_size];
|
||||||
max_size = max_partition_size[max_size];
|
max_size = max_partition_size[max_size];
|
||||||
} else if (cpi->sf.auto_min_max_partition_size ==
|
|
||||||
CONSTRAIN_NEIGHBORING_MIN_MAX) {
|
|
||||||
// adjust the search range based on the histogram of the observed
|
|
||||||
// partition sizes from left, above the previous co-located blocks
|
|
||||||
int sum = 0;
|
|
||||||
int first_moment = 0;
|
|
||||||
int second_moment = 0;
|
|
||||||
int var_unnormalized = 0;
|
|
||||||
|
|
||||||
for (i = 0; i < BLOCK_SIZES; i++) {
|
|
||||||
sum += bs_hist[i];
|
|
||||||
first_moment += bs_hist[i] * i;
|
|
||||||
second_moment += bs_hist[i] * i * i;
|
|
||||||
}
|
|
||||||
|
|
||||||
// if variance is small enough,
|
|
||||||
// adjust the range around its mean size, which gives a tighter range
|
|
||||||
var_unnormalized = second_moment - first_moment * first_moment / sum;
|
|
||||||
if (var_unnormalized <= 4 * sum) {
|
|
||||||
int mean = first_moment / sum;
|
|
||||||
min_size = min_partition_size[mean];
|
|
||||||
max_size = max_partition_size[mean];
|
|
||||||
} else {
|
|
||||||
min_size = min_partition_size[min_size];
|
|
||||||
max_size = max_partition_size[max_size];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -115,7 +115,7 @@ static void set_good_speed_feature(VP9_COMP *cpi, VP9_COMMON *cm,
|
|||||||
FLAG_SKIP_INTRA_LOWVAR;
|
FLAG_SKIP_INTRA_LOWVAR;
|
||||||
sf->disable_filter_search_var_thresh = 100;
|
sf->disable_filter_search_var_thresh = 100;
|
||||||
sf->comp_inter_joint_search_thresh = BLOCK_SIZES;
|
sf->comp_inter_joint_search_thresh = BLOCK_SIZES;
|
||||||
sf->auto_min_max_partition_size = CONSTRAIN_NEIGHBORING_MIN_MAX;
|
sf->auto_min_max_partition_size = RELAXED_NEIGHBORING_MIN_MAX;
|
||||||
|
|
||||||
sf->allow_partition_search_skip = 1;
|
sf->allow_partition_search_skip = 1;
|
||||||
}
|
}
|
||||||
|
@ -101,8 +101,7 @@ typedef enum {
|
|||||||
typedef enum {
|
typedef enum {
|
||||||
NOT_IN_USE = 0,
|
NOT_IN_USE = 0,
|
||||||
RELAXED_NEIGHBORING_MIN_MAX = 1,
|
RELAXED_NEIGHBORING_MIN_MAX = 1,
|
||||||
CONSTRAIN_NEIGHBORING_MIN_MAX = 2,
|
STRICT_NEIGHBORING_MIN_MAX = 2
|
||||||
STRICT_NEIGHBORING_MIN_MAX = 3
|
|
||||||
} AUTO_MIN_MAX_MODE;
|
} AUTO_MIN_MAX_MODE;
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user