- Timestamp:
- 1 Oct 2013, 22:08:33 (11 years ago)
- Location:
- branches/SHM-3.1-dev/source/Lib
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-3.1-dev/source/Lib/TLibCommon/TComSlice.cpp
r405 r407 1755 1755 , m_vpsNumRepFormats (1) 1756 1756 #endif 1757 #if VIEW_ID_RELATED_SIGNALING 1758 , m_viewIdLenMinus1 (0) 1759 #endif 1757 1760 { 1758 1761 for( Int i = 0; i < MAX_TLAYER; i++) … … 1832 1835 ::memset( m_vpsRepFormatIdx, 0, sizeof(m_vpsRepFormatIdx) ); 1833 1836 #endif 1837 #if VIEW_ID_RELATED_SIGNALING 1838 ::memset(m_viewIdVal, 0, sizeof(m_viewIdVal)); 1839 #endif 1834 1840 } 1835 1841 … … 1862 1868 setNumLayersInIdList(i, n); 1863 1869 } 1870 } 1871 #endif 1872 #if VIEW_ID_RELATED_SIGNALING 1873 Int TComVPS::getNumViews() 1874 { 1875 Int numViews = 1; 1876 for( Int i = 0; i <= getMaxLayers() - 1; i++ ) 1877 { 1878 Int lId = getLayerIdInNuh( i ); 1879 if ( i > 0 && ( getViewIndex( lId ) != getScalabilityId( i - 1, VIEW_ORDER_INDEX ) ) ) 1880 { 1881 numViews++; 1882 } 1883 } 1884 1885 return numViews; 1886 } 1887 Int TComVPS::getScalabilityId( Int layerIdInVps, ScalabilityType scalType ) 1888 { 1889 return getScalabilityMask( scalType ) ? getDimensionId( layerIdInVps, scalTypeToScalIdx( scalType ) ) : 0; 1890 } 1891 Int TComVPS::scalTypeToScalIdx( ScalabilityType scalType ) 1892 { 1893 assert( scalType >= 0 && scalType <= MAX_VPS_NUM_SCALABILITY_TYPES ); 1894 assert( scalType == MAX_VPS_NUM_SCALABILITY_TYPES || getScalabilityMask( scalType ) ); 1895 Int scalIdx = 0; 1896 for( Int curScalType = 0; curScalType < scalType; curScalType++ ) 1897 { 1898 scalIdx += ( getScalabilityMask( curScalType ) ? 1 : 0 ); 1899 1900 } 1901 1902 return scalIdx; 1864 1903 } 1865 1904 #endif -
branches/SHM-3.1-dev/source/Lib/TLibCommon/TComSlice.h
r399 r407 557 557 Int m_vpsRepFormatIdx[16]; 558 558 #endif 559 #if VIEW_ID_RELATED_SIGNALING 560 Int m_viewIdLenMinus1; 561 Int m_viewIdVal [MAX_LAYERS]; 562 #endif 559 563 public: 560 564 TComVPS(); … … 778 782 Int getVpsRepFormatIdx(Int idx) { return m_vpsRepFormatIdx[idx]; } 779 783 Void setVpsRepFormatIdx(Int idx, Int x) { m_vpsRepFormatIdx[idx] = x; } 784 #endif 785 #if VIEW_ID_RELATED_SIGNALING 786 Void setViewIdLenMinus1( Int val ) { m_viewIdLenMinus1 = val; } 787 Int getViewIdLenMinus1( ) { return m_viewIdLenMinus1; } 788 789 Void setViewIdVal( Int viewOrderIndex, Int val ) { m_viewIdVal[viewOrderIndex] = val; } 790 Int getViewIdVal( Int viewOrderIndex ) { return m_viewIdVal[viewOrderIndex]; } 791 Int getScalabilityId(Int, ScalabilityType scalType ); 792 793 Int getViewIndex ( Int layerIdInNuh ) { return getScalabilityId( getLayerIdInVps(layerIdInNuh), VIEW_ORDER_INDEX ); } 794 795 Int getNumViews(); 796 Int scalTypeToScalIdx( ScalabilityType scalType ); 780 797 #endif 781 798 }; -
branches/SHM-3.1-dev/source/Lib/TLibCommon/TypeDef.h
r405 r407 159 159 160 160 #define FIX1071 1 ///< fix for issue #1071 161 #define VIEW_ID_RELATED_SIGNALING 1 ///< Introduce syntax elements view_id_len_minus1 and view_id_val 161 162 #define M0043_LAYERS_PRESENT_SEI 0 ///< M0043: add layers present SEI. Macro shall be equal to 0 according to the JCTVC-N0174 discussion. The code is to be removed. 162 163 … … 622 623 }; 623 624 } 625 #if VIEW_ID_RELATED_SIGNALING 626 /// scalability types 627 enum ScalabilityType 628 { 629 VIEW_ORDER_INDEX = 1, 630 SCALABILITY_ID = 2, 631 }; 632 #endif 624 633 //! \} 625 634 -
branches/SHM-3.1-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp
r402 r407 975 975 } 976 976 #endif 977 #if VIEW_ID_RELATED_SIGNALING 978 // if ( pcVPS->getNumViews() > 1 ) 979 // However, this is a bug in the text since, view_id_len_minus1 is needed to parse view_id_val. 980 { 981 READ_CODE( 4, uiCode, "view_id_len_minus1" ); vps->setViewIdLenMinus1( uiCode ); 982 } 983 984 for( Int i = 0; i < vps->getNumViews(); i++ ) 985 { 986 READ_CODE( vps->getViewIdLenMinus1( ) + 1, uiCode, "view_id_val[i]" ); vps->setViewIdVal( i, uiCode ); 987 } 988 #endif 977 989 #if VPS_MOVE_DIR_DEPENDENCY_FLAG 978 990 #if VPS_EXTN_DIRECT_REF_LAYERS -
branches/SHM-3.1-dev/source/Lib/TLibEncoder/TEncCavlc.cpp
r402 r407 770 770 } 771 771 #endif 772 #if VIEW_ID_RELATED_SIGNALING 773 // if ( pcVPS->getNumViews() > 1 ) 774 // However, this is a bug in the text since, view_id_len_minus1 is needed to parse view_id_val. 775 { 776 WRITE_CODE( vps->getViewIdLenMinus1( ), 4, "view_id_len_minus1" ); 777 } 778 779 for( Int i = 0; i < vps->getNumViews(); i++ ) 780 { 781 WRITE_CODE( vps->getViewIdVal( i ), vps->getViewIdLenMinus1( ) + 1, "view_id_val[i]" ); 782 } 783 #endif 772 784 #if VPS_MOVE_DIR_DEPENDENCY_FLAG 773 785 #if VPS_EXTN_DIRECT_REF_LAYERS
Note: See TracChangeset for help on using the changeset viewer.