Changeset 1328 in 3DVCSoftware for branches/HTM-15.1-dev0/source/Lib/TLibCommon
- Timestamp:
- 14 Sep 2015, 19:41:29 (9 years ago)
- Location:
- branches/HTM-15.1-dev0/source/Lib/TLibCommon
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-15.1-dev0/source/Lib/TLibCommon/CommonDef.h
r1322 r1328 173 173 #if NH_MV 174 174 static const Int MAX_NUM_LAYER_IDS = 63; 175 #if NH_MV_SEI 176 static const Int MAX_NUM_SEIS = 1000; 177 #endif 175 178 #else 176 179 static const Int MAX_NUM_LAYER_IDS = 64; … … 280 283 static const Int MAX_NUM_PICS_RPS = 16 ; 281 284 static const Int MAX_NUM_REF_LAYERS = 63 ; 285 #if NH_MV_SEI 286 static IntAry1d getRangeVec( Int rngStart, Int rngEnd ) { IntAry1d rng; for (Int i = rngStart; i<=rngEnd; i++) rng.push_back(i); return rng; }; 287 static const IntAry1d IDR_NAL_UNIT_TYPES = getRangeVec( NAL_UNIT_CODED_SLICE_IDR_W_RADL, NAL_UNIT_CODED_SLICE_IDR_N_LP ); 288 static const IntAry1d IRAP_NAL_UNIT_TYPES = getRangeVec( NAL_UNIT_CODED_SLICE_BLA_W_LP , NAL_UNIT_CODED_SLICE_CRA ); 289 290 #endif 282 291 #endif 283 292 -
branches/HTM-15.1-dev0/source/Lib/TLibCommon/SEI.cpp
r1313 r1328 32 32 */ 33 33 34 /** \file SEI.cpp34 /** \file #SEI.cpp 35 35 \brief helper functions for SEI handling 36 36 */ … … 38 38 #include "CommonDef.h" 39 39 #include "SEI.h" 40 #if NH_MV_SEI 41 #include "TComSlice.h" 42 #endif 40 43 41 44 SEIMessages getSeisByType(SEIMessages &seiList, SEI::PayloadType seiType) … … 150 153 case SEI::CHROMA_SAMPLING_FILTER_HINT: return "Chroma sampling filter hint"; 151 154 #if NH_MV 152 case SEI::SUB_BITSTREAM_PROPERTY: return "Sub-bitstream property SEI message"; 155 case SEI::COLOUR_REMAPPING_INFO: return "Colour remapping information"; 156 case SEI::DEINTERLACED_FIELD_IDENTIFICATION: return "Deinterlaced field identification"; 157 case SEI::LAYERS_NOT_PRESENT: return "Layers not present"; 158 case SEI::INTER_LAYER_CONSTRAINED_TILE_SETS: return "Inter-layer constrained tile sets"; 159 case SEI::BSP_NESTING: return "Bitstream partition nesting"; 160 case SEI::BSP_INITIAL_ARRIVAL_TIME: return "Bitstream partition initial arrival time"; 161 case SEI::SUB_BITSTREAM_PROPERTY: return "Sub-bitstream property"; 162 case SEI::ALPHA_CHANNEL_INFO: return "Alpha channel information"; 163 case SEI::OVERLAY_INFO: return "Overlay information" ; 164 case SEI::TEMPORAL_MV_PREDICTION_CONSTRAINTS: return "Temporal motion vector prediction constraints"; 165 case SEI::FRAME_FIELD_INFO: return "Frame-field information"; 166 case SEI::THREE_DIMENSIONAL_REFERENCE_DISPLAYS_INFO: return "3D reference displays information"; 167 case SEI::DEPTH_REPRESENTATION_INFO: return "Depth representation information"; 168 case SEI::MULTIVIEW_SCENE_INFO: return "Multiview scene information"; 169 case SEI::MULTIVIEW_ACQUISITION_INFO: return "Multiview acquisition information"; 170 case SEI::MULTIVIEW_VIEW_POSITION: return "Multiview view position"; 171 #if NH_3D 172 case SEI::ALTERNATIVE_DEPTH_INFO: return "Alternative depth information"; 173 #endif 153 174 #endif 154 175 default: return "Unknown"; 155 176 } 156 177 } 178 179 #if NH_MV_SEI 180 SEI::SEI() 181 { 182 m_scalNestSeiContThisSei = NULL; 183 } 184 185 SEI* SEI::getNewSEIMessage(SEI::PayloadType payloadType) 186 { 187 switch (payloadType) 188 { 189 #if NH_MV_SEI_TBD 190 ////////////////////////////////////////////////////////////////////////// 191 // TBD: Modify version 1 SEIs to use the same interfaces as Annex GFI SEI messages. 192 ////////////////////////////////////////////////////////////////////////// 193 194 case SEI::BUFFERING_PERIOD: return new SEIBufferingPeriod; 195 case SEI::PICTURE_TIMING: return new SEIPictureTiming; 196 case SEI::PAN_SCAN_RECT: return new SEIPanScanRectangle; // not currently decoded 197 case SEI::FILLER_PAYLOAD: return new SEIFillerPaylod; // not currently decoded 198 case SEI::USER_DATA_REGISTERED_ITU_T_T35: return new SEIUserDataRegistered; // not currently decoded 199 case SEI::USER_DATA_UNREGISTERED: return new SEIuserDataUnregistered; 200 case SEI::RECOVERY_POINT: return new SEIRecoveryPoint; 201 case SEI::SCENE_INFO: return new SEISceneInformation; // not currently decoded 202 case SEI::FULL_FRAME_SNAPSHOT: return new SEIPictureSnapshot; // not currently decoded 203 case SEI::PROGRESSIVE_REFINEMENT_SEGMENT_START: return new SEIProgressiveRefinementSegmentStart; // not currently decoded 204 case SEI::PROGRESSIVE_REFINEMENT_SEGMENT_END: return new SEIProgressiveRefinementSegmentEnd; // not currently decoded 205 case SEI::FILM_GRAIN_CHARACTERISTICS: return new SEIFilmGrainCharacteristics; // not currently decoded 206 case SEI::POST_FILTER_HINT: return new SEIPostFilterHint; // not currently decoded 207 case SEI::TONE_MAPPING_INFO: return new SEIToneMappingInfo; 208 case SEI::KNEE_FUNCTION_INFO: return new SEIKneeFunctionInfo; 209 case SEI::FRAME_PACKING: return new SEIFramePacking; 210 case SEI::DISPLAY_ORIENTATION: return new SEIDisplayOrientation; 211 case SEI::SOP_DESCRIPTION: return new SEISOPDescription; 212 case SEI::ACTIVE_PARAMETER_SETS: return new SEIActiveParameterSets; 213 case SEI::DECODING_UNIT_INFO: return new SEIDecodingUnitInfo; 214 case SEI::TEMPORAL_LEVEL0_INDEX: return new SEITemporalLevel0Index 215 case SEI::DECODED_PICTURE_HASH: return new SEIDecodedPictureHash; 216 case SEI::SCALABLE_NESTING: return new SEIScalableNesting; 217 case SEI::REGION_REFRESH_INFO: return new SEIRegionRefreshInfo; 218 case SEI::NO_DISPLAY: return new SEINoDisplay; 219 case SEI::TIME_CODE: return new SEITimeCode; 220 case SEI::MASTERING_DISPLAY_COLOUR_VOLUME: return new SEIMasteringDisplayColourVolume; 221 case SEI::SEGM_RECT_FRAME_PACKING: return new SEISegmentedRectFramePacking; 222 case SEI::TEMP_MOTION_CONSTRAINED_TILE_SETS: return new SEITempMotionConstrainedTileSets; 223 case SEI::CHROMA_SAMPLING_FILTER_HINT: return new SEIChromaSamplingFilterHint 224 #endif 225 #if NH_MV_SEI 226 #if NH_MV_SEI_TBD 227 case SEI::LAYERS_NOT_PRESENT : return new SEILayersNotPresent; 228 #endif 229 case SEI::INTER_LAYER_CONSTRAINED_TILE_SETS : return new SEIInterLayerConstrainedTileSets; 230 #if NH_MV_SEI_TBD 231 case SEI::BSP_NESTING : return new SEIBspNesting; 232 case SEI::BSP_INITIAL_ARRIVAL_TIME : return new SEIBspInitialArrivalTime; 233 #endif 234 case SEI::SUB_BITSTREAM_PROPERTY : return new SEISubBitstreamProperty; 235 #if NH_MV_SEI_TBD 236 case SEI::ALPHA_CHANNEL_INFO : return new SEIAlphaChannelInfo; 237 case SEI::OVERLAY_INFO : return new SEIOverlayInfo; 238 #endif 239 case SEI::TEMPORAL_MV_PREDICTION_CONSTRAINTS : return new SEITemporalMvPredictionConstraints; 240 #if NH_MV_SEI_TBD 241 case SEI::FRAME_FIELD_INFO : return new SEIFrameFieldInfo; 242 case SEI::THREE_DIMENSIONAL_REFERENCE_DISPLAYS_INFO: return new SEIThreeDimensionalReferenceDisplaysInfo; 243 case SEI::DEPTH_REPRESENTATION_INFO : return new SEIDepthRepresentationInfo; 244 #endif 245 case SEI::MULTIVIEW_SCENE_INFO : return new SEIMultiviewSceneInfo; 246 case SEI::MULTIVIEW_ACQUISITION_INFO : return new SEIMultiviewAcquisitionInfo; 247 case SEI::MULTIVIEW_VIEW_POSITION : return new SEIMultiviewViewPosition; 248 #if NH_MV_SEI_TBD 249 #if NH_3D 250 case SEI::ALTERNATIVE_DEPTH_INFO : return new SEIAlternativeDepthInfo; 251 #endif 252 #endif 253 #endif 254 default: assert( false ); return NULL; 255 } 256 } 257 258 Void SEI::setupFromSlice ( const TComSlice* slice ) 259 { 260 xPrintCfgErrorIntro(); 261 std::cout << getSEIMessageString( payloadType() ) << "Setup by the encoder is currently not possible. Using the default SEI cfg-file." << std::endl; 262 } 263 264 SEI* SEI::getCopy() const 265 { 266 assert( 0 ); 267 return NULL; 268 } 269 270 Void SEI::setupFromCfgFile( const Char* cfgFile ) 271 { 272 assert( false ); 273 } 274 275 Bool SEI::insertSei( Int curLayerId, Int curPoc, Int curTid, Int curNaluType ) const 276 { 277 Bool insertSeiHere = true; 278 if( !m_applicableLayerIds.empty() ) 279 { 280 insertSeiHere = insertSeiHere && ( std::find( m_applicableLayerIds.begin(), m_applicableLayerIds.end(), curLayerId) != m_applicableLayerIds.end() ) ; 281 } 282 if( !m_applicablePocs .empty() ) 283 { 284 insertSeiHere = insertSeiHere && ( std::find( m_applicablePocs .begin(), m_applicablePocs .end(), curPoc ) != m_applicablePocs .end() ) ; 285 } 286 if( !m_applicableTids .empty() ) 287 { 288 insertSeiHere = insertSeiHere && ( std::find( m_applicableTids .begin(), m_applicableTids .end(), curTid ) != m_applicableTids .end() ) ; 289 } 290 if( !m_applicableVclNaluTypes.empty() ) 291 { 292 insertSeiHere = insertSeiHere && ( std::find( m_applicableVclNaluTypes.begin(), m_applicableVclNaluTypes.end(), curNaluType) != m_applicableVclNaluTypes.end() ) ; 293 } 294 return insertSeiHere; 295 } 296 297 Bool SEI::checkCfg( const TComSlice* slice ) 298 { 299 assert( false ); 300 return true; 301 } 302 303 Void SEI::xPrintCfgErrorIntro() 304 { 305 std::cout << "Error in configuration of " << getSEIMessageString( payloadType() ) << " SEI: "; 306 } 307 308 Void SEI::xCheckCfgRange( Bool& wrongConfig, Int val, Int minVal, Int maxVal, const Char* seName ) 309 { 310 if ( val < minVal || val > maxVal ) 311 { 312 xPrintCfgErrorIntro(); 313 std::cout << "The value of " << seName << "shall be in the range of " << minVal << " to " << maxVal << ", inclusive." << std::endl; 314 wrongConfig = true; 315 } 316 } 317 318 Void SEI::xAddGeneralOpts(po::Options &opts, IntAry1d defAppLayerIds, IntAry1d deftApplicablePocs, 319 IntAry1d defAppTids, IntAry1d defAppVclNaluTypes, 320 Int defSeiNaluId, Int defPositionInSeiNalu, Bool defModifyByEncoder) 321 { 322 opts.addOptions() 323 ("PayloadType" , m_payloadType , -1 , "Payload Type" ) 324 ("ApplicableLayerIds" , m_applicableLayerIds , defAppLayerIds , "LayerIds of layers to which the SEI is added. (all when empty)") 325 ("ApplicablePocs" , m_applicablePocs , deftApplicablePocs , "POCs of pictures to which the SEI is added. (all when empty)") 326 ("ApplicableTids" , m_applicableTids , defAppTids , "TIds of pictures to which the SEI is added. (all when empty)") 327 ("ApplicableVclNaluTypes" , m_applicableVclNaluTypes , defAppVclNaluTypes , "NaluUnitTypes of picture to which the SEI is added. (all when empty)") 328 ("SeiNaluId" , m_seiNaluId , defSeiNaluId , "Identifies to which NAL unit the SEI is added." ) 329 ("PositionInSeiNalu" , m_positionInSeiNalu , defPositionInSeiNalu , "Identifies the position within the NAL unit.") 330 ("ModifyByEncoder" , m_modifyByEncoder , defModifyByEncoder , "0: Use payload as specified in cfg file 1: Modify SEI by encoder"); 331 } 332 333 Void SEI::xCheckCfg( Bool& wrongConfig, Bool cond, const Char* errStr ) 334 { 335 if ( !cond ) 336 { 337 xPrintCfgErrorIntro(); 338 std::cout << errStr << std::endl; 339 wrongConfig = true; 340 } 341 } 342 343 344 #if NH_MV_SEI_TBD 345 Void SEILayersNotPresent::setupFromCfgFile(const Char* cfgFile) 346 { 347 // Set default values 348 IntAry1d defAppLayerIds, defAppPocs, defAppTids, defAppVclNaluTypes; 349 350 // TBD: Add default values for which layers, POCS, Tids or Nalu types the SEI should be send. 351 defAppLayerIds .push_back( TBD ); 352 defAppPocs .push_back( TBD ); 353 defAppTids .push_back( TBD ); 354 defAppVclNaluTypes.push_back( TBD ); 355 356 Int defSeiNaluId = 0; 357 Int defPositionInSeiNalu = 0; 358 Bool defModifyByEncoder = TBD; 359 360 // Setup config file options 361 po::Options opts; 362 xAddGeneralOpts( opts , defAppLayerIds, defAppPocs, defAppTids, defAppVclNaluTypes, defSeiNaluId, defPositionInSeiNalu, defModifyByEncoder ); 363 364 opts.addOptions() 365 ("LnpSeiActiveVpsId" , m_lnpSeiActiveVpsId , 0 , "LnpSeiActiveVpsId" ) 366 ("LayerNotPresentFlag" , m_layerNotPresentFlag , BoolAry1d(1,0) , "LayerNotPresentFlag" ) 367 ; 368 369 po::setDefaults(opts); 370 371 // Parse the cfg file 372 po::ErrorReporter err; 373 po::parseConfigFile( opts, cfgFile, err ); 374 }; 375 376 Bool SEILayersNotPresent::checkCfg( const TComSlice* slice ) 377 { 378 // Check config values 379 Bool wrongConfig = false; 380 381 // TBD: Add constraints on presence of SEI here. 382 xCheckCfg ( wrongConfig, TBD , "TBD" ); 383 xCheckCfg ( wrongConfig, TBD , "TBD" ); 384 385 // TBD: Modify constraints according to the SEI semantics. 386 xCheckCfgRange( wrongConfig, m_lnpSeiActiveVpsId , MINVAL , MAXVAL, "lnp_sei_active_vps_id" ); 387 xCheckCfgRange( wrongConfig, m_layerNotPresentFlag[i] , MINVAL , MAXVAL, "layer_not_present_flag" ); 388 389 return wrongConfig; 390 }; 391 392 Void SEILayersNotPresent::setupFromSlice ( const TComSlice* slice ) 393 { 394 sei.m_lnpSeiActiveVpsId = TBD ; 395 for( Int i = 0; i <= MaxLayersMinus1; i++ ) 396 { 397 sei.m_layerNotPresentFlag[i] = TBD ; 398 } 399 }; 400 #endif 401 402 403 Void SEIInterLayerConstrainedTileSets::setupFromCfgFile(const Char* cfgFile) 404 { 405 // Set default values 406 IntAry1d defAppLayerIds, defAppPocs, defAppTids, defAppVclNaluTypes; 407 408 // TBD: Add default values for which layers, POCS, Tids or Nalu types the SEI should be send. 409 defAppLayerIds .empty( ); 410 defAppPocs .push_back( 0 ); 411 defAppTids .empty( ); 412 defAppVclNaluTypes.empty( ); 413 414 Int defSeiNaluId = 0; 415 Int defPositionInSeiNalu = 0; 416 Bool defModifyByEncoder = false; 417 418 // Setup config file options 419 po::Options opts; 420 xAddGeneralOpts( opts , defAppLayerIds, defAppPocs, defAppTids, defAppVclNaluTypes, defSeiNaluId, defPositionInSeiNalu, defModifyByEncoder ); 421 422 const Int maxNumTileInSet = 100; 423 424 opts.addOptions() 425 ("IlAllTilesExactSampleValueMatchFlag", m_ilAllTilesExactSampleValueMatchFlag, false , "IlAllTilesExactSampleValueMatchFlag") 426 ("IlOneTilePerTileSetFlag" , m_ilOneTilePerTileSetFlag , false , "IlOneTilePerTileSetFlag" ) 427 ("IlNumSetsInMessageMinus1" , m_ilNumSetsInMessageMinus1 , 0 , "IlNumSetsInMessageMinus1" ) 428 ("SkippedTileSetPresentFlag" , m_skippedTileSetPresentFlag , false , "SkippedTileSetPresentFlag" ) 429 ("IlctsId" , m_ilctsId , IntAry1d (256,0) , "IlctsId" ) 430 ("IlNumTileRectsInSetMinus1" , m_ilNumTileRectsInSetMinus1 , IntAry1d (256,0) , "IlNumTileRectsInSetMinus1" ) 431 ("IlTopLeftTileIndex_%d" , m_ilTopLeftTileIndex , IntAry1d (maxNumTileInSet,0), 256, "IlTopLeftTileIndex" ) 432 ("IlBottomRightTileIndex_%d" , m_ilBottomRightTileIndex , IntAry1d (maxNumTileInSet,0), 256, "IlBottomRightTileIndex" ) 433 ("IlcIdc" , m_ilcIdc , IntAry1d (256,0) , "IlcIdc" ) 434 ("IlExactSampleValueMatchFlag" , m_ilExactSampleValueMatchFlag , BoolAry1d(256,0) , "IlExactSampleValueMatchFlag" ) 435 ("AllTilesIlcIdc" , m_allTilesIlcIdc , 0 , "AllTilesIlcIdc" ) 436 ; 437 438 po::setDefaults(opts); 439 440 // Parse the cfg file 441 po::ErrorReporter err; 442 po::parseConfigFile( opts, cfgFile, err ); 443 }; 444 445 Bool SEIInterLayerConstrainedTileSets::checkCfg( const TComSlice* slice ) 446 { 447 // Check config values 448 Bool wrongConfig = false; 449 const TComPPS* pps = slice->getPPS(); 450 451 // Currently only the active PPS checked. 452 xCheckCfg ( wrongConfig, pps->getTilesEnabledFlag() , "The inter-layer constrained tile sets SEI message shall not be present for the layer with nuh_layer_id equal to targetLayerId when tiles_enabled_flag is equal to 0 for any PPS that is active for the pictures of the CLVS of the layer with nuh_layer_id equal to targetLayerId." ); 453 454 if ( m_ilOneTilePerTileSetFlag ) 455 { 456 xCheckCfg( wrongConfig, ( pps->getNumTileColumnsMinus1() + 1 ) * ( pps->getNumTileRowsMinus1() + 1 ) <= 256, "It is a requirement of bitstream conformance that when il_one_tile_per_tile_set_flag is equal to 1, the value of ( num_tile_columns_minus1 + 1 ) * ( num_tile_rows_minus1 + 1 ) shall be less than or equal to 256." ); 457 } 458 Int numSignificantSets = m_ilNumSetsInMessageMinus1 - m_skippedTileSetPresentFlag + 1; 459 460 for (Int i = 0 ; i < numSignificantSets; i++) 461 { 462 xCheckCfgRange( wrongConfig, m_ilctsId[i] , 0 , (1 << 30) - 1, "ilcts_id" ); 463 } 464 465 return wrongConfig; 466 }; 467 #if NH_MV_SEI_TBD 468 469 Void SEIBspNesting::setupFromSlice ( const TComSlice* slice ) 470 { 471 sei.m_seiOlsIdx = TBD ; 472 sei.m_seiPartitioningSchemeIdx = TBD ; 473 sei.m_bspIdx = TBD ; 474 while( !ByteaLigned(() ) ); 475 { 476 sei.m_bspNestingZeroBit = TBD ; 477 } 478 sei.m_numSeisInBspMinus1 = TBD ; 479 for( Int i = 0; i <= NumSeisInBspMinus1( ); i++ ) 480 { 481 SeiMessage(() ); 482 } 483 }; 484 485 Void SEIBspNesting::setupFromCfgFile(const Char* cfgFile) 486 { 487 // Set default values 488 IntAry1d defAppLayerIds, defAppPocs, defAppTids, defAppVclNaluTypes; 489 490 // TBD: Add default values for which layers, POCS, Tids or Nalu types the SEI should be send. 491 defAppLayerIds .push_back( TBD ); 492 defAppPocs .push_back( TBD ); 493 defAppTids .push_back( TBD ); 494 defAppVclNaluTypes.push_back( TBD ); 495 496 Int defSeiNaluId = 0; 497 Int defPositionInSeiNalu = 0; 498 Bool defModifyByEncoder = TBD; 499 500 // Setup config file options 501 po::Options opts; 502 xAddGeneralOpts( opts , defAppLayerIds, defAppPocs, defAppTids, defAppVclNaluTypes, defSeiNaluId, defPositionInSeiNalu, defModifyByEncoder ); 503 504 opts.addOptions() 505 ("SeiOlsIdx" , m_seiOlsIdx , 0 , "SeiOlsIdx" ) 506 ("SeiPartitioningSchemeIdx" , m_seiPartitioningSchemeIdx , 0 , "SeiPartitioningSchemeIdx" ) 507 ("BspIdx" , m_bspIdx , 0 , "BspIdx" ) 508 ("BspNestingZeroBit" , m_bspNestingZeroBit , 0 , "BspNestingZeroBit" ) 509 ("NumSeisInBspMinus1" , m_numSeisInBspMinus1 , 0 , "NumSeisInBspMinus1" ) 510 ; 511 512 po::setDefaults(opts); 513 514 // Parse the cfg file 515 po::ErrorReporter err; 516 po::parseConfigFile( opts, cfgFile, err ); 517 }; 518 519 Bool SEIBspNesting::checkCfg( const TComSlice* slice ) 520 { 521 // Check config values 522 Bool wrongConfig = false; 523 524 // TBD: Add constraints on presence of SEI here. 525 xCheckCfg ( wrongConfig, TBD , "TBD" ); 526 xCheckCfg ( wrongConfig, TBD , "TBD" ); 527 528 // TBD: Modify constraints according to the SEI semantics. 529 xCheckCfgRange( wrongConfig, m_seiOlsIdx , MINVAL , MAXVAL, "sei_ols_idx" ); 530 xCheckCfgRange( wrongConfig, m_seiPartitioningSchemeIdx , MINVAL , MAXVAL, "sei_partitioning_scheme_idx" ); 531 xCheckCfgRange( wrongConfig, m_bspIdx , MINVAL , MAXVAL, "bsp_idx" ); 532 xCheckCfgRange( wrongConfig, m_bspNestingZeroBit , MINVAL , MAXVAL, "bsp_nesting_zero_bit "); 533 xCheckCfgRange( wrongConfig, m_numSeisInBspMinus1 , MINVAL , MAXVAL, "num_seis_in_bsp_minus1" ); 534 535 return wrongConfig; 536 537 }; 538 539 Void SEIBspInitialArrivalTime::setupFromSlice ( const TComSlice* slice ) 540 { 541 psIdx = SeiPartitioningSchemeIdx(); 542 if( nalInitialArrivalDelayPresent ) 543 { 544 for( Int i = 0; i < BspSchedCnt( SeiOlsIdx(), psIdx, MaxTemporalId( 0 ) ); i++ ) 545 { 546 sei.m_nalInitialArrivalDelay[i] = TBD ; 547 } 548 } 549 if( vclInitialArrivalDelayPresent ) 550 { 551 for( Int i = 0; i < BspSchedCnt( SeiOlsIdx(), psIdx, MaxTemporalId( 0 ) ); i++ ) 552 { 553 sei.m_vclInitialArrivalDelay[i] = TBD ; 554 } 555 } 556 }; 557 558 Void SEIBspInitialArrivalTime::setupFromCfgFile(const Char* cfgFile) 559 { 560 // Set default values 561 IntAry1d defAppLayerIds, defAppPocs, defAppTids, defAppVclNaluTypes; 562 563 // TBD: Add default values for which layers, POCS, Tids or Nalu types the SEI should be send. 564 defAppLayerIds .push_back( TBD ); 565 defAppPocs .push_back( TBD ); 566 defAppTids .push_back( TBD ); 567 defAppVclNaluTypes.push_back( TBD ); 568 569 Int defSeiNaluId = 0; 570 Int defPositionInSeiNalu = 0; 571 Bool defModifyByEncoder = TBD; 572 573 // Setup config file options 574 po::Options opts; 575 xAddGeneralOpts( opts , defAppLayerIds, defAppPocs, defAppTids, defAppVclNaluTypes, defSeiNaluId, defPositionInSeiNalu, defModifyByEncoder ); 576 577 opts.addOptions() 578 ("NalInitialArrivalDelay" , m_nalInitialArrivalDelay , IntAry1d (1,0) , "NalInitialArrivalDelay" ) 579 ("VclInitialArrivalDelay" , m_vclInitialArrivalDelay , IntAry1d (1,0) , "VclInitialArrivalDelay" ) 580 ; 581 582 po::setDefaults(opts); 583 584 // Parse the cfg file 585 po::ErrorReporter err; 586 po::parseConfigFile( opts, cfgFile, err ); 587 }; 588 589 Bool SEIBspInitialArrivalTime::checkCfg( const TComSlice* slice ) 590 { 591 // Check config values 592 Bool wrongConfig = false; 593 594 // TBD: Add constraints on presence of SEI here. 595 xCheckCfg ( wrongConfig, TBD , "TBD" ); 596 xCheckCfg ( wrongConfig, TBD , "TBD" ); 597 598 // TBD: Modify constraints according to the SEI semantics. 599 xCheckCfgRange( wrongConfig, m_nalInitialArrivalDelay[i] , MINVAL , MAXVAL, "nal_initial_arrival_delay" ); 600 xCheckCfgRange( wrongConfig, m_vclInitialArrivalDelay[i] , MINVAL , MAXVAL, "vcl_initial_arrival_delay" ); 601 602 return wrongConfig; 603 604 }; 605 #endif 606 607 Void SEISubBitstreamProperty::setupFromCfgFile(const Char* cfgFile) 608 { 609 // Set default values 610 IntAry1d defAppLayerIds, defAppPocs, defAppTids, defAppVclNaluTypes; 611 612 // TBD: Add default values for which layers, POCS, Tids or Nalu types the SEI should be send. 613 defAppLayerIds .push_back( 0 ); 614 defAppPocs .push_back( 0 ); 615 defAppTids .push_back( 0 ); 616 defAppVclNaluTypes = IRAP_NAL_UNIT_TYPES; 617 618 Int defSeiNaluId = 0; 619 Int defPositionInSeiNalu = 0; 620 Bool defModifyByEncoder = false; 621 622 // Setup config file options 623 po::Options opts; 624 xAddGeneralOpts( opts , defAppLayerIds, defAppPocs, defAppTids, defAppVclNaluTypes, defSeiNaluId, defPositionInSeiNalu, defModifyByEncoder ); 625 626 opts.addOptions() 627 ("SbPropertyActiveVpsId" , m_sbPropertyActiveVpsId , 0 , "SbPropertyActiveVpsId" ) 628 ("NumAdditionalSubStreamsMinus1" , m_numAdditionalSubStreamsMinus1 , 0 , "NumAdditionalSubStreamsMinus1" ) 629 ("SubBitstreamMode" , m_subBitstreamMode , IntAry1d (1,0) , "SubBitstreamMode" ) 630 ("OlsIdxToVps" , m_olsIdxToVps , IntAry1d (1,0) , "OlsIdxToVps" ) 631 ("HighestSublayerId" , m_highestSublayerId , IntAry1d (1,0) , "HighestSublayerId" ) 632 ("AvgSbPropertyBitRate" , m_avgSbPropertyBitRate , IntAry1d (1,0) , "AvgSbPropertyBitRate" ) 633 ("MaxSbPropertyBitRate" , m_maxSbPropertyBitRate , IntAry1d (1,0) , "MaxSbPropertyBitRate" ) 634 ; 635 636 po::setDefaults(opts); 637 638 // Parse the cfg file 639 po::ErrorReporter err; 640 po::parseConfigFile( opts, cfgFile, err ); 641 }; 642 643 Bool SEISubBitstreamProperty::checkCfg( const TComSlice* slice ) 644 { 645 // Check config values 646 Bool wrongConfig = false; 647 648 // For the current encoder, the initial IRAP access unit has always POC zero. 649 xCheckCfg ( wrongConfig, slice->isIRAP() && (slice->getPOC() == 0), "When present, the sub-bitstream property SEI message shall be associated with an initial IRAP access unit and the information provided by the SEI messages applies to the bitstream corresponding to the CVS containing the associated initial IRAP access unit."); 650 651 Bool sizeNotCorrect = 652 ( ( m_numAdditionalSubStreamsMinus1 + 1 ) != m_subBitstreamMode .size() ) 653 || ( ( m_numAdditionalSubStreamsMinus1 + 1 ) != m_olsIdxToVps .size() ) 654 || ( ( m_numAdditionalSubStreamsMinus1 + 1 ) != m_highestSublayerId .size() ) 655 || ( ( m_numAdditionalSubStreamsMinus1 + 1 ) != m_avgSbPropertyBitRate.size() ) 656 || ( ( m_numAdditionalSubStreamsMinus1 + 1 ) != m_maxSbPropertyBitRate.size() ); 657 658 xCheckCfg( wrongConfig, !sizeNotCorrect, "Some parameters of some sub-bitstream not provided." ); 659 xCheckCfg( wrongConfig, slice->getVPS()->getVPSId() == m_sbPropertyActiveVpsId, "The value of sb_property_active_vps_id shall be equal to the value of vps_video_parameter_set_id of the active VPS referred to by the VCL NAL units of the associated access unit." ); 660 661 xCheckCfgRange( wrongConfig, m_numAdditionalSubStreamsMinus1 , 0 , (1 << 10) - 1 , "num_additional_sub_streams_minus1"); 662 663 if ( !sizeNotCorrect ) 664 { 665 for (Int i = 0; i <= m_numAdditionalSubStreamsMinus1; i++ ) 666 { 667 xCheckCfgRange( wrongConfig, m_subBitstreamMode[i] , 0 , 1 , "sub_bitstream_mode" ); 668 xCheckCfgRange( wrongConfig, m_olsIdxToVps[i] , 0 , slice->getVPS()->getNumOutputLayerSets()-1 , "ols_idx_to_vps" ); 669 } 670 } 671 return wrongConfig; 672 }; 673 674 Void SEISubBitstreamProperty::resizeArrays( ) 675 { 676 m_subBitstreamMode .resize( m_numAdditionalSubStreamsMinus1 + 1); 677 m_olsIdxToVps .resize( m_numAdditionalSubStreamsMinus1 + 1); 678 m_highestSublayerId .resize( m_numAdditionalSubStreamsMinus1 + 1); 679 m_avgSbPropertyBitRate.resize( m_numAdditionalSubStreamsMinus1 + 1); 680 m_maxSbPropertyBitRate.resize( m_numAdditionalSubStreamsMinus1 + 1); 681 } 682 683 #if NH_MV_SEI_TBD 684 685 Void SEIAlphaChannelInfo::setupFromSlice ( const TComSlice* slice ) 686 { 687 sei.m_alphaChannelCancelFlag = TBD ; 688 if( !sei.m_alphaChannelCancelFlag ) 689 { 690 sei.m_alphaChannelUseIdc = TBD ; 691 sei.m_alphaChannelBitDepthMinus8 = TBD ; 692 sei.m_alphaTransparentValue = TBD ; 693 sei.m_alphaOpaqueValue = TBD ; 694 sei.m_alphaChannelIncrFlag = TBD ; 695 sei.m_alphaChannelClipFlag = TBD ; 696 if( sei.m_alphaChannelClipFlag ) 697 { 698 sei.m_alphaChannelClipTypeFlag = TBD ; 699 } 700 } 701 }; 702 703 Void SEIAlphaChannelInfo::setupFromCfgFile(const Char* cfgFile) 704 { 705 // Set default values 706 IntAry1d defAppLayerIds, defAppPocs, defAppTids, defAppVclNaluTypes; 707 708 // TBD: Add default values for which layers, POCS, Tids or Nalu types the SEI should be send. 709 defAppLayerIds .push_back( TBD ); 710 defAppPocs .push_back( TBD ); 711 defAppTids .push_back( TBD ); 712 defAppVclNaluTypes.push_back( TBD ); 713 714 Int defSeiNaluId = 0; 715 Int defPositionInSeiNalu = 0; 716 Bool defModifyByEncoder = TBD; 717 718 // Setup config file options 719 po::Options opts; 720 xAddGeneralOpts( opts , defAppLayerIds, defAppPocs, defAppTids, defAppVclNaluTypes, defSeiNaluId, defPositionInSeiNalu, defModifyByEncoder ); 721 722 opts.addOptions() 723 ("AlphaChannelCancelFlag" , m_alphaChannelCancelFlag , false , "AlphaChannelCancelFlag" ) 724 ("AlphaChannelUseIdc" , m_alphaChannelUseIdc , 0 , "AlphaChannelUseIdc" ) 725 ("AlphaChannelBitDepthMinus8" , m_alphaChannelBitDepthMinus8 , 0 , "AlphaChannelBitDepthMinus8" ) 726 ("AlphaTransparentValue" , m_alphaTransparentValue , 0 , "AlphaTransparentValue" ) 727 ("AlphaOpaqueValue" , m_alphaOpaqueValue , 0 , "AlphaOpaqueValue" ) 728 ("AlphaChannelIncrFlag" , m_alphaChannelIncrFlag , false , "AlphaChannelIncrFlag" ) 729 ("AlphaChannelClipFlag" , m_alphaChannelClipFlag , false , "AlphaChannelClipFlag" ) 730 ("AlphaChannelClipTypeFlag" , m_alphaChannelClipTypeFlag , false , "AlphaChannelClipTypeFlag" ) 731 ; 732 733 po::setDefaults(opts); 734 735 // Parse the cfg file 736 po::ErrorReporter err; 737 po::parseConfigFile( opts, cfgFile, err ); 738 739 }; 740 741 Bool SEIAlphaChannelInfo::checkCfg( const TComSlice* slice ) 742 { 743 // Check config values 744 Bool wrongConfig = false; 745 746 // TBD: Add constraints on presence of SEI here. 747 xCheckCfg ( wrongConfig, TBD , "TBD" ); 748 xCheckCfg ( wrongConfig, TBD , "TBD" ); 749 750 // TBD: Modify constraints according to the SEI semantics. 751 xCheckCfgRange( wrongConfig, m_alphaChannelCancelFlag , MINVAL , MAXVAL, "alpha_channel_cancel_flag" ); 752 xCheckCfgRange( wrongConfig, m_alphaChannelUseIdc , MINVAL , MAXVAL, "alpha_channel_use_idc"); 753 xCheckCfgRange( wrongConfig, m_alphaChannelBitDepthMinus8 , MINVAL , MAXVAL, "alpha_channel_bit_depth_minus8" ); 754 xCheckCfgRange( wrongConfig, m_alphaTransparentValue , MINVAL , MAXVAL, "alpha_transparent_value" ); 755 xCheckCfgRange( wrongConfig, m_alphaOpaqueValue , MINVAL , MAXVAL, "alpha_opaque_value" ); 756 xCheckCfgRange( wrongConfig, m_alphaChannelIncrFlag , MINVAL , MAXVAL, "alpha_channel_incr_flag" ); 757 xCheckCfgRange( wrongConfig, m_alphaChannelClipFlag , MINVAL , MAXVAL, "alpha_channel_clip_flag" ); 758 xCheckCfgRange( wrongConfig, m_alphaChannelClipTypeFlag , MINVAL , MAXVAL, "alpha_channel_clip_type_flag" ); 759 760 return wrongConfig; 761 762 }; 763 764 Void SEIOverlayInfo::setupFromSlice ( const TComSlice* slice ) 765 { 766 sei.m_overlayInfoCancelFlag = TBD ; 767 if( !sei.m_overlayInfoCancelFlag ) 768 { 769 sei.m_overlayContentAuxIdMinus128 = TBD ; 770 sei.m_overlayLabelAuxIdMinus128 = TBD ; 771 sei.m_overlayAlphaAuxIdMinus128 = TBD ; 772 sei.m_overlayElementLabelValueLengthMinus8 = TBD ; 773 sei.m_numOverlaysMinus1 = TBD ; 774 for( Int i = 0; i <= NumOverlaysMinus1( ); i++ ) 775 { 776 sei.m_overlayIdx[i] = TBD ; 777 sei.m_languageOverlayPresentFlag[i] = TBD ; 778 sei.m_overlayContentLayerId[i] = TBD ; 779 sei.m_overlayLabelPresentFlag[i] = TBD ; 780 if( sei.m_overlayLabelPresentFlag( i ) ) 781 { 782 sei.m_overlayLabelLayerId[i] = TBD ; 783 } 784 sei.m_overlayAlphaPresentFlag[i] = TBD ; 785 if( sei.m_overlayAlphaPresentFlag( i ) ) 786 { 787 sei.m_overlayAlphaLayerId[i] = TBD ; 788 } 789 if( sei.m_overlayLabelPresentFlag( i ) ) 790 { 791 sei.m_numOverlayElementsMinus1[i] = TBD ; 792 for( Int j = 0; j <= sei.m_numOverlayElementsMinus1( i ); j++ ) 793 { 794 sei.m_overlayElementLabelMin[i][j] = TBD ; 795 sei.m_overlayElementLabelMax[i][j] = TBD ; 796 } 797 } 798 } 799 while( !ByteaLigned(() ) ); 800 { 801 sei.m_overlayZeroBit = TBD ; 802 } 803 for( Int i = 0; i <= NumOverlaysMinus1( ); i++ ) 804 { 805 if( sei.m_languageOverlayPresentFlag( i ) ) 806 { 807 sei.m_overlayLanguage[i] = TBD ; 808 } 809 sei.m_overlayName[i] = TBD ; 810 if( sei.m_overlayLabelPresentFlag( i ) ) 811 { 812 for( Int j = 0; j <= sei.m_numOverlayElementsMinus1( i ); j++ ) 813 { 814 sei.m_overlayElementName[i][j] = TBD ; 815 } 816 } 817 } 818 sei.m_overlayInfoPersistenceFlag = TBD ; 819 } 820 }; 821 822 Void SEIOverlayInfo::setupFromCfgFile(const Char* cfgFile) 823 { 824 // Set default values 825 IntAry1d defAppLayerIds, defAppPocs, defAppTids, defAppVclNaluTypes; 826 827 // TBD: Add default values for which layers, POCS, Tids or Nalu types the SEI should be send. 828 defAppLayerIds .push_back( TBD ); 829 defAppPocs .push_back( TBD ); 830 defAppTids .push_back( TBD ); 831 defAppVclNaluTypes.push_back( TBD ); 832 833 Int defSeiNaluId = 0; 834 Int defPositionInSeiNalu = 0; 835 Bool defModifyByEncoder = TBD; 836 837 // Setup config file options 838 po::Options opts; 839 xAddGeneralOpts( opts , defAppLayerIds, defAppPocs, defAppTids, defAppVclNaluTypes, defSeiNaluId, defPositionInSeiNalu, defModifyByEncoder ); 840 841 opts.addOptions() 842 ("OverlayInfoCancelFlag" , m_overlayInfoCancelFlag , false , "OverlayInfoCancelFlag" ) 843 ("OverlayContentAuxIdMinus128" , m_overlayContentAuxIdMinus128 , 0 , "OverlayContentAuxIdMinus128" ) 844 ("OverlayLabelAuxIdMinus128" , m_overlayLabelAuxIdMinus128 , 0 , "OverlayLabelAuxIdMinus128" ) 845 ("OverlayAlphaAuxIdMinus128" , m_overlayAlphaAuxIdMinus128 , 0 , "OverlayAlphaAuxIdMinus128" ) 846 ("OverlayElementLabelValueLengthMinus8", m_overlayElementLabelValueLengthMinus8, 0 , "OverlayElementLabelValueLengthMinus8") 847 ("NumOverlaysMinus1" , m_numOverlaysMinus1 , 0 , "NumOverlaysMinus1" ) 848 ("OverlayIdx" , m_overlayIdx , IntAry1d (1,0) , "OverlayIdx" ) 849 ("LanguageOverlayPresentFlag" , m_languageOverlayPresentFlag , BoolAry1d(1,0) , "LanguageOverlayPresentFlag" ) 850 ("OverlayContentLayerId" , m_overlayContentLayerId , IntAry1d (1,0) , "OverlayContentLayerId" ) 851 ("OverlayLabelPresentFlag" , m_overlayLabelPresentFlag , BoolAry1d(1,0) , "OverlayLabelPresentFlag" ) 852 ("OverlayLabelLayerId" , m_overlayLabelLayerId , IntAry1d (1,0) , "OverlayLabelLayerId" ) 853 ("OverlayAlphaPresentFlag" , m_overlayAlphaPresentFlag , BoolAry1d(1,0) , "OverlayAlphaPresentFlag" ) 854 ("OverlayAlphaLayerId" , m_overlayAlphaLayerId , IntAry1d (1,0) , "OverlayAlphaLayerId" ) 855 ("NumOverlayElementsMinus1" , m_numOverlayElementsMinus1 , IntAry1d (1,0) , "NumOverlayElementsMinus1" ) 856 ("OverlayElementLabelMin_%d" , m_overlayElementLabelMin , IntAry1d (1,0) ,ADDNUM , "OverlayElementLabelMin" ) 857 ("OverlayElementLabelMax_%d" , m_overlayElementLabelMax , IntAry1d (1,0) ,ADDNUM , "OverlayElementLabelMax" ) 858 ("OverlayZeroBit" , m_overlayZeroBit , 0 , "OverlayZeroBit" ) 859 ("OverlayLanguage" , m_overlayLanguage , IntAry1d (1,0) , "OverlayLanguage" ) 860 ("OverlayName" , m_overlayName , IntAry1d (1,0) , "OverlayName" ) 861 ("OverlayElementName_%d" , m_overlayElementName , IntAry1d (1,0) ,ADDNUM , "OverlayElementName" ) 862 ("OverlayInfoPersistenceFlag" , m_overlayInfoPersistenceFlag , false , "OverlayInfoPersistenceFlag" ) 863 ; 864 865 po::setDefaults(opts); 866 867 // Parse the cfg file 868 po::ErrorReporter err; 869 po::parseConfigFile( opts, cfgFile, err ); 870 }; 871 872 Bool SEIOverlayInfo::checkCfg( const TComSlice* slice ) 873 { 874 // Check config values 875 Bool wrongConfig = false; 876 877 // TBD: Add constraints on presence of SEI here. 878 xCheckCfg ( wrongConfig, TBD , "TBD" ); 879 xCheckCfg ( wrongConfig, TBD , "TBD" ); 880 881 // TBD: Modify constraints according to the SEI semantics. 882 xCheckCfgRange( wrongConfig, m_overlayInfoCancelFlag , MINVAL , MAXVAL, "overlay_info_cancel_flag" ); 883 xCheckCfgRange( wrongConfig, m_overlayContentAuxIdMinus128 , MINVAL , MAXVAL, "overlay_content_aux_id_minus128" ); 884 xCheckCfgRange( wrongConfig, m_overlayLabelAuxIdMinus128 , MINVAL , MAXVAL, "overlay_label_aux_id_minus128" ); 885 xCheckCfgRange( wrongConfig, m_overlayAlphaAuxIdMinus128 , MINVAL , MAXVAL, "overlay_alpha_aux_id_minus128" ); 886 xCheckCfgRange( wrongConfig, m_overlayElementLabelValueLengthMinus8, MINVAL , MAXVAL, "overlay_element_label_value_length_minus8"); 887 xCheckCfgRange( wrongConfig, m_numOverlaysMinus1 , MINVAL , MAXVAL, "num_overlays_minus1" ); 888 xCheckCfgRange( wrongConfig, m_overlayIdx[i] , MINVAL , MAXVAL, "overlay_idx" ); 889 xCheckCfgRange( wrongConfig, m_languageOverlayPresentFlag[i] , MINVAL , MAXVAL, "language_overlay_present_flag" ); 890 xCheckCfgRange( wrongConfig, m_overlayContentLayerId[i] , MINVAL , MAXVAL, "overlay_content_layer_id" ); 891 xCheckCfgRange( wrongConfig, m_overlayLabelPresentFlag[i] , MINVAL , MAXVAL, "overlay_label_present_flag" ); 892 xCheckCfgRange( wrongConfig, m_overlayLabelLayerId[i] , MINVAL , MAXVAL, "overlay_label_layer_id" ); 893 xCheckCfgRange( wrongConfig, m_overlayAlphaPresentFlag[i] , MINVAL , MAXVAL, "overlay_alpha_present_flag" ); 894 xCheckCfgRange( wrongConfig, m_overlayAlphaLayerId[i] , MINVAL , MAXVAL, "overlay_alpha_layer_id" ); 895 xCheckCfgRange( wrongConfig, m_numOverlayElementsMinus1[i] , MINVAL , MAXVAL, "num_overlay_elements_minus1" ); 896 xCheckCfgRange( wrongConfig, m_overlayElementLabelMin[i][j] , MINVAL , MAXVAL, "overlay_element_label_min" ); 897 xCheckCfgRange( wrongConfig, m_overlayElementLabelMax[i][j] , MINVAL , MAXVAL, "overlay_element_label_max" ); 898 xCheckCfgRange( wrongConfig, m_overlayZeroBit , MINVAL , MAXVAL, "overlay_zero_bit" ); 899 xCheckCfgRange( wrongConfig, m_overlayLanguage[i] , MINVAL , MAXVAL, "overlay_language" ); 900 xCheckCfgRange( wrongConfig, m_overlayName[i] , MINVAL , MAXVAL, "overlay_name" ); 901 xCheckCfgRange( wrongConfig, m_overlayElementName[i][j] , MINVAL , MAXVAL, "overlay_element_name" ); 902 xCheckCfgRange( wrongConfig, m_overlayInfoPersistenceFlag , MINVAL , MAXVAL, "overlay_info_persistence_flag" ); 903 904 return wrongConfig; 905 906 }; 907 #endif 908 909 Void SEITemporalMvPredictionConstraints::setupFromCfgFile(const Char* cfgFile) 910 { 911 // Set default values 912 IntAry1d defAppLayerIds, defAppPocs, defAppTids, defAppVclNaluTypes; 913 914 // TBD: Add default values for which layers, POCS, Tids or Nalu types the SEI should be send. 915 defAppLayerIds .clear ( ); 916 defAppPocs .push_back( 0 ); 917 defAppTids .push_back( 0 ); 918 defAppVclNaluTypes.clear ( ); 919 920 Int defSeiNaluId = 0; 921 Int defPositionInSeiNalu = 0; 922 Bool defModifyByEncoder = false; 923 924 // Setup config file options 925 po::Options opts; 926 xAddGeneralOpts( opts , defAppLayerIds, defAppPocs, defAppTids, defAppVclNaluTypes, defSeiNaluId, defPositionInSeiNalu, defModifyByEncoder ); 927 928 opts.addOptions() 929 ("PrevPicsNotUsedFlag" , m_prevPicsNotUsedFlag , false, "PrevPicsNotUsedFlag" ) 930 ("NoIntraLayerColPicFlag", m_noIntraLayerColPicFlag, false, "NoIntraLayerColPicFlag" ) 931 ; 932 933 po::setDefaults(opts); 934 935 // Parse the cfg file 936 po::ErrorReporter err; 937 po::parseConfigFile( opts, cfgFile, err ); 938 }; 939 940 Bool SEITemporalMvPredictionConstraints::checkCfg( const TComSlice* slice ) 941 { 942 // Check config values 943 Bool wrongConfig = false; 944 945 xCheckCfg ( wrongConfig, slice->getTemporalId() == 0 , "The temporal motion vector prediction constraints SEI message may be present in an access unit with TemporalId equal to 0 and shall not be present in an access unit with TemporalId greater than 0." ); 946 947 return wrongConfig; 948 }; 949 950 #if NH_MV_SEI_TBD 951 Void SEIFrameFieldInfo::setupFromCfgFile(const Char* cfgFile) 952 { 953 // Set default values 954 IntAry1d defAppLayerIds, defAppPocs, defAppTids, defAppVclNaluTypes; 955 956 // TBD: Add default values for which layers, POCS, Tids or Nalu types the SEI should be send. 957 defAppLayerIds .push_back( TBD ); 958 defAppPocs .push_back( TBD ); 959 defAppTids .push_back( TBD ); 960 defAppVclNaluTypes.push_back( TBD ); 961 962 Int defSeiNaluId = 0; 963 Int defPositionInSeiNalu = 0; 964 Bool defModifyByEncoder = false; 965 966 // Setup config file options 967 po::Options opts; 968 xAddGeneralOpts( opts , defAppLayerIds, defAppPocs, defAppTids, defAppVclNaluTypes, defSeiNaluId, defPositionInSeiNalu, defModifyByEncoder ); 969 970 opts.addOptions() 971 ("FfinfoPicStruct" , m_ffinfoPicStruct , 0 , "FfinfoPicStruct" ) 972 ("FfinfoSourceScanType", m_ffinfoSourceScanType, 0 , "FfinfoSourceScanType") 973 ("FfinfoDuplicateFlag" , m_ffinfoDuplicateFlag , false , "FfinfoDuplicateFlag" ) 974 ; 975 976 po::setDefaults(opts); 977 978 // Parse the cfg file 979 po::ErrorReporter err; 980 po::parseConfigFile( opts, cfgFile, err ); 981 }; 982 983 984 Bool SEIFrameFieldInfo::checkCfg( const TComSlice* slice ) 985 { 986 // Check config values 987 Bool wrongConfig = false; 988 989 // TBD: Add constraints on presence of SEI here. 990 xCheckCfg ( wrongConfig, TBD , "TBD" ); 991 xCheckCfg ( wrongConfig, TBD , "TBD" ); 992 993 // TBD: Modify constraints according to the SEI semantics. 994 xCheckCfgRange( wrongConfig, m_ffinfoPicStruct , MINVAL , MAXVAL, "ffinfo_pic_struct" ); 995 xCheckCfgRange( wrongConfig, m_ffinfoSourceScanType , MINVAL , MAXVAL, "ffinfo_source_scan_type" ); 996 xCheckCfgRange( wrongConfig, m_ffinfoDuplicateFlag , MINVAL , MAXVAL, "ffinfo_duplicate_flag" ); 997 998 return wrongConfig; 999 1000 }; 1001 1002 Void SEIThreeDimensionalReferenceDisplaysInfo::setupFromSlice ( const TComSlice* slice ) 1003 { 1004 sei.m_precRefDisplayWidth = TBD ; 1005 sei.m_refViewingDistanceFlag = TBD ; 1006 if( sei.m_refViewingDistanceFlag ) 1007 { 1008 sei.m_precRefViewingDist = TBD ; 1009 } 1010 sei.m_numRefDisplaysMinus1 = TBD ; 1011 for( Int i = 0; i <= NumRefDisplaysMinus1( ); i++ ) 1012 { 1013 sei.m_leftViewId[i] = TBD ; 1014 sei.m_rightViewId[i] = TBD ; 1015 sei.m_exponentRefDisplayWidth[i] = TBD ; 1016 sei.m_mantissaRefDisplayWidth[i] = TBD ; 1017 if( sei.m_refViewingDistanceFlag ) 1018 { 1019 sei.m_exponentRefViewingDistance[i] = TBD ; 1020 sei.m_mantissaRefViewingDistance[i] = TBD ; 1021 } 1022 sei.m_additionalShiftPresentFlag[i] = TBD ; 1023 if( sei.m_additionalShiftPresentFlag( i ) ) 1024 { 1025 sei.m_numSampleShiftPlus512[i] = TBD ; 1026 } 1027 } 1028 sei.m_threeDimensionalReferenceDisplaysExtensionFlag = TBD ; 1029 }; 1030 1031 Void SEIThreeDimensionalReferenceDisplaysInfo::setupFromCfgFile(const Char* cfgFile) 1032 { 1033 // Set default values 1034 IntAry1d defAppLayerIds, defAppPocs, defAppTids, defAppVclNaluTypes; 1035 1036 // TBD: Add default values for which layers, POCS, Tids or Nalu types the SEI should be send. 1037 defAppLayerIds .push_back( TBD ); 1038 defAppPocs .push_back( TBD ); 1039 defAppTids .push_back( TBD ); 1040 defAppVclNaluTypes.push_back( TBD ); 1041 1042 Int defSeiNaluId = 0; 1043 Int defPositionInSeiNalu = 0; 1044 Bool defModifyByEncoder = TBD; 1045 1046 // Setup config file options 1047 po::Options opts; 1048 xAddGeneralOpts( opts , defAppLayerIds, defAppPocs, defAppTids, defAppVclNaluTypes, defSeiNaluId, defPositionInSeiNalu, defModifyByEncoder ); 1049 1050 opts.addOptions() 1051 ("PrecRefDisplayWidth" , m_precRefDisplayWidth , 0 , "PrecRefDisplayWidth" ) 1052 ("RefViewingDistanceFlag" , m_refViewingDistanceFlag , false , "RefViewingDistanceFlag" ) 1053 ("PrecRefViewingDist" , m_precRefViewingDist , 0 , "PrecRefViewingDist" ) 1054 ("NumRefDisplaysMinus1" , m_numRefDisplaysMinus1 , 0 , "NumRefDisplaysMinus1" ) 1055 ("LeftViewId" , m_leftViewId , IntAry1d (1,0) , "LeftViewId" ) 1056 ("RightViewId" , m_rightViewId , IntAry1d (1,0) , "RightViewId" ) 1057 ("ExponentRefDisplayWidth" , m_exponentRefDisplayWidth , IntAry1d (1,0) , "ExponentRefDisplayWidth" ) 1058 ("MantissaRefDisplayWidth" , m_mantissaRefDisplayWidth , IntAry1d (1,0) , "MantissaRefDisplayWidth" ) 1059 ("ExponentRefViewingDistance" , m_exponentRefViewingDistance , IntAry1d (1,0) , "ExponentRefViewingDistance" ) 1060 ("MantissaRefViewingDistance" , m_mantissaRefViewingDistance , IntAry1d (1,0) , "MantissaRefViewingDistance" ) 1061 ("AdditionalShiftPresentFlag" , m_additionalShiftPresentFlag , BoolAry1d(1,0) , "AdditionalShiftPresentFlag" ) 1062 ("NumSampleShiftPlus512" , m_numSampleShiftPlus512 , IntAry1d (1,0) , "NumSampleShiftPlus512" ) 1063 ("ThreeDimensionalReferenceDisplaysExtensionFlag", m_threeDimensionalReferenceDisplaysExtensionFlag, false , "ThreeDimensionalReferenceDisplaysExtensionFlag") 1064 ; 1065 1066 po::setDefaults(opts); 1067 1068 // Parse the cfg file 1069 po::ErrorReporter err; 1070 po::parseConfigFile( opts, cfgFile, err ); 1071 }; 1072 1073 Bool SEIThreeDimensionalReferenceDisplaysInfo::checkCfg( const TComSlice* slice ) 1074 { 1075 // Check config values 1076 Bool wrongConfig = false; 1077 1078 // TBD: Add constraints on presence of SEI here. 1079 xCheckCfg ( wrongConfig, TBD , "TBD" ); 1080 xCheckCfg ( wrongConfig, TBD , "TBD" ); 1081 1082 // TBD: Modify constraints according to the SEI semantics. 1083 xCheckCfgRange( wrongConfig, m_precRefDisplayWidth , MINVAL , MAXVAL, "prec_ref_display_width" ); 1084 xCheckCfgRange( wrongConfig, m_refViewingDistanceFlag , MINVAL , MAXVAL, "ref_viewing_distance_flag" ); 1085 xCheckCfgRange( wrongConfig, m_precRefViewingDist , MINVAL , MAXVAL, "prec_ref_viewing_dist" ); 1086 xCheckCfgRange( wrongConfig, m_numRefDisplaysMinus1 , MINVAL , MAXVAL, "num_ref_displays_minus1" ); 1087 xCheckCfgRange( wrongConfig, m_leftViewId[i] , MINVAL , MAXVAL, "left_view_id" ); 1088 xCheckCfgRange( wrongConfig, m_rightViewId[i] , MINVAL , MAXVAL, "right_view_id" ); 1089 xCheckCfgRange( wrongConfig, m_exponentRefDisplayWidth[i] , MINVAL , MAXVAL, "exponent_ref_display_width" ); 1090 xCheckCfgRange( wrongConfig, m_mantissaRefDisplayWidth[i] , MINVAL , MAXVAL, "mantissa_ref_display_width" ); 1091 xCheckCfgRange( wrongConfig, m_exponentRefViewingDistance[i] , MINVAL , MAXVAL, "exponent_ref_viewing_distance" ); 1092 xCheckCfgRange( wrongConfig, m_mantissaRefViewingDistance[i] , MINVAL , MAXVAL, "mantissa_ref_viewing_distance" ); 1093 xCheckCfgRange( wrongConfig, m_additionalShiftPresentFlag[i] , MINVAL , MAXVAL, "additional_shift_present_flag" ); 1094 xCheckCfgRange( wrongConfig, m_numSampleShiftPlus512[i] , MINVAL , MAXVAL, "num_sample_shift_plus512" ); 1095 xCheckCfgRange( wrongConfig, m_threeDimensionalReferenceDisplaysExtensionFlag, MINVAL , MAXVAL, "three_dimensional_reference_displays_extension_flag"); 1096 1097 return wrongConfig; 1098 1099 }; 1100 1101 Void SEIDepthRepresentationInfo::setupFromSlice ( const TComSlice* slice ) 1102 { 1103 sei.m_zNearFlag = TBD ; 1104 sei.m_zFarFlag = TBD ; 1105 sei.m_dMinFlag = TBD ; 1106 sei.m_dMaxFlag = TBD ; 1107 sei.m_depthRepresentationType = TBD ; 1108 if( sei.m_dMinFlag | | sei.m_dMaxFlag ) 1109 { 1110 sei.m_disparityRefViewId = TBD ; 1111 } 1112 if( sei.m_zNearFlag ) 1113 { 1114 DepthRepInfoElement(() ZNearSign, ZNearExp, ZNearMantissa, ZNearManLen ); 1115 } 1116 if( sei.m_zFarFlag ) 1117 { 1118 DepthRepInfoElement(() ZFarSign, ZFarExp, ZFarMantissa, ZFarManLen ); 1119 } 1120 if( sei.m_dMinFlag ) 1121 { 1122 DepthRepInfoElement(() DMinSign, DMinExp, DMinMantissa, DMinManLen ); 1123 } 1124 if( sei.m_dMaxFlag ) 1125 { 1126 DepthRepInfoElement(() DMaxSign, DMaxExp, DMaxMantissa, DMaxManLen ); 1127 } 1128 if( sei.m_depthRepresentationType = = 3 ) 1129 { 1130 sei.m_depthNonlinearRepresentationNumMinus1 = TBD ; 1131 for( Int i = 1; i <= sei.m_depthNonlinearRepresentationNumMinus1 + 1; i++ ) 1132 { 1133 DepthNonlinearRepresentationModel( i ); 1134 } 1135 } 1136 }; 1137 1138 Void SEIDepthRepresentationInfo::setupFromCfgFile(const Char* cfgFile) 1139 { 1140 // Set default values 1141 IntAry1d defAppLayerIds, defAppPocs, defAppTids, defAppVclNaluTypes; 1142 1143 // TBD: Add default values for which layers, POCS, Tids or Nalu types the SEI should be send. 1144 defAppLayerIds .push_back( TBD ); 1145 defAppPocs .push_back( TBD ); 1146 defAppTids .push_back( TBD ); 1147 defAppVclNaluTypes.push_back( TBD ); 1148 1149 Int defSeiNaluId = 0; 1150 Int defPositionInSeiNalu = 0; 1151 Bool defModifyByEncoder = TBD; 1152 1153 // Setup config file options 1154 po::Options opts; 1155 xAddGeneralOpts( opts , defAppLayerIds, defAppPocs, defAppTids, defAppVclNaluTypes, defSeiNaluId, defPositionInSeiNalu, defModifyByEncoder ); 1156 1157 opts.addOptions() 1158 ("ZNearFlag" , m_zNearFlag , false , "ZNearFlag" ) 1159 ("ZFarFlag" , m_zFarFlag , false , "ZFarFlag" ) 1160 ("DMinFlag" , m_dMinFlag , false , "DMinFlag" ) 1161 ("DMaxFlag" , m_dMaxFlag , false , "DMaxFlag" ) 1162 ("DepthRepresentationType" , m_depthRepresentationType , 0 , "DepthRepresentationType" ) 1163 ("DisparityRefViewId" , m_disparityRefViewId , 0 , "DisparityRefViewId" ) 1164 ("DepthNonlinearRepresentationNumMinus1", m_depthNonlinearRepresentationNumMinus1, 0 , "DepthNonlinearRepresentationNumMinus1") 1165 ; 1166 1167 po::setDefaults(opts); 1168 1169 // Parse the cfg file 1170 po::ErrorReporter err; 1171 po::parseConfigFile( opts, cfgFile, err ); 1172 }; 1173 1174 Bool SEIDepthRepresentationInfo::checkCfg( const TComSlice* slice ) 1175 { 1176 // Check config values 1177 Bool wrongConfig = false; 1178 1179 // TBD: Add constraints on presence of SEI here. 1180 xCheckCfg ( wrongConfig, TBD , "TBD" ); 1181 xCheckCfg ( wrongConfig, TBD , "TBD" ); 1182 1183 // TBD: Modify constraints according to the SEI semantics. 1184 xCheckCfgRange( wrongConfig, m_zNearFlag , MINVAL , MAXVAL, "z_near_flag" ); 1185 xCheckCfgRange( wrongConfig, m_zFarFlag , MINVAL , MAXVAL, "z_far_flag" ); 1186 xCheckCfgRange( wrongConfig, m_dMinFlag , MINVAL , MAXVAL, "d_min_flag" ); 1187 xCheckCfgRange( wrongConfig, m_dMaxFlag , MINVAL , MAXVAL, "d_max_flag" ); 1188 xCheckCfgRange( wrongConfig, m_depthRepresentationType , MINVAL , MAXVAL, "depth_representation_type" ); 1189 xCheckCfgRange( wrongConfig, m_disparityRefViewId , MINVAL , MAXVAL, "disparity_ref_view_id" ); 1190 xCheckCfgRange( wrongConfig, m_depthNonlinearRepresentationNumMinus1, MINVAL , MAXVAL, "depth_nonlinear_representation_num_minus1"); 1191 1192 return wrongConfig; 1193 }; 1194 1195 Void SEIDepthRepInfoElement::setupFromSlice ( const TComSlice* slice ) 1196 { 1197 sei.m_daSignFlag = TBD ; 1198 sei.m_daExponent = TBD ; 1199 sei.m_daMantissaLenMinus1 = TBD ; 1200 sei.m_daMantissa = TBD ; 1201 }; 1202 1203 Void SEIDepthRepInfoElement::setupFromCfgFile(const Char* cfgFile) 1204 { 1205 // Set default values 1206 IntAry1d defAppLayerIds, defAppPocs, defAppTids, defAppVclNaluTypes; 1207 1208 // TBD: Add default values for which layers, POCS, Tids or Nalu types the SEI should be send. 1209 defAppLayerIds .push_back( TBD ); 1210 defAppPocs .push_back( TBD ); 1211 defAppTids .push_back( TBD ); 1212 defAppVclNaluTypes.push_back( TBD ); 1213 1214 Int defSeiNaluId = 0; 1215 Int defPositionInSeiNalu = 0; 1216 Bool defModifyByEncoder = TBD; 1217 1218 // Setup config file options 1219 po::Options opts; 1220 xAddGeneralOpts( opts , defAppLayerIds, defAppPocs, defAppTids, defAppVclNaluTypes, defSeiNaluId, defPositionInSeiNalu, defModifyByEncoder ); 1221 1222 opts.addOptions() 1223 ("DaSignFlag" , m_daSignFlag , false , "DaSignFlag" ) 1224 ("DaExponent" , m_daExponent , 0 , "DaExponent" ) 1225 ("DaMantissaLenMinus1" , m_daMantissaLenMinus1 , 0 , "DaMantissaLenMinus1" ) 1226 ("DaMantissa" , m_daMantissa , 0 , "DaMantissa" ) 1227 ; 1228 1229 po::setDefaults(opts); 1230 1231 // Parse the cfg file 1232 po::ErrorReporter err; 1233 po::parseConfigFile( opts, cfgFile, err ); 1234 }; 1235 1236 Bool SEIDepthRepInfoElement::checkCfg( const TComSlice* slice ) 1237 { 1238 // Check config values 1239 Bool wrongConfig = false; 1240 1241 // TBD: Add constraints on presence of SEI here. 1242 xCheckCfg ( wrongConfig, TBD , "TBD" ); 1243 xCheckCfg ( wrongConfig, TBD , "TBD" ); 1244 1245 // TBD: Modify constraints according to the SEI semantics. 1246 xCheckCfgRange( wrongConfig, m_daSignFlag , MINVAL , MAXVAL, "da_sign_flag" ); 1247 xCheckCfgRange( wrongConfig, m_daExponent , MINVAL , MAXVAL, "da_exponent" ); 1248 xCheckCfgRange( wrongConfig, m_daMantissaLenMinus1 , MINVAL , MAXVAL, "da_mantissa_len_minus1" ); 1249 xCheckCfgRange( wrongConfig, m_daMantissa , MINVAL , MAXVAL, "da_mantissa" ); 1250 1251 return wrongConfig; 1252 }; 1253 #endif 1254 1255 Void SEIMultiviewSceneInfo::setupFromCfgFile(const Char* cfgFile) 1256 { 1257 // Set default values 1258 IntAry1d defAppLayerIds, defAppPocs, defAppTids, defAppVclNaluTypes; 1259 1260 // TBD: Add default values for which layers, POCS, Tids or Nalu types the SEI should be send. 1261 defAppLayerIds .clear(); 1262 defAppPocs .clear(); 1263 defAppTids .push_back( 0 ); 1264 defAppVclNaluTypes = IRAP_NAL_UNIT_TYPES; 1265 1266 Int defSeiNaluId = 0; 1267 Int defPositionInSeiNalu = 0; 1268 Bool defModifyByEncoder = false; 1269 1270 // Setup config file options 1271 po::Options opts; 1272 xAddGeneralOpts( opts , defAppLayerIds, defAppPocs, defAppTids, defAppVclNaluTypes, defSeiNaluId, defPositionInSeiNalu, defModifyByEncoder ); 1273 1274 opts.addOptions() 1275 ("MinDisparity" , m_minDisparity , 0 , "MinDisparity" ) 1276 ("MaxDisparityRange" , m_maxDisparityRange , 0 , "MaxDisparityRange" ) 1277 ; 1278 1279 po::setDefaults(opts); 1280 1281 // Parse the cfg file 1282 po::ErrorReporter err; 1283 po::parseConfigFile( opts, cfgFile, err ); 1284 }; 1285 1286 1287 Bool SEIMultiviewSceneInfo::checkCfg( const TComSlice* slice ) 1288 { 1289 // Check config values 1290 Bool wrongConfig = false; 1291 1292 xCheckCfg ( wrongConfig, slice->isIRAP(), "When present, the multiview scene information SEI message shall be associated with an IRAP access unit." ); 1293 1294 xCheckCfgRange( wrongConfig, m_minDisparity , -1024 , 1023, "min_disparity" ); 1295 xCheckCfgRange( wrongConfig, m_maxDisparityRange , 0 , 2047, "max_disparity_range" ); 1296 1297 return wrongConfig; 1298 1299 }; 1300 1301 Void SEIMultiviewAcquisitionInfo::setupFromCfgFile(const Char* cfgFile) 1302 { 1303 // Set default values 1304 IntAry1d defAppLayerIds, defAppPocs, defAppTids, defAppVclNaluTypes; 1305 1306 defAppLayerIds .clear(); 1307 defAppPocs .push_back( 0 ); 1308 defAppTids .push_back( 0 ); 1309 defAppVclNaluTypes = IDR_NAL_UNIT_TYPES; 1310 1311 1312 Int defSeiNaluId = 0; 1313 Int defPositionInSeiNalu = 0; 1314 Bool defModifyByEncoder = false; 1315 1316 // Setup config file options 1317 po::Options opts; 1318 xAddGeneralOpts( opts , defAppLayerIds, defAppPocs, defAppTids, defAppVclNaluTypes, defSeiNaluId, defPositionInSeiNalu, defModifyByEncoder ); 1319 1320 opts.addOptions() 1321 ("IntrinsicParamFlag" , m_intrinsicParamFlag , false , "IntrinsicParamFlag" ) 1322 ("ExtrinsicParamFlag" , m_extrinsicParamFlag , false , "ExtrinsicParamFlag" ) 1323 ("IntrinsicParamsEqualFlag" , m_intrinsicParamsEqualFlag , false , "IntrinsicParamsEqualFlag" ) 1324 ("PrecFocalLength" , m_precFocalLength , 0 , "PrecFocalLength" ) 1325 ("PrecPrincipalPoint" , m_precPrincipalPoint , 0 , "PrecPrincipalPoint" ) 1326 ("PrecSkewFactor" , m_precSkewFactor , 0 , "PrecSkewFactor" ) 1327 ("SignFocalLengthX" , m_signFocalLengthX , BoolAry1d(1,0) , "SignFocalLengthX" ) 1328 ("ExponentFocalLengthX" , m_exponentFocalLengthX , IntAry1d (1,0) , "ExponentFocalLengthX" ) 1329 ("MantissaFocalLengthX" , m_mantissaFocalLengthX , IntAry1d (1,0) , "MantissaFocalLengthX" ) 1330 ("SignFocalLengthY" , m_signFocalLengthY , BoolAry1d(1,0) , "SignFocalLengthY" ) 1331 ("ExponentFocalLengthY" , m_exponentFocalLengthY , IntAry1d (1,0) , "ExponentFocalLengthY" ) 1332 ("MantissaFocalLengthY" , m_mantissaFocalLengthY , IntAry1d (1,0) , "MantissaFocalLengthY" ) 1333 ("SignPrincipalPointX" , m_signPrincipalPointX , BoolAry1d(1,0) , "SignPrincipalPointX" ) 1334 ("ExponentPrincipalPointX" , m_exponentPrincipalPointX , IntAry1d (1,0) , "ExponentPrincipalPointX" ) 1335 ("MantissaPrincipalPointX" , m_mantissaPrincipalPointX , IntAry1d (1,0) , "MantissaPrincipalPointX" ) 1336 ("SignPrincipalPointY" , m_signPrincipalPointY , BoolAry1d(1,0) , "SignPrincipalPointY" ) 1337 ("ExponentPrincipalPointY" , m_exponentPrincipalPointY , IntAry1d (1,0) , "ExponentPrincipalPointY" ) 1338 ("MantissaPrincipalPointY" , m_mantissaPrincipalPointY , IntAry1d (1,0) , "MantissaPrincipalPointY" ) 1339 ("SignSkewFactor" , m_signSkewFactor , BoolAry1d(1,0) , "SignSkewFactor" ) 1340 ("ExponentSkewFactor" , m_exponentSkewFactor , IntAry1d (1,0) , "ExponentSkewFactor" ) 1341 ("MantissaSkewFactor" , m_mantissaSkewFactor , IntAry1d (1,0) , "MantissaSkewFactor" ) 1342 ("PrecRotationParam" , m_precRotationParam , 0 , "PrecRotationParam" ) 1343 ("PrecTranslationParam" , m_precTranslationParam , 0 , "PrecTranslationParam" ) 1344 ("SignR_%d_%d" , m_signR , BoolAry1d(3,0) ,MAX_NUM_LAYERS ,3 , "SignR" ) 1345 ("ExponentR_%d_%d" , m_exponentR , IntAry1d (3,0) ,MAX_NUM_LAYERS ,3 , "ExponentR" ) 1346 ("MantissaR_%d_%d" , m_mantissaR , IntAry1d (3,0) ,MAX_NUM_LAYERS ,3 , "MantissaR" ) 1347 ("SignT_%d" , m_signT , BoolAry1d(3,0) ,MAX_NUM_LAYERS , "SignT" ) 1348 ("ExponentT_%d" , m_exponentT , IntAry1d (3,0) ,MAX_NUM_LAYERS , "ExponentT" ) 1349 ("MantissaT_%d" , m_mantissaT , IntAry1d (3,0) ,MAX_NUM_LAYERS , "MantissaT" ) 1350 ; 1351 1352 po::setDefaults(opts); 1353 1354 // Parse the cfg file 1355 po::ErrorReporter err; 1356 po::parseConfigFile( opts, cfgFile, err ); 1357 }; 1358 1359 UInt SEIMultiviewAcquisitionInfo::getMantissaFocalLengthXLen( Int i ) const 1360 { 1361 return xGetSyntaxElementLen( m_exponentFocalLengthX[i], m_precFocalLength, m_mantissaFocalLengthX[ i ] ); 1362 } 1363 1364 Bool SEIMultiviewAcquisitionInfo::checkCfg( const TComSlice* slice ) 1365 { 1366 // Check config values 1367 Bool wrongConfig = false; 1368 1369 // Currently the encoder starts with POC 0 for all layers. The condition on POC 0 should be changed, when this changes. 1370 xCheckCfg ( wrongConfig, slice->isIRAP() && (slice->getPOC() == 0) , "When present, the multiview acquisition information SEI message that applies to the current layer shall be included in an access unit that contains an IRAP picture that is the first picture of a CLVS of the current layer." ); 1371 1372 xCheckCfgRange( wrongConfig, m_precFocalLength , 0, 31, "prec_focal_length" ); 1373 xCheckCfgRange( wrongConfig, m_precPrincipalPoint , 0, 31, "prec_principle_point" ); 1374 xCheckCfgRange( wrongConfig, m_precSkewFactor , 0, 31, "prec_skew_factor" ); 1375 1376 for (Int i = 0; i <= getNumViewsMinus1(); i++ ) 1377 { 1378 xCheckCfgRange( wrongConfig, m_exponentFocalLengthX [ i ], 0, 62, "exponent_focal_length_x" ); 1379 xCheckCfgRange( wrongConfig, m_exponentFocalLengthY [ i ], 0, 62, "exponent_focal_length_y" ); 1380 xCheckCfgRange( wrongConfig, m_exponentPrincipalPointX [ i ], 0, 62, "exponent_principal_point_x"); 1381 xCheckCfgRange( wrongConfig, m_exponentPrincipalPointY [ i ], 0, 62, "exponent_principal_point_y"); 1382 xCheckCfgRange( wrongConfig, m_exponentSkewFactor [ i ], 0, 62, "exponent_skew_factor" ); 1383 } 1384 1385 xCheckCfgRange( wrongConfig, m_precRotationParam , 0, 31, "prec_focal_length" ); 1386 xCheckCfgRange( wrongConfig, m_precTranslationParam , 0, 31, "prec_focal_length" ); 1387 1388 for (Int i = 0; i <= getNumViewsMinus1(); i++ ) 1389 { 1390 for (Int j = 0; j <= 2; j++) 1391 { 1392 xCheckCfgRange( wrongConfig, m_exponentT[i][j] , 0, 62, "exponent_skew_factor" ); 1393 for (Int k = 0; k <= 2; k++ ) 1394 { 1395 xCheckCfgRange( wrongConfig, m_exponentR[i][j][k], 0, 62, "exponent_principal_point_y"); 1396 } 1397 } 1398 } 1399 1400 return wrongConfig; 1401 1402 }; 1403 1404 UInt SEIMultiviewAcquisitionInfo::getMantissaFocalLengthYLen( Int i ) const 1405 { 1406 return xGetSyntaxElementLen( m_exponentFocalLengthY[i], m_precFocalLength, m_mantissaFocalLengthY[ i ] ); 1407 } 1408 1409 1410 UInt SEIMultiviewAcquisitionInfo::getMantissaPrincipalPointXLen( Int i ) const 1411 { 1412 return xGetSyntaxElementLen( m_exponentPrincipalPointX[i], m_precPrincipalPoint, m_mantissaPrincipalPointX[ i ] ); 1413 } 1414 1415 UInt SEIMultiviewAcquisitionInfo::getMantissaPrincipalPointYLen( Int i ) const 1416 { 1417 return xGetSyntaxElementLen( m_exponentPrincipalPointY[i], m_precPrincipalPoint, m_mantissaPrincipalPointY[ i ] ); 1418 } 1419 1420 UInt SEIMultiviewAcquisitionInfo::getMantissaSkewFactorLen( Int i ) const 1421 { 1422 return xGetSyntaxElementLen( m_exponentSkewFactor[ i ], m_precSkewFactor, m_mantissaSkewFactor[ i ] ); 1423 } 1424 1425 UInt SEIMultiviewAcquisitionInfo::getMantissaRLen( Int i, Int j, Int k ) const 1426 { 1427 return xGetSyntaxElementLen( m_exponentR[ i ][ j ][ k ], m_precRotationParam, m_mantissaR[ i ][ j] [ k ] ); 1428 } 1429 1430 UInt SEIMultiviewAcquisitionInfo::getMantissaTLen( Int i, Int j ) const 1431 { 1432 return xGetSyntaxElementLen( m_exponentT[ i ][ j ], m_precTranslationParam, m_mantissaT[ i ][ j ] ); 1433 } 1434 UInt SEIMultiviewAcquisitionInfo::xGetSyntaxElementLen( Int expo, Int prec, Int val ) const 1435 { 1436 UInt len; 1437 if( expo == 0 ) 1438 { 1439 len = std::max(0, prec - 30 ); 1440 } 1441 else 1442 { 1443 len = std::max( 0, expo + prec - 31 ); 1444 } 1445 1446 assert( val >= 0 ); 1447 assert( val <= ( ( 1 << len )- 1) ); 1448 return len; 1449 } 1450 1451 Void SEIMultiviewViewPosition::setupFromSlice ( const TComSlice* slice ) 1452 { 1453 const TComVPS* vps = slice->getVPS(); 1454 m_numViewsMinus1 = vps->getNumViews() - 1; 1455 m_viewPosition.resize( m_numViewsMinus1 + 1 ); 1456 for (Int i = 0; i <= m_numViewsMinus1; i++ ) 1457 { 1458 // Assuming that view ids indicate the position 1459 m_viewPosition[i] = vps->getViewIdVal( i ); 1460 } 1461 } 1462 1463 Void SEIMultiviewViewPosition::setupFromCfgFile(const Char* cfgFile) 1464 { 1465 // Set default values 1466 IntAry1d defAppLayerIds, defAppPocs, defAppTids, defAppVclNaluTypes; 1467 1468 defAppLayerIds .push_back( 0 ); 1469 defAppPocs .push_back( 0 ); 1470 defAppTids .push_back( 0 ); 1471 defAppVclNaluTypes = IDR_NAL_UNIT_TYPES; 1472 1473 Int defSeiNaluId = 0; 1474 Int defPositionInSeiNalu = 0; 1475 Bool defModifyByEncoder = true; 1476 1477 // Setup config file options 1478 po::Options opts; 1479 xAddGeneralOpts( opts , defAppLayerIds, defAppPocs, defAppTids, defAppVclNaluTypes, defSeiNaluId, defPositionInSeiNalu, defModifyByEncoder ); 1480 1481 opts.addOptions() 1482 ("NumViewsMinus1" , m_numViewsMinus1 , 0 , "NumViewsMinus1") 1483 ("ViewPosition" , m_viewPosition , IntAry1d (1,0) , "ViewPosition" ); 1484 ; 1485 1486 po::setDefaults(opts); 1487 1488 // Parse the cfg file 1489 po::ErrorReporter err; 1490 po::parseConfigFile( opts, cfgFile, err ); 1491 }; 1492 1493 Bool SEIMultiviewViewPosition::checkCfg( const TComSlice* slice ) 1494 { 1495 // Check config values 1496 Bool wrongConfig = false; 1497 1498 // TBD: Add constraints on presence of SEI here. 1499 xCheckCfg ( wrongConfig, slice->isIRAP() , "When present, the multiview view position SEI message shall be associated with an IRAP access unit." ); 1500 1501 // TBD: Modify constraints according to the SEI semantics. 1502 xCheckCfgRange( wrongConfig, m_numViewsMinus1 , 0 , 62, "num_views_minus1"); 1503 for(Int i = 0; i <= m_numViewsMinus1; i++) 1504 { 1505 xCheckCfgRange( wrongConfig, m_viewPosition[i] , 0 , 62, "view_position"); 1506 } 1507 1508 return wrongConfig; 1509 1510 }; 1511 1512 #if NH_MV_SEI_TBD 1513 Void SEIAlternativeDepthInfo::setupFromSlice ( const TComSlice* slice ) 1514 { 1515 sei.m_alternativeDepthInfoCancelFlag = TBD ; 1516 if( sei.m_alternativeDepthInfoCancelFlag = = 0 ) 1517 { 1518 sei.m_depthType = TBD ; 1519 if( sei.m_depthType = = 0 ) 1520 { 1521 sei.m_numConstituentViewsGvdMinus1 = TBD ; 1522 sei.m_depthPresentGvdFlag = TBD ; 1523 sei.m_zGvdFlag = TBD ; 1524 sei.m_intrinsicParamGvdFlag = TBD ; 1525 sei.m_rotationGvdFlag = TBD ; 1526 sei.m_translationGvdFlag = TBD ; 1527 if( sei.m_zGvdFlag ) 1528 { 1529 for( Int i = 0; i <= sei.m_numConstituentViewsGvdMinus1 + 1; i++ ) 1530 { 1531 sei.m_signGvdZNearFlag[i] = TBD ; 1532 sei.m_expGvdZNear[i] = TBD ; 1533 sei.m_manLenGvdZNearMinus1[i] = TBD ; 1534 sei.m_manGvdZNear[i] = TBD ; 1535 sei.m_signGvdZFarFlag[i] = TBD ; 1536 sei.m_expGvdZFar[i] = TBD ; 1537 sei.m_manLenGvdZFarMinus1[i] = TBD ; 1538 sei.m_manGvdZFar[i] = TBD ; 1539 } 1540 } 1541 if( sei.m_intrinsicParamGvdFlag ) 1542 { 1543 sei.m_precGvdFocalLength = TBD ; 1544 sei.m_precGvdPrincipalPoint = TBD ; 1545 } 1546 if( sei.m_rotationGvdFlag ) 1547 { 1548 sei.m_precGvdRotationParam = TBD ; 1549 } 1550 if( sei.m_translationGvdFlag ) 1551 { 1552 sei.m_precGvdTranslationParam = TBD ; 1553 } 1554 for( Int i = 0; i <= sei.m_numConstituentViewsGvdMinus1 + 1; i++ ) 1555 { 1556 if( sei.m_intrinsicParamGvdFlag ) 1557 { 1558 sei.m_signGvdFocalLengthX[i] = TBD ; 1559 sei.m_expGvdFocalLengthX[i] = TBD ; 1560 sei.m_manGvdFocalLengthX[i] = TBD ; 1561 sei.m_signGvdFocalLengthY[i] = TBD ; 1562 sei.m_expGvdFocalLengthY[i] = TBD ; 1563 sei.m_manGvdFocalLengthY[i] = TBD ; 1564 sei.m_signGvdPrincipalPointX[i] = TBD ; 1565 sei.m_expGvdPrincipalPointX[i] = TBD ; 1566 sei.m_manGvdPrincipalPointX[i] = TBD ; 1567 sei.m_signGvdPrincipalPointY[i] = TBD ; 1568 sei.m_expGvdPrincipalPointY[i] = TBD ; 1569 sei.m_manGvdPrincipalPointY[i] = TBD ; 1570 } 1571 if( sei.m_rotationGvdFlag ) 1572 { 1573 for( Int j = 10; j <= 3; j++ ) /* row */ 1574 { 1575 for( Int k = 10; k <= 3; k++ ) /* column */ 1576 { 1577 sei.m_signGvdR[i][j][k] = TBD ; 1578 sei.m_expGvdR[i][j][k] = TBD ; 1579 sei.m_manGvdR[i][j][k] = TBD ; 1580 } 1581 } 1582 } 1583 if( sei.m_translationGvdFlag ) 1584 { 1585 sei.m_signGvdTX[i] = TBD ; 1586 sei.m_expGvdTX[i] = TBD ; 1587 sei.m_manGvdTX[i] = TBD ; 1588 } 1589 } 1590 } 1591 if( sei.m_depthType = = 1 ) 1592 { 1593 sei.m_minOffsetXInt = TBD ; 1594 sei.m_minOffsetXFrac = TBD ; 1595 sei.m_maxOffsetXInt = TBD ; 1596 sei.m_maxOffsetXFrac = TBD ; 1597 sei.m_offsetYPresentFlag = TBD ; 1598 if( sei.m_offsetYPresentFlag ) 1599 { 1600 sei.m_minOffsetYInt = TBD ; 1601 sei.m_minOffsetYFrac = TBD ; 1602 sei.m_maxOffsetYInt = TBD ; 1603 sei.m_maxOffsetYFrac = TBD ; 1604 } 1605 sei.m_warpMapSizePresentFlag = TBD ; 1606 if( sei.m_warpMapSizePresentFlag ) 1607 { 1608 sei.m_warpMapWidthMinus2 = TBD ; 1609 sei.m_warpMapHeightMinus2 = TBD ; 1610 } 1611 } 1612 } 1613 }; 1614 Void SEIAlternativeDepthInfo::setupFromCfgFile(const Char* cfgFile) 1615 { 1616 // Set default values 1617 IntAry1d defAppLayerIds, defAppPocs, defAppTids, defAppVclNaluTypes; 1618 1619 defAppLayerIds .push_back( TBD ); 1620 defAppPocs .push_back( TBD ); 1621 defAppTids .push_back( TBD ); 1622 defAppVclNaluTypes.push_back( TBD ); 1623 1624 Int defSeiNaluId = 0; 1625 Int defPositionInSeiNalu = 0; 1626 Bool defModifyByEncoder = TBD; 1627 1628 // Setup config file options 1629 po::Options opts; 1630 xAddGeneralOpts( opts , defAppLayerIds, defAppPocs, defAppTids, defAppVclNaluTypes, defSeiNaluId, defPositionInSeiNalu, defModifyByEncoder ); 1631 1632 opts.addOptions() 1633 ("AlternativeDepthInfoCancelFlag" , m_alternativeDepthInfoCancelFlag , false , "AlternativeDepthInfoCancelFlag" ) 1634 ("DepthType" , m_depthType , 0 , "DepthType" ) 1635 ("NumConstituentViewsGvdMinus1" , m_numConstituentViewsGvdMinus1 , 0 , "NumConstituentViewsGvdMinus1" ) 1636 ("DepthPresentGvdFlag" , m_depthPresentGvdFlag , false , "DepthPresentGvdFlag" ) 1637 ("ZGvdFlag" , m_zGvdFlag , false , "ZGvdFlag" ) 1638 ("IntrinsicParamGvdFlag" , m_intrinsicParamGvdFlag , false , "IntrinsicParamGvdFlag" ) 1639 ("RotationGvdFlag" , m_rotationGvdFlag , false , "RotationGvdFlag" ) 1640 ("TranslationGvdFlag" , m_translationGvdFlag , false , "TranslationGvdFlag" ) 1641 ("SignGvdZNearFlag" , m_signGvdZNearFlag , BoolAry1d(1,0) , "SignGvdZNearFlag" ) 1642 ("ExpGvdZNear" , m_expGvdZNear , IntAry1d (1,0) , "ExpGvdZNear" ) 1643 ("ManLenGvdZNearMinus1" , m_manLenGvdZNearMinus1 , IntAry1d (1,0) , "ManLenGvdZNearMinus1" ) 1644 ("ManGvdZNear" , m_manGvdZNear , IntAry1d (1,0) , "ManGvdZNear" ) 1645 ("SignGvdZFarFlag" , m_signGvdZFarFlag , BoolAry1d(1,0) , "SignGvdZFarFlag" ) 1646 ("ExpGvdZFar" , m_expGvdZFar , IntAry1d (1,0) , "ExpGvdZFar" ) 1647 ("ManLenGvdZFarMinus1" , m_manLenGvdZFarMinus1 , IntAry1d (1,0) , "ManLenGvdZFarMinus1" ) 1648 ("ManGvdZFar" , m_manGvdZFar , IntAry1d (1,0) , "ManGvdZFar" ) 1649 ("PrecGvdFocalLength" , m_precGvdFocalLength , 0 , "PrecGvdFocalLength" ) 1650 ("PrecGvdPrincipalPoint" , m_precGvdPrincipalPoint , 0 , "PrecGvdPrincipalPoint" ) 1651 ("PrecGvdRotationParam" , m_precGvdRotationParam , 0 , "PrecGvdRotationParam" ) 1652 ("PrecGvdTranslationParam" , m_precGvdTranslationParam , 0 , "PrecGvdTranslationParam" ) 1653 ("SignGvdFocalLengthX" , m_signGvdFocalLengthX , BoolAry1d(1,0) , "SignGvdFocalLengthX" ) 1654 ("ExpGvdFocalLengthX" , m_expGvdFocalLengthX , IntAry1d (1,0) , "ExpGvdFocalLengthX" ) 1655 ("ManGvdFocalLengthX" , m_manGvdFocalLengthX , IntAry1d (1,0) , "ManGvdFocalLengthX" ) 1656 ("SignGvdFocalLengthY" , m_signGvdFocalLengthY , BoolAry1d(1,0) , "SignGvdFocalLengthY" ) 1657 ("ExpGvdFocalLengthY" , m_expGvdFocalLengthY , IntAry1d (1,0) , "ExpGvdFocalLengthY" ) 1658 ("ManGvdFocalLengthY" , m_manGvdFocalLengthY , IntAry1d (1,0) , "ManGvdFocalLengthY" ) 1659 ("SignGvdPrincipalPointX" , m_signGvdPrincipalPointX , BoolAry1d(1,0) , "SignGvdPrincipalPointX" ) 1660 ("ExpGvdPrincipalPointX" , m_expGvdPrincipalPointX , IntAry1d (1,0) , "ExpGvdPrincipalPointX" ) 1661 ("ManGvdPrincipalPointX" , m_manGvdPrincipalPointX , IntAry1d (1,0) , "ManGvdPrincipalPointX" ) 1662 ("SignGvdPrincipalPointY" , m_signGvdPrincipalPointY , BoolAry1d(1,0) , "SignGvdPrincipalPointY" ) 1663 ("ExpGvdPrincipalPointY" , m_expGvdPrincipalPointY , IntAry1d (1,0) , "ExpGvdPrincipalPointY" ) 1664 ("ManGvdPrincipalPointY" , m_manGvdPrincipalPointY , IntAry1d (1,0) , "ManGvdPrincipalPointY" ) 1665 ("SignGvdR" , m_signGvdR , BoolAry1d(1,0) ,ADDNUM ,ADDNUM , "SignGvdR" ) 1666 ("ExpGvdR" , m_expGvdR , IntAry1d (1,0) ,ADDNUM ,ADDNUM , "ExpGvdR" ) 1667 ("ManGvdR" , m_manGvdR , IntAry1d (1,0) ,ADDNUM ,ADDNUM , "ManGvdR" ) 1668 ("SignGvdTX" , m_signGvdTX , BoolAry1d(1,0) , "SignGvdTX" ) 1669 ("ExpGvdTX" , m_expGvdTX , IntAry1d (1,0) , "ExpGvdTX" ) 1670 ("ManGvdTX" , m_manGvdTX , IntAry1d (1,0) , "ManGvdTX" ) 1671 ("MinOffsetXInt" , m_minOffsetXInt , 0 , "MinOffsetXInt" ) 1672 ("MinOffsetXFrac" , m_minOffsetXFrac , 0 , "MinOffsetXFrac" ) 1673 ("MaxOffsetXInt" , m_maxOffsetXInt , 0 , "MaxOffsetXInt" ) 1674 ("MaxOffsetXFrac" , m_maxOffsetXFrac , 0 , "MaxOffsetXFrac" ) 1675 ("OffsetYPresentFlag" , m_offsetYPresentFlag , false , "OffsetYPresentFlag" ) 1676 ("MinOffsetYInt" , m_minOffsetYInt , 0 , "MinOffsetYInt" ) 1677 ("MinOffsetYFrac" , m_minOffsetYFrac , 0 , "MinOffsetYFrac" ) 1678 ("MaxOffsetYInt" , m_maxOffsetYInt , 0 , "MaxOffsetYInt" ) 1679 ("MaxOffsetYFrac" , m_maxOffsetYFrac , 0 , "MaxOffsetYFrac" ) 1680 ("WarpMapSizePresentFlag" , m_warpMapSizePresentFlag , false , "WarpMapSizePresentFlag" ) 1681 ("WarpMapWidthMinus2" , m_warpMapWidthMinus2 , 0 , "WarpMapWidthMinus2" ) 1682 ("WarpMapHeightMinus2" , m_warpMapHeightMinus2 , 0 , "WarpMapHeightMinus2" ) 1683 ; 1684 1685 po::setDefaults(opts); 1686 1687 // Parse the cfg file 1688 po::ErrorReporter err; 1689 po::parseConfigFile( opts, cfgFile, err ); 1690 }; 1691 1692 Bool SEIAlternativeDepthInfo::checkCfg( const TComSlice* slice ) 1693 { 1694 // Check config values 1695 Bool wrongConfig = false; 1696 1697 // TBD: Add constraints on presence of SEI here. 1698 xCheckCfg ( wrongConfig, TBD , "TBD" ); 1699 xCheckCfg ( wrongConfig, TBD , "TBD" ); 1700 1701 // TBD: Modify constraints according to the SEI semantics. 1702 xCheckCfgRange( wrongConfig, m_alternativeDepthInfoCancelFlag , MINVAL , MAXVAL, "alternative_depth_info_cancel_flag"); 1703 xCheckCfgRange( wrongConfig, m_depthType , MINVAL , MAXVAL, "depth_type" ); 1704 xCheckCfgRange( wrongConfig, m_numConstituentViewsGvdMinus1 , MINVAL , MAXVAL, "num_constituent_views_gvd_minus1 "); 1705 xCheckCfgRange( wrongConfig, m_depthPresentGvdFlag , MINVAL , MAXVAL, "depth_present_gvd_flag" ); 1706 xCheckCfgRange( wrongConfig, m_zGvdFlag , MINVAL , MAXVAL, "z_gvd_flag" ); 1707 xCheckCfgRange( wrongConfig, m_intrinsicParamGvdFlag , MINVAL , MAXVAL, "intrinsic_param_gvd_flag" ); 1708 xCheckCfgRange( wrongConfig, m_rotationGvdFlag , MINVAL , MAXVAL, "rotation_gvd_flag" ); 1709 xCheckCfgRange( wrongConfig, m_translationGvdFlag , MINVAL , MAXVAL, "translation_gvd_flag" ); 1710 xCheckCfgRange( wrongConfig, m_signGvdZNearFlag[i] , MINVAL , MAXVAL, "sign_gvd_z_near_flag" ); 1711 xCheckCfgRange( wrongConfig, m_expGvdZNear[i] , MINVAL , MAXVAL, "exp_gvd_z_near" ); 1712 xCheckCfgRange( wrongConfig, m_manLenGvdZNearMinus1[i] , MINVAL , MAXVAL, "man_len_gvd_z_near_minus1" ); 1713 xCheckCfgRange( wrongConfig, m_manGvdZNear[i] , MINVAL , MAXVAL, "man_gvd_z_near" ); 1714 xCheckCfgRange( wrongConfig, m_signGvdZFarFlag[i] , MINVAL , MAXVAL, "sign_gvd_z_far_flag" ); 1715 xCheckCfgRange( wrongConfig, m_expGvdZFar[i] , MINVAL , MAXVAL, "exp_gvd_z_far" ); 1716 xCheckCfgRange( wrongConfig, m_manLenGvdZFarMinus1[i] , MINVAL , MAXVAL, "man_len_gvd_z_far_minus1" ); 1717 xCheckCfgRange( wrongConfig, m_manGvdZFar[i] , MINVAL , MAXVAL, "man_gvd_z_far" ); 1718 xCheckCfgRange( wrongConfig, m_precGvdFocalLength , MINVAL , MAXVAL, "prec_gvd_focal_length" ); 1719 xCheckCfgRange( wrongConfig, m_precGvdPrincipalPoint , MINVAL , MAXVAL, "prec_gvd_principal_point" ); 1720 xCheckCfgRange( wrongConfig, m_precGvdRotationParam , MINVAL , MAXVAL, "prec_gvd_rotation_param" ); 1721 xCheckCfgRange( wrongConfig, m_precGvdTranslationParam , MINVAL , MAXVAL, "prec_gvd_translation_param" ); 1722 xCheckCfgRange( wrongConfig, m_signGvdFocalLengthX[i] , MINVAL , MAXVAL, "sign_gvd_focal_length_x" ); 1723 xCheckCfgRange( wrongConfig, m_expGvdFocalLengthX[i] , MINVAL , MAXVAL, "exp_gvd_focal_length_x" ); 1724 xCheckCfgRange( wrongConfig, m_manGvdFocalLengthX[i] , MINVAL , MAXVAL, "man_gvd_focal_length_x" ); 1725 xCheckCfgRange( wrongConfig, m_signGvdFocalLengthY[i] , MINVAL , MAXVAL, "sign_gvd_focal_length_y" ); 1726 xCheckCfgRange( wrongConfig, m_expGvdFocalLengthY[i] , MINVAL , MAXVAL, "exp_gvd_focal_length_y" ); 1727 xCheckCfgRange( wrongConfig, m_manGvdFocalLengthY[i] , MINVAL , MAXVAL, "man_gvd_focal_length_y" ); 1728 xCheckCfgRange( wrongConfig, m_signGvdPrincipalPointX[i] , MINVAL , MAXVAL, "sign_gvd_principal_point_x" ); 1729 xCheckCfgRange( wrongConfig, m_expGvdPrincipalPointX[i] , MINVAL , MAXVAL, "exp_gvd_principal_point_x" ); 1730 xCheckCfgRange( wrongConfig, m_manGvdPrincipalPointX[i] , MINVAL , MAXVAL, "man_gvd_principal_point_x" ); 1731 xCheckCfgRange( wrongConfig, m_signGvdPrincipalPointY[i] , MINVAL , MAXVAL, "sign_gvd_principal_point_y" ); 1732 xCheckCfgRange( wrongConfig, m_expGvdPrincipalPointY[i] , MINVAL , MAXVAL, "exp_gvd_principal_point_y" ); 1733 xCheckCfgRange( wrongConfig, m_manGvdPrincipalPointY[i] , MINVAL , MAXVAL, "man_gvd_principal_point_y" ); 1734 xCheckCfgRange( wrongConfig, m_signGvdR[i][j][k] , MINVAL , MAXVAL, "sign_gvd_r" ); 1735 xCheckCfgRange( wrongConfig, m_expGvdR[i][j][k] , MINVAL , MAXVAL, "exp_gvd_r" ); 1736 xCheckCfgRange( wrongConfig, m_manGvdR[i][j][k] , MINVAL , MAXVAL, "man_gvd_r" ); 1737 xCheckCfgRange( wrongConfig, m_signGvdTX[i] , MINVAL , MAXVAL, "sign_gvd_t_x" ); 1738 xCheckCfgRange( wrongConfig, m_expGvdTX[i] , MINVAL , MAXVAL, "exp_gvd_t_x" ); 1739 xCheckCfgRange( wrongConfig, m_manGvdTX[i] , MINVAL , MAXVAL, "man_gvd_t_x" ); 1740 xCheckCfgRange( wrongConfig, m_minOffsetXInt , MINVAL , MAXVAL, "min_offset_x_int" ); 1741 xCheckCfgRange( wrongConfig, m_minOffsetXFrac , MINVAL , MAXVAL, "min_offset_x_frac" ); 1742 xCheckCfgRange( wrongConfig, m_maxOffsetXInt , MINVAL , MAXVAL, "max_offset_x_int" ); 1743 xCheckCfgRange( wrongConfig, m_maxOffsetXFrac , MINVAL , MAXVAL, "max_offset_x_frac" ); 1744 xCheckCfgRange( wrongConfig, m_offsetYPresentFlag , MINVAL , MAXVAL, "offset_y_present_flag" ); 1745 xCheckCfgRange( wrongConfig, m_minOffsetYInt , MINVAL , MAXVAL, "min_offset_y_int" ); 1746 xCheckCfgRange( wrongConfig, m_minOffsetYFrac , MINVAL , MAXVAL, "min_offset_y_frac" ); 1747 xCheckCfgRange( wrongConfig, m_maxOffsetYInt , MINVAL , MAXVAL, "max_offset_y_int" ); 1748 xCheckCfgRange( wrongConfig, m_maxOffsetYFrac , MINVAL , MAXVAL, "max_offset_y_frac" ); 1749 xCheckCfgRange( wrongConfig, m_warpMapSizePresentFlag , MINVAL , MAXVAL, "warp_map_size_present_flag" ); 1750 xCheckCfgRange( wrongConfig, m_warpMapWidthMinus2 , MINVAL , MAXVAL, "warp_map_width_minus2" ); 1751 xCheckCfgRange( wrongConfig, m_warpMapHeightMinus2 , MINVAL , MAXVAL, "warp_map_height_minus2" ); 1752 1753 return wrongConfig; 1754 1755 }; 1756 #endif 1757 1758 #endif -
branches/HTM-15.1-dev0/source/Lib/TLibCommon/SEI.h
r1313 r1328 42 42 #include "CommonDef.h" 43 43 #include "libmd5/MD5.h" 44 45 46 #if NH_MV_SEI 47 #include "TAppCommon/program_options_lite.h" 48 using namespace std; 49 namespace po = df::program_options_lite; 50 #endif 51 44 52 //! \ingroup TLibCommon 45 53 //! \{ 46 54 class TComSPS; 55 #if NH_MV_SEI 56 class TComSlice; 57 class SEIScalableNesting; 58 #endif 47 59 48 60 /** … … 84 96 CHROMA_SAMPLING_FILTER_HINT = 140, 85 97 KNEE_FUNCTION_INFO = 141 86 #if NH_MV 87 ,SUB_BITSTREAM_PROPERTY = 164 98 #if NH_MV_SEI 99 ,COLOUR_REMAPPING_INFO = 142, 100 DEINTERLACED_FIELD_IDENTIFICATION = 143, 101 LAYERS_NOT_PRESENT = 160, 102 INTER_LAYER_CONSTRAINED_TILE_SETS = 161, 103 BSP_NESTING = 162, 104 BSP_INITIAL_ARRIVAL_TIME = 163, 105 SUB_BITSTREAM_PROPERTY = 164, 106 ALPHA_CHANNEL_INFO = 165, 107 OVERLAY_INFO = 166, 108 TEMPORAL_MV_PREDICTION_CONSTRAINTS = 167, 109 FRAME_FIELD_INFO = 168, 110 THREE_DIMENSIONAL_REFERENCE_DISPLAYS_INFO = 176, 111 DEPTH_REPRESENTATION_INFO = 177, 112 MULTIVIEW_SCENE_INFO = 178, 113 MULTIVIEW_ACQUISITION_INFO = 179, 114 MULTIVIEW_VIEW_POSITION = 180 115 #if NH_3D 116 , ALTERNATIVE_DEPTH_INFO = 181 117 #endif 88 118 #endif 89 119 90 120 }; 91 121 92 SEI() {} 122 SEI(); 123 93 124 virtual ~SEI() {} 94 95 static const Char *getSEIMessageString(SEI::PayloadType payloadType); 96 125 virtual SEI* getCopy( ) const; 126 static const Char *getSEIMessageString(SEI::PayloadType payloadType ); 97 127 virtual PayloadType payloadType() const = 0; 128 129 #if NH_MV_SEI 130 static SEI* getNewSEIMessage ( SEI::PayloadType payloadType ); 131 Bool insertSei ( Int curLayerId, Int curPoc, Int curTid, Int curNaluType ) const; 132 133 134 virtual Void setupFromSlice ( const TComSlice* slice ); 135 virtual Void setupFromCfgFile ( const Char* cfgFile ); 136 virtual Bool checkCfg ( const TComSlice* slice ); 137 138 Void xPrintCfgErrorIntro(); 139 Void xCheckCfgRange ( Bool& wrongConfig, Int val, Int minVal, Int maxVal, const Char* seName ); 140 Void xCheckCfg ( Bool& wrongConfig, Bool cond, const Char* errStr ); 141 Void xAddGeneralOpts ( po::Options &opts, IntAry1d defAppLayerIds, IntAry1d defAppPocs, IntAry1d defAppTids, IntAry1d defAppVclNaluTypes, 142 Int defSeiNaluId, Int defPositionInSeiNalu, Bool defModifyByEncoder ); 143 // Filters where to insert SEI in the bitstream. 144 // When the respected vector is empty, all layersIds, POCs, Tids, and Nalu types are used. 145 IntAry1d m_applicableLayerIds; 146 IntAry1d m_applicablePocs; 147 IntAry1d m_applicableTids; 148 IntAry1d m_applicableVclNaluTypes; 149 150 Int m_payloadType; // Payload type 151 Int m_seiNaluId; // Identifies to which NAL unit the SEI is added. 152 Int m_positionInSeiNalu; // Identifies the order within the NAL unit 153 Bool m_modifyByEncoder; // Don't use the SEI cfg-file, but let let the encoder setup the NALU. 154 155 SEIScalableNesting* m_scalNestSeiContThisSei; // Pointer to scalable nesting SEI containing the SEI. When NULL, the SEI is not nested. 156 #endif 98 157 }; 99 158 … … 473 532 474 533 #if NH_MV 534 #if !NH_MV_SEI 475 535 class SEISubBitstreamProperty : public SEI 476 536 { … … 489 549 std::vector<Int> m_maxBitRate; 490 550 }; 551 #endif 491 552 #endif 492 553 … … 598 659 }; 599 660 600 #endif 601 661 #if NH_MV_SEI 662 #if NH_MV_SEI_TBD 663 class SEILayersNotPresent : public SEI 664 { 665 public: 666 PayloadType payloadType( ) const { return LAYERS_NOT_PRESENT; } 667 SEILayersNotPresent ( ) { }; 668 ~SEILayersNotPresent( ) { }; 669 SEI* getCopy( ) const { return new SEILayersNotPresent(*this); }; 670 671 Void setupFromCfgFile( const Char* cfgFile ); 672 Void setupFromSlice ( const TComSlice* slice ); 673 Bool checkCfg ( const TComSlice* slice ); 674 675 Int m_lnpSeiActiveVpsId; 676 BoolAry1d m_layerNotPresentFlag; 677 }; 678 #endif 679 680 class SEIInterLayerConstrainedTileSets : public SEI 681 { 682 public: 683 PayloadType payloadType( ) const { return INTER_LAYER_CONSTRAINED_TILE_SETS; } 684 SEIInterLayerConstrainedTileSets ( ) { }; 685 ~SEIInterLayerConstrainedTileSets( ) { }; 686 SEI* getCopy( ) const { return new SEIInterLayerConstrainedTileSets(*this); }; 687 688 Void setupFromCfgFile( const Char* cfgFile ); 689 Bool checkCfg ( const TComSlice* slice ); 690 691 Bool m_ilAllTilesExactSampleValueMatchFlag; 692 Bool m_ilOneTilePerTileSetFlag; 693 Int m_ilNumSetsInMessageMinus1; 694 Bool m_skippedTileSetPresentFlag; 695 IntAry1d m_ilctsId; 696 IntAry1d m_ilNumTileRectsInSetMinus1; 697 IntAry2d m_ilTopLeftTileIndex; 698 IntAry2d m_ilBottomRightTileIndex; 699 IntAry1d m_ilcIdc; 700 BoolAry1d m_ilExactSampleValueMatchFlag; 701 Int m_allTilesIlcIdc; 702 703 Void resizeDimI( Int sizeDimI ) 704 { 705 m_ilctsId .resize( sizeDimI ); 706 m_ilNumTileRectsInSetMinus1 .resize( sizeDimI ); 707 m_ilTopLeftTileIndex .resize( sizeDimI ); 708 m_ilBottomRightTileIndex .resize( sizeDimI ); 709 m_ilcIdc .resize( sizeDimI ); 710 m_ilExactSampleValueMatchFlag.resize( sizeDimI ); 711 } 712 713 Void resizeDimJ( Int i, Int sizeDimJ ) 714 { 715 m_ilTopLeftTileIndex [i].resize( sizeDimJ ); 716 m_ilBottomRightTileIndex[i].resize( sizeDimJ ); 717 } 718 719 }; 720 721 #if NH_MV_TBD 722 class SEIBspNesting : public SEI 723 { 724 public: 725 PayloadType payloadType( ) const { return BSP_NESTING; } 726 SEIBspNesting ( ) { }; 727 ~SEIBspNesting( ) { }; 728 SEI* getCopy( ) const { return new SEIBspNesting(*this); }; 729 730 Void setupFromCfgFile( const Char* cfgFile ); 731 Void setupFromSlice ( const TComSlice* slice ); 732 Bool checkCfg ( const TComSlice* slice ); 733 734 Int m_seiOlsIdx; 735 Int m_seiPartitioningSchemeIdx; 736 Int m_bspIdx; 737 Int m_bspNestingZeroBit; 738 Int m_numSeisInBspMinus1; 739 }; 740 741 class SEIBspInitialArrivalTime : public SEI 742 { 743 public: 744 PayloadType payloadType( ) const { return BSP_INITIAL_ARRIVAL_TIME; } 745 SEIBspInitialArrivalTime ( ) { }; 746 ~SEIBspInitialArrivalTime( ) { }; 747 SEI* getCopy( ) const { return new SEIBspInitialArrivalTime(*this); }; 748 749 Void setupFromCfgFile( const Char* cfgFile ); 750 Void setupFromSlice ( const TComSlice* slice ); 751 Bool checkCfg ( const TComSlice* slice ); 752 753 IntAry1d m_nalInitialArrivalDelay; 754 IntAry1d m_vclInitialArrivalDelay; 755 }; 756 #endif 757 758 class SEISubBitstreamProperty : public SEI 759 { 760 public: 761 PayloadType payloadType( ) const { return SUB_BITSTREAM_PROPERTY; } 762 SEISubBitstreamProperty ( ) { }; 763 ~SEISubBitstreamProperty( ) { }; 764 SEI* getCopy( ) const { return new SEISubBitstreamProperty(*this); }; 765 766 Void setupFromCfgFile( const Char* cfgFile ); 767 Bool checkCfg ( const TComSlice* slice ); 768 Void resizeArrays ( ); 769 770 Int m_sbPropertyActiveVpsId; 771 Int m_numAdditionalSubStreamsMinus1; 772 IntAry1d m_subBitstreamMode; 773 IntAry1d m_olsIdxToVps; 774 IntAry1d m_highestSublayerId; 775 IntAry1d m_avgSbPropertyBitRate; 776 IntAry1d m_maxSbPropertyBitRate; 777 }; 778 779 #if NH_MV_SEI_TBD 780 class SEIAlphaChannelInfo : public SEI 781 { 782 public: 783 PayloadType payloadType( ) const { return ALPHA_CHANNEL_INFO; } 784 SEIAlphaChannelInfo ( ) { }; 785 ~SEIAlphaChannelInfo( ) { }; 786 SEI* getCopy( ) const { return new SEIAlphaChannelInfo(*this); }; 787 788 Void setupFromCfgFile( const Char* cfgFile ); 789 Void setupFromSlice ( const TComSlice* slice ); 790 Bool checkCfg ( const TComSlice* slice ); 791 792 Bool m_alphaChannelCancelFlag; 793 Int m_alphaChannelUseIdc; 794 Int m_alphaChannelBitDepthMinus8; 795 Int m_alphaTransparentValue; 796 Int m_alphaOpaqueValue; 797 Bool m_alphaChannelIncrFlag; 798 Bool m_alphaChannelClipFlag; 799 Bool m_alphaChannelClipTypeFlag; 800 }; 801 802 class SEIOverlayInfo : public SEI 803 { 804 public: 805 PayloadType payloadType( ) const { return OVERLAY_INFO; } 806 SEIOverlayInfo ( ) { }; 807 ~SEIOverlayInfo( ) { }; 808 SEI* getCopy( ) const { return new SEIOverlayInfo(*this); }; 809 810 Void setupFromCfgFile( const Char* cfgFile ); 811 Void setupFromSlice ( const TComSlice* slice ); 812 Bool checkCfg ( const TComSlice* slice ); 813 814 Bool m_overlayInfoCancelFlag; 815 Int m_overlayContentAuxIdMinus128; 816 Int m_overlayLabelAuxIdMinus128; 817 Int m_overlayAlphaAuxIdMinus128; 818 Int m_overlayElementLabelValueLengthMinus8; 819 Int m_numOverlaysMinus1; 820 IntAry1d m_overlayIdx; 821 BoolAry1d m_languageOverlayPresentFlag; 822 IntAry1d m_overlayContentLayerId; 823 BoolAry1d m_overlayLabelPresentFlag; 824 IntAry1d m_overlayLabelLayerId; 825 BoolAry1d m_overlayAlphaPresentFlag; 826 IntAry1d m_overlayAlphaLayerId; 827 IntAry1d m_numOverlayElementsMinus1; 828 IntAry2d m_overlayElementLabelMin; 829 IntAry2d m_overlayElementLabelMax; 830 Int m_overlayZeroBit; 831 IntAry1d m_overlayLanguage; 832 IntAry1d m_overlayName; 833 IntAry2d m_overlayElementName; 834 Bool m_overlayInfoPersistenceFlag; 835 }; 836 837 #endif 838 839 class SEITemporalMvPredictionConstraints : public SEI 840 { 841 public: 842 PayloadType payloadType( ) const { return TEMPORAL_MV_PREDICTION_CONSTRAINTS; } 843 SEITemporalMvPredictionConstraints ( ) { }; 844 ~SEITemporalMvPredictionConstraints( ) { }; 845 SEI* getCopy( ) const { return new SEITemporalMvPredictionConstraints(*this); }; 846 847 Void setupFromCfgFile( const Char* cfgFile ); 848 Bool checkCfg ( const TComSlice* slice ); 849 850 Bool m_prevPicsNotUsedFlag; 851 Bool m_noIntraLayerColPicFlag; 852 }; 853 854 #if NH_MV_SEI_TBD 855 class SEIFrameFieldInfo : public SEI 856 { 857 public: 858 PayloadType payloadType( ) const { return FRAME_FIELD_INFO; } 859 SEIFrameFieldInfo ( ) { }; 860 ~SEIFrameFieldInfo( ) { }; 861 SEI* getCopy( ) const { return new SEIFrameFieldInfo(*this); }; 862 863 Void setupFromCfgFile( const Char* cfgFile ); 864 Void setupFromSlice ( const TComSlice* slice ); 865 Bool checkCfg ( const TComSlice* slice ); 866 867 Int m_ffinfoPicStruct; 868 Int m_ffinfoSourceScanType; 869 Bool m_ffinfoDuplicateFlag; 870 }; 871 872 class SEIThreeDimensionalReferenceDisplaysInfo : public SEI 873 { 874 public: 875 PayloadType payloadType( ) const { return THREE_DIMENSIONAL_REFERENCE_DISPLAYS_INFO; } 876 SEIThreeDimensionalReferenceDisplaysInfo ( ) { }; 877 ~SEIThreeDimensionalReferenceDisplaysInfo( ) { }; 878 SEI* getCopy( ) const { return new SEIThreeDimensionalReferenceDisplaysInfo(*this); }; 879 880 Void setupFromCfgFile( const Char* cfgFile ); 881 Void setupFromSlice ( const TComSlice* slice ); 882 Bool checkCfg ( const TComSlice* slice ); 883 884 Int m_precRefDisplayWidth; 885 Bool m_refViewingDistanceFlag; 886 Int m_precRefViewingDist; 887 Int m_numRefDisplaysMinus1; 888 IntAry1d m_leftViewId; 889 IntAry1d m_rightViewId; 890 IntAry1d m_exponentRefDisplayWidth; 891 IntAry1d m_mantissaRefDisplayWidth; 892 IntAry1d m_exponentRefViewingDistance; 893 IntAry1d m_mantissaRefViewingDistance; 894 BoolAry1d m_additionalShiftPresentFlag; 895 IntAry1d m_numSampleShiftPlus512; 896 Bool m_threeDimensionalReferenceDisplaysExtensionFlag; 897 }; 898 899 class SEIDepthRepresentationInfo : public SEI 900 { 901 public: 902 PayloadType payloadType( ) const { return DEPTH_REPRESENTATION_INFO; } 903 SEIDepthRepresentationInfo ( ) { }; 904 ~SEIDepthRepresentationInfo( ) { }; 905 SEI* getCopy( ) const { return new SEIDepthRepresentationInfo(*this); }; 906 907 Void setupFromCfgFile( const Char* cfgFile ); 908 Void setupFromSlice ( const TComSlice* slice ); 909 Bool checkCfg ( const TComSlice* slice ); 910 911 Bool m_zNearFlag; 912 Bool m_zFarFlag; 913 Bool m_dMinFlag; 914 Bool m_dMaxFlag; 915 Int m_depthRepresentationType; 916 Int m_disparityRefViewId; 917 Int m_depthNonlinearRepresentationNumMinus1; 918 }; 919 920 class SEIDepthRepInfoElement : public SEI 921 { 922 public: 923 PayloadType payloadType( ) const { return DEPTH_REP_INFO_ELEMENT; } 924 SEIDepthRepInfoElement ( ) { }; 925 ~SEIDepthRepInfoElement( ) { }; 926 SEI* getCopy( ) const { return new SEIDepthRepInfoElement(*this); }; 927 928 Void setupFromCfgFile( const Char* cfgFile ); 929 Void setupFromSlice ( const TComSlice* slice ); 930 Bool checkCfg ( const TComSlice* slice ); 931 932 Bool m_daSignFlag; 933 Int m_daExponent; 934 Int m_daMantissaLenMinus1; 935 Int m_daMantissa; 936 }; 937 #endif 938 939 class SEIMultiviewSceneInfo : public SEI 940 { 941 public: 942 PayloadType payloadType( ) const { return MULTIVIEW_SCENE_INFO; } 943 SEIMultiviewSceneInfo ( ) { }; 944 ~SEIMultiviewSceneInfo( ) { }; 945 SEI* getCopy( ) const { return new SEIMultiviewSceneInfo(*this); }; 946 947 Void setupFromCfgFile( const Char* cfgFile ); 948 Bool checkCfg ( const TComSlice* slice ); 949 950 Int m_minDisparity; 951 Int m_maxDisparityRange; 952 }; 953 954 955 class SEIMultiviewAcquisitionInfo : public SEI 956 { 957 public: 958 PayloadType payloadType( ) const { return MULTIVIEW_ACQUISITION_INFO; } 959 SEIMultiviewAcquisitionInfo ( ) { }; 960 ~SEIMultiviewAcquisitionInfo( ) { }; 961 SEI* getCopy( ) const { return new SEIMultiviewAcquisitionInfo(*this); }; 962 963 Void setupFromCfgFile( const Char* cfgFile ); 964 Bool checkCfg ( const TComSlice* slice ); 965 966 Int getNumViewsMinus1( ) const 967 { 968 Int numViewsMinus1; 969 if( m_scalNestSeiContThisSei != NULL ) 970 { 971 numViewsMinus1 = m_scalNestSeiContThisSei->m_nestingNumLayersMinus1; 972 } 973 else 974 { 975 numViewsMinus1 = 0; 976 } 977 return numViewsMinus1; 978 } 979 980 Void resizeArrays( ) 981 { 982 Int numViews = getNumViewsMinus1() + 1; 983 m_signFocalLengthX .resize( numViews ); 984 m_exponentFocalLengthX .resize( numViews ); 985 m_mantissaFocalLengthX .resize( numViews ); 986 m_signFocalLengthY .resize( numViews ); 987 m_exponentFocalLengthY .resize( numViews ); 988 m_mantissaFocalLengthY .resize( numViews ); 989 m_signPrincipalPointX .resize( numViews ); 990 m_exponentPrincipalPointX.resize( numViews ); 991 m_mantissaPrincipalPointX.resize( numViews ); 992 m_signPrincipalPointY .resize( numViews ); 993 m_exponentPrincipalPointY.resize( numViews ); 994 m_mantissaPrincipalPointY.resize( numViews ); 995 m_signSkewFactor .resize( numViews ); 996 m_exponentSkewFactor .resize( numViews ); 997 m_mantissaSkewFactor .resize( numViews ); 998 999 m_signR .resize( numViews ); 1000 m_exponentR .resize( numViews ); 1001 m_mantissaR .resize( numViews ); 1002 m_signT .resize( numViews ); 1003 m_exponentT .resize( numViews ); 1004 m_mantissaT .resize( numViews ); 1005 1006 for( Int i = 0; i < numViews ; i++ ) 1007 { 1008 m_signR [i].resize( 3 ); 1009 m_exponentR[i].resize( 3 ); 1010 m_mantissaR[i].resize( 3 ); 1011 m_signT [i].resize( 3 ); 1012 m_exponentT[i].resize( 3 ); 1013 m_mantissaT[i].resize( 3 ); 1014 1015 for (Int j = 0; j < 3; j++) 1016 { 1017 m_signR [i][j].resize( 3 ); 1018 m_exponentR[i][j].resize( 3 ); 1019 m_mantissaR[i][j].resize( 3 ); 1020 } 1021 } 1022 } 1023 1024 UInt getMantissaFocalLengthXLen ( Int i ) const ; 1025 UInt getMantissaFocalLengthYLen ( Int i ) const ; 1026 UInt getMantissaPrincipalPointXLen( Int i ) const ; 1027 UInt getMantissaPrincipalPointYLen( Int i ) const ; 1028 UInt getMantissaSkewFactorLen ( Int i ) const ; 1029 UInt getMantissaRLen ( Int i, Int j, Int k ) const ; 1030 UInt getMantissaTLen ( Int i, Int j ) const ; 1031 1032 Bool m_intrinsicParamFlag; 1033 Bool m_extrinsicParamFlag; 1034 Bool m_intrinsicParamsEqualFlag; 1035 Int m_precFocalLength; 1036 Int m_precPrincipalPoint; 1037 Int m_precSkewFactor; 1038 BoolAry1d m_signFocalLengthX; 1039 IntAry1d m_exponentFocalLengthX; 1040 IntAry1d m_mantissaFocalLengthX; 1041 BoolAry1d m_signFocalLengthY; 1042 IntAry1d m_exponentFocalLengthY; 1043 IntAry1d m_mantissaFocalLengthY; 1044 BoolAry1d m_signPrincipalPointX; 1045 IntAry1d m_exponentPrincipalPointX; 1046 IntAry1d m_mantissaPrincipalPointX; 1047 BoolAry1d m_signPrincipalPointY; 1048 IntAry1d m_exponentPrincipalPointY; 1049 IntAry1d m_mantissaPrincipalPointY; 1050 BoolAry1d m_signSkewFactor; 1051 IntAry1d m_exponentSkewFactor; 1052 IntAry1d m_mantissaSkewFactor; 1053 Int m_precRotationParam; 1054 Int m_precTranslationParam; 1055 BoolAry3d m_signR; 1056 IntAry3d m_exponentR; 1057 IntAry3d m_mantissaR; 1058 BoolAry2d m_signT; 1059 IntAry2d m_exponentT; 1060 IntAry2d m_mantissaT; 1061 private: 1062 UInt xGetSyntaxElementLen( Int expo, Int prec, Int val ) const; 1063 }; 1064 1065 1066 1067 class SEIMultiviewViewPosition : public SEI 1068 { 1069 public: 1070 PayloadType payloadType( ) const { return MULTIVIEW_VIEW_POSITION; } 1071 SEIMultiviewViewPosition ( ) { }; 1072 ~SEIMultiviewViewPosition( ) { }; 1073 SEI* getCopy( ) const { return new SEIMultiviewViewPosition(*this); }; 1074 1075 Void setupFromCfgFile( const Char* cfgFile ); 1076 Void setupFromSlice ( const TComSlice* slice ); 1077 Bool checkCfg ( const TComSlice* slice ); 1078 1079 Int m_numViewsMinus1; 1080 IntAry1d m_viewPosition; 1081 }; 1082 1083 #if NH_MV_SEI_TBD 1084 class SEIAlternativeDepthInfo : public SEI 1085 { 1086 public: 1087 PayloadType payloadType( ) const { return ALTERNATIVE_DEPTH_INFO; } 1088 SEIAlternativeDepthInfo ( ) { }; 1089 ~SEIAlternativeDepthInfo( ) { }; 1090 SEI* getCopy( ) const { return new SEIAlternativeDepthInfo(*this); }; 1091 1092 Void setupFromCfgFile( const Char* cfgFile ); 1093 Void setupFromSlice ( const TComSlice* slice ); 1094 Bool checkCfg ( const TComSlice* slice ); 1095 1096 Bool m_alternativeDepthInfoCancelFlag; 1097 Int m_depthType; 1098 Int m_numConstituentViewsGvdMinus1; 1099 Bool m_depthPresentGvdFlag; 1100 Bool m_zGvdFlag; 1101 Bool m_intrinsicParamGvdFlag; 1102 Bool m_rotationGvdFlag; 1103 Bool m_translationGvdFlag; 1104 BoolAry1d m_signGvdZNearFlag; 1105 IntAry1d m_expGvdZNear; 1106 IntAry1d m_manLenGvdZNearMinus1; 1107 IntAry1d m_manGvdZNear; 1108 BoolAry1d m_signGvdZFarFlag; 1109 IntAry1d m_expGvdZFar; 1110 IntAry1d m_manLenGvdZFarMinus1; 1111 IntAry1d m_manGvdZFar; 1112 Int m_precGvdFocalLength; 1113 Int m_precGvdPrincipalPoint; 1114 Int m_precGvdRotationParam; 1115 Int m_precGvdTranslationParam; 1116 BoolAry1d m_signGvdFocalLengthX; 1117 IntAry1d m_expGvdFocalLengthX; 1118 IntAry1d m_manGvdFocalLengthX; 1119 BoolAry1d m_signGvdFocalLengthY; 1120 IntAry1d m_expGvdFocalLengthY; 1121 IntAry1d m_manGvdFocalLengthY; 1122 BoolAry1d m_signGvdPrincipalPointX; 1123 IntAry1d m_expGvdPrincipalPointX; 1124 IntAry1d m_manGvdPrincipalPointX; 1125 BoolAry1d m_signGvdPrincipalPointY; 1126 IntAry1d m_expGvdPrincipalPointY; 1127 IntAry1d m_manGvdPrincipalPointY; 1128 BoolAry3d m_signGvdR; 1129 IntAry3d m_expGvdR; 1130 IntAry3d m_manGvdR; 1131 BoolAry1d m_signGvdTX; 1132 IntAry1d m_expGvdTX; 1133 IntAry1d m_manGvdTX; 1134 Int m_minOffsetXInt; 1135 Int m_minOffsetXFrac; 1136 Int m_maxOffsetXInt; 1137 Int m_maxOffsetXFrac; 1138 Bool m_offsetYPresentFlag; 1139 Int m_minOffsetYInt; 1140 Int m_minOffsetYFrac; 1141 Int m_maxOffsetYInt; 1142 Int m_maxOffsetYFrac; 1143 Bool m_warpMapSizePresentFlag; 1144 Int m_warpMapWidthMinus2; 1145 Int m_warpMapHeightMinus2; 1146 }; 1147 #endif 1148 1149 #endif 1150 1151 #endif 602 1152 //! \} -
branches/HTM-15.1-dev0/source/Lib/TLibCommon/TypeDef.h
r1321 r1328 61 61 #define NH_3D ( HEVC_EXT == 2) 62 62 ///////////////////////////////////////////////////////////////////////////////////////// 63 /////////////////////////////////// FIXES ///////////////////////////////////63 /////////////////////////////////// FIXES AND INTEGRATIONS //////////////////////// 64 64 ///////////////////////////////////////////////////////////////////////////////////////// 65 65 #if NH_MV 66 #define NH_MV_SEI_TBD 0 67 #define NH_MV_SEI 1 66 68 #define NH_MV_FIX_TICKET_106 1 // Identical motion check. 67 69 #define NH_MV_FIX_NO_REF_PICS_CHECK 1 // !!SPEC!!
Note: See TracChangeset for help on using the changeset viewer.