X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=src%2Fgdcmmpeg2%2Fsrc%2Fmpeg2dec%2Fgethdr.c;h=c128f010d79f756c05183595f380ef4c24f417d2;hb=98cf38e32be18dc2b7d3d1a13e45f60717b008bc;hp=4155ec559e2c88097f386ebe8c26147107e10a7b;hpb=ccc606678fca0bc69bcc76384459682ccef01f17;p=gdcm.git diff --git a/src/gdcmmpeg2/src/mpeg2dec/gethdr.c b/src/gdcmmpeg2/src/mpeg2dec/gethdr.c index 4155ec55..c128f010 100644 --- a/src/gdcmmpeg2/src/mpeg2dec/gethdr.c +++ b/src/gdcmmpeg2/src/mpeg2dec/gethdr.c @@ -27,8 +27,6 @@ * */ -#include - #include "config.h" #include "global.h" @@ -138,9 +136,11 @@ void next_start_code() static void sequence_header() { int i; +#ifdef VERBOSE int pos; pos = ld->Bitcnt; +#endif /* VERBOSE */ horizontal_size = Get_Bits(12); vertical_size = Get_Bits(12); aspect_ratio_information = Get_Bits(4); @@ -214,14 +214,15 @@ static void sequence_header() /* ISO/IEC 13818-2 section 6.2.2.6 */ static void group_of_pictures_header() { +#ifdef VERBOSE int pos; - + pos = ld->Bitcnt; +#endif /* VERBOSE */ if (ld == &base) { Temporal_Reference_Base = True_Framenum_max + 1; /* *CH* */ Temporal_Reference_GOP_Reset = 1; } - pos = ld->Bitcnt; drop_flag = Get_Bits(1); hour = Get_Bits(5); minute = Get_Bits(6); @@ -259,13 +260,15 @@ static void group_of_pictures_header() /* ISO/IEC 13818-2 section 6.2.3 */ static void picture_header() { - int pos; int Extra_Information_Byte_Count; +#ifdef VERBOSE + int pos; + pos = ld->Bitcnt; +#endif /* VERBOSE */ /* unless later overwritten by picture_spatial_scalable_extension() */ ld->pict_scal = 0; - pos = ld->Bitcnt; temporal_reference = Get_Bits(10); picture_coding_type = Get_Bits(3); vbv_delay = Get_Bits(16); @@ -310,6 +313,7 @@ static void picture_header() Extra_Information_Byte_Count = extra_bit_information(); + (void)Extra_Information_Byte_Count; extension_and_user_data(); @@ -324,12 +328,14 @@ int slice_header() { int slice_vertical_position_extension; int quantizer_scale_code; + int slice_picture_id_enable; + int slice_picture_id; + int extra_information_slice; +#ifdef VERBOSE int pos; - int slice_picture_id_enable = 0; - int slice_picture_id = 0; - int extra_information_slice = 0; pos = ld->Bitcnt; +#endif /* VERBOSE */ slice_vertical_position_extension = (ld->MPEG2_Flag && vertical_size>2800) ? Get_Bits(3) : 0; @@ -349,8 +355,11 @@ int slice_header() slice_picture_id_enable = Get_Bits(1); slice_picture_id = Get_Bits(6); + (void)slice_picture_id_enable; + (void)slice_picture_id; extra_information_slice = extra_bit_information(); + (void)extra_information_slice; } else ld->intra_slice = 0; @@ -458,10 +467,10 @@ static void sequence_extension() int vertical_size_extension; int bit_rate_extension; int vbv_buffer_size_extension; +#ifdef VERBOSE int pos; /* derive bit position for trace */ -#ifdef VERBOSE pos = ld->Bitcnt; #endif @@ -556,9 +565,11 @@ static void sequence_extension() static void sequence_display_extension() { +#ifdef VERBOSE int pos; pos = ld->Bitcnt; +#endif /* VERBOSE */ video_format = Get_Bits(3); color_description = Get_Bits(1); @@ -607,9 +618,11 @@ static void sequence_display_extension() static void quant_matrix_extension() { int i; +#ifdef VERBOSE int pos; pos = ld->Bitcnt; +#endif /* VERBOSE */ if((ld->load_intra_quantizer_matrix = Get_Bits(1))) { @@ -669,9 +682,11 @@ static void quant_matrix_extension() /* ISO/IEC 13818-2 section 6.2.2.5 */ static void sequence_scalable_extension() { +#ifdef VERBOSE int pos; pos = ld->Bitcnt; +#endif /* VERBOSE */ /* values (without the +1 offset) of scalable_mode are defined in Table 6-10 of ISO/IEC 13818-2 */ @@ -733,9 +748,11 @@ static void picture_display_extension() { int i; int number_of_frame_center_offsets; +#ifdef VERBOSE int pos; pos = ld->Bitcnt; +#endif /* VERBOSE */ /* based on ISO/IEC 13818-2 section 6.3.12 (November 1994) Picture display extensions */ @@ -808,9 +825,11 @@ static void picture_display_extension() /* decode picture coding extension */ static void picture_coding_extension() { +#ifdef VERBOSE int pos; pos = ld->Bitcnt; +#endif /* VERBOSE */ f_code[0][0] = Get_Bits(4); f_code[0][1] = Get_Bits(4); @@ -884,9 +903,11 @@ static void picture_coding_extension() /* ISO/IEC 13818-2 section 6.2.3.5. */ static void picture_spatial_scalable_extension() { +#ifdef VERBOSE int pos; pos = ld->Bitcnt; +#endif /* VERBOSE */ ld->pict_scal = 1; /* use spatial scalability in this picture */ @@ -963,11 +984,13 @@ static int extra_bit_information() /* Purpose: this function is mainly designed to aid in bitstream conformance testing. A simple Flush_Buffer(1) would do */ void marker_bit(text) -char *text; +const char *text; { int marker; + (void)text; marker = Get_Bits(1); + (void)marker; #ifdef VERIFY if(!marker) @@ -992,10 +1015,12 @@ static void user_data() static void copyright_extension() { - int pos; int reserved_data; +#ifdef VERBOSE + int pos; pos = ld->Bitcnt; +#endif /* VERBOSE */ copyright_flag = Get_Bits(1); @@ -1004,6 +1029,7 @@ static void copyright_extension() /* reserved */ reserved_data = Get_Bits(7); + (void)reserved_data; marker_bit("copyright_extension(), first marker bit"); copyright_number_1 = Get_Bits(20); @@ -1012,6 +1038,7 @@ static void copyright_extension() marker_bit("copyright_extension(), third marker bit"); copyright_number_3 = Get_Bits(22); +#ifdef VERBOSE if(Verbose_Flag>NO_LAYER) { printf("copyright_extension (byte %d)\n",(pos>>3)-4); @@ -1029,6 +1056,7 @@ static void copyright_extension() printf(" copyright_number_3=%d\n",copyright_number_3); } } +#endif /* VERBOSE */ #ifdef VERIFY verify_copyright_extension++;