Changeset 1337 in 3DVCSoftware
- Timestamp:
- 23 Sep 2015, 18:32:42 (9 years ago)
- Location:
- branches/HTM-15.1-dev0-Ericsson
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-15.1-dev0-Ericsson/cfg/SEI/threeDimensionalReferenceDisplaysInfoSei.cfg
r1328 r1337 1 1 2 PayloadType : TBD2 PayloadType : 176 3 3 4 4 #======== Applicability ========== ( SEI is only send for pictures in intersection ) 5 ApplicableLayerIds : TBD# LayerIds of layers to which the SEI is added. (all when empty)6 ApplicablePocs : TBD# POCs of pictures to which the SEI is added. (all when empty)7 ApplicableTids : TBD# Tids of pictures to which the SEI is added. (all when empty)8 ApplicableVclNaluTypes : TBD# NaluUnitTypes of picture to which the SEI is added. (all when empty)5 ApplicableLayerIds : 0 # LayerIds of layers to which the SEI is added. (all when empty) 6 ApplicablePocs : 0 # POCs of pictures to which the SEI is added. (all when empty) 7 ApplicableTids : 0 # Tids of pictures to which the SEI is added. (all when empty) 8 ApplicableVclNaluTypes : 19 20 # NaluUnitTypes of picture to which the SEI is added. (all when empty) 9 9 10 10 #======== Position in bit stream ============ … … 13 13 14 14 #======== Payload modification ============= 15 ModifyByEncoder : TBD# 0: Use payload as specified in cfg file 1: Modify SEI by encoder.15 ModifyByEncoder : 0 # 0: Use payload as specified in cfg file 1: Modify SEI by encoder. 16 16 17 17 #======== Payload specification ============= 18 PrecRefDisplayWidth : 019 RefViewingDistanceFlag : 020 PrecRefViewingDist : 018 PrecRefDisplayWidth : 2 19 RefViewingDistanceFlag : 1 20 PrecRefViewingDist : 1 21 21 NumRefDisplaysMinus1 : 0 22 LeftViewId : 023 RightViewId : 024 ExponentRefDisplayWidth : 025 MantissaRefDisplayWidth : 026 ExponentRefViewingDistance : 027 MantissaRefViewingDistance : 028 AdditionalShiftPresentFlag : 029 NumSampleShiftPlus512 : 022 LeftViewId : 3 23 RightViewId : 1 24 ExponentRefDisplayWidth : 36 25 MantissaRefDisplayWidth : 68 26 ExponentRefViewingDistance : 37 27 MantissaRefViewingDistance : 94 28 AdditionalShiftPresentFlag : 1 29 NumSampleShiftPlus512 : 482 30 30 ThreeDimensionalReferenceDisplaysExtensionFlag: 0 -
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 { -
branches/HTM-15.1-dev0-Ericsson/source/Lib/TLibCommon/SEI.h
r1334 r1337 873 873 Bool m_ffinfoDuplicateFlag; 874 874 }; 875 #endif 875 876 876 877 class SEIThreeDimensionalReferenceDisplaysInfo : public SEI … … 883 884 884 885 Void setupFromCfgFile( const Char* cfgFile ); 885 Void setupFromSlice ( const TComSlice* slice ); 886 Bool checkCfg ( const TComSlice* slice ); 886 Bool checkCfg ( const TComSlice* slice ); 887 888 Int getNumRefDisplaysMinus1( ) const 889 { 890 return m_numRefDisplaysMinus1; 891 } 887 892 888 893 Int m_precRefDisplayWidth; … … 899 904 IntAry1d m_numSampleShiftPlus512; 900 905 Bool m_threeDimensionalReferenceDisplaysExtensionFlag; 901 }; 902 906 907 Void resizeArrays( ) 908 { 909 Int numReferenceDiaplays = getNumRefDisplaysMinus1() + 1; 910 911 m_leftViewId .resize( numReferenceDiaplays ); 912 m_rightViewId .resize( numReferenceDiaplays ); 913 m_exponentRefDisplayWidth .resize( numReferenceDiaplays ); 914 m_mantissaRefDisplayWidth .resize( numReferenceDiaplays ); 915 m_exponentRefViewingDistance .resize( numReferenceDiaplays ); 916 m_mantissaRefViewingDistance .resize( numReferenceDiaplays ); 917 m_additionalShiftPresentFlag .resize( numReferenceDiaplays ); 918 m_numSampleShiftPlus512 .resize( numReferenceDiaplays ); 919 } 920 921 UInt getMantissaReferenceDisplayWidthLen ( Int i ) const ; 922 UInt getMantissaReferenceViewingDistanceLen ( Int i ) const ; 923 private: 924 UInt xGetSyntaxElementLen( Int expo, Int prec, Int val ) const; 925 }; 926 927 #if NH_MV_SEI_TBD 903 928 class SEIDepthRepresentationInfo : public SEI 904 929 { -
branches/HTM-15.1-dev0-Ericsson/source/Lib/TLibDecoder/SEIread.cpp
r1334 r1337 355 355 xParseSEIFrameFieldInfo((SEIFrameFieldInfo&) *sei, payloadSize, pDecodedMessageOutputStream ); 356 356 break; 357 #endif 357 358 case SEI::THREE_DIMENSIONAL_REFERENCE_DISPLAYS_INFO: 358 359 sei = new SEIThreeDimensionalReferenceDisplaysInfo; 359 360 xParseSEIThreeDimensionalReferenceDisplaysInfo((SEIThreeDimensionalReferenceDisplaysInfo&) *sei, payloadSize, pDecodedMessageOutputStream ); 360 361 break; 362 #if NH_MV_SEI_TBD 361 363 case SEI::DEPTH_REPRESENTATION_INFO: 362 364 sei = new SEIDepthRepresentationInfo; … … 1437 1439 sei_read_flag( pDecodedMessageOutputStream, code, "ffinfo_duplicate_flag" ); sei.m_ffinfoDuplicateFlag = (code == 1); 1438 1440 }; 1441 #endif 1439 1442 1440 1443 Void SEIReader::xParseSEIThreeDimensionalReferenceDisplaysInfo(SEIThreeDimensionalReferenceDisplaysInfo& sei, UInt payloadSize, std::ostream *pDecodedMessageOutputStream) … … 1450 1453 } 1451 1454 sei_read_uvlc( pDecodedMessageOutputStream, code, "num_ref_displays_minus1" ); sei.m_numRefDisplaysMinus1 = code; 1452 for( Int i = 0; i <= NumRefDisplaysMinus1( ); i++ ) 1455 sei.resizeArrays( ); 1456 for( Int i = 0; i <= sei.getNumRefDisplaysMinus1( ); i++ ) 1453 1457 { 1454 1458 sei_read_uvlc( pDecodedMessageOutputStream, code, "left_view_id" ); sei.m_leftViewId[i] = code; 1455 1459 sei_read_uvlc( pDecodedMessageOutputStream, code, "right_view_id" ); sei.m_rightViewId[i] = code; 1456 1460 sei_read_code( pDecodedMessageOutputStream, 6, code, "exponent_ref_display_width" ); sei.m_exponentRefDisplayWidth[i] = code; 1457 sei_read_code( pDecodedMessageOutputStream, getMantissaRefDisplayWidthLen ), code, "mantissa_ref_display_width" ); sei.m_mantissaRefDisplayWidth[i] = code;1461 sei_read_code( pDecodedMessageOutputStream, sei.getMantissaReferenceDisplayWidthLen(i), code, "mantissa_ref_display_width" ); sei.m_mantissaRefDisplayWidth[i] = code ; 1458 1462 if( sei.m_refViewingDistanceFlag ) 1459 1463 { 1460 1464 sei_read_code( pDecodedMessageOutputStream, 6, code, "exponent_ref_viewing_distance" ); sei.m_exponentRefViewingDistance[i] = code; 1461 sei_read_code( pDecodedMessageOutputStream, getMantissaRefViewingDistanceLen), code, "mantissa_ref_viewing_distance" ); sei.m_mantissaRefViewingDistance[i] = code;1465 sei_read_code( pDecodedMessageOutputStream, sei.getMantissaReferenceViewingDistanceLen(i), code, "mantissa_ref_viewing_distance" ); sei.m_mantissaRefViewingDistance[i] = code; 1462 1466 } 1463 1467 sei_read_flag( pDecodedMessageOutputStream, code, "additional_shift_present_flag" ); sei.m_additionalShiftPresentFlag[i] = (code == 1); 1464 if( sei.m_additionalShiftPresentFlag ( i ))1468 if( sei.m_additionalShiftPresentFlag[i] ) 1465 1469 { 1466 1470 sei_read_code( pDecodedMessageOutputStream, 10, code, "num_sample_shift_plus512" ); sei.m_numSampleShiftPlus512[i] = code; … … 1470 1474 }; 1471 1475 1476 #if NH_MV_SEI_TBD 1472 1477 Void SEIReader::xParseSEIDepthRepresentationInfo(SEIDepthRepresentationInfo& sei, UInt payloadSize, std::ostream *pDecodedMessageOutputStream) 1473 1478 { -
branches/HTM-15.1-dev0-Ericsson/source/Lib/TLibDecoder/SEIread.h
r1334 r1337 118 118 #if NH_MV_SEI_TBD 119 119 Void xParseSEIFrameFieldInfo (SEIFrameFieldInfo& sei, UInt payloadSize, std::ostream *pDecodedMessageOutputStream); 120 #endif 120 121 Void xParseSEIThreeDimensionalReferenceDisplaysInfo (SEIThreeDimensionalReferenceDisplaysInfo& sei, UInt payloadSize, std::ostream *pDecodedMessageOutputStream); 122 #if NH_MV_SEI_TBD 121 123 Void xParseSEIDepthRepresentationInfo (SEIDepthRepresentationInfo& sei, UInt payloadSize, std::ostream *pDecodedMessageOutputStream); 122 124 -
branches/HTM-15.1-dev0-Ericsson/source/Lib/TLibEncoder/SEIwrite.cpp
r1334 r1337 163 163 xWriteSEIFrameFieldInfo(*static_cast<const SEIFrameFieldInfo*>(&sei)); 164 164 break; 165 #endif 165 166 case SEI::THREE_DIMENSIONAL_REFERENCE_DISPLAYS_INFO: 166 167 xWriteSEIThreeDimensionalReferenceDisplaysInfo(*static_cast<const SEIThreeDimensionalReferenceDisplaysInfo*>(&sei)); 167 168 break; 169 #if NH_MV_SEI_TBD 168 170 case SEI::DEPTH_REPRESENTATION_INFO: 169 171 xWriteSEIDepthRepresentationInfo(*static_cast<const SEIDepthRepresentationInfo*>(&sei)); … … 1069 1071 WRITE_FLAG( ( sei.m_ffinfoDuplicateFlag ? 1 : 0 ), "ffinfo_duplicate_flag" ); 1070 1072 }; 1073 #endif 1071 1074 1072 1075 Void SEIWriter::xWriteSEIThreeDimensionalReferenceDisplaysInfo( const SEIThreeDimensionalReferenceDisplaysInfo& sei) … … 1079 1082 } 1080 1083 WRITE_UVLC( sei.m_numRefDisplaysMinus1, "num_ref_displays_minus1" ); 1081 for( Int i = 0; i <= NumRefDisplaysMinus1( ); i++ )1084 for( Int i = 0; i <= sei.getNumRefDisplaysMinus1( ); i++ ) 1082 1085 { 1083 1086 WRITE_UVLC( sei.m_leftViewId[i], "left_view_id" ); 1084 1087 WRITE_UVLC( sei.m_rightViewId[i], "right_view_id" ); 1085 1088 WRITE_CODE( sei.m_exponentRefDisplayWidth[i], 6, "exponent_ref_display_width" ); 1086 WRITE_CODE( sei.m_mantissaRefDisplayWidth[i], getMantissaRefDisplayWidthLen ), "mantissa_ref_display_width" );1089 WRITE_CODE( sei.m_mantissaRefDisplayWidth[i], sei.getMantissaReferenceDisplayWidthLen(i) , "mantissa_ref_display_width" ); 1087 1090 if( sei.m_refViewingDistanceFlag ) 1088 1091 { 1089 1092 WRITE_CODE( sei.m_exponentRefViewingDistance[i], 6, "exponent_ref_viewing_distance" ); 1090 WRITE_CODE( sei.m_mantissaRefViewingDistance[i], getMantissaRefViewingDistanceLen), "mantissa_ref_viewing_distance" );1093 WRITE_CODE( sei.m_mantissaRefViewingDistance[i], sei.getMantissaReferenceViewingDistanceLen(i), "mantissa_ref_viewing_distance" ); 1091 1094 } 1092 1095 WRITE_FLAG( ( sei.m_additionalShiftPresentFlag[i] ? 1 : 0 ), "additional_shift_present_flag" ); 1093 if( sei.m_additionalShiftPresentFlag ( i ))1096 if( sei.m_additionalShiftPresentFlag[i] ) 1094 1097 { 1095 1098 WRITE_CODE( sei.m_numSampleShiftPlus512[i], 10, "num_sample_shift_plus512" ); … … 1099 1102 }; 1100 1103 1104 #if NH_MV_SEI_TBD 1101 1105 Void SEIWriter::xWriteSEIDepthRepresentationInfo( const SEIDepthRepresentationInfo& sei) 1102 1106 { -
branches/HTM-15.1-dev0-Ericsson/source/Lib/TLibEncoder/SEIwrite.h
r1334 r1337 100 100 #if NH_MV_SEI_TBD 101 101 Void xWriteSEIFrameFieldInfo ( const SEIFrameFieldInfo& sei); 102 #endif 102 103 Void xWriteSEIThreeDimensionalReferenceDisplaysInfo ( const SEIThreeDimensionalReferenceDisplaysInfo& sei); 104 #if NH_MV_SEI_TBD 103 105 Void xWriteSEIDepthRepresentationInfo ( const SEIDepthRepresentationInfo& sei); 104 106 Void xWriteSEIDepthRepInfoElement ( const SEIDepthRepInfoElement& sei);
Note: See TracChangeset for help on using the changeset viewer.