Changeset 345 in SHVCSoftware for trunk/source
- Timestamp:
- 17 Aug 2013, 06:27:19 (11 years ago)
- Location:
- trunk
- Files:
-
- 46 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/SHM-3.0-dev (added) merged: 315-344 /trunk (added) merged: 312-314
- Property svn:mergeinfo changed
-
trunk/source
- Property svn:mergeinfo changed
/branches/SHM-3.0-dev/source (added) merged: 316-340 /trunk/source (added) merged: 312-314
- Property svn:mergeinfo changed
-
trunk/source/App/TAppEncoder/TAppEncCfg.cpp
r313 r345 817 817 opts.addOptions()(cOSS.str(), m_GOPList[i-1], GOPEntry()); 818 818 } 819 #if FINAL_RPL_CHANGE_N0082 820 for(Int i=1; i<MAX_GOP+1; i++) { 821 std::ostringstream cOSS; 822 cOSS<<"FrameEL"<<i; 823 opts.addOptions()(cOSS.str(), m_acLayerCfg[1].m_GOPListLayer[i-1], GOPEntry()); 824 } 825 #endif 819 826 po::setDefaults(opts); 820 827 const list<const Char*>& argv_unhandled = po::scanArgv(opts, argc, (const Char**) argv); … … 1460 1467 #endif 1461 1468 1469 #if !FINAL_RPL_CHANGE_N0082 1462 1470 Bool verifiedGOP=false; 1471 #endif 1463 1472 Bool errorGOP=false; 1473 #if !FINAL_RPL_CHANGE_N0082 1464 1474 Int checkGOP=1; 1465 1475 Int numRefs = 1; 1476 #endif 1466 1477 Int refList[MAX_NUM_REF_PICS+1]; 1467 1478 refList[0]=0; … … 1471 1482 isOK[i]=false; 1472 1483 } 1484 #if !FINAL_RPL_CHANGE_N0082 1473 1485 Int numOK=0; 1486 #endif 1474 1487 #if !SVC_EXTENSION 1475 1488 xConfirmPara( m_iIntraPeriod >=0&&(m_iIntraPeriod%m_iGOPSize!=0), "Intra period must be a multiple of GOPSize, or -1" ); … … 1514 1527 } 1515 1528 #endif 1516 1529 #if FINAL_RPL_CHANGE_N0082 1530 for(UInt layer=0; layer<m_numLayers; layer++) 1531 { 1532 if (m_acLayerCfg[layer].m_GOPListLayer[0].m_POC<0){ 1533 memcpy( m_acLayerCfg[layer].m_GOPListLayer, m_GOPList, sizeof(GOPEntry)*MAX_GOP ); 1534 } 1535 errorGOP = xconfirmExtraGOP( m_acLayerCfg[layer].m_GOPListLayer ); 1536 xConfirmPara(errorGOP,"Invalid GOP structure given"); 1537 } 1538 //tentative for encoder 1539 if( m_acLayerCfg[1].m_GOPListLayer[5].m_POC == 6 && m_acLayerCfg[1].m_GOPListLayer[7].m_POC == 7 ){ 1540 //RA, POC5 1541 m_acLayerCfg[1].m_GOPListLayer[5].m_usedByCurrPic[2] = 0; 1542 m_acLayerCfg[1].m_GOPListLayer[5].m_refIdc[2] = 0; 1543 //RA, POC7 1544 m_acLayerCfg[1].m_GOPListLayer[7].m_usedByCurrPic[2] = 0; 1545 m_acLayerCfg[1].m_GOPListLayer[7].m_refIdc[2] = 0; 1546 } 1547 #else 1517 1548 m_extraRPSs=0; 1518 1549 //start looping through frames in coding order until we can verify that the GOP structure is correct. … … 1710 1741 } 1711 1742 xConfirmPara(errorGOP,"Invalid GOP structure given"); 1743 #endif 1712 1744 m_maxTempLayer = 1; 1713 1745 for(Int i=0; i<m_iGOPSize; i++) … … 1730 1762 m_maxDecPicBuffering[m_GOPList[i].m_temporalId] = m_GOPList[i].m_numRefPics + 1; 1731 1763 } 1732 1733 #if SVC_EXTENSION1734 m_maxDecPicBuffering[m_GOPList[i].m_temporalId] += 1; // it should be updated if more than 1 resampling picture is used1735 #endif1736 1764 1737 1765 Int highestDecodingNumberWithLowerPOC = 0; … … 2187 2215 printf("ENCODER_FAST_MODE: %d ", ENCODER_FAST_MODE); 2188 2216 printf("REF_IDX_MFM: %d ", REF_IDX_MFM); 2189 #elif INTRA_BL2190 printf("INTRA_BL:%d ", INTRA_BL);2191 #if !AVC_BASE2192 printf("SVC_MVP:%d ", SVC_MVP );2193 printf("SVC_BL_CAND_INTRA:%d", SVC_BL_CAND_INTRA );2194 #endif2195 2217 #endif 2196 2218 #else … … 2245 2267 } 2246 2268 #endif 2269 2270 #if FINAL_RPL_CHANGE_N0082 2271 Bool TAppEncCfg::xconfirmExtraGOP (GOPEntry * ge) 2272 { 2273 Bool verifiedGOP=false; 2274 Bool errorGOP=false; 2275 Int checkGOP=1; 2276 Int numRefs = 1; 2277 Int refList[MAX_NUM_REF_PICS+1]; 2278 refList[0]=0; 2279 Bool isOK[MAX_GOP]; 2280 for(Int i=0; i<MAX_GOP; i++) 2281 { 2282 isOK[i]=false; 2283 } 2284 Int numOK=0; 2285 2286 m_extraRPSs=0; 2287 //start looping through frames in coding order until we can verify that the GOP structure is correct. 2288 while(!verifiedGOP&&!errorGOP) 2289 { 2290 Int curGOP = (checkGOP-1)%m_iGOPSize; 2291 Int curPOC = ((checkGOP-1)/m_iGOPSize)*m_iGOPSize + ge[curGOP].m_POC; 2292 if(ge[curGOP].m_POC<0) 2293 { 2294 printf("\nError: found fewer Reference Picture Sets than GOPSize\n"); 2295 errorGOP=true; 2296 } 2297 else 2298 { 2299 //check that all reference pictures are available, or have a POC < 0 meaning they might be available in the next GOP. 2300 Bool beforeI = false; 2301 for(Int i = 0; i< ge[curGOP].m_numRefPics; i++) 2302 { 2303 Int absPOC = curPOC+ge[curGOP].m_referencePics[i]; 2304 if(absPOC < 0) 2305 { 2306 beforeI=true; 2307 } 2308 else 2309 { 2310 Bool found=false; 2311 for(Int j=0; j<numRefs; j++) 2312 { 2313 if(refList[j]==absPOC) 2314 { 2315 found=true; 2316 for(Int k=0; k<m_iGOPSize; k++) 2317 { 2318 if(absPOC%m_iGOPSize == ge[k].m_POC%m_iGOPSize) 2319 { 2320 if(ge[k].m_temporalId==ge[curGOP].m_temporalId) 2321 { 2322 ge[k].m_refPic = true; 2323 } 2324 ge[curGOP].m_usedByCurrPic[i]=ge[k].m_temporalId<=ge[curGOP].m_temporalId; 2325 } 2326 } 2327 } 2328 } 2329 if(!found) 2330 { 2331 printf("\nError: ref pic %d is not available for GOP frame %d\n",ge[curGOP].m_referencePics[i],curGOP+1); 2332 errorGOP=true; 2333 } 2334 } 2335 } 2336 if(!beforeI&&!errorGOP) 2337 { 2338 //all ref frames were present 2339 if(!isOK[curGOP]) 2340 { 2341 numOK++; 2342 isOK[curGOP]=true; 2343 if(numOK==m_iGOPSize) 2344 { 2345 verifiedGOP=true; 2346 } 2347 } 2348 } 2349 else 2350 { 2351 //create a new GOPEntry for this frame containing all the reference pictures that were available (POC > 0) 2352 ge[m_iGOPSize+m_extraRPSs]=ge[curGOP]; 2353 Int newRefs=0; 2354 for(Int i = 0; i< ge[curGOP].m_numRefPics; i++) 2355 { 2356 Int absPOC = curPOC+ge[curGOP].m_referencePics[i]; 2357 if(absPOC>=0) 2358 { 2359 ge[m_iGOPSize+m_extraRPSs].m_referencePics[newRefs]=ge[curGOP].m_referencePics[i]; 2360 ge[m_iGOPSize+m_extraRPSs].m_usedByCurrPic[newRefs]=ge[curGOP].m_usedByCurrPic[i]; 2361 newRefs++; 2362 } 2363 } 2364 Int numPrefRefs = ge[curGOP].m_numRefPicsActive; 2365 2366 for(Int offset = -1; offset>-checkGOP; offset--) 2367 { 2368 //step backwards in coding order and include any extra available pictures we might find useful to replace the ones with POC < 0. 2369 Int offGOP = (checkGOP-1+offset)%m_iGOPSize; 2370 Int offPOC = ((checkGOP-1+offset)/m_iGOPSize)*m_iGOPSize + ge[offGOP].m_POC; 2371 if(offPOC>=0&&ge[offGOP].m_temporalId<=ge[curGOP].m_temporalId) 2372 { 2373 Bool newRef=false; 2374 for(Int i=0; i<numRefs; i++) 2375 { 2376 if(refList[i]==offPOC) 2377 { 2378 newRef=true; 2379 } 2380 } 2381 for(Int i=0; i<newRefs; i++) 2382 { 2383 if(ge[m_iGOPSize+m_extraRPSs].m_referencePics[i]==offPOC-curPOC) 2384 { 2385 newRef=false; 2386 } 2387 } 2388 if(newRef) 2389 { 2390 Int insertPoint=newRefs; 2391 //this picture can be added, find appropriate place in list and insert it. 2392 if(ge[offGOP].m_temporalId==ge[curGOP].m_temporalId) 2393 { 2394 ge[offGOP].m_refPic = true; 2395 } 2396 for(Int j=0; j<newRefs; j++) 2397 { 2398 if(ge[m_iGOPSize+m_extraRPSs].m_referencePics[j]<offPOC-curPOC||ge[m_iGOPSize+m_extraRPSs].m_referencePics[j]>0) 2399 { 2400 insertPoint = j; 2401 break; 2402 } 2403 } 2404 Int prev = offPOC-curPOC; 2405 Int prevUsed = ge[offGOP].m_temporalId<=ge[curGOP].m_temporalId; 2406 for(Int j=insertPoint; j<newRefs+1; j++) 2407 { 2408 Int newPrev = ge[m_iGOPSize+m_extraRPSs].m_referencePics[j]; 2409 Int newUsed = ge[m_iGOPSize+m_extraRPSs].m_usedByCurrPic[j]; 2410 ge[m_iGOPSize+m_extraRPSs].m_referencePics[j]=prev; 2411 ge[m_iGOPSize+m_extraRPSs].m_usedByCurrPic[j]=prevUsed; 2412 prevUsed=newUsed; 2413 prev=newPrev; 2414 } 2415 newRefs++; 2416 } 2417 } 2418 if(newRefs>=numPrefRefs) 2419 { 2420 break; 2421 } 2422 } 2423 ge[m_iGOPSize+m_extraRPSs].m_numRefPics=newRefs; 2424 ge[m_iGOPSize+m_extraRPSs].m_POC = curPOC; 2425 if (m_extraRPSs == 0) 2426 { 2427 ge[m_iGOPSize+m_extraRPSs].m_interRPSPrediction = 0; 2428 ge[m_iGOPSize+m_extraRPSs].m_numRefIdc = 0; 2429 } 2430 else 2431 { 2432 Int rIdx = m_iGOPSize + m_extraRPSs - 1; 2433 Int refPOC = ge[rIdx].m_POC; 2434 Int refPics = ge[rIdx].m_numRefPics; 2435 Int newIdc=0; 2436 for(Int i = 0; i<= refPics; i++) 2437 { 2438 Int deltaPOC = ((i != refPics)? ge[rIdx].m_referencePics[i] : 0); // check if the reference abs POC is >= 0 2439 Int absPOCref = refPOC+deltaPOC; 2440 Int refIdc = 0; 2441 for (Int j = 0; j < ge[m_iGOPSize+m_extraRPSs].m_numRefPics; j++) 2442 { 2443 if ( (absPOCref - curPOC) == ge[m_iGOPSize+m_extraRPSs].m_referencePics[j]) 2444 { 2445 if (ge[m_iGOPSize+m_extraRPSs].m_usedByCurrPic[j]) 2446 { 2447 refIdc = 1; 2448 } 2449 else 2450 { 2451 refIdc = 2; 2452 } 2453 } 2454 } 2455 ge[m_iGOPSize+m_extraRPSs].m_refIdc[newIdc]=refIdc; 2456 newIdc++; 2457 } 2458 ge[m_iGOPSize+m_extraRPSs].m_interRPSPrediction = 1; 2459 ge[m_iGOPSize+m_extraRPSs].m_numRefIdc = newIdc; 2460 ge[m_iGOPSize+m_extraRPSs].m_deltaRPS = refPOC - ge[m_iGOPSize+m_extraRPSs].m_POC; 2461 } 2462 curGOP=m_iGOPSize+m_extraRPSs; 2463 m_extraRPSs++; 2464 } 2465 numRefs=0; 2466 for(Int i = 0; i< ge[curGOP].m_numRefPics; i++) 2467 { 2468 Int absPOC = curPOC+ge[curGOP].m_referencePics[i]; 2469 if(absPOC >= 0) 2470 { 2471 refList[numRefs]=absPOC; 2472 numRefs++; 2473 } 2474 } 2475 refList[numRefs]=curPOC; 2476 numRefs++; 2477 } 2478 checkGOP++; 2479 } 2480 2481 return errorGOP; //update 2482 } 2483 #endif 2247 2484 //! \} -
trunk/source/App/TAppEncoder/TAppEncCfg.h
r313 r345 348 348 Void xPrintParameter (); ///< print configuration values 349 349 Void xPrintUsage (); ///< print usage 350 #if FINAL_RPL_CHANGE_N0082 351 Bool xconfirmExtraGOP (GOPEntry * ge); 352 #endif 350 353 #if M0040_ADAPTIVE_RESOLUTION_CHANGE 351 354 Int m_adaptiveResolutionChange; ///< Indicate adaptive resolution change frame -
trunk/source/App/TAppEncoder/TAppEncLayerCfg.h
r313 r345 81 81 Int m_scaledRefLayerBottomOffset[MAX_LAYERS]; 82 82 #endif 83 #if FINAL_RPL_CHANGE_N0082 84 GOPEntry m_GOPListLayer[MAX_GOP]; ///< for layer 85 #endif 83 86 public: 84 87 TAppEncLayerCfg(); … … 141 144 Bool getRCForceIntraQP() {return m_RCForceIntraQP; } 142 145 #endif 146 #if FINAL_RPL_CHANGE_N0082 147 GOPEntry getGOPEntry(Int i ) {return m_GOPListLayer[i]; } 148 #endif 143 149 }; // END CLASS DEFINITION TAppEncLayerCfg 144 150 -
trunk/source/App/TAppEncoder/TAppEncTop.cpp
r313 r345 136 136 m_acTEncTop[layer].setDecodingRefreshType ( m_iDecodingRefreshType ); 137 137 m_acTEncTop[layer].setGOPSize ( m_iGOPSize ); 138 #if FINAL_RPL_CHANGE_N0082 139 m_acTEncTop[layer].setGopList ( m_acLayerCfg[layer].m_GOPListLayer ); 140 #else 138 141 m_acTEncTop[layer].setGopList ( m_GOPList ); 142 #endif 139 143 m_acTEncTop[layer].setExtraRPSs ( m_extraRPSs ); 140 144 for(Int i = 0; i < MAX_TLAYER; i++) … … 884 888 } 885 889 #endif 890 #if N0120_MAX_TID_REF_PRESENT_FLAG 891 vps->setMaxTidIlRefPicsPlus1PresentFlag(true); 892 if (vps->getMaxTidIlRefPicsPlus1PresentFlag()) 893 { 894 for( i = 0; i < MAX_VPS_LAYER_ID_PLUS1 - 1; i++ ) 895 { 896 vps->setMaxSublayerForIlpPlus1(i, vps->getMaxTLayers()+1); 897 } 898 } 899 else 900 { 901 for( i = 0; i < MAX_VPS_LAYER_ID_PLUS1 - 1; i++ ) 902 { 903 vps->setMaxSublayerForIlpPlus1(i, 7); 904 } 905 } 906 #endif 907 #if ILP_SSH_SIG 908 vps->setIlpSshSignalingEnabledFlag(true); 909 #endif 886 910 #if VPS_EXTN_PROFILE_INFO 887 911 vps->getPTLForExtnPtr()->resize(vps->getNumLayerSets()); -
trunk/source/Lib/TLibCommon/CommonDef.h
r313 r345 57 57 58 58 #if SVC_EXTENSION 59 #define NV_VERSION " trunk" ///< Current software version59 #define NV_VERSION "3.0" ///< Current software version 60 60 #else 61 61 #define NV_VERSION "11.0" ///< Current software version -
trunk/source/Lib/TLibCommon/ContextTables.h
r313 r345 92 92 #define NUM_SAO_MERGE_FLAG_CTX 1 ///< number of context models for SAO merge flags 93 93 #define NUM_SAO_TYPE_IDX_CTX 1 ///< number of context models for SAO type index 94 #if INTRA_BL95 #define NUM_INTRA_BL_PRED_CTX 396 #endif97 94 98 95 #define NUM_TRANSFORMSKIP_FLAG_CTX 1 ///< number of context models for transform skipping … … 330 327 }; 331 328 332 #if INTRA_BL333 static const UChar334 INIT_INTRA_BL_PRED_FLAG[3][NUM_INTRA_BL_PRED_CTX] =335 {336 { 185, 185, 201, },337 { 197, 197, 185, },338 { 197, 197, 185, },339 };340 #endif341 329 static const UChar 342 330 INIT_TRANSFORMSKIP_FLAG[3][2*NUM_TRANSFORMSKIP_FLAG_CTX] = -
trunk/source/Lib/TLibCommon/TComDataCU.cpp
r313 r345 1643 1643 pcTempCU = getPULeft( uiTempPartIdx, m_uiAbsIdxInLCU + uiAbsPartIdx ); 1644 1644 1645 #if INTRA_BL1646 iLeftIntraDir = pcTempCU ? ( pcTempCU->isIntra( uiTempPartIdx ) && ( !pcTempCU->isIntraBL( uiTempPartIdx ) ) ? pcTempCU->getLumaIntraDir( uiTempPartIdx ) : DC_IDX ) : DC_IDX;1647 #else1648 1645 iLeftIntraDir = pcTempCU ? ( pcTempCU->isIntra( uiTempPartIdx ) ? pcTempCU->getLumaIntraDir( uiTempPartIdx ) : DC_IDX ) : DC_IDX; 1649 #endif1650 1646 1651 1647 // Get intra direction of above PU 1652 1648 pcTempCU = getPUAbove( uiTempPartIdx, m_uiAbsIdxInLCU + uiAbsPartIdx, true, true ); 1653 1649 1654 #if INTRA_BL1655 iAboveIntraDir = pcTempCU ? ( pcTempCU->isIntra( uiTempPartIdx ) && ( !pcTempCU->isIntraBL( uiTempPartIdx ) ) ? pcTempCU->getLumaIntraDir( uiTempPartIdx ) : DC_IDX ) : DC_IDX;1656 #else1657 1650 iAboveIntraDir = pcTempCU ? ( pcTempCU->isIntra( uiTempPartIdx ) ? pcTempCU->getLumaIntraDir( uiTempPartIdx ) : DC_IDX ) : DC_IDX; 1658 #endif1659 1660 #if SVC_BL_CAND_INTRA1661 if(m_layerId > 0)1662 {1663 UInt uiCUAddrBase, uiAbsPartAddrBase;1664 pcTempCU = getBaseColCU( uiAbsPartIdx, uiCUAddrBase, uiAbsPartAddrBase );1665 1666 if(pcTempCU->getPredictionMode( uiAbsPartAddrBase ) == MODE_INTRA )1667 {1668 Int iColBaseDir = pcTempCU->getLumaIntraDir( uiAbsPartAddrBase );1669 if( iColBaseDir != iAboveIntraDir && iColBaseDir != iLeftIntraDir && iAboveIntraDir != iLeftIntraDir)1670 {1671 uiIntraDirPred[0] = iColBaseDir;1672 uiIntraDirPred[1] = iLeftIntraDir;1673 uiIntraDirPred[2] = iAboveIntraDir;1674 if( piMode )1675 {1676 *piMode = 2;1677 }1678 uiPredNum = 3;1679 return uiPredNum;1680 }1681 else1682 {1683 iAboveIntraDir = (iColBaseDir == iLeftIntraDir) ? iAboveIntraDir : iLeftIntraDir;1684 iLeftIntraDir = iColBaseDir;1685 }1686 }1687 }1688 #endif1689 1651 1690 1652 uiPredNum = 3; … … 1828 1790 UInt log2CbSize = g_aucConvertToBit[getWidth( absPartIdx )] + 2; 1829 1791 PartSize partSize = getPartitionSize( absPartIdx ); 1830 #if INTRA_BL1831 UInt quadtreeTUMaxDepth = isIntra( absPartIdx ) ? m_pcSlice->getSPS()->getQuadtreeTUMaxDepthIntra() : m_pcSlice->getSPS()->getQuadtreeTUMaxDepthInter();1832 #else1833 1792 UInt quadtreeTUMaxDepth = getPredictionMode( absPartIdx ) == MODE_INTRA ? m_pcSlice->getSPS()->getQuadtreeTUMaxDepthIntra() : m_pcSlice->getSPS()->getQuadtreeTUMaxDepthInter(); 1834 #endif1835 1793 Int intraSplitFlag = ( getPredictionMode( absPartIdx ) == MODE_INTRA && partSize == SIZE_NxN ) ? 1 : 0; 1836 1794 Int interSplitFlag = ((quadtreeTUMaxDepth == 1) && (getPredictionMode( absPartIdx ) == MODE_INTER) && (partSize != SIZE_2Nx2N) ); … … 1854 1812 return log2MinTUSizeInCU; 1855 1813 } 1856 1857 #if INTRA_BL1858 UInt TComDataCU::getCtxIntraBLFlag( UInt uiAbsPartIdx )1859 {1860 #if INTRA_BL_CTX_CHANGE1861 Int cuDepth = getDepth(uiAbsPartIdx);1862 Int maxCuDepth = g_uiMaxCUDepth - g_uiAddCUDepth;1863 UInt uiCtx = (maxCuDepth==3 && cuDepth > 0) ? (cuDepth - 1) : cuDepth;1864 return uiCtx;1865 #else1866 TComDataCU* pcTempCU;1867 UInt uiTempPartIdx;1868 UInt uiCtx = 0;1869 1870 // Get BCBP of left PU1871 #if DEPENDENT_SLICES1872 Bool bDepSliceRestriction = ( !m_pcSlice->getPPS()->getDependentSliceEnabledFlag());1873 pcTempCU = getPULeft( uiTempPartIdx, m_uiAbsIdxInLCU + uiAbsPartIdx, true, bDepSliceRestriction );1874 #else1875 pcTempCU = getPULeft( uiTempPartIdx, m_uiAbsIdxInLCU + uiAbsPartIdx );1876 #endif1877 uiCtx = ( pcTempCU ) ? pcTempCU->isIntraBL( uiTempPartIdx ) : 0;1878 1879 // Get BCBP of above PU1880 #if DEPENDENT_SLICES1881 pcTempCU = getPUAbove( uiTempPartIdx, m_uiAbsIdxInLCU + uiAbsPartIdx, true, bDepSliceRestriction );1882 #else1883 pcTempCU = getPUAbove( uiTempPartIdx, m_uiAbsIdxInLCU + uiAbsPartIdx );1884 #endif1885 uiCtx += ( pcTempCU ) ? pcTempCU->isIntraBL( uiTempPartIdx ) : 0;1886 1887 return uiCtx;1888 #endif1889 }1890 #endif1891 1814 1892 1815 #if REF_IDX_ME_ZEROMV … … 2586 2509 deriveLeftRightTopIdxGeneral( uiAbsPartIdx, uiPUIdx, uiPartIdxLT, uiPartIdxRT ); 2587 2510 deriveLeftBottomIdxGeneral ( uiAbsPartIdx, uiPUIdx, uiPartIdxLB ); 2588 #if SVC_MVP2589 // BL collocated2590 TComDataCU *pcColCU = NULL;2591 UInt uiCUAddrBase = 0, uiAbsPartAddrBase = 0;2592 #if AVC_BASE2593 if( !this->getSlice()->getVPS()->getAvcBaseLayerFlag() || AVC_SYNTAX )2594 #endif2595 {2596 TComMvField cMvFieldBaseColCU[2];2597 if(m_layerId)2598 {2599 pcColCU = getBaseColCU( m_layerId - 1, xP + nPSW/2, yP + nPSH/2, uiCUAddrBase, uiAbsPartAddrBase );2600 2601 #if INTRA_BL2602 if( pcColCU && pcColCU->isIntraBL( uiAbsPartAddrBase ) )2603 {2604 pcColCU = NULL;2605 }2606 #endif2607 2608 if(pcColCU && !pcColCU->isIntra( uiAbsPartAddrBase ) )2609 {2610 abCandIsInter[iCount] = true;2611 2612 // get interDir2613 puhInterDirNeighbours[iCount] = pcColCU->getInterDir( uiAbsPartAddrBase );2614 2615 pcMvFieldNeighbours[(iCount << 1)].setMvField( TComMv(0,0), -1);2616 pcMvFieldNeighbours[(iCount << 1) + 1].setMvField( TComMv(0,0), -1);2617 2618 if( puhInterDirNeighbours[iCount] & 1 )2619 {2620 pcColCU->getMvField( pcColCU, uiAbsPartAddrBase, REF_PIC_LIST_0, cMvFieldBaseColCU[0]);2621 scaleBaseMV( m_layerId - 1, pcMvFieldNeighbours[iCount<<1], cMvFieldBaseColCU[0] );2622 }2623 2624 if ( getSlice()->isInterB() && puhInterDirNeighbours[iCount] & 2 )2625 {2626 pcColCU->getMvField( pcColCU, uiAbsPartAddrBase, REF_PIC_LIST_1, cMvFieldBaseColCU[1] );2627 scaleBaseMV( m_layerId - 1, pcMvFieldNeighbours[(iCount<<1)+1], cMvFieldBaseColCU[1] );2628 }2629 2630 if( puhInterDirNeighbours[iCount] > 0 )2631 {2632 if ( mrgCandIdx == iCount )2633 {2634 return;2635 }2636 iCount ++;2637 }2638 }2639 }2640 }2641 #endif2642 2511 2643 2512 //left … … 2645 2514 TComDataCU* pcCULeft = 0; 2646 2515 pcCULeft = getPULeft( uiLeftPartIdx, uiPartIdxLB ); 2647 #if INTRA_BL 2648 if( pcCULeft && pcCULeft->isIntraBL( uiLeftPartIdx ) ) 2649 { 2650 pcCULeft = NULL; 2651 } 2652 #endif 2516 2653 2517 Bool isAvailableA1 = pcCULeft && 2654 2518 pcCULeft->isDiffMER(xP -1, yP+nPSH-1, xP, yP) && 2655 #if SVC_MVP2656 ( !pcColCU || pcColCU->isIntra( uiAbsPartAddrBase ) || !pcCULeft->hasEqualMotion( uiLeftPartIdx, puhInterDirNeighbours[0], &pcMvFieldNeighbours[0])) &&2657 #endif2658 2519 !( uiPUIdx == 1 && (cCurPS == SIZE_Nx2N || cCurPS == SIZE_nLx2N || cCurPS == SIZE_nRx2N) ) && 2659 2520 !pcCULeft->isIntra( uiLeftPartIdx ) ; … … 2685 2546 TComDataCU* pcCUAbove = 0; 2686 2547 pcCUAbove = getPUAbove( uiAbovePartIdx, uiPartIdxRT ); 2687 #if INTRA_BL 2688 if( pcCUAbove && pcCUAbove->isIntraBL( uiAbovePartIdx ) ) 2689 { 2690 pcCUAbove = NULL; 2691 } 2692 #endif 2548 2693 2549 Bool isAvailableB1 = pcCUAbove && 2694 #if SVC_MVP2695 ( !pcColCU || pcColCU->isIntra( uiAbsPartAddrBase ) || !pcCUAbove->hasEqualMotion( uiAbovePartIdx, puhInterDirNeighbours[0], &pcMvFieldNeighbours[0] )) &&2696 #endif2697 2550 pcCUAbove->isDiffMER(xP+nPSW-1, yP-1, xP, yP) && 2698 2551 !( uiPUIdx == 1 && (cCurPS == SIZE_2NxN || cCurPS == SIZE_2NxnU || cCurPS == SIZE_2NxnD) ) && … … 2725 2578 TComDataCU* pcCUAboveRight = 0; 2726 2579 pcCUAboveRight = getPUAboveRight( uiAboveRightPartIdx, uiPartIdxRT ); 2727 #if INTRA_BL 2728 if( pcCUAboveRight && pcCUAboveRight->isIntraBL( uiAboveRightPartIdx ) ) 2729 { 2730 pcCUAboveRight = NULL; 2731 } 2732 #endif 2580 2733 2581 Bool isAvailableB0 = pcCUAboveRight && 2734 #if SVC_MVP && !IL_MRG_SIMPLIFIED_PRUNING2735 ( !pcColCU || pcColCU->isIntra( uiAbsPartAddrBase ) || !pcCUAboveRight->hasEqualMotion( uiAboveRightPartIdx, puhInterDirNeighbours[0], &pcMvFieldNeighbours[0] )) &&2736 #endif2737 2582 pcCUAboveRight->isDiffMER(xP+nPSW, yP-1, xP, yP) && 2738 2583 !pcCUAboveRight->isIntra( uiAboveRightPartIdx ); … … 2761 2606 2762 2607 //left bottom 2763 #if SVC_MVP2764 if( iCount < 4 )2765 {2766 #endif2767 2608 UInt uiLeftBottomPartIdx = 0; 2768 2609 TComDataCU* pcCULeftBottom = 0; 2769 2610 pcCULeftBottom = this->getPUBelowLeft( uiLeftBottomPartIdx, uiPartIdxLB ); 2770 #if INTRA_BL 2771 if( pcCULeftBottom && pcCULeftBottom->isIntraBL( uiLeftBottomPartIdx ) ) 2772 { 2773 pcCULeftBottom = NULL; 2774 } 2775 #endif 2611 2776 2612 Bool isAvailableA0 = pcCULeftBottom && 2777 2613 pcCULeftBottom->isDiffMER(xP-1, yP+nPSH, xP, yP) && 2778 #if SVC_MVP && !IL_MRG_SIMPLIFIED_PRUNING2779 ( !pcColCU || pcColCU->isIntra( uiAbsPartAddrBase ) || !pcCULeftBottom->hasEqualMotion( uiLeftBottomPartIdx, puhInterDirNeighbours[0], &pcMvFieldNeighbours[0])) &&2780 #endif2781 2614 !pcCULeftBottom->isIntra( uiLeftBottomPartIdx ) ; 2782 2615 if ( isAvailableA0 && ( !isAvailableA1 || !pcCULeft->hasEqualMotion( uiLeftPartIdx, pcCULeftBottom, uiLeftBottomPartIdx ) ) ) … … 2802 2635 return; 2803 2636 } 2804 #if SVC_MVP2805 }2806 #endif2807 2637 2808 2638 // above left … … 2812 2642 TComDataCU* pcCUAboveLeft = 0; 2813 2643 pcCUAboveLeft = getPUAboveLeft( uiAboveLeftPartIdx, uiAbsPartAddr ); 2814 #if INTRA_BL 2815 if( pcCUAboveLeft && pcCUAboveLeft->isIntraBL( uiAboveLeftPartIdx ) ) 2816 { 2817 pcCUAboveLeft = NULL; 2818 } 2819 #endif 2644 2820 2645 Bool isAvailableB2 = pcCUAboveLeft && 2821 2646 pcCUAboveLeft->isDiffMER(xP-1, yP-1, xP, yP) && 2822 #if SVC_MVP && !IL_MRG_SIMPLIFIED_PRUNING2823 ( !pcColCU || pcColCU->isIntra( uiAbsPartAddrBase ) || !pcCUAboveLeft->hasEqualMotion( uiAboveLeftPartIdx, puhInterDirNeighbours[0], &pcMvFieldNeighbours[0] )) &&2824 #endif2825 2647 !pcCUAboveLeft->isIntra( uiAboveLeftPartIdx ); 2826 2648 if ( isAvailableB2 && ( !isAvailableA1 || !pcCULeft->hasEqualMotion( uiLeftPartIdx, pcCUAboveLeft, uiAboveLeftPartIdx ) ) … … 3123 2945 UInt idx; 3124 2946 tmpCU = getPUBelowLeft(idx, uiPartIdxLB); 3125 #if INTRA_BL3126 bAddedSmvp = (tmpCU != NULL) && (!tmpCU->isIntra(idx));3127 #else3128 2947 bAddedSmvp = (tmpCU != NULL) && (tmpCU->getPredictionMode(idx) != MODE_INTRA); 3129 #endif3130 2948 3131 2949 if (!bAddedSmvp) 3132 2950 { 3133 2951 tmpCU = getPULeft(idx, uiPartIdxLB); 3134 #if INTRA_BL3135 bAddedSmvp = (tmpCU != NULL) && (!tmpCU->isIntra(idx));3136 #else3137 2952 bAddedSmvp = (tmpCU != NULL) && (tmpCU->getPredictionMode(idx) != MODE_INTRA); 3138 #endif3139 2953 } 3140 2954 … … 3562 3376 3563 3377 // use coldir. 3564 #if M0457_COL_PICTURE_SIGNALING 3378 #if M0457_COL_PICTURE_SIGNALING && !REMOVE_COL_PICTURE_SIGNALING 3565 3379 TComPic *pColPic; 3566 3380 if (m_layerId > 0 && getSlice()->getAltColIndicationFlag()) … … 3699 3513 if (scaleFactor > 0) 3700 3514 { 3701 #if SVC_MVP3702 m_acCUMvField[0].compress(m_pePredMode, m_puhInterDir, scaleFactor);3703 m_acCUMvField[1].compress(m_pePredMode, m_puhInterDir, scaleFactor);3704 #else3705 3515 m_acCUMvField[0].compress(m_pePredMode, scaleFactor); 3706 3516 m_acCUMvField[1].compress(m_pePredMode, scaleFactor); 3707 #endif3708 3517 } 3709 3518 } … … 4137 3946 } 4138 3947 4139 #if INTRA_BL && !NO_RESIDUAL_FLAG_FOR_BLPRED4140 Void TComDataCU::getBaseLumaBlk ( UInt uiWidth, UInt uiHeight, UInt uiAbsPartIdx, Pel* piPred, UInt uiStride )4141 {4142 TComPicYuv* pcBaseRec = getSlice()->getFullPelBaseRec();4143 UInt uiStrideBase = pcBaseRec->getStride();4144 Pel* piBase = pcBaseRec->getLumaAddr( getAddr(), getZorderIdxInCU() + uiAbsPartIdx );4145 4146 for ( UInt y = 0; y < uiHeight; y ++ )4147 {4148 memcpy( piPred + y * uiStride, piBase + y * uiStrideBase, uiWidth * sizeof( Pel ) );4149 }4150 }4151 4152 Void TComDataCU::getBaseChromaBlk ( UInt uiWidth, UInt uiHeight, UInt uiAbsPartIdx, Pel* piPred, UInt uiStride, UInt uiChromaId )4153 {4154 TComPicYuv* pcBaseRec = getSlice()->getFullPelBaseRec();4155 4156 UInt uiStrideBase = pcBaseRec->getCStride();4157 Pel* piBase;4158 4159 if( uiChromaId == 0 )4160 {4161 piBase = pcBaseRec->getCbAddr( getAddr(), getZorderIdxInCU() + uiAbsPartIdx );4162 }4163 else4164 {4165 piBase = pcBaseRec->getCrAddr( getAddr(), getZorderIdxInCU() + uiAbsPartIdx );4166 }4167 4168 for ( UInt y = 0; y < uiHeight; y ++ )4169 {4170 memcpy( piPred + y * uiStride, piBase + y * uiStrideBase, uiWidth * sizeof( Pel ) );4171 }4172 }4173 4174 #endif4175 4176 3948 #if SVC_COL_BLK 4177 3949 TComDataCU* TComDataCU::getBaseColCU( UInt refLayerIdc, UInt uiCuAbsPartIdx, UInt &uiCUAddrBase, UInt &uiAbsPartIdxBase ) … … 4273 4045 #endif 4274 4046 4047 #if N0139_POSITION_ROUNDING_OFFSET 4048 iBX += 4; 4049 iBY += 4; 4050 #endif 4051 4275 4052 #if SCALED_REF_LAYER_OFFSETS 4276 4053 if ( iBX >= cBaseColPic->getPicYuvRec()->getWidth() || iBY >= cBaseColPic->getPicYuvRec()->getHeight() || … … 4334 4111 } 4335 4112 #endif 4336 4337 #if SVC_MVP4338 Bool TComDataCU::hasEqualMotion( UInt uiAbsPartIdx, UChar uchInterDir, TComMvField* pcMvField )4339 {4340 if ( getInterDir( uiAbsPartIdx ) != uchInterDir )4341 {4342 return false;4343 }4344 4345 for ( UInt uiRefListIdx = 0; uiRefListIdx < 2; uiRefListIdx++ )4346 {4347 if ( getInterDir( uiAbsPartIdx ) & ( 1 << uiRefListIdx ) )4348 {4349 if ( getCUMvField( RefPicList( uiRefListIdx ) )->getMv( uiAbsPartIdx ) != pcMvField[uiRefListIdx].getMv() ||4350 getCUMvField( RefPicList( uiRefListIdx ) )->getRefIdx( uiAbsPartIdx ) != pcMvField[uiRefListIdx].getRefIdx() )4351 {4352 return false;4353 }4354 }4355 }4356 4357 return true;4358 }4359 #endif4360 4361 4113 //! \} -
trunk/source/Lib/TLibCommon/TComDataCU.h
r313 r345 485 485 Void deriveLeftBottomIdxGeneral ( UInt uiAbsPartIdx, UInt uiPartIdx, UInt& ruiPartIdxLB ); 486 486 487 #if SVC_MVP488 Bool hasEqualMotion ( UInt uiAbsPartIdx, UChar uchInterDir, TComMvField* pcMvField );489 #endif490 491 487 // ------------------------------------------------------------------------------------------------------------------- 492 488 // member functions for modes 493 489 // ------------------------------------------------------------------------------------------------------------------- 494 490 495 #if INTRA_BL && !NO_RESIDUAL_FLAG_FOR_BLPRED496 Void getBaseLumaBlk ( UInt uiWidth, UInt uiHeight, UInt uiAbsPartIdx, Pel* piPred, UInt uiStride );497 Void getBaseChromaBlk ( UInt uiWidth, UInt uiHeight, UInt uiAbsPartIdx, Pel* piPred, UInt uiStride, UInt uiChromaId );498 #endif499 #if INTRA_BL500 Bool isIntraBL ( UInt uiPartIdx ) { return m_pePredMode[ uiPartIdx ] == MODE_INTRA_BL; }501 Bool isIntra ( UInt uiPartIdx ) { return m_pePredMode[ uiPartIdx ] == MODE_INTRA || m_pePredMode[ uiPartIdx ] == MODE_INTRA_BL; }502 #else503 491 Bool isIntra ( UInt uiPartIdx ) { return m_pePredMode[ uiPartIdx ] == MODE_INTRA; } 504 #endif505 492 Bool isSkipped ( UInt uiPartIdx ); ///< SKIP (no residual) 506 493 Bool isBipredRestriction( UInt puIdx ); … … 529 516 UInt& getTotalBins () { return m_uiTotalBins; } 530 517 531 #if INTRA_BL 532 UInt getCtxIntraBLFlag ( UInt uiAbsPartIdx ); 533 #endif 534 518 #if REF_IDX_FRAMEWORK 535 519 #if FAST_INTRA_SHVC 536 520 Int reduceSetOfIntraModes ( UInt uiAbsPartIdx, Int* uiIntraDirPred, Int &fullSetOfModes ); … … 540 524 Bool xCheckZeroMVILRMerge(UChar uhInterDir, TComMvField& cMvFieldL0, TComMvField& cMvFieldL1); 541 525 Bool xCheckZeroMVILRMvdL1Zero(Int iRefList, Int iRefIdx, Int MvpIdx); 526 #endif 542 527 #endif 543 528 … … 553 538 UInt getCoefScanIdx(UInt uiAbsPartIdx, UInt uiWidth, Bool bIsLuma, Bool bIsIntra); 554 539 540 #if REF_IDX_FRAMEWORK 555 541 #if SVC_COL_BLK 556 542 TComDataCU* getBaseColCU( UInt refLayerIdc, UInt uiCuAbsPartIdx, UInt &uiCUAddrBase, UInt &uiAbsPartIdxBase ); 557 543 TComDataCU* getBaseColCU( UInt refLayerIdc, UInt uiPelX, UInt uiPelY, UInt &uiCUAddrBase, UInt &uiAbsPartIdxBase ); 558 544 Void scaleBaseMV( UInt refLayerIdc, TComMvField& rcMvFieldEnhance, TComMvField& rcMvFieldBase ); 545 #endif 559 546 #endif 560 547 }; -
trunk/source/Lib/TLibCommon/TComMotionInfo.cpp
r313 r345 328 328 * \param scale Factor by which to subsample motion information 329 329 */ 330 #if SVC_MVP331 Void TComCUMvField::compress(Char* pePredMode, UChar* peInterDir, Int scale)332 #else333 330 Void TComCUMvField::compress(Char* pePredMode, Int scale) 334 #endif335 331 { 336 332 Int N = scale * scale; … … 351 347 pePredMode[ uiPartIdx + i ] = predMode; 352 348 m_piRefIdx[ uiPartIdx + i ] = iRefIdx; 353 #if SVC_MVP354 peInterDir[ uiPartIdx + i ] = peInterDir[ uiPartIdx ];355 #endif356 349 } 357 350 } -
trunk/source/Lib/TLibCommon/TComMotionInfo.h
r313 r345 158 158 } 159 159 160 #if SVC_MVP161 Void compress(Char* pePredMode, UChar* peInterDir, Int scale);162 #else163 160 Void compress(Char* pePredMode, Int scale); 164 #endif165 161 166 162 #if REF_IDX_MFM -
trunk/source/Lib/TLibCommon/TComPrediction.cpp
r313 r345 408 408 } 409 409 410 #if INTRA_BL && !NO_RESIDUAL_FLAG_FOR_BLPRED411 Void TComPrediction::getBaseBlk( TComDataCU* pcCU, TComYuv* pcYuvPred, Int iPartAddr, Int iWidth, Int iHeight )412 {413 pcCU->getBaseLumaBlk( iWidth, iHeight, iPartAddr, pcYuvPred->getLumaAddr( iPartAddr ), pcYuvPred->getStride() );414 pcCU->getBaseChromaBlk( iWidth >> 1, iHeight >> 1, iPartAddr, pcYuvPred->getCbAddr( iPartAddr ), pcYuvPred->getCStride(), 0 );415 pcCU->getBaseChromaBlk( iWidth >> 1, iHeight >> 1, iPartAddr, pcYuvPred->getCrAddr( iPartAddr ), pcYuvPred->getCStride(), 1 );416 }417 #endif418 419 410 Void TComPrediction::motionCompensation ( TComDataCU* pcCU, TComYuv* pcYuvPred, RefPicList eRefPicList, Int iPartIdx ) 420 411 { -
trunk/source/Lib/TLibCommon/TComPrediction.h
r313 r345 101 101 102 102 Void initTempBuff(); 103 104 #if INTRA_BL 105 Void getBaseBlk ( TComDataCU* pcCU, TComYuv* pcYuvPred, Int iPartAddr, Int iWidth, Int iHeight ); 106 #endif 103 107 104 // inter 108 105 Void motionCompensation ( TComDataCU* pcCU, TComYuv* pcYuvPred, RefPicList eRefPicList = REF_PIC_LIST_X, Int iPartIdx = -1 ); … … 121 118 Int getPredicBufHeight() { return m_iYuvExtHeight; } 122 119 120 #if REF_IDX_FRAMEWORK 123 121 #if SVC_UPSAMPLING 124 122 #if SCALED_REF_LAYER_OFFSETS … … 128 126 #endif 129 127 #endif 128 #endif 130 129 }; 131 130 -
trunk/source/Lib/TLibCommon/TComSlice.cpp
r313 r345 124 124 m_numILRRefIdx = 0; 125 125 #endif 126 #if M0457_COL_PICTURE_SIGNALING 126 #if M0457_COL_PICTURE_SIGNALING && !REMOVE_COL_PICTURE_SIGNALING 127 127 m_altColIndicationFlag = false; 128 128 m_colRefLayerIdx = 0; … … 385 385 386 386 #if REF_IDX_FRAMEWORK 387 #if ZERO_NUM_DIRECT_LAYERS388 387 if( m_layerId == 0 || ( m_layerId > 0 && ( m_activeNumILRRefIdx == 0 || !((getNalUnitType() >= NAL_UNIT_CODED_SLICE_BLA_W_LP) && (getNalUnitType() <= NAL_UNIT_CODED_SLICE_CRA)) ) ) ) 389 #else390 if ((getLayerId() == 0) ||391 ((getSPS()->getLayerId()) && !((getNalUnitType() >= NAL_UNIT_CODED_SLICE_BLA_W_LP) &&392 (getNalUnitType() <= NAL_UNIT_CODED_SLICE_CRA)) )393 )394 #endif395 388 { 396 389 #endif … … 458 451 #if ILR_RESTR 459 452 Int maxSubLayerForILPPlus1 = ( m_layerId > 0 && m_activeNumILRRefIdx > 0)? m_pcVPS->getMaxSublayerForIlpPlus1(ilpPic[refLayerIdc]->getSlice(0)->getLayerId()) : 0; 460 #if ZERO_NUM_DIRECT_LAYERS461 453 if( m_layerId > 0 && m_activeNumILRRefIdx > 0 && ( ( (Int)(ilpPic[refLayerIdc]->getSlice(0)->getTLayer())<= maxSubLayerForILPPlus1-1) || (maxSubLayerForILPPlus1==0 && ilpPic[refLayerIdc]->getSlice(0)->getRapPicFlag()) ) ) 462 #else463 if( m_layerId > 0 && ( ( (Int)(ilpPic[refLayerIdc]->getSlice(0)->getTLayer())<=maxSubLayerForILPPlus1-1) || (maxSubLayerForILPPlus1==0 && ilpPic[refLayerIdc]->getSlice(0)->getRapPicFlag()) ) )464 #endif465 454 #else //#if ILR_RESTR 466 #if ZERO_NUM_DIRECT_LAYERS467 455 if( m_layerId > 0 && m_activeNumILRRefIdx > 0 ) 468 #else469 if( m_layerId > 0 )470 #endif471 456 #endif //#if ILR_RESTR 472 457 { … … 599 584 rpsCurrList0[cIdx] = RefPicSetStCurr0[i]; 600 585 } 601 for ( i=0; i<NumPocStCurr1; i++, cIdx++) 602 { 603 rpsCurrList0[cIdx] = RefPicSetStCurr1[i]; 604 } 605 for ( i=0; i<NumPocLtCurr; i++, cIdx++) 606 { 607 rpsCurrList0[cIdx] = RefPicSetLtCurr[i]; 608 } 609 586 #if RPL_INIT_N0316_N0082 610 587 #if REF_IDX_FRAMEWORK 611 588 if( m_layerId > 0 ) … … 619 596 Int refLayerIdc = m_interLayerPredLayerIdc[i]; 620 597 #if ILR_RESTR 598 Int maxSubLayerForILPPlus1 = getVPS()->getMaxSublayerForIlpPlus1(ilpPic[refLayerIdc]->getSlice(0)->getLayerId()); 599 if( ((Int)(ilpPic[refLayerIdc]->getSlice(0)->getTLayer())<=maxSubLayerForILPPlus1-1) || (maxSubLayerForILPPlus1==0 && ilpPic[refLayerIdc]->getSlice(0)->getRapPicFlag()) ) 600 #endif 601 rpsCurrList0[cIdx] = ilpPic[refLayerIdc]; 602 } 603 } 604 #endif 605 #endif 606 for ( i=0; i<NumPocStCurr1; i++, cIdx++) 607 { 608 rpsCurrList0[cIdx] = RefPicSetStCurr1[i]; 609 } 610 for ( i=0; i<NumPocLtCurr; i++, cIdx++) 611 { 612 rpsCurrList0[cIdx] = RefPicSetLtCurr[i]; 613 } 614 #if !RPL_INIT_N0316_N0082 615 #if REF_IDX_FRAMEWORK 616 if( m_layerId > 0 ) 617 { 618 #if JCTVC_M0458_INTERLAYER_RPS_SIG 619 for( i = 0; i < m_activeNumILRRefIdx && cIdx < numPocTotalCurr; cIdx ++, i ++) 620 #else 621 for( i = 0; i < m_numILRRefIdx && cIdx < numPocTotalCurr; cIdx ++, i ++) 622 #endif 623 { 624 Int refLayerIdc = m_interLayerPredLayerIdc[i]; 625 #if ILR_RESTR 621 626 Int maxSubLayerForILPPlus1 = getVPS()->getMaxSublayerForIlpPlus1(ilpPic[refLayerIdc]->getSlice(0)->getLayerId()); 622 627 if( ((Int)(ilpPic[refLayerIdc]->getSlice(0)->getTLayer())<=maxSubLayerForILPPlus1-1) || (maxSubLayerForILPPlus1==0 && ilpPic[refLayerIdc]->getSlice(0)->getRapPicFlag()) ) … … 625 630 } 626 631 } 632 #endif 627 633 #endif 628 634 assert(cIdx == numPocTotalCurr); … … 707 713 TComRefPicListModification* refPicListModification = &m_RefPicListModification; 708 714 Int numberOfRpsCurrTempList = this->getNumRpsCurrTempList(); // total number of ref pics in listTemp0 including inter-layer ref pics 715 #if RPL_INIT_N0316_N0082 716 Int numberOfPocBeforeCurr = this->getNumNegativeRpsCurrTempList(); // number of negative temporal ref pics 717 #endif 709 718 710 719 assert(m_aiNumRefIdx[REF_PIC_LIST_0] > 1); … … 712 721 713 722 //set L0 inter-layer reference picture modification 723 #if RPL_INIT_N0316_N0082 724 Bool hasModification = (m_aiNumRefIdx[REF_PIC_LIST_0] == (numberOfPocBeforeCurr + m_activeNumILRRefIdx)) ? false : true; 725 #else 714 726 Bool hasModification = (m_aiNumRefIdx[REF_PIC_LIST_0] == numberOfRpsCurrTempList) ? false : true; 727 #endif 728 #if FINAL_RPL_CHANGE_N0082 729 hasModification = false; //modification is not necessary 730 #endif 715 731 refPicListModification->setRefPicListModificationFlagL0(hasModification); 716 732 if(hasModification) … … 736 752 #endif 737 753 { 754 #if RPL_INIT_N0316_N0082 755 if((numberOfPocBeforeCurr) >= m_aiNumRefIdx[REF_PIC_LIST_0]) 756 refPicListModification->setRefPicSetIdxL0(m_aiNumRefIdx[REF_PIC_LIST_0] - i, numberOfPocBeforeCurr); 757 else 758 { 759 refPicListModification->setRefPicSetIdxL0(m_aiNumRefIdx[REF_PIC_LIST_0] - i, numberOfPocBeforeCurr); 760 for (Int j = numberOfPocBeforeCurr; j < (m_aiNumRefIdx[REF_PIC_LIST_0] - i); j++) 761 refPicListModification->setRefPicSetIdxL0(j, j + m_activeNumILRRefIdx); 762 } 763 #else 738 764 refPicListModification->setRefPicSetIdxL0(m_aiNumRefIdx[REF_PIC_LIST_0] - i, numberOfRpsCurrTempList - i); 765 #endif 739 766 } 740 767 } … … 773 800 } 774 801 #endif 775 802 #if RPL_INIT_N0316_N0082 803 Int TComSlice::getNumNegativeRpsCurrTempList() 804 { 805 if( m_eSliceType == I_SLICE ) 806 { 807 return 0; 808 } 809 810 Int numPocBeforeCurr = 0; 811 for( UInt i = 0; i < m_pcRPS->getNumberOfNegativePictures(); i++ ) 812 { 813 if(m_pcRPS->getUsed(i)) 814 { 815 numPocBeforeCurr++; 816 } 817 } 818 819 return numPocBeforeCurr; 820 } 821 #endif 776 822 Int TComSlice::getNumRpsCurrTempList() 777 823 { … … 1616 1662 #endif 1617 1663 #if JCTVC_M0203_INTERLAYER_PRED_IDC 1664 #if N0120_MAX_TID_REF_PRESENT_FLAG 1665 m_maxTidIlRefPicsPlus1PresentFlag = true; 1666 #endif 1618 1667 for( Int i = 0; i < MAX_VPS_LAYER_ID_PLUS1 - 1; i++) 1619 1668 { -
trunk/source/Lib/TLibCommon/TComSlice.h
r313 r345 456 456 UInt m_layerIdInVps[MAX_VPS_LAYER_ID_PLUS1]; // Maps layer_id_in_nuh with the layer ID in the VPS 457 457 #endif 458 #if ILP_SSH_SIG 459 Bool m_ilpSshSignalingEnabledFlag; 460 #endif 458 461 #if VPS_EXTN_PROFILE_INFO 459 462 // Profile-tier-level signalling related … … 491 494 UInt m_maxSublayerForIlpPlus1[MAX_VPS_LAYER_ID_PLUS1 - 1]; 492 495 #endif 496 #if N0120_MAX_TID_REF_PRESENT_FLAG 497 Bool m_maxTidIlRefPicsPlus1PresentFlag; 498 #endif 493 499 #if M0040_ADAPTIVE_RESOLUTION_CHANGE 494 500 Bool m_singleLayerForNonIrapFlag; … … 588 594 UInt getLayerIdInVps(Int id) { return m_layerIdInVps[id]; } 589 595 Void setLayerIdInVps(Int id, UInt x) { m_layerIdInVps[id] = x; } 596 #endif 597 #if ILP_SSH_SIG 598 Bool getIlpSshSignalingEnabledFlag() { return m_ilpSshSignalingEnabledFlag;} 599 Void setIlpSshSignalingEnabledFlag(Bool x) { m_ilpSshSignalingEnabledFlag = x;} 590 600 #endif 591 601 #if VPS_EXTN_PROFILE_INFO … … 653 663 Void setMaxSublayerForIlpPlus1(Int layerId, UInt maxSublayer) { m_maxSublayerForIlpPlus1[layerId] = maxSublayer; } 654 664 #endif 665 #if N0120_MAX_TID_REF_PRESENT_FLAG 666 Bool getMaxTidIlRefPicsPlus1PresentFlag() { return m_maxTidIlRefPicsPlus1PresentFlag ;} 667 Void setMaxTidIlRefPicsPlus1PresentFlag(Bool x) { m_maxTidIlRefPicsPlus1PresentFlag = x;} 668 #endif 655 669 #if M0040_ADAPTIVE_RESOLUTION_CHANGE 656 670 Bool getSingleLayerForNonIrapFlag() { return m_singleLayerForNonIrapFlag; } … … 1560 1574 Bool getMvdL1ZeroFlag () { return m_bLMvdL1Zero; } 1561 1575 Int getNumRpsCurrTempList(); 1576 #if RPL_INIT_N0316_N0082 1577 Int getNumNegativeRpsCurrTempList(); 1578 #endif 1562 1579 Int getList1IdxToList0Idx ( Int list1Idx ) { return m_list1IdxToList0Idx[list1Idx]; } 1563 1580 Void setReferenced(Bool b) { m_bRefenced = b; } … … 1778 1795 Void setMFMEnabledFlag(Bool flag) { m_bMFMEnabledFlag = flag; } 1779 1796 Bool getMFMEnabledFlag() { return m_bMFMEnabledFlag; } 1797 #if !REMOVE_COL_PICTURE_SIGNALING 1780 1798 Void setColRefLayerIdx(Int i) { m_colRefLayerIdx = i; } 1781 1799 Int getColRefLayerIdx() { return m_colRefLayerIdx; } … … 1784 1802 Void setMotionPredIlp(TComPic *ilpPic) { m_pcIlpPic = ilpPic; } 1785 1803 TComPic* getMotionPredIlp() { return m_pcIlpPic; } 1804 #endif 1786 1805 #endif 1787 1806 #endif -
trunk/source/Lib/TLibCommon/TComTrQuant.cpp
r313 r345 1235 1235 uiMode = pcCU->getLumaIntraDir( uiAbsPartIdx ); 1236 1236 } 1237 #if INTRA_BL_DST4x41238 else if(eTType == TEXT_LUMA && pcCU->isIntraBL(uiAbsPartIdx) )1239 {1240 uiMode = DC_IDX; //Using DST1241 }1242 #endif1243 1237 else 1244 1238 { … … 1314 1308 Int scalingListType = (pcCU->isIntra(uiAbsPartIdx) ? 0 : 3) + g_eTTable[(Int)eTxt]; 1315 1309 assert(scalingListType < 6); 1316 #if NO_RESIDUAL_FLAG_FOR_BLPRED1317 if(pcCU->isIntraBL(uiAbsPartIdx) && eTxt == TEXT_LUMA)1318 {1319 invtransformNxN( pcCU->getCUTransquantBypass(uiAbsPartIdx), eTxt, DC_IDX, pResi, uiStride, rpcCoeff, uiWidth, uiHeight, scalingListType, pcCU->getTransformSkip(uiAbsPartIdx, eTxt) );1320 }1321 else1322 {1323 invtransformNxN( pcCU->getCUTransquantBypass(uiAbsPartIdx), eTxt, REG_DCT, pResi, uiStride, rpcCoeff, uiWidth, uiHeight, scalingListType, pcCU->getTransformSkip(uiAbsPartIdx, eTxt) );1324 }1325 #else1326 1310 invtransformNxN( pcCU->getCUTransquantBypass(uiAbsPartIdx), eTxt, REG_DCT, pResi, uiStride, rpcCoeff, uiWidth, uiHeight, scalingListType, pcCU->getTransformSkip(uiAbsPartIdx, eTxt) ); 1327 #endif1328 1311 } 1329 1312 else … … 1809 1792 Int ui16CtxCbf = 0; 1810 1793 Int iBestLastIdxP1 = 0; 1811 #if NO_RESIDUAL_FLAG_FOR_BLPRED1812 if( (!pcCU->isIntra( uiAbsPartIdx ) || pcCU->isIntraBL( uiAbsPartIdx )) && eTType == TEXT_LUMA && pcCU->getTransformIdx( uiAbsPartIdx ) == 0 )1813 #else1814 1794 if( !pcCU->isIntra( uiAbsPartIdx ) && eTType == TEXT_LUMA && pcCU->getTransformIdx( uiAbsPartIdx ) == 0 ) 1815 #endif1816 1795 { 1817 1796 ui16CtxCbf = 0; -
trunk/source/Lib/TLibCommon/TComUpsampleFilter.cpp
r313 r345 9 9 { 10 10 { 0, 0, 0, 64, 0, 0, 0, 0}, // 11 #if ARBITRARY_SPATIAL_RATIO 12 { 0, 1, -3, 63, 4, -2, 1, 0}, 13 { -1, 2, -5, 62, 8, -3, 1, 0}, 14 { -1, 3, -8, 60, 13, -4, 1, 0}, 15 { -1, 4,-10, 58, 17, -5, 1, 0}, 16 #else 11 17 {CNU,CNU,CNU,CNU,CNU,CNU,CNU,CNU}, // 12 18 {CNU,CNU,CNU,CNU,CNU,CNU,CNU,CNU}, // 13 19 {CNU,CNU,CNU,CNU,CNU,CNU,CNU,CNU}, // 14 20 {CNU,CNU,CNU,CNU,CNU,CNU,CNU,CNU}, // 15 { -1, 4, -11, 52, 26, -8, 3, -1}, // <-> actual phase shift 1/3, used for spatial scalability x1.5 21 #endif 22 { -1, 4, -11, 52, 26, -8, 3, -1}, // <-> actual phase shift 1/3, used for spatial scalability x1.5 23 #if ARBITRARY_SPATIAL_RATIO 24 { -1, 3, -9, 47, 31, -10, 4, -1}, 25 { -1, 4, -11, 45, 34, -10, 4, -1}, 26 #else 16 27 {CNU,CNU,CNU,CNU,CNU,CNU,CNU,CNU}, // 17 28 {CNU,CNU,CNU,CNU,CNU,CNU,CNU,CNU}, // 18 { -1, 4, -11, 40, 40, -11, 4, -1}, // <-> actual phase shift 1/2, equal to HEVC MC, used for spatial scalability x2 29 #endif 30 { -1, 4, -11, 40, 40, -11, 4, -1}, // <-> actual phase shift 1/2, equal to HEVC MC, used for spatial scalability x2 31 #if ARBITRARY_SPATIAL_RATIO 32 { -1, 4, -10, 34, 45, -11, 4, -1}, 33 { -1, 4, -10, 31, 47, -9, 3, -1}, 34 #else 19 35 {CNU,CNU,CNU,CNU,CNU,CNU,CNU,CNU}, // 20 36 {CNU,CNU,CNU,CNU,CNU,CNU,CNU,CNU}, // 37 #endif 21 38 { -1, 3, -8, 26, 52, -11, 4, -1}, // <-> actual phase shift 2/3, used for spatial scalability x1.5 39 #if ARBITRARY_SPATIAL_RATIO 40 { 0, 1, -5, 17, 58, -10, 4, -1}, 41 { 0, 1, -4, 13, 60, -8, 3, -1}, 42 { 0, 1, -3, 8, 62, -5, 2, -1}, 43 { 0, 1, -2, 4, 63, -3, 1, 0} 44 #else 22 45 {CNU,CNU,CNU,CNU,CNU,CNU,CNU,CNU}, // 23 46 {CNU,CNU,CNU,CNU,CNU,CNU,CNU,CNU}, // 24 47 {CNU,CNU,CNU,CNU,CNU,CNU,CNU,CNU}, // 25 48 {CNU,CNU,CNU,CNU,CNU,CNU,CNU,CNU} // 49 #endif 26 50 }; 27 51 28 52 const Int TComUpsampleFilter::m_chromaFixedFilter[16][NTAPS_US_CHROMA] = 29 53 { 30 #if CHROMA_UPSAMPLING31 54 { 0, 64, 0, 0},// 55 #if ARBITRARY_SPATIAL_RATIO 56 { -2, 62, 4, 0}, 57 { -2, 58, 10, -2}, 58 { -4, 56, 14, -2}, 59 #else 32 60 {CNU,CNU,CNU,CNU},// 33 61 {CNU,CNU,CNU,CNU},// 34 62 {CNU,CNU,CNU,CNU},// 63 #endif 35 64 { -4, 54, 16, -2},// <-> actual phase shift 1/4,equal to HEVC MC, used for spatial scalability x1.5 (only for accurate Chroma alignement) 36 65 { -6, 52, 20, -2},// <-> actual phase shift 1/3, used for spatial scalability x1.5 37 66 { -6, 46, 28, -4},// <-> actual phase shift 3/8,equal to HEVC MC, used for spatial scalability x2 (only for accurate Chroma alignement) 67 #if ARBITRARY_SPATIAL_RATIO 68 { -4, 42, 30, -4}, 69 #else 38 70 {CNU,CNU,CNU,CNU},// 71 #endif 39 72 { -4, 36, 36, -4},// <-> actual phase shift 1/2,equal to HEVC MC, used for spatial scalability x2 40 73 { -4, 30, 42, -4},// <-> actual phase shift 7/12, used for spatial scalability x1.5 (only for accurate Chroma alignement) 74 #if ARBITRARY_SPATIAL_RATIO 75 { -4, 28, 46, -6}, 76 #else 41 77 {CNU,CNU,CNU,CNU},// 78 #endif 42 79 { -2, 20, 52, -6},// <-> actual phase shift 2/3, used for spatial scalability x1.5 80 #if ARBITRARY_SPATIAL_RATIO 81 {-2, 16, 54, -4}, 82 {-2, 14, 56, -4}, 83 #else 43 84 {CNU,CNU,CNU,CNU},// 44 85 {CNU,CNU,CNU,CNU},// 86 #endif 45 87 { -2, 10, 58, -2},// <-> actual phase shift 7/8,equal to HEVC MC, used for spatial scalability x2 (only for accurate Chroma alignement) 46 88 { 0, 4, 62, -2} // <-> actual phase shift 11/12, used for spatial scalability x1.5 (only for accurate Chroma alignement) 47 #else48 { 0, 64, 0, 0},//49 {CNU,CNU,CNU,CNU},//50 {CNU,CNU,CNU,CNU},//51 {CNU,CNU,CNU,CNU},//52 { -4, 54, 16, -2},// <-> actual phase shift 1/4,equal to HEVC MC, used for spatial scalability x1.5 (only for accurate Chroma alignement)53 { -5, 50, 22, -3},// <-> actual phase shift 1/3, used for spatial scalability x1.554 { -6, 46, 28, -4},// <-> actual phase shift 3/8,equal to HEVC MC, used for spatial scalability x2 (only for accurate Chroma alignement)55 {CNU,CNU,CNU,CNU},//56 { -4, 36, 36, -4},// <-> actual phase shift 1/2,equal to HEVC MC, used for spatial scalability x257 { -4, 30, 43, -5},// <-> actual phase shift 7/12, used for spatial scalability x1.5 (only for accurate Chroma alignement)58 {CNU,CNU,CNU,CNU},//59 { -3, 22, 50, -5},// <-> actual phase shift 2/3, used for spatial scalability x1.560 {CNU,CNU,CNU,CNU},//61 {CNU,CNU,CNU,CNU},//62 { -2, 10, 58, -2},// <-> actual phase shift 7/8,equal to HEVC MC, used for spatial scalability x2 (only for accurate Chroma alignement)63 { -1, 5, 62, -2} // <-> actual phase shift 11/12, used for spatial scalability x1.5 (only for accurate Chroma alignement)64 #endif65 89 }; 66 90 … … 183 207 } 184 208 209 #if ARBITRARY_SPATIAL_RATIO 210 assert ( widthEL >= widthBL ); 211 assert ( heightEL >= heightBL ); 212 #else 185 213 assert ( widthEL == widthBL || widthEL == 2*widthBL || 2*widthEL == 3*widthBL ); 186 214 assert ( heightEL == heightBL || heightEL == 2*heightBL || 2*heightEL == 3*heightBL ); 215 #endif 187 216 188 217 pcBasePic->setBorderExtension(false); … … 195 224 Int phaseY = 0; 196 225 226 #if ROUNDING_OFFSET 227 Int addX = ( ( phaseX * scaleX + 2 ) >> 2 ) + ( 1 << ( shiftX - 5 ) ); 228 Int addY = ( ( phaseY * scaleY + 2 ) >> 2 ) + ( 1 << ( shiftY - 5 ) ); 229 #else 197 230 Int addX = ( ( ( widthBL * phaseX ) << ( shiftX - 2 ) ) + ( widthEL >> 1 ) ) / widthEL + ( 1 << ( shiftX - 5 ) ); 198 231 Int addY = ( ( ( heightBL * phaseY ) << ( shiftY - 2 ) ) + ( heightEL >> 1 ) ) / heightEL+ ( 1 << ( shiftY - 5 ) ); 232 #endif 199 233 200 234 Int deltaX = 4 * phaseX; … … 216 250 Int topStartL = scalEL.getWindowTopOffset(); 217 251 Int bottomEndL = pcUsPic->getHeight() - scalEL.getWindowBottomOffset(); 252 #if BUGFIX_RESAMPLE 253 Int leftOffset = leftStartL > 0 ? leftStartL : 0; 254 #endif 255 #endif 256 257 #if N0214_INTERMEDIATE_BUFFER_16BITS 258 Int shift1 = g_bitDepthY - 8; 218 259 #endif 219 260 … … 236 277 for( j = 0; j < heightBL ; j++ ) 237 278 { 279 #if N0214_INTERMEDIATE_BUFFER_16BITS 280 *piDstY = sumLumaHor(piSrcY, coeff) >> shift1; 281 #else 238 282 *piDstY = sumLumaHor(piSrcY, coeff); 283 #endif 239 284 piSrcY += strideBL; 240 285 piDstY += strideEL; … … 248 293 pcTempPic->setHeight(heightEL); 249 294 295 #if N0214_INTERMEDIATE_BUFFER_16BITS 296 Int nShift = US_FILTER_PREC*2 - shift1; 297 #else 250 298 const Int nShift = US_FILTER_PREC*2; 299 #endif 251 300 Int iOffset = 1 << (nShift - 1); 252 301 … … 269 318 piSrcY = piTempBufY + (refPos -((NTAPS_US_LUMA>>1) - 1))*strideEL; 270 319 #if SCALED_REF_LAYER_OFFSETS 320 #if BUGFIX_RESAMPLE 321 Pel* piDstY0 = piDstBufY + j * strideEL; 322 piDstY = piDstY0 + leftOffset; 323 piSrcY += leftOffset; 324 325 for( i = min<Int>(rightEndL, pcTempPic->getWidth()) - max<Int>(0, leftStartL); i > 0; i-- ) 326 { 327 *piDstY = ClipY( (sumLumaVer(piSrcY, coeff, strideEL) + iOffset) >> (nShift)); 328 piSrcY++; 329 piDstY++; 330 } 331 332 for( i = rightEndL; i < pcTempPic->getWidth(); i++ ) 333 { 334 *piDstY = piDstY0[rightEndL-1]; 335 piDstY++; 336 } 337 338 piDstY = piDstY0; 339 for( i = 0; i < leftStartL; i++ ) 340 { 341 *piDstY = piDstY0[leftStartL]; 342 piDstY++; 343 } 344 #else 271 345 #if 1 // it should provide identical result 272 346 Pel* piDstY0 = piDstBufY + j * strideEL; … … 308 382 } 309 383 #endif 384 #endif 310 385 #else 311 386 piDstY = piDstBufY + j * strideEL; … … 351 426 Int topStartC = scalEL.getWindowTopOffset() >> 1; 352 427 Int bottomEndC = (pcUsPic->getHeight() >> 1) - (scalEL.getWindowBottomOffset() >> 1); 428 #if BUGFIX_RESAMPLE 429 leftOffset = leftStartC > 0 ? leftStartC : 0; 430 #endif 353 431 #endif 354 432 … … 359 437 phaseY = 1; 360 438 439 #if ROUNDING_OFFSET 440 addX = ( ( phaseX * scaleX + 2 ) >> 2 ) + ( 1 << ( shiftX - 5 ) ); 441 addY = ( ( phaseY * scaleY + 2 ) >> 2 ) + ( 1 << ( shiftY - 5 ) ); 442 #else 361 443 addX = ( ( ( widthBL * phaseX ) << ( shiftX - 2 ) ) + ( widthEL >> 1 ) ) / widthEL + ( 1 << ( shiftX - 5 ) ); 362 444 addY = ( ( ( heightBL * phaseY ) << ( shiftY - 2 ) ) + ( heightEL >> 1 ) ) / heightEL+ ( 1 << ( shiftY - 5 ) ); 445 #endif 363 446 364 447 deltaX = 4 * phaseX; … … 379 462 widthBL = pcBasePic->getWidth () >> 1; 380 463 heightBL = min<Int>( pcBasePic->getHeight() >> 1, heightEL ); 464 #endif 465 466 #if N0214_INTERMEDIATE_BUFFER_16BITS 467 shift1 = g_bitDepthC - 8; 381 468 #endif 382 469 … … 401 488 for( j = 0; j < heightBL ; j++ ) 402 489 { 490 #if N0214_INTERMEDIATE_BUFFER_16BITS 491 *piDstU = sumChromaHor(piSrcU, coeff) >> shift1; 492 *piDstV = sumChromaHor(piSrcV, coeff) >> shift1; 493 #else 403 494 *piDstU = sumChromaHor(piSrcU, coeff); 404 495 *piDstV = sumChromaHor(piSrcV, coeff); 496 #endif 405 497 406 498 piSrcU += strideBL; … … 416 508 pcTempPic->extendPicBorder (); // extend the border. 417 509 pcTempPic->setHeight(heightEL << 1); 510 511 #if N0214_INTERMEDIATE_BUFFER_16BITS 512 nShift = US_FILTER_PREC*2 - shift1; 513 iOffset = 1 << (nShift - 1); 514 #endif 418 515 419 516 #if SCALED_REF_LAYER_OFFSETS … … 436 533 piSrcV = piTempBufV + (refPos -((NTAPS_US_CHROMA>>1) - 1))*strideEL; 437 534 #if SCALED_REF_LAYER_OFFSETS 535 #if BUGFIX_RESAMPLE 536 Pel* piDstU0 = piDstBufU + j*strideEL; 537 Pel* piDstV0 = piDstBufV + j*strideEL; 538 piDstU = piDstU0 + leftOffset; 539 piDstV = piDstV0 + leftOffset; 540 piSrcU += leftOffset; 541 piSrcV += leftOffset; 542 543 for( i = min<Int>(rightEndC, pcTempPic->getWidth() >> 1) - max<Int>(0, leftStartC); i > 0; i-- ) 544 { 545 *piDstU = ClipC( (sumChromaVer(piSrcU, coeff, strideEL) + iOffset) >> (nShift)); 546 *piDstV = ClipC( (sumChromaVer(piSrcV, coeff, strideEL) + iOffset) >> (nShift)); 547 piSrcU++; 548 piSrcV++; 549 piDstU++; 550 piDstV++; 551 } 552 553 for( i = rightEndC; i < pcTempPic->getWidth() >> 1; i++ ) 554 { 555 *piDstU = piDstU0[rightEndC-1]; 556 *piDstV = piDstV0[rightEndC-1]; 557 piDstU++; 558 piDstV++; 559 } 560 561 piDstU = piDstU0; 562 piDstV = piDstV0; 563 for( i = 0; i < leftStartC; i++ ) 564 { 565 *piDstU = piDstU0[leftStartC]; 566 *piDstV = piDstV0[leftStartC]; 567 piDstU++; 568 piDstV++; 569 } 570 #else 438 571 #if 1 // it should provide identical result 439 572 Pel* piDstU0 = piDstBufU + j*strideEL; … … 490 623 } 491 624 #endif 625 #endif 492 626 #else 493 627 piDstU = piDstBufU + j*strideEL; -
trunk/source/Lib/TLibCommon/TComYuv.cpp
r313 r345 184 184 } 185 185 186 #if NO_RESIDUAL_FLAG_FOR_BLPRED187 Void TComYuv::copyFromPicLuma ( TComPicYuv* pcPicYuvSrc, UInt iCuAddr, UInt uiZorderIdxInCU, UInt uiAbsZorderIdx, UInt uiWidth, UInt uiHeight )188 {189 Int y;190 191 Pel* pDst = getLumaAddr(uiAbsZorderIdx);192 Pel* pSrc = pcPicYuvSrc->getLumaAddr ( iCuAddr, uiZorderIdxInCU + uiAbsZorderIdx );193 194 UInt iDstStride = getStride();195 UInt iSrcStride = pcPicYuvSrc->getStride();196 for ( y = uiHeight; y != 0; y-- )197 {198 ::memcpy( pDst, pSrc, sizeof(Pel)*uiWidth);199 pDst += iDstStride;200 pSrc += iSrcStride;201 }202 }203 204 Void TComYuv::copyFromPicChroma( TComPicYuv* pcPicYuvSrc, UInt iCuAddr, UInt uiZorderIdxInCU, UInt uiAbsZorderIdx, UInt uiCWidth, UInt uiCHeight, UInt uiChromaId )205 {206 Int y;207 208 if (!uiChromaId)209 {210 Pel* pDstU = getCbAddr(uiAbsZorderIdx);211 Pel* pSrcU = pcPicYuvSrc->getCbAddr( iCuAddr, uiZorderIdxInCU + uiAbsZorderIdx );212 213 UInt iDstStride = getCStride();214 UInt iSrcStride = pcPicYuvSrc->getCStride();215 for ( y = uiCHeight; y != 0; y-- )216 {217 ::memcpy( pDstU, pSrcU, sizeof(Pel)*(uiCWidth) );218 pSrcU += iSrcStride;219 pDstU += iDstStride;220 }221 }222 else223 {224 Pel* pDstV = getCrAddr(uiAbsZorderIdx);225 Pel* pSrcV = pcPicYuvSrc->getCrAddr( iCuAddr, uiZorderIdxInCU + uiAbsZorderIdx );226 227 UInt iDstStride = getCStride();228 UInt iSrcStride = pcPicYuvSrc->getCStride();229 for ( y = uiCHeight; y != 0; y-- )230 {231 ::memcpy( pDstV, pSrcV, sizeof(Pel)*(uiCWidth) );232 pSrcV += iSrcStride;233 pDstV += iDstStride;234 }235 }236 }237 #endif238 239 186 Void TComYuv::copyToPartYuv( TComYuv* pcYuvDst, UInt uiDstPartIdx ) 240 187 { -
trunk/source/Lib/TLibCommon/TComYuv.h
r313 r345 115 115 Void copyFromPicLuma ( TComPicYuv* pcPicYuvSrc, UInt iCuAddr, UInt uiAbsZorderIdx ); 116 116 Void copyFromPicChroma ( TComPicYuv* pcPicYuvSrc, UInt iCuAddr, UInt uiAbsZorderIdx ); 117 #if NO_RESIDUAL_FLAG_FOR_BLPRED118 Void copyFromPicLuma ( TComPicYuv* pcPicYuvSrc, UInt iCuAddr, UInt uiZorderIdxInCU, UInt uiAbsZorderIdx, UInt uiWidth, UInt uiHeight );119 Void copyFromPicChroma( TComPicYuv* pcPicYuvSrc, UInt iCuAddr, UInt uiZorderIdxInCU, UInt uiAbsZorderIdx, UInt uiCWidth, UInt uiCHeight, UInt uiChromaId );120 #endif121 117 122 118 // Copy Small YUV buffer to the part of other Big YUV buffer -
trunk/source/Lib/TLibCommon/TypeDef.h
r313 r345 41 41 #define SVC_EXTENSION 1 42 42 43 #define N0139_POSITION_ROUNDING_OFFSET 1 44 43 45 #define SYNTAX_BYTES 10 ///< number of bytes taken by syntaxes per 4x4 block [RefIdxL0(1byte), RefIdxL1(1byte), MVxL0(2bytes), MVyL0(2bytes), MVxL1(2bytes), MVyL1(2bytes)] 44 46 45 47 #if SVC_EXTENSION 46 48 #define MAX_LAYERS 2 ///< max number of layers the codec is supposed to handle 47 49 #define RPL_INIT_N0316_N0082 1 ///< N0316, N0082: initial reference picture list construction 50 #define FINAL_RPL_CHANGE_N0082 1 ///< N0082: final ref picture list change (encoder) 48 51 #define M0464_TILE_BOUNDARY_ALIGNED_FLAG 1 ///< VUI flag to indicate tile boundary alignment 49 52 #define M0463_VUI_EXT_ILP_REF 1 ///< VUI extension inter-layer dependency offset signalling … … 51 54 #define SCALED_REF_LAYER_OFFSET_FLAG 0 ///< M0309: Signal scaled reference layer offsets in SPS 52 55 #define SCALED_REF_LAYER_OFFSETS 1 ///< M0309: Signal scaled reference layer offsets in SPS 56 57 #define ILP_SSH_SIG 1 ///< JCTVC-N0195 proposal 2, JCTVC-N0118: add presence flag in VPS ext to condition inter-layer prediction signaling in slice segment header 58 #define SPL_FLG_CHK 1 ///< JCTVC-N0195 proposal 5, JCTVC-N0085: constrain sum of lengths to be less than or equal to 6 59 #define ILP_NUM_REF_CHK 1 ///< JCTVC-N0195 proposal 1, JCTVC-N0081, JCTVC-N0154, JCTVC-N0217: a condition on signaling inter_layer_pred_layer_idc[ i ], to avoid sending when NumDirectRefLayers equals NumActiveRefLayerPics, and instead infer values 53 60 54 61 #define VPS_RENAME 1 ///< Rename variables max_layer_id and num_layer_sets_minus1 in VPS … … 74 81 #define SVC_COL_BLK 1 ///< get co-located block 75 82 #define SVC_UPSAMPLING 1 ///< upsampling filters 76 #define CHROMA_UPSAMPLING 1 ///< L0335: Chroma upsampling with 5 bits coefficients 83 #define ROUNDING_OFFSET 1 ///< JCTVC-N0111: upsampling rounding offset using scalling factors 84 #define N0214_INTERMEDIATE_BUFFER_16BITS 1 ///< JCTVC-N0214 support base layer input more than 8 bits 85 #define ARBITRARY_SPATIAL_RATIO 0 ///< JCTVC-N0219, JCTVC-N0273: Support arbitrary spatial ratio 86 #define BUGFIX_RESAMPLE 1 ///< JCTVC-N0055: resampling bug fix for positive left scalled offset 77 87 78 88 #define SIMPLIFIED_MV_POS_SCALING 1 ///< M0133/M0449: inter-layer MV scaling and pixel mapping position calculation … … 97 107 #define JCTVC_M0458_INTERLAYER_RPS_SIG 1 ///< implementation of JCTVC-L0178 98 108 #if JCTVC_M0458_INTERLAYER_RPS_SIG 99 #define ZERO_NUM_DIRECT_LAYERS 1 ///< support of zero direct reference layers100 109 #define MAX_ONE_RESAMPLING_DIRECT_LAYERS 1 ///< Allow maximum of one resampling process for direct reference layers 101 110 #endif 102 111 #define JCTVC_M0203_INTERLAYER_PRED_IDC 1 ///< implementation of JCTVC-M0203 Inter-layer Prediction Indication 103 112 #if JCTVC_M0203_INTERLAYER_PRED_IDC 104 #define ILR_RESTR 1 ///< JCTVC-M0209 Inter-layer RPS and RPL 113 #define ILR_RESTR 1 ///< JCTVC-M0209 Inter-layer RPS and RPL 114 #define N0120_MAX_TID_REF_PRESENT_FLAG 1 ///< JCTVC-N0120 max_tid_ref_pics_plus1_present_flag 105 115 #endif 106 116 #if REF_IDX_MFM 117 #define REMOVE_COL_PICTURE_SIGNALING 1 ///< JCTVC-N0107 remove alternative collocated picture signalling 107 118 #define M0457_COL_PICTURE_SIGNALING 1 108 119 #endif 109 120 110 121 #if !VPS_EXTN_DIRECT_REF_LAYERS || !M0457_PREDICTION_INDICATIONS || !JCTVC_M0458_INTERLAYER_RPS_SIG 111 #define M0457_IL_SAMPLE_PRED_ONLY_FLAG 0 122 #define M0457_IL_SAMPLE_PRED_ONLY_FLAG 0 ///< shall be 0, JCTVC-N0107 112 123 #else 113 #define M0457_IL_SAMPLE_PRED_ONLY_FLAG 0 114 #endif 115 116 #else 117 #define INTRA_BL 1 ///< inter-layer texture prediction 118 119 #if INTRA_BL 120 #define INTRA_BL_DST4x4 1 ///< L0067/L0204: DST4x4 for Intra BL 121 #define NO_RESIDUAL_FLAG_FOR_BLPRED 1 ///< L0437: Root cbf for Intra_BL 122 #define IL_MRG_SIMPLIFIED_PRUNING 1 ///< M0124: simplified pruning, Only the left and above candidates are checked with BL-C candidate for redundancy removal 123 #define INTRA_BL_CTX_CHANGE 1 ///< M0075: spatial dependency removal for IntraBL flag context derivation 124 125 // Hooks 126 #define SVC_MVP 1 ///< motion hook for merge mode as an example 127 #if !AVC_BASE && !AVC_SYNTAX 128 #define SVC_BL_CAND_INTRA 0 ///< Intra Base Mode Prediction hook as an example 129 #endif 130 124 #define M0457_IL_SAMPLE_PRED_ONLY_FLAG 0 ///< shall be 0, JCTVC-N0107 131 125 #endif 132 126 #endif … … 134 128 #define FAST_INTRA_SHVC 1 ///< M0115: reduction number of intra modes in the EL (encoder only) 135 129 #if FAST_INTRA_SHVC 136 #define NB_REMAIN_MODES2 ///< nb of remaining modes (M0115)137 #endif 138 139 #define RC_SHVC_HARMONIZATION 1 ///< JCTVC-M0037, rate control for SHVC130 #define NB_REMAIN_MODES 2 ///< nb of remaining modes (M0115) 131 #endif 132 133 #define RC_SHVC_HARMONIZATION 1 ///< JCTVC-M0037, rate control for SHVC 140 134 141 135 #else … … 472 466 MODE_INTER, ///< inter-prediction mode 473 467 MODE_INTRA, ///< intra-prediction mode 474 #if INTRA_BL475 MODE_INTRA_BL, ///< inter-layer intra-prediction mode476 #endif477 468 MODE_NONE = 15 478 469 }; -
trunk/source/Lib/TLibDecoder/TDecCAVLC.cpp
r313 r345 951 951 #endif 952 952 #if JCTVC_M0203_INTERLAYER_PRED_IDC 953 #if N0120_MAX_TID_REF_PRESENT_FLAG 954 READ_FLAG( uiCode, "max_tid_il_ref_pics_plus1_present_flag"); vps->setMaxTidIlRefPicsPlus1PresentFlag(uiCode ? true : false); 955 if (vps->getMaxTidIlRefPicsPlus1PresentFlag()) 956 { 957 for(i = 0; i < vps->getMaxLayers() - 1; i++) 958 { 959 READ_CODE( 3, uiCode, "max_sublayer_for_ilp_plus1[i]" ); vps->setMaxSublayerForIlpPlus1(i, uiCode); 960 assert( uiCode <= vps->getMaxTLayers() ); 961 } 962 } 963 else 964 { 965 for(i = 0; i < vps->getMaxLayers() - 1; i++) 966 { 967 vps->setMaxSublayerForIlpPlus1(i, 7); 968 } 969 } 970 #else 953 971 for(i = 0; i < vps->getMaxLayers() - 1; i++) 954 972 { … … 956 974 assert( uiCode <= vps->getMaxTLayers() ); 957 975 } 976 #endif 977 #endif 978 #if ILP_SSH_SIG 979 READ_FLAG( uiCode, "all_ref_layers_active_flag" ); vps->setIlpSshSignalingEnabledFlag(uiCode ? true : false); 958 980 #endif 959 981 #if VPS_EXTN_PROFILE_INFO … … 1382 1404 #if JCTVC_M0458_INTERLAYER_RPS_SIG 1383 1405 rpcSlice->setActiveNumILRRefIdx(0); 1406 #if ILP_SSH_SIG 1407 if((sps->getLayerId() > 0) && rpcSlice->getVPS()->getIlpSshSignalingEnabledFlag() && (rpcSlice->getNumILRRefIdx() > 0) ) 1408 #else 1384 1409 if((sps->getLayerId() > 0) && (rpcSlice->getNumILRRefIdx() > 0) ) 1410 #endif 1385 1411 { 1386 1412 READ_FLAG(uiCode,"inter_layer_pred_enabled_flag"); … … 1404 1430 rpcSlice->setActiveNumILRRefIdx(1); 1405 1431 } 1432 #if ILP_NUM_REF_CHK 1433 if( rpcSlice->getActiveNumILRRefIdx() == rpcSlice->getNumILRRefIdx() ) 1434 { 1435 for( Int i = 0; i < rpcSlice->getActiveNumILRRefIdx(); i++ ) 1436 { 1437 rpcSlice->setInterLayerPredLayerIdc(i,i); 1438 } 1439 } 1440 else 1441 { 1442 #endif 1406 1443 for(Int i = 0; i < rpcSlice->getActiveNumILRRefIdx(); i++ ) 1407 1444 { … … 1409 1446 rpcSlice->setInterLayerPredLayerIdc(uiCode,i); 1410 1447 } 1448 #if ILP_NUM_REF_CHK 1449 } 1450 #endif 1411 1451 } 1412 1452 else … … 1417 1457 } 1418 1458 } 1459 #if ILP_SSH_SIG 1460 else if( rpcSlice->getVPS()->getIlpSshSignalingEnabledFlag() == false ) 1461 { 1462 rpcSlice->setInterLayerPredEnabledFlag(true); 1463 rpcSlice->setActiveNumILRRefIdx(rpcSlice->getNumILRRefIdx()); 1464 for( Int i = 0; i < rpcSlice->getActiveNumILRRefIdx(); i++ ) 1465 { 1466 rpcSlice->setInterLayerPredLayerIdc(i,i); 1467 } 1468 } 1469 #endif 1419 1470 #if M0457_IL_SAMPLE_PRED_ONLY_FLAG 1420 1471 rpcSlice->setInterLayerSamplePredOnlyFlag( false ); … … 1574 1625 { 1575 1626 #if REF_IDX_FRAMEWORK && M0457_COL_PICTURE_SIGNALING 1627 #if REMOVE_COL_PICTURE_SIGNALING 1628 rpcSlice->setMFMEnabledFlag( rpcSlice->getNumMotionPredRefLayers() > 0 ? true : false ); 1629 #else 1576 1630 rpcSlice->setMFMEnabledFlag( false ); 1577 1631 rpcSlice->setColRefLayerIdx( 0 ); … … 1590 1644 else 1591 1645 { 1646 #endif //REMOVE_COL_PICTURE_SIGNALING 1592 1647 #endif 1593 1648 if ( rpcSlice->getSliceType() == B_SLICE ) … … 1612 1667 rpcSlice->setColRefIdx(0); 1613 1668 } 1614 #if REF_IDX_FRAMEWORK && M0457_COL_PICTURE_SIGNALING 1669 #if REF_IDX_FRAMEWORK && M0457_COL_PICTURE_SIGNALING && !REMOVE_COL_PICTURE_SIGNALING 1615 1670 } 1616 1671 #endif … … 2215 2270 return (cnt>0); 2216 2271 } 2217 2218 #if INTRA_BL2219 Void TDecCavlc::parseIntraBLFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth )2220 {2221 assert(0);2222 }2223 #endif2224 2225 2272 //! \} 2226 2273 -
trunk/source/Lib/TLibDecoder/TDecCAVLC.h
r313 r345 118 118 Void updateContextTables ( SliceType /*eSliceType*/, Int /*iQp*/ ) { return; } 119 119 120 #if INTRA_BL121 Void parseIntraBLFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth );122 #endif123 124 120 Void xParsePredWeightTable ( TComSlice* pcSlice ); 125 121 Void parseScalingList ( TComScalingList* scalingList ); -
trunk/source/Lib/TLibDecoder/TDecCu.cpp
r313 r345 334 334 return; 335 335 } 336 #if INTRA_BL337 m_pcEntropyDecoder->decodeIntraBLFlag( pcCU, uiAbsPartIdx, 0, uiDepth );338 if ( pcCU->isIntraBL( uiAbsPartIdx ) )339 {340 pcCU->setSizeSubParts( g_uiMaxCUWidth>>uiDepth, g_uiMaxCUHeight>>uiDepth, uiAbsPartIdx, uiDepth );341 }342 else343 {344 #endif345 336 346 337 m_pcEntropyDecoder->decodePredMode( pcCU, uiAbsPartIdx, uiDepth ); … … 357 348 } 358 349 } 359 #if INTRA_BL 350 351 UInt uiCurrWidth = pcCU->getWidth ( uiAbsPartIdx ); 352 UInt uiCurrHeight = pcCU->getHeight( uiAbsPartIdx ); 353 360 354 // prediction mode ( Intra : direction mode, Inter : Mv, reference idx ) 361 355 m_pcEntropyDecoder->decodePredInfo( pcCU, uiAbsPartIdx, uiDepth, m_ppcCU[uiDepth]); 362 }363 #endif364 365 UInt uiCurrWidth = pcCU->getWidth ( uiAbsPartIdx );366 UInt uiCurrHeight = pcCU->getHeight( uiAbsPartIdx );367 368 #if !INTRA_BL369 // prediction mode ( Intra : direction mode, Inter : Mv, reference idx )370 m_pcEntropyDecoder->decodePredInfo( pcCU, uiAbsPartIdx, uiDepth, m_ppcCU[uiDepth]);371 #endif372 356 373 357 // Coefficient decoding … … 440 424 xReconIntraQT( m_ppcCU[uiDepth], uiDepth ); 441 425 break; 442 #if INTRA_BL443 case MODE_INTRA_BL:444 #if NO_RESIDUAL_FLAG_FOR_BLPRED445 xReconIntraBL( m_ppcCU[uiDepth], uiAbsPartIdx, uiDepth );446 #else447 xReconIntraQT( m_ppcCU[uiDepth], uiAbsPartIdx, uiDepth );448 #endif449 break;450 #endif451 426 default: 452 427 assert(0); … … 516 491 517 492 //===== get prediction signal ===== 518 #if INTRA_BL && !NO_RESIDUAL_FLAG_FOR_BLPRED519 if(pcCU->isIntraBL ( uiAbsPartIdx ) )520 {521 pcCU->getBaseLumaBlk( uiWidth, uiHeight, uiAbsPartIdx, piPred, uiStride );522 }523 else524 #endif525 493 m_pcPrediction->predIntraLumaAng( pcCU->getPattern(), uiLumaPredMode, piPred, uiStride, uiWidth, uiHeight, bAboveAvail, bLeftAvail ); 526 494 … … 607 575 608 576 //===== get prediction signal ===== 609 #if INTRA_BL && !NO_RESIDUAL_FLAG_FOR_BLPRED 610 if(pcCU->isIntraBL ( uiAbsPartIdx ) ) 611 { 612 pcCU->getBaseChromaBlk( uiWidth, uiHeight, uiAbsPartIdx, piPred, uiStride, uiChromaId ); 613 } 614 else 615 #endif 616 { 617 if( uiChromaPredMode == DM_CHROMA_IDX ) 618 { 619 uiChromaPredMode = pcCU->getLumaIntraDir( 0 ); 620 } 621 m_pcPrediction->predIntraChromaAng( pPatChroma, uiChromaPredMode, piPred, uiStride, uiWidth, uiHeight, bAboveAvail, bLeftAvail ); 622 } 577 if( uiChromaPredMode == DM_CHROMA_IDX ) 578 { 579 uiChromaPredMode = pcCU->getLumaIntraDir( 0 ); 580 } 581 m_pcPrediction->predIntraChromaAng( pPatChroma, uiChromaPredMode, piPred, uiStride, uiWidth, uiHeight, bAboveAvail, bLeftAvail ); 623 582 624 583 //===== inverse transform ===== … … 930 889 931 890 } 932 933 #if NO_RESIDUAL_FLAG_FOR_BLPRED934 Void935 TDecCu::xReconIntraBL( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )936 {937 m_ppcYuvReco[uiDepth]->copyFromPicLuma ( pcCU->getSlice()->getFullPelBaseRec(m_layerId - 1), pcCU->getAddr(), pcCU->getZorderIdxInCU(), 0, pcCU->getWidth(0), pcCU->getHeight(0));938 m_ppcYuvReco[uiDepth]->copyFromPicChroma( pcCU->getSlice()->getFullPelBaseRec(m_layerId - 1), pcCU->getAddr(), pcCU->getZorderIdxInCU(), 0, (pcCU->getWidth(0)>>1), (pcCU->getHeight(0)>>1), 0);939 m_ppcYuvReco[uiDepth]->copyFromPicChroma( pcCU->getSlice()->getFullPelBaseRec(m_layerId - 1), pcCU->getAddr(), pcCU->getZorderIdxInCU(), 0, (pcCU->getWidth(0)>>1), (pcCU->getHeight(0)>>1), 1);940 941 // inter recon942 xDecodeInterTexture( pcCU, 0, uiDepth );943 944 // clip for only non-zero cbp case945 if ( ( pcCU->getCbf( 0, TEXT_LUMA ) ) || ( pcCU->getCbf( 0, TEXT_CHROMA_U ) ) || ( pcCU->getCbf(0, TEXT_CHROMA_V ) ) )946 {947 m_ppcYuvReco[uiDepth]->addClip( m_ppcYuvReco[uiDepth], m_ppcYuvResi[uiDepth], 0, pcCU->getWidth( 0 ) );948 }949 else950 {951 m_ppcYuvReco[uiDepth]->copyPartToPartYuv( m_ppcYuvReco[uiDepth],0, pcCU->getWidth( 0 ),pcCU->getHeight( 0 ));952 }953 }954 #endif955 956 891 //! \} -
trunk/source/Lib/TLibDecoder/TDecCu.h
r313 r345 77 77 #endif 78 78 79 #if INTRA_BL80 TComPicYuv* m_pcPicYuvRecBase; ///< reconstructed base layer81 #endif82 83 79 public: 84 80 TDecCu(); … … 106 102 #if SVC_EXTENSION 107 103 TDecTop* getLayerDec ( UInt LayerId ) { return m_ppcTDecTop[LayerId]; } 108 #if INTRA_BL109 Void setBaseRecPic ( TComPicYuv* p ) { m_pcPicYuvRecBase = p; }110 #endif111 104 #endif 112 105 protected: … … 122 115 Void xIntraRecLumaBlk ( TComDataCU* pcCU, UInt uiTrDepth, UInt uiAbsPartIdx, TComYuv* pcRecoYuv, TComYuv* pcPredYuv, TComYuv* pcResiYuv ); 123 116 Void xIntraRecChromaBlk ( TComDataCU* pcCU, UInt uiTrDepth, UInt uiAbsPartIdx, TComYuv* pcRecoYuv, TComYuv* pcPredYuv, TComYuv* pcResiYuv, UInt uiChromaId ); 124 #if NO_RESIDUAL_FLAG_FOR_BLPRED125 Void xReconIntraBL ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );126 #endif127 117 128 118 Void xReconPCM ( TComDataCU* pcCU, UInt uiDepth ); -
trunk/source/Lib/TLibDecoder/TDecEntropy.cpp
r313 r345 58 58 } 59 59 60 #if INTRA_BL61 Void TDecEntropy::decodeIntraBLFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth )62 {63 m_pcEntropyDecoderIf->parseIntraBLFlag( pcCU, uiAbsPartIdx, uiPartIdx, uiDepth );64 }65 #endif66 67 60 /** decode merge flag 68 61 * \param pcSubCU … … 111 104 Void TDecEntropy::decodePredInfo ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, TComDataCU* pcSubCU ) 112 105 { 113 #if INTRA_BL114 if( pcCU->isIntraBL( uiAbsPartIdx ) ) // Do nothing for Intra BL mode.115 {116 return;117 }118 #endif119 106 if( pcCU->isIntra( uiAbsPartIdx ) ) // If it is Intra mode, encode intra prediction mode. 120 107 { … … 450 437 451 438 pcCU->setCbfSubParts ( 0, TEXT_LUMA, uiAbsPartIdx, uiDepth ); 452 #if INTRA_BL453 #if NO_RESIDUAL_FLAG_FOR_BLPRED454 if( ( !pcCU->isIntra(uiAbsPartIdx) || pcCU->isIntraBL(uiAbsPartIdx)) && uiDepth == pcCU->getDepth( uiAbsPartIdx ) && !pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_U, 0 ) && !pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_V, 0 ) )455 #else456 if( ( !pcCU->isIntra(uiAbsPartIdx) ) && uiDepth == pcCU->getDepth( uiAbsPartIdx ) && !pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_U, 0 ) && !pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_V, 0 ) )457 #endif458 #else459 439 if( pcCU->getPredictionMode(uiAbsPartIdx) != MODE_INTRA && uiDepth == pcCU->getDepth( uiAbsPartIdx ) && !pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_U, 0 ) && !pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_V, 0 ) ) 460 #endif461 440 { 462 441 pcCU->setCbfSubParts( 1 << uiTrDepth, TEXT_LUMA, uiAbsPartIdx, uiDepth ); … … 556 535 UInt uiChromaOffset = uiLumaOffset>>2; 557 536 558 #if NO_RESIDUAL_FLAG_FOR_BLPRED559 if( pcCU->isIntra(uiAbsPartIdx) && !pcCU->isIntraBL(uiAbsPartIdx) )560 #else561 537 if( pcCU->isIntra(uiAbsPartIdx) ) 562 #endif563 538 { 564 539 } -
trunk/source/Lib/TLibDecoder/TDecEntropy.h
r313 r345 107 107 virtual Void parseTransformSkipFlags ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt width, UInt height, UInt uiDepth, TextType eTType) = 0; 108 108 109 #if INTRA_BL110 virtual Void parseIntraBLFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth ) = 0;111 #endif112 113 109 virtual Void updateContextTables( SliceType eSliceType, Int iQp ) = 0; 114 110 … … 170 166 Void updateContextTables ( SliceType eSliceType, Int iQp ) { m_pcEntropyDecoderIf->updateContextTables( eSliceType, iQp ); } 171 167 172 #if INTRA_BL173 Void decodeIntraBLFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth );174 #endif175 176 168 private: 177 169 Void xDecodeTransform ( TComDataCU* pcCU, UInt offsetLuma, UInt offsetChroma, UInt uiAbsPartIdx, UInt uiDepth, UInt width, UInt height, UInt uiTrIdx, Bool& bCodeDQP ); -
trunk/source/Lib/TLibDecoder/TDecSbac.cpp
r313 r345 77 77 , m_cTransformSkipSCModel ( 1, 2, NUM_TRANSFORMSKIP_FLAG_CTX , m_contextModels + m_numContextModels, m_numContextModels) 78 78 , m_CUTransquantBypassFlagSCModel( 1, 1, NUM_CU_TRANSQUANT_BYPASS_FLAG_CTX, m_contextModels + m_numContextModels, m_numContextModels) 79 #if INTRA_BL80 , m_cIntraBLPredFlagSCModel (1, 1, NUM_INTRA_BL_PRED_CTX , m_contextModels + m_numContextModels, m_numContextModels)81 #endif82 79 { 83 80 assert( m_numContextModels <= MAX_NUM_CTX_MOD ); … … 138 135 139 136 m_cCUTransSubdivFlagSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_TRANS_SUBDIV_FLAG ); 140 #if INTRA_BL141 m_cIntraBLPredFlagSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_INTRA_BL_PRED_FLAG );142 #endif143 137 m_cTransformSkipSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_TRANSFORMSKIP_FLAG ); 144 138 m_CUTransquantBypassFlagSCModel.initBuffer( sliceType, qp, (UChar*)INIT_CU_TRANSQUANT_BYPASS_FLAG ); … … 186 180 m_cSaoTypeIdxSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_SAO_TYPE_IDX ); 187 181 m_cCUTransSubdivFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_TRANS_SUBDIV_FLAG ); 188 #if INTRA_BL189 m_cIntraBLPredFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_INTRA_BL_PRED_FLAG );190 #endif191 182 m_cTransformSkipSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_TRANSFORMSKIP_FLAG ); 192 183 m_CUTransquantBypassFlagSCModel.initBuffer( eSliceType, iQp, (UChar*)INIT_CU_TRANSQUANT_BYPASS_FLAG ); … … 438 429 } 439 430 440 #if INTRA_BL441 Void TDecSbac::parseIntraBLFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth )442 {443 if( pcCU->getLayerId() == 0 )444 {445 return;446 }447 448 UInt uiSymbol = 0;449 450 UInt uiCtxIntraBL = pcCU->getCtxIntraBLFlag( uiAbsPartIdx ) ;451 m_pcTDecBinIf->decodeBin( uiSymbol, m_cIntraBLPredFlagSCModel.get( 0, 0, uiCtxIntraBL ));452 DTRACE_CABAC_VL( g_nSymbolCounter++ );453 DTRACE_CABAC_T( "\tIntrBLFlag" );454 DTRACE_CABAC_T( "\tuiSymbol: ");455 DTRACE_CABAC_V( uiSymbol );456 DTRACE_CABAC_T( "\n");457 458 if ( uiSymbol )459 {460 pcCU->setPartSizeSubParts( SIZE_2Nx2N, uiAbsPartIdx, uiDepth );461 pcCU->setPredModeSubParts( MODE_INTRA_BL, uiAbsPartIdx, uiDepth );462 pcCU->setTrIdxSubParts( 0, uiAbsPartIdx, uiDepth );463 pcCU->setLumaIntraDirSubParts ( DC_IDX, uiAbsPartIdx, uiDepth );464 }465 }466 #endif467 468 431 /** parse merge flag 469 432 * \param pcCU … … 555 518 UInt uiSymbol, uiMode = 0; 556 519 PartSize eMode; 557 558 #if INTRA_BL 559 if ( pcCU->isIntraBL( uiAbsPartIdx ) ) 560 { 561 assert( 0 ); 562 } 563 #endif 520 564 521 if ( pcCU->isIntra( uiAbsPartIdx ) ) 565 522 { -
trunk/source/Lib/TLibDecoder/TDecSbac.h
r313 r345 135 135 Void parseScalingList ( TComScalingList* /*scalingList*/ ) {} 136 136 137 #if INTRA_BL138 Void parseIntraBLFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth );139 #endif140 137 private: 141 138 UInt m_uiLastDQpNonZero; … … 174 171 ContextModel3DBuffer m_cTransformSkipSCModel; 175 172 ContextModel3DBuffer m_CUTransquantBypassFlagSCModel; 176 #if INTRA_BL177 ContextModel3DBuffer m_cIntraBLPredFlagSCModel;178 #endif179 173 }; 180 174 -
trunk/source/Lib/TLibDecoder/TDecSlice.cpp
r313 r345 197 197 UInt uiTileLCUX; 198 198 Int iNumSubstreamsPerTile = 1; // if independent. 199 #if INTRA_BL 200 m_pcCuDecoder->setBaseRecPic( rpcPic->getLayerId() > 0 ? rpcPic->getFullPelBaseRec(rpcPic->getLayerId()-1) : NULL); 201 #endif 199 202 200 Bool depSliceSegmentsEnabled = rpcPic->getSlice(rpcPic->getCurrSliceIdx())->getPPS()->getDependentSliceSegmentsEnabledFlag(); 203 201 uiTileStartLCU = rpcPic->getPicSym()->getTComTile(rpcPic->getPicSym()->getTileIdxMap(iStartCUAddr))->getFirstCUAddr(); -
trunk/source/Lib/TLibDecoder/TDecTop.cpp
r313 r345 242 242 243 243 m_iMaxRefPicNum = pcSlice->getSPS()->getMaxDecPicBuffering(pcSlice->getTLayer()); // m_uiMaxDecPicBuffering has the space for the picture currently being decoded 244 245 #if SVC_EXTENSION 246 m_iMaxRefPicNum += 1; // it should be updated if more than 1 resampling picture is used 247 #endif 248 244 249 if (m_cListPic.size() < (UInt)m_iMaxRefPicNum) 245 250 { … … 812 817 #if REF_IDX_FRAMEWORK 813 818 if (m_layerId == 0) 814 #elif INTRA_BL815 if( m_layerId > 0 )816 {817 pcSlice->setRefPicList( m_cListPic );818 }819 else820 819 #endif 821 820 #if FIX1071 … … 913 912 914 913 #if REF_IDX_FRAMEWORK 915 #if ZERO_NUM_DIRECT_LAYERS916 914 if( m_layerId > 0 && pcSlice->getActiveNumILRRefIdx() ) 917 #else918 if(m_layerId > 0)919 #endif920 915 { 921 916 setILRPic(pcPic); … … 928 923 { 929 924 pcSlice->setRefPOCListILP(m_ppcTDecTop[m_layerId]->m_cIlpPic, pcSlice->getBaseColPic()); 930 #if M0457_COL_PICTURE_SIGNALING 925 #if M0457_COL_PICTURE_SIGNALING && !REMOVE_COL_PICTURE_SIGNALING 931 926 pcSlice->setMotionPredIlp(getMotionPredIlp(pcSlice)); 932 927 #endif … … 1321 1316 if( vps->getNumDirectRefLayers( m_layerId ) <= 0 ) 1322 1317 { 1323 #if ZERO_NUM_DIRECT_LAYERS1324 1318 return (TDecTop *)getLayerDec( 0 ); 1325 #else1326 return NULL;1327 #endif1328 1319 } 1329 1320 … … 1386 1377 #endif 1387 1378 1388 #if M0457_COL_PICTURE_SIGNALING 1379 #if M0457_COL_PICTURE_SIGNALING && !REMOVE_COL_PICTURE_SIGNALING 1389 1380 TComPic* TDecTop::getMotionPredIlp(TComSlice* pcSlice) 1390 1381 { -
trunk/source/Lib/TLibDecoder/TDecTop.h
r313 r345 230 230 Void xDecodePPS(); 231 231 Void xDecodeSEI( TComInputBitstream* bs, const NalUnitType nalUnitType ); 232 #if M0457_COL_PICTURE_SIGNALING 232 #if M0457_COL_PICTURE_SIGNALING && !REMOVE_COL_PICTURE_SIGNALING 233 233 TComPic* getMotionPredIlp(TComSlice* pcSlice); 234 234 #endif -
trunk/source/Lib/TLibEncoder/TEncCavlc.cpp
r313 r345 708 708 } 709 709 710 #if SPL_FLG_CHK 711 if(vps->getSplittingFlag()) 712 { 713 UInt splDimSum=0; 714 for(j = 0; j < vps->getNumScalabilityTypes(); j++) 715 { 716 splDimSum+=(vps->getDimensionIdLen(j)); 717 } 718 assert(splDimSum<=6); 719 } 720 #endif 721 710 722 WRITE_FLAG( vps->getNuhLayerIdPresentFlag(), "vps_nuh_layer_id_present_flag" ); 711 723 for(i = 1; i < vps->getMaxLayers(); i++) … … 737 749 #endif 738 750 #if JCTVC_M0203_INTERLAYER_PRED_IDC 751 #if N0120_MAX_TID_REF_PRESENT_FLAG 752 WRITE_FLAG( vps->getMaxTidIlRefPicsPlus1PresentFlag(), "max_tid_il_ref_pics_plus1_present_flag"); 753 if (vps->getMaxTidIlRefPicsPlus1PresentFlag()) 754 { 755 for( i = 0; i < vps->getMaxLayers() - 1; i++) 756 { 757 WRITE_CODE(vps->getMaxSublayerForIlpPlus1(i), 3, "max_sublayer_for_ilp_plus1[i]" ); 758 } 759 } 760 #else 739 761 for( i = 0; i < vps->getMaxLayers() - 1; i++) 740 762 { 741 763 WRITE_CODE(vps->getMaxSublayerForIlpPlus1(i), 3, "max_sublayer_for_ilp_plus1[i]" ); 742 764 } 765 #endif 766 #endif 767 #if ILP_SSH_SIG 768 WRITE_FLAG( vps->getIlpSshSignalingEnabledFlag(), "all_ref_layers_active_flag" ); 743 769 #endif 744 770 #if VPS_EXTN_PROFILE_INFO … … 1052 1078 } 1053 1079 1054 #if JCTVC_M0458_INTERLAYER_RPS_SIG 1055 if((pcSlice->getSPS()->getLayerId() > 0) && (pcSlice->getNumILRRefIdx() > 0) ) 1080 #if JCTVC_M0458_INTERLAYER_RPS_SIG 1081 #if ILP_SSH_SIG 1082 if((pcSlice->getSPS()->getLayerId() > 0) && pcSlice->getVPS()->getIlpSshSignalingEnabledFlag() && (pcSlice->getNumILRRefIdx() > 0) ) 1083 #else 1084 if((pcSlice->getSPS()->getLayerId() > 0) && (pcSlice->getNumILRRefIdx() > 0) ) 1085 #endif 1056 1086 { 1057 1087 WRITE_FLAG(pcSlice->getInterLayerPredEnabledFlag(),"inter_layer_pred_enabled_flag"); … … 1069 1099 WRITE_CODE(pcSlice->getActiveNumILRRefIdx() - 1, numBits,"num_inter_layer_ref_pics_minus1"); 1070 1100 } 1101 #if ILP_NUM_REF_CHK 1102 if( pcSlice->getNumILRRefIdx() != pcSlice->getActiveNumILRRefIdx() ) 1103 { 1104 #endif 1071 1105 for(Int i = 0; i < pcSlice->getActiveNumILRRefIdx(); i++ ) 1072 1106 { 1073 1107 WRITE_CODE(pcSlice->getInterLayerPredLayerIdc(i),numBits,"inter_layer_pred_layer_idc[i]"); 1074 1108 } 1109 #if ILP_NUM_REF_CHK 1110 } 1111 #endif 1075 1112 } 1076 1113 } … … 1187 1224 if ( pcSlice->getEnableTMVPFlag() ) 1188 1225 { 1189 #if REF_IDX_FRAMEWORK && M0457_COL_PICTURE_SIGNALING 1226 #if REF_IDX_FRAMEWORK && M0457_COL_PICTURE_SIGNALING && !REMOVE_COL_PICTURE_SIGNALING 1190 1227 if ( !pcSlice->getIdrPicFlag() && pcSlice->getLayerId() > 0 && pcSlice->getActiveNumILRRefIdx() > 0 && pcSlice->getNumMotionPredRefLayers() > 0 ) 1191 1228 { … … 1210 1247 WRITE_UVLC( pcSlice->getColRefIdx(), "collocated_ref_idx" ); 1211 1248 } 1212 #if REF_IDX_FRAMEWORK && M0457_COL_PICTURE_SIGNALING 1249 #if REF_IDX_FRAMEWORK && M0457_COL_PICTURE_SIGNALING && !REMOVE_COL_PICTURE_SIGNALING 1213 1250 } 1214 1251 #endif … … 1726 1763 return true; 1727 1764 } 1728 1729 #if INTRA_BL1730 Void TEncCavlc::codeIntraBLFlag( TComDataCU* pcCU, UInt uiAbsPartIdx )1731 {1732 assert(0);1733 }1734 1735 #endif1736 1765 //! \} -
trunk/source/Lib/TLibEncoder/TEncCavlc.h
r313 r345 112 112 Void codeMergeFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx ); 113 113 Void codeMergeIndex ( TComDataCU* pcCU, UInt uiAbsPartIdx ); 114 #if INTRA_BL115 Void codeIntraBLFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx );116 #endif117 114 118 115 Void codeInterModeFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiEncMode ); -
trunk/source/Lib/TLibEncoder/TEncCu.cpp
r313 r345 763 763 } 764 764 } 765 #if INTRA_BL766 if(m_pcPicYuvRecBase)767 {768 xCheckRDCostIntraBL( rpcBestCU, rpcTempCU );769 rpcTempCU->initEstData( uiDepth, iQP );770 }771 #endif772 765 #if (ENCODER_FAST_MODE) 773 766 if(pcPic->getLayerId() > 0) … … 1215 1208 return; 1216 1209 } 1217 #if INTRA_BL1218 m_pcEntropyCoder->encodeIntraBLFlag( pcCU, uiAbsPartIdx );1219 if ( !pcCU->isIntraBL( uiAbsPartIdx ) )1220 {1221 #endif1222 1210 m_pcEntropyCoder->encodePredMode( pcCU, uiAbsPartIdx ); 1223 1211 … … 1238 1226 // prediction Info ( Intra : direction mode, Inter : Mv, reference idx ) 1239 1227 m_pcEntropyCoder->encodePredInfo( pcCU, uiAbsPartIdx ); 1240 #if INTRA_BL1241 }1242 #endif1243 1228 1244 1229 // Encode Coefficients … … 1568 1553 1569 1554 m_pcEntropyCoder->resetBits(); 1570 #if INTRA_BL 1571 m_pcEntropyCoder->encodeIntraBLFlag ( rpcTempCU, 0, true ); 1572 #endif 1555 1573 1556 if ( rpcTempCU->getSlice()->getPPS()->getTransquantBypassEnableFlag()) 1574 1557 { … … 1624 1607 1625 1608 m_pcEntropyCoder->resetBits(); 1626 #if INTRA_BL 1627 m_pcEntropyCoder->encodeIntraBLFlag ( rpcTempCU, 0, true ); 1628 #endif 1609 1629 1610 if ( rpcTempCU->getSlice()->getPPS()->getTransquantBypassEnableFlag()) 1630 1611 { … … 1879 1860 #endif 1880 1861 1881 #if INTRA_BL1882 Void TEncCu::xCheckRDCostIntraBL( TComDataCU*& rpcBestCU, TComDataCU*& rpcTempCU )1883 {1884 UInt uiDepth = rpcTempCU->getDepth( 0 );1885 rpcTempCU->setSkipFlagSubParts( false, 0, uiDepth );1886 rpcTempCU->setPartSizeSubParts( SIZE_2Nx2N, 0, uiDepth );1887 rpcTempCU->setPredModeSubParts( MODE_INTRA_BL, 0, uiDepth );1888 rpcTempCU->setCUTransquantBypassSubParts( m_pcEncCfg->getCUTransquantBypassFlagValue(), 0, uiDepth );1889 1890 m_pcPredSearch->setBaseRecPic( m_pcPicYuvRecBase );1891 #if NO_RESIDUAL_FLAG_FOR_BLPRED1892 rpcTempCU->setDepthSubParts( uiDepth, 0 );1893 // rpcTempCU->setLumaIntraDirSubParts( DC_IDX, 0, uiDepth );1894 // rpcTempCU->setChromIntraDirSubParts( DC_IDX, 0, uiDepth );1895 m_ppcPredYuvTemp[uiDepth]->copyFromPicLuma ( rpcTempCU->getSlice()->getFullPelBaseRec(rpcTempCU->getLayerId() - 1), rpcTempCU->getAddr(), rpcTempCU->getZorderIdxInCU(), 0, rpcTempCU->getWidth(0), rpcTempCU->getHeight(0));1896 m_ppcPredYuvTemp[uiDepth]->copyFromPicChroma( rpcTempCU->getSlice()->getFullPelBaseRec(rpcTempCU->getLayerId() - 1), rpcTempCU->getAddr(), rpcTempCU->getZorderIdxInCU(), 0, (rpcTempCU->getWidth(0)>>1), (rpcTempCU->getHeight(0)>>1), 0);1897 m_ppcPredYuvTemp[uiDepth]->copyFromPicChroma( rpcTempCU->getSlice()->getFullPelBaseRec(rpcTempCU->getLayerId() - 1), rpcTempCU->getAddr(), rpcTempCU->getZorderIdxInCU(), 0, (rpcTempCU->getWidth(0)>>1), (rpcTempCU->getHeight(0)>>1), 1);1898 m_pcPredSearch->encodeResAndCalcRdInterCU( rpcTempCU, m_ppcOrigYuv[uiDepth], m_ppcPredYuvTemp[uiDepth], m_ppcResiYuvTemp[uiDepth], m_ppcResiYuvBest[uiDepth], m_ppcRecoYuvTemp[uiDepth], false );1899 rpcTempCU->getTotalCost() = m_pcRdCost->calcRdCost( rpcTempCU->getTotalBits(), rpcTempCU->getTotalDistortion() );1900 #else1901 1902 m_pcPredSearch->estIntraBLPredQT( rpcTempCU, m_ppcOrigYuv[uiDepth], m_ppcPredYuvTemp[uiDepth], m_ppcResiYuvTemp[uiDepth], m_ppcRecoYuvTemp[uiDepth] );1903 1904 m_pcEntropyCoder->resetBits();1905 m_pcEntropyCoder->encodeIntraBLFlag ( rpcTempCU, 0, true );1906 m_pcEntropyCoder->encodeSkipFlag( rpcTempCU, 0, true );1907 if ( rpcTempCU->getSlice()->getPPS()->getTransquantBypassEnableFlag())1908 {1909 m_pcEntropyCoder->encodeCUTransquantBypassFlag( rpcTempCU, 0, true );1910 }1911 1912 // Encode Coefficients1913 Bool bCodeDQP = getdQPFlag();1914 m_pcEntropyCoder->encodeCoeff( rpcTempCU, 0, uiDepth, rpcTempCU->getWidth (0), rpcTempCU->getHeight(0), bCodeDQP );1915 setdQPFlag( bCodeDQP );1916 1917 if( m_bUseSBACRD ) m_pcRDGoOnSbacCoder->store(m_pppcRDSbacCoder[uiDepth][CI_TEMP_BEST]);1918 1919 rpcTempCU->getTotalBits() = m_pcEntropyCoder->getNumberOfWrittenBits();1920 if(m_pcEncCfg->getUseSBACRD())1921 {1922 rpcTempCU->getTotalBins() = ((TEncBinCABAC *)((TEncSbac*)m_pcEntropyCoder->m_pcEntropyCoderIf)->getEncBinIf())->getBinsCoded();1923 }1924 rpcTempCU->getTotalCost() = m_pcRdCost->calcRdCost( rpcTempCU->getTotalBits(), rpcTempCU->getTotalDistortion() );1925 #endif1926 1927 xCheckDQP( rpcTempCU );1928 xCheckBestMode(rpcBestCU, rpcTempCU, uiDepth);1929 }1930 #endif1931 1862 #if (ENCODER_FAST_MODE) 1932 1863 Void TEncCu::xCheckRDCostILRUni(TComDataCU *&rpcBestCU, TComDataCU *&rpcTempCU, UInt refLayerId) -
trunk/source/Lib/TLibEncoder/TEncCu.h
r313 r345 84 84 // Access channel 85 85 TEncCfg* m_pcEncCfg; 86 #if INTRA_BL87 TComPicYuv* m_pcPicYuvRecBase; ///< reconstructed base layer88 #endif89 86 TEncSearch* m_pcPredSearch; 90 87 TComTrQuant* m_pcTrQuant; … … 134 131 Int updateLCUDataISlice ( TComDataCU* pcCU, Int LCUIdx, Int width, Int height ); 135 132 #endif 136 #if INTRA_BL 137 Void setBaseRecPic ( TComPicYuv* p ) { m_pcPicYuvRecBase = p; } 138 #endif 133 139 134 protected: 140 135 Void finishCU ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); … … 157 152 #endif 158 153 Void xCheckRDCostIntra ( TComDataCU*& rpcBestCU, TComDataCU*& rpcTempCU, PartSize ePartSize ); 159 #if INTRA_BL160 Void xCheckRDCostIntraBL ( TComDataCU*& rpcBestCU, TComDataCU*& rpcTempCU );161 #endif162 154 #if ENCODER_FAST_MODE 163 155 Void xCheckRDCostILRUni ( TComDataCU*& rpcBestCU, TComDataCU*& rpcTempCU, UInt refLayerId); -
trunk/source/Lib/TLibEncoder/TEncEntropy.cpp
r313 r345 166 166 } 167 167 168 #if INTRA_BL169 if( pcCU->isIntraBL( uiAbsPartIdx ) )170 {171 return;172 }173 #endif174 175 168 m_pcEntropyCoderIf->codePredMode( pcCU, uiAbsPartIdx ); 176 169 } … … 251 244 } 252 245 } 253 #if INTRA_BL254 if( pcCU->isIntra(uiAbsPartIdx) && pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_NxN && uiDepth == pcCU->getDepth(uiAbsPartIdx) )255 #else256 246 257 247 if( pcCU->getPredictionMode(uiAbsPartIdx) == MODE_INTRA && pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_NxN && uiDepth == pcCU->getDepth(uiAbsPartIdx) ) 258 #endif259 248 { 260 249 assert( uiSubdiv ); … … 342 331 } 343 332 344 #if INTRA_BL345 #if NO_RESIDUAL_FLAG_FOR_BLPRED346 if( ( !pcCU->isIntra( uiAbsPartIdx ) || pcCU->isIntraBL(uiAbsPartIdx)) && uiDepth == pcCU->getDepth( uiAbsPartIdx ) && !pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_U, 0 ) && !pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_V, 0 ) )347 #else348 if( ( !pcCU->isIntra( uiAbsPartIdx ) ) && uiDepth == pcCU->getDepth( uiAbsPartIdx ) && !pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_U, 0 ) && !pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_V, 0 ) )349 #endif350 #else351 333 if( pcCU->getPredictionMode(uiAbsPartIdx) != MODE_INTRA && uiDepth == pcCU->getDepth( uiAbsPartIdx ) && !pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_U, 0 ) && !pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_V, 0 ) ) 352 #endif353 334 { 354 335 assert( pcCU->getCbf( uiAbsPartIdx, TEXT_LUMA, 0 ) ); … … 431 412 Void TEncEntropy::encodePredInfo( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD ) 432 413 { 433 #if INTRA_BL434 assert ( !pcCU->isIntraBL( uiAbsPartIdx ) );435 #endif436 414 if( bRD ) 437 415 { … … 607 585 UInt uiChromaOffset = uiLumaOffset>>2; 608 586 609 #if NO_RESIDUAL_FLAG_FOR_BLPRED610 if( pcCU->isIntra(uiAbsPartIdx) && !pcCU->isIntraBL(uiAbsPartIdx) )611 #else612 587 if( pcCU->isIntra(uiAbsPartIdx) ) 613 #endif614 588 { 615 589 DTRACE_CABAC_VL( g_nSymbolCounter++ ) … … 759 733 } 760 734 761 #if INTRA_BL762 Void TEncEntropy::encodeIntraBLFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD )763 {764 if( pcCU->getLayerId() == 0 )765 {766 return;767 }768 769 if( bRD )770 {771 uiAbsPartIdx = 0;772 }773 m_pcEntropyCoderIf->codeIntraBLFlag( pcCU, uiAbsPartIdx );774 }775 #endif776 735 //! \} -
trunk/source/Lib/TLibEncoder/TEncEntropy.h
r313 r345 85 85 virtual Void codeMergeIndex ( TComDataCU* pcCU, UInt uiAbsPartIdx ) = 0; 86 86 virtual Void codeSplitFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0; 87 88 #if INTRA_BL 89 virtual Void codeIntraBLFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx ) = 0; 90 #endif 87 91 88 virtual Void codePartSize ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0; 92 89 virtual Void codePredMode ( TComDataCU* pcCU, UInt uiAbsPartIdx ) = 0; … … 164 161 Void encodeMergeFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx ); 165 162 Void encodeMergeIndex ( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD = false ); 166 #if INTRA_BL167 Void encodeIntraBLFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD = false );168 #endif169 163 Void encodePredMode ( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD = false ); 170 164 Void encodePartSize ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, Bool bRD = false ); -
trunk/source/Lib/TLibEncoder/TEncGOP.cpp
r313 r345 511 511 #if M0457_COL_PICTURE_SIGNALING 512 512 pcSlice->setMFMEnabledFlag(false); 513 #if !REMOVE_COL_PICTURE_SIGNALING 513 514 pcSlice->setAltColIndicationFlag(false); 515 #endif 514 516 #endif 515 517 } … … 645 647 pcSlice->setNalUnitType(NAL_UNIT_CODED_SLICE_CRA); 646 648 } 647 #if ZERO_NUM_DIRECT_LAYERS 649 648 650 if( m_layerId > 0 && pcSlice->getActiveNumILRRefIdx() == 0 && pcSlice->getNalUnitType() >= NAL_UNIT_CODED_SLICE_BLA_W_LP && pcSlice->getNalUnitType() <= NAL_UNIT_CODED_SLICE_CRA ) 649 651 { 650 652 pcSlice->setSliceType(I_SLICE); 651 653 } 652 else 653 #endif 654 if( m_layerId > 0 && !m_pcEncTop->getElRapSliceTypeB() ) 654 else if( m_layerId > 0 && !m_pcEncTop->getElRapSliceTypeB() ) 655 655 { 656 656 if( (pcSlice->getNalUnitType() >= NAL_UNIT_CODED_SLICE_BLA_W_LP) && … … 760 760 761 761 #if REF_IDX_FRAMEWORK 762 #if ZERO_NUM_DIRECT_LAYERS763 762 if( m_layerId > 0 && pcSlice->getActiveNumILRRefIdx() ) 764 #else765 if(m_layerId > 0)766 #endif767 763 { 768 764 #if RESTR_CHK … … 820 816 // Set reference list 821 817 #if REF_IDX_FRAMEWORK 822 #if ZERO_NUM_DIRECT_LAYERS823 818 if(m_layerId == 0 || ( m_layerId > 0 && pcSlice->getActiveNumILRRefIdx() == 0 ) ) 824 #else825 if(m_layerId == 0)826 #endif827 819 { 828 820 pcSlice->setRefPicList( rcListPic); … … 832 824 #endif 833 825 #if REF_IDX_FRAMEWORK 834 #if ZERO_NUM_DIRECT_LAYERS835 826 if( m_layerId > 0 && pcSlice->getActiveNumILRRefIdx() ) 836 #else837 if(m_layerId > 0)838 #endif839 827 { 840 828 m_pcEncTop->setILRPic(pcPic); … … 848 836 { 849 837 pcSlice->setRefPOCListILP(m_pcEncTop->getIlpList(), pcSlice->getBaseColPic()); 850 #if M0457_COL_PICTURE_SIGNALING 838 #if M0457_COL_PICTURE_SIGNALING && !REMOVE_COL_PICTURE_SIGNALING 851 839 pcSlice->setMotionPredIlp(getMotionPredIlp(pcSlice)); 852 840 #endif … … 858 846 #if REF_IDX_MFM 859 847 #if M0457_COL_PICTURE_SIGNALING 848 #if REMOVE_COL_PICTURE_SIGNALING 849 if( pcSlice->getMFMEnabledFlag() && pcSlice->getActiveNumILRRefIdx() > 0 && m_pcEncTop->getNumMotionPredRefLayers() > 0 ) 850 #else 860 851 if( pcSlice->getMFMEnabledFlag() && !(pcSlice->getActiveNumILRRefIdx() > 0 && m_pcEncTop->getNumMotionPredRefLayers() > 0) ) 852 #endif 861 853 #else 862 854 if( pcSlice->getSPS()->getMFMEnabledFlag() ) … … 3005 2997 } 3006 2998 3007 #if M0457_COL_PICTURE_SIGNALING 2999 #if M0457_COL_PICTURE_SIGNALING && !REMOVE_COL_PICTURE_SIGNALING 3008 3000 TComPic* TEncGOP::getMotionPredIlp(TComSlice* pcSlice) 3009 3001 { -
trunk/source/Lib/TLibEncoder/TEncGOP.h
r313 r345 198 198 } 199 199 Void dblMetric( TComPic* pcPic, UInt uiNumSlices ); 200 #if M0457_COL_PICTURE_SIGNALING 200 #if M0457_COL_PICTURE_SIGNALING && !REMOVE_COL_PICTURE_SIGNALING 201 201 TComPic* getMotionPredIlp(TComSlice* pcSlice); 202 202 #endif -
trunk/source/Lib/TLibEncoder/TEncSbac.cpp
r313 r345 83 83 , m_cTransformSkipSCModel ( 1, 2, NUM_TRANSFORMSKIP_FLAG_CTX , m_contextModels + m_numContextModels, m_numContextModels) 84 84 , m_CUTransquantBypassFlagSCModel( 1, 1, NUM_CU_TRANSQUANT_BYPASS_FLAG_CTX, m_contextModels + m_numContextModels, m_numContextModels) 85 #if INTRA_BL86 , m_cIntraBLPredFlagSCModel (1, 1, NUM_INTRA_BL_PRED_CTX , m_contextModels + m_numContextModels, m_numContextModels)87 #endif88 85 { 89 86 assert( m_numContextModels <= MAX_NUM_CTX_MOD ); … … 134 131 m_cCUTransSubdivFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_TRANS_SUBDIV_FLAG ); 135 132 m_cSaoMergeSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_SAO_MERGE_FLAG ); 136 #if INTRA_BL137 m_cIntraBLPredFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_INTRA_BL_PRED_FLAG );138 #endif139 133 m_cSaoTypeIdxSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_SAO_TYPE_IDX ); 140 134 m_cTransformSkipSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_TRANSFORMSKIP_FLAG ); … … 169 163 curCost = m_cCUSplitFlagSCModel.calcCost ( curSliceType, qp, (UChar*)INIT_SPLIT_FLAG ); 170 164 curCost += m_cCUSkipFlagSCModel.calcCost ( curSliceType, qp, (UChar*)INIT_SKIP_FLAG ); 171 #if INTRA_BL172 curCost += m_cIntraBLPredFlagSCModel.calcCost ( curSliceType, qp, (UChar*)INIT_INTRA_BL_PRED_FLAG );173 #endif174 165 curCost += m_cCUMergeFlagExtSCModel.calcCost ( curSliceType, qp, (UChar*)INIT_MERGE_FLAG_EXT); 175 166 curCost += m_cCUMergeIdxExtSCModel.calcCost ( curSliceType, qp, (UChar*)INIT_MERGE_IDX_EXT); … … 243 234 m_cCUTransSubdivFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_TRANS_SUBDIV_FLAG ); 244 235 m_cSaoMergeSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_SAO_MERGE_FLAG ); 245 #if INTRA_BL246 m_cIntraBLPredFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_INTRA_BL_PRED_FLAG );247 #endif248 236 m_cSaoTypeIdxSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_SAO_TYPE_IDX ); 249 237 m_cTransformSkipSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_TRANSFORMSKIP_FLAG ); … … 428 416 { 429 417 PartSize eSize = pcCU->getPartitionSize( uiAbsPartIdx ); 430 #if INTRA_BL 431 assert( !pcCU->isIntraBL( uiAbsPartIdx ) ); 432 #endif 418 433 419 if ( pcCU->isIntra( uiAbsPartIdx ) ) 434 420 { … … 1600 1586 } 1601 1587 1602 #if INTRA_BL1603 /** code intra_bl flag1604 * \param pcCU1605 * \param uiAbsPartIdx1606 * \returns Void1607 */1608 Void TEncSbac::codeIntraBLFlag( TComDataCU* pcCU, UInt uiAbsPartIdx )1609 {1610 // get context function is here1611 UInt uiSymbol = pcCU->isIntraBL( uiAbsPartIdx ) ? 1 : 0;1612 1613 UInt uiCtxIntraBL = pcCU->getCtxIntraBLFlag( uiAbsPartIdx ) ;1614 m_pcBinIf->encodeBin(uiSymbol, m_cIntraBLPredFlagSCModel.get( 0, 0, uiCtxIntraBL ));1615 1616 DTRACE_CABAC_VL( g_nSymbolCounter++ );1617 DTRACE_CABAC_T( "\tuiSymbol: ");1618 DTRACE_CABAC_V( uiSymbol );1619 DTRACE_CABAC_T( "\n");1620 }1621 #endif1622 1588 //! \} -
trunk/source/Lib/TLibEncoder/TEncSbac.h
r313 r345 132 132 Void codeSplitFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 133 133 Void codeMVPIdx ( TComDataCU* pcCU, UInt uiAbsPartIdx, RefPicList eRefList ); 134 135 #if INTRA_BL 136 Void codeIntraBLFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx ); 137 #endif 134 138 135 Void codePartSize ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 139 136 Void codePredMode ( TComDataCU* pcCU, UInt uiAbsPartIdx ); … … 206 203 ContextModel3DBuffer m_cTransformSkipSCModel; 207 204 ContextModel3DBuffer m_CUTransquantBypassFlagSCModel; 208 #if INTRA_BL209 ContextModel3DBuffer m_cIntraBLPredFlagSCModel;210 #endif211 205 }; 212 206 -
trunk/source/Lib/TLibEncoder/TEncSearch.cpp
r313 r345 906 906 m_pcEntropyCoder->encodePredMode( pcCU, 0, true ); 907 907 } 908 #if INTRA_BL 909 m_pcEntropyCoder->encodeIntraBLFlag ( pcCU, 0, true ); 910 if( pcCU->isIntraBL( 0 ) ) 911 { 912 return; 913 } 914 #endif 908 915 909 m_pcEntropyCoder ->encodePartSize( pcCU, 0, pcCU->getDepth(0), true ); 916 910 … … 950 944 } 951 945 } 952 #if INTRA_BL 953 if( pcCU->isIntraBL( 0 ) ) 954 { 955 return; 956 } 957 #endif 946 958 947 if( bChroma ) 959 948 { … … 1055 1044 pcCU->getPattern()->initAdiPattern( pcCU, uiAbsPartIdx, uiTrDepth, m_piYuvExt, m_iYuvExtStride, m_iYuvExtHeight, bAboveAvail, bLeftAvail ); 1056 1045 //===== get prediction signal ===== 1057 #if INTRA_BL && !NO_RESIDUAL_FLAG_FOR_BLPRED1058 if(pcCU->isIntraBL ( uiAbsPartIdx ) )1059 {1060 pcCU->getBaseLumaBlk( uiWidth, uiHeight, uiAbsPartIdx, piPred, uiStride );1061 }1062 else1063 #endif1064 1046 predIntraLumaAng( pcCU->getPattern(), uiLumaPredMode, piPred, uiStride, uiWidth, uiHeight, bAboveAvail, bLeftAvail ); 1065 1047 // save prediction … … 1247 1229 1248 1230 //===== get prediction signal ===== 1249 #if INTRA_BL && !NO_RESIDUAL_FLAG_FOR_BLPRED 1250 if(pcCU->isIntraBL ( uiAbsPartIdx ) ) 1251 { 1252 pcCU->getBaseChromaBlk( uiWidth, uiHeight, uiAbsPartIdx, piPred, uiStride, uiChromaId ); 1253 } 1254 else 1255 #endif 1256 { 1257 predIntraChromaAng( pPatChroma, uiChromaPredMode, piPred, uiStride, uiWidth, uiHeight, bAboveAvail, bLeftAvail ); 1258 } 1231 predIntraChromaAng( pPatChroma, uiChromaPredMode, piPred, uiStride, uiWidth, uiHeight, bAboveAvail, bLeftAvail ); 1232 1259 1233 // save prediction 1260 1234 if( default0Save1Load2 == 1 ) … … 4567 4541 Void TEncSearch::encodeResAndCalcRdInterCU( TComDataCU* pcCU, TComYuv* pcYuvOrg, TComYuv* pcYuvPred, TComYuv*& rpcYuvResi, TComYuv*& rpcYuvResiBest, TComYuv*& rpcYuvRec, Bool bSkipRes ) 4568 4542 { 4569 #if NO_RESIDUAL_FLAG_FOR_BLPRED4570 if ( pcCU->isIntra(0) && !pcCU->isIntraBL(0))4571 #else4572 4543 if ( pcCU->isIntra(0) ) 4573 #endif4574 4544 { 4575 4545 return; … … 4682 4652 pcCU->setTransformSkipSubParts ( 0, 0, 0, 0, pcCU->getDepth(0) ); 4683 4653 } 4684 #if NO_RESIDUAL_FLAG_FOR_BLPRED4685 else if(pcCU->getLayerId() > 0 && pcCU->isIntraBL(0) && uiZeroDistortion == uiDistortion) // all zeros4686 {4687 const UInt uiQPartNum = pcCU->getPic()->getNumPartInCU() >> (pcCU->getDepth(0) << 1);4688 ::memset( pcCU->getTransformIdx() , 0, uiQPartNum * sizeof(UChar) );4689 ::memset( pcCU->getCbf( TEXT_LUMA ) , 0, uiQPartNum * sizeof(UChar) );4690 ::memset( pcCU->getCbf( TEXT_CHROMA_U ), 0, uiQPartNum * sizeof(UChar) );4691 ::memset( pcCU->getCbf( TEXT_CHROMA_V ), 0, uiQPartNum * sizeof(UChar) );4692 ::memset( pcCU->getCoeffY() , 0, uiWidth * uiHeight * sizeof( TCoeff ) );4693 ::memset( pcCU->getCoeffCb() , 0, uiWidth * uiHeight * sizeof( TCoeff ) >> 2 );4694 ::memset( pcCU->getCoeffCr() , 0, uiWidth * uiHeight * sizeof( TCoeff ) >> 2 );4695 pcCU->setTransformSkipSubParts ( 0, 0, 0, 0, pcCU->getDepth(0) );4696 }4697 #endif4698 4654 else 4699 4655 { … … 4994 4950 Int scalingListType = 3 + g_eTTable[(Int)TEXT_LUMA]; 4995 4951 assert(scalingListType < 6); 4996 #if NO_RESIDUAL_FLAG_FOR_BLPRED4997 if(pcCU->isIntraBL(uiAbsPartIdx) )4998 {4999 m_pcTrQuant->invtransformNxN( pcCU->getCUTransquantBypass(uiAbsPartIdx), TEXT_LUMA,DC_IDX, pcResiCurrY, m_pcQTTempTComYuv[uiQTTempAccessLayer].getStride(), pcCoeffCurrY, trWidth, trHeight, scalingListType );//this is for inter mode only5000 }5001 else5002 {5003 m_pcTrQuant->invtransformNxN( pcCU->getCUTransquantBypass(uiAbsPartIdx), TEXT_LUMA,REG_DCT, pcResiCurrY, m_pcQTTempTComYuv[uiQTTempAccessLayer].getStride(), pcCoeffCurrY, trWidth, trHeight, scalingListType );//this is for inter mode only5004 }5005 #else5006 4952 m_pcTrQuant->invtransformNxN( pcCU->getCUTransquantBypass(uiAbsPartIdx), TEXT_LUMA,REG_DCT, pcResiCurrY, m_pcQTTempTComYuv[uiQTTempAccessLayer].getStride(), pcCoeffCurrY, trWidth, trHeight, scalingListType );//this is for inter mode only 5007 #endif5008 5009 4953 const UInt uiNonzeroDistY = m_pcRdCost->getDistPart(g_bitDepthY, m_pcQTTempTComYuv[uiQTTempAccessLayer].getLumaAddr( absTUPartIdx ), m_pcQTTempTComYuv[uiQTTempAccessLayer].getStride(), 5010 4954 pcResi->getLumaAddr( absTUPartIdx ), pcResi->getStride(), trWidth,trHeight ); … … 5275 5219 assert(scalingListType < 6); 5276 5220 5277 #if NO_RESIDUAL_FLAG_FOR_BLPRED5278 if(pcCU->isIntraBL(uiAbsPartIdx) )5279 {5280 m_pcTrQuant->invtransformNxN( pcCU->getCUTransquantBypass(uiAbsPartIdx), TEXT_LUMA,DC_IDX, pcResiCurrY, m_pcQTTempTComYuv[uiQTTempAccessLayer].getStride(), pcCoeffCurrY, trWidth, trHeight, scalingListType, true );5281 }5282 else5283 {5284 m_pcTrQuant->invtransformNxN( pcCU->getCUTransquantBypass(uiAbsPartIdx), TEXT_LUMA,REG_DCT, pcResiCurrY, m_pcQTTempTComYuv[uiQTTempAccessLayer].getStride(), pcCoeffCurrY, trWidth, trHeight, scalingListType, true );5285 }5286 #else5287 5221 m_pcTrQuant->invtransformNxN( pcCU->getCUTransquantBypass(uiAbsPartIdx), TEXT_LUMA,REG_DCT, pcResiCurrY, m_pcQTTempTComYuv[uiQTTempAccessLayer].getStride(), pcCoeffCurrY, trWidth, trHeight, scalingListType, true ); 5288 #endif5289 5222 5290 5223 uiNonzeroDistY = m_pcRdCost->getDistPart(g_bitDepthY, m_pcQTTempTComYuv[uiQTTempAccessLayer].getLumaAddr( absTUPartIdx ), m_pcQTTempTComYuv[uiQTTempAccessLayer].getStride(), … … 5617 5550 5618 5551 { 5619 #if INTRA_BL5620 #if NO_RESIDUAL_FLAG_FOR_BLPRED5621 assert( !pcCU->isIntra(uiAbsPartIdx) || pcCU->isIntraBL(uiAbsPartIdx));5622 #else5623 assert( !pcCU->isIntra(uiAbsPartIdx) );5624 #endif5625 #else5626 5552 assert( pcCU->getPredictionMode(uiAbsPartIdx) != MODE_INTRA ); 5627 #endif5628 5553 if( bSubdivAndCbf ) 5629 5554 { … … 5859 5784 } 5860 5785 m_pcEntropyCoder->encodeSkipFlag ( pcCU, 0, true ); 5861 #if INTRA_BL5862 if(m_pcEncCfg->getLayerId())5863 {5864 m_pcEntropyCoder->encodeIntraBLFlag(pcCU, 0, true);5865 #if !NO_RESIDUAL_FLAG_FOR_BLPRED5866 assert( pcCU->isIntraBL( 0 ) == false );5867 #endif5868 }5869 #endif5870 #if NO_RESIDUAL_FLAG_FOR_BLPRED5871 if( !pcCU->isIntraBL(0))5872 {5873 #endif5874 5786 m_pcEntropyCoder->encodePredMode( pcCU, 0, true ); 5875 5787 m_pcEntropyCoder->encodePartSize( pcCU, 0, pcCU->getDepth(0), true ); 5876 5788 m_pcEntropyCoder->encodePredInfo( pcCU, 0, true ); 5877 #if NO_RESIDUAL_FLAG_FOR_BLPRED 5878 } 5879 #endif 5789 5880 5790 Bool bDummy = false; 5881 5791 m_pcEntropyCoder->encodeCoeff ( pcCU, 0, pcCU->getDepth(0), pcCU->getWidth(0), pcCU->getHeight(0), bDummy ); … … 6295 6205 #endif 6296 6206 6297 #if INTRA_BL6298 Void6299 TEncSearch::estIntraBLPredQT( TComDataCU* pcCU,6300 TComYuv* pcOrgYuv,6301 TComYuv* pcPredYuv,6302 TComYuv* pcResiYuv,6303 TComYuv* pcRecoYuv )6304 {6305 UInt uiDepth = pcCU->getDepth(0);6306 UInt uiOverallDistY = 0;6307 UInt uiOverallDistC = 0;6308 6309 //===== set QP and clear Cbf =====6310 if ( pcCU->getSlice()->getPPS()->getUseDQP() == true)6311 {6312 pcCU->setQPSubParts( pcCU->getQP(0), 0, uiDepth );6313 }6314 else6315 {6316 pcCU->setQPSubParts( pcCU->getSlice()->getSliceQp(), 0, uiDepth );6317 }6318 6319 //===== init pattern for luma prediction =====6320 Bool bAboveAvail = false;6321 Bool bLeftAvail = false;6322 pcCU->getPattern()->initPattern ( pcCU, 0, 0 );6323 pcCU->getPattern()->initAdiPattern( pcCU, 0, 0, m_piYuvExt, m_iYuvExtStride, m_iYuvExtHeight, bAboveAvail, bLeftAvail );6324 6325 pcCU->setLumaIntraDirSubParts ( DC_IDX, 0, uiDepth );6326 6327 // set context models6328 if( m_bUseSBACRD )6329 {6330 m_pcRDGoOnSbacCoder->load( m_pppcRDSbacCoder[uiDepth][CI_CURR_BEST] );6331 }6332 6333 // determine residual for partition6334 Double dPUCost = 0.0;6335 xRecurIntraCodingQT( pcCU, 0, 0, false, pcOrgYuv, pcPredYuv, pcResiYuv, uiOverallDistY, uiOverallDistC, false, dPUCost );6336 xSetIntraResultQT( pcCU, 0, 0, false, pcRecoYuv );6337 6338 //=== update PU data ====6339 pcCU->copyToPic( uiDepth, 0, 0 );6340 6341 //===== reset context models =====6342 if(m_bUseSBACRD)6343 {6344 m_pcRDGoOnSbacCoder->load(m_pppcRDSbacCoder[uiDepth][CI_CURR_BEST]);6345 }6346 6347 //===== set distortion (rate and r-d costs are determined later) =====6348 pcCU->getTotalDistortion() = uiOverallDistY + uiOverallDistC;6349 }6350 6351 #endif6352 6207 //! \} -
trunk/source/Lib/TLibEncoder/TEncSearch.h
r313 r345 99 99 #if SVC_EXTENSION 100 100 TEncTop** m_ppcTEncTop; 101 #if INTRA_BL102 TComPicYuv* m_pcPicYuvRecBase; ///< reconstructed base layer103 #endif104 101 #endif 105 102 … … 192 189 TComYuv* pcRecoYuv, 193 190 UInt uiPreCalcDistC ); 194 195 #if INTRA_BL196 Void setBaseRecPic ( TComPicYuv* pcPicYuvRecBase ) { m_pcPicYuvRecBase = pcPicYuvRecBase; }197 TComPicYuv* getBaseRecPic () { return m_pcPicYuvRecBase; }198 Void estIntraBLPredQT ( TComDataCU* pcCU,199 TComYuv* pcOrgYuv,200 TComYuv* pcPredYuv,201 TComYuv* pcResiYuv,202 TComYuv* pcRecoYuv );203 #endif204 191 205 192 /// encoder estimation - inter prediction (non-skip) -
trunk/source/Lib/TLibEncoder/TEncSlice.cpp
r314 r345 345 345 346 346 #if JCTVC_M0259_LAMBDAREFINEMENT 347 if( rpcSlice->getLayerId() > 0 && rpcSlice->getActiveNumILRRefIdx() && depth >= 3 && m_pcCfg->getGOPSize() == ( 1 << depth ) )347 if( rpcSlice->getLayerId() > 0 && m_ppcTEncTop[layerId]->getNumActiveRefLayers() && depth >= 3 && m_pcCfg->getGOPSize() == ( 1 << depth ) ) 348 348 { 349 349 Int nCurLayer = rpcSlice->getLayerId(); … … 373 373 weight = pow( 2.0, (iQP-g_aucChromaScale[qpc])/3.0 ); // takes into account of the chroma qp mapping and chroma qp Offset 374 374 #if JCTVC_M0259_LAMBDAREFINEMENT 375 if( rpcSlice->getLayerId() > 0 && rpcSlice->getActiveNumILRRefIdx() && m_pcCfg->getGOPSize() >= 8 && rpcSlice->isIntra() == false && depth == 0 )375 if( rpcSlice->getLayerId() > 0 && m_ppcTEncTop[layerId]->getNumActiveRefLayers() && m_pcCfg->getGOPSize() >= 8 && rpcSlice->isIntra() == false && depth == 0 ) 376 376 { 377 377 dLambda *= 1.1; … … 503 503 #if M0457_COL_PICTURE_SIGNALING 504 504 rpcSlice->setMFMEnabledFlag(m_ppcTEncTop[layerId]->getMFMEnabledFlag()); 505 #if !REMOVE_COL_PICTURE_SIGNALING 505 506 rpcSlice->setAltColIndicationFlag(rpcSlice->getMFMEnabledFlag()); 507 #endif 506 508 #endif 507 509 } … … 979 981 UInt uiTileStartLCU = 0; 980 982 UInt uiTileLCUX = 0; 981 982 #if INTRA_BL983 m_pcCuEncoder->setBaseRecPic( rpcPic->getLayerId() > 0 ? rpcPic->getFullPelBaseRec(rpcPic->getLayerId()-1) : NULL);984 #endif985 983 986 984 Bool depSliceSegmentsEnabled = pcSlice->getPPS()->getDependentSliceSegmentsEnabledFlag(); -
trunk/source/Lib/TLibEncoder/TEncTop.cpp
r313 r345 886 886 for( Int i = 0; i < getGOPSize()+m_extraRPSs; i++) 887 887 { 888 #if FINAL_RPL_CHANGE_N0082 889 GOPEntry ge = m_ppcTEncTop[m_cSPS.getLayerId()]->getGOPEntry(i); 890 #else 888 891 GOPEntry ge = getGOPEntry(i); 892 #endif 889 893 rps = rpsList->getReferencePictureSet(i); 890 894 rps->setNumberOfPictures(ge.m_numRefPics); … … 1204 1208 if( m_ppcTEncTop[m_layerId]->getNumDirectRefLayers() <= 0 ) 1205 1209 { 1206 #if ZERO_NUM_DIRECT_LAYERS1207 1210 return (TEncTop *)getLayerEnc( 0 ); 1208 #else1209 return NULL;1210 #endif1211 1211 } 1212 1212
Note: See TracChangeset for help on using the changeset viewer.