Changeset 1172 in 3DVCSoftware
- Timestamp:
- 5 Apr 2015, 22:58:19 (10 years ago)
- Location:
- branches/HTM-13.1-dev0
- Files:
-
- 1 added
- 21 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-13.1-dev0/source/App/TAppEncoder/TAppEncCfg.cpp
r1170 r1172 1713 1713 xConfirmPara( m_pchBaseViewCameraNumbers == 0 , "BaseViewCameraNumbers must be given" ); 1714 1714 #if BUG_FIX_TK65 1715 #if HHI_CAM_PARA_K0052 1716 xConfirmPara( m_iNumberOfViews != m_cCameraData.getBaseViewNumbers().size() , "Number of Views in BaseViewCameraNumbers must be equal to NumberOfViews" ); 1717 #else 1715 1718 xConfirmPara( ( ((UInt) m_numberOfLayers >> 1 ) != m_cCameraData.getBaseViewNumbers().size() ) && ( m_numberOfLayers != m_cCameraData.getBaseViewNumbers().size() ), "Number of Views in BaseViewCameraNumbers must be equal to NumberOfViews" ); 1719 #endif 1716 1720 #else 1717 1721 xConfirmPara( ((UInt) m_numberOfLayers >> 1 ) != m_cCameraData.getBaseViewNumbers().size(), "Number of Views in BaseViewCameraNumbers must be equal to NumberOfViews" ); -
branches/HTM-13.1-dev0/source/App/TAppEncoder/TAppEncTop.cpp
r1170 r1172 140 140 xSetVPSVUI ( vps ); 141 141 #if H_3D 142 #if HHI_CAM_PARA_K0052 143 xSetCamPara ( vps ); 144 #endif 145 #endif 146 #if H_3D 142 147 m_ivPicLists.setVPS ( &vps ); 143 148 xDeriveDltArray ( vps, dlt ); … … 224 229 //====== Camera Parameters ========= 225 230 m_cTEncTop.setCameraParameters ( &m_cCameraData ); 231 #if !HHI_CAM_PARA_K0052 226 232 m_cTEncTop.setCamParPrecision ( m_cCameraData.getCamParsCodedPrecision () ); 227 233 m_cTEncTop.setCamParInSliceHeader ( m_cCameraData.getVaryingCameraParameters() ); 234 228 235 m_cTEncTop.setCodedScale ( m_cCameraData.getCodedScale () ); 229 236 m_cTEncTop.setCodedOffset ( m_cCameraData.getCodedOffset () ); 237 #endif 230 238 #if H_3D_VSO 231 239 //====== VSO ========= … … 791 799 { 792 800 #if H_3D 801 #if !HHI_CAM_PARA_K0052 793 802 for ( Int viewIndex = 0; viewIndex < m_vps->getNumViews(); viewIndex++ ) 794 803 { … … 796 805 m_cCameraData.getVaryingCameraParameters(), m_cCameraData.getCodedScale(), m_cCameraData.getCodedOffset() ); 797 806 } 807 #endif 798 808 #endif 799 809 … … 2228 2238 } 2229 2239 } 2240 2241 #if HHI_CAM_PARA_K0052 2242 #if H_3D 2243 Void TAppEncTop::xSetCamPara ( TComVPS& vps ) 2244 { 2245 vps.setCpPrecision( m_cCameraData.getCamParsCodedPrecision()); 2246 2247 for ( Int n = 1; n < vps.getNumViews(); n++ ) 2248 { 2249 Int i = vps.getViewOIdxList( n ); 2250 Int iInVps = vps.getVoiInVps ( i ); 2251 vps.setNumCp( iInVps, n); 2252 2253 if ( vps.getNumCp( iInVps ) > 0 ) 2254 { 2255 vps.setCpInSliceSegmentHeaderFlag( iInVps, m_cCameraData.getVaryingCameraParameters() ); 2256 2257 for( Int m = 0; m < vps.getNumCp( iInVps ); m++ ) 2258 { 2259 vps.setCpRefVoi( iInVps, m, vps.getViewOIdxList( m ) ); 2260 if( !vps.getCpInSliceSegmentHeaderFlag( iInVps ) ) 2261 { 2262 Int j = vps.getCpRefVoi( iInVps, m ); 2263 Int jInVps = vps.getVoiInVps( j ); 2264 2265 vps.setVpsCpScale ( iInVps, jInVps, m_cCameraData.getCodedScale() [ jInVps ][ iInVps ] ) ; 2266 vps.setVpsCpInvScale( iInVps, jInVps, m_cCameraData.getCodedScale() [ iInVps ][ jInVps ] ) ; 2267 vps.setVpsCpOff ( iInVps, jInVps, m_cCameraData.getCodedOffset()[ jInVps ][ iInVps ] ) ; 2268 vps.setVpsCpInvOff ( iInVps, jInVps, m_cCameraData.getCodedOffset()[ iInVps ][ jInVps ] ) ; 2269 } 2270 } 2271 } 2272 } 2273 vps.deriveCpPresentFlag(); 2274 } 2275 #endif 2276 #endif 2277 2278 2230 2279 Bool TAppEncTop::xLayerIdInTargetEncLayerIdList(Int nuhLayerId) 2231 2280 { -
branches/HTM-13.1-dev0/source/App/TAppEncoder/TAppEncTop.h
r1133 r1172 142 142 Void xSetDpbSize ( TComVPS& vps ); 143 143 Void xSetVPSVUI ( TComVPS& vps ); 144 #if HHI_CAM_PARA_K0052 145 #if H_3D 146 Void xSetCamPara ( TComVPS& vps ); 147 #endif 148 #endif 144 149 GOPEntry* xGetGopEntry( Int layerIdInVps, Int poc ); 145 150 Int xGetMax( std::vector<Int>& vec); -
branches/HTM-13.1-dev0/source/Lib/TAppCommon/TAppComCamPara.cpp
r1133 r1172 399 399 400 400 401 #if !HHI_CAM_PARA_K0052 401 402 Void 402 403 TAppComCamPara::xGetViewOrderIndices( const std::vector<Int>& raiId2SortedId, std::vector<Int>& raiVOIdx ) … … 411 412 } 412 413 } 414 #endif 413 415 414 416 … … 447 449 else 448 450 { 449 Int iBaseView = m_aiBaseViews[ iBaseViewId ];450 Double dFL1, dFLX;451 Double dCP1, dCPX;452 Double dCS1, dCSX;453 Double dZN1, dZNX;454 Double dZF1, dZFX;455 Bool bInterpolated;456 xGetGeometryData( iBaseView, m_uiFirstFrameId, dFL1, dCP1, dCS1, bInterpolated ); AOT( bInterpolated );457 xGetZNearZFar ( iBaseView, m_uiFirstFrameId, dZN1, dZF1 );458 459 for( UInt uiFrameId = m_uiFirstFrameId + 1; !bChangeDetected && uiFrameId <= m_uiLastFrameId; uiFrameId++ )460 {461 xGetGeometryData( iBaseView, uiFrameId, dFLX, dCPX, dCSX, bInterpolated ); AOT( bInterpolated );462 xGetZNearZFar ( iBaseView, uiFrameId, dZNX, dZFX );463 464 if( dFL1 != dFLX || dCP1 != dCPX || dCS1 != dCSX || dZN1 != dZNX || dZF1 != dZFX )465 {466 bChangeDetected = true;467 }468 }469 }451 Int iBaseView = m_aiBaseViews[ iBaseViewId ]; 452 Double dFL1, dFLX; 453 Double dCP1, dCPX; 454 Double dCS1, dCSX; 455 Double dZN1, dZNX; 456 Double dZF1, dZFX; 457 Bool bInterpolated; 458 xGetGeometryData( iBaseView, m_uiFirstFrameId, dFL1, dCP1, dCS1, bInterpolated ); AOT( bInterpolated ); 459 xGetZNearZFar ( iBaseView, m_uiFirstFrameId, dZN1, dZF1 ); 460 461 for( UInt uiFrameId = m_uiFirstFrameId + 1; !bChangeDetected && uiFrameId <= m_uiLastFrameId; uiFrameId++ ) 462 { 463 xGetGeometryData( iBaseView, uiFrameId, dFLX, dCPX, dCSX, bInterpolated ); AOT( bInterpolated ); 464 xGetZNearZFar ( iBaseView, uiFrameId, dZNX, dZFX ); 465 466 if( dFL1 != dFLX || dCP1 != dCPX || dCS1 != dCSX || dZN1 != dZNX || dZF1 != dZFX ) 467 { 468 bChangeDetected = true; 469 } 470 } 471 } 470 472 } 471 473 return bChangeDetected; … … 721 723 else 722 724 { 723 Double dScale, dOffset; 724 Bool bInterpolated = xGetShiftParameterReal( uiSourceView, uiTargetView, uiFrame, false, bByIdx, dScale, dOffset ); 725 AOT( bInterpolated ); // must be base view 726 727 Double dMultOffset = (Double)( 1 << ( m_uiCamParsCodedPrecision + 1 ) ); 728 Double dMultScale = (Double)( 1 << ( m_uiCamParsCodedPrecision + 1 + m_uiInputBitDepth ) ); 729 riOffset = (Int)floor( dMultOffset * dOffset + .5 ); 730 riScale = (Int)floor( dMultScale * dScale + .5 ); 731 } 732 725 Double dScale, dOffset; 726 Bool bInterpolated = xGetShiftParameterReal( uiSourceView, uiTargetView, uiFrame, false, bByIdx, dScale, dOffset ); 727 AOT( bInterpolated ); // must be base view 728 729 Double dMultOffset = (Double)( 1 << ( m_uiCamParsCodedPrecision + 1 ) ); 730 Double dMultScale = (Double)( 1 << ( m_uiCamParsCodedPrecision + 1 + m_uiInputBitDepth ) ); 731 riOffset = (Int)floor( dMultOffset * dOffset + .5 ); 732 riScale = (Int)floor( dMultScale * dScale + .5 ); 733 } 733 734 } 734 735 … … 958 959 959 960 961 962 #if !HHI_CAM_PARA_K0052 960 963 Void 961 964 TAppComCamPara::xSetPdmConversionParams() … … 995 998 } 996 999 } 1000 #endif 997 1001 998 1002 … … 1280 1284 1281 1285 //===== set derived parameters ===== 1286 #if !HHI_CAM_PARA_K0052 1282 1287 xGetViewOrderIndices( m_aiBaseId2SortedId, m_aiViewOrderIndex ); 1288 #endif 1283 1289 m_bCamParsVaryOverTime = xGetCamParsChangeFlag(); 1284 1290 -
branches/HTM-13.1-dev0/source/Lib/TAppCommon/TAppComCamPara.h
r655 r1172 85 85 86 86 // SPS and slice header related variables 87 #if !HHI_CAM_PARA_K0052 87 88 std::vector<Int> m_aiViewOrderIndex; ///< list of view order indices 89 #endif 88 90 UInt m_uiCamParsCodedPrecision; ///< precision for coding of camera parameters (x: max error in disparity is 2^(-x) luma samples) 89 91 Bool m_bCamParsVaryOverTime; ///< flag specifying whether camera parameters vary for given frame numbers … … 145 147 // getting conversion parameters for disparity to virtual depth conversion 146 148 Void xGetCameraShifts ( UInt uiSourceView, UInt uiTargetView, UInt uiFrame, Double& rdCamPosShift, Double& rdPicPosShift ); 149 #if !HHI_CAM_PARA_K0052 147 150 Void xSetPdmConversionParams (); 151 #endif 148 152 149 153 public: … … 216 220 Bool getVaryingCameraParameters() { return m_bCamParsVaryOverTime; } 217 221 UInt getCamParsCodedPrecision () { return m_uiCamParsCodedPrecision; } 222 #if !HHI_CAM_PARA_K0052 218 223 std::vector<Int>& getViewOrderIndex () { return m_aiViewOrderIndex; } 224 #endif 219 225 Int** getCodedScale () { return m_aaiCodedScale; } 220 226 Int** getCodedOffset () { return m_aaiCodedOffset; } -
branches/HTM-13.1-dev0/source/Lib/TLibCommon/TComRom.cpp
r1169 r1172 400 400 Bool g_stopAtPos = false; 401 401 Bool g_outputPos = false; 402 Bool g_traceCameraParameters = true; 402 403 #endif 403 404 #endif … … 601 602 602 603 Bool stopFlag = false; 603 if ( g_stopAtPos && poc == 0 && layerId == 1)604 if ( g_stopAtPos && poc == 0 && layerId == 2 ) 604 605 { 605 606 Bool stopAtCU = true; 606 607 if ( stopAtCU ) // Stop at CU with specific size 607 608 { 608 stopFlag = ( cuPelX == 888 ) && ( cuPelY == 248 ) && ( cuWidth == 8 ) && ( cuHeight == 8);609 stopFlag = ( cuPelX == 0 ) && ( cuPelY == 0 ) && ( cuWidth == 16 ) && ( cuHeight == 16 ); 609 610 } 610 611 else -
branches/HTM-13.1-dev0/source/Lib/TLibCommon/TComRom.h
r1169 r1172 230 230 231 231 #ifndef ENC_DEC_TRACE 232 #define ENC_DEC_TRACE 0 232 #define ENC_DEC_TRACE 0 233 233 #endif 234 234 … … 265 265 extern Bool g_stopAtPos; // Stop at position 266 266 extern Bool g_outputPos; // Output position 267 extern Bool g_traceCameraParameters; // Trace camera parameters 267 268 268 269 #define DTRACE_CU(x,y) writeToTraceFile( x,y, g_traceCU ); -
branches/HTM-13.1-dev0/source/Lib/TLibCommon/TComSlice.cpp
r1171 r1172 140 140 , m_inCmpPredFlag ( false ) 141 141 #endif 142 #if HHI_CAM_PARA_K0052 143 , m_numViews ( 0 ) 144 #endif 142 145 , m_depthToDisparityB ( NULL ) 143 146 , m_depthToDisparityF ( NULL ) … … 211 214 m_puiSubstreamSizes = NULL; 212 215 #if H_3D 216 #if HHI_CAM_PARA_K0052 217 for( UInt i = 0; i < m_numViews; i++ ) 218 #else 213 219 for( UInt i = 0; i < getViewIndex(); i++ ) 220 #endif 214 221 { 215 222 if ( m_depthToDisparityB && m_depthToDisparityB[ i ] ) … … 221 228 { 222 229 delete[] m_depthToDisparityF [ i ]; 223 }230 } 224 231 } 225 232 … … 830 837 Void TComSlice::setCamparaSlice( Int** aaiScale, Int** aaiOffset ) 831 838 { 839 #if HHI_CAM_PARA_K0052 840 Int voiInVps = m_pcVPS->getVoiInVps(getViewIndex() ); 841 if( m_pcVPS->getNumCp( voiInVps ) > 0 ) 842 { 843 if( m_pcVPS->getCpInSliceSegmentHeaderFlag( voiInVps ) ) 844 { 845 for( Int m = 0; m < m_pcVPS->getNumCp( voiInVps ); m++ ) 846 { 847 Int j = m_pcVPS->getCpRefVoi( voiInVps, m ); 848 Int jInVps = m_pcVPS->getVoiInVps( j ); 849 850 setCpScale ( jInVps , aaiScale [ jInVps ][ voiInVps ]); 851 setCpInvScale( jInVps , aaiScale [ voiInVps ][ jInVps ]); 852 setCpOff ( jInVps , aaiOffset[ jInVps ][ voiInVps ]); 853 setCpInvOff ( jInVps , aaiOffset[ voiInVps ][ jInVps ]); 854 } 855 } 856 } 857 #else 832 858 if( m_pcVPS->hasCamParInSliceHeader( m_viewIndex ) ) 833 859 { … … 840 866 } 841 867 } 868 #endif 842 869 } 843 870 #endif … … 2254 2281 Int i = 0, j = 0; 2255 2282 2283 #if HHI_CAM_PARA_K0052 2284 m_numCp = new Int [ iNumViews ]; 2285 m_cpRefVoi = new Int*[ iNumViews ]; 2286 m_cpInSliceSegmentHeaderFlag = new Bool[ iNumViews ]; 2287 2288 m_cpPresentFlag = new Bool*[ iNumViews ]; 2289 #else 2256 2290 m_bCamParPresent = new Bool[ iNumViews ]; 2257 2291 m_bCamParInSliceHeader = new Bool[ iNumViews ]; 2292 #endif 2293 2258 2294 2259 2295 m_aaaiCodedScale = new Int**[ iNumViews ]; … … 2261 2297 for ( i = 0; i < iNumViews ; i++ ) 2262 2298 { 2299 #if HHI_CAM_PARA_K0052 2300 m_cpInSliceSegmentHeaderFlag[i] = false; 2301 #else 2263 2302 m_bCamParPresent[i] = false; 2264 2303 m_bCamParInSliceHeader[i] = false; 2304 #endif 2305 2265 2306 m_aaaiCodedScale[i] = new Int*[ 2 ]; 2266 2307 m_aaaiCodedOffset[i] = new Int*[ 2 ]; 2308 2309 #if HHI_CAM_PARA_K0052 2310 m_numCp [i] = 0; 2311 m_cpRefVoi[i] = new Int[ iNumViews ]; 2312 m_cpPresentFlag[i] = new Bool[ iNumViews ]; 2313 for ( j = 0; j < iNumViews; j++) 2314 { 2315 m_cpRefVoi[i][j] = 0; 2316 m_cpPresentFlag[i][j] = false; 2317 } 2318 #endif 2267 2319 for ( j = 0; j < 2; j++ ) 2268 2320 { … … 2283 2335 Int i = 0, j = 0; 2284 2336 2337 #if !HHI_CAM_PARA_K0052 2285 2338 if ( m_bCamParPresent != NULL ) 2286 2339 { … … 2291 2344 delete [] m_bCamParInSliceHeader; 2292 2345 } 2346 #else 2347 if ( m_numCp != NULL ) 2348 { 2349 delete [] m_numCp; 2350 } 2351 2352 if ( m_cpRefVoi != NULL ) 2353 { 2354 for ( i = 0; i < iNumViews ; i++ ) 2355 { 2356 delete [] m_cpRefVoi[i]; 2357 } 2358 delete[] m_cpRefVoi; 2359 } 2360 2361 if ( m_cpPresentFlag != NULL ) 2362 { 2363 for ( i = 0; i < iNumViews ; i++ ) 2364 { 2365 delete [] m_cpPresentFlag[i]; 2366 } 2367 delete[] m_cpPresentFlag; 2368 } 2369 2370 2371 if ( m_cpInSliceSegmentHeaderFlag != NULL ) 2372 { 2373 delete [] m_cpInSliceSegmentHeaderFlag; 2374 } 2375 #endif 2376 2293 2377 2294 2378 if ( m_aaaiCodedScale != NULL ) … … 2320 2404 2321 2405 2322 Void 2323 2406 #if !HHI_CAM_PARA_K0052 2407 Void TComVPS::initCamParaVPS( UInt uiViewIndex, Bool bCamParPresent, UInt uiCamParPrecision, Bool bCamParSlice, Int** aaiScale, Int** aaiOffset ) 2324 2408 { 2325 2409 AOT( uiViewIndex != 0 && !bCamParSlice && ( aaiScale == 0 || aaiOffset == 0 ) ); … … 2340 2424 } 2341 2425 } 2426 #endif 2342 2427 2343 2428 #endif // H_3D … … 2774 2859 #endif 2775 2860 #if H_3D 2861 #if !HHI_CAM_PARA_K0052 2776 2862 , m_bCamParInSliceHeader (false) 2863 #endif 2777 2864 #endif 2778 2865 { … … 3990 4077 #if H_3D_NBDV_REF 3991 4078 setupLUT = setupLUT || getDepthRefinementFlag( ); 3992 #endif 4079 #endif 3993 4080 3994 4081 #if H_3D_IV_MERGE … … 4000 4087 return; 4001 4088 4089 #if HHI_CAM_PARA_K0052 4090 m_numViews = getVPS()->getNumViews(); 4091 #endif 4002 4092 /// GT: Allocation should be moved to a better place later; 4003 4093 if ( m_depthToDisparityB == NULL ) 4004 4094 { 4095 #if HHI_CAM_PARA_K0052 4096 m_depthToDisparityB = new Int*[ m_numViews ]; 4097 for ( Int i = 0; i < getVPS()->getNumViews(); i++ ) 4098 #else 4005 4099 m_depthToDisparityB = new Int*[ getViewIndex() ]; 4006 4100 for ( Int i = 0; i < getViewIndex(); i++ ) 4101 #endif 4007 4102 { 4008 4103 m_depthToDisparityB[ i ] = new Int[ Int(1 << g_bitDepthY) ]; … … 4010 4105 } 4011 4106 4107 4012 4108 if ( m_depthToDisparityF == NULL ) 4013 4109 { 4110 #if HHI_CAM_PARA_K0052 4111 m_depthToDisparityF = new Int*[ m_numViews ]; 4112 for ( Int i = 0; i < m_numViews; i++ ) 4113 #else 4014 4114 m_depthToDisparityF= new Int*[ getViewIndex() ]; 4015 4115 for ( Int i = 0; i < getViewIndex(); i++ ) 4116 #endif 4016 4117 { 4017 4118 m_depthToDisparityF[ i ] = new Int[ Int(1 << g_bitDepthY) ]; … … 4024 4125 TComVPS* vps = getVPS(); 4025 4126 4127 #if HHI_CAM_PARA_K0052 4128 Int log2Div = g_bitDepthY - 1 + vps->getCpPrecision(); 4129 Int voiInVps = vps->getVoiInVps( getViewIndex() ); 4130 Bool camParaSH = vps->getCpInSliceSegmentHeaderFlag( voiInVps ); 4131 4132 Int* codScale = camParaSH ? m_aaiCodedScale [ 0 ] : vps->getCodedScale ( voiInVps ); 4133 Int* codOffset = camParaSH ? m_aaiCodedOffset[ 0 ] : vps->getCodedOffset ( voiInVps ); 4134 Int* invCodScale = camParaSH ? m_aaiCodedScale [ 1 ] : vps->getInvCodedScale ( voiInVps ); 4135 Int* invCodOffset = camParaSH ? m_aaiCodedOffset[ 1 ] : vps->getInvCodedOffset( voiInVps ); 4136 4137 4138 for (Int i = 0; i < voiInVps; i++) 4139 { 4140 Int iInVoi = vps->getVoiInVps( i ); 4141 #if ENC_DEC_TRACE && H_MV_ENC_DEC_TRAC 4142 if ( g_traceCameraParameters ) 4143 { 4144 std::cout << std::endl << "Cp: " << codScale [ iInVoi ] << " " << codOffset[ iInVoi ] << " " 4145 << invCodScale[ iInVoi ] << " " << invCodOffset[ iInVoi ] << " " << log2Div; 4146 } 4147 #endif 4148 for ( Int d = 0; d <= ( ( 1 << g_bitDepthY ) - 1 ); d++ ) 4149 { 4150 Int offset = ( codOffset [ iInVoi ] << g_bitDepthY ) + ( ( 1 << log2Div ) >> 1 ); 4151 m_depthToDisparityB[ iInVoi ][ d ] = ( codScale [ iInVoi ] * d + offset ) >> log2Div; 4152 4153 Int invOffset = ( invCodOffset[ iInVoi ] << g_bitDepthY ) + ( ( 1 << log2Div ) >> 1 ); 4154 m_depthToDisparityF[ iInVoi ][ d ] = ( invCodScale[ iInVoi ] * d + invOffset ) >> log2Div; 4155 } 4156 } 4157 #else 4026 4158 Int log2Div = g_bitDepthY - 1 + vps->getCamParPrecision(); 4159 4027 4160 Int viewIndex = getViewIndex(); 4028 4161 … … 4045 4178 } 4046 4179 } 4180 #endif 4047 4181 } 4048 4182 #endif … … 4091 4225 Bool depthOfRefViewsAvailFlag = false; 4092 4226 Bool textOfCurViewAvailFlag = false; 4093 #endif 4094 4095 4096 4097 #if !HHI_INTER_COMP_PRED_K0052 4227 4098 4228 TComVPS* vps = getVPS(); 4099 4229 … … 4171 4301 m_ivMvScalingFlag = sps3dExt->getIvMvScalingFlag ( depthFlag ) ; 4172 4302 m_ivResPredFlag = sps3dExt->getIvResPredFlag ( depthFlag ) && nRLLG0 ; 4303 #if HHI_CAM_PARA_K0052 4304 m_depthRefinementFlag = sps3dExt->getDepthRefinementFlag ( depthFlag ) && getInCompPredFlag() && m_cpAvailableFlag; 4305 m_viewSynthesisPredFlag = sps3dExt->getViewSynthesisPredFlag( depthFlag ) && nRLLG0 && getInCompPredFlag() && m_cpAvailableFlag; 4306 #else 4173 4307 m_depthRefinementFlag = sps3dExt->getDepthRefinementFlag ( depthFlag ) && getInCompPredFlag(); 4174 m_viewSynthesisPredFlag = sps3dExt->getViewSynthesisPredFlag( depthFlag ) && nRLLG0 && getInCompPredFlag(); 4308 m_viewSynthesisPredFlag = sps3dExt->getViewSynthesisPredFlag( depthFlag ) && nRLLG0 && getInCompPredFlag(); 4309 #endif 4175 4310 m_depthBasedBlkPartFlag = sps3dExt->getDepthBasedBlkPartFlag( depthFlag ) && getInCompPredFlag(); 4176 4311 m_mpiFlag = sps3dExt->getMpiFlag ( depthFlag ) && getInCompPredFlag(); -
branches/HTM-13.1-dev0/source/Lib/TLibCommon/TComSlice.h
r1171 r1172 914 914 // VPS EXTENSION 2 SYNTAX ELEMENTS 915 915 #if H_3D 916 #if HHI_CAM_PARA_K0052 917 Int* m_numCp; 918 Int** m_cpRefVoi; 919 Bool** m_cpPresentFlag; 920 Int m_cpPrecision; 921 Bool* m_cpInSliceSegmentHeaderFlag; 922 #else 916 923 UInt m_uiCamParPrecision; 917 924 Bool* m_bCamParInSliceHeader; 918 925 Bool* m_bCamParPresent; 926 #endif 919 927 Int ***m_aaaiCodedScale ; 920 928 Int ***m_aaaiCodedOffset; … … 1188 1196 #if HHI_VIEW_ID_LIST_I5_J0107 || HHI_INTER_COMP_PRED_K0052 1189 1197 Int getViewOIdxList( Int i ) { return m_viewOIdxList[i]; } 1198 #if HHI_CAM_PARA_K0052 1199 std::vector<Int> getViewOIdxList( ) { return m_viewOIdxList; } 1200 #endif 1190 1201 #endif 1191 1202 #if HHI_INTER_COMP_PRED_K0052 1203 #if HHI_CAM_PARA_K0052 1204 Int getVoiInVps( Int viewOIdx ) 1205 #else 1192 1206 Int getInvViewOIdxList( Int viewOIdx ) 1207 #endif 1193 1208 { 1194 1209 for ( Int i = 0; i < m_viewOIdxList.size(); i++ ) … … 1202 1217 return -1; 1203 1218 }; 1219 1220 #if HHI_CAM_PARA_K0052 1221 Bool getViewCompLayerPresentFlag (Int i, Bool d ) { return m_viewCompLayerPresentFlag[ getVoiInVps(i) ][d]; } 1222 Bool getViewCompLayerId (Int i, Bool d ) { return m_viewCompLayerId [ getVoiInVps(i) ][d]; } 1223 #else 1204 1224 Bool getViewCompLayerPresentFlag (Int i, Bool d ) { return m_viewCompLayerPresentFlag[ getInvViewOIdxList(i) ][d]; } 1205 1225 Bool getViewCompLayerId (Int i, Bool d ) { return m_viewCompLayerId [ getInvViewOIdxList(i) ][d]; } 1226 #endif 1206 1227 #endif 1207 1228 Bool getDependencyFlag( Int i, Int j ) { return m_dependencyFlag[i][j]; } … … 1325 1346 Void createCamPars(Int iNumViews); 1326 1347 Void deleteCamPars(); 1348 #if HHI_CAM_PARA_K0052 1349 Void initCamParaVPS( Int vOIdxInVps, Int numCp, Bool cpInSliceSegmentHeaderFlag, Int* cpRefVoi, Int** aaiScale, Int** aaiOffset ); 1350 #else 1327 1351 Void initCamParaVPS ( UInt uiViewIndex, Bool bCamParPresent = false, UInt uiCamParPrecision = 0, Bool bCamParSlice = false, Int** aaiScale = 0, Int** aaiOffset = 0 ); 1352 #endif 1353 1354 #if HHI_CAM_PARA_K0052 1355 1356 Void setCpPrecision( Int val ) { m_cpPrecision = val; } 1357 Int getCpPrecision( ) { return m_cpPrecision; } 1358 1359 Void setNumCp( Int i, Int val ) { m_numCp[i] = val; } 1360 Int getNumCp( Int i ) { return m_numCp[i]; } 1361 1362 Void setCpRefVoi( Int i, Int m, Int val ) { m_cpRefVoi[i][m] = val; } 1363 Int getCpRefVoi( Int i, Int m ) { return m_cpRefVoi[i][m]; } 1364 1365 Void setCpInSliceSegmentHeaderFlag( Int i, Bool flag ) { m_cpInSliceSegmentHeaderFlag[i] = flag; } 1366 Bool getCpInSliceSegmentHeaderFlag( Int i ) { return m_cpInSliceSegmentHeaderFlag[i]; } 1367 1368 Void setVpsCpScale( Int i, Int j, Int val ) { m_aaaiCodedScale [i][0][j] = val; } 1369 Int getVpsCpScale( Int i, Int j ) { return m_aaaiCodedScale[i][0][j]; } 1370 1371 Void setVpsCpOff( Int i, Int j, Int val ) { m_aaaiCodedOffset[i][0][j] = val; } 1372 Int getVpsCpOff( Int i, Int j ) { return m_aaaiCodedOffset[i][0][j]; } 1373 1374 Void setVpsCpInvScale( Int i, Int j, Int val ) { m_aaaiCodedScale[i][1][j] = val; } 1375 Int getVpsCpInvScale( Int i, Int j ) { return m_aaaiCodedScale[i][1][j]; } 1376 1377 Void setVpsCpInvOff( Int i, Int j, Int val ) { m_aaaiCodedOffset[i][1][j] = val; } 1378 Int getVpsCpInvOff( Int i, Int j ) { return m_aaaiCodedOffset[i][1][j]; } 1379 1380 // Derived 1381 Void deriveCpPresentFlag( ) 1382 { 1383 for( Int nInVps = 0; nInVps < getNumViews(); nInVps++ ) 1384 { 1385 for( Int mInVps = 0; mInVps < getNumViews(); mInVps++ ) 1386 { 1387 m_cpPresentFlag[nInVps][mInVps] = 0; 1388 } 1389 } 1390 1391 for( Int n = 1; n < getNumViews(); n++ ) 1392 { 1393 Int iInVps = getVoiInVps( getViewOIdxList( n ) ); 1394 for( Int m = 0; m < getNumCp( iInVps ); m++ ) 1395 { 1396 m_cpPresentFlag[ iInVps ][ getVoiInVps( getCpRefVoi( iInVps, m ) ) ] = 1; 1397 } 1398 } 1399 } 1400 1401 Void setCpPresentFlag( Int i, Int m, Bool flag ) { m_cpPresentFlag[i][m] = flag; } 1402 Bool getCpPresentFlag( Int i, Int m ) { return m_cpPresentFlag[i][m]; } 1403 1404 #else 1328 1405 UInt getCamParPrecision () { return m_uiCamParPrecision; } 1329 1406 Bool getCamParPresent ( Int viewIndex ) { return m_bCamParPresent[viewIndex]; } … … 1331 1408 Bool hasCamParInSliceHeader( Int viewIndex ) { return m_bCamParInSliceHeader[viewIndex]; } 1332 1409 Void setHasCamParInSliceHeader( Int viewIndex, Bool b ) { m_bCamParInSliceHeader[viewIndex] = b; } 1410 #endif 1411 1412 1333 1413 Int* getCodedScale ( Int viewIndex ) { return m_aaaiCodedScale [viewIndex][0]; } 1334 1414 Int* getCodedOffset ( Int viewIndex ) { return m_aaaiCodedOffset[viewIndex][0]; } … … 1802 1882 #if H_3D 1803 1883 TComSps3dExtension m_sps3dExtension; 1884 #if !HHI_CAM_PARA_K0052 1804 1885 UInt m_uiCamParPrecision; 1805 1886 Bool m_bCamParInSliceHeader; 1887 #endif 1806 1888 Int m_aaiCodedScale [2][MAX_NUM_LAYERS]; 1807 1889 Int m_aaiCodedOffset[2][MAX_NUM_LAYERS]; … … 2447 2529 Bool m_inCmpPredFlag; 2448 2530 #endif 2531 #if HHI_CAM_PARA_K0052 2532 Bool m_cpAvailableFlag; 2533 Int m_numViews; 2534 #endif 2449 2535 TComPic* m_ivPicsCurrPoc [2][MAX_NUM_LAYERS]; 2450 2536 Int** m_depthToDisparityB; … … 2551 2637 #if HHI_INTER_COMP_PRED_K0052 2552 2638 Bool getInCmpPredAvailFlag( ) { return m_inCmpPredAvailFlag; } 2639 #if HHI_CAM_PARA_K0052 2640 Bool getCpAvailableFlag( ) { return m_cpAvailableFlag; } 2641 #endif 2553 2642 Bool getInCompPredFlag( ) { return m_inCmpPredFlag; } 2554 2643 Void setInCompPredFlag( Bool b ) { m_inCmpPredFlag = b; } … … 2795 2884 Int* getInvCodedScale () { return m_aaiCodedScale [1]; } 2796 2885 Int* getInvCodedOffset () { return m_aaiCodedOffset[1]; } 2886 #if HHI_CAM_PARA_K0052 2887 Void setCpScale( Int j, Int val ) { m_aaiCodedScale[0][j] = val; } 2888 Int getCpScale( Int j ) { return m_aaiCodedScale[0][j]; } 2889 2890 Void setCpOff( Int j, Int val ) { m_aaiCodedOffset[0][j] = val; } 2891 Int getCpOff( Int j ) { return m_aaiCodedOffset[0][j]; } 2892 2893 Void setCpInvScale( Int j, Int val ) { m_aaiCodedScale[1][j] = val; } 2894 Int getCpInvScale( Int j ) { return m_aaiCodedScale[1][j]; } 2895 2896 Void setCpInvOff( Int j, Int val ) { m_aaiCodedOffset[1][j] = val; } 2897 Int getCpInvOff( Int j ) { return m_aaiCodedOffset[1][j]; } 2898 #endif 2899 2797 2900 #endif 2798 2901 #endif … … 2801 2904 Void setDepthToDisparityLUTs(); 2802 2905 2906 #if HHI_CAM_PARA_K0052 2907 Int* getDepthToDisparityB( Int refViewIdx ) { return m_depthToDisparityB[ getVPS()->getVoiInVps( refViewIdx) ]; }; 2908 Int* getDepthToDisparityF( Int refViewIdx ) { return m_depthToDisparityF[ getVPS()->getVoiInVps( refViewIdx) ]; }; 2909 #else 2803 2910 Int* getDepthToDisparityB( Int refViewIdx ) { return m_depthToDisparityB[ refViewIdx ]; }; 2804 2911 Int* getDepthToDisparityF( Int refViewIdx ) { return m_depthToDisparityF[ refViewIdx ]; }; 2912 #endif 2805 2913 #endif 2806 2914 #if H_3D_IC … … 2922 3030 } 2923 3031 2924 // m_cpAvailableFlag = true; 3032 #if HHI_CAM_PARA_K0052 3033 m_cpAvailableFlag = true; 3034 m_inCmpRefViewIdcs.clear(); 3035 #endif 2925 3036 Bool allRefCmpLayersAvailFlag = true; 2926 3037 … … 2928 3039 { 2929 3040 m_inCmpRefViewIdcs.push_back( getVPS()->getViewOrderIdx( curCmpLIds[ i ] )); 2930 //if( !getVPS()->getCpPresentFlag( getViewIdx(), inCmpRefViewIdcs( i ) ) ) 2931 //{ 2932 // m_cpAvailableFlag = false; 2933 //} 3041 #if HHI_CAM_PARA_K0052 3042 if( !getVPS()->getCpPresentFlag( getVPS()->getVoiInVps( getViewIndex() ), getVPS()->getVoiInVps( m_inCmpRefViewIdcs[ i ] ) ) ) 3043 { 3044 m_cpAvailableFlag = false; 3045 } 3046 #endif 2934 3047 Bool refCmpCurLIdAvailFlag = false; 2935 3048 if( getVPS()->getViewCompLayerPresentFlag( m_inCmpRefViewIdcs[ i ], !getIsDepth() ) ) -
branches/HTM-13.1-dev0/source/Lib/TLibCommon/TypeDef.h
r1171 r1172 334 334 #define HHI_INTER_COMP_PRED_K0052 1 335 335 #define HHI_RES_PRED_K0052 1 336 #define HHI_CAM_PARA_K0052 1 336 337 #define H_3D_ANNEX_SELECTION_FIX 1 337 338 338 #endif 339 339 #define H_MV_FIX_REF_LAYER_PIC_FLAG 1 -
branches/HTM-13.1-dev0/source/Lib/TLibDecoder/TDecCAVLC.cpp
r1170 r1172 93 93 TDecCavlc::TDecCavlc() 94 94 { 95 #if !HHI_CAM_PARA_K0052 95 96 #if H_3D 96 97 m_aaiTempScale = new Int* [ MAX_NUM_LAYERS ]; … … 102 103 } 103 104 #endif 105 #endif 104 106 } 105 107 106 108 TDecCavlc::~TDecCavlc() 107 109 { 110 #if !HHI_CAM_PARA_K0052 108 111 #if H_3D 109 112 for( UInt uiVId = 0; uiVId < MAX_NUM_LAYERS; uiVId++ ) … … 114 117 delete [] m_aaiTempScale; 115 118 delete [] m_aaiTempOffset; 119 #endif 116 120 #endif 117 121 } … … 1925 1929 Void TDecCavlc::parseVPS3dExtension( TComVPS* pcVPS ) 1926 1930 { 1931 #if HHI_CAM_PARA_K0052 1932 UInt uiCode; 1933 READ_UVLC( uiCode, "cp_precision"); pcVPS->setCpPrecision( uiCode ) ; 1934 1935 for (Int n = 1; n < pcVPS->getNumViews(); n++) 1936 { 1937 Int i = pcVPS->getViewOIdxList( n ); 1938 Int iInVps = pcVPS->getVoiInVps( i ); 1939 READ_CODE( 6, uiCode, "num_cp" ); pcVPS->setNumCp( iInVps, uiCode ); 1940 1941 if( pcVPS->getNumCp( iInVps ) > 0 ) 1942 { 1943 READ_FLAG( uiCode, "cp_in_slice_segment_header_flag" ); pcVPS->setCpInSliceSegmentHeaderFlag( iInVps, uiCode == 1 ); 1944 for( Int m = 0; m < pcVPS->getNumCp( iInVps ); m++ ) 1945 { 1946 READ_UVLC( uiCode, "cp_ref_voi" ); pcVPS->setCpRefVoi( iInVps, m, uiCode ); 1947 if( !pcVPS->getCpInSliceSegmentHeaderFlag( iInVps ) ) 1948 { 1949 Int j = pcVPS->getCpRefVoi( iInVps, m ); 1950 Int jInVps = pcVPS->getVoiInVps( j ); 1951 Int iCode; 1952 READ_SVLC( iCode, "vps_cp_scale" ); pcVPS->setVpsCpScale ( iInVps, jInVps, iCode ); 1953 READ_SVLC( iCode, "vps_cp_off" ); pcVPS->setVpsCpOff ( iInVps, jInVps, iCode ); 1954 READ_SVLC( iCode, "vps_cp_inv_scale_plus_scale" ); pcVPS->setVpsCpInvScale( iInVps, jInVps, iCode - pcVPS->getVpsCpScale( iInVps, jInVps ) ); 1955 READ_SVLC( iCode, "vps_cp_inv_off_plus_off" ); pcVPS->setVpsCpInvOff ( iInVps, jInVps, iCode - pcVPS->getVpsCpOff ( iInVps, jInVps ) ); 1956 } 1957 } 1958 } 1959 } 1960 pcVPS->deriveCpPresentFlag(); 1961 #else 1927 1962 UInt uiCode; 1928 1929 1963 1930 1964 UInt uiCamParPrecision = 0; … … 1975 2009 } 1976 2010 } 2011 #endif 1977 2012 } 1978 2013 #endif … … 2731 2766 rpcSlice->setLFCrossSliceBoundaryFlag( (uiCode==1)?true:false); 2732 2767 2768 #if HHI_CAM_PARA_K0052 2769 #if H_3D 2770 if ( getDecTop()->decProcAnnexI() ) 2771 { 2772 Int voiInVps = vps->getVoiInVps( rpcSlice->getViewIndex() ); 2773 if( vps->getCpInSliceSegmentHeaderFlag( voiInVps ) && !rpcSlice->getIsDepth() ) 2774 { 2775 for( Int m = 0; m < vps->getNumCp( voiInVps ); m++ ) 2776 { 2777 Int jInVps = vps->getVoiInVps( vps->getCpRefVoi( voiInVps, m )); 2778 READ_SVLC( iCode, "cp_scale" ); rpcSlice->setCpScale ( jInVps, iCode ); 2779 READ_SVLC( iCode, "cp_off" ); rpcSlice->setCpOff ( jInVps, iCode ); 2780 READ_SVLC( iCode, "cp_inv_scale_plus_scale" ); rpcSlice->setCpInvScale( jInVps, iCode - rpcSlice->getCpScale ( jInVps )); 2781 READ_SVLC( iCode, "cp_inv_off_plus_off" ); rpcSlice->setCpInvOff ( jInVps, iCode - rpcSlice->getCpOff ( jInVps )); 2782 } 2783 } 2784 } 2785 #endif 2786 #endif 2733 2787 } 2734 2788 … … 2754 2808 } 2755 2809 2810 #if !HHI_CAM_PARA_K0052 2756 2811 #if H_3D 2757 2812 #if H_3D_FCO … … 2771 2826 rpcSlice->setCamparaSlice( m_aaiTempScale, m_aaiTempOffset ); 2772 2827 } 2828 #endif 2773 2829 #endif 2774 2830 -
branches/HTM-13.1-dev0/source/Lib/TLibDecoder/TDecCAVLC.h
r1170 r1172 66 66 void parseShortTermRefPicSet (TComSPS* pcSPS, TComReferencePictureSet* pcRPS, Int idx); 67 67 68 69 #if !HHI_CAM_PARA_K0052 68 70 #if H_3D 69 71 Int** m_aaiTempScale; 70 72 Int** m_aaiTempOffset; 73 #endif 71 74 #endif 72 75 #if H_3D_ANNEX_SELECTION_FIX -
branches/HTM-13.1-dev0/source/Lib/TLibDecoder/TDecCu.cpp
r1164 r1172 290 290 #if H_MV_ENC_DEC_TRAC 291 291 DTRACE_CU_S("=========== coding_unit ===========\n") 292 #if H_MV_ENC_DEC_TRAC 293 #if ENC_DEC_TRACE 294 stopAtPos ( pcCU->getSlice()->getPOC(), 295 pcCU->getSlice()->getLayerId(), 296 uiLPelX, 297 uiTPelY, 298 uiRPelX-uiLPelX+1, 299 uiBPelY-uiTPelY+1); 300 #endif 301 #endif 302 292 303 #endif 293 304 … … 640 651 641 652 m_ppcCU[uiDepth]->copySubCU( pcCU, uiAbsPartIdx, uiDepth ); 642 643 #if H_MV_ENC_DEC_TRAC644 #if ENC_DEC_TRACE645 stopAtPos ( m_ppcCU[uiDepth]->getSlice()->getPOC(),646 m_ppcCU[uiDepth]->getSlice()->getLayerId(),647 m_ppcCU[uiDepth]->getCUPelX(),648 m_ppcCU[uiDepth]->getCUPelY(),649 m_ppcCU[uiDepth]->getWidth(0),650 m_ppcCU[uiDepth]->getHeight(0) );651 #endif652 #endif653 653 654 654 switch( m_ppcCU[uiDepth]->getPredictionMode(0) ) -
branches/HTM-13.1-dev0/source/Lib/TLibDecoder/TDecSbac.cpp
r1169 r1172 2215 2215 2216 2216 m_pcTDecBinIf->decodeBin( uiSymbol, m_cDBBPFlagSCModel.get( 0, 0, 0 ) ); 2217 2217 DTRACE_CU("dbbp_flag", uiSymbol) 2218 2218 PartSize ePartSize = pcCU->getPartitionSize( uiAbsPartIdx ); 2219 2219 AOF( ePartSize == SIZE_2NxN || ePartSize == SIZE_Nx2N ); -
branches/HTM-13.1-dev0/source/Lib/TLibDecoder/TDecTop.cpp
r1171 r1172 76 76 xDeleteArray( m_adBaseViewShiftLUT, MAX_NUM_LAYERS, MAX_NUM_LAYERS, 2 ); 77 77 xDeleteArray( m_aiBaseViewShiftLUT, MAX_NUM_LAYERS, MAX_NUM_LAYERS, 2 ); 78 #if HHI_CAM_PARA_K0052 79 xDeleteArray( m_receivedIdc, m_vps->getNumViews() ); 80 #else 78 81 xDeleteArray( m_receivedIdc, m_uiMaxViewIndex + 1 ); 82 #endif 79 83 } 80 84 … … 91 95 m_firstReceivedPoc = -2; 92 96 97 #if HHI_CAM_PARA_K0052 98 for (Int i = 0; i <= vps->getMaxLayersMinus1(); i++) 99 { 100 Int curViewIdxInVps = m_vps->getVoiInVps( m_vps->getViewIndex( m_vps->getLayerIdInNuh( i ) ) ) ; 101 m_bCamParsVaryOverTime = m_bCamParsVaryOverTime || vps->getCpInSliceSegmentHeaderFlag( curViewIdxInVps ); 102 } 103 104 assert( m_receivedIdc == NULL ); 105 m_receivedIdc = new Int*[ m_vps->getNumViews() ]; 106 for (Int i = 0; i < m_vps->getNumViews(); i++) 107 { 108 m_receivedIdc[i] = new Int[ m_vps->getNumViews() ]; 109 } 110 111 xResetReceivedIdc( true ); 112 113 for (Int voiInVps = 0; voiInVps < m_vps->getNumViews(); voiInVps++ ) 114 { 115 if( !m_vps->getCpInSliceSegmentHeaderFlag( voiInVps ) ) 116 { 117 for (Int baseVoiInVps = 0; baseVoiInVps < m_vps->getNumViews(); baseVoiInVps++ ) 118 { 119 if( m_vps->getCpPresentFlag( voiInVps, baseVoiInVps ) ) 120 { 121 m_receivedIdc [ baseVoiInVps ][ voiInVps ] = -1; 122 m_aaiCodedScale [ baseVoiInVps ][ voiInVps ] = m_vps->getCodedScale (voiInVps) [ baseVoiInVps ]; 123 m_aaiCodedOffset[ baseVoiInVps ][ voiInVps ] = m_vps->getCodedOffset (voiInVps) [ baseVoiInVps ]; 124 125 m_receivedIdc [ voiInVps ][ baseVoiInVps ] = -1; 126 m_aaiCodedScale [ voiInVps ][ baseVoiInVps ] = m_vps->getInvCodedScale (voiInVps) [ baseVoiInVps ]; 127 m_aaiCodedOffset[ voiInVps ][ baseVoiInVps ] = m_vps->getInvCodedOffset(voiInVps) [ baseVoiInVps ]; 128 xInitLUTs( baseVoiInVps, voiInVps, m_aaiCodedScale[ baseVoiInVps ][ voiInVps ], m_aaiCodedOffset[ baseVoiInVps ][ voiInVps ], m_adBaseViewShiftLUT, m_aiBaseViewShiftLUT ); 129 xInitLUTs( voiInVps, baseVoiInVps, m_aaiCodedScale[ voiInVps ][ baseVoiInVps ], m_aaiCodedOffset[ voiInVps ][ baseVoiInVps ], m_adBaseViewShiftLUT, m_aiBaseViewShiftLUT ); 130 } 131 } 132 } 133 } 134 } 135 136 #else 93 137 m_uiMaxViewIndex = -1; 94 138 for (Int i = 0; i <= vps->getMaxLayersMinus1(); i++) … … 98 142 m_uiMaxViewIndex = std::max( m_uiMaxViewIndex, curViewIdx ) ; 99 143 } 100 101 144 assert( m_receivedIdc == NULL ); 102 145 m_receivedIdc = new Int*[ m_uiMaxViewIndex + 1]; … … 131 174 } 132 175 176 #endif 177 178 179 133 180 Void 134 181 CamParsCollector::xResetReceivedIdc( Bool overWriteFlag ) 135 182 { 183 #if HHI_CAM_PARA_K0052 184 for (Int i = 0; i < m_vps->getNumViews(); i++) 185 { 186 for (Int j = 0; j < m_vps->getNumViews(); j++) 187 { 188 #else 136 189 for (Int i = 0; i <= m_uiMaxViewIndex; i++) 137 190 { 138 191 for (Int j = 0; j <= m_uiMaxViewIndex; j++) 139 192 { 193 #endif 140 194 if ( overWriteFlag || ( m_receivedIdc[i][j] != -1 ) ) 141 195 { … … 178 232 CamParsCollector::xInitLUTs( UInt uiSourceView, UInt uiTargetView, Int iScale, Int iOffset, Double****& radLUT, Int****& raiLUT) 179 233 { 234 #if HHI_CAM_PARA_K0052 235 Int iLog2DivLuma = m_uiBitDepthForLUT + m_vps->getCpPrecision() + 1 - m_iLog2Precision; AOF( iLog2DivLuma > 0 ); 236 #else 180 237 Int iLog2DivLuma = m_uiBitDepthForLUT + m_vps->getCamParPrecision() + 1 - m_iLog2Precision; AOF( iLog2DivLuma > 0 ); 238 #endif 181 239 Int iLog2DivChroma = iLog2DivLuma + 1; 182 240 … … 255 313 } 256 314 315 #if HHI_CAM_PARA_K0052 316 UInt voiInVps = m_vps->getVoiInVps(pcSlice->getViewIndex()); 317 if( m_vps->getCpInSliceSegmentHeaderFlag( voiInVps ) ) // check consistency of slice parameters here 318 { 319 for( Int baseVoiInVps = 0; baseVoiInVps < m_vps->getNumViews(); baseVoiInVps++ ) 320 { 321 if ( m_vps->getCpPresentFlag( voiInVps, baseVoiInVps ) ) 322 { 323 if ( m_receivedIdc[ voiInVps ][ baseVoiInVps ] != 0 ) 324 { 325 AOF( m_aaiCodedScale [ voiInVps ][ baseVoiInVps ] == pcSlice->getInvCodedScale () [ baseVoiInVps ] ); 326 AOF( m_aaiCodedOffset[ voiInVps ][ baseVoiInVps ] == pcSlice->getInvCodedOffset() [ baseVoiInVps ] ); 327 } 328 else 329 { 330 m_receivedIdc [ voiInVps ][ baseVoiInVps ] = 1; 331 m_aaiCodedScale [ voiInVps ][ baseVoiInVps ] = pcSlice->getInvCodedScale () [ baseVoiInVps ]; 332 m_aaiCodedOffset[ voiInVps ][ baseVoiInVps ] = pcSlice->getInvCodedOffset() [ baseVoiInVps ]; 333 xInitLUTs( voiInVps, baseVoiInVps, m_aaiCodedScale[ voiInVps ][ baseVoiInVps ], m_aaiCodedOffset[ voiInVps ][ baseVoiInVps ], m_adBaseViewShiftLUT, m_aiBaseViewShiftLUT); 334 } 335 if ( m_receivedIdc[ baseVoiInVps ][ voiInVps ] != 0 ) 336 { 337 AOF( m_aaiCodedScale [ baseVoiInVps ][ voiInVps ] == pcSlice->getCodedScale () [ baseVoiInVps ] ); 338 AOF( m_aaiCodedOffset[ baseVoiInVps ][ voiInVps ] == pcSlice->getCodedOffset () [ baseVoiInVps ] ); 339 } 340 else 341 { 342 m_receivedIdc [ baseVoiInVps ][ voiInVps ] = 1; 343 m_aaiCodedScale [ baseVoiInVps ][ voiInVps ] = pcSlice->getCodedScale () [ baseVoiInVps ]; 344 m_aaiCodedOffset[ baseVoiInVps ][ voiInVps ] = pcSlice->getCodedOffset () [ baseVoiInVps ]; 345 xInitLUTs( baseVoiInVps, voiInVps, m_aaiCodedScale[ baseVoiInVps ][ voiInVps ], m_aaiCodedOffset[ baseVoiInVps ][ voiInVps ], m_adBaseViewShiftLUT, m_aiBaseViewShiftLUT); 346 } 347 } 348 } 349 } 350 #else 257 351 UInt uiViewIndex = pcSlice->getViewIndex(); 258 352 if( m_vps->getCamParPresent( uiViewIndex ) ) … … 289 383 } 290 384 } 385 #endif 386 387 291 388 } 292 389 … … 311 408 if( iPOC == m_firstReceivedPoc ) 312 409 { 410 #if HHI_CAM_PARA_K0052 411 fprintf( m_pCodedScaleOffsetFile, "#ViewOrderIdx ViewIdVal\n" ); 412 fprintf( m_pCodedScaleOffsetFile, "#------------ -------------\n" ); 413 414 for( UInt voiInVps = 0; voiInVps < m_vps->getNumViews(); voiInVps++ ) 415 { 416 fprintf( m_pCodedScaleOffsetFile, "%13d %13d\n", m_vps->getViewOIdxList( voiInVps ), m_vps->getViewIdVal( m_vps->getViewOIdxList( voiInVps ) ) ); 417 } 418 fprintf( m_pCodedScaleOffsetFile, "\n\n"); 419 fprintf( m_pCodedScaleOffsetFile, "# StartFrame EndFrame TargetVOI BaseVOI CodedScale CodedOffset Precision\n" ); 420 fprintf( m_pCodedScaleOffsetFile, "#----------- ------------ ------------ ------------ ------------ ------------ ------------\n" ); 421 } 422 if( iPOC == m_firstReceivedPoc || m_bCamParsVaryOverTime ) 423 { 424 Int iS = iPOC; 425 Int iE = ( m_bCamParsVaryOverTime ? iPOC : ~( 1 << 31 ) ); 426 for( UInt voiInVps = 0; voiInVps < m_vps->getNumViews(); voiInVps++ ) 427 { 428 for( UInt baseVoiInVps = 0; baseVoiInVps < m_vps->getNumViews(); baseVoiInVps++ ) 429 { 430 if( voiInVps != baseVoiInVps ) 431 { 432 if ( m_receivedIdc[baseVoiInVps][voiInVps] != 0 ) 433 { 434 fprintf( m_pCodedScaleOffsetFile, "%12d %12d %12d %12d %12d %12d %12d\n", 435 iS, iE, m_vps->getViewOIdxList( voiInVps ), m_vps->getViewOIdxList( baseVoiInVps ), 436 m_aaiCodedScale [ baseVoiInVps ][ voiInVps ], 437 m_aaiCodedOffset[ baseVoiInVps ][ voiInVps ], m_vps->getCpPrecision() ); 438 #else 313 439 fprintf( m_pCodedScaleOffsetFile, "# ViewIndex ViewId\n" ); 314 440 fprintf( m_pCodedScaleOffsetFile, "#----------- ------------\n" ); … … 325 451 Int iS = iPOC; 326 452 Int iE = ( m_bCamParsVaryOverTime ? iPOC : ~( 1 << 31 ) ); 453 #if HHI_CAM_PARA_K0052 454 for( UInt uiViewIndex = 0; uiViewIndex < m_vps->getNumViews(); uiViewIndex++ ) 455 { 456 for( UInt uiBaseIndex = 0; uiBaseIndex < m_vps->getNumViews(); uiBaseIndex++ ) 457 #else 327 458 for( UInt uiViewIndex = 0; uiViewIndex <= m_uiMaxViewIndex; uiViewIndex++ ) 328 459 { 329 460 for( UInt uiBaseIndex = 0; uiBaseIndex <= m_uiMaxViewIndex; uiBaseIndex++ ) 461 #endif 330 462 { 331 463 if( uiViewIndex != uiBaseIndex ) … … 333 465 if ( m_receivedIdc[uiBaseIndex][uiViewIndex] != 0 ) 334 466 { 467 #if HHI_CAM_PARA_K0052 468 fprintf( m_pCodedScaleOffsetFile, "%12d %12d %12d %12d %12d %12d %12d\n", 469 iS, iE, uiViewIndex, uiBaseIndex, m_aaiCodedScale[ uiBaseIndex ][ uiViewIndex ], m_aaiCodedOffset[ uiBaseIndex ][ uiViewIndex ], m_vps->getCpPrecision() ); 470 #else 335 471 fprintf( m_pCodedScaleOffsetFile, "%12d %12d %12d %12d %12d %12d %12d\n", 336 472 iS, iE, uiViewIndex, uiBaseIndex, m_aaiCodedScale[ uiBaseIndex ][ uiViewIndex ], m_aaiCodedOffset[ uiBaseIndex ][ uiViewIndex ], m_vps->getCamParPrecision() ); 473 #endif 474 #endif 337 475 } 338 476 } -
branches/HTM-13.1-dev0/source/Lib/TLibDecoder/TDecTop.h
r1170 r1172 97 97 TComVPS* m_vps; 98 98 Int** m_receivedIdc; 99 #if!HHI_CAM_PARA_K0052 99 100 Int m_uiMaxViewIndex; 101 #endif 100 102 Int m_lastPoc; 101 103 Int m_firstReceivedPoc; -
branches/HTM-13.1-dev0/source/Lib/TLibEncoder/TEncCavlc.cpp
r1170 r1172 1614 1614 Void TEncCavlc::codeVPS3dExtension( TComVPS* pcVPS ) 1615 1615 { 1616 #if HHI_CAM_PARA_K0052 1617 WRITE_UVLC( pcVPS->getCpPrecision( ), "cp_precision" ); 1618 for (Int n = 1; n < pcVPS->getNumViews(); n++) 1619 { 1620 Int i = pcVPS->getViewOIdxList( n ); 1621 Int iInVps = pcVPS->getVoiInVps( i ); 1622 WRITE_CODE( pcVPS->getNumCp( iInVps ), 6, "num_cp" ); 1623 1624 if( pcVPS->getNumCp( iInVps ) > 0 ) 1625 { 1626 WRITE_FLAG( pcVPS->getCpInSliceSegmentHeaderFlag( iInVps ) ? 1 : 0 , "cp_in_slice_segment_header_flag" ); 1627 for( Int m = 0; m < pcVPS->getNumCp( iInVps ); m++ ) 1628 { 1629 WRITE_UVLC( pcVPS->getCpRefVoi( iInVps, m ), "cp_ref_voi" ); 1630 if( !pcVPS->getCpInSliceSegmentHeaderFlag( iInVps ) ) 1631 { 1632 Int j = pcVPS->getCpRefVoi( iInVps, m ); 1633 Int jInVps = pcVPS->getVoiInVps( j ); 1634 WRITE_SVLC( pcVPS->getVpsCpScale ( iInVps, jInVps ), "vps_cp_scale" ); 1635 WRITE_SVLC( pcVPS->getVpsCpOff ( iInVps, jInVps ), "vps_cp_off" ); 1636 WRITE_SVLC( pcVPS->getVpsCpInvScale( iInVps, jInVps ) + pcVPS->getVpsCpScale( iInVps, jInVps ), "vps_cp_inv_scale_plus_scale" ); 1637 WRITE_SVLC( pcVPS->getVpsCpInvOff ( iInVps, jInVps ) + pcVPS->getVpsCpOff ( iInVps, jInVps ), "vps_cp_inv_off_plus_off" ); 1638 } 1639 } 1640 } 1641 } 1642 #else 1616 1643 WRITE_UVLC( pcVPS->getCamParPrecision(), "cp_precision" ); 1617 1644 for (UInt viewIndex=1; viewIndex<pcVPS->getNumViews(); viewIndex++) … … 1633 1660 } 1634 1661 } 1662 #endif 1635 1663 } 1636 1664 #endif … … 2120 2148 WRITE_FLAG(pcSlice->getLFCrossSliceBoundaryFlag()?1:0, "slice_loop_filter_across_slices_enabled_flag"); 2121 2149 } 2122 } 2150 #if HHI_CAM_PARA_K0052 2151 #if H_3D 2152 if (getEncTop()->decProcAnnexI() ) 2153 { 2154 Int voiInVps = vps->getVoiInVps( pcSlice->getViewIndex() ); 2155 if( vps->getCpInSliceSegmentHeaderFlag( voiInVps ) && !pcSlice->getIsDepth() ) 2156 { 2157 for( Int m = 0; m < vps->getNumCp( voiInVps ); m++ ) 2158 { 2159 Int jInVps = vps->getVoiInVps( vps->getCpRefVoi( voiInVps, m )); 2160 WRITE_SVLC( pcSlice->getCpScale ( jInVps ) , "cp_scale" ); 2161 WRITE_SVLC( pcSlice->getCpOff ( jInVps ) , "cp_off" ); 2162 WRITE_SVLC( pcSlice->getCpInvScale( jInVps ) + pcSlice->getCpScale( jInVps ) , "cp_inv_scale_plus_scale" ); 2163 WRITE_SVLC( pcSlice->getCpInvOff ( jInVps ) + pcSlice->getCpOff ( jInVps ) , "cp_inv_off_plus_off" ); 2164 } 2165 } 2166 } 2167 #endif 2168 #endif 2169 } 2170 2171 #if !HHI_CAM_PARA_K0052 2123 2172 #if H_3D 2124 2173 #if H_3D_FCO … … 2136 2185 } 2137 2186 } 2187 #endif 2138 2188 #endif 2139 2189 -
branches/HTM-13.1-dev0/source/Lib/TLibEncoder/TEncCfg.h
r1170 r1172 380 380 381 381 //====== Camera Parameters ====== 382 #if !HHI_CAM_PARA_K0052 382 383 UInt m_uiCamParPrecision; 383 384 Bool m_bCamParInSliceHeader; 384 385 Int** m_aaiCodedScale; 385 386 Int** m_aaiCodedOffset; 387 #endif 386 388 TAppComCamPara* m_cameraParameters; 387 389 … … 921 923 922 924 //==== CAMERA PARAMETERS ========== 925 #if !HHI_CAM_PARA_K0052 923 926 Void setCamParPrecision ( UInt u ) { m_uiCamParPrecision = u; } 924 927 Void setCamParInSliceHeader ( Bool b ) { m_bCamParInSliceHeader = b; } 925 928 Void setCodedScale ( Int** p ) { m_aaiCodedScale = p; } 926 929 Void setCodedOffset ( Int** p ) { m_aaiCodedOffset = p; } 930 #endif 927 931 Void setCameraParameters ( TAppComCamPara* c) { m_cameraParameters = c; } 928 932 -
branches/HTM-13.1-dev0/source/Lib/TLibEncoder/TEncCu.cpp
r1169 r1172 2513 2513 m_pcPredSearch ->estIntraPredDIS ( rpcTempCU, m_ppcOrigYuv[uiDepth], m_ppcPredYuvTemp[uiDepth], m_ppcResiYuvTemp[uiDepth], m_ppcRecoYuvTemp[uiDepth], uiPreCalcDistC, false ); 2514 2514 2515 2515 #if ENC_DEC_TRACE && H_MV_ENC_DEC_TRAC 2516 Int oldTraceCopyBack = g_traceCopyBack; 2517 g_traceCopyBack = false; 2518 #endif 2516 2519 m_ppcRecoYuvTemp[uiDepth]->copyToPicLuma(rpcTempCU->getPic()->getPicYuvRec(), rpcTempCU->getAddr(), rpcTempCU->getZorderIdxInCU() ); 2520 #if ENC_DEC_TRACE && H_MV_ENC_DEC_TRAC 2521 g_traceCopyBack = oldTraceCopyBack; 2522 #endif 2517 2523 2518 2524 -
branches/HTM-13.1-dev0/source/Lib/TLibEncoder/TEncSbac.cpp
r1169 r1172 2383 2383 UInt uiSymbol = pcCU->getDBBPFlag( uiAbsPartIdx ) ? 1 : 0; 2384 2384 m_pcBinIf->encodeBin( uiSymbol, m_cDBBPFlagSCModel.get( 0, 0, 0 ) ); 2385 DTRACE_CU("dbbp_flag", uiSymbol) 2385 2386 } 2386 2387 #endif -
branches/HTM-13.1-dev0/source/Lib/TLibEncoder/TEncTop.cpp
r1170 r1172 417 417 #endif 418 418 #if H_3D 419 #if HHI_CAM_PARA_K0052 420 pcPicCurr->setScaleOffset( m_cameraParameters->getCodedScale(), m_cameraParameters->getCodedOffset() ); 421 #else 419 422 pcPicCurr->setScaleOffset( m_aaiCodedScale, m_aaiCodedOffset ); 423 #endif 420 424 #endif 421 425 }
Note: See TracChangeset for help on using the changeset viewer.