Changeset 475 in SHVCSoftware for branches/SHM-4.0-dev/source/App/TAppEncoder/TAppEncCfg.cpp
- Timestamp:
- 15 Nov 2013, 14:55:37 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-4.0-dev/source/App/TAppEncoder/TAppEncCfg.cpp
r471 r475 224 224 } 225 225 226 #if AUXILIARY_PICTURES 227 static inline ChromaFormat numberToChromaFormat(const Int val) 228 { 229 switch (val) 230 { 231 case 400: return CHROMA_400; break; 232 case 420: return CHROMA_420; break; 233 case 422: return CHROMA_422; break; 234 case 444: return CHROMA_444; break; 235 default: return NUM_CHROMA_FORMAT; 236 } 237 } 238 #endif 239 226 240 #if SVC_EXTENSION 227 241 void TAppEncCfg::getDirFilename(string& filename, string& dir, const string path) … … 363 377 UInt* cfg_uiQuadtreeTUMaxDepthIntra[MAX_LAYERS]; 364 378 #endif 379 #if AUXILIARY_PICTURES 380 Int cfg_tmpChromaFormatIDC [MAX_LAYERS]; 381 Int cfg_tmpInputChromaFormat[MAX_LAYERS]; 382 Int* cfg_auxId [MAX_LAYERS]; 383 #endif 365 384 #if VPS_EXTN_DIRECT_REF_LAYERS 366 385 #if M0457_PREDICTION_INDICATIONS … … 477 496 cfg_maxTidIlRefPicsPlus1[layer] = &m_acLayerCfg[layer].m_maxTidIlRefPicsPlus1; 478 497 #endif 498 #if AUXILIARY_PICTURES 499 cfg_auxId[layer] = &m_acLayerCfg[layer].m_auxId; 500 #endif 479 501 } 480 502 #if AVC_BASE … … 533 555 #endif 534 556 ("NumLayers", m_numLayers, 1, "Number of layers to code") 557 #if AUXILIARY_PICTURES 558 ("InputChromaFormat%d", cfg_tmpInputChromaFormat, 420, MAX_LAYERS, "InputChromaFormatIDC for layer %d") 559 ("ChromaFormatIDC%d,-cf", cfg_tmpChromaFormatIDC, 420, MAX_LAYERS, "ChromaFormatIDC (400|420|422|444 or set 0 (default) for same as InputChromaFormat) for layer %d") 560 ("AuxId%d", cfg_auxId, 0, MAX_LAYERS, "Auxilary picture ID for layer %d (0: Not aux pic, 1: Alpha plane, 2: Depth picture, 3: Cb enh, 4: Cr enh") 561 #endif 535 562 ("ConformanceMode%d", cfg_conformanceMode,0, MAX_LAYERS, "Window conformance mode (0: no cropping, 1:automatic padding, 2: padding, 3:cropping") 536 563 #if SCALABILITY_MASK_E0104 537 564 ("ScalabilityMask1", m_scalabilityMask[1], 0, "scalability_mask[1] (multiview)") 538 565 ("ScalabilityMask2", m_scalabilityMask[2], 1, "scalability_mask[2] (scalable)" ) 566 #if AUXILIARY_PICTURES 567 ("ScalabilityMask3", m_scalabilityMask[3], 0, "scalability_mask[3] (auxiliary pictures)" ) 568 #endif 539 569 #else 540 570 ("ScalabilityMask0", m_scalabilityMask[0], 0, "scalability_mask[0] (multiview)") … … 597 627 ("OutputBitDepthC", m_outputBitDepthC, 0, "As per OutputBitDepth but for chroma component. (default:InternalBitDepthC)") 598 628 ("InternalBitDepthC", m_internalBitDepthC, 0, "As per InternalBitDepth but for chroma component. (default:IntrenalBitDepth)") 629 #if AUXILIARY_PICTURES 630 ("InputChromaFormat", tmpInputChromaFormat, 420, "InputChromaFormatIDC") 631 ("ChromaFormatIDC,-cf", tmpChromaFormat, 0, "ChromaFormatIDC (400|420|422|444 or set 0 (default) for same as InputChromaFormat)") 632 #endif 599 633 ("ConformanceMode", m_conformanceMode, 0, "Window conformance mode (0: no window, 1:automatic padding, 2:padding, 3:conformance") 600 634 ("HorizontalPadding,-pdx",m_aiPad[0], 0, "Horizontal source padding for conformance window mode 2") … … 1211 1245 m_acLayerCfg[layer].m_refLayerIds = NULL; 1212 1246 } 1247 } 1248 #endif 1249 #if AUXILIARY_PICTURES 1250 for(UInt layer = 0; layer < MAX_LAYERS; layer++) 1251 { 1252 m_acLayerCfg[layer].m_InputChromaFormat = numberToChromaFormat(cfg_tmpChromaFormatIDC[layer]); 1253 m_acLayerCfg[layer].m_chromaFormatIDC = ((cfg_tmpChromaFormatIDC[layer] == 0) ? (m_acLayerCfg[layer].m_InputChromaFormat ) : (numberToChromaFormat(cfg_tmpChromaFormatIDC[layer]))); 1213 1254 } 1214 1255 #endif … … 2251 2292 } 2252 2293 #endif 2294 #if AUXILIARY_PICTURES 2295 for (UInt layer=0; layer < MAX_LAYERS-1; layer++) 2296 { 2297 xConfirmPara(m_acLayerCfg[layer].m_auxId < 0 || m_acLayerCfg[layer].m_auxId > 4, "AuxId must be in range 0 to 4"); 2298 xConfirmPara(m_acLayerCfg[layer].m_auxId > 0 && m_acLayerCfg[layer].m_chromaFormatIDC != CHROMA_400, "Auxiliary picture must be monochrome picture"); 2299 } 2300 #endif 2253 2301 #undef xConfirmPara 2254 2302 if (check_failed) … … 2331 2379 printf("Multiview : %d\n", m_scalabilityMask[1] ); 2332 2380 printf("Scalable : %d\n", m_scalabilityMask[2] ); 2381 #if AUXILIARY_PICTURES 2382 printf("Auxiliary pictures : %d\n", m_scalabilityMask[3] ); 2383 #endif 2333 2384 #else 2334 2385 printf("Multiview : %d\n", m_scalabilityMask[0] );
Note: See TracChangeset for help on using the changeset viewer.