本文整理汇总了C++中Get_B1函数的典型用法代码示例。如果您正苦于以下问题:C++ Get_B1函数的具体用法?C++ Get_B1怎么用?C++ Get_B1使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了Get_B1函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Skip_B2
//---------------------------------------------------------------------------
void File_Sdp::Header_Parse()
{
//Parsing
int8u Length, FormatCode;
Skip_B2( "Identifier");
Get_B1 (Length, "Length");
Get_B1 (FormatCode, "Format Code");
for (int8u Pos=0; Pos<5; Pos++)
{
FieldLines[Pos]=0;
#if MEDIAINFO_TRACE
Element_Begin1("Field/Line");
BS_Begin();
Info_SB( Field, "Field Number");
Info_S1(2, Reserved, "Reserved");
Info_S1(5, Line, "Line Number");
BS_End();
FieldLines[Pos]=((Field?1:0)<<7) |(Reserved<<5) | Line; //Removing field information ((Field?1:0)<<7) |
if (FieldLines[Pos])
{
Element_Info1(Field?2:1);
Element_Info1(Line);
}
else
Element_Info1("None");
Element_End0();
#else //MEDIAINFO_TRACE
Get_B1(FieldLines[Pos], "Field/Line");
FieldLines[Pos]&=0x7F; //Removing field information
#endif //MEDIAINFO_TRACE
}
Header_Fill_Size(3+Length);
}
示例2: Element_Begin1
//---------------------------------------------------------------------------
void File_Dpx::GenericSectionHeader_Dpx_ImageElement()
{
Element_Begin1("image element");
int8u Descriptor, TransferCharacteristic, ColorimetricSpecification, BitDephs;
Info_B4(DataSign, "Data sign");Param_Info1((DataSign==0?"unsigned":"signed"));
Skip_B4( "Reference low data code value");
Skip_BF4( "Reference low quantity represented");
Skip_B4( "Reference high data code value");
Skip_BF4( "Reference high quantity represented");
Get_B1 (Descriptor, "Descriptor");Param_Info1(DPX_Descriptors(Descriptor));
Get_B1 (TransferCharacteristic, "Transfer characteristic");Param_Info1(DPX_TransferCharacteristic(TransferCharacteristic));
Get_B1 (ColorimetricSpecification, "Colorimetric specification");Param_Info1(DPX_ColorimetricSpecification(ColorimetricSpecification));
Get_B1 (BitDephs, "Bit depth");Param_Info1(DPX_ValidBitDephs(BitDephs));
Info_B2(ComponentDataPackingMethod, "Packing");Param_Info1((ComponentDataPackingMethod<8?DPX_ComponentDataPackingMethod[ComponentDataPackingMethod]:"invalid"));
Info_B2(ComponentDataEncodingMethod, "Encoding");Param_Info1((ComponentDataEncodingMethod<8?DPX_ComponentDataEncodingMethod[ComponentDataEncodingMethod]:"invalid"));
Skip_B4( "Offset to data");
Skip_B4( "End-of-line padding");
Skip_B4( "End-of-image padding");
Skip_UTF8(32, "Description of image element");
Element_End0();
FILLING_BEGIN();
if (Frame_Count==0)
{
Fill(StreamKind_Last, StreamPos_Last, "ColorSpace", DPX_Descriptors_ColorSpace(Descriptor));
Fill(StreamKind_Last, StreamPos_Last, "ChromaSubsampling", DPX_Descriptors_ChromaSubsampling(Descriptor));
Fill(StreamKind_Last, StreamPos_Last, "BitDepth", BitDephs);
Fill(StreamKind_Last, StreamPos_Last, "colour_description_present", "Yes");
Fill(StreamKind_Last, StreamPos_Last, "colour_primaries", DPX_TransferCharacteristic(TransferCharacteristic));
Fill(StreamKind_Last, StreamPos_Last, "transfer_characteristics", DPX_ColorimetricSpecification(ColorimetricSpecification));
}
FILLING_END();
}
示例3: Get_B1
//---------------------------------------------------------------------------
void File_Mpeg4_Descriptors::Header_Parse()
{
//Parsing
size_t Size=0;
int8u type, Size_ToAdd;
Get_B1(type, "type");
if (type==0)
{
Header_Fill_Code(0x00, "Padding");
Header_Fill_Size(1);
return;
}
do
{
Get_B1(Size_ToAdd, "size");
Size=(Size<<7) | (Size_ToAdd&0x7F);
}
while (Size_ToAdd&0x80);
//Filling
Header_Fill_Code(type, Ztring().From_CC1(type));
if (Element_Offset+Size>=Element_Size)
Size=(size_t)(Element_Size-Element_Offset); //Found one file with too big size but content is OK, cutting the block
Header_Fill_Size(Element_Offset+Size);
}
示例4: Get_B1
//---------------------------------------------------------------------------
void File_DvbSubtitle::Header_Parse()
{
//Parsing
int8u sync_byte;
Get_B1 (sync_byte, "sync_byte");
switch (sync_byte)
{
case 0xFF : //Stuffing
MustFindDvbHeader=true;
//Filling
Header_Fill_Code(0xFF, "end of PES data field marker");
Header_Fill_Size(1);
return;
default : ; //Normal (0x0F)
}
int16u segment_length;
int8u segment_type;
Get_B1 (segment_type, "segment_type");
Get_B2 (page_id, "page_id");
Get_B2 (segment_length, "segment_length");
//Filling
Header_Fill_Code(segment_type);
Header_Fill_Size(Element_Offset+segment_length);
}
示例5: Element_Begin1
//---------------------------------------------------------------------------
void File_Jpeg::APP0_AVI1()
{
//Parsing
int8u FieldOrder=(int8u)-1;
Element_Begin1("AVI1");
if (Element_Size==16-4)
{
Get_B1 (FieldOrder, "Field Order");
Skip_XX(7, "Zeroes");
}
if (Element_Size==18-4)
{
Get_B1 (FieldOrder, "Field Order");
Skip_B1( "Zero");
Skip_B4( "Size of 1st Field");
Skip_B4( "Size of 2nd Field");
}
Element_End0();
FILLING_BEGIN();
if (Frame_Count==0 && Field_Count==0)
{
switch (FieldOrder)
{
case 0x00 : Fill(Stream_Video, 0, Video_Interlacement, "PPF"); Fill(Stream_Video, 0, Video_ScanType, "Progressive"); break;
case 0x01 : Fill(Stream_Video, 0, Video_Interlacement, "TFF"); Fill(Stream_Video, 0, Video_ScanType, "Interlaced"); Fill(Stream_Video, 0, Video_ScanOrder, "TFF"); Height_Multiplier=2; break;
case 0x02 : Fill(Stream_Video, 0, Video_Interlacement, "BFF"); Fill(Stream_Video, 0, Video_ScanType, "Interlaced"); Fill(Stream_Video, 0, Video_ScanOrder, "BFF"); Height_Multiplier=2; break;
default : ;
}
}
FILLING_END();
}
示例6: Get_B1
//---------------------------------------------------------------------------
void File_Jpeg::SOF_()
{
//Parsing
int16u Height, Width;
int8u Resolution, Count;
Get_B1 (Resolution, "Resolution");
Get_B2 (Height, "Height");
Get_B2 (Width, "Width");
Get_B1 (Count, "Number of image components in frame");
for (int8u Pos=0; Pos<Count; Pos++)
{
Skip_B1( "Identifier");
Skip_B1( "sampling factor");
Skip_B1( "Quantization table destination selector");
}
FILLING_BEGIN();
Stream_Prepare(Stream_General);
Fill(Stream_General, 0, General_Format, "JPEG");
if (Count_Get(StreamKind)==0)
Stream_Prepare(StreamKind);
Fill(StreamKind, 0, "Format", StreamKind==Stream_Image?"JPEG":"M-JPEG");
Fill(StreamKind, 0, "Codec", StreamKind==Stream_Image?"JPEG":"M-JPEG");
if (StreamKind==Stream_Image)
Fill(Stream_Image, 0, Image_Codec_String, "JPEG"); //To Avoid automatic filling
Fill(StreamKind, 0, "Resolution", Resolution*3);
Fill(StreamKind, 0, "Height", Height*Height_Multiplier);
Fill(StreamKind, 0, "Width", Width);
FILLING_END();
}
示例7: Element_Name
//---------------------------------------------------------------------------
// Packet "B0"
void File_AvsV::video_sequence_start()
{
Element_Name("video_sequence_start");
//Parsing
int32u bit_rate_upper, bit_rate_lower;
Get_B1 ( profile_id, "profile_id");
Get_B1 ( level_id, "level_id");
BS_Begin();
Get_SB ( progressive_sequence, "progressive_sequence");
Get_S2 (14, horizontal_size, "horizontal_size");
Get_S2 (14, vertical_size, "vertical_size");
Get_S1 ( 2, chroma_format, "chroma_format");
Skip_S1( 3, "sample_precision");
Get_S1 ( 4, aspect_ratio, "aspect_ratio"); Param_Info(AvsV_aspect_ratio[aspect_ratio]);
Get_S1 ( 4, frame_rate_code, "frame_rate_code"); Param_Info(AvsV_frame_rate[frame_rate_code]);
Get_S3 (18, bit_rate_lower, "bit_rate_lower");
Mark_1 ();
Get_S3 (12, bit_rate_upper, "bit_rate_upper");
bit_rate=(bit_rate_upper<<18)+bit_rate_lower; Param_Info(bit_rate*8, " bps");
Get_SB ( low_delay, "low_delay");
Mark_1 ();
Skip_S3(18, "bbv_buffer_size");
Skip_SB( "reserved");
Skip_SB( "reserved");
Skip_SB( "reserved");
BS_End();
//Not sure, but the 3 first official files have this
if (Element_Size-Element_Offset)
{
BS_Begin();
Mark_1();
BS_End();
}
FILLING_BEGIN();
//NextCode
NextCode_Clear();
NextCode_Add(0xB2); //user_data_start
NextCode_Add(0xB3); //picture_start (I)
NextCode_Add(0xB5); //extension_start
//Autorisation of other streams
Streams[0xB1].Searching_Payload=true, //video_sequence_end
Streams[0xB2].Searching_Payload=true; //user_data_start
Streams[0xB3].Searching_Payload=true, //picture_start (I)
Streams[0xB4].Searching_Payload=true, //reserved
Streams[0xB5].Searching_Payload=true; //extension_start
Streams[0xB6].Searching_Payload=true, //picture_start (P or B)
Streams[0xB7].Searching_Payload=true; //video_edit
Streams[0xB8].Searching_Payload=true, //reserved
video_sequence_start_IsParsed=true;
FILLING_END();
}
示例8: Element_Begin1
//---------------------------------------------------------------------------
void File_Jpeg::APP0_JFFF_3B()
{
//Parsing
Element_Begin1("Thumbail 3 bytes per pixel");
int8u ThumbailX, ThumbailY;
Get_B1 (ThumbailX, "Xthumbail");
Get_B1 (ThumbailY, "Ythumbail");
Skip_XX(3*ThumbailX*ThumbailY, "RGB Thumbail");
Element_End0();
}
示例9: Skip_C3
//---------------------------------------------------------------------------
void File_OpenMG::FileHeader_Parse()
{
//Parsing
int16u Size, FrameSize=0;
int8u Flags, CodecID, SamplingRate_Code=0, Channels_Code=0;
bool JointStereo=false;
Skip_C3( "Code");
Get_B1 (Flags, "Flags");
Get_B2 (Size, "Size");
Skip_XX(26, "Unknown");
Get_B1 (CodecID, "Coded ID"); Param_Info1(OpenMG_CodecID_Format(CodecID));
if (CodecID<=1) //Atrac3
{
BS_Begin();
Skip_S1(7, "Unknown");
Get_SB ( JointStereo, "Joint Stereo");
Get_S1 (3, SamplingRate_Code, "Sampling Rate"); Param_Info2(OpenMG_SamplingRate(SamplingRate_Code), " Hz");
Get_S1 (3, Channels_Code, "Channels"); Param_Info2(OpenMG_Channels(Channels_Code), " channel(s)");
Get_S2 (10, FrameSize, "Frame size");
BS_End();
}
Skip_XX(Size-Element_Offset, "Unknown");
FILLING_BEGIN();
if (!Status[IsAccepted])
{
File__Tags_Helper::Accept();
Fill(Stream_Audio, 0, Audio_Format, OpenMG_CodecID_Format(CodecID));
Fill(Stream_Audio, 0, Audio_Encryption, OpenMG_CodecID_Encryption(CodecID));
int64u StreamSize=(int64u)-1;
if (File_Size!=(int64u)-1)
{
StreamSize=File_Size-(Buffer_Offset+Element_Size);
Fill(Stream_Audio, 0, Audio_StreamSize, StreamSize);
}
if (CodecID<=1) // Atrac3
{
Fill(Stream_Audio, 0, Audio_Channel_s_, OpenMG_Channels(Channels_Code));
Fill(Stream_Audio, 0, Audio_ChannelPositions, OpenMG_ChannelPositions(Channels_Code));
if (Channels_Code==1 && JointStereo)
Fill(Stream_Audio, 0, Audio_Format_Settings_Mode, "Joint Stereo");
Fill(Stream_Audio, 0, Audio_SamplingRate, OpenMG_SamplingRate(SamplingRate_Code));
if (CodecID==1) //Protected
FrameSize++; //Not sure
FrameSize<<=3; //8-byte blocks
int64u BitRate=OpenMG_SamplingRate(SamplingRate_Code)*FrameSize/256;
Fill(Stream_Audio, 0, Audio_BitRate, BitRate);
if (StreamSize!=(int64u)-1 && BitRate)
Fill(Stream_Audio, 0, Audio_Duration, StreamSize*8*1000/BitRate);
}
}
FILLING_END();
}
示例10: Get_B1
//---------------------------------------------------------------------------
void File_Jpeg::COD()
{
//Parsing
int16u Levels;
int8u Style, Style2, MultipleComponentTransform;
bool PrecinctUsed;
Get_B1 (Style, "Scod - Style");
Get_Flags (Style, 0, PrecinctUsed, "Precinct used");
Skip_Flags(Style, 1, "Use SOP (start of packet)");
Skip_Flags(Style, 2, "Use EPH (end of packet header)");
Skip_B1( "Number of decomposition levels");
Skip_B1( "Progression order");
Get_B2 (Levels, "Number of layers");
Info_B1(DimX, "Code-blocks dimensions X (2^(n+2))"); Param_Info2(1<<(DimX+2), " pixels");
Info_B1(DimY, "Code-blocks dimensions Y (2^(n+2))"); Param_Info2(1<<(DimY+2), " pixels");
Get_B1 (Style2, "Style of the code-block coding passes");
Skip_Flags(Style, 0, "Selective arithmetic coding bypass");
Skip_Flags(Style, 1, "MQ states for all contexts");
Skip_Flags(Style, 2, "Regular termination");
Skip_Flags(Style, 3, "Vertically stripe-causal context formation");
Skip_Flags(Style, 4, "Error resilience info is embedded on MQ termination");
Skip_Flags(Style, 5, "Segmentation marker is to be inserted at the end of each normalization coding pass");
Skip_B1( "Transform");
Get_B1(MultipleComponentTransform, "Multiple component transform");
if (PrecinctUsed)
{
BS_Begin();
Skip_S1(4, "LL sub-band width");
Skip_S1(4, "LL sub-band height");
BS_End();
for (int16u Pos=0; Pos<Levels; Pos++)
{
Element_Begin1("Decomposition level");
BS_Begin();
Skip_S1(4, "decomposition level width");
Skip_S1(4, "decomposition level height");
BS_End();
Element_End0();
}
}
FILLING_BEGIN();
if (Frame_Count==0 && Field_Count==0)
{
switch (MultipleComponentTransform)
{
case 0x01 : Fill(StreamKind_Last, 0, "Compression_Mode", "Lossless"); break;
case 0x02 : Fill(StreamKind_Last, 0, "Compression_Mode", "Lossy"); break;
default : ;
}
}
FILLING_END();
}
示例11: Get_B4
//---------------------------------------------------------------------------
void File_Png::IHDR()
{
//Parsing
int32u Width, Height;
int8u Bit_depth, Colour_type, Compression_method, Interlace_method;
Get_B4 (Width, "Width");
Get_B4 (Height, "Height");
Get_B1 (Bit_depth, "Bit depth");
Get_B1 (Colour_type, "Colour type"); Param_Info1(Png_Colour_type(Colour_type));
Get_B1 (Compression_method, "Compression method");
Skip_B1( "Filter method");
Get_B1 (Interlace_method, "Interlace method");
FILLING_BEGIN_PRECISE();
if (!Status[IsFilled])
{
Fill(StreamKind_Last, 0, "Width", Width);
Fill(StreamKind_Last, 0, "Height", Height);
int8u Resolution;
switch (Colour_type)
{
case 0 : Resolution=Bit_depth; break;
case 2 : Resolution=Bit_depth*3; break;
case 3 : Resolution=Bit_depth; break;
case 4 : Resolution=Bit_depth*2; break;
case 6 : Resolution=Bit_depth*4; break;
default: Resolution=0;
}
if (Resolution)
Fill(StreamKind_Last, 0, "BitDepth", Resolution);
switch (Compression_method)
{
case 0 :
Fill(StreamKind_Last, 0, "Format_Compression", "LZ77");
break;
default: ;
}
switch (Interlace_method)
{
case 0 :
break;
case 1 :
break;
default: ;
}
Fill();
}
if (Config->ParseSpeed<1.0)
Finish("PNG"); //No need of more
FILLING_END();
}
示例12: BS_Begin
//---------------------------------------------------------------------------
void File_MpcSv8::EI()
{
//Parsing
int8u Quality, Version1, Version2, Version3;
bool PNS;
BS_Begin();
Get_S1 (7, Quality, "Quality");
Get_SB ( PNS, "PNS");
BS_End();
Get_B1 (Version1, "Major version");
Get_B1 (Version2, "Minor version");
Get_B1 (Version3, "Build");
}
示例13: Get_B4
//---------------------------------------------------------------------------
void File_Png::IHDR()
{
//Parsing
int32u Width, Height;
int8u Bit_depth, Colour_type, Compression_method, Interlace_method;
Get_B4 (Width, "Width");
Get_B4 (Height, "Height");
Get_B1 (Bit_depth, "Bit depth");
Get_B1 (Colour_type, "Colour type"); Param_Info(Png_Colour_type(Colour_type));
Get_B1 (Compression_method, "Compression method");
Skip_B1( "Filter method");
Get_B1 (Interlace_method, "Interlace method");
FILLING_BEGIN_PRECISE();
Fill(Stream_Image, 0, Image_Width, Width);
Fill(Stream_Image, 0, Image_Height, Height);
int8u Resolution;
switch (Colour_type)
{
case 0 : Resolution=Bit_depth; break;
case 2 : Resolution=Bit_depth*3; break;
case 3 : Resolution=Bit_depth; break;
case 4 : Resolution=Bit_depth*2; break;
case 6 : Resolution=Bit_depth*4; break;
default: Resolution=0;
}
if (Resolution)
Fill(Stream_Image, 0, Image_BitDepth, Resolution);
switch (Compression_method)
{
case 0 :
Fill(Stream_Image, 0, Image_Format, "LZ77");
Fill(Stream_Image, 0, Image_Codec, "LZ77 variant");
break;
default: ;
}
switch (Interlace_method)
{
case 0 :
break;
case 1 :
break;
default: ;
}
Finish("PNG");
FILLING_END();
}
示例14: Skip_B4
//---------------------------------------------------------------------------
void File_MpcSv8::SH()
{
//Parsing
int64u SampleCount;
int8u Version, SampleFrequency, ChannelCount;
bool MidSideStereo;
Skip_B4( "CRC32");
Get_B1 (Version, "Version");
Get_VS (SampleCount, "Sample count");
Skip_VS( "Beginning silence");
BS_Begin();
Get_S1 (3, SampleFrequency, "Sample frequency"); Param_Info(Mpc_SampleFreq[SampleFrequency]);
Skip_S1(5, "Max used bands");
Get_S1 (4, ChannelCount, "Channel count");
Get_SB ( MidSideStereo, "Mid side stereo used");
Skip_S1(3, "Audio block frames");
BS_End();
//Filling
FILLING_BEGIN();
Fill(Stream_Audio, 0, Audio_SamplingRate, Mpc_SampleFreq[SampleFrequency]);
if (SampleCount)
{
Fill(Stream_Audio, 0, Audio_SamplingCount, SampleCount);
Fill(Stream_Audio, 0, Audio_Duration, SampleCount*1000/Mpc_SampleFreq[SampleFrequency]);
Fill(Stream_Audio, 0, Audio_BitRate, File_Size*8*Mpc_SampleFreq[SampleFrequency]/SampleCount); //Should be more precise...
}
Fill(Stream_Audio, 0, Audio_Resolution, 16); //MPC support only 16 bits
FILLING_END();
}
示例15: Element_Name
//---------------------------------------------------------------------------
void File_DvbSubtitle::page_composition_segment()
{
Element_Name("page composition segment");
//Parsing
Skip_B1( "page_time_out");
BS_Begin();
Skip_S1(4, "page_version_number");
Skip_S1(2, "page_state");
Skip_S1(2, "reserved");
BS_End();
while(Element_Offset<Element_Size)
{
Element_Begin1("Region");
int16u region_horizontal_address, region_vertical_address;
int8u region_id;
Get_B1 (region_id, "region_id");
Skip_B1( "reserved");
Get_B2 (region_horizontal_address, "region_horizontal_address");
Get_B2 (region_vertical_address, "region_vertical_address");
Element_End0();
FILLING_BEGIN();
subtitle_streams[subtitle_stream_id].pages[page_id].regions[region_id].page_composition_segment=true;
subtitle_streams[subtitle_stream_id].pages[page_id].regions[region_id].region_horizontal_address=region_horizontal_address;
subtitle_streams[subtitle_stream_id].pages[page_id].regions[region_id].region_vertical_address=region_vertical_address;
FILLING_END();
}
}