Changeset 755 in 3DVCSoftware for branches/HTM-9.1-dev0-MediaTek
- Timestamp:
- 27 Dec 2013, 10:54:03 (11 years ago)
- Location:
- branches/HTM-9.1-dev0-MediaTek
- Files:
-
- 2 added
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-9.1-dev0-MediaTek/source/App/TAppEncoder/TAppEncTop.cpp
r753 r755 76 76 #endif 77 77 78 #if CAM_HLS_F0136_F0045_F0082 79 vps.createCamPars(m_iNumberOfViews); 80 #endif 81 78 82 #if DLT_DIFF_CODING_IN_PPS 79 83 TComDLT& dlt = m_dlt; … … 792 796 Void TAppEncTop::xInitLib(Bool isFieldCoding) 793 797 { 798 #if CAM_HLS_F0136_F0045_F0082 799 for ( Int viewIndex = 0; viewIndex < m_vps.getNumViews(); viewIndex++ ) 800 { 801 m_vps.initCamParaVPS( viewIndex, true, m_cCameraData.getCamParsCodedPrecision(), 802 m_cCameraData.getVaryingCameraParameters(), m_cCameraData.getCodedScale(), m_cCameraData.getCodedOffset() ); 803 } 804 #endif 805 794 806 #if H_MV 795 807 for(Int layer=0; layer<m_numberOfLayers; layer++) -
branches/HTM-9.1-dev0-MediaTek/source/Lib/TLibCommon/TComSlice.cpp
r753 r755 782 782 Void TComSlice::setCamparaSlice( Int** aaiScale, Int** aaiOffset ) 783 783 { 784 #if CAM_HLS_F0136_F0045_F0082 785 if( m_pcVPS->hasCamParInSliceHeader( m_viewIndex ) ) 786 #else 784 787 if( m_pcSPS->hasCamParInSliceHeader() ) 788 #endif 785 789 { 786 790 for( UInt uiBaseViewIndex = 0; uiBaseViewIndex < m_viewIndex; uiBaseViewIndex++ ) … … 1920 1924 } 1921 1925 #endif 1926 #if CAM_HLS_F0136_F0045_F0082 1927 deleteCamPars(); 1928 #endif 1922 1929 } 1923 1930 … … 2072 2079 return foundLayerIdinNuh; 2073 2080 } 2081 #if CAM_HLS_F0136_F0045_F0082 2082 Void TComVPS::createCamPars(Int iNumViews) 2083 { 2084 Int i = 0, j = 0; 2085 2086 m_bCamParPresent = new Bool[ iNumViews ]; 2087 m_bCamParInSliceHeader = new Bool[ iNumViews ]; 2088 2089 m_aaaiCodedScale = new Int**[ iNumViews ]; 2090 m_aaaiCodedOffset = new Int**[ iNumViews ]; 2091 for ( i = 0; i < iNumViews ; i++ ) 2092 { 2093 m_aaaiCodedScale[i] = new Int*[ 2 ]; 2094 m_aaaiCodedOffset[i] = new Int*[ 2 ]; 2095 for ( j = 0; j < 2; j++ ) 2096 { 2097 m_aaaiCodedScale[i][j] = new Int[ MAX_NUM_LAYERS ]; 2098 m_aaaiCodedOffset[i][j] = new Int[ MAX_NUM_LAYERS ]; 2099 for ( Int k = 0; k < MAX_NUM_LAYERS; k++ ) 2100 { 2101 m_aaaiCodedScale[i][j][k] = 0; 2102 m_aaaiCodedOffset[i][j][k] = 0; 2103 } 2104 } 2105 } 2106 } 2107 2108 Void TComVPS::deleteCamPars() 2109 { 2110 Int iNumViews = getNumViews(); 2111 Int i = 0, j = 0; 2112 2113 if ( m_bCamParPresent != NULL ) 2114 { 2115 delete [] m_bCamParPresent; 2116 } 2117 if ( m_bCamParInSliceHeader != NULL ) 2118 { 2119 delete [] m_bCamParInSliceHeader; 2120 } 2121 2122 if ( m_aaaiCodedScale != NULL ) 2123 { 2124 for ( i = 0; i < iNumViews ; i++ ) 2125 { 2126 for ( j = 0; j < 2; j++ ) 2127 { 2128 delete [] m_aaaiCodedScale[i][j]; 2129 } 2130 delete [] m_aaaiCodedScale[i]; 2131 } 2132 delete [] m_aaaiCodedScale; 2133 } 2134 2135 if ( m_aaaiCodedOffset != NULL ) 2136 { 2137 for ( i = 0; i < iNumViews ; i++ ) 2138 { 2139 for ( j = 0; j < 2; j++ ) 2140 { 2141 delete [] m_aaaiCodedOffset[i][j]; 2142 } 2143 delete [] m_aaaiCodedOffset[i]; 2144 } 2145 delete [] m_aaaiCodedOffset; 2146 } 2147 } 2148 2149 2150 Void 2151 TComVPS::initCamParaVPS( UInt uiViewIndex, Bool bCamParPresent, UInt uiCamParPrecision, Bool bCamParSlice, Int** aaiScale, Int** aaiOffset ) 2152 { 2153 AOT( uiViewIndex != 0 && !bCamParSlice && ( aaiScale == 0 || aaiOffset == 0 ) ); 2154 2155 m_uiCamParPrecision = ( ( uiViewIndex != 0 )? uiCamParPrecision : 0 ); 2156 m_bCamParPresent[ uiViewIndex ] = (( uiViewIndex != 0 )? bCamParPresent : false ); 2157 m_bCamParInSliceHeader[ uiViewIndex ] = ( (uiViewIndex != 0)? bCamParSlice : false ); 2158 2159 if( !m_bCamParInSliceHeader[ uiViewIndex ] ) 2160 { 2161 for( UInt uiBaseViewIndex = 0; uiBaseViewIndex < uiViewIndex; uiBaseViewIndex++ ) 2162 { 2163 m_aaaiCodedScale [ uiViewIndex ][ 0 ][ uiBaseViewIndex ] = aaiScale [ uiBaseViewIndex ][ uiViewIndex ]; 2164 m_aaaiCodedScale [ uiViewIndex ][ 1 ][ uiBaseViewIndex ] = aaiScale [ uiViewIndex ][ uiBaseViewIndex ]; 2165 m_aaaiCodedOffset[ uiViewIndex ][ 0 ][ uiBaseViewIndex ] = aaiOffset[ uiBaseViewIndex ][ uiViewIndex ]; 2166 m_aaaiCodedOffset[ uiViewIndex ][ 1 ][ uiBaseViewIndex ] = aaiOffset[ uiViewIndex ][ uiBaseViewIndex ]; 2167 } 2168 } 2169 } 2170 #endif // CAM_HLS_F0136_F0045_F0082 2171 2074 2172 #endif // H_3D 2075 2173 … … 2711 2809 #endif 2712 2810 #if H_3D 2811 #if !CAM_HLS_F0136_F0045_F0082 2713 2812 Void 2714 2813 TComSPS::initCamParaSPS( UInt uiViewIndex, UInt uiCamParPrecision, Bool bCamParSlice, Int** aaiScale, Int** aaiOffset ) … … 2732 2831 } 2733 2832 } 2833 #endif 2734 2834 #endif 2735 2835 TComReferencePictureSet::TComReferencePictureSet() … … 3443 3543 assert( m_depthToDisparityF != NULL ); 3444 3544 3545 #if CAM_HLS_F0136_F0045_F0082 3546 TComVPS* vps = getVPS(); 3547 #else 3445 3548 TComSPS* sps = getSPS(); 3446 3549 #endif 3550 3551 #if CAM_HLS_F0136_F0045_F0082 3552 Int log2Div = g_bitDepthY - 1 + vps->getCamParPrecision(); 3553 Int viewIndex = getViewIndex(); 3554 3555 Bool camParaSH = vps->hasCamParInSliceHeader( viewIndex ); 3556 3557 Int* codScale = camParaSH ? m_aaiCodedScale [ 0 ] : vps->getCodedScale ( viewIndex ); 3558 Int* codOffset = camParaSH ? m_aaiCodedOffset[ 0 ] : vps->getCodedOffset ( viewIndex ); 3559 Int* invCodScale = camParaSH ? m_aaiCodedScale [ 1 ] : vps->getInvCodedScale ( viewIndex ); 3560 Int* invCodOffset = camParaSH ? m_aaiCodedOffset[ 1 ] : vps->getInvCodedOffset( viewIndex ); 3561 #else 3447 3562 Int log2Div = g_bitDepthY - 1 + sps->getCamParPrecision(); 3448 3563 … … 3453 3568 Int* invCodScale = camParaSH ? m_aaiCodedScale [ 1 ] : sps->getInvCodedScale (); 3454 3569 Int* invCodOffset = camParaSH ? m_aaiCodedOffset[ 1 ] : sps->getInvCodedOffset(); 3570 #endif 3455 3571 3456 3572 for (Int i = 0; i <= ( getViewIndex() - 1); i++) -
branches/HTM-9.1-dev0-MediaTek/source/Lib/TLibCommon/TComSlice.h
r753 r755 862 862 863 863 #if H_3D 864 #if CAM_HLS_F0136_F0045_F0082 865 UInt m_uiCamParPrecision; 866 Bool* m_bCamParInSliceHeader; 867 Bool* m_bCamParPresent; 868 Int ***m_aaaiCodedScale ; 869 Int ***m_aaaiCodedOffset; 870 #endif 864 871 Bool m_ivMvScalingFlag; 865 872 #endif … … 1143 1150 Void setARPStepNum( Int layerIdInVps, UInt val ) { m_uiARPStepNum[layerIdInVps] = val; } 1144 1151 #endif 1152 #if CAM_HLS_F0136_F0045_F0082 1153 Void createCamPars(Int iNumViews); 1154 Void deleteCamPars(); 1155 Void initCamParaVPS ( UInt uiViewIndex, Bool bCamParPresent = false, UInt uiCamParPrecision = 0, Bool bCamParSlice = false, Int** aaiScale = 0, Int** aaiOffset = 0 ); 1156 UInt getCamParPrecision () { return m_uiCamParPrecision; } 1157 Bool getCamParPresent ( Int viewIndex ) { return m_bCamParPresent[viewIndex]; } 1158 Bool hasCamParInSliceHeader( Int viewIndex ) { return m_bCamParInSliceHeader[viewIndex]; } 1159 Void setHasCamParInSliceHeader( Int viewIndex, Bool b ) { m_bCamParInSliceHeader[viewIndex] = b; } 1160 Int* getCodedScale ( Int viewIndex ) { return m_aaaiCodedScale [viewIndex][0]; } 1161 Int* getCodedOffset ( Int viewIndex ) { return m_aaaiCodedOffset[viewIndex][0]; } 1162 Int* getInvCodedScale ( Int viewIndex ) { return m_aaaiCodedScale [viewIndex][1]; } 1163 Int* getInvCodedOffset ( Int viewIndex ) { return m_aaaiCodedOffset[viewIndex][1]; } 1164 #endif 1165 1145 1166 #if H_3D_IV_MERGE 1146 1167 Void setIvMvPredFlag ( Int layerIdInVps, Bool val ) { m_ivMvPredFlag[ layerIdInVps ] = val; } … … 1780 1801 #endif 1781 1802 #if H_3D 1803 #if !CAM_HLS_F0136_F0045_F0082 1782 1804 Void initCamParaSPS ( UInt uiViewIndex, UInt uiCamParPrecision = 0, Bool bCamParSlice = false, Int** aaiScale = 0, Int** aaiOffset = 0 ); 1783 1805 UInt getCamParPrecision () { return m_uiCamParPrecision; } … … 1790 1812 Int* getInvCodedScale () { return m_aaiCodedScale [1]; } 1791 1813 Int* getInvCodedOffset () { return m_aaiCodedOffset[1]; } 1814 #endif 1792 1815 #endif 1793 1816 #if H_MV -
branches/HTM-9.1-dev0-MediaTek/source/Lib/TLibCommon/TypeDef.h
r753 r755 174 174 // SCU_HS_FAST_DEPTH_INTRA_E0238_HHIFIX 175 175 #endif 176 177 #define CAM_HLS_F0136_F0045_F0082 1 // JCT3V-F0136/F0045: view order index based camera parameter signaling 178 // JCT3V-F0082: the cp_in_slice_segment_layer_flag to be view specific and used as a condition of the presence of slice header level camera parameters 179 #define CAM_HLS_F0044 1 // JCT3V-F0044: move camera parameter from slice header extension to slice header 180 176 181 177 182 // Rate Control -
branches/HTM-9.1-dev0-MediaTek/source/Lib/TLibDecoder/TDecCAVLC.cpp
r753 r755 1049 1049 #endif 1050 1050 1051 #if !CAM_HLS_F0136_F0045_F0082 1051 1052 UInt uiCamParPrecision = 0; 1052 1053 Bool bCamParSlice = false; … … 1068 1069 } 1069 1070 pcSPS->initCamParaSPS( viewIndex, uiCamParPrecision, bCamParSlice, m_aaiTempScale, m_aaiTempOffset ); 1071 #endif 1070 1072 } 1071 1073 #endif … … 1179 1181 #if H_3D 1180 1182 m_pcBitstream->readOutTrailingBits(); 1183 #if CAM_HLS_F0136_F0045_F0082 1184 pcVPS->createCamPars(pcVPS->getNumViews()); 1185 #endif 1181 1186 parseVPSExtension2( pcVPS ); 1182 1187 READ_FLAG( uiCode, "vps_extension3_flag" ); … … 1931 1936 } 1932 1937 } 1938 #if CAM_HLS_F0136_F0045_F0082 1939 UInt uiCamParPrecision = 0; 1940 Bool bCamParSlice = false; 1941 Bool bCamParPresentFlag = false; 1942 1943 READ_UVLC( uiCamParPrecision, "cp_precision" ); 1944 for (UInt viewIndex=0; viewIndex<pcVPS->getNumViews(); viewIndex++) 1945 { 1946 READ_FLAG( uiCode, "cp_present_flag[i]" ); bCamParPresentFlag = ( uiCode == 1); 1947 if ( bCamParPresentFlag ) 1948 { 1949 READ_FLAG( uiCode, "cp_in_slice_segment_header_flag[i]" ); bCamParSlice = ( uiCode == 1); 1950 if ( !bCamParSlice ) 1951 { 1952 for( UInt uiBaseIndex = 0; uiBaseIndex < viewIndex; uiBaseIndex++ ) 1953 { 1954 Int iCode; 1955 READ_SVLC( iCode, "vps_cp_scale" ); m_aaiTempScale [ uiBaseIndex ][ viewIndex ] = iCode; 1956 READ_SVLC( iCode, "vps_cp_off" ); m_aaiTempOffset [ uiBaseIndex ][ viewIndex ] = iCode; 1957 READ_SVLC( iCode, "vps_cp_inv_scale_plus_scale" ); m_aaiTempScale [ viewIndex ][ uiBaseIndex ] = iCode - m_aaiTempScale [ uiBaseIndex ][ viewIndex ]; 1958 READ_SVLC( iCode, "vps_cp_inv_off_plus_off" ); m_aaiTempOffset [ viewIndex ][ uiBaseIndex ] = iCode - m_aaiTempOffset[ uiBaseIndex ][ viewIndex ]; 1959 } 1960 } 1961 pcVPS->initCamParaVPS( viewIndex, bCamParPresentFlag, uiCamParPrecision, bCamParSlice, m_aaiTempScale, m_aaiTempOffset ); 1962 } 1963 } 1964 #endif 1933 1965 READ_FLAG( uiCode, "iv_mv_scaling_flag"); pcVPS->setIvMvScalingFlag( uiCode == 1 ? true : false ); 1934 1966 } … … 2657 2689 } 2658 2690 2691 #if CAM_HLS_F0044 2692 #if CAM_HLS_F0136_F0045_F0082 2693 if( rpcSlice->getVPS()->hasCamParInSliceHeader( rpcSlice->getViewIndex() ) && !rpcSlice->getIsDepth() ) 2694 #else 2695 if( rpcSlice->getSPS()->hasCamParInSliceHeader() ) 2696 #endif 2697 { 2698 UInt uiViewIndex = rpcSlice->getViewIndex(); 2699 for( UInt uiBaseIndex = 0; uiBaseIndex < uiViewIndex; uiBaseIndex++ ) 2700 { 2701 READ_SVLC( iCode, "cp_scale" ); m_aaiTempScale [ uiBaseIndex ][ uiViewIndex ] = iCode; 2702 READ_SVLC( iCode, "cp_off" ); m_aaiTempOffset[ uiBaseIndex ][ uiViewIndex ] = iCode; 2703 READ_SVLC( iCode, "cp_inv_scale_plus_scale" ); m_aaiTempScale [ uiViewIndex ][ uiBaseIndex ] = iCode - m_aaiTempScale [ uiBaseIndex ][ uiViewIndex ]; 2704 READ_SVLC( iCode, "cp_inv_off_plus_off" ); m_aaiTempOffset[ uiViewIndex ][ uiBaseIndex ] = iCode - m_aaiTempOffset[ uiBaseIndex ][ uiViewIndex ]; 2705 } 2706 rpcSlice->setCamparaSlice( m_aaiTempScale, m_aaiTempOffset ); 2707 } 2708 2709 #endif 2710 2659 2711 if(pps->getSliceHeaderExtensionPresentFlag()) 2660 2712 { 2661 2713 READ_UVLC(uiCode,"slice_header_extension_length"); 2662 #if H_3D 2714 #if H_3D && !CAM_HLS_F0044 2715 #if CAM_HLS_F0136_F0045_F0082 2716 if( rpcSlice->getVPS()->hasCamParInSliceHeader( rpcSlice->getViewIndex() ) && !rpcSlice->getIsDepth() ) 2717 #else 2663 2718 if( rpcSlice->getSPS()->hasCamParInSliceHeader() ) 2719 #endif 2664 2720 { 2665 2721 UInt uiViewIndex = rpcSlice->getViewIndex(); -
branches/HTM-9.1-dev0-MediaTek/source/Lib/TLibDecoder/TDecTop.cpp
r748 r755 228 228 m_uiMaxViewIndex = std::max( m_uiMaxViewIndex, uiViewIndex ); 229 229 m_aiViewId[ uiViewIndex ] = pcSlice->getViewId(); 230 #if CAM_HLS_F0136_F0045_F0082 231 if( uiViewIndex == 1 ) 232 { 233 m_uiCamParsCodedPrecision = pcSlice->getVPS()->getCamParPrecision (); 234 m_bCamParsVaryOverTime = pcSlice->getVPS()->hasCamParInSliceHeader ( uiViewIndex ); 235 } 236 else if( uiViewIndex > 1 ) 237 { 238 AOF( m_uiCamParsCodedPrecision == pcSlice->getVPS()->getCamParPrecision () ); 239 AOF( m_bCamParsVaryOverTime == pcSlice->getVPS()->hasCamParInSliceHeader ( uiViewIndex ) ); 240 } 241 #else 230 242 if( uiViewIndex == 1 ) 231 243 { … … 238 250 AOF( m_bCamParsVaryOverTime == pcSlice->getSPS()->hasCamParInSliceHeader () ); 239 251 } 252 #endif 240 253 for( UInt uiBaseIndex = 0; uiBaseIndex < uiViewIndex; uiBaseIndex++ ) 241 254 { … … 251 264 else 252 265 { 266 #if CAM_HLS_F0136_F0045_F0082 267 m_aaiCodedScale [ uiBaseIndex ][ uiViewIndex ] = pcSlice->getVPS()->getCodedScale (uiViewIndex) [ uiBaseIndex ]; 268 m_aaiCodedOffset[ uiBaseIndex ][ uiViewIndex ] = pcSlice->getVPS()->getCodedOffset (uiViewIndex) [ uiBaseIndex ]; 269 m_aaiCodedScale [ uiViewIndex ][ uiBaseIndex ] = pcSlice->getVPS()->getInvCodedScale (uiViewIndex) [ uiBaseIndex ]; 270 m_aaiCodedOffset[ uiViewIndex ][ uiBaseIndex ] = pcSlice->getVPS()->getInvCodedOffset(uiViewIndex) [ uiBaseIndex ]; 271 #else 253 272 m_aaiCodedScale [ uiBaseIndex ][ uiViewIndex ] = pcSlice->getSPS()->getCodedScale () [ uiBaseIndex ]; 254 273 m_aaiCodedOffset[ uiBaseIndex ][ uiViewIndex ] = pcSlice->getSPS()->getCodedOffset () [ uiBaseIndex ]; 255 274 m_aaiCodedScale [ uiViewIndex ][ uiBaseIndex ] = pcSlice->getSPS()->getInvCodedScale () [ uiBaseIndex ]; 256 275 m_aaiCodedOffset[ uiViewIndex ][ uiBaseIndex ] = pcSlice->getSPS()->getInvCodedOffset() [ uiBaseIndex ]; 276 #endif 257 277 xInitLUTs( uiBaseIndex, uiViewIndex, m_aaiCodedScale[ uiBaseIndex ][ uiViewIndex ], m_aaiCodedOffset[ uiBaseIndex ][ uiViewIndex ], m_adBaseViewShiftLUT, m_aiBaseViewShiftLUT ); 258 278 xInitLUTs( uiViewIndex, uiBaseIndex, m_aaiCodedScale[ uiViewIndex ][ uiBaseIndex ], m_aaiCodedOffset[ uiViewIndex ][ uiBaseIndex ], m_adBaseViewShiftLUT, m_aiBaseViewShiftLUT ); … … 286 306 CamParsCollector::copyCamParamForSlice( TComSlice* pcSlice ) 287 307 { 308 #if !CAM_HLS_F0136_F0045_F0082 288 309 UInt uiViewIndex = pcSlice->getViewIndex(); 289 310 290 311 pcSlice->getSPS()->initCamParaSPS( uiViewIndex, m_uiCamParsCodedPrecision, m_bCamParsVaryOverTime, m_aaiCodedScale, m_aaiCodedOffset ); 291 312 #endif 292 313 if( m_bCamParsVaryOverTime ) 293 314 { … … 1109 1130 if( pcSlice->getIsDepth() ) 1110 1131 { 1132 #if !CAM_HLS_F0136_F0045_F0082 1111 1133 pcSlice->getSPS()->setHasCamParInSliceHeader( false ); 1134 #endif 1112 1135 } 1113 1136 #endif -
branches/HTM-9.1-dev0-MediaTek/source/Lib/TLibEncoder/TEncCavlc.cpp
r753 r755 861 861 } 862 862 #endif 863 if (!depthFlag ) 864 { 865 WRITE_UVLC( pcSPS->getCamParPrecision(), "cp_precision" ); 866 WRITE_FLAG( pcSPS->hasCamParInSliceHeader() ? 1 : 0, "cp_in_slice_header_flag" ); 867 if( !pcSPS->hasCamParInSliceHeader() ) 868 { 869 for( UInt uiIndex = 0; uiIndex < viewIndex; uiIndex++ ) 870 { 871 WRITE_SVLC( pcSPS->getCodedScale ()[ uiIndex ], "cp_scale" ); 872 WRITE_SVLC( pcSPS->getCodedOffset ()[ uiIndex ], "cp_off" ); 873 WRITE_SVLC( pcSPS->getInvCodedScale ()[ uiIndex ] + pcSPS->getCodedScale ()[ uiIndex ], "cp_inv_scale_plus_scale" ); 874 WRITE_SVLC( pcSPS->getInvCodedOffset()[ uiIndex ] + pcSPS->getCodedOffset()[ uiIndex ], "cp_inv_off_plus_off" ); 875 } 876 } 877 } 863 #if !CAM_HLS_F0136_F0045_F0082 864 if (!depthFlag ) 865 { 866 WRITE_UVLC( pcSPS->getCamParPrecision(), "cp_precision" ); 867 WRITE_FLAG( pcSPS->hasCamParInSliceHeader() ? 1 : 0, "cp_in_slice_header_flag" ); 868 if( !pcSPS->hasCamParInSliceHeader() ) 869 { 870 for( UInt uiIndex = 0; uiIndex < viewIndex; uiIndex++ ) 871 { 872 WRITE_SVLC( pcSPS->getCodedScale ()[ uiIndex ], "cp_scale" ); 873 WRITE_SVLC( pcSPS->getCodedOffset ()[ uiIndex ], "cp_off" ); 874 WRITE_SVLC( pcSPS->getInvCodedScale ()[ uiIndex ] + pcSPS->getCodedScale ()[ uiIndex ], "cp_inv_scale_plus_scale" ); 875 WRITE_SVLC( pcSPS->getInvCodedOffset()[ uiIndex ] + pcSPS->getCodedOffset()[ uiIndex ], "cp_inv_off_plus_off" ); 876 } 877 } 878 } 879 #endif 878 880 } 879 881 #endif … … 1675 1677 } 1676 1678 } 1679 #if CAM_HLS_F0136_F0045_F0082 1680 WRITE_UVLC( pcVPS->getCamParPrecision(), "cp_precision" ); 1681 for (UInt viewIndex=0; viewIndex<pcVPS->getNumViews(); viewIndex++) 1682 { 1683 WRITE_FLAG( pcVPS->getCamParPresent(viewIndex) ? 1 : 0, "cp_present_flag[i]" ); 1684 if ( pcVPS->getCamParPresent(viewIndex) ) 1685 { 1686 WRITE_FLAG( pcVPS->hasCamParInSliceHeader(viewIndex) ? 1 : 0, "cp_in_slice_segment_header_flag[i]" ); 1687 if ( !pcVPS->hasCamParInSliceHeader(viewIndex) ) 1688 { 1689 for( UInt uiIndex = 0; uiIndex < viewIndex; uiIndex++ ) 1690 { 1691 WRITE_SVLC( pcVPS->getCodedScale (viewIndex)[ uiIndex ], "vps_cp_scale" ); 1692 WRITE_SVLC( pcVPS->getCodedOffset (viewIndex)[ uiIndex ], "vps_cp_off" ); 1693 WRITE_SVLC( pcVPS->getInvCodedScale (viewIndex)[ uiIndex ] + pcVPS->getCodedScale (viewIndex)[ uiIndex ], "vps_cp_inv_scale_plus_scale" ); 1694 WRITE_SVLC( pcVPS->getInvCodedOffset(viewIndex)[ uiIndex ] + pcVPS->getCodedOffset(viewIndex)[ uiIndex ], "vps_cp_inv_off_plus_off" ); 1695 } 1696 } 1697 } 1698 } 1699 #endif 1677 1700 #if H_3D_TMVP 1678 1701 WRITE_FLAG( pcVPS->getIvMvScalingFlag( ) ? 1 : 0 , "iv_mv_scaling_flag" ); … … 2139 2162 } 2140 2163 } 2164 #if CAM_HLS_F0044 2165 #if QC_DEPTH_IV_MRG_F0125 2166 #if CAM_HLS_F0136_F0045_F0082 2167 if( pcSlice->getVPS()->hasCamParInSliceHeader( pcSlice->getViewIndex() ) && !pcSlice->getIsDepth() ) 2168 #else 2169 if( pcSlice->getSPS()->hasCamParInSliceHeader() && !pcSlice->getIsDepth() ) 2170 #endif 2171 #else 2172 if( pcSlice->getSPS()->hasCamParInSliceHeader() ) 2173 #endif 2174 { 2175 for( UInt uiId = 0; uiId < pcSlice->getViewIndex(); uiId++ ) 2176 { 2177 WRITE_SVLC( pcSlice->getCodedScale ()[ uiId ], "cp_scale" ); 2178 WRITE_SVLC( pcSlice->getCodedOffset ()[ uiId ], "cp_off" ); 2179 WRITE_SVLC( pcSlice->getInvCodedScale ()[ uiId ] + pcSlice->getCodedScale ()[ uiId ], "cp_inv_scale_plus_scale" ); 2180 WRITE_SVLC( pcSlice->getInvCodedOffset()[ uiId ] + pcSlice->getCodedOffset()[ uiId ], "cp_inv_off_plus_off" ); 2181 } 2182 } 2183 #endif 2184 2141 2185 if(pcSlice->getPPS()->getSliceHeaderExtensionPresentFlag()) 2142 2186 { 2143 #if !H_3D 2187 #if !H_3D || CAM_HLS_F0044 2144 2188 WRITE_UVLC(0,"slice_header_extension_length"); 2145 2189 #else 2146 2190 WRITE_UVLC(0,"slice_header_extension_length"); //<- this element needs to be set to the correct value!! 2147 2148 2191 #if QC_DEPTH_IV_MRG_F0125 2192 #if CAM_HLS_F0136_F0045_F0082 2193 if( pcSlice->getVPS()->hasCamParInSliceHeader( pcSlice->getViewIndex() ) && !pcSlice->getIsDepth() ) 2194 #else 2149 2195 if( pcSlice->getSPS()->hasCamParInSliceHeader() && !pcSlice->getIsDepth() ) 2196 #endif 2150 2197 #else 2151 2198 if( pcSlice->getSPS()->hasCamParInSliceHeader() ) -
branches/HTM-9.1-dev0-MediaTek/source/Lib/TLibEncoder/TEncTop.cpp
r748 r755 854 854 } 855 855 #if H_3D 856 #if !CAM_HLS_F0136_F0045_F0082 856 857 #if !QC_DEPTH_IV_MRG_F0125 857 858 if ( !m_isDepth ) … … 860 861 m_cSPS.initCamParaSPS ( m_viewIndex, m_uiCamParPrecision, m_bCamParInSliceHeader, m_aaiCodedScale, m_aaiCodedOffset ); 861 862 } 863 #endif 862 864 #endif 863 865 } … … 1010 1012 } 1011 1013 #if H_3D 1014 #if CAM_HLS_F0136_F0045_F0082 1015 if( m_cVPS->hasCamParInSliceHeader( getViewIndex() ) ) 1016 #else 1012 1017 if( m_cSPS.hasCamParInSliceHeader() ) 1018 #endif 1013 1019 { 1014 1020 m_cPPS.setSliceHeaderExtensionPresentFlag( true );
Note: See TracChangeset for help on using the changeset viewer.