diff --git a/src/bitstream.c b/src/bitstream.c index 680230f3..49dc637b 100644 --- a/src/bitstream.c +++ b/src/bitstream.c @@ -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) { +#if VERBOSE + printf("%-40s u(%d) : %d\n", "rbsp_stop_one_bit", 1, 1); +#endif kvz_bitstream_put(stream, 1, 1); kvz_bitstream_align_zero(stream); } diff --git a/src/encoder_state-bitstream.c b/src/encoder_state-bitstream.c index 3c7e9a8a..ac381eb6 100644 --- a/src/encoder_state-bitstream.c +++ b/src/encoder_state-bitstream.c @@ -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, "field_seq_flag"); + WRITE_U(stream, 0, 1, "chroma_loc_info_present_flag"); + if (encoder->cfg.vui.overscan > 0) { WRITE_U(stream, 1, 1, "overscan_info_present_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, 1, 1, "video_signal_type_present_flag"); + WRITE_U(stream, encoder->cfg.vui.fullrange, 1, "video_full_range_flag"); + //IF overscan info //ENDIF + /* if (encoder->cfg.vui.videoformat != 5 || encoder->cfg.vui.fullrange != 0 || encoder->cfg.vui.colorprim != 2 || @@ -315,6 +322,8 @@ static void encoder_state_write_bitstream_VUI(bitstream_t *stream, //IF bitstream restriction //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_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); diff --git a/src/nal.c b/src/nal.c index 989be93c..2f686c07 100644 --- a/src/nal.c +++ b/src/nal.c @@ -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", "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", "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 }