mirror of
https://github.com/ultravideo/uvg266.git
synced 2024-11-23 18:14:06 +00:00
Use a transform split for SMP and AMP blocks
This commit is contained in:
parent
c74ede148b
commit
fc43643ba5
|
@ -349,11 +349,9 @@ encoder_control_t* kvz_encoder_control_init(const kvz_config *const cfg)
|
|||
|
||||
encoder->lcu_dqp_enabled = cfg->target_bitrate > 0 || encoder->cfg.roi.dqps;
|
||||
|
||||
// When tr_depth_inter is equal to 0, inter transform split flag defaults
|
||||
// to 1 for SMP and AMP partition units. We want to avoid the extra
|
||||
// transform split so we set tr_depth_inter to 1 when SMP or AMP
|
||||
// partition modes are enabled.
|
||||
encoder->tr_depth_inter = (encoder->cfg.smp_enable || encoder->cfg.amp_enable) ? 1 : 0;
|
||||
// NOTE: When tr_depth_inter is equal to 0, the transform is still split
|
||||
// for SMP and AMP partition units.
|
||||
encoder->tr_depth_inter = 0;
|
||||
|
||||
//Tiles
|
||||
encoder->tiles_enable = encoder->cfg.tiles_width_count > 1 ||
|
||||
|
|
|
@ -533,7 +533,10 @@ static double search_cu(encoder_state_t * const state, int x, int y, int depth,
|
|||
} else if (cur_cu->type == CU_INTER) {
|
||||
// Reset transform depth because intra messes with them.
|
||||
// This will no longer be necessary if the transform depths are not shared.
|
||||
int tr_depth = depth > 0 ? depth : 1;
|
||||
int tr_depth = MAX(1, depth);
|
||||
if (cur_cu->part_size != SIZE_2Nx2N) {
|
||||
tr_depth = depth + 1;
|
||||
}
|
||||
kvz_lcu_set_trdepth(lcu, x, y, depth, tr_depth);
|
||||
|
||||
const int num_pu = kvz_part_mode_num_parts[cur_cu->part_size];
|
||||
|
|
Loading…
Reference in a new issue