Changeset 475 in SHVCSoftware for branches/SHM-4.0-dev/source/Lib/TLibEncoder
- Timestamp:
- 15 Nov 2013, 14:55:37 (11 years ago)
- Location:
- branches/SHM-4.0-dev/source/Lib/TLibEncoder
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-4.0-dev/source/Lib/TLibEncoder/TEncCavlc.cpp
r467 r475 1221 1221 } 1222 1222 1223 #if !AUXILIARY_PICTURES 1223 1224 #if REPN_FORMAT_IN_VPS 1224 1225 // in the first version chroma_format_idc is equal to one, thus colour_plane_id will not be present … … 1227 1228 // in the first version chroma_format_idc is equal to one, thus colour_plane_id will not be present 1228 1229 assert (pcSlice->getSPS()->getChromaFormatIdc() == 1 ); 1230 #endif 1229 1231 #endif 1230 1232 // if( separate_colour_plane_flag == 1 ) … … 1428 1430 WRITE_FLAG( pcSlice->getSaoEnabledFlag(), "slice_sao_luma_flag" ); 1429 1431 { 1432 #if AUXILIARY_PICTURES 1433 if (pcSlice->getChromaFormatIdc() != CHROMA_400) 1434 { 1435 #endif 1430 1436 SAOParam *saoParam = pcSlice->getPic()->getPicSym()->getSaoParam(); 1431 1437 WRITE_FLAG( saoParam->bSaoFlag[1], "slice_sao_chroma_flag" ); 1438 #if AUXILIARY_PICTURES 1439 } 1440 #endif 1432 1441 } 1433 1442 } … … 1894 1903 UInt uiMode = 0; 1895 1904 UInt uiTotalSignalledWeightFlags = 0; 1905 #if AUXILIARY_PICTURES 1906 if (pcSlice->getChromaFormatIdc() == CHROMA_400) 1907 { 1908 bChroma = false; 1909 } 1910 #endif 1896 1911 if ( (pcSlice->getSliceType()==P_SLICE && pcSlice->getPPS()->getUseWP()) || (pcSlice->getSliceType()==B_SLICE && pcSlice->getPPS()->getWPBiPred()) ) 1897 1912 { -
branches/SHM-4.0-dev/source/Lib/TLibEncoder/TEncCfg.h
r469 r475 211 211 Int m_chromaCbQpOffset; // Chroma Cb QP Offset (0:default) 212 212 Int m_chromaCrQpOffset; // Chroma Cr Qp Offset (0:default) 213 #if AUXILIARY_PICTURES 214 ChromaFormat m_chromaFormatIDC; 215 #endif 213 216 214 217 #if ADAPTIVE_QP_SELECTION … … 931 934 Int getAdaptiveResolutionChange() { return m_adaptiveResolutionChange; } 932 935 #endif 936 #if AUXILIARY_PICTURES 937 Void setChromaFormatIDC(ChromaFormat x) { m_chromaFormatIDC = x; } 938 ChromaFormat getChromaFormatIDC() { return m_chromaFormatIDC; } 939 #endif 933 940 #endif 934 941 }; -
branches/SHM-4.0-dev/source/Lib/TLibEncoder/TEncEntropy.cpp
r345 r475 280 280 const UInt uiTrDepthCurr = uiDepth - pcCU->getDepth( uiAbsPartIdx ); 281 281 const Bool bFirstCbfOfCU = uiTrDepthCurr == 0; 282 #if AUXILIARY_PICTURES 283 if (pcCU->getSlice()->getChromaFormatIdc() != CHROMA_400) 284 { 285 #endif 282 286 if( bFirstCbfOfCU || uiLog2TrafoSize > 2 ) 283 287 { … … 296 300 assert( pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_V, uiTrDepthCurr ) == pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_V, uiTrDepthCurr - 1 ) ); 297 301 } 302 #if AUXILIARY_PICTURES 303 } 304 else 305 { 306 assert( pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_U, uiTrDepthCurr ) == 0 ); 307 assert( pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_V, uiTrDepthCurr ) == 0 ); 308 } 309 #endif 298 310 299 311 if( uiSubdiv ) … … 402 414 Void TEncEntropy::encodeIntraDirModeChroma( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD ) 403 415 { 416 #if AUXILIARY_PICTURES 417 if ( pcCU->getSlice()->getChromaFormatIdc() == CHROMA_400 ) 418 { 419 return; 420 } 421 #endif 404 422 if( bRD ) 405 423 { -
branches/SHM-4.0-dev/source/Lib/TLibEncoder/TEncGOP.cpp
r467 r475 3165 3165 3166 3166 TComPicYuv* pcOrgInterlaced = new TComPicYuv; 3167 #if AUXILIARY_PICTURES 3168 pcOrgInterlaced->create( iWidth, iHeight << 1, pcPicOrgTop->getChromaFormat(), g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth ); 3169 #else 3167 3170 pcOrgInterlaced->create( iWidth, iHeight << 1, g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth ); 3171 #endif 3168 3172 3169 3173 TComPicYuv* pcRecInterlaced = new TComPicYuv; 3174 #if AUXILIARY_PICTURES 3175 pcRecInterlaced->create( iWidth, iHeight << 1, pcPicOrgTop->getChromaFormat(), g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth ); 3176 #else 3170 3177 pcRecInterlaced->create( iWidth, iHeight << 1, g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth ); 3178 #endif 3171 3179 3172 3180 Pel* pOrgInterlaced = pcOrgInterlaced->getLumaAddr(); -
branches/SHM-4.0-dev/source/Lib/TLibEncoder/TEncPic.cpp
r313 r475 126 126 * \return Void 127 127 */ 128 #if AUXILIARY_PICTURES 129 #if SVC_UPSAMPLING 130 Void TEncPic::create( Int iWidth, Int iHeight, ChromaFormat chromaFormat, UInt uiMaxWidth, UInt uiMaxHeight, UInt uiMaxDepth, UInt uiMaxAQDepth, 131 Window &conformanceWindow, Window &defaultDisplayWindow, Int *numReorderPics, TComSPS* pcSps, Bool bIsVirtual ) 132 133 #else 134 135 Void TEncPic::create( Int iWidth, Int iHeight, ChromaFormat chromaFormat, UInt uiMaxWidth, UInt uiMaxHeight, UInt uiMaxDepth, UInt uiMaxAQDepth, 136 Window &conformanceWindow, Window &defaultDisplayWindow, Int *numReorderPics, Bool bIsVirtual ) 137 #endif 138 { 139 #if SVC_UPSAMPLING 140 TComPic::create( iWidth, iHeight, chromaFormat, uiMaxWidth, uiMaxHeight, uiMaxDepth, 141 conformanceWindow, defaultDisplayWindow, numReorderPics, pcSps, bIsVirtual ); 142 #else 143 TComPic::create( iWidth, iHeight, chromaFormat, uiMaxWidth, uiMaxHeight, uiMaxDepth, conformanceWindow, defaultDisplayWindow, numReorderPics, bIsVirtual ); 144 #endif 145 m_uiMaxAQDepth = uiMaxAQDepth; 146 if ( uiMaxAQDepth > 0 ) 147 { 148 m_acAQLayer = new TEncPicQPAdaptationLayer[ m_uiMaxAQDepth ]; 149 for (UInt d = 0; d < m_uiMaxAQDepth; d++) 150 { 151 m_acAQLayer[d].create( iWidth, iHeight, uiMaxWidth>>d, uiMaxHeight>>d ); 152 } 153 } 154 } 155 #else 128 156 #if SVC_UPSAMPLING 129 157 Void TEncPic::create( Int iWidth, Int iHeight, UInt uiMaxWidth, UInt uiMaxHeight, UInt uiMaxDepth, UInt uiMaxAQDepth, … … 152 180 } 153 181 } 182 #endif 154 183 155 184 /** Clean up -
branches/SHM-4.0-dev/source/Lib/TLibEncoder/TEncPic.h
r313 r475 105 105 virtual ~TEncPic(); 106 106 107 #if AUXILIARY_PICTURES 108 #if SVC_UPSAMPLING 109 Void create( Int iWidth, Int iHeight, ChromaFormat chromaFormat, UInt uiMaxWidth, UInt uiMaxHeight, UInt uiMaxDepth, UInt uiMaxAQDepth, 110 Window &conformanceWindow, Window &defaultDisplayWindow, Int *numReorderPics, TComSPS* pcSps, Bool bIsVirtual=false ); 111 #else 112 Void create( Int iWidth, Int iHeight, ChromaFormat chromaFormat, UInt uiMaxWidth, UInt uiMaxHeight, UInt uiMaxDepth, UInt uiMaxAQDepth, 113 Window &conformanceWindow, Window &defaultDisplayWindow, Int *numReorderPics, Bool bIsVirtual = false ); 114 115 #endif 116 #else 107 117 #if SVC_UPSAMPLING 108 118 Void create( Int iWidth, Int iHeight, UInt uiMaxWidth, UInt uiMaxHeight, UInt uiMaxDepth, UInt uiMaxAQDepth, … … 111 121 Void create( Int iWidth, Int iHeight, UInt uiMaxWidth, UInt uiMaxHeight, UInt uiMaxDepth, UInt uiMaxAQDepth, 112 122 Window &conformanceWindow, Window &defaultDisplayWindow, Int *numReorderPics, Bool bIsVirtual = false ); 123 #endif 113 124 #endif 114 125 virtual Void destroy(); -
branches/SHM-4.0-dev/source/Lib/TLibEncoder/TEncSampleAdaptiveOffset.cpp
r313 r475 1871 1871 1872 1872 saoParam->bSaoFlag[0] = true; 1873 #if AUXILIARY_PICTURES 1874 saoParam->bSaoFlag[1] = m_pcPic->getChromaFormat() == CHROMA_400 ? false : true; 1875 #else 1873 1876 saoParam->bSaoFlag[1] = true; 1877 #endif 1874 1878 saoParam->oneUnitFlag[0] = false; 1875 1879 saoParam->oneUnitFlag[1] = false; -
branches/SHM-4.0-dev/source/Lib/TLibEncoder/TEncSbac.cpp
r442 r475 914 914 } 915 915 916 #if AUXILIARY_PICTURES 917 if (pcCU->getSlice()->getChromaFormatIdc() != CHROMA_400) 918 { 919 #endif 916 920 piPCMSample = pcCU->getPCMSampleCb() + uiChromaOffset; 917 921 uiWidth = pcCU->getWidth(uiAbsPartIdx)/2; … … 945 949 piPCMSample += uiWidth; 946 950 } 951 #if AUXILIARY_PICTURES 952 } 953 #endif 947 954 m_pcBinIf->resetBac(); 948 955 } -
branches/SHM-4.0-dev/source/Lib/TLibEncoder/TEncSlice.cpp
r469 r475 79 79 } 80 80 81 #if AUXILIARY_PICTURES 82 Void TEncSlice::create( Int iWidth, Int iHeight, ChromaFormat chromaFormat, UInt iMaxCUWidth, UInt iMaxCUHeight, UChar uhTotalDepth ) 83 { 84 // create prediction picture 85 if ( m_apcPicYuvPred == NULL ) 86 { 87 m_apcPicYuvPred = new TComPicYuv; 88 m_apcPicYuvPred->create( iWidth, iHeight, chromaFormat, iMaxCUWidth, iMaxCUHeight, uhTotalDepth ); 89 } 90 91 // create residual picture 92 if( m_apcPicYuvResi == NULL ) 93 { 94 m_apcPicYuvResi = new TComPicYuv; 95 m_apcPicYuvResi->create( iWidth, iHeight, chromaFormat, iMaxCUWidth, iMaxCUHeight, uhTotalDepth ); 96 } 97 } 98 #else 81 99 Void TEncSlice::create( Int iWidth, Int iHeight, UInt iMaxCUWidth, UInt iMaxCUHeight, UChar uhTotalDepth ) 82 100 { … … 95 113 } 96 114 } 115 #endif 97 116 98 117 Void TEncSlice::destroy() -
branches/SHM-4.0-dev/source/Lib/TLibEncoder/TEncSlice.h
r442 r475 111 111 virtual ~TEncSlice(); 112 112 113 #if AUXILIARY_PICTURES 114 Void create ( Int iWidth, Int iHeight, ChromaFormat chromaFormat, UInt iMaxCUWidth, UInt iMaxCUHeight, UChar uhTotalDepth ); 115 #else 113 116 Void create ( Int iWidth, Int iHeight, UInt iMaxCUWidth, UInt iMaxCUHeight, UChar uhTotalDepth ); 117 #endif 114 118 Void destroy (); 115 119 Void init ( TEncTop* pcEncTop ); -
branches/SHM-4.0-dev/source/Lib/TLibEncoder/TEncTop.cpp
r469 r475 115 115 m_cGOPEncoder. create(); 116 116 #endif 117 #if AUXILIARY_PICTURES 118 m_cSliceEncoder. create( getSourceWidth(), getSourceHeight(), m_chromaFormatIDC, g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth ); 119 #else 117 120 m_cSliceEncoder. create( getSourceWidth(), getSourceHeight(), g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth ); 121 #endif 118 122 m_cCuEncoder. create( g_uiMaxCUDepth, g_uiMaxCUWidth, g_uiMaxCUHeight ); 119 123 if (m_bUseSAO) … … 606 610 else 607 611 { 612 #if AUXILIARY_PICTURES 613 rpcPicYuvRec->create( m_iSourceWidth, m_iSourceHeight, m_chromaFormatIDC, g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth ); 614 #else 608 615 rpcPicYuvRec->create( m_iSourceWidth, m_iSourceHeight, g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth ); 616 #endif 609 617 } 610 618 rcListPicYuvRecOut.pushBack( rpcPicYuvRec ); … … 806 814 #endif 807 815 816 #if AUXILIARY_PICTURES 817 #if SVC_UPSAMPLING 818 pcEPic->create( m_iSourceWidth, m_iSourceHeight, m_chromaFormatIDC, g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth, m_cPPS.getMaxCuDQPDepth()+1 , 819 m_conformanceWindow, m_defaultDisplayWindow, m_numReorderPics, &m_cSPS); 820 #else 821 pcEPic->create( m_iSourceWidth, m_iSourceHeight, m_chromaFormatIDC, g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth, m_cPPS.getMaxCuDQPDepth()+1 , 822 m_conformanceWindow, m_defaultDisplayWindow, m_numReorderPics); 823 #endif 824 #else 808 825 #if SVC_UPSAMPLING 809 826 pcEPic->create( m_iSourceWidth, m_iSourceHeight, g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth, m_cPPS.getMaxCuDQPDepth()+1 , … … 812 829 pcEPic->create( m_iSourceWidth, m_iSourceHeight, g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth, m_cPPS.getMaxCuDQPDepth()+1 , 813 830 m_conformanceWindow, m_defaultDisplayWindow, m_numReorderPics); 831 #endif 814 832 #endif 815 833 rpcPic = pcEPic; … … 847 865 #endif 848 866 867 #if AUXILIARY_PICTURES 868 #if SVC_UPSAMPLING 869 rpcPic->create( m_iSourceWidth, m_iSourceHeight, m_chromaFormatIDC, g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth, 870 m_conformanceWindow, m_defaultDisplayWindow, m_numReorderPics, &m_cSPS); 871 #else 872 rpcPic->create( m_iSourceWidth, m_iSourceHeight, m_chromaFormatIDC, g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth, 873 m_conformanceWindow, m_defaultDisplayWindow, m_numReorderPics); 874 #endif 875 #else 849 876 #if SVC_UPSAMPLING 850 877 rpcPic->create( m_iSourceWidth, m_iSourceHeight, g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth, … … 853 880 rpcPic->create( m_iSourceWidth, m_iSourceHeight, g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth, 854 881 m_conformanceWindow, m_defaultDisplayWindow, m_numReorderPics); 882 #endif 855 883 #endif 856 884 } … … 917 945 m_cSPS.setMaxCUHeight ( g_uiMaxCUHeight ); 918 946 m_cSPS.setMaxCUDepth ( g_uiMaxCUDepth ); 947 #if AUXILIARY_PICTURES 948 m_cSPS.setChromaFormatIdc( m_chromaFormatIDC); 949 #endif 919 950 920 951 Int minCUSize = m_cSPS.getMaxCUWidth() >> ( m_cSPS.getMaxCUDepth()-g_uiAddCUDepth ); … … 1557 1588 m_cIlpPic[j] = new TComPic; 1558 1589 #if SVC_UPSAMPLING 1590 #if AUXILIARY_PICTURES 1591 m_cIlpPic[j]->create(m_iSourceWidth, m_iSourceHeight, m_chromaFormatIDC, g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth, conformanceWindow, defaultDisplayWindow, numReorderPics, &m_cSPS, true); 1592 #else 1559 1593 m_cIlpPic[j]->create(m_iSourceWidth, m_iSourceHeight, g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth, conformanceWindow, defaultDisplayWindow, numReorderPics, &m_cSPS, true); 1594 #endif 1560 1595 #else 1561 1596 m_cIlpPic[j]->create(m_iSourceWidth, m_iSourceHeight, g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth, conformanceWindow, defaultDisplayWindow, numReorderPics, true); … … 1609 1644 m_cIlpPic[j] = new TComPic; 1610 1645 #if SVC_UPSAMPLING 1646 #if AUXILIARY_PICTURES 1647 m_cIlpPic[j]->create(picWidth, picHeight, m_chromaFormatIDC, g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth, conformanceWindow, defaultDisplayWindow, numReorderPics, &m_cSPS, true); 1648 #else 1611 1649 m_cIlpPic[j]->create(picWidth, picHeight, g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth, conformanceWindow, defaultDisplayWindow, numReorderPics, &m_cSPS, true); 1650 #endif 1612 1651 #else 1613 1652 m_cIlpPic[j]->create(m_iSourceWidth, m_iSourceHeight, g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth, conformanceWindow, defaultDisplayWindow, numReorderPics, true);
Note: See TracChangeset for help on using the changeset viewer.