Ticket #590: SAO_CODE_CLEAN_UP.patch
File SAO_CODE_CLEAN_UP.patch, 21.8 KB (added by dionismkim, 12 years ago) |
---|
-
build/vc9/TLibCommon_vc9.vcproj
1 1 <?xml version="1.0" encoding="Windows-1252"?> 2 2 <VisualStudioProject 3 3 ProjectType="Visual C++" 4 Version="9 ,00"4 Version="9.00" 5 5 Name="TLibCommon" 6 6 ProjectGUID="{78018D78-F890-47E3-A0B7-09D273F0B11D}" 7 7 RootNamespace="TLibCommon" … … 81 81 /> 82 82 </Configuration> 83 83 <Configuration 84 Name=" Debug|x64"84 Name="Release|Win32" 85 85 OutputDirectory="$(SolutionDir)\vc9\$(PlatformName)\$(ConfigurationName)\$(RootNamespace)" 86 86 IntermediateDirectory="$(SolutionDir)\vc9\$(PlatformName)\$(ConfigurationName)\$(RootNamespace)" 87 87 ConfigurationType="4" 88 88 CharacterSet="2" 89 WholeProgramOptimization="1" 89 90 > 90 91 <Tool 91 92 Name="VCPreBuildEventTool" … … 101 102 /> 102 103 <Tool 103 104 Name="VCMIDLTool" 104 TargetEnvironment="3"105 105 /> 106 106 <Tool 107 107 Name="VCCLCompilerTool" 108 Optimization="0" 108 Optimization="2" 109 InlineFunctionExpansion="2" 110 EnableIntrinsicFunctions="false" 111 FavorSizeOrSpeed="1" 109 112 AdditionalIncludeDirectories="$(SolutionDir)\..\source\Lib\;$(SolutionDir)\..\compat\msvc" 110 PreprocessorDefinitions="WIN32;_ DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS"111 MinimalRebuild="true"112 BasicRuntimeChecks="3"113 RuntimeLibrary="1"113 PreprocessorDefinitions="WIN32;_LIB;_CRT_SECURE_NO_WARNINGS" 114 StringPooling="true" 115 RuntimeLibrary="0" 116 EnableFunctionLevelLinking="true" 114 117 WarningLevel="3" 115 118 DebugInformationFormat="3" 116 119 /> … … 143 146 /> 144 147 </Configuration> 145 148 <Configuration 146 Name=" Release|Win32"149 Name="Debug|x64" 147 150 OutputDirectory="$(SolutionDir)\vc9\$(PlatformName)\$(ConfigurationName)\$(RootNamespace)" 148 151 IntermediateDirectory="$(SolutionDir)\vc9\$(PlatformName)\$(ConfigurationName)\$(RootNamespace)" 149 152 ConfigurationType="4" 150 153 CharacterSet="2" 151 WholeProgramOptimization="1"152 154 > 153 155 <Tool 154 156 Name="VCPreBuildEventTool" … … 164 166 /> 165 167 <Tool 166 168 Name="VCMIDLTool" 169 TargetEnvironment="3" 167 170 /> 168 171 <Tool 169 172 Name="VCCLCompilerTool" 170 Optimization="2" 171 InlineFunctionExpansion="2" 172 EnableIntrinsicFunctions="false" 173 FavorSizeOrSpeed="1" 173 Optimization="0" 174 174 AdditionalIncludeDirectories="$(SolutionDir)\..\source\Lib\;$(SolutionDir)\..\compat\msvc" 175 PreprocessorDefinitions="WIN32;_ LIB;_CRT_SECURE_NO_WARNINGS"176 StringPooling="true"177 RuntimeLibrary="0"178 EnableFunctionLevelLinking="true"175 PreprocessorDefinitions="WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS" 176 MinimalRebuild="true" 177 BasicRuntimeChecks="3" 178 RuntimeLibrary="1" 179 179 WarningLevel="3" 180 180 DebugInformationFormat="3" 181 181 /> -
source/Lib/TLibCommon/ContextTables.h
102 102 #define NUM_ALF_UVLC_CTX 2 ///< number of context models for ALF UVLC (filter length) 103 103 #define NUM_ALF_SVLC_CTX 3 ///< number of context models for ALF SVLC (filter coeff.) 104 104 105 #define NUM_SAO_FLAG_CTX 1 ///< number of context models for SAO flag 105 #if !SAO_CODE_CLEAN_UP 106 #define NUM_SAO_FLAG_CTX 1 ///< number of context models for SAO flag 107 #endif 106 108 #define NUM_SAO_UVLC_CTX 2 ///< number of context models for SAO UVLC 107 109 #if !(SAO_OFFSET_MAG_SIGN_SPLIT && SAO_RDO_FIX) 108 110 #define NUM_SAO_SVLC_CTX 3 ///< number of context models for SAO SVLC 109 111 #endif 110 #define NUM_SAO_RUN_CTX 3 ///< number of context models for AO SVLC (filter coeff.) 112 #if !SAO_CODE_CLEAN_UP 113 #define NUM_SAO_RUN_CTX 3 ///< number of context models for AO SVLC (filter coeff.) 114 #endif 111 115 #define NUM_SAO_MERGE_LEFT_FLAG_CTX 3 ///< number of context models for AO SVLC (filter coeff.) 112 116 #define NUM_SAO_MERGE_UP_FLAG_CTX 1 ///< number of context models for AO SVLC (filter coeff.) 113 117 #define NUM_SAO_TYPE_IDX_CTX 2 ///< number of context models for AO SVLC (filter coeff.) … … 549 553 { 141, 154, 159, }, 550 554 #endif 551 555 }; 552 556 #if !SAO_CODE_CLEAN_UP 553 557 static const UChar 554 558 INIT_SAO_FLAG[3][NUM_SAO_FLAG_CTX] = 555 559 { … … 563 567 { 153, }, 564 568 #endif 565 569 }; 566 570 #endif 567 571 static const UChar 568 572 INIT_SAO_UVLC[3][NUM_SAO_UVLC_CTX] = 569 573 { -
source/Lib/TLibCommon/TComSampleAdaptiveOffset.cpp
1376 1376 { 1377 1377 saoUnit->partIdx = 0; 1378 1378 saoUnit->partIdxTmp = 0; 1379 #if !SAO_CODE_CLEAN_UP 1379 1380 saoUnit->run = 0; 1380 1381 saoUnit->runDiff = 0; 1382 #endif 1381 1383 saoUnit->mergeLeftFlag = 0; 1382 1384 saoUnit->mergeUpFlag = 0; 1383 1385 saoUnit->typeIdx = -1; -
source/Lib/TLibCommon/TypeDef.h
116 116 #endif 117 117 118 118 #define SAO_RDO_FIX 1 ///< I0563: SAO RDO bug-fix 119 #if SAO_OFFSET_MAG_SIGN_SPLIT && SAO_OFFSET_MAG_SIGN_SPLIT && SAO_REMOVE_APS && SAO_TRUNCATED_U 120 #define SAO_CODE_CLEAN_UP 1 /// redundant code removal 121 #endif 119 122 120 123 #define MAX_NUM_SPS 32 121 124 #define MAX_NUM_PPS 256 … … 334 337 Int typeIdx; 335 338 Int bandPosition; 336 339 Int offset[4]; 340 #if !SAO_CODE_CLEAN_UP 337 341 Int runDiff; 338 342 Int run; 343 #endif 339 344 Int partIdx; 340 345 Int partIdxTmp; 341 346 Int length; -
source/Lib/TLibDecoder/TDecCAVLC.cpp
389 389 } 390 390 } 391 391 } 392 #if !SAO_CODE_CLEAN_UP 392 393 /** parse SAO offset 393 394 * \param saoLcuParam SAO LCU parameters 394 395 */ … … 429 430 saoLcuParam->length = 0; 430 431 } 431 432 } 432 433 #endif 433 434 #if !SAO_REMOVE_APS 434 435 /** parse SAO unit 435 436 * \param rx x-axis location -
source/Lib/TLibDecoder/TDecCAVLC.h
148 148 #if !SAO_REMOVE_APS 149 149 Void xParseSaoParam ( SAOParam* pSaoParam ); 150 150 #endif 151 #if !SAO_CODE_CLEAN_UP 151 152 Void xParseSaoOffset (SaoLcuParam* saoLcuParam); 153 #endif 152 154 #if !SAO_REMOVE_APS 153 155 Void xParseSaoUnit (Int rx, Int ry, Int compIdx, SAOParam* saoParam, Bool& repeatedRow ); 154 156 #endif -
source/Lib/TLibDecoder/TDecSbac.cpp
76 76 , m_cALFUvlcSCModel ( 1, 1, NUM_ALF_UVLC_CTX , m_contextModels + m_numContextModels, m_numContextModels) 77 77 , m_cALFSvlcSCModel ( 1, 1, NUM_ALF_SVLC_CTX , m_contextModels + m_numContextModels, m_numContextModels) 78 78 , m_cCUAMPSCModel ( 1, 1, NUM_CU_AMP_CTX , m_contextModels + m_numContextModels, m_numContextModels) 79 #if !SAO_CODE_CLEAN_UP 79 80 , m_cSaoFlagSCModel ( 1, 1, NUM_SAO_FLAG_CTX , m_contextModels + m_numContextModels, m_numContextModels) 81 #endif 80 82 , m_cSaoUvlcSCModel ( 1, 1, NUM_SAO_UVLC_CTX , m_contextModels + m_numContextModels, m_numContextModels) 81 83 #if !(SAO_OFFSET_MAG_SIGN_SPLIT && SAO_RDO_FIX) 82 84 , m_cSaoSvlcSCModel ( 1, 1, NUM_SAO_SVLC_CTX , m_contextModels + m_numContextModels, m_numContextModels) … … 146 148 m_cALFFlagSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_ALF_FLAG ); 147 149 m_cALFUvlcSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_ALF_UVLC ); 148 150 m_cALFSvlcSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_ALF_SVLC ); 151 #if !SAO_CODE_CLEAN_UP 149 152 m_cSaoFlagSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_SAO_FLAG ); 153 #endif 150 154 m_cSaoUvlcSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_SAO_UVLC ); 151 155 #if !(SAO_OFFSET_MAG_SIGN_SPLIT && SAO_RDO_FIX) 152 156 m_cSaoSvlcSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_SAO_SVLC ); … … 214 218 m_cALFFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_ALF_FLAG ); 215 219 m_cALFUvlcSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_ALF_UVLC ); 216 220 m_cALFSvlcSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_ALF_SVLC ); 221 #if !SAO_CODE_CLEAN_UP 217 222 m_cSaoFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_SAO_FLAG ); 223 #endif 218 224 m_cSaoUvlcSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_SAO_UVLC ); 219 225 #if !(SAO_OFFSET_MAG_SIGN_SPLIT && SAO_RDO_FIX) 220 226 m_cSaoSvlcSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_SAO_SVLC ); … … 1587 1593 val = i; 1588 1594 } 1589 1595 #endif 1590 1596 #if !SAO_CODE_CLEAN_UP 1591 1597 Void TDecSbac::parseSaoUvlc (UInt& ruiVal) 1592 1598 { 1593 1599 UInt uiCode; … … 1613 1619 1614 1620 ruiVal = i; 1615 1621 } 1622 #endif 1616 1623 #if !(SAO_OFFSET_MAG_SIGN_SPLIT && SAO_RDO_FIX) 1617 1624 Void TDecSbac::parseSaoSvlc (Int& riVal) 1618 1625 { -
source/Lib/TLibDecoder/TDecSbac.h
93 93 #if SAO_TRUNCATED_U 94 94 Void parseSaoMaxUvlc ( UInt& val, UInt maxSymbol ); 95 95 #endif 96 #if !SAO_CODE_CLEAN_UP 96 97 Void parseSaoUvlc ( UInt& ruiVal ); 98 #endif 97 99 #if !(SAO_OFFSET_MAG_SIGN_SPLIT && SAO_RDO_FIX) 98 100 Void parseSaoSvlc ( Int& riVal ); 99 101 #endif … … 204 206 ContextModel3DBuffer m_cALFUvlcSCModel; 205 207 ContextModel3DBuffer m_cALFSvlcSCModel; 206 208 ContextModel3DBuffer m_cCUAMPSCModel; 209 #if !SAO_CODE_CLEAN_UP 207 210 ContextModel3DBuffer m_cSaoFlagSCModel; 211 #endif 208 212 ContextModel3DBuffer m_cSaoUvlcSCModel; 209 213 #if !(SAO_OFFSET_MAG_SIGN_SPLIT && SAO_RDO_FIX) 210 214 ContextModel3DBuffer m_cSaoSvlcSCModel; -
source/Lib/TLibEncoder/TEncCavlc.cpp
1219 1219 } 1220 1220 #endif 1221 1221 1222 1222 #if !SAO_CODE_CLEAN_UP 1223 1223 Void TEncCavlc::codeSaoFlag( UInt uiCode ) 1224 1224 { 1225 1225 xWriteFlag( uiCode ); … … 1229 1229 { 1230 1230 xWriteUvlc( uiCode ); 1231 1231 } 1232 #endif 1232 1233 #if !(SAO_OFFSET_MAG_SIGN_SPLIT && SAO_RDO_FIX) 1233 1234 Void TEncCavlc::codeSaoSvlc( Int iCode ) 1234 1235 { 1235 1236 xWriteSvlc( iCode ); 1236 1237 } 1237 1238 #endif 1239 #if !SAO_CODE_CLEAN_UP 1238 1240 /** Code SAO run. 1239 1241 * \param uiCode 1240 1242 * \param maxValue … … 1258 1260 } 1259 1261 WRITE_CODE( uiCode, uiLength, "sao_run_diff"); 1260 1262 } 1263 #endif 1261 1264 1262 1265 Void TEncCavlc::estBit( estBitsSbacStruct* pcEstBitsCabac, Int width, Int height, TextType eTType ) 1263 1266 { -
source/Lib/TLibEncoder/TEncCavlc.h
136 136 Void codeAPSAlflag(UInt uiCode); 137 137 Void codeAlfFixedLengthIdx( UInt idx, UInt numFilterSetsInBuffer); 138 138 #endif 139 #if !SAO_CODE_CLEAN_UP 139 140 Void codeSaoFlag ( UInt uiCode ); 140 141 Void codeSaoUvlc ( UInt uiCode ); 142 #endif 141 143 #if SAO_OFFSET_MAG_SIGN_SPLIT 142 144 Void codeSAOSign ( UInt code ) { printf("Not supported\n"); assert (0); } 143 145 #endif … … 147 149 #if !(SAO_OFFSET_MAG_SIGN_SPLIT && SAO_RDO_FIX) 148 150 Void codeSaoSvlc ( Int iCode ); 149 151 #endif 152 #if SAO_CODE_CLEAN_UP 153 Void codeSaoMergeLeft ( UInt uiCode, UInt compIdx ){printf("Not supported\n"); assert (0);} 154 Void codeSaoMergeUp ( UInt uiCode ){printf("Not supported\n"); assert (0);} 155 Void codeSaoTypeIdx ( UInt uiCode ){printf("Not supported\n"); assert (0);} 156 Void codeSaoUflc ( UInt uiCode ){ assert(uiCode < 32); printf("Not supported\n"); assert (0);} 157 #else 150 158 Void codeSaoRun ( UInt uiCode, UInt maxValue ); 151 159 Void codeSaoMergeLeft ( UInt uiCode, UInt compIdx ){;} 152 160 Void codeSaoMergeUp ( UInt uiCode ){;} 153 161 Void codeSaoTypeIdx ( UInt uiCode ){ xWriteUvlc(uiCode );} 154 162 Void codeSaoUflc ( UInt uiCode ){ assert(uiCode < 32); xWriteCode(uiCode, 5);} 163 #endif 155 164 156 165 Void codeSkipFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx ); 157 166 Void codeMergeFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx ); -
source/Lib/TLibEncoder/TEncEntropy.h
144 144 #if !AHG6_ALF_OPTION2 145 145 virtual Void codeAlfCtrlFlag ( UInt uiSymbol ) = 0; 146 146 #endif 147 #if !SAO_CODE_CLEAN_UP 147 148 virtual Void codeSaoFlag ( UInt uiCode ) = 0; 148 149 virtual Void codeSaoUvlc ( UInt uiCode ) = 0; 150 #endif 149 151 #if SAO_OFFSET_MAG_SIGN_SPLIT 150 152 virtual Void codeSAOSign ( UInt code ) = 0; 151 153 #endif … … 155 157 #if !(SAO_OFFSET_MAG_SIGN_SPLIT && SAO_RDO_FIX) 156 158 virtual Void codeSaoSvlc ( Int iCode ) = 0; 157 159 #endif 160 #if !SAO_CODE_CLEAN_UP 158 161 virtual Void codeSaoRun ( UInt uiCode, UInt uiMaxValue ) = 0; 162 #endif 159 163 virtual Void codeSaoMergeLeft ( UInt uiCode, UInt uiCompIdx ) = 0; 160 164 virtual Void codeSaoMergeUp ( UInt uiCode) = 0; 161 165 virtual Void codeSaoTypeIdx ( UInt uiCode) = 0; -
source/Lib/TLibEncoder/TEncSampleAdaptiveOffset.cpp
1505 1505 else 1506 1506 { 1507 1507 Int i,j, addr, addrUp, addrLeft, idx, idxUp, idxLeft, idxCount; 1508 Int run; 1508 #if !SAO_CODE_CLEAN_UP 1509 Int run; 1509 1510 Int runPartBeginAddr=0; 1510 1511 Int runPart; 1511 1512 Int runPartPrevious; 1513 #endif 1512 1514 1513 1515 oneUnitFlag = 0; 1514 1516 … … 1518 1520 1519 1521 for (j=0;j<m_iNumCuInHeight;j++) 1520 1522 { 1521 run = 0; 1523 #if !SAO_CODE_CLEAN_UP 1524 run = 0; 1522 1525 runPartPrevious = -1; 1526 #endif 1523 1527 for (i=0;i<m_iNumCuInWidth;i++) 1524 1528 { 1525 1529 addr = i + j*m_iNumCuInWidth; … … 1555 1559 { 1556 1560 checkMerge(&saoLcuParam[addr], &saoLcuParam[addrLeft], 0); 1557 1561 } 1558 runPart = saoLcuParam[addr].partIdx; 1562 #if !SAO_CODE_CLEAN_UP 1563 runPart = saoLcuParam[addr].partIdx; 1559 1564 if (runPart == runPartPrevious) 1560 1565 { 1561 1566 run ++; … … 1569 1574 saoLcuParam[addr].run = run; 1570 1575 } 1571 1576 runPartPrevious = runPart; 1577 #endif 1572 1578 } 1573 1579 } 1574 1580 #if !SAO_CODE_CLEAN_UP 1575 1581 for (j=0;j<m_iNumCuInHeight;j++) 1576 1582 { 1577 1583 for (i=0;i<m_iNumCuInWidth;i++) … … 1597 1603 } 1598 1604 } 1599 1605 } 1606 #endif 1600 1607 } 1601 1608 } 1602 1609 /** rate distortion optimization of all SAO units … … 1661 1668 } 1662 1669 saoParam->saoLcuParam[compIdx][addr].typeIdx = -1; 1663 1670 saoParam->saoLcuParam[compIdx][addr].mergeUpFlag = 0; 1664 saoParam->saoLcuParam[compIdx][addr].run = 0; 1671 #if !SAO_CODE_CLEAN_UP 1672 saoParam->saoLcuParam[compIdx][addr].run = 0; 1665 1673 saoParam->saoLcuParam[compIdx][addr].runDiff = 0; 1674 #endif 1666 1675 saoParam->saoLcuParam[compIdx][addr].mergeLeftFlag = 0; 1667 1676 saoParam->saoLcuParam[compIdx][addr].bandPosition = 0; 1668 1677 lambdaComp = compIdx==0 ? lambda : lambdaChroma; … … 1819 1828 Int classIdx; 1820 1829 Int shift = g_uiBitIncrement << 1; 1821 1830 // Double dAreaWeight = 0; 1831 #if !SAO_CODE_CLEAN_UP 1822 1832 Double complexityCost = 0; 1833 #endif 1823 1834 SaoLcuParam* saoLcuParam = NULL; 1824 1835 SaoLcuParam* saoLcuParamNeighbor = NULL; 1825 1836 Int merge_iOffset [33]; … … 1834 1845 saoLcuParam = &(saoParam->saoLcuParam[yCbCr][addr]); 1835 1846 saoLcuParam->mergeUpFlag = 0; 1836 1847 saoLcuParam->mergeLeftFlag = 0; 1848 #if !SAO_CODE_CLEAN_UP 1837 1849 saoLcuParam->run = 0; 1838 1850 saoLcuParam->runDiff= 0; 1851 #endif 1839 1852 1840 1853 1841 1854 m_iTypePartBest[yCbCr] = -1; … … 1844 1857 #else 1845 1858 m_dCostPartBest[yCbCr] = 0; 1846 1859 #endif 1860 #if !SAO_CODE_CLEAN_UP 1847 1861 m_iDistOrg[yCbCr] = 0; 1862 #endif 1848 1863 1849 1864 Double bestRDCostTableBo = MAX_DOUBLE; 1850 1865 Int bestClassTableBo = 0; … … 1994 2009 1995 2010 if(merge_dCost < m_dCostPartBest[yCbCr]) 1996 2011 { 1997 m_iDistOrg [yCbCr] = (Int64)complexityCost; 2012 #if !SAO_CODE_CLEAN_UP 2013 m_iDistOrg [yCbCr] = (Int64)complexityCost; 2014 #endif 1998 2015 m_dCostPartBest[yCbCr] = merge_dCost; 1999 2016 m_iTypePartBest[yCbCr] = typeIdx; 2000 2017 if (typeIdx>=0) -
source/Lib/TLibEncoder/TEncSbac.cpp
88 88 , m_cALFUvlcSCModel ( 1, 1, NUM_ALF_UVLC_CTX , m_contextModels + m_numContextModels, m_numContextModels) 89 89 , m_cALFSvlcSCModel ( 1, 1, NUM_ALF_SVLC_CTX , m_contextModels + m_numContextModels, m_numContextModels) 90 90 , m_cCUAMPSCModel ( 1, 1, NUM_CU_AMP_CTX , m_contextModels + m_numContextModels, m_numContextModels) 91 #if !SAO_CODE_CLEAN_UP 91 92 , m_cSaoFlagSCModel ( 1, 1, NUM_SAO_FLAG_CTX , m_contextModels + m_numContextModels, m_numContextModels) 93 #endif 92 94 , m_cSaoUvlcSCModel ( 1, 1, NUM_SAO_UVLC_CTX , m_contextModels + m_numContextModels, m_numContextModels) 93 95 #if !(SAO_OFFSET_MAG_SIGN_SPLIT && SAO_RDO_FIX) 94 96 , m_cSaoSvlcSCModel ( 1, 1, NUM_SAO_SVLC_CTX , m_contextModels + m_numContextModels, m_numContextModels) … … 151 153 m_cALFUvlcSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_ALF_UVLC ); 152 154 m_cALFSvlcSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_ALF_SVLC ); 153 155 m_cCUTransSubdivFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_TRANS_SUBDIV_FLAG ); 156 #if !SAO_CODE_CLEAN_UP 154 157 m_cSaoFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_SAO_FLAG ); 158 #endif 155 159 m_cSaoUvlcSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_SAO_UVLC ); 156 160 #if !(SAO_OFFSET_MAG_SIGN_SPLIT && SAO_RDO_FIX) 157 161 m_cSaoSvlcSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_SAO_SVLC ); … … 216 220 curCost += m_cALFUvlcSCModel.calcCost ( curSliceType, qp, (UChar*)INIT_ALF_UVLC ); 217 221 curCost += m_cALFSvlcSCModel.calcCost ( curSliceType, qp, (UChar*)INIT_ALF_SVLC ); 218 222 curCost += m_cCUTransSubdivFlagSCModel.calcCost ( curSliceType, qp, (UChar*)INIT_TRANS_SUBDIV_FLAG ); 219 curCost += m_cSaoFlagSCModel.calcCost ( curSliceType, qp, (UChar*)INIT_SAO_FLAG ); 223 #if !SAO_CODE_CLEAN_UP 224 curCost += m_cSaoFlagSCModel.calcCost ( curSliceType, qp, (UChar*)INIT_SAO_FLAG ); 225 #endif 220 226 curCost += m_cSaoUvlcSCModel.calcCost ( curSliceType, qp, (UChar*)INIT_SAO_UVLC ); 221 227 #if !(SAO_OFFSET_MAG_SIGN_SPLIT && SAO_RDO_FIX) 222 228 curCost += m_cSaoSvlcSCModel.calcCost ( curSliceType, qp, (UChar*)INIT_SAO_SVLC ); … … 276 282 m_cALFUvlcSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_ALF_UVLC ); 277 283 m_cALFSvlcSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_ALF_SVLC ); 278 284 m_cCUTransSubdivFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_TRANS_SUBDIV_FLAG ); 285 #if !SAO_CODE_CLEAN_UP 279 286 m_cSaoFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_SAO_FLAG ); 287 #endif 280 288 m_cSaoUvlcSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_SAO_UVLC ); 281 289 #if !(SAO_OFFSET_MAG_SIGN_SPLIT && SAO_RDO_FIX) 282 290 m_cSaoSvlcSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_SAO_SVLC ); … … 1717 1725 m_pcBinIf->encodeBinEP( code ); 1718 1726 } 1719 1727 #endif 1720 1728 #if !SAO_CODE_CLEAN_UP 1721 1729 Void TEncSbac::codeSaoFlag ( UInt uiCode ) 1722 1730 { 1723 1731 UInt uiSymbol = ( ( uiCode == 0 ) ? 0 : 1 ); … … 1742 1750 m_pcBinIf->encodeBin( 0, m_cSaoUvlcSCModel.get( 0, 0, 1 ) ); 1743 1751 } 1744 1752 } 1753 #endif 1745 1754 #if SAO_TRUNCATED_U 1746 1755 Void TEncSbac::codeSaoMaxUvlc ( UInt code, UInt maxSymbol ) 1747 1756 { -
source/Lib/TLibEncoder/TEncSbac.h
119 119 Void codeAlfCtrlFlag ( UInt uiSymbol ); 120 120 #endif 121 121 Void codeApsExtensionFlag () { assert (0); return; }; 122 #if !SAO_CODE_CLEAN_UP 122 123 Void codeSaoFlag ( UInt uiCode ); 123 124 Void codeSaoUvlc ( UInt uiCode ); 125 #endif 124 126 #if SAO_TRUNCATED_U 125 127 Void codeSaoMaxUvlc ( UInt code, UInt maxSymbol ); 126 128 #endif 127 129 #if !(SAO_OFFSET_MAG_SIGN_SPLIT && SAO_RDO_FIX) 128 130 Void codeSaoSvlc ( Int uiCode ); 129 131 #endif 132 #if !SAO_CODE_CLEAN_UP 130 133 Void codeSaoRun ( UInt uiCode, UInt uiMaxValue ) {;} 134 #endif 131 135 Void codeSaoMergeLeft ( UInt uiCode, UInt uiCompIdx ); 132 136 Void codeSaoMergeUp ( UInt uiCode); 133 137 Void codeSaoTypeIdx ( UInt uiCode); … … 265 269 ContextModel3DBuffer m_cALFUvlcSCModel; 266 270 ContextModel3DBuffer m_cALFSvlcSCModel; 267 271 ContextModel3DBuffer m_cCUAMPSCModel; 272 #if !SAO_CODE_CLEAN_UP 268 273 ContextModel3DBuffer m_cSaoFlagSCModel; 274 #endif 269 275 ContextModel3DBuffer m_cSaoUvlcSCModel; 270 276 #if !(SAO_OFFSET_MAG_SIGN_SPLIT && SAO_RDO_FIX) 271 277 ContextModel3DBuffer m_cSaoSvlcSCModel;