Changeset 655 in 3DVCSoftware for trunk/source/App/TAppEncoder/TAppEncCfg.cpp
- Timestamp:
- 23 Oct 2013, 23:01:30 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/App/TAppEncoder/TAppEncCfg.cpp
r622 r655 82 82 m_codedPivotValue = NULL; 83 83 m_targetPivotValue = NULL; 84 85 #if KWU_RC_MADPRED_E0227 86 m_depthMADPred = 0; 87 #endif 84 88 } 85 89 … … 224 228 in>>entry.m_interViewRefPosL[1][i]; 225 229 } 226 #if !H_MV5227 if (entry.m_numActiveRefLayerPics > 0 )228 {229 in>>entry.m_collocatedRefLayerIdx;230 }231 #endif232 230 #endif 233 231 return in; … … 369 367 ("NumberOfLayers", m_numberOfLayers , 1, "Number of layers") 370 368 #if !H_3D 371 #if H_MV5372 369 ("ScalabilityMask", m_scalabilityMask , 2 , "Scalability Mask") 373 #else374 ("ScalabilityMask", m_scalabilityMask , 1 , "Scalability Mask")375 #endif376 370 #else 377 371 ("ScalabilityMask", m_scalabilityMask , 3 , "Scalability Mask, 1: Texture 3: Texture + Depth ") 378 372 #endif 379 373 ("DimensionIdLen", m_dimensionIdLen , cfg_dimensionLength , "Number of bits used to store dimensions Id") 380 #if H_MV5381 374 ("ViewOrderIndex", m_viewOrderIndex , std::vector<Int>(1,0), "View Order Index per layer") 382 375 ("ViewId", m_viewId , std::vector<Int>(1,0), "View Id per View Order Index") 383 #else384 ("ViewId", m_viewId , std::vector<Int>(1,0), "View Id")385 #endif386 376 #if H_3D 387 377 ("DepthFlag", m_depthFlag , std::vector<Int>(1,0), "Depth Flag") … … 428 418 ("FramesToBeEncoded,f", m_framesToBeEncoded, 0, "Number of frames to be encoded (default=all)") 429 419 420 //Field coding parameters 421 ("FieldCoding", m_isField, false, "Signals if it's a field based coding") 422 ("TopFieldFirst, Tff", m_isTopFieldFirst, false, "In case of field based coding, signals whether if it's a top field first or not") 423 430 424 // Profile and level 431 425 ("Profile", m_profile, Profile::NONE, "Profile to be used when encoding (Incomplete)") … … 517 511 ("IlluCompEnable", m_abUseIC, std::vector<Bool>(2, true), "Enable illumination compensation") 518 512 #endif 519 #if LGE_INTER_SDC_E0156513 #if H_3D_INTER_SDC 520 514 ("InterSDC", m_bDepthInterSDCFlag, true, "Enable depth inter SDC") 521 515 #endif … … 594 588 ( "InitialQP", m_RCInitialQP, 0, "Rate control: initial QP" ) 595 589 ( "RCForceIntraQP", m_RCForceIntraQP, false, "Rate control: force intra QP to be equal to initial QP" ) 590 591 #if KWU_RC_VIEWRC_E0227 592 ("ViewWiseTargetBits, -vtbr" , m_viewTargetBits, std::vector<Int>(1, 32), "View-wise target bit-rate setting") 593 ("TargetBitAssign, -ta", m_viewWiseRateCtrl, false, "View-wise rate control on/off") 594 #endif 595 #if KWU_RC_MADPRED_E0227 596 ("DepthMADPred, -dm", m_depthMADPred, (UInt)0, "Depth based MAD prediction on/off") 597 #endif 596 598 #else 597 599 ("RateCtrl,-rc", m_enableRateCtrl, false, "Rate control on/off") 598 600 ("TargetBitrate,-tbr", m_targetBitrate, 0, "Input target bitrate") 599 601 ("NumLCUInUnit,-nu", m_numLCUInUnit, 0, "Number of LCUs in an Unit") 600 #endif 601 602 #if H_MV5 602 603 #if KWU_RC_VIEWRC_E0227 604 ("ViewWiseTargetBits, -vtbr" , m_viewTargetBits, std::vector<Int>(1, 32), "View-wise target bit-rate setting") 605 ("TargetBitAssign, -ta", m_viewWiseRateCtrl, false, "View-wise rate control on/off") 606 #endif 607 #if KWU_RC_MADPRED_E0227 608 ("DepthMADPred, -dm", m_depthMADPred, (UInt)0, "Depth based MAD prediction on/off") 609 #endif 610 #endif 611 603 612 #if H_MV 604 613 // VPS VUI … … 617 626 ("CtuBasedOffsetEnabledFlag" , m_ctuBasedOffsetEnabledFlag , std::vector< Bool >(1,0) ,MAX_NUM_LAYERS , "CtuBasedOffsetEnabledFlag per direct reference for the N-th layer") 618 627 ("MinHorizontalCtuOffsetPlus1" , m_minHorizontalCtuOffsetPlus1 , std::vector< Int >(1,0) ,MAX_NUM_LAYERS , "MinHorizontalCtuOffsetPlus1 per direct reference for the N-th layer") 619 #endif620 628 #endif 621 629 … … 762 770 if( k == 0 ) 763 771 { 764 #if H_MV5765 772 m_GOPListMvc[0][0].m_sliceType = 'I'; 766 #endif767 773 for( Int i = 1; i < MAX_GOP + 1; i++ ) 768 774 { … … 810 816 const list<const Char*>& argv_unhandled = po::scanArgv(opts, argc, (const Char**) argv); 811 817 818 if(m_isField) 819 { 820 //Frame height 821 m_iSourceHeightOrg = m_iSourceHeight; 822 //Field height 823 m_iSourceHeight = m_iSourceHeight >> 1; 824 //number of fields to encode 825 m_framesToBeEncoded *= 2; 826 } 827 812 828 for (list<const Char*>::const_iterator it = argv_unhandled.begin(); it != argv_unhandled.end(); it++) 813 829 { … … 928 944 m_aiPad[1] = m_confBottom = ((m_iSourceHeight / minCuSize) + 1) * minCuSize - m_iSourceHeight; 929 945 m_iSourceHeight += m_confBottom; 946 if ( m_isField ) 947 { 948 m_iSourceHeightOrg += m_confBottom << 1; 949 m_aiPad[1] = m_confBottom << 1; 950 } 930 951 } 931 952 if (m_aiPad[0] % TComSPS::getWinUnitX(CHROMA_420) != 0) … … 968 989 // allocate slice-based dQP values 969 990 #if H_MV 970 #if H_MV5971 991 xResizeVector( m_viewOrderIndex ); 972 992 … … 988 1008 #if H_3D 989 1009 xResizeVector( m_depthFlag ); 990 #endif991 #else992 xResizeVector( m_viewId );993 #if H_3D994 xResizeVector( m_depthFlag );995 996 std::vector<Int> uniqueViewIds;997 for( Int layer = 0; layer < m_numberOfLayers; layer++ )998 {999 Bool isIn = false;1000 for ( Int i = 0 ; i < uniqueViewIds.size(); i++ )1001 {1002 isIn = isIn || ( m_viewId[ layer ] == uniqueViewIds[ i ] );1003 }1004 if ( !isIn )1005 {1006 uniqueViewIds.push_back( m_viewId[ layer ] );1007 }1008 }1009 m_iNumberOfViews = (Int) uniqueViewIds.size();1010 #endif1011 1012 1010 #endif 1013 1011 xResizeVector( m_fQP ); … … 1283 1281 xConfirmPara( (m_layerIdInNuh.size()!=1) && (m_layerIdInNuh.size() < m_numberOfLayers) , "LayerIdInNuh must be given for all layers. "); 1284 1282 1285 #if H_MV51286 1283 #if H_3D 1287 1284 xConfirmPara( m_scalabilityMask != 2 && m_scalabilityMask != 3, "Scalability Mask must be equal to 2 or 3. "); … … 1298 1295 1299 1296 m_dimIds.push_back( m_viewOrderIndex ); 1300 #else1301 #if H_3D1302 xConfirmPara( m_scalabilityMask != 1 && m_scalabilityMask != 3, "Scalability Mask must be equal to 1 or 3. ");1303 #else1304 xConfirmPara( m_scalabilityMask != 1 , "Scalability Mask must be equal to 1. ");1305 #endif1306 1307 m_dimIds.push_back( m_viewId );1308 const Int viewDimPosition = 0;1309 #if H_3D1310 if ( m_scalabilityMask & ( 1 << DEPTH_ID ) )1311 m_dimIds.push_back( m_depthFlag );1312 #endif1313 1314 #endif1315 1297 xConfirmPara( m_dimensionIdLen.size() < m_dimIds.size(), "DimensionIdLen must be given for all dimensions. " ); Int dimBitOffset[MAX_NUM_SCALABILITY_TYPES+1]; 1316 1298 … … 1329 1311 { 1330 1312 xConfirmPara( m_dimIds[j].size() < m_numberOfLayers, "DimensionId must be given for all layers and all dimensions. "); 1331 #if H_MV51332 1313 xConfirmPara( (m_dimIds[j][0] != 0) , "DimensionId of layer 0 must be 0. " ); 1333 #else1334 xConfirmPara( ( j != viewDimPosition ) && (m_dimIds[j][0] != 0), "DimensionId of layer 0 must be 0. " );1335 #endif1336 1314 xConfirmPara( m_dimensionIdLen[j] < 1 || m_dimensionIdLen[j] > 8, "DimensionIdLen must be greater than 0 and less than 9 in all dimensions. " ); 1337 1315 … … 1372 1350 xConfirmPara( allEqual , "Each layer shall have a different position in scalability space." ); 1373 1351 1352 #if !H_3D_FCO 1374 1353 if ( numDiff == 1 ) 1375 1354 { 1376 1355 Bool inc = m_dimIds[ lastDiff ][ i ] > m_dimIds[ lastDiff ][ j ]; 1377 #if H_MV51378 1356 Bool shallBeButIsNotIncreasing = ( !inc ) ; 1379 #else1380 Bool shallBeButIsNotIncreasing = ( !inc && ( lastDiff != viewDimPosition ) ) ;1381 #endif1382 1357 if ( shallBeButIsNotIncreasing ) 1383 1358 { 1384 1359 printf( "\nError: Positions of Layers %d and %d is not increasing in dimension %d \n", i, j, lastDiff); 1385 1360 } 1386 #if H_MV51387 1361 xConfirmPara( shallBeButIsNotIncreasing, "DimensionIds shall be increasing within one dimension. " ); 1388 #else1389 xConfirmPara( shallBeButIsNotIncreasing && ( lastDiff != viewDimPosition ), "DimensionIds shall be increasing within one dimension. " );1390 #endif1391 1362 } 1363 #endif 1392 1364 } 1393 1365 } 1394 1366 1395 #if H_MV51396 1367 /// ViewId 1397 1368 xConfirmPara( m_viewId.size() != m_iNumberOfViews, "The number of ViewIds must be equal to the number of views." ); … … 1399 1370 /// Layer sets 1400 1371 xConfirmPara( m_vpsNumLayerSets < 0 || m_vpsNumLayerSets > 1024, "VpsNumLayerSets must be greater than 0 and less than 1025. ") ; 1401 #else1402 xConfirmPara( m_vpsNumLayerSets < 0 || m_vpsNumLayerSets > 1024, "VpsNumLayerSets must be greater than 0 and less than 1025") ;1403 #endif1404 1372 for( Int lsIdx = 0; lsIdx < m_vpsNumLayerSets; lsIdx++ ) 1405 1373 { … … 1743 1711 Bool errorGOP=false; 1744 1712 Int checkGOP=1; 1745 Int numRefs = 1;1713 Int numRefs = m_isField ? 2 : 1; 1746 1714 Int refList[MAX_NUM_REF_PICS+1]; 1747 1715 refList[0]=0; 1716 if(m_isField) 1717 { 1718 refList[1] = 1; 1719 } 1748 1720 Bool isOK[MAX_GOP]; 1749 1721 for(Int i=0; i<MAX_GOP; i++) … … 2157 2129 xConfirmPara( (numLCUInPic % m_numLCUInUnit) != 0, "total number of LCUs in a frame should be completely divided by NumLCUInUnit" ); 2158 2130 2131 #if !KWU_FIX_URQ 2159 2132 m_iMaxDeltaQP = MAX_DELTA_QP; 2133 #endif 2160 2134 m_iMaxCuDQPDepth = MAX_CUDQP_DEPTH; 2161 2135 } 2162 2136 #endif 2163 #if H_MV52164 2137 #if H_MV 2165 2138 // VPS VUI … … 2184 2157 } 2185 2158 #endif 2186 #endif2187 2159 2188 2160 xConfirmPara(!m_TransquantBypassEnableFlag && m_CUTransquantBypassFlagValue, "CUTransquantBypassFlagValue cannot be 1 when TransquantBypassEnableFlag is 0"); … … 2250 2222 #endif 2251 2223 #if H_MV 2252 #if H_MV52253 2224 xPrintParaVector( "ViewIdVal" , m_viewId ); 2254 2225 xPrintParaVector( "ViewOrderIndex", m_viewOrderIndex ); 2255 #else2256 xPrintParaVector( "ViewId", m_viewId );2257 #endif2258 2226 #endif 2259 2227 #if H_3D … … 2268 2236 printf("Real Format : %dx%d %dHz\n", m_iSourceWidth - m_confLeft - m_confRight, m_iSourceHeight - m_confTop - m_confBottom, m_iFrameRate ); 2269 2237 printf("Internal Format : %dx%d %dHz\n", m_iSourceWidth, m_iSourceHeight, m_iFrameRate ); 2238 if (m_isField) 2239 { 2240 printf("Frame/Field : Field based coding\n"); 2241 printf("Field index : %u - %d (%d fields)\n", m_FrameSkip, m_FrameSkip+m_framesToBeEncoded-1, m_framesToBeEncoded ); 2242 if (m_isTopFieldFirst) 2243 { 2244 printf("Field Order : Top field first\n"); 2245 } 2246 else 2247 { 2248 printf("Field Order : Bottom field first\n"); 2249 } 2250 } 2251 else 2252 { 2253 printf("Frame/Field : Frame based coding\n"); 2270 2254 printf("Frame index : %u - %d (%d frames)\n", m_FrameSkip, m_FrameSkip+m_framesToBeEncoded-1, m_framesToBeEncoded ); 2255 } 2271 2256 printf("CU size / depth : %d / %d\n", m_uiMaxCUWidth, m_uiMaxCUDepth ); 2272 2257 printf("RQT trans. size (min / max) : %d / %d\n", 1 << m_uiQuadtreeTULog2MinSize, 1 << m_uiQuadtreeTULog2MaxSize ); … … 2299 2284 printf("InitialQP : %d\n", m_RCInitialQP ); 2300 2285 printf("ForceIntraQP : %d\n", m_RCForceIntraQP ); 2286 2287 #if KWU_RC_MADPRED_E0227 2288 printf("Depth based MAD prediction : %d\n", m_depthMADPred); 2289 #endif 2290 #if KWU_RC_VIEWRC_E0227 2291 printf("View-wise Rate control : %d\n", m_viewWiseRateCtrl); 2292 if(m_viewWiseRateCtrl) 2293 { 2294 2295 printf("ViewWiseTargetBits : "); 2296 for (Int i = 0 ; i < m_iNumberOfViews ; i++) 2297 printf("%d ", m_viewTargetBits[i]); 2298 printf("\n"); 2299 } 2300 else 2301 { 2302 printf("TargetBitrate : %d\n", m_RCTargetBitrate ); 2303 } 2304 #endif 2301 2305 } 2302 2306 #else … … 2306 2310 printf("TargetBitrate : %d\n", m_targetBitrate); 2307 2311 printf("NumLCUInUnit : %d\n", m_numLCUInUnit); 2312 2313 #if KWU_RC_MADPRED_E0227 2314 printf("Depth based MAD prediction : %d\n", m_depthMADPred); 2315 #endif 2316 #if KWU_RC_VIEWRC_E0227 2317 printf("View-wise Rate control : %d\n", m_viewWiseRateCtrl); 2318 if(m_viewWiseRateCtrl) 2319 { 2320 2321 printf("ViewWiseTargetBits : "); 2322 for (Int i = 0 ; i < m_iNumberOfViews ; i++) 2323 printf("%d ", m_viewTargetBits[i]); 2324 printf("\n"); 2325 } 2326 else 2327 { 2328 printf("TargetBitrate : %d\n", m_targetBitrate ); 2329 } 2330 #endif 2308 2331 } 2309 2332 #endif … … 2414 2437 printf("DLT:%d ", m_useDLT ); 2415 2438 #endif 2416 #if LGE_INTER_SDC_E01562439 #if H_3D_INTER_SDC 2417 2440 printf( "interSDC: %d ", m_bDepthInterSDCFlag ? 1 : 0 ); 2418 2441 #endif
Note: See TracChangeset for help on using the changeset viewer.