Fix broken things

This commit is contained in:
Joose Sainio 2022-03-25 15:27:34 +02:00
parent 0d7800c7f1
commit 84e4fe6790
2 changed files with 5 additions and 5 deletions

View file

@ -1145,8 +1145,8 @@ static double search_cu(encoder_state_t * const state, int x, int y, int depth,
if (depth < MAX_DEPTH) { if (depth < MAX_DEPTH) {
// Add cost of cu_split_flag. // Add cost of cu_split_flag.
kvz_write_split_flag(state, &state->search_cabac, kvz_write_split_flag(state, &state->search_cabac,
x > 0 ? LCU_GET_CU_AT_PX(lcu, x -1, y ): NULL, x > 0 ? LCU_GET_CU_AT_PX(lcu,SUB_SCU(x) -1, SUB_SCU(y)): NULL,
y > 0 ? LCU_GET_CU_AT_PX(lcu, x, y - 1) : NULL, y > 0 ? LCU_GET_CU_AT_PX(lcu, SUB_SCU(x), SUB_SCU(y) - 1) : NULL,
1, depth, cu_width, x, y, &split_bits); 1, depth, cu_width, x, y, &split_bits);
} }
@ -1187,8 +1187,8 @@ static double search_cu(encoder_state_t * const state, int x, int y, int depth,
cost = 0; cost = 0;
double bits = 0; double bits = 0;
kvz_write_split_flag(state, &state->search_cabac, kvz_write_split_flag(state, &state->search_cabac,
x > 0 ? LCU_GET_CU_AT_PX(lcu, x - 1, y) : NULL, x > 0 ? LCU_GET_CU_AT_PX(lcu, SUB_SCU(x) - 1, SUB_SCU(y)) : NULL,
y > 0 ? LCU_GET_CU_AT_PX(lcu, x, y - 1) : NULL, y > 0 ? LCU_GET_CU_AT_PX(lcu, SUB_SCU(x), SUB_SCU(y) - 1) : NULL,
0, depth, cu_width, x, y, & split_bits); 0, depth, cu_width, x, y, & split_bits);
cur_cu->intra = cu_d1->intra; cur_cu->intra = cu_d1->intra;

View file

@ -2066,7 +2066,7 @@ static void search_pu_inter(encoder_state_t * const state,
assert(amvp[2].size <= MAX_UNIT_STATS_MAP_SIZE); assert(amvp[2].size <= MAX_UNIT_STATS_MAP_SIZE);
kvz_sort_keys_by_cost(&amvp[2]); kvz_sort_keys_by_cost(&amvp[2]);
if (state->encoder_control->cfg.rdo >= 2 && cur_pu->part_size == SIZE_2Nx2N) { if (amvp[2].size > 0 && state->encoder_control->cfg.rdo >= 2 && cur_pu->part_size == SIZE_2Nx2N) {
kvz_cu_cost_inter_rd2(state, x, y, depth, &amvp[2].unit[amvp[2].keys[0]], lcu, &amvp[2].cost[amvp[2].keys[0]], &amvp[2].bits[amvp[2].keys[0]]); kvz_cu_cost_inter_rd2(state, x, y, depth, &amvp[2].unit[amvp[2].keys[0]], lcu, &amvp[2].cost[amvp[2].keys[0]], &amvp[2].bits[amvp[2].keys[0]]);
} }
} }