- Timestamp:
- 22 Sep 2015, 23:25:33 (9 years ago)
- Location:
- branches/HTM-15.1-dev0-BBC/source/Lib
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-15.1-dev0-BBC/source/Lib/TLibCommon/SEI.cpp
r1332 r1334 233 233 #endif 234 234 case SEI::SUB_BITSTREAM_PROPERTY : return new SEISubBitstreamProperty; 235 case SEI::ALPHA_CHANNEL_INFO : return new SEIAlphaChannelInfo; 235 236 #if NH_MV_SEI_TBD 236 case SEI::ALPHA_CHANNEL_INFO : return new SEIAlphaChannelInfo;237 237 case SEI::OVERLAY_INFO : return new SEIOverlayInfo; 238 238 #endif … … 682 682 } 683 683 684 #if NH_MV_SEI_TBD685 686 Void SEIAlphaChannelInfo::setupFromSlice ( const TComSlice* slice )687 {688 sei.m_alphaChannelCancelFlag = TBD ;689 if( !sei.m_alphaChannelCancelFlag )690 {691 sei.m_alphaChannelUseIdc = TBD ;692 sei.m_alphaChannelBitDepthMinus8 = TBD ;693 sei.m_alphaTransparentValue = TBD ;694 sei.m_alphaOpaqueValue = TBD ;695 sei.m_alphaChannelIncrFlag = TBD ;696 sei.m_alphaChannelClipFlag = TBD ;697 if( sei.m_alphaChannelClipFlag )698 {699 sei.m_alphaChannelClipTypeFlag = TBD ;700 }701 }702 };703 704 684 Void SEIAlphaChannelInfo::setupFromCfgFile(const Char* cfgFile) 705 685 { … … 708 688 709 689 // TBD: Add default values for which layers, POCS, Tids or Nalu types the SEI should be send. 710 defAppLayerIds .push_back( TBD);711 defAppPocs .push_back( TBD);712 defAppTids .push_back( TBD);713 defAppVclNaluTypes.push_back( TBD);690 defAppLayerIds .push_back( 0 ); 691 defAppPocs .push_back( 0 ); 692 defAppTids .push_back( 0 ); 693 defAppVclNaluTypes.push_back( 0 ); 714 694 715 695 Int defSeiNaluId = 0; 716 696 Int defPositionInSeiNalu = 0; 717 Bool defModifyByEncoder = TBD;697 Bool defModifyByEncoder = false; 718 698 719 699 // Setup config file options … … 726 706 ("AlphaChannelBitDepthMinus8" , m_alphaChannelBitDepthMinus8 , 0 , "AlphaChannelBitDepthMinus8" ) 727 707 ("AlphaTransparentValue" , m_alphaTransparentValue , 0 , "AlphaTransparentValue" ) 728 ("AlphaOpaqueValue" , m_alphaOpaqueValue , 0, "AlphaOpaqueValue" )708 ("AlphaOpaqueValue" , m_alphaOpaqueValue , 255 , "AlphaOpaqueValue" ) 729 709 ("AlphaChannelIncrFlag" , m_alphaChannelIncrFlag , false , "AlphaChannelIncrFlag" ) 730 710 ("AlphaChannelClipFlag" , m_alphaChannelClipFlag , false , "AlphaChannelClipFlag" ) … … 745 725 Bool wrongConfig = false; 746 726 747 // TBD: Add constraints on presence of SEI here. 748 xCheckCfg ( wrongConfig, TBD , "TBD" ); 749 xCheckCfg ( wrongConfig, TBD , "TBD" ); 750 751 // TBD: Modify constraints according to the SEI semantics. 752 xCheckCfgRange( wrongConfig, m_alphaChannelCancelFlag , MINVAL , MAXVAL, "alpha_channel_cancel_flag" ); 753 xCheckCfgRange( wrongConfig, m_alphaChannelUseIdc , MINVAL , MAXVAL, "alpha_channel_use_idc"); 754 xCheckCfgRange( wrongConfig, m_alphaChannelBitDepthMinus8 , MINVAL , MAXVAL, "alpha_channel_bit_depth_minus8" ); 755 xCheckCfgRange( wrongConfig, m_alphaTransparentValue , MINVAL , MAXVAL, "alpha_transparent_value" ); 756 xCheckCfgRange( wrongConfig, m_alphaOpaqueValue , MINVAL , MAXVAL, "alpha_opaque_value" ); 757 xCheckCfgRange( wrongConfig, m_alphaChannelIncrFlag , MINVAL , MAXVAL, "alpha_channel_incr_flag" ); 758 xCheckCfgRange( wrongConfig, m_alphaChannelClipFlag , MINVAL , MAXVAL, "alpha_channel_clip_flag" ); 759 xCheckCfgRange( wrongConfig, m_alphaChannelClipTypeFlag , MINVAL , MAXVAL, "alpha_channel_clip_type_flag" ); 727 int maxInterpretationValue = (1 << (m_alphaChannelBitDepthMinus8+9)) - 1; 728 xCheckCfgRange( wrongConfig, m_alphaChannelCancelFlag , 0 , 1, "alpha_channel_cancel_flag" ); 729 xCheckCfgRange( wrongConfig, m_alphaChannelUseIdc , 0 , 7, "alpha_channel_use_idc"); 730 xCheckCfgRange( wrongConfig, m_alphaChannelBitDepthMinus8 , 0 , 7, "alpha_channel_bit_depth_minus8" ); 731 xCheckCfgRange( wrongConfig, m_alphaTransparentValue , 0 , maxInterpretationValue, "alpha_transparent_value" ); 732 xCheckCfgRange( wrongConfig, m_alphaOpaqueValue , 0 , maxInterpretationValue, "alpha_opaque_value" ); 733 xCheckCfgRange( wrongConfig, m_alphaChannelIncrFlag , 0 , 1, "alpha_channel_incr_flag" ); 734 xCheckCfgRange( wrongConfig, m_alphaChannelClipFlag , 0 , 1, "alpha_channel_clip_flag" ); 735 xCheckCfgRange( wrongConfig, m_alphaChannelClipTypeFlag , 0 , 1, "alpha_channel_clip_type_flag" ); 760 736 761 737 return wrongConfig; 762 738 763 739 }; 764 740 #if NH_MV_SEI_TBD 765 741 Void SEIOverlayInfo::setupFromSlice ( const TComSlice* slice ) 766 742 { -
branches/HTM-15.1-dev0-BBC/source/Lib/TLibCommon/SEI.h
r1332 r1334 782 782 }; 783 783 784 #if NH_MV_SEI_TBD785 784 class SEIAlphaChannelInfo : public SEI 786 785 { … … 792 791 793 792 Void setupFromCfgFile( const Char* cfgFile ); 794 Void setupFromSlice ( const TComSlice* slice );795 793 Bool checkCfg ( const TComSlice* slice ); 796 794 … … 805 803 }; 806 804 805 #if NH_MV_SEI_TBD 807 806 class SEIOverlayInfo : public SEI 808 807 { -
branches/HTM-15.1-dev0-BBC/source/Lib/TLibDecoder/SEIread.cpp
r1332 r1334 336 336 xParseSEISubBitstreamProperty((SEISubBitstreamProperty&) *sei, payloadSize, pDecodedMessageOutputStream ); 337 337 break; 338 #if NH_MV_SEI_TBD339 338 case SEI::ALPHA_CHANNEL_INFO: 340 339 sei = new SEIAlphaChannelInfo; 341 340 xParseSEIAlphaChannelInfo((SEIAlphaChannelInfo&) *sei, payloadSize, pDecodedMessageOutputStream ); 342 341 break; 342 #if NH_MV_SEI_TBD 343 343 case SEI::OVERLAY_INFO: 344 344 sei = new SEIOverlayInfo; … … 1334 1334 }; 1335 1335 1336 #if NH_MV_SEI_TBD1337 1336 Void SEIReader::xParseSEIAlphaChannelInfo(SEIAlphaChannelInfo& sei, UInt payloadSize, std::ostream *pDecodedMessageOutputStream) 1338 1337 { … … 1345 1344 sei_read_code( pDecodedMessageOutputStream, 3, code, "alpha_channel_use_idc" ); sei.m_alphaChannelUseIdc = code; 1346 1345 sei_read_code( pDecodedMessageOutputStream, 3, code, "alpha_channel_bit_depth_minus8" ); sei.m_alphaChannelBitDepthMinus8 = code; 1347 sei_read_code( pDecodedMessageOutputStream, getAlphaTransparentValueLen ), code, "alpha_transparent_value" ); sei.m_alphaTransparentValue = code;1348 sei_read_code( pDecodedMessageOutputStream, getAlphaOpaqueValueLen ), code, "alpha_opaque_value" ); sei.m_alphaOpaqueValue = code;1346 sei_read_code( pDecodedMessageOutputStream, sei.m_alphaChannelBitDepthMinus8+9, code, "alpha_transparent_value" ); sei.m_alphaTransparentValue = code; 1347 sei_read_code( pDecodedMessageOutputStream, sei.m_alphaChannelBitDepthMinus8+9, code, "alpha_opaque_value" ); sei.m_alphaOpaqueValue = code; 1349 1348 sei_read_flag( pDecodedMessageOutputStream, code, "alpha_channel_incr_flag" ); sei.m_alphaChannelIncrFlag = (code == 1); 1350 1349 sei_read_flag( pDecodedMessageOutputStream, code, "alpha_channel_clip_flag" ); sei.m_alphaChannelClipFlag = (code == 1); … … 1356 1355 }; 1357 1356 1357 #if NH_MV_SEI_TBD 1358 1358 Void SEIReader::xParseSEIOverlayInfo(SEIOverlayInfo& sei, UInt payloadSize, std::ostream *pDecodedMessageOutputStream) 1359 1359 { -
branches/HTM-15.1-dev0-BBC/source/Lib/TLibDecoder/SEIread.h
r1331 r1334 111 111 #endif 112 112 Void xParseSEISubBitstreamProperty (SEISubBitstreamProperty& sei, UInt payloadSize, std::ostream *pDecodedMessageOutputStream); 113 Void xParseSEIAlphaChannelInfo (SEIAlphaChannelInfo& sei, UInt payloadSize, std::ostream *pDecodedMessageOutputStream); 113 114 #if NH_MV_SEI_TBD 114 Void xParseSEIAlphaChannelInfo (SEIAlphaChannelInfo& sei, UInt payloadSize, std::ostream *pDecodedMessageOutputStream);115 115 Void xParseSEIOverlayInfo (SEIOverlayInfo& sei, UInt payloadSize, std::ostream *pDecodedMessageOutputStream); 116 116 #endif -
branches/HTM-15.1-dev0-BBC/source/Lib/TLibEncoder/SEIwrite.cpp
r1331 r1334 148 148 xWriteSEISubBitstreamProperty(*static_cast<const SEISubBitstreamProperty*>(&sei)); 149 149 break; 150 #if NH_MV_SEI_TBD151 150 case SEI::ALPHA_CHANNEL_INFO: 152 151 xWriteSEIAlphaChannelInfo(*static_cast<const SEIAlphaChannelInfo*>(&sei)); 153 break; 152 break; 153 #if NH_MV_SEI_TBD 154 154 case SEI::OVERLAY_INFO: 155 155 xWriteSEIOverlayInfo(*static_cast<const SEIOverlayInfo*>(&sei)); … … 977 977 } 978 978 }; 979 #if NH_MV_SEI_TBD 979 980 980 Void SEIWriter::xWriteSEIAlphaChannelInfo( const SEIAlphaChannelInfo& sei) 981 981 { … … 985 985 WRITE_CODE( sei.m_alphaChannelUseIdc, 3, "alpha_channel_use_idc" ); 986 986 WRITE_CODE( sei.m_alphaChannelBitDepthMinus8, 3, "alpha_channel_bit_depth_minus8" ); 987 WRITE_CODE( sei.m_alphaTransparentValue, getAlphaTransparentValueLen ), "alpha_transparent_value" );988 WRITE_CODE( sei.m_alphaOpaqueValue, getAlphaOpaqueValueLen ), "alpha_opaque_value" );987 WRITE_CODE( sei.m_alphaTransparentValue, sei.m_alphaChannelBitDepthMinus8+9, "alpha_transparent_value" ); 988 WRITE_CODE( sei.m_alphaOpaqueValue, sei.m_alphaChannelBitDepthMinus8+9, "alpha_opaque_value" ); 989 989 WRITE_FLAG( ( sei.m_alphaChannelIncrFlag ? 1 : 0 ), "alpha_channel_incr_flag" ); 990 990 WRITE_FLAG( ( sei.m_alphaChannelClipFlag ? 1 : 0 ), "alpha_channel_clip_flag" ); … … 996 996 }; 997 997 998 #if NH_MV_SEI_TBD 998 999 Void SEIWriter::xWriteSEIOverlayInfo( const SEIOverlayInfo& sei) 999 1000 { -
branches/HTM-15.1-dev0-BBC/source/Lib/TLibEncoder/SEIwrite.h
r1331 r1334 93 93 #endif 94 94 Void xWriteSEISubBitstreamProperty ( const SEISubBitstreamProperty& sei); 95 Void xWriteSEIAlphaChannelInfo ( const SEIAlphaChannelInfo& sei); 95 96 #if NH_MV_SEI_TBD 96 Void xWriteSEIAlphaChannelInfo ( const SEIAlphaChannelInfo& sei);97 97 Void xWriteSEIOverlayInfo ( const SEIOverlayInfo& sei); 98 98 #endif
Note: See TracChangeset for help on using the changeset viewer.