mirror of
https://github.com/ultravideo/uvg266.git
synced 2024-11-24 02:24:07 +00:00
Disable TMVP in frames with zero L0 references
This commit is contained in:
parent
b4de1878be
commit
95effb00d0
|
@ -763,7 +763,7 @@ static void kvz_encoder_state_write_bitstream_slice_header_independent(
|
|||
//WRITE_UE(stream, 0, "short_term_ref_pic_set_idx");
|
||||
|
||||
if (state->encoder_control->cfg.tmvp_enable) {
|
||||
WRITE_U(stream, 1, 1, "slice_temporal_mvp_enabled_flag");
|
||||
WRITE_U(stream, ref_negative?1:0, 1, "slice_temporal_mvp_enabled_flag");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -787,7 +787,7 @@ static void kvz_encoder_state_write_bitstream_slice_header_independent(
|
|||
}
|
||||
|
||||
// Temporal Motion Vector Prediction flags
|
||||
if (state->encoder_control->cfg->tmvp_enable && ref_negative > 1) {
|
||||
if (state->encoder_control->cfg.tmvp_enable && ref_negative > 0) {
|
||||
if (state->frame->slicetype == KVZ_SLICE_B) {
|
||||
// Always use L0 for prediction
|
||||
WRITE_U(stream, 1, 1, "collocated_from_l0_flag");
|
||||
|
|
|
@ -1360,13 +1360,9 @@ uint8_t kvz_inter_get_merge_cand(const encoder_state_t * const state,
|
|||
|
||||
cu_info_t *c3_L0 = NULL;
|
||||
cu_info_t *h_L0 = NULL;
|
||||
|
||||
cu_info_t *c3_L1 = NULL;
|
||||
cu_info_t *h_L1 = NULL;
|
||||
|
||||
// Fetch temporal candidates for the current CU, , L0[0]
|
||||
kvz_inter_get_temporal_merge_candidates(state, x, y, width, height, &c3_L0, &h_L0, 1, 0);
|
||||
//kvz_inter_get_temporal_merge_candidates(state, x, y, width, height, &c3_L1, &h_L1, 2, 0);
|
||||
|
||||
cu_info_t *selected_CU = NULL;
|
||||
|
||||
|
|
Loading…
Reference in a new issue