//--------------------------------------------------------------------------- void File_Vc3::ImageGeometry() { //Parsing Element_Begin("Image Geometry", 11); Get_B2 (ALPF, "Active lines-per-frame"); Get_B2 (SPL, "Samples-per-line"); Skip_B1( "Zero"); Skip_B2( "Number of active lines"); Skip_B2( "Zero"); BS_Begin(); Get_S1 (3, SBD, "Sample bit depth"); Mark_1(); Mark_1(); Mark_0(); Mark_0(); Mark_0(); Mark_1(); Mark_0(); Mark_0(); Mark_0(); Mark_1(); Get_SB ( SST, "Source scan type"); Mark_0(); Mark_0(); BS_End(); Element_End(); }
//--------------------------------------------------------------------------- void File_Vc3::TimeCode() { //Parsing Element_Begin1("Time Code"); bool TCP; BS_Begin(); Get_SB ( TCP, "TCP: Time Code Present"); Mark_0(); Mark_0(); Mark_0(); Mark_0(); Mark_0(); Mark_0(); Mark_0(); BS_End(); if (TCP) { Skip_B8( "Time Code"); } else Skip_B8( "Junk"); Element_End0(); }
//--------------------------------------------------------------------------- void File_Vc3::CodingControlB() { //Parsing Element_Begin1("Coding Control B"); BS_Begin(); Info_S1(1, FFE, "Field/Frame Count"); Param_Info1(Vc3_FFE[FFE]); Mark_0(); Mark_0(); Mark_0(); Mark_0(); Mark_0(); Mark_0(); Mark_0(); BS_End(); Element_End0(); }
//--------------------------------------------------------------------------- void File_Cdp::time_code_section() { Element_Begin1("time_code_section"); Skip_B1( "time_code_section_id"); BS_Begin(); Mark_1(); Mark_1(); Skip_S1(2, "tc_10hrs"); Skip_S1(4, "tc_1hrs"); Mark_1(); Skip_S1(3, "tc_10min"); Skip_S1(4, "tc_1min"); Skip_SB( "tc_field_flag"); Skip_S1(3, "tc_10sec"); Skip_S1(4, "tc_1sec"); Skip_SB( "drop_frame_flag"); Mark_0(); Skip_S1(2, "tc_10fr"); Skip_S1(4, "tc_1fr"); BS_End(); Element_End0(); }
//--------------------------------------------------------------------------- void File_AfdBarData::afd_data() { //Parsing Element_Begin1("Active Format Description"); BS_Begin(); if (Format==Format_S2016_3) { Mark_0_NoTrustError(); Get_S1 (4, active_format, "active_format"); Param_Info1(AfdBarData_active_format[active_format]); Get_S1 (1, aspect_ratio, "aspect_ratio"); Param_Info1(AfdBarData_aspect_ratio[aspect_ratio]); Mark_0_NoTrustError(); Mark_0_NoTrustError(); } else { bool active_format_flag; Mark_0(); Get_SB (active_format_flag, "active_format_flag"); Mark_0_NoTrustError(); Mark_0_NoTrustError(); Mark_0_NoTrustError(); Mark_0_NoTrustError(); Mark_0_NoTrustError(); Mark_1_NoTrustError(); if (active_format_flag) { Mark_1_NoTrustError(); Mark_1_NoTrustError(); Mark_1_NoTrustError(); Mark_1_NoTrustError(); Get_S1 (4, active_format, "active_format"); Param_Info1(AfdBarData_active_format[active_format]); } } BS_End(); Element_End0(); }
//--------------------------------------------------------------------------- void File_H263::Data_Parse() { //Parsing int8u Temporal_Reference_Temp; BS_Begin(); Skip_S3(22, "Picture Start Code (PSC)"); Get_S1 ( 8, Temporal_Reference_Temp, "Temporal Reference (TR)"); if (!Temporal_Reference_IsValid) { Temporal_Reference=Temporal_Reference_Temp; Temporal_Reference_IsValid=true; } else Temporal_Reference++; if (Temporal_Reference_Temp!=Temporal_Reference) { Trusted_IsNot("Out of Order"); Open_Buffer_Unsynch(); return; } Element_Begin1("Type Information (PTYPE)"); Mark_1(); Mark_0(); Skip_SB( "Split screen indicator"); Skip_SB( "Document camera indicator"); Skip_SB( "Full Picture Freeze Release"); Get_S1 (3, Source_Format, "Source Format"); Param_Info1(H263_Source_Format[Source_Format]); if (Source_Format!=7) { Skip_SB( "Picture Coding Type"); Skip_SB( "Unrestricted Motion Vector mode"); Skip_SB( "Syntax-based Arithmetic Coding mode"); Skip_SB( "Advanced Prediction mode"); Skip_SB( "PB-frames mode"); } Element_End0(); if (Source_Format==7) // Extended PTYPE { Element_Begin1("Plus PTYPE (PLUSPTYPE)"); int8u Ufep, PixelAspectRatioCode=0, Width=0, Height=0; Get_S1 ( 3, Ufep, "Update Full Extended PTYPE (UFEP)"); switch (Ufep) { case 0 : break; case 1 : Element_Begin1("Optional Part of PLUSPTYPE (OPPTYPE)"); Get_S1 (3, Source_Format, "Source Format"); Param_Info1(H263_Source_Format[Source_Format]); Skip_SB( "Custom PCF"); Skip_SB( "Unrestricted Motion Vector (UMV) mode"); Skip_SB( "Syntax-based Arithmetic Coding (SAC) mode"); Skip_SB( "Advanced Prediction (AP) mode"); Skip_SB( "Advanced INTRA Coding (AIC) mode"); Skip_SB( "Deblocking Filter (DF) mode"); Skip_SB( "Slice Structured (SS) mode"); Skip_SB( "Reference Picture Selection (RPS) mode"); Skip_SB( "Independent Segment Decoding (ISD) mode"); Skip_SB( "Alternative INTER VLC (AIV) mode"); Skip_SB( "Modified Quantization (MQ) mode"); Mark_1(); Mark_0(); Mark_0(); Mark_0(); Element_End0(); break; default : BS_End(); Skip_XX(Element_Size-Element_Offset, "Unknown"); return; //TODO: frame count... } Element_Begin1("mandatory part of PLUSPTYPE when PLUSPTYPE present (MPPTYPE)"); Skip_S1(3, "Picture Type Code"); Skip_SB( "Reference Picture Resampling (RPR) mode"); Skip_SB( "Reduced-Resolution Update (RRU) mode"); Skip_SB( "Rounding Type (RTYPE)"); Mark_0(); Mark_0(); Mark_1(); Element_End0(); Element_End0(); Skip_SB( "CPM"); Skip_S1(2, "PSBI"); Element_Begin1("Custom Picture Format (CPFMT)"); Get_S1 (4, PixelAspectRatioCode, "Pixel Aspect Ratio Code"); Get_S1 (4, Width, "Picture Width Indication"); Width++; Width<<=2; Param_Info2(Width, " pixels"); Mark_1(); Get_S1 (4, Height, "Picture Height Indication"); Height<<=2; Param_Info2(Height, " pixels"); Element_End0(); if (PixelAspectRatioCode==0xF) { Element_Begin1("Extended Pixel Aspect Ratio (EPAR)"); Get_S1 (8, PAR_W, "PAR Width"); Get_S1 (8, PAR_H, "PAR Height"); Element_End0(); } else { PAR_W=H263_PAR_W[PixelAspectRatioCode]; PAR_H=H263_PAR_H[PixelAspectRatioCode]; } } BS_End(); Skip_XX(Element_Size-Element_Offset, "Other data"); FILLING_BEGIN(); Element_Info1(Frame_Count); Frame_Count++; //Filling if (!Status[IsFilled] && Frame_Count>=Frame_Count_Valid) { Accept("H.263"); Finish("H.263"); } FILLING_END(); }
//--------------------------------------------------------------------------- void File_Vc3::CodingControlA() { //Parsing Element_Begin("Coding Control A", 3); BS_Begin(); Mark_0(); Mark_0(); Mark_0(); Mark_0(); Mark_0(); Mark_0(); Info_S1(2, FFC, "Field/Frame Count"); Param_Info(Vc3_FFC[FFC]); Mark_1(); Mark_0(); Mark_0(); Get_SB ( CRCF, "CRC flag"); Mark_0(); Mark_0(); Mark_0(); Mark_0(); Mark_1(); Mark_0(); Mark_1(); Mark_0(); Mark_0(); Mark_0(); Mark_0(); Mark_0(); BS_End(); Element_End(); }
//--------------------------------------------------------------------------- void File_Vc3::CodingControlA() { //Parsing Element_Begin1("Coding Control A"); BS_Begin(); int8u FFC; Mark_0(); Mark_0(); Mark_0(); Mark_0(); Mark_0(); Mark_0(); Get_S1 (2, FFC, "Field/Frame Count"); Param_Info1(Vc3_FFC[FFC]); Mark_1(); Mark_0(); Mark_0(); Get_SB ( CRCF, "CRC flag"); Mark_0(); Mark_0(); Mark_0(); Mark_0(); Mark_1(); Mark_0(); Mark_1(); Mark_0(); Mark_0(); Mark_0(); Mark_0(); Mark_0(); BS_End(); Element_End0(); FILLING_BEGIN(); if (FFC_FirstFrame==(int8u)-1) FFC_FirstFrame=FFC; FILLING_END(); }