Changeset 1337 in 3DVCSoftware for branches/HTM-15.1-dev0-Ericsson/source/Lib/TLibCommon/SEI.cpp
- Timestamp:
- 23 Sep 2015, 18:32:42 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-15.1-dev0-Ericsson/source/Lib/TLibCommon/SEI.cpp
r1335 r1337 240 240 #if NH_MV_SEI_TBD 241 241 case SEI::FRAME_FIELD_INFO : return new SEIFrameFieldInfo; 242 #endif 242 243 case SEI::THREE_DIMENSIONAL_REFERENCE_DISPLAYS_INFO: return new SEIThreeDimensionalReferenceDisplaysInfo; 244 #if NH_MV_SEI_TBD 243 245 case SEI::DEPTH_REPRESENTATION_INFO : return new SEIDepthRepresentationInfo; 244 246 #endif … … 976 978 977 979 }; 978 979 Void SEIThreeDimensionalReferenceDisplaysInfo::setupFromSlice ( const TComSlice* slice ) 980 { 981 sei.m_precRefDisplayWidth = TBD ; 982 sei.m_refViewingDistanceFlag = TBD ; 983 if( sei.m_refViewingDistanceFlag ) 984 { 985 sei.m_precRefViewingDist = TBD ; 986 } 987 sei.m_numRefDisplaysMinus1 = TBD ; 988 for( Int i = 0; i <= NumRefDisplaysMinus1( ); i++ ) 989 { 990 sei.m_leftViewId[i] = TBD ; 991 sei.m_rightViewId[i] = TBD ; 992 sei.m_exponentRefDisplayWidth[i] = TBD ; 993 sei.m_mantissaRefDisplayWidth[i] = TBD ; 994 if( sei.m_refViewingDistanceFlag ) 995 { 996 sei.m_exponentRefViewingDistance[i] = TBD ; 997 sei.m_mantissaRefViewingDistance[i] = TBD ; 998 } 999 sei.m_additionalShiftPresentFlag[i] = TBD ; 1000 if( sei.m_additionalShiftPresentFlag( i ) ) 1001 { 1002 sei.m_numSampleShiftPlus512[i] = TBD ; 1003 } 1004 } 1005 sei.m_threeDimensionalReferenceDisplaysExtensionFlag = TBD ; 1006 }; 980 #endif 1007 981 1008 982 Void SEIThreeDimensionalReferenceDisplaysInfo::setupFromCfgFile(const Char* cfgFile) … … 1011 985 IntAry1d defAppLayerIds, defAppPocs, defAppTids, defAppVclNaluTypes; 1012 986 1013 // TBD: Add default values for which layers, POCS, Tids or Nalu types the SEI should be send.1014 defAppLayerIds .push_back( TBD );1015 defAppPocs .push_back( TBD);1016 defAppTids .push_back( TBD);1017 defAppVclNaluTypes .push_back( TBD );987 // Default values for which layers, POCS, Tids or Nalu types the SEI should be sent. 988 defAppLayerIds .push_back( 0 ); 989 defAppPocs .push_back( 0 ); 990 defAppTids .push_back( 0 ); 991 defAppVclNaluTypes = IRAP_NAL_UNIT_TYPES; 1018 992 1019 993 Int defSeiNaluId = 0; 1020 994 Int defPositionInSeiNalu = 0; 1021 Bool defModifyByEncoder = TBD;995 Bool defModifyByEncoder = 0; 1022 996 1023 997 // Setup config file options … … 1048 1022 }; 1049 1023 1024 1025 UInt SEIThreeDimensionalReferenceDisplaysInfo::getMantissaReferenceDisplayWidthLen( Int i ) const 1026 { 1027 return xGetSyntaxElementLen( m_exponentRefDisplayWidth[i], m_precRefDisplayWidth, m_mantissaRefDisplayWidth[ i ] ); 1028 } 1029 1030 UInt SEIThreeDimensionalReferenceDisplaysInfo::getMantissaReferenceViewingDistanceLen( Int i ) const 1031 { 1032 return xGetSyntaxElementLen( m_exponentRefViewingDistance[i], m_precRefViewingDist, m_mantissaRefViewingDistance[ i ] ); 1033 } 1034 1035 UInt SEIThreeDimensionalReferenceDisplaysInfo::xGetSyntaxElementLen( Int expo, Int prec, Int val ) const 1036 { 1037 UInt len; 1038 if( expo == 0 ) 1039 { 1040 len = std::max(0, prec - 30 ); 1041 } 1042 else 1043 { 1044 len = std::max( 0, expo + prec - 31 ); 1045 } 1046 1047 assert( val >= 0 ); 1048 assert( val <= ( ( 1 << len )- 1) ); 1049 return len; 1050 } 1051 1050 1052 Bool SEIThreeDimensionalReferenceDisplaysInfo::checkCfg( const TComSlice* slice ) 1051 1053 { … … 1053 1055 Bool wrongConfig = false; 1054 1056 1055 // TBD: Add constraints on presence of SEI here. 1056 xCheckCfg ( wrongConfig, TBD , "TBD" ); 1057 xCheckCfg ( wrongConfig, TBD , "TBD" ); 1058 1059 // TBD: Modify constraints according to the SEI semantics. 1060 xCheckCfgRange( wrongConfig, m_precRefDisplayWidth , MINVAL , MAXVAL, "prec_ref_display_width" ); 1061 xCheckCfgRange( wrongConfig, m_refViewingDistanceFlag , MINVAL , MAXVAL, "ref_viewing_distance_flag" ); 1062 xCheckCfgRange( wrongConfig, m_precRefViewingDist , MINVAL , MAXVAL, "prec_ref_viewing_dist" ); 1063 xCheckCfgRange( wrongConfig, m_numRefDisplaysMinus1 , MINVAL , MAXVAL, "num_ref_displays_minus1" ); 1064 xCheckCfgRange( wrongConfig, m_leftViewId[i] , MINVAL , MAXVAL, "left_view_id" ); 1065 xCheckCfgRange( wrongConfig, m_rightViewId[i] , MINVAL , MAXVAL, "right_view_id" ); 1066 xCheckCfgRange( wrongConfig, m_exponentRefDisplayWidth[i] , MINVAL , MAXVAL, "exponent_ref_display_width" ); 1067 xCheckCfgRange( wrongConfig, m_mantissaRefDisplayWidth[i] , MINVAL , MAXVAL, "mantissa_ref_display_width" ); 1068 xCheckCfgRange( wrongConfig, m_exponentRefViewingDistance[i] , MINVAL , MAXVAL, "exponent_ref_viewing_distance" ); 1069 xCheckCfgRange( wrongConfig, m_mantissaRefViewingDistance[i] , MINVAL , MAXVAL, "mantissa_ref_viewing_distance" ); 1070 xCheckCfgRange( wrongConfig, m_additionalShiftPresentFlag[i] , MINVAL , MAXVAL, "additional_shift_present_flag" ); 1071 xCheckCfgRange( wrongConfig, m_numSampleShiftPlus512[i] , MINVAL , MAXVAL, "num_sample_shift_plus512" ); 1072 xCheckCfgRange( wrongConfig, m_threeDimensionalReferenceDisplaysExtensionFlag, MINVAL , MAXVAL, "three_dimensional_reference_displays_extension_flag"); 1057 // The 3D reference display SEI should preferably be sent along with the multiview acquisition SEI. For now the multiview acquisition SEI is restricted to POC = 0, so 3D reference displays SEI is restricted to POC = 0 as well. 1058 xCheckCfg ( wrongConfig, slice->isIRAP() && (slice->getPOC() == 0) , "The 3D reference displays SEI message currently is associated with an access unit that contains an IRAP picture." ); 1059 1060 xCheckCfgRange( wrongConfig, m_precRefDisplayWidth , 0 , 31, "prec_ref_display_width" ); 1061 xCheckCfgRange( wrongConfig, m_refViewingDistanceFlag , 0 , 1, "ref_viewing_distance_flag"); 1062 xCheckCfgRange( wrongConfig, m_precRefViewingDist , 0 , 31, "prec_ref_viewing_dist" ); 1063 xCheckCfgRange( wrongConfig, m_numRefDisplaysMinus1 , 0 , 31, "num_ref_displays_minus1" ); 1064 1065 for (Int i = 0; i <= getNumRefDisplaysMinus1(); i++ ) 1066 { 1067 xCheckCfgRange( wrongConfig, m_exponentRefDisplayWidth[i] , 0 , 62, "exponent_ref_display_width" ); 1068 xCheckCfgRange( wrongConfig, m_exponentRefViewingDistance[i] , 0 , 62, "exponent_ref_viewing_distance"); 1069 xCheckCfgRange( wrongConfig, m_additionalShiftPresentFlag[i] , 0 , 1, "additional_shift_present_flag" ); 1070 xCheckCfgRange( wrongConfig, m_numSampleShiftPlus512[i] , 0 , 1023, "num_sample_shift_plus512" ); 1071 } 1072 xCheckCfgRange( wrongConfig, m_threeDimensionalReferenceDisplaysExtensionFlag, 0 , 1, "three_dimensional_reference_displays_extension_flag"); 1073 1073 1074 1074 return wrongConfig; … … 1076 1076 }; 1077 1077 1078 #if NH_MV_SEI_TBD 1078 1079 Void SEIDepthRepresentationInfo::setupFromSlice ( const TComSlice* slice ) 1079 1080 {
Note: See TracChangeset for help on using the changeset viewer.