mirror of
https://github.com/ultravideo/uvg266.git
synced 2024-11-28 03:34:06 +00:00
Fixed VUI header writing. Fixed debug prints of NAL headers and rbsp_stop_one_bit.
This commit is contained in:
parent
8282a18c36
commit
76d56290ed
|
@ -265,6 +265,9 @@ void kvz_bitstream_put_se(bitstream_t *stream, int32_t data)
|
||||||
*/
|
*/
|
||||||
void kvz_bitstream_add_rbsp_trailing_bits(bitstream_t * const stream)
|
void kvz_bitstream_add_rbsp_trailing_bits(bitstream_t * const stream)
|
||||||
{
|
{
|
||||||
|
#if VERBOSE
|
||||||
|
printf("%-40s u(%d) : %d\n", "rbsp_stop_one_bit", 1, 1);
|
||||||
|
#endif
|
||||||
kvz_bitstream_put(stream, 1, 1);
|
kvz_bitstream_put(stream, 1, 1);
|
||||||
kvz_bitstream_align_zero(stream);
|
kvz_bitstream_align_zero(stream);
|
||||||
}
|
}
|
||||||
|
|
|
@ -250,6 +250,9 @@ static void encoder_state_write_bitstream_VUI(bitstream_t *stream,
|
||||||
|
|
||||||
WRITE_U(stream, 0, 1, "colour_description_present_flag");
|
WRITE_U(stream, 0, 1, "colour_description_present_flag");
|
||||||
|
|
||||||
|
WRITE_U(stream, 0, 1, "field_seq_flag");
|
||||||
|
WRITE_U(stream, 0, 1, "chroma_loc_info_present_flag");
|
||||||
|
|
||||||
if (encoder->cfg.vui.overscan > 0) {
|
if (encoder->cfg.vui.overscan > 0) {
|
||||||
WRITE_U(stream, 1, 1, "overscan_info_present_flag");
|
WRITE_U(stream, 1, 1, "overscan_info_present_flag");
|
||||||
WRITE_U(stream, encoder->cfg.vui.overscan - 1, 1, "overscan_appropriate_flag");
|
WRITE_U(stream, encoder->cfg.vui.overscan - 1, 1, "overscan_appropriate_flag");
|
||||||
|
@ -257,9 +260,13 @@ static void encoder_state_write_bitstream_VUI(bitstream_t *stream,
|
||||||
WRITE_U(stream, 0, 1, "overscan_info_present_flag");
|
WRITE_U(stream, 0, 1, "overscan_info_present_flag");
|
||||||
|
|
||||||
|
|
||||||
|
WRITE_U(stream, 1, 1, "video_signal_type_present_flag");
|
||||||
|
WRITE_U(stream, encoder->cfg.vui.fullrange, 1, "video_full_range_flag");
|
||||||
|
|
||||||
//IF overscan info
|
//IF overscan info
|
||||||
//ENDIF
|
//ENDIF
|
||||||
|
|
||||||
|
/*
|
||||||
if (encoder->cfg.vui.videoformat != 5 ||
|
if (encoder->cfg.vui.videoformat != 5 ||
|
||||||
encoder->cfg.vui.fullrange != 0 ||
|
encoder->cfg.vui.fullrange != 0 ||
|
||||||
encoder->cfg.vui.colorprim != 2 ||
|
encoder->cfg.vui.colorprim != 2 ||
|
||||||
|
@ -315,6 +322,8 @@ static void encoder_state_write_bitstream_VUI(bitstream_t *stream,
|
||||||
|
|
||||||
//IF bitstream restriction
|
//IF bitstream restriction
|
||||||
//ENDIF
|
//ENDIF
|
||||||
|
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -526,9 +535,9 @@ if (encoder->scaling_list.enable) {
|
||||||
WRITE_U(stream, 0, 1, "vui_hrd_parameters_present_flag");
|
WRITE_U(stream, 0, 1, "vui_hrd_parameters_present_flag");
|
||||||
}
|
}
|
||||||
|
|
||||||
WRITE_U(stream, 0, 1, "vui_parameters_present_flag");
|
WRITE_U(stream, 1, 1, "vui_parameters_present_flag");
|
||||||
|
|
||||||
//encoder_state_write_bitstream_VUI(stream, state);
|
encoder_state_write_bitstream_VUI(stream, state);
|
||||||
|
|
||||||
encoder_state_write_bitstream_SPS_extension(stream, state);
|
encoder_state_write_bitstream_SPS_extension(stream, state);
|
||||||
|
|
||||||
|
|
|
@ -70,8 +70,8 @@ void kvz_nal_write(bitstream_t * const bitstream, const uint8_t nal_type,
|
||||||
printf("%-40s u(%d) : %d\n", "zero_tid_required_flag", 1, zero_tid_required_flag);
|
printf("%-40s u(%d) : %d\n", "zero_tid_required_flag", 1, zero_tid_required_flag);
|
||||||
printf("%-40s u(%d) : %d\n", "nuh_temporal_id_plus1", 3, temporal_id + 1);
|
printf("%-40s u(%d) : %d\n", "nuh_temporal_id_plus1", 3, temporal_id + 1);
|
||||||
printf("%-40s u(%d) : %d\n", "nal_unit_type_lsb", 4, nal_type_lsb);
|
printf("%-40s u(%d) : %d\n", "nal_unit_type_lsb", 4, nal_type_lsb);
|
||||||
printf("%-40s u(%d) : %d\n", "nuh_layer_id_plus1", 6, 1);
|
printf("%-40s u(%d) : %d\n", "nuh_layer_id_plus1", 7, 1);
|
||||||
|
printf("%-40s u(%d) : %d\n", "nuh_reserved_zero_bit", 1, 0);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue