Fix several build warnings and minor bugs

This commit is contained in:
Cameron Gutman
2022-11-20 19:20:42 -06:00
parent 56f84ab662
commit 098f53cd0b
11 changed files with 16 additions and 18 deletions

View File

@@ -32,7 +32,8 @@
FILE* h264_dbgfile = NULL;
#define printf(...) fprintf((h264_dbgfile == NULL ? stdout : h264_dbgfile), __VA_ARGS__)
void fake_printf(int, ...) {}
#define printf(...) fake_printf(0, __VA_ARGS__)
/**
Calculate the log base 2 of the argument, rounded up.
@@ -554,7 +555,7 @@ void read_pic_parameter_set_rbsp(h264_stream_t* h, bs_t* b)
if( 1 ) { have_more_data = more_rbsp_data(h, b); }
if( 0 )
{
have_more_data = pps->transform_8x8_mode_flag | pps->pic_scaling_matrix_present_flag | pps->second_chroma_qp_index_offset != 0;
have_more_data = pps->transform_8x8_mode_flag | pps->pic_scaling_matrix_present_flag | (pps->second_chroma_qp_index_offset != 0);
}
if( have_more_data )
@@ -1441,7 +1442,7 @@ void write_pic_parameter_set_rbsp(h264_stream_t* h, bs_t* b)
if( 0 ) { have_more_data = more_rbsp_data(h, b); }
if( 1 )
{
have_more_data = pps->transform_8x8_mode_flag | pps->pic_scaling_matrix_present_flag | pps->second_chroma_qp_index_offset != 0;
have_more_data = pps->transform_8x8_mode_flag | pps->pic_scaling_matrix_present_flag | (pps->second_chroma_qp_index_offset != 0);
}
if( have_more_data )
@@ -2328,7 +2329,7 @@ void read_debug_pic_parameter_set_rbsp(h264_stream_t* h, bs_t* b)
if( 1 ) { have_more_data = more_rbsp_data(h, b); }
if( 0 )
{
have_more_data = pps->transform_8x8_mode_flag | pps->pic_scaling_matrix_present_flag | pps->second_chroma_qp_index_offset != 0;
have_more_data = pps->transform_8x8_mode_flag | pps->pic_scaling_matrix_present_flag | (pps->second_chroma_qp_index_offset != 0);
}
if( have_more_data )