Changeset 1014 in 3DVCSoftware
- Timestamp:
- 24 Jul 2014, 06:29:55 (10 years ago)
- Location:
- branches/HTM-11.2-dev3-Samsung
- Files:
-
- 1 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-11.2-dev3-Samsung/source/Lib/TLibCommon/TypeDef.h
r1013 r1014 299 299 #define SHARP_DMM1_I0110 1 // LUT size reduction for DMM1 proposed in JCT3V-I0110 300 300 #define FIX_WARNING 1 // fix narrowing conversion of NumPocStCurr0,NumPocStCurr1 at TComSlice.cpp 301 #define FAST_SDC_OFFSET_DECISION_I0084 1 301 302 302 303 #if H_3D_DIM_DLT -
branches/HTM-11.2-dev3-Samsung/source/Lib/TLibEncoder/TEncCu.cpp
r983 r1014 2003 2003 if( rpcTempCU->getSlice()->getVPS()->getInterSDCFlag( rpcTempCU->getSlice()->getLayerIdInVps() ) && rpcTempCU->getSlice()->getIsDepth() && !uiNoResidual ) 2004 2004 { 2005 #if FAST_SDC_OFFSET_DECISION_I0084 2006 Double dOffsetCost[3] = {MAX_DOUBLE,MAX_DOUBLE,MAX_DOUBLE}; 2007 for( Int uiOffest = 1 ; uiOffest <= 5 ; uiOffest++ ) 2008 #else 2005 2009 for( Int uiOffest = -2 ; uiOffest <= 2 ; uiOffest++ ) 2010 #endif 2006 2011 { 2012 #if FAST_SDC_OFFSET_DECISION_I0084 2013 if( uiOffest > 3) 2014 { 2015 if ( dOffsetCost[0] < (0.9*dOffsetCost[1]) && dOffsetCost[0] < (0.9*dOffsetCost[2]) ) 2016 { 2017 continue; 2018 } 2019 if ( dOffsetCost[1] < dOffsetCost[0] && dOffsetCost[0] < dOffsetCost[2] && uiOffest == 5) 2020 { 2021 continue; 2022 } 2023 if ( dOffsetCost[0] < dOffsetCost[1] && dOffsetCost[2] < dOffsetCost[0] && uiOffest == 4) 2024 { 2025 continue; 2026 } 2027 } 2028 #endif 2007 2029 if( rpcTempCU != rpcTempCUPre ) 2008 2030 { … … 2026 2048 } 2027 2049 #endif 2050 #if FAST_SDC_OFFSET_DECISION_I0084 2051 Int iSdcOffset = 0; 2052 if(uiOffest % 2 == 0) 2053 { 2054 iSdcOffset = uiOffest >> 1; 2055 } 2056 else 2057 { 2058 iSdcOffset = -1 * (uiOffest >> 1); 2059 } 2060 m_pcPredSearch->encodeResAndCalcRdInterSDCCU( rpcTempCU, 2061 m_ppcOrigYuv[uhDepth], 2062 ( rpcTempCU != rpcTempCUPre ) ? m_ppcPredYuvBest[uhDepth] : m_ppcPredYuvTemp[uhDepth], 2063 m_ppcResiYuvTemp[uhDepth], 2064 m_ppcRecoYuvTemp[uhDepth], 2065 iSdcOffset, 2066 uhDepth ); 2067 if (uiOffest <= 3 ) 2068 { 2069 dOffsetCost [uiOffest -1] = rpcTempCU->getTotalCost(); 2070 } 2071 #else 2028 2072 m_pcPredSearch->encodeResAndCalcRdInterSDCCU( rpcTempCU, 2029 2073 m_ppcOrigYuv[uhDepth], … … 2033 2077 uiOffest, 2034 2078 uhDepth ); 2079 #endif 2035 2080 2036 2081 xCheckDQP( rpcTempCU ); … … 2239 2284 if( rpcTempCU->getSlice()->getVPS()->getInterSDCFlag( rpcTempCU->getSlice()->getLayerIdInVps() ) && rpcTempCU->getSlice()->getIsDepth() && ePartSize == SIZE_2Nx2N) 2240 2285 { 2286 #if FAST_SDC_OFFSET_DECISION_I0084 2287 Double dOffsetCost[3] = {MAX_DOUBLE,MAX_DOUBLE,MAX_DOUBLE}; 2288 for( Int uiOffest = 1 ; uiOffest <= 5 ; uiOffest++ ) 2289 #else 2241 2290 for( Int uiOffest = -2 ; uiOffest <= 2 ; uiOffest++ ) 2242 { 2291 #endif 2292 { 2293 #if FAST_SDC_OFFSET_DECISION_I0084 2294 if( uiOffest > 3) 2295 { 2296 if ( dOffsetCost[0] < (0.9*dOffsetCost[1]) && dOffsetCost[0] < (0.9*dOffsetCost[2]) ) 2297 { 2298 continue; 2299 } 2300 if ( dOffsetCost[1] < dOffsetCost[0] && dOffsetCost[0] < dOffsetCost[2] && uiOffest == 5) 2301 { 2302 continue; 2303 } 2304 if ( dOffsetCost[0] < dOffsetCost[1] && dOffsetCost[2] < dOffsetCost[0] && uiOffest == 4) 2305 { 2306 continue; 2307 } 2308 } 2309 #endif 2243 2310 if( rpcTempCU != rpcTempCUPre ) 2244 2311 { … … 2264 2331 #endif 2265 2332 2333 #if FAST_SDC_OFFSET_DECISION_I0084 2334 Int iSdcOffset = 0; 2335 if(uiOffest % 2 == 0) 2336 { 2337 iSdcOffset = uiOffest >> 1; 2338 } 2339 else 2340 { 2341 iSdcOffset = -1 * (uiOffest >> 1); 2342 } 2343 m_pcPredSearch->encodeResAndCalcRdInterSDCCU( rpcTempCU, 2344 m_ppcOrigYuv[uhDepth], 2345 ( rpcTempCU != rpcTempCUPre ) ? m_ppcPredYuvBest[uhDepth] : m_ppcPredYuvTemp[uhDepth], 2346 m_ppcResiYuvTemp[uhDepth], 2347 m_ppcRecoYuvTemp[uhDepth], 2348 iSdcOffset, 2349 uhDepth ); 2350 if (uiOffest <= 3 ) 2351 { 2352 dOffsetCost [uiOffest -1] = rpcTempCU->getTotalCost(); 2353 } 2354 #else 2266 2355 m_pcPredSearch->encodeResAndCalcRdInterSDCCU( rpcTempCU, 2267 2356 m_ppcOrigYuv[uhDepth], … … 2271 2360 uiOffest, 2272 2361 uhDepth ); 2362 #endif 2273 2363 2274 2364 xCheckDQP( rpcTempCU ); -
branches/HTM-11.2-dev3-Samsung/source/Lib/TLibEncoder/TEncSearch.cpp
r1001 r1014 3284 3284 #endif 3285 3285 pcCU->setSDCFlagSubParts( (uiSDC != 0), uiPartOffset, uiDepth + uiInitTrDepth ); 3286 #if FAST_SDC_OFFSET_DECISION_I0084 3287 Double dOffsetCost[3] = {MAX_DOUBLE,MAX_DOUBLE,MAX_DOUBLE}; 3288 for( Int iOffset = 1; iOffset <= 5; iOffset++ ) 3289 #else 3286 3290 for( Int iSDCDeltaResi = -2; iSDCDeltaResi <= 2; iSDCDeltaResi++ ) 3287 { 3291 #endif 3292 { 3293 #if FAST_SDC_OFFSET_DECISION_I0084 3294 Int iSDCDeltaResi = 0; 3295 if(iOffset % 2 == 0) 3296 { 3297 iSDCDeltaResi = iOffset >> 1; 3298 } 3299 else 3300 { 3301 iSDCDeltaResi = -1 * (iOffset >> 1); 3302 } 3303 #endif 3288 3304 if( ( uiSDC == 0 ) && iSDCDeltaResi != 0 ) 3289 3305 { 3290 3306 continue; 3291 3307 } 3308 #if FAST_SDC_OFFSET_DECISION_I0084 3309 if( iOffset > 3) 3310 { 3311 if ( dOffsetCost[0] < (0.9*dOffsetCost[1]) && dOffsetCost[0] < (0.9*dOffsetCost[2]) ) 3312 { 3313 continue; 3314 } 3315 if ( dOffsetCost[1] < dOffsetCost[0] && dOffsetCost[0] < dOffsetCost[2] && iOffset == 5) 3316 { 3317 continue; 3318 } 3319 if ( dOffsetCost[0] < dOffsetCost[1] && dOffsetCost[2] < dOffsetCost[0] && iOffset == 4) 3320 { 3321 continue; 3322 } 3323 } 3324 #endif 3292 3325 #endif 3293 3326 … … 3335 3368 // start encoding with SDC 3336 3369 xIntraCodingSDC(pcCU, uiPartOffset, pcOrgYuv, pcPredYuv, uiPUDistY, dPUCost, ( testZeroResi != 0 ), iSDCDeltaResi ); 3370 #if FAST_SDC_OFFSET_DECISION_I0084 3371 if ( testZeroResi == 0 && iOffset <= 3 ) 3372 { 3373 dOffsetCost [iOffset -1] = dPUCost; 3374 } 3375 #endif 3337 3376 } 3338 3377 else
Note: See TracChangeset for help on using the changeset viewer.