📄 encodercodingparameter.h
字号:
continue;
}
if( equals( pcCom, "-rqp", 4 ) )
{
ROTS( NULL == argv[n ] );
ROTS( NULL == argv[n+1] );
UInt uiLayer = atoi( argv[n ] );
Double dResQp = atof( argv[n+1] );
CodingParameter::getLayerParameters( uiLayer ).setBaseQpResidual( dResQp );
printf("\n********** layer %1d - rqp = %f **********\n\n",uiLayer,dResQp);
n += 1;
continue;
}
if( equals( pcCom, "-mbaff", 6 ) )
{
ROTS( NULL == argv[n ] );
ROTS( NULL == argv[n+1] );
UInt uiLayer = atoi( argv[n ] );
UInt uiMbAff = atoi( argv[n+1] );
CodingParameter::getLayerParameters( uiLayer ).setMbAff( uiMbAff );
UInt ui;
for( ui = 0; ui < m_uiNumberOfLayers; ui++ )
{
getLayerParameters(ui).setInterlaced( (uiMbAff > 0) );
}
n += 1;
continue;
}
if( equals( pcCom, "-paff", 5 ) )
{
ROTS( NULL == argv[n ] );
ROTS( NULL == argv[n+1] );
UInt uiLayer = atoi( argv[n ] );
UInt uiPAff = atoi( argv[n+1] );
CodingParameter::getLayerParameters( uiLayer ).setPAff( uiPAff );
UInt ui;
for( ui = 0; ui < m_uiNumberOfLayers; ui++ )
{
getLayerParameters(ui).setInterlaced( (uiPAff > 0) );
}
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, "-meqplp", 7 ) )
{
ROTS( NULL == argv[n ] );
ROTS( NULL == argv[n+1] );
UInt uiLayer = atoi( argv[n ] );
Double dQp = atof( argv[n+1] );
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, "-gop", 4 ) )
{
ROTS( NULL == argv[n] );
UInt uiGOPSize = atoi( argv[n] );
CodingParameter::setGOPSize( uiGOPSize );
continue;
}
if( equals( pcCom, "-iper", 5 ) )
{
ROTS( NULL == argv[n] );
Int iIntraPeriod = atoi( argv[n] );
CodingParameter::setIntraPeriod( iIntraPeriod );
continue;
}
if( equals( pcCom, "-blid", 5 ) )
{
ROTS( NULL == argv[n ] );
ROTS( NULL == argv[n+1] );
UInt uiLayer = atoi( argv[n ] );
UInt uiBlId = atoi( argv[n+1] );
CodingParameter::getLayerParameters( uiLayer ).setBaseLayerId( uiBlId );
n += 1;
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, "-pf", 3) )
{
ROTS( NULL == argv[n] );
std::string cFilename = argv[n];
RNOKS( xReadFromFile( cFilename, rcBitstreamFile ) );
continue;
}
//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}
//JVT-W052 bug_fixed
if( equals( pcCom, "-icsei", 6 ) )
{
ROTS( NULL == argv[n] );
UInt uiIntegrityCheckSei = atoi( argv[n] );
CodingParameter::setIntegrityCheckSEIEnable( uiIntegrityCheckSei );
continue;
}
//JVT-W052 bug_fixed
// JVT-U116 LMI {
if( equals( pcCom, "-tlidx", 6 ) )
{
ROTS( NULL == argv[n] );
UInt uiTl0DepRepIdxSeiEnable = atoi( argv[n] );
CodingParameter::setTl0DepRepIdxSeiEnable( uiTl0DepRepIdxSeiEnable );
continue;
}
// JVT-U116 LMI }
// JVT-U085 LMI {
if( equals( pcCom, "-tlnest", 7 ) )
{
ROTS( NULL == argv[n] );
UInt uiTlNestFlag = atoi( argv[n] );
CodingParameter::setTlevelNestingFlag( uiTlNestFlag );
continue;
}
// JVT-U085 LMI }
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;
}
//JVT-W049 {
if( equals( pcCom, "-plr", 4 ) )
{
ROTS( NULL == argv[n ] );
ROTS( NULL == argv[n+1] );
UInt uiLayer = atoi( argv[n ] );
ROF( uiLayer < MAX_LAYERS );
UInt uiPLR = atoi( argv[n+1 ] );
CodingParameter::getLayerParameters( uiLayer ).setPLR( uiPLR );
n += 1;
continue;
}
if( equals( pcCom, "-redu", 5 ) )
{
ROTS( NULL == argv[n ] );
ROTS( NULL == argv[n+1] );
UInt uiLayer = atoi( argv[n ] );
ROF( uiLayer < MAX_LAYERS );
Bool bReduFlag = (atoi( argv[n+1 ] ) > 0 ? true:false);
CodingParameter::getLayerParameters( uiLayer ).setUseRedundantSliceFlag( bReduFlag );
n += 1;
continue;
}
if( equals( pcCom, "-kpredu", 7 ) )
{
ROTS( NULL == argv[n ] );
ROTS( NULL == argv[n+1] );
UInt uiLayer = atoi( argv[n ] );
ROF( uiLayer < MAX_LAYERS );
Bool bReduKeyFlag = (atoi( argv[n+1 ] ) > 0 ? true:false);
CodingParameter::getLayerParameters( uiLayer ).setUseRedundantKeySliceFlag( bReduKeyFlag );
n += 1;
continue;
}
//JVT-W049 }
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;
}
//JVT-U106 Behaviour at slice boundaries{
if( equals( pcCom, "-ciu", 3 ) )
{
ROTS( NULL == argv[n] );
UInt flag = atoi( argv[n] );
CodingParameter::setCIUFlag( flag );
continue;
}
//JVT-U106 Behaviour at slice boundaries}
if( equals( pcCom, "-h", 2) )
{
printHelp();
return Err::m_nOK;
}
return Err::m_nERR;
}
RNOKS( check() );
return Err::m_nOK;
}
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(" -gop GOPSize - GOP size (2,4,8,16,32,64, default: 1)\n");
printf(" -iper Intra period (default: -1) : must be a power of 2 of GOP size (or -1)\n");
printf(" -numl Number Of Layers\n");
printf(" -cabac CABAC for all layers as entropy coding mode\n");
printf(" -vlc VLC for all layers as entropy coding mode\n");
printf(" -ecmf (Layer) (entropy_coding_mod_flag)\n");
printf(" -org (Layer) (original file)\n");
printf(" -rec (Layer) (reconstructed file)\n");
printf(" -ec (Layer) (entropy coding mode)\n");
printf(" -rqp (Layer) (ResidualQP)\n");
printf(" -mqp (Layer) (Stage) (MotionQP)\n");
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -