Changeset 41 in 3DVCSoftware for branches/0.3-poznan-univ/source/Lib/TLibEncoder
- Timestamp:
- 26 Mar 2012, 09:03:21 (13 years ago)
- Location:
- branches/0.3-poznan-univ/source/Lib/TLibEncoder
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/0.3-poznan-univ/source/Lib/TLibEncoder/TEncCavlc.cpp
r28 r41 348 348 #endif 349 349 #if POZNAN_NONLINEAR_DEPTH 350 // Depth power coefficient 351 #if POZNAN_NONLINEAR_DEPTH_SEND_AS_BYTE 352 UInt uiCode = quantizeDepthPower(pcSPS->getDepthPower()); 353 xWriteCode(uiCode, 8); 354 #else 355 float fCode = pcSPS->getDepthPower(); 356 UInt uiCode = *((UInt*)&fCode); 357 //uiCode &= ~0x80000000; 358 xWriteCode(uiCode, sizeof(float)*8); // we do not send sign?; 359 #endif 350 if( pcSPS->getUseNonlinearDepth() ) 351 { 352 xWriteFlag( 1 ); //Nonlinear Depth Representation 353 // Nonlinear Depth Model coefficient 354 xWriteUvlc(pcSPS->getNonlinearDepthModel().m_iNum); 355 for (int i=1; i<=pcSPS->getNonlinearDepthModel().m_iNum; ++i) 356 xWriteUvlc(pcSPS->getNonlinearDepthModel().m_aiPoints[i]); 357 } 358 else 359 { 360 xWriteFlag( 0 ); // Don't use Nonlinear Depth Representation 361 } 360 362 #endif 361 363 } -
branches/0.3-poznan-univ/source/Lib/TLibEncoder/TEncCfg.h
r28 r41 159 159 Bool m_bUseDMM; 160 160 #endif 161 #if HHI_DMM_PRED_TEX && FLEX_CODING_ORDER 162 Bool m_bUseDMM34; 163 #endif 161 164 #if HHI_MPI 162 165 Bool m_bUseMVI; … … 232 235 #endif 233 236 #if POZNAN_NONLINEAR_DEPTH 234 Float m_fDepthPower; 237 TComNonlinearDepthModel m_cNonlinearDepthModel; 238 Bool m_bUseNonlinearDepth; 235 239 #endif 236 240 … … 335 339 336 340 #if POZNAN_NONLINEAR_DEPTH 337 inline Float getDepthPower() { return m_fDepthPower; } 338 inline Void setDepthPower(Float p) { m_fDepthPower = p; } 339 #else 340 inline Float getDepthPower() { return 1.0f; } 341 inline TComNonlinearDepthModel& getNonlinearDepthModel() { return m_cNonlinearDepthModel; } 342 inline Void setNonlinearDepthModel( TComNonlinearDepthModel &rp ) { m_cNonlinearDepthModel = rp; } 343 344 Void setUseNonlinearDepth ( Bool bVal ) { m_bUseNonlinearDepth = bVal; } 345 bool getUseNonlinearDepth () { return m_bUseNonlinearDepth; } 341 346 #endif 342 347 … … 457 462 Bool getUseDMM() { return m_bUseDMM; } 458 463 #endif 459 464 #if HHI_DMM_PRED_TEX && FLEX_CODING_ORDER 465 Void setUseDMM34( Bool b) { m_bUseDMM34 = b; } 466 Bool getUseDMM34() { return m_bUseDMM34; } 467 #endif 460 468 #if LM_CHROMA 461 469 Bool getUseLMChroma () { return m_bUseLMChroma; } -
branches/0.3-poznan-univ/source/Lib/TLibEncoder/TEncGOP.cpp
r28 r41 175 175 // GT FIX 176 176 std::vector<TComPic*> apcSpatRefPics = m_pcEncTop->getEncTop()->getSpatialRefPics( pcPic->getViewIdx(), pcSlice->getPOC(), m_pcEncTop->isDepthCoder() ); 177 TComPic * const pcTexturePic = m_pcEncTop->isDepthCoder() ? m_pcEncTop->getEncTop()->getPicFromView( pcPic->getViewIdx(), pcSlice->getPOC(), false ) : NULL; 177 TComPic * const pcTexturePic = ( m_pcEncTop->isDepthCoder()) ? m_pcEncTop->getEncTop()->getPicFromView( pcPic->getViewIdx(), pcSlice->getPOC(), false ) : NULL; 178 TComPic * const pcDepthPic = (!m_pcEncTop->isDepthCoder()) ? m_pcEncTop->getEncTop()->getPicFromView( pcPic->getViewIdx(), pcSlice->getPOC(), true ) : NULL; 178 179 assert( ! m_pcEncTop->isDepthCoder() || pcTexturePic != NULL ); 180 assert( m_pcEncTop->isDepthCoder() || pcDepthPic != NULL ); 179 181 pcSlice->setTexturePic( pcTexturePic ); 182 pcSlice->setDepthPic ( pcDepthPic ); 180 183 181 184 pcSlice->setRefPicListFromGOPSTring( rcListPic, apcSpatRefPics ); -
branches/0.3-poznan-univ/source/Lib/TLibEncoder/TEncSbac.cpp
r28 r41 1178 1178 #endif 1179 1179 #if HHI_DMM_PRED_TEX 1180 #if FLEX_CODING_ORDER 1181 if ( !pcCU->getSlice()->getSPS()->getUseDMM34() ) 1182 { 1183 assert( uiDir != DMM_WEDGE_PREDTEX_D_IDX ); 1184 assert( uiDir != DMM_CONTOUR_PREDTEX_D_IDX ); 1185 } 1186 #endif 1180 1187 if( uiDir == DMM_WEDGE_PREDTEX_D_IDX ) { xCodeWedgePredTexDeltaInfo ( pcCU, uiAbsPartIdx ); } 1181 1188 if( uiDir == DMM_CONTOUR_PREDTEX_D_IDX ) { xCodeContourPredTexDeltaInfo( pcCU, uiAbsPartIdx ); } -
branches/0.3-poznan-univ/source/Lib/TLibEncoder/TEncSearch.cpp
r28 r41 1934 1934 #endif 1935 1935 #if HHI_DMM_PRED_TEX 1936 #if FLEX_CODING_ORDER 1937 if ( pcCU->getSlice()->getSPS()->getUseDMM34() ) 1938 { 1939 #endif 1936 1940 TComYuv cTempYuv; cTempYuv.create( uiWidth, uiHeight ); cTempYuv.clear(); 1937 1941 Pel* piTempY = cTempYuv.getLumaAddr(); … … 1968 1972 1969 1973 cTempYuv.destroy(); 1974 #if FLEX_CODING_ORDER 1975 } 1976 #endif 1970 1977 #endif 1971 1978 } … … 1996 2003 #else 1997 2004 #if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX 2005 #if HHI_DMM_PRED_TEX && FLEX_CODING_ORDER 2006 if( m_pcEncCfg->isDepthCoder() && !predIntraLumaDMMAvailable( uiOrgMode, uiWidth, uiHeight, pcCU->getSlice()->getSPS()->getUseDMM34() ) ) 2007 #else 1998 2008 if( m_pcEncCfg->isDepthCoder() && !predIntraLumaDMMAvailable( uiOrgMode, uiWidth, uiHeight ) ) 2009 #endif 1999 2010 continue; 2000 2011 #endif … … 2084 2095 #else 2085 2096 #if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX 2097 #if HHI_DMM_PRED_TEX && FLEX_CODING_ORDER 2098 if( m_pcEncCfg->isDepthCoder() && !predIntraLumaDMMAvailable( uiOrgMode, uiWidth, uiHeight, pcCU->getSlice()->getSPS()->getUseDMM34() ) ) 2099 #else 2086 2100 if( m_pcEncCfg->isDepthCoder() && !predIntraLumaDMMAvailable( uiOrgMode, uiWidth, uiHeight ) ) 2101 #endif 2087 2102 continue; 2088 2103 #endif … … 2727 2742 } 2728 2743 2744 #if HHI_DMM_PRED_TEX && FLEX_CODING_ORDER 2745 Bool TEncSearch::predIntraLumaDMMAvailable( UInt uiMode, UInt uiWidth, UInt uiHeight, Bool bDMMAvailable34 ) 2746 #else 2729 2747 Bool TEncSearch::predIntraLumaDMMAvailable( UInt uiMode, UInt uiWidth, UInt uiHeight ) 2748 #endif 2730 2749 { 2731 2750 if( uiMode <= MAX_MODE_ID_INTRA_DIR ) return true; … … 2755 2774 bDMMAvailable = false; 2756 2775 } 2776 #if FLEX_CODING_ORDER 2777 if ( !bDMMAvailable34 ) 2778 { 2779 bDMMAvailable = false; 2780 } 2781 #endif 2757 2782 } 2758 2783 -
branches/0.3-poznan-univ/source/Lib/TLibEncoder/TEncSearch.h
r28 r41 210 210 Bool predIntraLumaDMMAvailable( UInt uiMode, 211 211 UInt uiWidth, 212 #if HHI_DMM_PRED_TEX && FLEX_CODING_ORDER 213 UInt uiHeight, 214 Bool bDMMAvailable34 ); 215 #else 212 216 UInt uiHeight ); 217 #endif 213 218 #endif 214 219 #if HHI_DMM_WEDGE_INTRA -
branches/0.3-poznan-univ/source/Lib/TLibEncoder/TEncTop.cpp
r28 r41 304 304 305 305 bool bSomethingCoded = false ; 306 306 #if FLEX_CODING_ORDER 307 if (TEncTop::m_bPicWaitingForCoding ) 308 #else 307 309 if (m_bPicWaitingForCoding ) 310 #endif 308 311 { 309 312 std::map<Int, TComPic*>::iterator cIter = m_acInputPicMap.find( (Int)m_cSeqIter.getPoc() ); … … 659 662 #endif 660 663 661 #if POZNAN_NONLINEAR_DEPTH 662 m_cSPS.setDepthPower ( m_fDepthPower ); 663 // OLGIERD: ToDo - QP-Tex should not use getDepthPower() from texture SPS. 664 #if POZNAN_NONLINEAR_DEPTH 665 m_cSPS.setNonlinearDepthModel ( m_cNonlinearDepthModel ); 666 m_cSPS.setUseNonlinearDepth ( m_bUseNonlinearDepth ); 667 // OLGIERD: ToDo - QP-Tex should not use getNonlinearDepthModel() from texture SPS. 664 668 #endif 665 669
Note: See TracChangeset for help on using the changeset viewer.