mirror of
https://github.com/ultravideo/uvg266.git
synced 2024-11-23 18:14:06 +00:00
Merge branch 'fix-intra-in-ra' into 'master'
Fix intra in ra See merge request cs/ultravideo/vvc/uvg266!9
This commit is contained in:
commit
f94102f061
|
@ -1338,7 +1338,7 @@ void kvz_encode_coding_tree(encoder_state_t * const state,
|
|||
}
|
||||
|
||||
// Prediction mode
|
||||
if (state->frame->slicetype != KVZ_SLICE_I) {
|
||||
if (state->frame->slicetype != KVZ_SLICE_I && cu_width != 4) {
|
||||
|
||||
int8_t ctx_predmode = 0;
|
||||
|
||||
|
|
|
@ -1120,6 +1120,9 @@ static void kvz_encoder_state_write_bitstream_picture_header(
|
|||
WRITE_U(stream, 0, 1, "ph_mvd_l1_zero_flag");
|
||||
}
|
||||
|
||||
if (encoder->cfg.jccr) {
|
||||
WRITE_U(stream, 0, 1, "ph_joint_cbcr_sign_flag");
|
||||
}
|
||||
// END PICTURE HEADER
|
||||
|
||||
}
|
||||
|
@ -1223,7 +1226,7 @@ static void kvz_encoder_state_write_bitstream_ref_pic_list(
|
|||
}
|
||||
}
|
||||
|
||||
if (ref_negative > 1 || ref_positive > 1) {
|
||||
if ( (state->frame->slicetype != KVZ_SLICE_I && ref_negative > 1 )|| ref_positive > 1) {
|
||||
WRITE_U(stream, 1, 1, "sh_num_ref_idx_active_override_flag");
|
||||
if (ref_negative > 1) for(int list = 0; list < 1 + copy_rpl1_from_rpl0; list++) WRITE_UE(stream, ref_negative - 1, "sh_num_ref_idx_active_minus1[0]");
|
||||
if (!copy_rpl1_from_rpl0 && ref_positive > 1) WRITE_UE(stream, ref_positive - 1, "sh_num_ref_idx_active_minus1[1]");
|
||||
|
@ -1239,7 +1242,7 @@ void kvz_encoder_state_write_bitstream_slice_header(
|
|||
const encoder_control_t * const encoder = state->encoder_control;
|
||||
|
||||
#ifdef KVZ_DEBUG
|
||||
printf("=========== Slice ===========\n");
|
||||
printf("=========== Slice =========== %d\n", state->frame->poc);
|
||||
#endif
|
||||
/*
|
||||
bool first_slice_segment_in_pic = (state->slice->start_in_rs == 0);
|
||||
|
@ -1254,16 +1257,11 @@ void kvz_encoder_state_write_bitstream_slice_header(
|
|||
|
||||
WRITE_U(stream, 1, 1, "picture_header_in_slice_header_flag");
|
||||
|
||||
kvz_encoder_state_write_bitstream_picture_header(stream, state);
|
||||
|
||||
if (encoder->cfg.jccr) {
|
||||
WRITE_U(stream, 0, 1, "ph_joint_cbcr_sign_flag");
|
||||
}
|
||||
kvz_encoder_state_write_bitstream_picture_header(stream, state);
|
||||
|
||||
if (state->frame->pictype != KVZ_NAL_IDR_W_RADL
|
||||
&& state->frame->pictype != KVZ_NAL_IDR_N_LP) {
|
||||
WRITE_UE(stream, state->frame->slicetype, "sh_slice_type");
|
||||
kvz_encoder_state_write_bitstream_ref_pic_list(stream, state);
|
||||
}
|
||||
|
||||
if (state->frame->pictype == KVZ_NAL_CRA_NUT || state->frame->pictype == KVZ_NAL_IDR_N_LP || state->frame->pictype == KVZ_NAL_IDR_W_RADL || state->frame->pictype == KVZ_NAL_GDR_NUT)
|
||||
|
@ -1315,6 +1313,11 @@ void kvz_encoder_state_write_bitstream_slice_header(
|
|||
}
|
||||
}
|
||||
|
||||
if (state->frame->pictype != KVZ_NAL_IDR_W_RADL
|
||||
&& state->frame->pictype != KVZ_NAL_IDR_N_LP) {
|
||||
kvz_encoder_state_write_bitstream_ref_pic_list(stream, state);
|
||||
}
|
||||
|
||||
if (state->frame->slicetype != KVZ_SLICE_I && state->encoder_control->cfg.tmvp_enable) {
|
||||
int ref_negative = 0;
|
||||
int ref_positive = 0;
|
||||
|
|
|
@ -77,7 +77,7 @@ void kvz_nal_write(bitstream_t * const bitstream, const uint8_t nal_type,
|
|||
printf("%-50s u(%d) : %d\n", "zero_tid_required_flag", 1, 0);
|
||||
printf("%-50s u(%d) : %d\n", "nuh_temporal_id_plus1", 3, temporal_id + 1);
|
||||
printf("%-50s u(%d) : %d\n", "nal_unit_type_lsb", 4, nal_type);
|
||||
printf("%-50s u(%d) : %d\n", "nuh_layer_id_plus1", 7, 0);
|
||||
printf("%-50s u(%d) : %d\n", "nuh_layer_id_plus1", 7, 1);
|
||||
printf("%-50s u(%d) : %d\n", "nuh_reserved_zero_bit", 1, 0);
|
||||
#endif
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue