⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 extractorparameter.cpp

📁 JMVM MPEG MVC/3DAV 测试平台 国际通用标准
💻 CPP
📖 第 1 页 / 共 2 页
字号:
			EXIT( bFGSSpecified,							"Option \"-sl\" used in connection with option \"-f\"" );
			EXIT( bBitrateSpecified,					"Option \"-sl\" used in connection with option \"-b\"" );
      EXIT( bTraceExtractionSpecified,  "Option \"-sl\" used in connection with option \"-et\"" ); // HS: packet trace
      m_uiScalableLayer       = atoi( argv[ ++iArg ] );
      bScalableLayerSpecified = true;
      continue;
    }
		if( equal( "-l", argv[iArg] ) )
    {
      EXIT( iArg + 1 == argc,           "Option \"-l\" without argument specified" );
      EXIT( bLayerSpecified,            "Multiple options \"-l\"" );
      EXIT( bExtractionPointSpecified,  "Option \"-l\" used in connection with option \"-e\"" );
			EXIT( bScalableLayerSpecified,    "Option \"-l\" used in connection with option \"-sl\"" );
			EXIT( bBitrateSpecified,					"Option \"-l\" used in connection with option \"-b\"" );
      EXIT( bTraceExtractionSpecified,  "Option \"-l\" used in connection with option \"-et\"" ); // HS: packet trace
      m_uiLayer       = atoi( argv[ ++iArg ] );
      bLayerSpecified = true;
      continue;
    }

    if( equal( "-t", argv[iArg] ) )
    {
      EXIT( iArg + 1 == argc,           "Option \"-t\" without argument specified" );
      EXIT( bLevelSpecified,            "Multiple options \"-t\"" );
			EXIT( bExtractionPointSpecified,  "Option \"-t\" used in connection with option \"-e\"" );
			EXIT( bScalableLayerSpecified,    "Option \"-t\" used in connection with option \"-sl\"" ); 
			EXIT( bBitrateSpecified,					"Option \"-t\" used in connection with option \"-b\"" );
      EXIT( bTraceExtractionSpecified,  "Option \"-t\" used in connection with option \"-et\"" ); // HS: packet trace
      m_uiLevel       = atoi( argv[ ++iArg ] );
      bLevelSpecified = true;
      continue;
    }

    if( equal( "-f", argv[iArg] ) )
    {
      EXIT( iArg + 1 == argc,           "Option \"-f\" without argument specified" );
      EXIT( bFGSSpecified,              "Multiple options \"-f\"" );
		  EXIT( bExtractionPointSpecified,  "Option \"-f\" used in connection with option \"-e\"" );
			EXIT( bScalableLayerSpecified,    "Option \"-f\" used in connection with option \"-sl\"" );
			EXIT( bBitrateSpecified,					"Option \"-f\" used in connection with option \"-b\"" );
      EXIT( bTraceExtractionSpecified,  "Option \"-f\" used in connection with option \"-et\"" ); // HS: packet trace
      m_dFGSLayer     = atof( argv[ ++iArg ] );
      bFGSSpecified   = true;
      continue;
    }

		if( equal( "-b", argv[iArg] ) )
		{
			EXIT( iArg + 1 == argc,						"Option \"-b\" without argument specified" );
			EXIT( bBitrateSpecified,					"Multiple options \"-b\"" );
			EXIT( bExtractionPointSpecified,  "Option \"-b\" used in connection with option \"-e\"" );
		  EXIT( bScalableLayerSpecified,    "Option \"-b\" used in connection with option \"-sl\"" );
		  EXIT( bLayerSpecified,						"Option \"-b\" used in connection with option \"-l\"" );
		  EXIT( bLevelSpecified,						"Option \"-b\" used in connection with option \"-t\"" );
		  EXIT( bFGSSpecified,							"Option \"-b\" used in connection with option \"-f\"" );
      EXIT( bTraceExtractionSpecified,  "Option \"-b\" used in connection with option \"-et\"" ); // HS: packet trace
			m_dBitrate				= atof( argv[ ++iArg ] );
			bBitrateSpecified = true;
			continue;
		}

		if (equal( "-enp",argv[iArg] ))  //extract non-required pictures 
		{
			EXIT( iArg + 1 == argc,			 "Option \"-enp\" without argument specified" );
			m_uiExtractNonRequiredPics = atoi(argv[++iArg]);
			continue;
		}
    if( equal( "-e", argv[iArg] ) )
    {
      EXIT( iArg + 1 == argc,           "Option \"-e\" without argument specified" );
      EXIT( bExtractionPointSpecified,  "Multiple options \"-e\"" );
			EXIT( bScalableLayerSpecified,    "Option \"-e\" used in connection with option \"-sl\"" ); 
      EXIT( bLayerSpecified,            "Option \"-e\" used in connection with option \"-l\"" );
      EXIT( bLevelSpecified,            "Option \"-e\" used in connection with option \"-t\"" );
      EXIT( bFGSSpecified,              "Option \"-e\" used in connection with option \"-f\"" );
      EXIT( bTraceExtractionSpecified,  "Option \"-e\" used in connection with option \"-et\"" ); // HS: packet trace
      ErrVal errVal  = xParseFormatString( argv[++iArg], cPoint );
      EXIT(  errVal != Err::m_nOK,      "Wrong format string with option \"-e\" specified" );
      m_cExtractionList.push_back( cPoint );
      bExtractionPointSpecified = true;
      continue;
    }

    if( equal( "-et", argv[iArg] ) ) // HS: packet trace
    {
      EXIT( iArg + 1 == argc,           "Option \"-et\" without argument specified" );
      EXIT( bTraceExtractionSpecified,  "Multiple options \"-et\"" );
			EXIT( bScalableLayerSpecified,    "Option \"-et\" used in connection with option \"-sl\"" ); 
      EXIT( bLayerSpecified,            "Option \"-et\" used in connection with option \"-l\"" );
      EXIT( bLevelSpecified,            "Option \"-et\" used in connection with option \"-t\"" );
      EXIT( bFGSSpecified,              "Option \"-et\" used in connection with option \"-f\"" );
      EXIT( bExtractionPointSpecified,  "Option \"-et\" used in connection with option \"-e\"" );
      m_cExtractTrace           = argv[++iArg];
      m_bTraceExtract           = true;
      bTraceExtractionSpecified = true;
      continue;
    }
    //{{Quality level estimation and modified truncation- JVTO044 and m12007
    //France Telecom R&D-(nathalie.cammas@francetelecom.com)
    //option utilized to remove Dead Substream of uiLayer
	  if(equal( "-ds",argv[iArg] ))
	  {
  	   EXIT( iArg + 1 == argc,           "Option \"-ds\" without argument specified" );

	   //S051{
	   bDSSpecified=true;
       EXIT( m_bUseSIP,"Option \"-ds\" used in connection with option \"-sip\"");			
	   //S051}

       UInt uiLayer = atoi(argv[++iArg]);
	     m_bExtractDeadSubstream[uiLayer] = true;
	     continue;
	  }
    //}}Quality level estimation and modified truncation- JVTO044 and m12007
    if(equal( "-ql", argv[iArg] ))
    {
        m_bExtractUsingQL = true;
        m_eQLExtractionMode = QL_EXTRACTOR_MODE_JOINT;
        continue;
    }

	//--TEST DJ 0602
	//--DY 1009
	if( equal( "-r", argv[iArg] ) )
    {
       xParseFormatStringROI_Only( argv[++iArg], cPoint );
       continue;
    }

    //JVT-S043
    if(equal( "-qlord", argv[iArg] ))
    {
        m_bExtractUsingQL = true;
        m_eQLExtractionMode = QL_EXTRACTOR_MODE_ORDERED;
        continue;
    }
	
	//S051{
	if( equal( "-sip", argv[iArg] ) )
	{
		EXIT( !bExtractionPointSpecified, "Option \"-sip\" must follow option \"-e\"" );
		EXIT( bDSSpecified,"Option \"-sip\" used in connection with option \"-ds\"");
		m_bUseSIP = true;
		continue;
	}

	if(equal("-suf",argv[iArg]))
	{
		m_uiSuffixUnitEnable=1;
		continue;
	}
	//S051}
//JVT-T054{
  if(equal("-keepf", argv[iArg]))
  {
    m_bKeepfExtraction  = true;
    continue;
  }
//JVT-T054}
    EXIT( true, "Unknown option specified" );
  }
  return Err::m_nOK;
#undef EXIT
}


ErrVal
ExtractorParameter::xPrintUsage( Char **argv )
{
  printf("\nUsage: %s [-pt trace] InputStream [OutputStream [-e] | [-sl] | [-l] [-t] [-f] | [-b] | [-et]]", argv[0] ); //liuhui 0511
  printf("\noptions:\n");
  printf("\t-pt trace  -> generate a packet trace file \"trace\" from given stream\n"); // HS: packet trace
  printf("\t-sl SL     -> extract the layer with layer id = SL and the dependent lower layers\n");
  printf("\t-l L       -> extract all layers with dependency_id  <= L\n");
  printf("\t-t T       -> extract all layers with temporal_level <= T\n");
  printf("\t-f F       -> extract all layers with quality_level  <= F\n");
  printf("\t-b B       -> extract a layer (possibly truncated) with the target bitrate = B\n\n");
  printf("\t-e AxB@C:D -> extract a layer (possibly truncated) with\n" );
  printf("\t               - A frame width [luma samples]\n");
  printf("\t               - B frame height [luma samples]\n");
  printf("\t               - C frame rate [Hz]\n");
  printf("\t               - D bit rate [kbit/s]\n");
  printf("\t-et        -> extract packets as specified by given (modified) packet trace file\n"); // HS: packet trace
  //S051{
  printf("\t-sip       -> extract using SIP algorithm \n");
  //S051}
  printf("\t-ql        -> information about quality layers are used during extraction\n" );

  //JVT-S043
  printf("\t-qlord     -> ordered/toplayer quality layer extraction\n" );
  printf("\t               - simulates truncation using normal ql even if MLQL assigner was used\n" );
  //JVT-T054
  printf("\t-keepf       -> use with \"-l\" and \"-f\" options: extract all included layers of the layer L specified with \"-l\" and all quality levels below quality level F specified wth \"-f\" of the layer L\n");

  printf("\nOptions \"-l\", \"-t\" and \"-f\" can be used in combination with each other.\n"
	 	     "Other options can only be used separately.\n" );
	printf("\n");
  RERRS();
}



//--TEST DJ 0602
ErrVal
ExtractorParameter::xParseFormatStringROI_Only( Char*   pFormatString, Point&  rcPoint  )
{
	std::string inputpara = pFormatString;
	int iParaLength = inputpara.length();

	iExtractedNumROI = ( iParaLength + 1 )/2;

	Char  acSearch  [5] = "////";
	Char* pSubString[5] = { 0, 0, 0, 0, 0 };
	UInt  uiPos         = 0;
	UInt  uiIndex = 0;
	//===== set sub-strings =====
	for( uiIndex = 0; uiIndex < 7; uiIndex++ )
	{
		while( pFormatString[uiPos] != '\0' )
		{
			if ( pFormatString[uiPos++] == acSearch[uiIndex] )
			{
				pFormatString [uiPos-1] =	'\0';
				pSubString    [uiIndex] =	pFormatString;
				pFormatString           =	&pFormatString[uiPos];
				uiPos                   =	0;
				break;
			}
		}
	}

	uiIndex = iExtractedNumROI;
	pSubString[uiIndex-1] = pFormatString;

	for(UInt i=0;i<uiIndex; i++)
	{
		ROFS( pSubString[i] );
		rcPoint.uiROI[i]    = atoi( pSubString[i] );
	}

	m_bROIFlag = true;
	return Err::m_nOK;
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -