mirror of
https://github.com/ultravideo/uvg266.git
synced 2024-11-27 19:24:06 +00:00
Enable search for AMP blocks.
This commit is contained in:
parent
7e4f4538a4
commit
dbb9b0df85
19
src/search.c
19
src/search.c
|
@ -540,14 +540,23 @@ static double search_cu(encoder_state_t * const state, int x, int y, int depth,
|
|||
cur_cu->type = CU_INTER;
|
||||
}
|
||||
|
||||
if (depth < MAX_DEPTH && ctrl->cfg->smp_enable) {
|
||||
// Try SMP partitioning.
|
||||
static const part_mode_t smp_modes[] = {SIZE_2NxN, SIZE_Nx2N};
|
||||
for (int i = 0; i < 2; ++i) {
|
||||
if (depth < MAX_DEPTH) {
|
||||
// Try SMP and AMP partitioning.
|
||||
static const part_mode_t mp_modes[] = {
|
||||
// SMP
|
||||
SIZE_2NxN, SIZE_Nx2N,
|
||||
// AMP
|
||||
SIZE_2NxnU, SIZE_2NxnD,
|
||||
SIZE_nLx2N, SIZE_nRx2N,
|
||||
};
|
||||
|
||||
const int first_mode = ctrl->cfg->smp_enable ? 0 : 2;
|
||||
const int last_mode = (ctrl->cfg->amp_enable && cu_width >= 32) ? 5 : 1;
|
||||
for (int i = first_mode; i <= last_mode; ++i) {
|
||||
mode_cost = kvz_search_cu_smp(state,
|
||||
x, y,
|
||||
depth,
|
||||
smp_modes[i],
|
||||
mp_modes[i],
|
||||
&work_tree[depth + 1]);
|
||||
// TODO: take cost of coding part mode into account
|
||||
if (mode_cost < cost) {
|
||||
|
|
Loading…
Reference in a new issue