Changeset 5 in 3DVCSoftware for trunk/source/Lib/TLibDecoder
- Timestamp:
- 12 Dec 2011, 18:35:44 (13 years ago)
- Location:
- trunk/source/Lib/TLibDecoder
- Files:
-
- 19 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/Lib/TLibDecoder/SEIread.cpp
r2 r5 1 /* The copyright in this software is being made available under the BSD 2 * License, included below. This software may be subject to other third party 3 * and contributor rights, including patent rights, and no such rights are 4 * granted under this license. 5 * 6 * Copyright (c) 2010-2011, ISO/IEC 7 * All rights reserved. 8 * 9 * Redistribution and use in source and binary forms, with or without 10 * modification, are permitted provided that the following conditions are met: 11 * 12 * * Redistributions of source code must retain the above copyright notice, 13 * this list of conditions and the following disclaimer. 14 * * Redistributions in binary form must reproduce the above copyright notice, 15 * this list of conditions and the following disclaimer in the documentation 16 * and/or other materials provided with the distribution. 17 * * Neither the name of the ISO/IEC nor the names of its contributors may 18 * be used to endorse or promote products derived from this software without 19 * specific prior written permission. 20 * 21 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 22 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS 25 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 26 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 27 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 30 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 31 * THE POSSIBILITY OF SUCH DAMAGE. 32 */ 33 1 34 2 35 -
trunk/source/Lib/TLibDecoder/SEIread.h
r2 r5 1 /* The copyright in this software is being made available under the BSD 2 * License, included below. This software may be subject to other third party 3 * and contributor rights, including patent rights, and no such rights are 4 * granted under this license. 5 * 6 * Copyright (c) 2010-2011, ISO/IEC 7 * All rights reserved. 8 * 9 * Redistribution and use in source and binary forms, with or without 10 * modification, are permitted provided that the following conditions are met: 11 * 12 * * Redistributions of source code must retain the above copyright notice, 13 * this list of conditions and the following disclaimer. 14 * * Redistributions in binary form must reproduce the above copyright notice, 15 * this list of conditions and the following disclaimer in the documentation 16 * and/or other materials provided with the distribution. 17 * * Neither the name of the ISO/IEC nor the names of its contributors may 18 * be used to endorse or promote products derived from this software without 19 * specific prior written permission. 20 * 21 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 22 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS 25 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 26 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 27 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 30 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 31 * THE POSSIBILITY OF SUCH DAMAGE. 32 */ 33 1 34 2 35 -
trunk/source/Lib/TLibDecoder/TDecBinCoder.h
r2 r5 1 /* The copyright in this software is being made available under the BSD 2 * License, included below. This software may be subject to other third party 3 * and contributor rights, including patent rights, and no such rights are 4 * granted under this license. 5 * 6 * Copyright (c) 2010-2011, ISO/IEC 7 * All rights reserved. 8 * 9 * Redistribution and use in source and binary forms, with or without 10 * modification, are permitted provided that the following conditions are met: 11 * 12 * * Redistributions of source code must retain the above copyright notice, 13 * this list of conditions and the following disclaimer. 14 * * Redistributions in binary form must reproduce the above copyright notice, 15 * this list of conditions and the following disclaimer in the documentation 16 * and/or other materials provided with the distribution. 17 * * Neither the name of the ISO/IEC nor the names of its contributors may 18 * be used to endorse or promote products derived from this software without 19 * specific prior written permission. 20 * 21 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 22 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS 25 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 26 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 27 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 30 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 31 * THE POSSIBILITY OF SUCH DAMAGE. 32 */ 33 1 34 2 35 -
trunk/source/Lib/TLibDecoder/TDecBinCoderCABAC.cpp
r2 r5 1 /* The copyright in this software is being made available under the BSD 2 * License, included below. This software may be subject to other third party 3 * and contributor rights, including patent rights, and no such rights are 4 * granted under this license. 5 * 6 * Copyright (c) 2010-2011, ISO/IEC 7 * All rights reserved. 8 * 9 * Redistribution and use in source and binary forms, with or without 10 * modification, are permitted provided that the following conditions are met: 11 * 12 * * Redistributions of source code must retain the above copyright notice, 13 * this list of conditions and the following disclaimer. 14 * * Redistributions in binary form must reproduce the above copyright notice, 15 * this list of conditions and the following disclaimer in the documentation 16 * and/or other materials provided with the distribution. 17 * * Neither the name of the ISO/IEC nor the names of its contributors may 18 * be used to endorse or promote products derived from this software without 19 * specific prior written permission. 20 * 21 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 22 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS 25 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 26 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 27 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 30 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 31 * THE POSSIBILITY OF SUCH DAMAGE. 32 */ 33 1 34 2 35 -
trunk/source/Lib/TLibDecoder/TDecBinCoderCABAC.h
r2 r5 1 /* The copyright in this software is being made available under the BSD 2 * License, included below. This software may be subject to other third party 3 * and contributor rights, including patent rights, and no such rights are 4 * granted under this license. 5 * 6 * Copyright (c) 2010-2011, ISO/IEC 7 * All rights reserved. 8 * 9 * Redistribution and use in source and binary forms, with or without 10 * modification, are permitted provided that the following conditions are met: 11 * 12 * * Redistributions of source code must retain the above copyright notice, 13 * this list of conditions and the following disclaimer. 14 * * Redistributions in binary form must reproduce the above copyright notice, 15 * this list of conditions and the following disclaimer in the documentation 16 * and/or other materials provided with the distribution. 17 * * Neither the name of the ISO/IEC nor the names of its contributors may 18 * be used to endorse or promote products derived from this software without 19 * specific prior written permission. 20 * 21 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 22 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS 25 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 26 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 27 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 30 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 31 * THE POSSIBILITY OF SUCH DAMAGE. 32 */ 33 1 34 2 35 -
trunk/source/Lib/TLibDecoder/TDecCAVLC.cpp
r2 r5 1 /* The copyright in this software is being made available under the BSD 2 * License, included below. This software may be subject to other third party 3 * and contributor rights, including patent rights, and no such rights are 4 * granted under this license. 5 * 6 * Copyright (c) 2010-2011, ISO/IEC 7 * All rights reserved. 8 * 9 * Redistribution and use in source and binary forms, with or without 10 * modification, are permitted provided that the following conditions are met: 11 * 12 * * Redistributions of source code must retain the above copyright notice, 13 * this list of conditions and the following disclaimer. 14 * * Redistributions in binary form must reproduce the above copyright notice, 15 * this list of conditions and the following disclaimer in the documentation 16 * and/or other materials provided with the distribution. 17 * * Neither the name of the ISO/IEC nor the names of its contributors may 18 * be used to endorse or promote products derived from this software without 19 * specific prior written permission. 20 * 21 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 22 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS 25 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 26 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 27 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 30 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 31 * THE POSSIBILITY OF SUCH DAMAGE. 32 */ 33 1 34 2 35 … … 145 178 xReadFlag( uiCode ); pcSPS->setUseALF ( uiCode ? true : false ); 146 179 xReadFlag( uiCode ); pcSPS->setUseDQP ( uiCode ? true : false ); 147 #if ! SB_NO_LowDelayCoding180 #if !HHI_NO_LowDelayCoding 148 181 xReadFlag( uiCode ); pcSPS->setUseLDC ( uiCode ? true : false ); 149 182 #endif … … 193 226 #endif 194 227 195 #if HHI_DMM_ INTRA228 #if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX 196 229 g_dDeltaDCsQuantOffset = Double(g_uiBitIncrement) - 2.0; 197 230 #endif … … 209 242 { // baseview SPS -> set standard values 210 243 pcSPS->initMultiviewSPS ( 0 ); 244 #if DEPTH_MAP_GENERATION 211 245 pcSPS->setPredDepthMapGeneration( 0, false ); 246 #endif 247 #if HHI_INTER_VIEW_RESIDUAL_PRED 212 248 pcSPS->setMultiviewResPredMode ( 0 ); 249 #endif 213 250 } 214 251 else … … 220 257 xReadSvlc( iCode ); // view order index 221 258 pcSPS->initMultiviewSPSDepth ( uiCode, iCode ); 259 #if DEPTH_MAP_GENERATION 222 260 pcSPS->setPredDepthMapGeneration( uiCode, true ); 261 #endif 262 #if HHI_INTER_VIEW_RESIDUAL_PRED 223 263 pcSPS->setMultiviewResPredMode ( 0 ); 224 #if HHI_DMM_INTRA 264 #endif 265 #if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX 225 266 xReadFlag( uiCode ); 226 pcSPS->setUseDepthModelModes( uiCode ? true : false ); 227 #endif 267 pcSPS->setUseDMM( uiCode ? true : false ); 268 #endif 269 #if HHI_MPI 228 270 xReadFlag( uiCode ); 229 271 pcSPS->setUseMVI( uiCode ? true : false ); 272 #endif 230 273 } 231 274 else … … 250 293 pcSPS->initMultiviewSPS( uiViewId, iVOI, uiCamParPrecision, bCamParSlice, m_aaiTempScale, m_aaiTempOffset ); 251 294 252 UInt uiPredDepthMapGeneration = 0, uiMultiviewMvPredMode = 0, uiPdmPrecision = 0, uiMultiviewResPredMode = 0; 295 #if DEPTH_MAP_GENERATION 296 UInt uiPredDepthMapGeneration = 0, uiPdmPrecision = 0; 297 #if HHI_INTER_VIEW_MOTION_PRED 298 UInt uiMultiviewMvPredMode = 0; 299 #endif 300 #if HHI_INTER_VIEW_RESIDUAL_PRED 301 UInt uiMultiviewResPredMode = 0; 302 #endif 253 303 xReadUvlc( uiPredDepthMapGeneration ); 254 304 if( uiPredDepthMapGeneration ) … … 260 310 xReadSvlc( iCode ); m_aaiTempPdmOffset [ uiViewId ][ uiBaseId ] = iCode; 261 311 } 312 #if HHI_INTER_VIEW_MOTION_PRED 262 313 xReadUvlc ( uiMultiviewMvPredMode ); 314 #endif 315 #if HHI_INTER_VIEW_RESIDUAL_PRED 263 316 xReadFlag ( uiMultiviewResPredMode ); 264 } 317 #endif 318 } 319 #if HHI_INTER_VIEW_MOTION_PRED 265 320 pcSPS->setPredDepthMapGeneration( uiViewId, false, uiPredDepthMapGeneration, uiMultiviewMvPredMode, uiPdmPrecision, m_aaiTempPdmScaleNomDelta, m_aaiTempPdmOffset ); 321 #else 322 pcSPS->setPredDepthMapGeneration( uiViewId, false, uiPredDepthMapGeneration, 0, uiPdmPrecision, m_aaiTempPdmScaleNomDelta, m_aaiTempPdmOffset ); 323 #endif 324 #if HHI_INTER_VIEW_RESIDUAL_PRED 266 325 pcSPS->setMultiviewResPredMode ( uiMultiviewResPredMode ); 326 #endif 327 #endif 328 #if HHI_MPI 267 329 pcSPS->setUseMVI( false ); 330 #endif 268 331 } 269 332 } … … 844 907 845 908 return ; 846 }847 #endif848 849 #if MW_MVI_SIGNALLING_MODE == 0850 Void TDecCavlc::parseMvInheritanceFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )851 {852 const Int iTextureModeDepth = pcCU->getTextureModeDepth( uiAbsPartIdx );853 if( iTextureModeDepth != -1 && uiDepth > iTextureModeDepth )854 return;855 856 UInt uiSymbol;857 xReadFlag( uiSymbol );858 if( uiSymbol == 1 )859 {860 pcCU->setTextureModeDepthSubParts( uiDepth, uiAbsPartIdx, uiDepth );861 }862 909 } 863 910 #endif … … 2574 2621 2575 2622 2623 #if HHI_INTER_VIEW_MOTION_PRED || HHI_MPI 2576 2624 Void 2577 2625 TDecCavlc::parseMergeIndexMV( TComDataCU* pcCU, UInt& ruiMergeIndex, UInt uiAbsPartIdx, UInt uiDepth ) 2578 2626 { 2579 2627 UInt uiNumCand = 0; 2580 #if MW_MVI_SIGNALLING_MODE == 12628 #if HHI_MPI 2581 2629 const Bool bMVIAvailable = pcCU->getSlice()->getSPS()->getUseMVI() && pcCU->getSlice()->getSliceType() != I_SLICE; 2582 const UInt uiMviMergePos = bMVIAvailable ? MVI_MERGE_POS : MRG_MAX_NUM_CANDS;2630 const UInt uiMviMergePos = bMVIAvailable ? HHI_MPI_MERGE_POS : MRG_MAX_NUM_CANDS; 2583 2631 if( bMVIAvailable ) 2584 2632 uiNumCand++; … … 2605 2653 for( UInt uiIdx = 0; uiIdx <= ruiMergeIndex; uiIdx++ ) 2606 2654 { 2607 #if MW_MVI_SIGNALLING_MODE == 12655 #if HHI_MPI 2608 2656 if( uiIdx > uiMviMergePos ) 2609 2657 { … … 2620 2668 } 2621 2669 } 2622 #if MW_MVI_SIGNALLING_MODE == 12670 #if HHI_MPI 2623 2671 if( ruiMergeIndex > uiMviMergePos ) 2624 2672 { … … 2631 2679 #endif 2632 2680 } 2681 #endif 2633 2682 2634 2683 … … 2642 2691 Void TDecCavlc::parseMergeIndex ( TComDataCU* pcCU, UInt& ruiMergeIndex, UInt uiAbsPartIdx, UInt uiDepth ) 2643 2692 { 2644 #if MW_MVI_SIGNALLING_MODE == 1 2645 if( ( pcCU->getSlice()->getSPS()->getViewId() > 0 && ( pcCU->getSlice()->getSPS()->getMultiviewMvPredMode() & PDM_USE_FOR_MERGE ) == PDM_USE_FOR_MERGE ) || 2646 ( pcCU->getSlice()->getSPS()->getUseMVI() && pcCU->getSlice()->getSliceType() != I_SLICE && pcCU->getPartitionSize( uiAbsPartIdx ) == SIZE_2Nx2N ) ) 2647 #else 2648 if( pcCU->getSlice()->getSPS()->getViewId() > 0 && ( pcCU->getSlice()->getSPS()->getMultiviewMvPredMode() & PDM_USE_FOR_MERGE ) == PDM_USE_FOR_MERGE ) 2649 #endif 2693 #if HHI_INTER_VIEW_MOTION_PRED || HHI_MPI 2694 if( 2695 #if HHI_INTER_VIEW_MOTION_PRED 2696 ( pcCU->getSlice()->getSPS()->getViewId() > 0 && ( pcCU->getSlice()->getSPS()->getMultiviewMvPredMode() & PDM_USE_FOR_MERGE ) == PDM_USE_FOR_MERGE ) || 2697 #endif 2698 #if HHI_MPI 2699 ( pcCU->getSlice()->getSPS()->getUseMVI() && pcCU->getSlice()->getSliceType() != I_SLICE && pcCU->getPartitionSize( uiAbsPartIdx ) == SIZE_2Nx2N ) || 2700 #endif 2701 0 2702 ) 2650 2703 { 2651 2704 parseMergeIndexMV( pcCU, ruiMergeIndex, uiAbsPartIdx, uiDepth ); 2652 2705 return; 2653 2706 } 2707 #endif 2654 2708 2655 2709 Bool bLeftInvolved = false; -
trunk/source/Lib/TLibDecoder/TDecCAVLC.h
r2 r5 1 /* The copyright in this software is being made available under the BSD 2 * License, included below. This software may be subject to other third party 3 * and contributor rights, including patent rights, and no such rights are 4 * granted under this license. 5 * 6 * Copyright (c) 2010-2011, ISO/IEC 7 * All rights reserved. 8 * 9 * Redistribution and use in source and binary forms, with or without 10 * modification, are permitted provided that the following conditions are met: 11 * 12 * * Redistributions of source code must retain the above copyright notice, 13 * this list of conditions and the following disclaimer. 14 * * Redistributions in binary form must reproduce the above copyright notice, 15 * this list of conditions and the following disclaimer in the documentation 16 * and/or other materials provided with the distribution. 17 * * Neither the name of the ISO/IEC nor the names of its contributors may 18 * be used to endorse or promote products derived from this software without 19 * specific prior written permission. 20 * 21 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 22 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS 25 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 26 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 27 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 30 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 31 * THE POSSIBILITY OF SUCH DAMAGE. 32 */ 33 1 34 2 35 … … 162 195 Void parseMergeFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPUIdx ); 163 196 Void parseMergeIndex ( TComDataCU* pcCU, UInt& ruiMergeIndex, UInt uiAbsPartIdx, UInt uiDepth ); 197 #if HHI_INTER_VIEW_MOTION_PRED || HHI_MPI 164 198 Void parseMergeIndexMV ( TComDataCU* pcCU, UInt& ruiMergeIndex, UInt uiAbsPartIdx, UInt uiDepth ); 199 #endif 165 200 Void parseResPredFlag ( TComDataCU* pcCU, Bool& rbResPredFlag, UInt uiAbsPartIdx, UInt uiDepth ); 166 201 Void parseSplitFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 167 #if MW_MVI_SIGNALLING_MODE == 0168 Void parseMvInheritanceFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );169 #endif170 202 Void parsePartSize ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 171 203 Void parsePredMode ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); -
trunk/source/Lib/TLibDecoder/TDecCu.cpp
r2 r5 1 /* The copyright in this software is being made available under the BSD 2 * License, included below. This software may be subject to other third party 3 * and contributor rights, including patent rights, and no such rights are 4 * granted under this license. 5 * 6 * Copyright (c) 2010-2011, ISO/IEC 7 * All rights reserved. 8 * 9 * Redistribution and use in source and binary forms, with or without 10 * modification, are permitted provided that the following conditions are met: 11 * 12 * * Redistributions of source code must retain the above copyright notice, 13 * this list of conditions and the following disclaimer. 14 * * Redistributions in binary form must reproduce the above copyright notice, 15 * this list of conditions and the following disclaimer in the documentation 16 * and/or other materials provided with the distribution. 17 * * Neither the name of the ISO/IEC nor the names of its contributors may 18 * be used to endorse or promote products derived from this software without 19 * specific prior written permission. 20 * 21 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 22 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS 25 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 26 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 27 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 30 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 31 * THE POSSIBILITY OF SUCH DAMAGE. 32 */ 33 1 34 2 35 … … 160 193 UInt uiBPelY = uiTPelY + (g_uiMaxCUHeight>>uiDepth) - 1; 161 194 162 #if MW_MVI_SIGNALLING_MODE == 0163 if( pcCU->getSlice()->getSPS()->getUseMVI() && pcCU->getSlice()->getSliceType() != I_SLICE )164 {165 m_pcEntropyDecoder->decodeMvInheritanceFlag( pcCU, uiAbsPartIdx, uiDepth );166 167 if( pcCU->getTextureModeDepth( uiAbsPartIdx ) == uiDepth )168 {169 assert( pcCU->getZorderIdxInCU() == 0 );170 TComDataCU *pcTextureCU = pcCU->getSlice()->getTexturePic()->getCU( pcCU->getAddr() );171 pcCU->copyTextureMotionDataFrom( pcTextureCU, uiDepth, pcCU->getZorderIdxInCU() + uiAbsPartIdx, uiAbsPartIdx );172 173 UInt uiCurrPartNumb = pcCU->getPic()->getNumPartInCU() >> (uiDepth << 1);174 for( UInt ui = 0; ui < uiCurrPartNumb; ui++ )175 {176 const UChar uhNewDepth = max( uiDepth, pcTextureCU->getDepth( uiAbsPartIdx + ui ) );177 if( pcCU->getPredictionMode( uiAbsPartIdx + ui ) == MODE_SKIP )178 pcCU->setPredictionMode( uiAbsPartIdx + ui, MODE_INTER );179 assert( pcCU->getPredictionMode( uiAbsPartIdx + ui ) == MODE_INTER );180 pcCU->setPartitionSize( uiAbsPartIdx + ui, SIZE_NxN );181 pcCU->setDepth( uiAbsPartIdx + ui, uhNewDepth );182 pcCU->setWidth( uiAbsPartIdx + ui, g_uiMaxCUWidth>>uhNewDepth );183 pcCU->setHeight( uiAbsPartIdx + ui, g_uiMaxCUHeight>>uhNewDepth );184 }185 }186 }187 #endif188 189 195 if( ( uiRPelX < pcCU->getSlice()->getSPS()->getWidth() ) && ( uiBPelY < pcCU->getSlice()->getSPS()->getHeight() ) ) 190 196 { 197 #if HHI_MPI 191 198 if( pcCU->getTextureModeDepth( uiAbsPartIdx ) == -1 || uiDepth < pcCU->getTextureModeDepth( uiAbsPartIdx ) ) 199 #endif 192 200 m_pcEntropyDecoder->decodeSplitFlag( pcCU, uiAbsPartIdx, uiDepth ); 193 201 } … … 220 228 221 229 // decode CU mode and the partition size 230 #if HHI_MPI 222 231 if( !pcCU->getSlice()->isIntra() && pcCU->getTextureModeDepth( uiAbsPartIdx ) == -1 ) 232 #else 233 if( !pcCU->getSlice()->isIntra() ) 234 #endif 223 235 { 224 236 m_pcEntropyDecoder->decodeSkipFlag( pcCU, uiAbsPartIdx, uiDepth ); … … 262 274 } 263 275 #endif 264 #if MW_MVI_SIGNALLING_MODE == 1276 #if HHI_MPI 265 277 if( pcCU->getTextureModeDepth( uiAbsPartIdx ) == uiDepth ) 266 278 { … … 281 293 #endif 282 294 295 #if HHI_INTER_VIEW_RESIDUAL_PRED 283 296 m_pcEntropyDecoder->decodeResPredFlag( pcCU, uiAbsPartIdx, uiDepth, m_ppcCU[uiDepth], 0 ); 297 #endif 284 298 return; 285 299 } 286 300 301 #if HHI_MPI 287 302 if( pcCU->getTextureModeDepth( uiAbsPartIdx ) == -1 ) 288 303 { 304 #endif 289 305 m_pcEntropyDecoder->decodePredMode( pcCU, uiAbsPartIdx, uiDepth ); 290 306 … … 294 310 m_pcEntropyDecoder->decodePredInfo( pcCU, uiAbsPartIdx, uiDepth, m_ppcCU[uiDepth]); 295 311 312 #if HHI_MPI 296 313 if( !pcCU->isIntra( uiAbsPartIdx ) ) 297 314 { 298 315 m_ppcCU[uiDepth] ->copyInterPredInfoFrom( pcCU, uiAbsPartIdx, REF_PIC_LIST_0 ); 299 316 m_ppcCU[uiDepth] ->copyInterPredInfoFrom( pcCU, uiAbsPartIdx, REF_PIC_LIST_1 ); 317 #if HHI_INTER_VIEW_RESIDUAL_PRED 300 318 m_pcEntropyDecoder->decodeResPredFlag ( pcCU, uiAbsPartIdx, uiDepth, m_ppcCU[uiDepth], 0 ); 301 } 302 303 #if MW_MVI_SIGNALLING_MODE == 1 319 #endif 320 } 321 304 322 if( pcCU->getTextureModeDepth( uiAbsPartIdx ) == uiDepth ) 305 323 { … … 335 353 } 336 354 } 337 #endif 338 } 355 } 356 #endif 357 339 358 UInt uiCurrWidth = pcCU->getWidth ( uiAbsPartIdx ); 340 359 UInt uiCurrHeight = pcCU->getHeight( uiAbsPartIdx ); … … 402 421 Void TDecCu::xReconInter( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 403 422 { 404 #if MW_MVI_SIGNALLING_MODE == 1423 #if HHI_MPI 405 424 if( pcCU->getTextureModeDepth( 0 ) != -1 ) 406 425 pcCU->setPartSizeSubParts( SIZE_NxN, 0, uiDepth ); … … 410 429 m_pcPrediction->motionCompensation( pcCU, m_ppcYuvReco[uiDepth] ); 411 430 412 #if MW_MVI_SIGNALLING_MODE == 1431 #if HHI_MPI 413 432 if( pcCU->getTextureModeDepth( 0 ) != -1 ) 414 433 pcCU->setPartSizeSubParts( SIZE_2Nx2N, 0, uiDepth ); 415 434 #endif 416 435 436 #if HHI_INTER_VIEW_RESIDUAL_PRED 417 437 if( pcCU->getResPredFlag( 0 ) ) 418 438 { … … 422 442 m_ppcYuvReco[uiDepth]->add( m_ppcYuvResPred[uiDepth], pcCU->getWidth( 0 ), pcCU->getHeight( 0 ) ); 423 443 } 424 444 #endif 445 425 446 // inter recon 426 447 xDecodeInterTexture( pcCU, 0, uiDepth ); … … 433 454 else 434 455 { 456 #if HHI_INTER_VIEW_RESIDUAL_PRED 435 457 if( pcCU->getResPredFlag( 0 ) ) 436 458 { 437 459 m_ppcYuvReco[uiDepth]->clip( pcCU->getWidth( 0 ), pcCU->getHeight( 0 ) ); 438 460 } 461 #endif 439 462 m_ppcYuvReco[uiDepth]->copyPartToPartYuv( m_ppcYuvReco[uiDepth],0, pcCU->getWidth( 0 ),pcCU->getHeight( 0 )); 440 463 } … … 647 670 bAboveAvail, bLeftAvail ); 648 671 649 #if HHI_DMM_ INTRA672 #if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX 650 673 if( uiLumaPredMode > MAX_MODE_ID_INTRA_DIR ) 651 674 { -
trunk/source/Lib/TLibDecoder/TDecCu.h
r2 r5 1 /* The copyright in this software is being made available under the BSD 2 * License, included below. This software may be subject to other third party 3 * and contributor rights, including patent rights, and no such rights are 4 * granted under this license. 5 * 6 * Copyright (c) 2010-2011, ISO/IEC 7 * All rights reserved. 8 * 9 * Redistribution and use in source and binary forms, with or without 10 * modification, are permitted provided that the following conditions are met: 11 * 12 * * Redistributions of source code must retain the above copyright notice, 13 * this list of conditions and the following disclaimer. 14 * * Redistributions in binary form must reproduce the above copyright notice, 15 * this list of conditions and the following disclaimer in the documentation 16 * and/or other materials provided with the distribution. 17 * * Neither the name of the ISO/IEC nor the names of its contributors may 18 * be used to endorse or promote products derived from this software without 19 * specific prior written permission. 20 * 21 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 22 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS 25 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 26 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 27 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 30 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 31 * THE POSSIBILITY OF SUCH DAMAGE. 32 */ 33 1 34 2 35 -
trunk/source/Lib/TLibDecoder/TDecEntropy.cpp
r2 r5 1 /* The copyright in this software is being made available under the BSD 2 * License, included below. This software may be subject to other third party 3 * and contributor rights, including patent rights, and no such rights are 4 * granted under this license. 5 * 6 * Copyright (c) 2010-2011, ISO/IEC 7 * All rights reserved. 8 * 9 * Redistribution and use in source and binary forms, with or without 10 * modification, are permitted provided that the following conditions are met: 11 * 12 * * Redistributions of source code must retain the above copyright notice, 13 * this list of conditions and the following disclaimer. 14 * * Redistributions in binary form must reproduce the above copyright notice, 15 * this list of conditions and the following disclaimer in the documentation 16 * and/or other materials provided with the distribution. 17 * * Neither the name of the ISO/IEC nor the names of its contributors may 18 * be used to endorse or promote products derived from this software without 19 * specific prior written permission. 20 * 21 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 22 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS 25 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 26 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 27 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 30 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 31 * THE POSSIBILITY OF SUCH DAMAGE. 32 */ 33 1 34 2 35 … … 371 404 } 372 405 } 373 #if MW_MVI_SIGNALLING_MODE == 1406 #if HHI_MPI 374 407 if( pcCU->getSlice()->getSPS()->getUseMVI() && pcCU->getSlice()->getSliceType() != I_SLICE && pcCU->getPartitionSize( uiAbsPartIdx ) == SIZE_2Nx2N ) 375 408 uiNumCand++; … … 416 449 417 450 451 #if HHI_INTER_VIEW_RESIDUAL_PRED 418 452 Void 419 453 TDecEntropy::decodeResPredFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, TComDataCU* pcSubCU, UInt uiPUIdx ) … … 443 477 pcCU->setResPredFlagSubParts ( bResPredFlag, uiAbsPartIdx, uiPUIdx, uiDepth ); 444 478 } 479 #endif 445 480 446 481 … … 449 484 m_pcEntropyDecoderIf->parseSplitFlag( pcCU, uiAbsPartIdx, uiDepth ); 450 485 } 451 452 #if MW_MVI_SIGNALLING_MODE == 0453 Void TDecEntropy::decodeMvInheritanceFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )454 {455 m_pcEntropyDecoderIf->parseMvInheritanceFlag( pcCU, uiAbsPartIdx, uiDepth );456 }457 #endif458 486 459 487 Void TDecEntropy::decodePredMode( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) … … 1805 1833 #if HHI_MRG_SKIP 1806 1834 UInt uiQtRootCbf = 1; 1807 #if MW_MVI_SIGNALLING_MODE == 11835 #if HHI_MPI 1808 1836 if( !(pcCU->getMergeFlag( uiAbsPartIdx ) && pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_2Nx2N && 1809 1837 ( pcCU->getTextureModeDepth( uiAbsPartIdx ) == -1 || uiDepth == pcCU->getTextureModeDepth( uiAbsPartIdx ) ) ) ) -
trunk/source/Lib/TLibDecoder/TDecEntropy.h
r2 r5 1 /* The copyright in this software is being made available under the BSD 2 * License, included below. This software may be subject to other third party 3 * and contributor rights, including patent rights, and no such rights are 4 * granted under this license. 5 * 6 * Copyright (c) 2010-2011, ISO/IEC 7 * All rights reserved. 8 * 9 * Redistribution and use in source and binary forms, with or without 10 * modification, are permitted provided that the following conditions are met: 11 * 12 * * Redistributions of source code must retain the above copyright notice, 13 * this list of conditions and the following disclaimer. 14 * * Redistributions in binary form must reproduce the above copyright notice, 15 * this list of conditions and the following disclaimer in the documentation 16 * and/or other materials provided with the distribution. 17 * * Neither the name of the ISO/IEC nor the names of its contributors may 18 * be used to endorse or promote products derived from this software without 19 * specific prior written permission. 20 * 21 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 22 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS 25 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 26 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 27 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 30 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 31 * THE POSSIBILITY OF SUCH DAMAGE. 32 */ 33 1 34 2 35 … … 30 63 virtual Void setAlfCtrl(Bool bAlfCtrl) = 0; 31 64 virtual Void setMaxAlfCtrlDepth(UInt uiMaxAlfCtrlDepth) = 0; 32 65 33 66 virtual Void resetEntropy (TComSlice* pcSlice) = 0; 34 67 virtual Void setBitstream ( TComBitstream* p ) = 0; 35 36 virtual Void parseNalUnitHeader ( NalUnitType& eNalUnitType, UInt& TemporalId, Bool& bOutputFlag ) = 0; 68 69 virtual Void parseNalUnitHeader ( NalUnitType& eNalUnitType, UInt& TemporalId, Bool& bOutputFlag ) = 0; 37 70 38 71 virtual Void parseSPS ( TComSPS* pcSPS ) = 0; … … 41 74 virtual Void parseSliceHeader ( TComSlice*& rpcSlice ) = 0; 42 75 virtual Void parseTerminatingBit ( UInt& ruilsLast ) = 0; 43 76 44 77 virtual Void parseMVPIdx ( TComDataCU* pcCU, Int& riMVPIdx, Int iMVPNum, UInt uiAbsPartIdx, UInt uiDepth, RefPicList eRefList ) = 0; 45 78 46 79 public: 47 80 virtual Void parseSkipFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0; 48 81 virtual Void parseSplitFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0; 49 #if MW_MVI_SIGNALLING_MODE == 050 virtual Void parseMvInheritanceFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0;51 #endif52 82 virtual Void parseMergeFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPUIdx ) = 0; 53 83 virtual Void parseMergeIndex ( TComDataCU* pcCU, UInt& ruiMergeIndex, UInt uiAbsPartIdx, UInt uiDepth ) = 0; … … 55 85 virtual Void parsePartSize ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0; 56 86 virtual Void parsePredMode ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0; 57 87 58 88 virtual Void parseIntraDirLumaAng( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0; 59 89 60 90 virtual Void parseIntraDirChroma( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0; 61 91 62 92 virtual Void parseInterDir ( TComDataCU* pcCU, UInt& ruiInterDir, UInt uiAbsPartIdx, UInt uiDepth ) = 0; 63 93 virtual Void parseRefFrmIdx ( TComDataCU* pcCU, Int& riRefFrmIdx, UInt uiAbsPartIdx, UInt uiDepth, RefPicList eRefList ) = 0; 64 94 virtual Void parseMvd ( TComDataCU* pcCU, UInt uiAbsPartAddr, UInt uiPartIdx, UInt uiDepth, RefPicList eRefList ) = 0; 65 95 66 96 virtual Void parseTransformSubdivFlag( UInt& ruiSubdivFlag, UInt uiLog2TransformBlockSize ) = 0; 67 97 virtual Void parseQtCbf ( TComDataCU* pcCU, UInt uiAbsPartIdx, TextType eType, UInt uiTrDepth, UInt uiDepth ) = 0; 68 98 virtual Void parseQtRootCbf ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt& uiQtRootCbf ) = 0; 69 99 70 100 virtual Void parseDeltaQP ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0; 71 101 72 102 virtual Void parseCbf ( TComDataCU* pcCU, UInt uiAbsPartIdx, TextType eType, UInt uiTrDepth, UInt uiDepth ) = 0; 73 103 virtual Void parseBlockCbf ( TComDataCU* pcCU, UInt uiAbsPartIdx, TextType eType, UInt uiTrDepth, UInt uiDepth, UInt uiQPartNum ) = 0; … … 75 105 virtual Void parseCbfTrdiv ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiTrDepth, UInt uiDepth, UInt& uiSubdiv ) = 0; 76 106 #endif 77 107 78 108 virtual Void parseCoeffNxN( TComDataCU* pcCU, TCoeff* pcCoef, UInt uiAbsPartIdx, UInt uiWidth, UInt uiHeight, UInt uiDepth, TextType eTType ) = 0; 79 109 80 110 virtual Void parseAlfFlag ( UInt& ruiVal ) = 0; 81 111 virtual Void parseAlfUvlc ( UInt& ruiVal ) = 0; … … 103 133 TDecEntropyIf* m_pcEntropyDecoderIf; 104 134 TComPrediction* m_pcPrediction; 105 135 106 136 public: 107 137 Void init (TComPrediction* p) {m_pcPrediction = p;} … … 112 142 Void decodeMvdPU ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPartIdx, RefPicList eRefList ); 113 143 Void decodeMVPIdxPU ( TComDataCU* pcSubCU, UInt uiPartAddr, UInt uiDepth, UInt uiPartIdx, RefPicList eRefList ); 114 144 115 145 Void setEntropyDecoder ( TDecEntropyIf* p ); 116 146 Void setBitstream ( TComBitstream* p ) { m_pcEntropyDecoderIf->setBitstream(p); } 117 147 Void resetEntropy ( TComSlice* p) { m_pcEntropyDecoderIf->resetEntropy(p); } 118 148 119 Void decodeNalUnitHeader ( NalUnitType& eNalUnitType, UInt& TemporalId, Bool& bOutputFlag ) 149 Void decodeNalUnitHeader ( NalUnitType& eNalUnitType, UInt& TemporalId, Bool& bOutputFlag ) 120 150 { m_pcEntropyDecoderIf->parseNalUnitHeader(eNalUnitType, TemporalId, bOutputFlag ); } 121 151 … … 126 156 Void decodeSliceHeader ( TComSlice*& rpcSlice ) { m_pcEntropyDecoderIf->parseSliceHeader(rpcSlice); } 127 157 Void decodeTerminatingBit ( UInt& ruiIsLast ) { m_pcEntropyDecoderIf->parseTerminatingBit(ruiIsLast); } 128 158 129 159 // Adaptive Loop filter 130 160 Void decodeAlfParam(ALFParam* pAlfParam); 131 161 //--Adaptive Loop filter 132 162 133 163 TDecEntropyIf* getEntropyDecoder() { return m_pcEntropyDecoderIf; } 134 164 135 165 public: 136 166 Void decodeSplitFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 137 #if MW_MVI_SIGNALLING_MODE == 0138 Void decodeMvInheritanceFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );139 #endif140 167 Void decodeSkipFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 141 168 Void decodeMergeFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPUIdx ); 142 169 Void decodeMergeIndex ( TComDataCU* pcSubCU, UInt uiPartIdx, UInt uiPartAddr, PartSize eCUMode, UChar* puhInterDirNeighbours, TComMvField* pcMvFieldNeighbours, UInt uiDepth ); 170 #if HHI_INTER_VIEW_RESIDUAL_PRED 143 171 Void decodeResPredFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, TComDataCU* pcSubCU, UInt uiPUIdx ); 172 #endif 144 173 Void decodeAlfCtrlFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 145 174 #if TSB_ALF_HEADER 146 175 Void decodeAlfCtrlParam ( ALFParam *pAlfParam ); 147 176 #endif 148 177 149 178 Void decodePredMode ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 150 179 Void decodePartSize ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 151 180 152 181 Void decodePredInfo ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, TComDataCU* pcSubCU ); 153 182 154 183 Void decodeIntraDirModeLuma ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 155 184 Void decodeIntraDirModeChroma( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); … … 157 186 Void decodeRefFrmIdx ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, RefPicList eRefList ); 158 187 Void decodeMvd ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, RefPicList eRefList ); 159 // SB160 188 Void decodeRefViewIdx ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, RefPicList eRefList ); 161 189 // 162 190 Void decodeTransformIdx ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 163 191 Void decodeQP ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 164 192 165 193 Void decodeViewidx ( Int& riViewIdx ); 166 167 194 195 168 196 private: 169 197 Void xDecodeTransformSubdiv ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiInnerQuadIdx, UInt& uiYCbfFront3, UInt& uiUCbfFront3, UInt& uiVCbfFront3 ); 170 198 171 199 Void xDecodeCoeff ( TComDataCU* pcCU, TCoeff* pcCoeff, UInt uiAbsPartIdx, UInt uiDepth, UInt uiWidth, UInt uiHeight, UInt uiTrIdx, UInt uiCurrTrIdx, TextType eType ); 172 200 public: 173 201 Void decodeCoeff ( TComDataCU* pcCU , UInt uiAbsPartIdx, UInt uiDepth, UInt uiWidth, UInt uiHeight ); 174 202 175 203 // ALF-related 176 204 Void decodeAux(ALFParam* pAlfParam); -
trunk/source/Lib/TLibDecoder/TDecGop.cpp
r2 r5 1 /* The copyright in this software is being made available under the BSD 2 * License, included below. This software may be subject to other third party 3 * and contributor rights, including patent rights, and no such rights are 4 * granted under this license. 5 * 6 * Copyright (c) 2010-2011, ISO/IEC 7 * All rights reserved. 8 * 9 * Redistribution and use in source and binary forms, with or without 10 * modification, are permitted provided that the following conditions are met: 11 * 12 * * Redistributions of source code must retain the above copyright notice, 13 * this list of conditions and the following disclaimer. 14 * * Redistributions in binary form must reproduce the above copyright notice, 15 * this list of conditions and the following disclaimer in the documentation 16 * and/or other materials provided with the distribution. 17 * * Neither the name of the ISO/IEC nor the names of its contributors may 18 * be used to endorse or promote products derived from this software without 19 * specific prior written permission. 20 * 21 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 22 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS 25 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 26 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 27 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 30 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 31 * THE POSSIBILITY OF SUCH DAMAGE. 32 */ 33 1 34 2 35 … … 53 86 TComAdaptiveLoopFilter* pcAdaptiveLoopFilter, 54 87 #if MTK_SAO 55 TComSampleAdaptiveOffset* pcSAO ,88 TComSampleAdaptiveOffset* pcSAO 56 89 #endif 57 TComDepthMapGenerator* pcDepthMapGenerator, 58 TComResidualGenerator* pcResidualGenerator ) 90 #if DEPTH_MAP_GENERATION 91 ,TComDepthMapGenerator* pcDepthMapGenerator 92 #endif 93 #if HHI_INTER_VIEW_RESIDUAL_PRED 94 ,TComResidualGenerator* pcResidualGenerator 95 #endif 96 ) 59 97 { 60 98 m_pcEntropyDecoder = pcEntropyDecoder; … … 68 106 m_pcSAO = pcSAO; 69 107 #endif 108 #if DEPTH_MAP_GENERATION 70 109 m_pcDepthMapGenerator = pcDepthMapGenerator; 110 #endif 111 #if HHI_INTER_VIEW_RESIDUAL_PRED 71 112 m_pcResidualGenerator = pcResidualGenerator; 113 #endif 72 114 } 73 115 … … 145 187 } 146 188 189 #if DEPTH_MAP_GENERATION 147 190 // init view component and predict virtual depth map 148 191 if( uiStartCUAddr == 0 ) … … 150 193 m_pcDepthMapGenerator->initViewComponent( rpcPic ); 151 194 m_pcDepthMapGenerator->predictDepthMap ( rpcPic ); 195 #if HHI_INTER_VIEW_RESIDUAL_PRED 152 196 m_pcResidualGenerator->initViewComponent( rpcPic ); 153 } 197 #endif 198 } 199 #endif 154 200 155 201 // decode slice … … 160 206 else 161 207 { 208 #if HHI_INTER_VIEW_RESIDUAL_PRED 162 209 // set residual picture 163 210 m_pcResidualGenerator->setRecResidualPic( rpcPic ); 164 211 #endif 212 #if DEPTH_MAP_GENERATION 165 213 // update virtual depth map 166 214 m_pcDepthMapGenerator->updateDepthMap( rpcPic ); 215 #endif 167 216 168 217 // deblocking filter -
trunk/source/Lib/TLibDecoder/TDecGop.h
r2 r5 1 /* The copyright in this software is being made available under the BSD 2 * License, included below. This software may be subject to other third party 3 * and contributor rights, including patent rights, and no such rights are 4 * granted under this license. 5 * 6 * Copyright (c) 2010-2011, ISO/IEC 7 * All rights reserved. 8 * 9 * Redistribution and use in source and binary forms, with or without 10 * modification, are permitted provided that the following conditions are met: 11 * 12 * * Redistributions of source code must retain the above copyright notice, 13 * this list of conditions and the following disclaimer. 14 * * Redistributions in binary form must reproduce the above copyright notice, 15 * this list of conditions and the following disclaimer in the documentation 16 * and/or other materials provided with the distribution. 17 * * Neither the name of the ISO/IEC nor the names of its contributors may 18 * be used to endorse or promote products derived from this software without 19 * specific prior written permission. 20 * 21 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 22 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS 25 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 26 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 27 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 30 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 31 * THE POSSIBILITY OF SUCH DAMAGE. 32 */ 33 1 34 2 35 … … 46 79 TComLoopFilter* m_pcLoopFilter; 47 80 81 #if DEPTH_MAP_GENERATION 48 82 TComDepthMapGenerator* m_pcDepthMapGenerator; 83 #endif 84 #if HHI_INTER_VIEW_RESIDUAL_PRED 49 85 TComResidualGenerator* m_pcResidualGenerator; 86 #endif 50 87 51 88 // Adaptive Loop filter … … 72 109 TComAdaptiveLoopFilter* pcAdaptiveLoopFilter, 73 110 #if MTK_SAO 74 TComSampleAdaptiveOffset* pcSAO ,111 TComSampleAdaptiveOffset* pcSAO 75 112 #endif 76 TComDepthMapGenerator* pcDepthMapGenerator, 77 TComResidualGenerator* pcResidualGenerator ); 113 #if DEPTH_MAP_GENERATION 114 ,TComDepthMapGenerator* pcDepthMapGenerator 115 #endif 116 #if HHI_INTER_VIEW_RESIDUAL_PRED 117 ,TComResidualGenerator* pcResidualGenerator 118 #endif 119 ); 78 120 Void create (); 79 121 Void destroy (); -
trunk/source/Lib/TLibDecoder/TDecSbac.cpp
r2 r5 1 /* The copyright in this software is being made available under the BSD 2 * License, included below. This software may be subject to other third party 3 * and contributor rights, including patent rights, and no such rights are 4 * granted under this license. 5 * 6 * Copyright (c) 2010-2011, ISO/IEC 7 * All rights reserved. 8 * 9 * Redistribution and use in source and binary forms, with or without 10 * modification, are permitted provided that the following conditions are met: 11 * 12 * * Redistributions of source code must retain the above copyright notice, 13 * this list of conditions and the following disclaimer. 14 * * Redistributions in binary form must reproduce the above copyright notice, 15 * this list of conditions and the following disclaimer in the documentation 16 * and/or other materials provided with the distribution. 17 * * Neither the name of the ISO/IEC nor the names of its contributors may 18 * be used to endorse or promote products derived from this software without 19 * specific prior written permission. 20 * 21 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 22 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS 25 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 26 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 27 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 30 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 31 * THE POSSIBILITY OF SUCH DAMAGE. 32 */ 33 1 34 2 35 … … 19 52 , m_cCUSkipFlagSCModel ( 1, 1, NUM_SKIP_FLAG_CTX ) 20 53 , m_cCUSplitFlagSCModel ( 1, 1, NUM_SPLIT_FLAG_CTX ) 21 #if MW_MVI_SIGNALLING_MODE == 022 , m_cCUMvInheritanceFlagSCModel(1, 1, NUM_MVI_FLAG_CTX )23 #endif24 54 , m_cCUMergeFlagExtSCModel ( 1, 1, NUM_MERGE_FLAG_EXT_CTX ) 25 55 , m_cCUMergeIdxExtSCModel ( 1, 1, NUM_MERGE_IDX_EXT_CTX ) … … 64 94 #endif 65 95 , m_cViewIdxSCModel ( 1, 1, NUM_VIEW_IDX_CTX ) 66 #if HHI_DMM_ INTRA96 #if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX 67 97 , m_cIntraDMMSCModel ( 1, 1, NUM_DMM_CTX ) 68 98 , m_cIntraWedgeSCModel ( 1, 1, NUM_WEDGE_CTX ) … … 85 115 86 116 m_cCUSplitFlagSCModel.initBuffer ( eSliceType, iQp, (Short*)INIT_SPLIT_FLAG ); 87 #if MW_MVI_SIGNALLING_MODE == 088 m_cCUMvInheritanceFlagSCModel.initBuffer( eSliceType, iQp, (Short*)INIT_MVI_FLAG );89 #endif90 117 m_cCUSkipFlagSCModel.initBuffer ( eSliceType, iQp, (Short*)INIT_SKIP_FLAG ); 91 118 m_cCUMergeFlagExtSCModel.initBuffer ( eSliceType, iQp, (Short*)INIT_MERGE_FLAG_EXT ); … … 127 154 m_cCUTransSubdivFlagSCModel.initBuffer ( eSliceType, iQp, (Short*)INIT_TRANS_SUBDIV_FLAG ); 128 155 m_cViewIdxSCModel.initBuffer ( eSliceType, iQp, (Short*)INIT_VIEW_IDX ); 129 #if HHI_DMM_ INTRA156 #if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX 130 157 m_cIntraDMMSCModel.initBuffer ( eSliceType, iQp, (Short*)INIT_INTRA_DMM ); 131 158 m_cIntraWedgeSCModel.initBuffer ( eSliceType, iQp, (Short*)INIT_INTRA_WEDGELET ); … … 361 388 return; 362 389 } 363 #if HHI_DMM_ INTRA390 #if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX 364 391 Void TDecSbac::xReadExGolombLevel( UInt& ruiSymbol, ContextModel& rcSCModel ) 365 392 { … … 552 579 553 580 581 #if HHI_INTER_VIEW_MOTION_PRED || HHI_MPI 554 582 Void TDecSbac::parseMergeIndexMV( TComDataCU* pcCU, UInt& ruiMergeIndex, UInt uiAbsPartIdx, UInt uiDepth ) 555 583 { 556 #if MW_MVI_SIGNALLING_MODE == 1584 #if HHI_MPI 557 585 const Bool bMVIAvailable = pcCU->getSlice()->getSPS()->getUseMVI() && pcCU->getSlice()->getSliceType() != I_SLICE; 558 const UInt uiMviMergePos = bMVIAvailable ? MVI_MERGE_POS : MRG_MAX_NUM_CANDS;586 const UInt uiMviMergePos = bMVIAvailable ? HHI_MPI_MERGE_POS : MRG_MAX_NUM_CANDS; 559 587 #endif 560 588 //--- set number of candidates and availability --- … … 563 591 for( UInt uiIdx = 0; uiIdx < MRG_MAX_NUM_CANDS; uiIdx++ ) 564 592 { 565 #if MW_MVI_SIGNALLING_MODE == 1593 #if HHI_MPI 566 594 if( uiIdx == uiMviMergePos ) 567 595 { … … 629 657 } 630 658 631 #if MW_MVI_SIGNALLING_MODE == 1659 #if HHI_MPI 632 660 if( ruiMergeIndex > uiMviMergePos ) 633 661 { … … 661 689 DTRACE_CABAC_T( "\n" ); 662 690 } 691 #endif 663 692 664 693 665 694 Void TDecSbac::parseMergeIndex ( TComDataCU* pcCU, UInt& ruiMergeIndex, UInt uiAbsPartIdx, UInt uiDepth ) 666 695 { 667 #if MW_MVI_SIGNALLING_MODE == 1 668 if( ( pcCU->getSlice()->getSPS()->getViewId() > 0 && ( pcCU->getSlice()->getSPS()->getMultiviewMvPredMode() & PDM_USE_FOR_MERGE ) == PDM_USE_FOR_MERGE ) || 669 ( pcCU->getSlice()->getSPS()->getUseMVI() && pcCU->getSlice()->getSliceType() != I_SLICE && pcCU->getPartitionSize( uiAbsPartIdx ) == SIZE_2Nx2N ) ) 670 #else 671 if( pcCU->getSlice()->getSPS()->getViewId() > 0 && ( pcCU->getSlice()->getSPS()->getMultiviewMvPredMode() & PDM_USE_FOR_MERGE ) == PDM_USE_FOR_MERGE ) 672 #endif 696 #if HHI_INTER_VIEW_MOTION_PRED || HHI_MPI 697 if( 698 #if HHI_INTER_VIEW_MOTION_PRED 699 ( pcCU->getSlice()->getSPS()->getViewId() > 0 && ( pcCU->getSlice()->getSPS()->getMultiviewMvPredMode() & PDM_USE_FOR_MERGE ) == PDM_USE_FOR_MERGE ) || 700 #endif 701 #if HHI_MPI 702 ( pcCU->getSlice()->getSPS()->getUseMVI() && pcCU->getSlice()->getSliceType() != I_SLICE && pcCU->getPartitionSize( uiAbsPartIdx ) == SIZE_2Nx2N ) || 703 #endif 704 0 705 ) 673 706 { 674 707 parseMergeIndexMV( pcCU, ruiMergeIndex, uiAbsPartIdx, uiDepth ); 675 708 return; 676 709 } 710 #endif 677 711 678 712 Bool bLeftInvolved = false; … … 827 861 } 828 862 829 #if MW_MVI_SIGNALLING_MODE == 0830 Void TDecSbac::parseMvInheritanceFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )831 {832 const Int iTextureModeDepth = pcCU->getTextureModeDepth( uiAbsPartIdx );833 if( iTextureModeDepth != -1 && uiDepth > iTextureModeDepth )834 return;835 836 UInt uiSymbol;837 m_pcTDecBinIf->decodeBin( uiSymbol, m_cCUMvInheritanceFlagSCModel.get( 0, 0, pcCU->getCtxMvInheritanceFlag( uiAbsPartIdx, uiDepth ) ) );838 if( uiSymbol == 1 )839 {840 pcCU->setTextureModeDepthSubParts( uiDepth, uiAbsPartIdx, uiDepth );841 }842 }843 #endif844 845 863 /** parse partition size 846 864 * \param pcCU … … 965 983 } 966 984 967 #if HHI_DMM_ INTRA985 #if HHI_DMM_WEDGE_INTRA 968 986 Void TDecSbac::xParseWedgeFullInfo( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 969 987 { … … 1136 1154 pcCU->setWedgePredDirDeltaDC2SubParts( iDC2, uiAbsPartIdx, uiDepth ); 1137 1155 } 1138 1156 #endif 1157 #if HHI_DMM_PRED_TEX 1139 1158 Void TDecSbac::xParseWedgePredTexDeltaInfo( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 1140 1159 { … … 1204 1223 UInt uiSymbol; 1205 1224 1206 #if HHI_DMM_ INTRA1225 #if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX 1207 1226 UInt uiFlag = 0; 1208 if ( pcCU->getSlice()->getSPS()->isDepth() && pcCU->getSlice()->getSPS()->getUseD epthModelModes() && g_uiMaxCUWidth>>uiDepth < 64 )1227 if ( pcCU->getSlice()->getSPS()->isDepth() && pcCU->getSlice()->getSPS()->getUseDMM() && g_uiMaxCUWidth>>uiDepth < 64 ) 1209 1228 { 1210 1229 m_pcTDecBinIf->decodeBin( uiFlag, m_cIntraDMMSCModel.get(0, 0, 0) ); … … 1214 1233 UInt uiDMMode; 1215 1234 1216 #if DMM_NO_TEXTURE_MODES1217 pcCU->setTextureModeAllowanceSubParts( false, uiAbsPartIdx, uiDepth );1218 1235 #if HHI_DMM_WEDGE_INTRA && HHI_DMM_PRED_TEX 1236 m_pcTDecBinIf->decodeBin( uiSymbol, m_cIntraDMMSCModel.get(0, 0, 1) ); uiDMMode = uiSymbol; 1237 m_pcTDecBinIf->decodeBin( uiSymbol, m_cIntraDMMSCModel.get(0, 0, 1) ); uiDMMode |= uiSymbol << 1; 1219 1238 if ( pcCU->getPartitionSize( uiAbsPartIdx ) != SIZE_NxN && g_uiMaxCUWidth>>uiDepth > 4 ) 1220 1239 { 1221 m_pcTDecBinIf->decodeBin( uiSymbol, m_cIntraDMMSCModel.get(0, 0, 1) ); uiDMMode = uiSymbol; 1222 if( DMM_INTRA_MODE_BITS > 1 ) { m_pcTDecBinIf->decodeBin( uiSymbol, m_cIntraDMMSCModel.get(0, 0, 1) ); uiDMMode |= uiSymbol << 1; } 1223 1224 if( uiDMMode > 1 ) 1225 { 1226 uiDMMode += 4; 1227 } 1228 } 1229 else 1230 { 1231 m_pcTDecBinIf->decodeBin( uiSymbol, m_cIntraDMMSCModel.get(0, 0, 1) ); uiDMMode = uiSymbol; 1240 m_pcTDecBinIf->decodeBin( uiSymbol, m_cIntraDMMSCModel.get(0, 0, 1) ); uiDMMode |= uiSymbol << 2; 1232 1241 } 1233 1242 #else 1234 TComPicYuv* pcPicYuvRef = pcCU->getSlice()->getTexturePic()->getPicYuvRec(); 1235 Int iRefStride = pcPicYuvRef->getStride(); 1236 Pel* piRefY; 1237 1238 TComYuv cTempYuv; 1239 UInt uiTempStride = 0; 1240 Pel* piTempY; 1241 1242 UInt uiWidth = g_uiMaxCUWidth>>uiDepth; 1243 UInt uiHeight = g_uiMaxCUHeight>>uiDepth; 1244 piRefY = pcPicYuvRef->getLumaAddr( pcCU->getAddr(), uiAbsPartIdx ); 1245 cTempYuv.create( uiWidth, uiHeight ); cTempYuv.clear(); 1246 piTempY = cTempYuv.getLumaAddr( 0, uiWidth ); 1247 uiTempStride = cTempYuv.getStride(); 1248 1249 for ( Int y = 0; y < uiHeight; y++ ) 1250 { 1251 ::memcpy(piTempY, piRefY, sizeof(Pel)*uiWidth); 1252 piTempY += uiTempStride; 1253 piRefY += iRefStride; 1254 } 1255 1256 UInt64 uiDCSAD = cTempYuv.getLumaDistDCSAD( uiWidth ); 1257 1258 cTempYuv.destroy(); 1259 1260 if( uiDCSAD < (UInt)(pcCU->getQP(0))/2 ) 1261 { 1262 pcCU->setTextureModeAllowanceSubParts( false, uiAbsPartIdx, uiDepth ); 1263 1243 m_pcTDecBinIf->decodeBin( uiSymbol, m_cIntraDMMSCModel.get(0, 0, 1) ); uiDMMode = uiSymbol; 1264 1244 if ( pcCU->getPartitionSize( uiAbsPartIdx ) != SIZE_NxN && g_uiMaxCUWidth>>uiDepth > 4 ) 1265 1245 { 1266 m_pcTDecBinIf->decodeBin( uiSymbol, m_cIntraDMMSCModel.get(0, 0, 1) ); uiDMMode = uiSymbol; 1267 if( DMM_INTRA_MODE_BITS > 1 ) { m_pcTDecBinIf->decodeBin( uiSymbol, m_cIntraDMMSCModel.get(0, 0, 1) ); uiDMMode |= uiSymbol << 1; } 1268 1269 if( uiDMMode > 1 ) 1270 { 1271 uiDMMode += 4; 1272 } 1273 } 1274 else 1275 { 1276 pcCU->setTextureModeAllowanceSubParts( true, uiAbsPartIdx, uiDepth ); 1277 1278 m_pcTDecBinIf->decodeBin( uiSymbol, m_cIntraDMMSCModel.get(0, 0, 1) ); uiDMMode = uiSymbol; 1279 } 1280 } 1281 else 1282 { 1283 m_pcTDecBinIf->decodeBin( uiSymbol, m_cIntraDMMSCModel.get(0, 0, 1) ); uiDMMode = uiSymbol; 1284 if( DMM_INTRA_MODE_BITS > 1 ) { m_pcTDecBinIf->decodeBin( uiSymbol, m_cIntraDMMSCModel.get(0, 0, 1) ); uiDMMode |= uiSymbol << 1; } 1285 if ( pcCU->getPartitionSize( uiAbsPartIdx ) != SIZE_NxN && g_uiMaxCUWidth>>uiDepth > 4 ) 1286 { 1287 if( DMM_INTRA_MODE_BITS > 2 ) { m_pcTDecBinIf->decodeBin( uiSymbol, m_cIntraDMMSCModel.get(0, 0, 1) ); uiDMMode |= uiSymbol << 2; } 1288 } 1289 } 1290 #endif 1291 uiIPredMode = g_aucAdditionalIntraModeList[uiDMMode]; 1292 1246 m_pcTDecBinIf->decodeBin( uiSymbol, m_cIntraDMMSCModel.get(0, 0, 1) ); uiDMMode |= uiSymbol << 1; 1247 } 1248 #endif 1249 uiIPredMode = uiDMMode + MAX_MODE_ID_INTRA_DIR + 1; 1250 1251 #if HHI_DMM_WEDGE_INTRA 1293 1252 if( uiIPredMode == DMM_WEDGE_FULL_IDX ) { xParseWedgeFullInfo ( pcCU, uiAbsPartIdx, uiDepth ); } 1294 1253 if( uiIPredMode == DMM_WEDGE_FULL_D_IDX ) { xParseWedgeFullDeltaInfo ( pcCU, uiAbsPartIdx, uiDepth ); } 1295 1254 if( uiIPredMode == DMM_WEDGE_PREDDIR_IDX ) { xParseWedgePredDirInfo ( pcCU, uiAbsPartIdx, uiDepth ); } 1296 1255 if( uiIPredMode == DMM_WEDGE_PREDDIR_D_IDX ) { xParseWedgePredDirDeltaInfo ( pcCU, uiAbsPartIdx, uiDepth ); } 1256 #endif 1257 #if HHI_DMM_PRED_TEX 1297 1258 if( uiIPredMode == DMM_WEDGE_PREDTEX_D_IDX ) { xParseWedgePredTexDeltaInfo ( pcCU, uiAbsPartIdx, uiDepth ); } 1298 1259 if( uiIPredMode == DMM_CONTOUR_PREDTEX_D_IDX ) { xParseContourPredTexDeltaInfo( pcCU, uiAbsPartIdx, uiDepth ); } 1260 #endif 1299 1261 } 1300 1262 else … … 1370 1332 UInt uiSymbol; 1371 1333 1372 #if HHI_DMM_ INTRA1334 #if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX 1373 1335 UInt uiFlag = 0; 1374 if ( pcCU->getSlice()->getSPS()->isDepth() && pcCU->getSlice()->getSPS()->getUseD epthModelModes() && g_uiMaxCUWidth>>uiDepth < 64 )1336 if ( pcCU->getSlice()->getSPS()->isDepth() && pcCU->getSlice()->getSPS()->getUseDMM() && g_uiMaxCUWidth>>uiDepth < 64 ) 1375 1337 { 1376 1338 m_pcTDecBinIf->decodeBin( uiFlag, m_cIntraDMMSCModel.get(0, 0, 0) ); … … 1379 1341 { 1380 1342 UInt uiDMMode; 1381 TComPicYuv* pcPicYuvRef = pcCU->getSlice()->getTexturePic()->getPicYuvRec(); 1382 Int iRefStride = pcPicYuvRef->getStride(); 1383 Pel* piRefY; 1384 1385 TComYuv cTempYuv; 1386 UInt uiTempStride = 0; 1387 Pel* piTempY; 1388 1389 UInt uiWidth = g_uiMaxCUWidth>>uiDepth; 1390 UInt uiHeight = g_uiMaxCUHeight>>uiDepth; 1391 piRefY = pcPicYuvRef->getLumaAddr( pcCU->getAddr(), uiAbsPartIdx ); 1392 cTempYuv.create( uiWidth, uiHeight ); cTempYuv.clear(); 1393 piTempY = cTempYuv.getLumaAddr( 0, uiWidth ); 1394 uiTempStride = cTempYuv.getStride(); 1395 1396 for ( Int y = 0; y < uiHeight; y++ ) 1397 { 1398 ::memcpy(piTempY, piRefY, sizeof(Pel)*uiWidth); 1399 piTempY += uiTempStride; 1400 piRefY += iRefStride; 1401 } 1402 1403 UInt64 uiDCSAD = cTempYuv.getLumaDistDCSAD( uiWidth ); 1404 1405 if( uiDCSAD < 23 ) 1406 { 1343 1344 #if HHI_DMM_WEDGE_INTRA && HHI_DMM_PRED_TEX 1345 m_pcTDecBinIf->decodeBin( uiSymbol, m_cIntraDMMSCModel.get(0, 0, 1) ); uiDMMode = uiSymbol; 1346 m_pcTDecBinIf->decodeBin( uiSymbol, m_cIntraDMMSCModel.get(0, 0, 1) ); uiDMMode |= uiSymbol << 1; 1407 1347 if ( pcCU->getPartitionSize( uiAbsPartIdx ) != SIZE_NxN && g_uiMaxCUWidth>>uiDepth > 4 ) 1408 1348 { 1409 m_pcTDecBinIf->decodeBin( uiSymbol, m_cIntraDMMSCModel.get(0, 0, 1) ); uiDMMode = uiSymbol; 1410 if( DMM_INTRA_MODE_BITS > 1 ) { m_pcTDecBinIf->decodeBin( uiSymbol, m_cIntraDMMSCModel.get(0, 0, 1) ); uiDMMode |= uiSymbol << 1; } 1411 1412 if( uiDMMode > 1 ) 1413 { 1414 uiDMMode += 4; 1349 m_pcTDecBinIf->decodeBin( uiSymbol, m_cIntraDMMSCModel.get(0, 0, 1) ); uiDMMode |= uiSymbol << 2; 1415 1350 } 1416 } 1417 else 1418 { 1419 m_pcTDecBinIf->decodeBin( uiSymbol, m_cIntraDMMSCModel.get(0, 0, 1) ); uiDMMode = uiSymbol; 1420 } 1421 } 1422 else 1423 { 1351 #else 1424 1352 m_pcTDecBinIf->decodeBin( uiSymbol, m_cIntraDMMSCModel.get(0, 0, 1) ); uiDMMode = uiSymbol; 1425 if( DMM_INTRA_MODE_BITS > 1 ) { m_pcTDecBinIf->decodeBin( uiSymbol, m_cIntraDMMSCModel.get(0, 0, 1) ); uiDMMode |= uiSymbol << 1; }1426 1353 if ( pcCU->getPartitionSize( uiAbsPartIdx ) != SIZE_NxN && g_uiMaxCUWidth>>uiDepth > 4 ) 1427 1354 { 1428 if( DMM_INTRA_MODE_BITS > 2 ) { m_pcTDecBinIf->decodeBin( uiSymbol, m_cIntraDMMSCModel.get(0, 0, 1) ); uiDMMode |= uiSymbol << 2; }1429 1430 } 1355 m_pcTDecBinIf->decodeBin( uiSymbol, m_cIntraDMMSCModel.get(0, 0, 1) ); uiDMMode |= uiSymbol << 1; 1356 } 1357 #endif 1431 1358 uiIPredMode = g_aucAdditionalIntraModeList[uiDMMode]; 1432 1359 1360 #if HHI_DMM_WEDGE_INTRA 1433 1361 if( uiIPredMode == DMM_WEDGE_FULL_IDX ) { xParseWedgeFullInfo ( pcCU, uiAbsPartIdx, uiDepth ); } 1434 1362 if( uiIPredMode == DMM_WEDGE_FULL_D_IDX ) { xParseWedgeFullDeltaInfo ( pcCU, uiAbsPartIdx, uiDepth ); } 1435 1363 if( uiIPredMode == DMM_WEDGE_PREDDIR_IDX ) { xParseWedgePredDirInfo ( pcCU, uiAbsPartIdx, uiDepth ); } 1436 1364 if( uiIPredMode == DMM_WEDGE_PREDDIR_D_IDX ) { xParseWedgePredDirDeltaInfo ( pcCU, uiAbsPartIdx, uiDepth ); } 1365 #endif 1366 #if HHI_DMM_PRED_TEX 1437 1367 if( uiIPredMode == DMM_WEDGE_PREDTEX_D_IDX ) { xParseWedgePredTexDeltaInfo ( pcCU, uiAbsPartIdx, uiDepth ); } 1438 1368 if( uiIPredMode == DMM_CONTOUR_PREDTEX_D_IDX ) { xParseContourPredTexDeltaInfo( pcCU, uiAbsPartIdx, uiDepth ); } 1369 #endif 1439 1370 } 1440 1371 else -
trunk/source/Lib/TLibDecoder/TDecSbac.h
r2 r5 1 /* The copyright in this software is being made available under the BSD 2 * License, included below. This software may be subject to other third party 3 * and contributor rights, including patent rights, and no such rights are 4 * granted under this license. 5 * 6 * Copyright (c) 2010-2011, ISO/IEC 7 * All rights reserved. 8 * 9 * Redistribution and use in source and binary forms, with or without 10 * modification, are permitted provided that the following conditions are met: 11 * 12 * * Redistributions of source code must retain the above copyright notice, 13 * this list of conditions and the following disclaimer. 14 * * Redistributions in binary form must reproduce the above copyright notice, 15 * this list of conditions and the following disclaimer in the documentation 16 * and/or other materials provided with the distribution. 17 * * Neither the name of the ISO/IEC nor the names of its contributors may 18 * be used to endorse or promote products derived from this software without 19 * specific prior written permission. 20 * 21 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 22 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS 25 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 26 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 27 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 30 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 31 * THE POSSIBILITY OF SUCH DAMAGE. 32 */ 33 1 34 2 35 … … 66 99 #if E253 67 100 Void xReadGoRiceExGolomb ( UInt &ruiSymbol, UInt &ruiGoRiceParam ); 68 #if HHI_DMM_ INTRA101 #if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX 69 102 Void xReadExGolombLevel ( UInt& ruiSymbol, ContextModel& rcSCModel ); 70 103 #endif … … 81 114 Void xReadExGolombMvd ( UInt& ruiSymbol, ContextModel* pcSCModel, UInt uiMaxBin ); 82 115 83 #if HHI_DMM_ INTRA116 #if HHI_DMM_WEDGE_INTRA 84 117 Void xParseWedgeFullInfo ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 85 118 Void xParseWedgeFullDeltaInfo ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 119 86 120 Void xParseWedgePredDirInfo ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 87 121 Void xParseWedgePredDirDeltaInfo ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 122 #endif 123 #if HHI_DMM_PRED_TEX 88 124 Void xParseWedgePredTexDeltaInfo ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 89 125 Void xParseContourPredTexDeltaInfo( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); … … 106 142 Void parseSkipFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 107 143 Void parseSplitFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 108 #if MW_MVI_SIGNALLING_MODE == 0109 Void parseMvInheritanceFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );110 #endif111 144 Void parseMergeFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPUIdx ); 112 145 Void parseMergeIndex ( TComDataCU* pcCU, UInt& ruiMergeIndex, UInt uiAbsPartIdx, UInt uiDepth ); 146 #if HHI_INTER_VIEW_MOTION_PRED || HHI_MPI 113 147 Void parseMergeIndexMV ( TComDataCU* pcCU, UInt& ruiMergeIndex, UInt uiAbsPartIdx, UInt uiDepth ); 148 #endif 114 149 Void parseResPredFlag ( TComDataCU* pcCU, Bool& rbResPredFlag, UInt uiAbsPartIdx, UInt uiDepth ); 115 150 Void parsePartSize ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); … … 149 184 ContextModel3DBuffer m_cCUSkipFlagSCModel; 150 185 ContextModel3DBuffer m_cCUSplitFlagSCModel; 151 #if MW_MVI_SIGNALLING_MODE == 0152 ContextModel3DBuffer m_cCUMvInheritanceFlagSCModel;153 #endif154 186 ContextModel3DBuffer m_cCUMergeFlagExtSCModel; 155 187 ContextModel3DBuffer m_cCUMergeIdxExtSCModel; … … 196 228 #endif 197 229 ContextModel3DBuffer m_cViewIdxSCModel; 198 #if HHI_DMM_ INTRA230 #if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX 199 231 ContextModel3DBuffer m_cIntraDMMSCModel; 200 232 ContextModel3DBuffer m_cIntraWedgeSCModel; -
trunk/source/Lib/TLibDecoder/TDecSlice.cpp
r2 r5 1 /* The copyright in this software is being made available under the BSD 2 * License, included below. This software may be subject to other third party 3 * and contributor rights, including patent rights, and no such rights are 4 * granted under this license. 5 * 6 * Copyright (c) 2010-2011, ISO/IEC 7 * All rights reserved. 8 * 9 * Redistribution and use in source and binary forms, with or without 10 * modification, are permitted provided that the following conditions are met: 11 * 12 * * Redistributions of source code must retain the above copyright notice, 13 * this list of conditions and the following disclaimer. 14 * * Redistributions in binary form must reproduce the above copyright notice, 15 * this list of conditions and the following disclaimer in the documentation 16 * and/or other materials provided with the distribution. 17 * * Neither the name of the ISO/IEC nor the names of its contributors may 18 * be used to endorse or promote products derived from this software without 19 * specific prior written permission. 20 * 21 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 22 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS 25 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 26 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 27 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 30 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 31 * THE POSSIBILITY OF SUCH DAMAGE. 32 */ 33 1 34 2 35 -
trunk/source/Lib/TLibDecoder/TDecSlice.h
r2 r5 1 /* The copyright in this software is being made available under the BSD 2 * License, included below. This software may be subject to other third party 3 * and contributor rights, including patent rights, and no such rights are 4 * granted under this license. 5 * 6 * Copyright (c) 2010-2011, ISO/IEC 7 * All rights reserved. 8 * 9 * Redistribution and use in source and binary forms, with or without 10 * modification, are permitted provided that the following conditions are met: 11 * 12 * * Redistributions of source code must retain the above copyright notice, 13 * this list of conditions and the following disclaimer. 14 * * Redistributions in binary form must reproduce the above copyright notice, 15 * this list of conditions and the following disclaimer in the documentation 16 * and/or other materials provided with the distribution. 17 * * Neither the name of the ISO/IEC nor the names of its contributors may 18 * be used to endorse or promote products derived from this software without 19 * specific prior written permission. 20 * 21 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 22 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS 25 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 26 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 27 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 30 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 31 * THE POSSIBILITY OF SUCH DAMAGE. 32 */ 33 1 34 2 35 -
trunk/source/Lib/TLibDecoder/TDecTop.cpp
r2 r5 1 /* The copyright in this software is being made available under the BSD 2 * License, included below. This software may be subject to other third party 3 * and contributor rights, including patent rights, and no such rights are 4 * granted under this license. 5 * 6 * Copyright (c) 2010-2011, ISO/IEC 7 * All rights reserved. 8 * 9 * Redistribution and use in source and binary forms, with or without 10 * modification, are permitted provided that the following conditions are met: 11 * 12 * * Redistributions of source code must retain the above copyright notice, 13 * this list of conditions and the following disclaimer. 14 * * Redistributions in binary form must reproduce the above copyright notice, 15 * this list of conditions and the following disclaimer in the documentation 16 * and/or other materials provided with the distribution. 17 * * Neither the name of the ISO/IEC nor the names of its contributors may 18 * be used to endorse or promote products derived from this software without 19 * specific prior written permission. 20 * 21 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 22 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS 25 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 26 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 27 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 30 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 31 * THE POSSIBILITY OF SUCH DAMAGE. 32 */ 33 1 34 /** \file TDecTop.cpp 2 35 \brief decoder class … … 258 291 m_cSliceDecoder.destroy(); 259 292 293 #if DEPTH_MAP_GENERATION 260 294 m_cDepthMapGenerator.destroy(); 295 #endif 296 #if HHI_INTER_VIEW_RESIDUAL_PRED 261 297 m_cResidualGenerator.destroy(); 298 #endif 262 299 } 263 300 … … 268 305 initROM(); 269 306 #if MTK_SAO 270 m_cGopDecoder. init( &m_cEntropyDecoder, &m_cSbacDecoder, &m_cBinCABAC, &m_cCavlcDecoder, &m_cSliceDecoder, &m_cLoopFilter, &m_cAdaptiveLoopFilter, &m_cSAO, &m_cDepthMapGenerator, &m_cResidualGenerator ); 307 m_cGopDecoder. init( &m_cEntropyDecoder, &m_cSbacDecoder, &m_cBinCABAC, &m_cCavlcDecoder, &m_cSliceDecoder, &m_cLoopFilter, &m_cAdaptiveLoopFilter, &m_cSAO 308 #if DEPTH_MAP_GENERATION 309 , &m_cDepthMapGenerator 310 #endif 311 #if HHI_INTER_VIEW_RESIDUAL_PRED 312 , &m_cResidualGenerator 313 #endif 314 ); 271 315 #else 272 m_cGopDecoder. init( &m_cEntropyDecoder, &m_cSbacDecoder, &m_cBinCABAC, &m_cCavlcDecoder, &m_cSliceDecoder, &m_cLoopFilter, &m_cAdaptiveLoopFilter, &m_cDepthMapGenerator, &m_cResidualGenerator ); 316 m_cGopDecoder. init( &m_cEntropyDecoder, &m_cSbacDecoder, &m_cBinCABAC, &m_cCavlcDecoder, &m_cSliceDecoder, &m_cLoopFilter, &m_cAdaptiveLoopFilter 317 #if DEPTH_MAP_GENERATION 318 , &m_cDepthMapGenerator 319 #endif 320 #if HHI_INTER_VIEW_RESIDUAL_PRED 321 , &m_cResidualGenerator 322 #endif 323 ); 273 324 #endif 274 325 m_cSliceDecoder.init( &m_cEntropyDecoder, &m_cCuDecoder ); … … 276 327 277 328 m_pcTAppDecTop = pcTAppDecTop; 329 #if DEPTH_MAP_GENERATION 278 330 m_cDepthMapGenerator.init( &m_cPrediction, m_pcTAppDecTop->getSPSAccess(), m_pcTAppDecTop->getAUPicAccess() ); 331 #endif 332 #if HHI_INTER_VIEW_RESIDUAL_PRED 279 333 m_cResidualGenerator.init( &m_cTrQuant, &m_cDepthMapGenerator ); 334 #endif 280 335 } 281 336 … … 283 338 { 284 339 m_cSPS = cSPS ; 285 #if SB_MEM_FIX286 340 if ( !m_cAdaptiveLoopFilter.isCreated()) 287 341 { … … 292 346 m_cLoopFilter. create( g_uiMaxCUDepth ); 293 347 } 294 #else295 m_cAdaptiveLoopFilter.create( m_cSPS.getWidth(), m_cSPS.getHeight(), g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth );296 #if MTK_SAO297 m_cSAO.create( m_cSPS.getWidth(), m_cSPS.getHeight(), g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth );298 #endif299 m_cLoopFilter. create( g_uiMaxCUDepth );300 #endif301 348 m_uiValidPS |= 1; 302 349 } … … 334 381 m_iMaxRefPicNum = getCodedPictureBufferSize( ); 335 382 383 #if DEPTH_MAP_GENERATION 336 384 Bool bNeedPrdDepthMapBuffer = ( !pcSlice->getSPS()->isDepth() && ( pcSlice->getSPS()->getViewId() == 0 || pcSlice->getSPS()->getPredDepthMapGeneration() > 0 ) ); 385 #endif 337 386 338 387 if (m_cListPic.size() < (UInt)m_iMaxRefPicNum) … … 340 389 rpcPic = new TComPic; 341 390 rpcPic->create ( pcSlice->getSPS()->getWidth(), pcSlice->getSPS()->getHeight(), g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth ); 391 #if DEPTH_MAP_GENERATION 342 392 if( bNeedPrdDepthMapBuffer ) 343 393 { 344 394 rpcPic->addPrdDepthMapBuffer(); 345 395 } 396 #endif 346 397 m_cListPic.pushBack( rpcPic ); 347 398 … … 372 423 rpcPic->getPicYuvRec()->setBorderExtension(false); 373 424 425 #if DEPTH_MAP_GENERATION 374 426 if( bNeedPrdDepthMapBuffer && !rpcPic->getPredDepthMap() ) 375 427 { 376 428 rpcPic->addPrdDepthMapBuffer(); 377 429 } 430 #endif 378 431 } 379 432 … … 397 450 { 398 451 pcPic->removeOriginalBuffer (); 452 #if HHI_INTER_VIEW_MOTION_PRED 399 453 pcPic->removeOrgDepthMapBuffer(); 454 #endif 455 #if HHI_INTER_VIEW_RESIDUAL_PRED 400 456 pcPic->removeResidualBuffer (); 457 #endif 458 #if HHI_INTERVIEW_SKIP 401 459 pcPic->removeUsedPelsMapBuffer(); 402 } 403 }404 460 #endif 461 } 462 } 405 463 406 464 #if AMVP_BUFFERCOMPRESS … … 492 550 493 551 // create ALF temporary buffer 494 #if SB_MEM_FIX495 552 if ( !m_cAdaptiveLoopFilter.isCreated()) 496 553 { … … 501 558 m_cLoopFilter. create( g_uiMaxCUDepth ); 502 559 } 503 #else504 m_cAdaptiveLoopFilter.create( m_cSPS.getWidth(), m_cSPS.getHeight(), g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth );505 #if MTK_SAO506 m_cSAO.create( m_cSPS.getWidth(), m_cSPS.getHeight(), g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth );507 #endif508 m_cLoopFilter. create( g_uiMaxCUDepth );509 #endif510 560 m_uiValidPS |= 1; 511 561 … … 594 644 m_cSliceDecoder.create( m_apcSlicePilot, m_apcSlicePilot->getSPS()->getWidth(), m_apcSlicePilot->getSPS()->getHeight(), g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth ); 595 645 646 #if DEPTH_MAP_GENERATION 596 647 m_cDepthMapGenerator.create( true, m_apcSlicePilot->getSPS()->getWidth(), m_apcSlicePilot->getSPS()->getHeight(), g_uiMaxCUDepth, g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiBitDepth + g_uiBitIncrement ); 648 #endif 649 #if HHI_INTER_VIEW_RESIDUAL_PRED 597 650 m_cResidualGenerator.create( true, m_apcSlicePilot->getSPS()->getWidth(), m_apcSlicePilot->getSPS()->getHeight(), g_uiMaxCUDepth, g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiBitDepth + g_uiBitIncrement ); 651 #endif 598 652 } 599 653 … … 663 717 pcPic->setCurrSliceIdx(m_uiSliceIdx); 664 718 665 #if HHI_DMM_ INTRA666 if ( m_cSPS.getUseD epthModelModes() && g_aacWedgeLists.empty() && m_bIsDepth )719 #if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX 720 if ( m_cSPS.getUseDMM() && g_aacWedgeLists.empty() && m_bIsDepth ) 667 721 { 668 722 initWedgeLists(); -
trunk/source/Lib/TLibDecoder/TDecTop.h
r2 r5 1 /* The copyright in this software is being made available under the BSD 2 * License, included below. This software may be subject to other third party 3 * and contributor rights, including patent rights, and no such rights are 4 * granted under this license. 5 * 6 * Copyright (c) 2010-2011, ISO/IEC 7 * All rights reserved. 8 * 9 * Redistribution and use in source and binary forms, with or without 10 * modification, are permitted provided that the following conditions are met: 11 * 12 * * Redistributions of source code must retain the above copyright notice, 13 * this list of conditions and the following disclaimer. 14 * * Redistributions in binary form must reproduce the above copyright notice, 15 * this list of conditions and the following disclaimer in the documentation 16 * and/or other materials provided with the distribution. 17 * * Neither the name of the ISO/IEC nor the names of its contributors may 18 * be used to endorse or promote products derived from this software without 19 * specific prior written permission. 20 * 21 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 22 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS 25 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 26 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 27 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 30 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 31 * THE POSSIBILITY OF SUCH DAMAGE. 32 */ 33 1 34 2 35 … … 66 99 Bool m_bGopSizeSet; 67 100 int m_iMaxRefPicNum; 68 101 69 102 #if DCM_DECODING_REFRESH 70 103 Bool m_bRefreshPending; ///< refresh pending flag … … 80 113 TComPPS m_cPPS; 81 114 TComSlice* m_apcSlicePilot; 82 115 83 116 SEImessages *m_SEIs; ///< "all" SEI messages. If not NULL, we own the object. 84 117 … … 98 131 TComSampleAdaptiveOffset m_cSAO; 99 132 #endif 133 #if DEPTH_MAP_GENERATION 100 134 TComDepthMapGenerator m_cDepthMapGenerator; 135 #endif 136 #if HHI_INTER_VIEW_RESIDUAL_PRED 101 137 TComResidualGenerator m_cResidualGenerator; 138 #endif 102 139 103 140 Bool m_bIsDepth; … … 119 156 TDecTop(); 120 157 virtual ~TDecTop(); 121 158 122 159 Void create (); 123 160 Void destroy (); 124 161 125 162 void setPictureDigestEnabled(bool enabled) { m_cGopDecoder.setPictureDigestEnabled(enabled); } 126 163 127 164 Void init( TAppDecTop* pcTAppDecTop, Bool bFirstInstance = true ); 128 165 #if DCM_SKIP_DECODING_FRAMES … … 131 168 Void decode ( Bool bEos, TComBitstream* pcBitstream, UInt& ruiPOC, TComList<TComPic*>*& rpcListPic, NalUnitType& reNalUnitType, TComSPS& cComSPS ); 132 169 #endif 133 170 134 171 TComSPS *getSPS() { return (m_uiValidPS & 1) ? &m_cSPS : NULL; } 135 172 136 173 Void deletePicBuffer(); 137 174 … … 149 186 Void setCamParsCollector( CamParsCollector* pcCamParsCollector ) { m_pcCamParsCollector = pcCamParsCollector; } 150 187 151 // SB152 188 TComList<TComPic*>* getListPic () { return &m_cListPic; } 153 189 TAppDecTop* getDecTop ( ){ return m_pcTAppDecTop ;}; … … 161 197 protected: 162 198 Void xGetNewPicBuffer (TComSlice* pcSlice, TComPic*& rpcPic); 163 199 164 200 };// END CLASS DEFINITION TDecTop 165 201
Note: See TracChangeset for help on using the changeset viewer.