?? encodercodingparameter.h
字號:
n += 1;
continue;
}
if( equals( pcCom, "-mqp", 4 ) )
{
ROTS( NULL == argv[n ] );
ROTS( NULL == argv[n+1] );
ROTS( NULL == argv[n+2] );
UInt uiLayer = atoi( argv[n ] );
UInt uiStage = atoi( argv[n+1] );
Double dMotQp = atof( argv[n+2] );
CodingParameter::getLayerParameters( uiLayer ).setQpModeDecision( uiStage, dMotQp );
n += 2;
continue;
}
if( equals( pcCom, "-lqp", 4 ) )
{
ROTS( NULL == argv[n ] );
ROTS( NULL == argv[n+1] );
UInt uiLayer = atoi( argv[n ] );
Double dQp = atof( argv[n+1] );
CodingParameter::getLayerParameters( uiLayer ).setBaseQpResidual( dQp );
for( UInt uiStage = 0; uiStage < MAX_DSTAGES; uiStage++ )
{
CodingParameter::getLayerParameters( uiLayer ).setQpModeDecision( uiStage, dQp );
}
CodingParameter::getLayerParameters( uiLayer ).setQpModeDecisionLP( dQp );
n += 1;
continue;
}
if( equals( pcCom, "-ilpred", 7 ) )
{
ROTS( NULL == argv[n ] );
ROTS( NULL == argv[n+1] );
UInt uiLayer = atoi( argv[n ] );
UInt uiBLRes = atoi( argv[n+1] );
CodingParameter::getLayerParameters( uiLayer ).setInterLayerPredictionMode( uiBLRes );
n += 1;
continue;
}
if( equals( pcCom, "-mfile", 6 ) )
{
ROTS( NULL == argv[n ] );
ROTS( NULL == argv[n+1] );
ROTS( NULL == argv[n+2] );
UInt uiLayer = atoi( argv[n ] );
UInt uiMode = atoi( argv[n+1] );
CodingParameter::getLayerParameters( uiLayer ).setMotionInfoMode( uiMode );
CodingParameter::getLayerParameters( uiLayer ).setMotionInfoFilename( argv[n+2] );
n += 2;
continue;
}
if( equals( pcCom, "-frms", 5 ) )
{
ROTS( NULL == argv[n] );
UInt uiFrms = atoi( argv[n] );
CodingParameter::setTotalFrames( uiFrms );
continue;
}
if( equals( pcCom, "-bcip", 5 ) )
{
n--;
ROTS( NULL == argv[n] );
CodingParameter::getLayerParameters(0).setContrainedIntraForLP();
continue;
}
if( equals( pcCom, "-cl", 3 ) )
{
ROTS( NULL == argv[n] );
ROTS( NULL == argv[n+1] );
UInt uiLayer = atoi( argv[n] );
UInt uiCLoop = atoi( argv[n+1] );
CodingParameter::getLayerParameters( uiLayer ).setClosedLoop( uiCLoop );
n += 1;
continue;
}
if( equals( pcCom, "-ref", 4 ) )
{
ROTS( NULL == argv[n] );
Double dLowPassEnhRef = atof( argv[n] );
CodingParameter::setLowPassEnhRef( dLowPassEnhRef );
continue;
}
if( equals( pcCom, "-ar", 3 ) )
{
ROTS( NULL == argv[n] );
ROTS( NULL == argv[n + 1] );
UInt uiBaseRefWeightZeroBlock = atoi( argv[n] );
UInt uiBaseRefWeightZeroCoeff = atoi( argv[n + 1] );
CodingParameter::setAdaptiveRefFGSWeights( uiBaseRefWeightZeroBlock, uiBaseRefWeightZeroCoeff );
// skip two
n += 1;
continue;
}
if( equals( pcCom, "-fs", 3 ) )
{
ROTS( NULL == argv[n] );
UInt flag = atoi( argv[n] );
CodingParameter::setFgsEncStructureFlag( flag );
continue;
}
// {{
if( equals( pcCom, "-vf", 4) )
{
ROTS( NULL == argv[n] );
ROTS( NULL == argv[n+1] );
std::string cFilename = argv[n++];
UInt uiViewid = atoi(argv[n]);
RNOKS( xReadFromFile( cFilename, uiViewid, rcBitstreamFile ) ); // Read-in SPS parameters
continue;
}
// }}
//JVT-W080
if( equals( pcCom, "-pdi", 4 ) )
{
ROTS(NULL == argv[n] );
ROTS(NULL == argv[n+1] );
m_uiPdsEnable = 1;
m_uiPdsInitialDelayAnc = atoi( argv[n++] );
m_uiPdsInitialDelayNonAnc = atoi( argv[n] );
continue;
}
//~JVT-W080
//
/*
if( equals( pcCom, "-pf", 3) )
{
ROTS( NULL == argv[n] );
std::string cFilename = argv[n];
RNOKS( xReadFromFile( cFilename, rcBitstreamFile ) );
continue;
}
*/
//JVT-P031
if( equals( pcCom, "-ds", 3) )
{
ROTS( NULL == argv[n] );
ROTS( NULL == argv[n+1] );
UInt uiLayer = atoi(argv[n]);
CodingParameter::getLayerParameters(uiLayer).setUseDiscardable(true);
Double dRate = atof(argv[n+1]);
CodingParameter::getLayerParameters(uiLayer).setPredFGSRate(dRate);
n+=1;
continue;
}
//~JVT-P031
//S051{
if( equals( pcCom, "-encsip", 7 ) )
{
ROTS( NULL == argv[n ] );
ROTS( NULL == argv[n+1] );
UInt uiLayer = atoi( argv[n ] );
CodingParameter::getLayerParameters( uiLayer ).setEncSIP(true);
CodingParameter::getLayerParameters( uiLayer ).setInSIPFileName(argv[n+1]);
n += 1;
continue;
}
if( equals( pcCom, "-anasip", 7 ) )
{
ROTS( NULL == argv[n ] );
ROTS( NULL == argv[n+1] );
ROTS( NULL == argv[n+2] );
UInt uiLayer = atoi( argv[n ] );
UInt uiMode = atoi( argv[n+1] );
if(uiMode!=0)
CodingParameter::getLayerParameters( uiLayer ).setAnaSIP(2);
else
CodingParameter::getLayerParameters( uiLayer ).setAnaSIP(1);
CodingParameter::getLayerParameters( uiLayer ).setOutSIPFileName(argv[n+2]);
n += 2;
continue;
}
//S051}
if( equals( pcCom, "-fgsmot", 7 ) )
{
ROTS( NULL == argv[n ] );
ROTS( NULL == argv[n+1] );
UInt uiLayer = atoi( argv[n ] );
UInt uiFGSMotionMode = atoi( argv[n+1] );
CodingParameter::getLayerParameters( uiLayer ).setFGSMotionMode( uiFGSMotionMode );
n += 1;
continue;
}
if( equals( pcCom, "-org", 4 ) )
{
ROTS( NULL == argv[n ] );
ROTS( NULL == argv[n+1] );
UInt uiLayer = atoi( argv[n ] );
ROF( uiLayer < MAX_LAYERS );
CodingParameter::getLayerParameters( uiLayer ).setInputFilename( argv[n+1] );
n += 1;
continue;
}
if( equals( pcCom, "-rec", 4 ) )
{
ROTS( NULL == argv[n ] );
ROTS( NULL == argv[n+1] );
UInt uiLayer = atoi( argv[n ] );
ROF( uiLayer < MAX_LAYERS );
CodingParameter::getLayerParameters( uiLayer ).setOutputFilename( argv[n+1] );
n += 1;
continue;
}
if( equals( pcCom, "-ec", 3 ) )
{
ROTS( NULL == argv[n ] );
ROTS( NULL == argv[n+1] );
UInt uiLayer = atoi( argv[n ] );
ROF( uiLayer < MAX_LAYERS );
UInt uiECmode = atoi( argv[n+1] );
CodingParameter::getLayerParameters( uiLayer ).setEntropyCodingModeFlag( uiECmode != 0 );
n += 1;
continue;
}
if( equals( pcCom, "-vlc", 4 ) )
{
n--;
ROTS( NULL == argv[n] );
for( UInt uiLayer = 0; uiLayer < MAX_LAYERS; uiLayer++ )
{
CodingParameter::getLayerParameters( uiLayer ).setEntropyCodingModeFlag( false );
}
continue;
}
if( equals( pcCom, "-cabac", 6 ) )
{
n--;
ROTS( NULL == argv[n] );
for( UInt uiLayer = 0; uiLayer < MAX_LAYERS; uiLayer++ )
{
CodingParameter::getLayerParameters( uiLayer ).setEntropyCodingModeFlag( true );
}
continue;
}
if( equals( pcCom, "-h", 2) )
{
printHelp();
return Err::m_nOK;
}
return Err::m_nERR;
}
//JVT-W080
if( m_uiMVCmode && m_uiPdsEnable )
{
m_uiPdsBlockSize = m_uiFrameWidth/16;
UInt uiViewNum = (UInt)SpsMVC.m_num_views_minus_1+1;
UInt uiRefNum = m_uiNumRefFrames;
m_ppuiPdsInitialDelayMinus2L0Anc = new UInt* [uiViewNum];
m_ppuiPdsInitialDelayMinus2L1Anc = new UInt* [uiViewNum];
m_ppuiPdsInitialDelayMinus2L0NonAnc = new UInt* [uiViewNum];
m_ppuiPdsInitialDelayMinus2L1NonAnc = new UInt* [uiViewNum];
for( UInt i = 0; i < uiViewNum; i++ )
{
m_ppuiPdsInitialDelayMinus2L0Anc[i] = new UInt [uiRefNum];
m_ppuiPdsInitialDelayMinus2L1Anc[i] = new UInt [uiRefNum];
m_ppuiPdsInitialDelayMinus2L0NonAnc[i] = new UInt [uiRefNum];
m_ppuiPdsInitialDelayMinus2L1NonAnc[i] = new UInt [uiRefNum];
for( UInt j = 0; j < uiRefNum; j++ )
{
m_ppuiPdsInitialDelayMinus2L0Anc[i][j] = 0;
m_ppuiPdsInitialDelayMinus2L1Anc[i][j] = 0;
m_ppuiPdsInitialDelayMinus2L0NonAnc[i][j] = 0;
m_ppuiPdsInitialDelayMinus2L1NonAnc[i][j] = 0;
}
}
}
//~JVT-W080
RNOKS( check() );
return Err::m_nOK;
}
Void EncoderCodingParameter::printHelpMVC(Int argc,
Char** argv)
{
printf("Usage: %s -vf <encoder.cfg> <view_id>\n\n", argv[0]);
printf("\n supported options:\n\n");
printf(" -vf Parameter File Name\n\n");
printf(" -h Print Option List \n");
printf("\n");
}
Void EncoderCodingParameter::printHelp()
{
printf("\n supported options:\n\n");
printf(" -pf Parameter File Name\n\n");
printf(" -bf BitStreamFile\n");
printf(" -frms Number of total frames\n");
printf(" -numl Number Of Layers\n");
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -