Changeset 345 in SHVCSoftware for trunk


Ignore:
Timestamp:
17 Aug 2013, 06:27:19 (11 years ago)
Author:
seregin
Message:

merge SHM-3.0-dev branch

Location:
trunk
Files:
52 edited
3 copied

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/build/HM_vc10.sln

    r125 r345  
    1515EndProject
    1616Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TLibVideoIO", "vc10\TLibVideoIO_vc10.vcxproj", "{5280C25A-D316-4BE7-AE50-29D72108624F}"
     17EndProject
     18Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TAppDownConvert", "vc10\TAppDownConvert\TAppDownConvert.vcxproj", "{FB952E1B-681F-4461-9C8B-4F1F8B70E58B}"
    1719EndProject
    1820Global
     
    8082                {5280C25A-D316-4BE7-AE50-29D72108624F}.Release|x64.ActiveCfg = Release|x64
    8183                {5280C25A-D316-4BE7-AE50-29D72108624F}.Release|x64.Build.0 = Release|x64
     84                {FB952E1B-681F-4461-9C8B-4F1F8B70E58B}.Debug|Win32.ActiveCfg = Debug|Win32
     85                {FB952E1B-681F-4461-9C8B-4F1F8B70E58B}.Debug|Win32.Build.0 = Debug|Win32
     86                {FB952E1B-681F-4461-9C8B-4F1F8B70E58B}.Debug|x64.ActiveCfg = Debug|x64
     87                {FB952E1B-681F-4461-9C8B-4F1F8B70E58B}.Debug|x64.Build.0 = Debug|x64
     88                {FB952E1B-681F-4461-9C8B-4F1F8B70E58B}.Release|Win32.ActiveCfg = Release|Win32
     89                {FB952E1B-681F-4461-9C8B-4F1F8B70E58B}.Release|Win32.Build.0 = Release|Win32
     90                {FB952E1B-681F-4461-9C8B-4F1F8B70E58B}.Release|x64.ActiveCfg = Release|x64
     91                {FB952E1B-681F-4461-9C8B-4F1F8B70E58B}.Release|x64.Build.0 = Release|x64
    8292        EndGlobalSection
    8393        GlobalSection(SolutionProperties) = preSolution
  • trunk/build/linux/makefile

    r125 r345  
    1212        $(MAKE) -C app/TAppDecoder      MM32=$(M32)
    1313        $(MAKE) -C app/TAppEncoder      MM32=$(M32)
     14        $(MAKE) -C app/TAppDownConvert  MM32=$(M32)     
    1415        $(MAKE) -C utils/annexBbytecount       MM32=$(M32)
    1516        $(MAKE) -C utils/convert_NtoMbit_YCbCr MM32=$(M32)
     
    2324        $(MAKE) -C app/TAppDecoder      debug MM32=$(M32)
    2425        $(MAKE) -C app/TAppEncoder      debug MM32=$(M32)
     26        $(MAKE) -C app/TAppDownConvert  debug MM32=$(M32)
    2527        $(MAKE) -C utils/annexBbytecount       debug MM32=$(M32)
    2628        $(MAKE) -C utils/convert_NtoMbit_YCbCr debug MM32=$(M32)
     
    3436        $(MAKE) -C app/TAppDecoder      release MM32=$(M32)
    3537        $(MAKE) -C app/TAppEncoder      release MM32=$(M32)
     38        $(MAKE) -C app/DownConvert      release MM32=$(M32)
    3639        $(MAKE) -C utils/annexBbytecount       release MM32=$(M32)
    3740        $(MAKE) -C utils/convert_NtoMbit_YCbCr release MM32=$(M32)
     
    4548        $(MAKE) -C app/TAppDecoder      clean MM32=$(M32)
    4649        $(MAKE) -C app/TAppEncoder      clean MM32=$(M32)
     50        $(MAKE) -C app/TAppDownConvert  clean MM32=$(M32)
    4751        $(MAKE) -C utils/annexBbytecount       clean MM32=$(M32)
    4852        $(MAKE) -C utils/convert_NtoMbit_YCbCr clean MM32=$(M32)
  • trunk/cfg

  • trunk/cfg/encoder_randomaccess_he10.cfg

    r310 r345  
    2727Frame7:  B    5   4        0.68     0           2                4         -1 -5  1 3             1       1        5         1 0 1 1 1 
    2828Frame8:  B    7   4        0.68     0           2                4         -1 -3 -7 1             1      -2        5         1 1 1 1 0
     29
     30FrameEL1:  B    8   1        0.442    0           4                4         -8 -10 -12 -16         0
     31FrameEL2:  B    4   2        0.3536   0           2                3         -4 -6  4               1       4        5         1 1 0 0 1
     32FrameEL3:  B    2   3        0.3536   0           2                4         -2 -4  2 6             1       2        4         1 1 1 1
     33FrameEL4:  B    1   4        0.68     0           2                4         -1  1  3 7             1       1        5         1 0 1 1 1
     34FrameEL5:  B    3   4        0.68     0           2                4         -1 -3  1 5             1      -2        5         1 1 1 1 0
     35FrameEL6:  B    6   3        0.3536   0           2                4         -2 -4 -6 2             0
     36FrameEL7:  B    5   4        0.68     0           2                4         -1 -5  1 3             0
     37FrameEL8:  B    7   4        0.68     0           2                4         -1 -3 -7 1             0
     38
    2939ListCombination               : 1           # Use combined list for uni-prediction in B-slices
    3040
  • trunk/cfg/encoder_randomaccess_main.cfg

    r310 r345  
    3232Frame8:  B    7   4        0.68     0            0              0           2                4         -1 -3 -7 1             1      -2        5         1 1 1 1 0
    3333
     34FrameEL1:  B    8   1        0.442    0            0              0           4                4         -8 -10 -12 -16         0
     35FrameEL2:  B    4   2        0.3536   0            0              0           2                3         -4 -6  4               1       4        5         1 1 0 0 1
     36FrameEL3:  B    2   3        0.3536   0            0              0           2                4         -2 -4  2 6             1       2        4         1 1 1 1
     37FrameEL4:  B    1   4        0.68     0            0              0           2                4         -1  1  3 7             1       1        5         1 0 1 1 1
     38FrameEL5:  B    3   4        0.68     0            0              0           2                4         -1 -3  1 5             1      -2        5         1 1 1 1 0
     39FrameEL6:  B    6   3        0.3536   0            0              0           2                4         -2 -4 -6 2             0
     40FrameEL7:  B    5   4        0.68     0            0              0           2                4         -1 -5  1 3             0
     41FrameEL8:  B    7   4        0.68     0            0              0           2                4         -1 -3 -7 1             0
    3442#=========== Motion Search =============
    3543FastSearch                    : 1           # 0:Full search  1:TZ search
  • trunk/cfg/encoder_randomaccess_main10.cfg

    r310 r345  
    3232Frame8:  B    7   4        0.68     0            0              0           2                4         -1 -3 -7 1             1      -2        5         1 1 1 1 0
    3333
     34FrameEL1:  B    8   1        0.442    0            0              0           4                4         -8 -10 -12 -16         0
     35FrameEL2:  B    4   2        0.3536   0            0              0           2                3         -4 -6  4               1       4        5         1 1 0 0 1
     36FrameEL3:  B    2   3        0.3536   0            0              0           2                4         -2 -4  2 6             1       2        4         1 1 1 1
     37FrameEL4:  B    1   4        0.68     0            0              0           2                4         -1  1  3 7             1       1        5         1 0 1 1 1
     38FrameEL5:  B    3   4        0.68     0            0              0           2                4         -1 -3  1 5             1      -2        5         1 1 1 1 0
     39FrameEL6:  B    6   3        0.3536   0            0              0           2                4         -2 -4 -6 2             0
     40FrameEL7:  B    5   4        0.68     0            0              0           2                4         -1 -5  1 3             0
     41FrameEL8:  B    7   4        0.68     0            0              0           2                4         -1 -3 -7 1             0
    3442#=========== Motion Search =============
    3543FastSearch                    : 1           # 0:Full search  1:TZ search
  • trunk/source

  • trunk/source/App/TAppEncoder/TAppEncCfg.cpp

    r313 r345  
    817817    opts.addOptions()(cOSS.str(), m_GOPList[i-1], GOPEntry());
    818818  }
     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
    819826  po::setDefaults(opts);
    820827  const list<const Char*>& argv_unhandled = po::scanArgv(opts, argc, (const Char**) argv);
     
    14601467#endif
    14611468 
     1469#if !FINAL_RPL_CHANGE_N0082
    14621470  Bool verifiedGOP=false;
     1471#endif
    14631472  Bool errorGOP=false;
     1473#if !FINAL_RPL_CHANGE_N0082
    14641474  Int checkGOP=1;
    14651475  Int numRefs = 1;
     1476#endif
    14661477  Int refList[MAX_NUM_REF_PICS+1];
    14671478  refList[0]=0;
     
    14711482    isOK[i]=false;
    14721483  }
     1484#if !FINAL_RPL_CHANGE_N0082
    14731485  Int numOK=0;
     1486#endif
    14741487#if !SVC_EXTENSION
    14751488  xConfirmPara( m_iIntraPeriod >=0&&(m_iIntraPeriod%m_iGOPSize!=0), "Intra period must be a multiple of GOPSize, or -1" );
     
    15141527  }
    15151528#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
    15171548  m_extraRPSs=0;
    15181549  //start looping through frames in coding order until we can verify that the GOP structure is correct.
     
    17101741  }
    17111742  xConfirmPara(errorGOP,"Invalid GOP structure given");
     1743#endif
    17121744  m_maxTempLayer = 1;
    17131745  for(Int i=0; i<m_iGOPSize; i++)
     
    17301762      m_maxDecPicBuffering[m_GOPList[i].m_temporalId] = m_GOPList[i].m_numRefPics + 1;
    17311763    }
    1732 
    1733 #if SVC_EXTENSION
    1734     m_maxDecPicBuffering[m_GOPList[i].m_temporalId] += 1; // it should be updated if more than 1 resampling picture is used
    1735 #endif
    17361764
    17371765    Int highestDecodingNumberWithLowerPOC = 0;
     
    21872215  printf("ENCODER_FAST_MODE: %d ", ENCODER_FAST_MODE);
    21882216  printf("REF_IDX_MFM: %d ", REF_IDX_MFM);
    2189 #elif INTRA_BL
    2190   printf("INTRA_BL:%d ", INTRA_BL);
    2191 #if !AVC_BASE
    2192   printf("SVC_MVP:%d ", SVC_MVP );
    2193   printf("SVC_BL_CAND_INTRA:%d", SVC_BL_CAND_INTRA );
    2194 #endif
    21952217#endif
    21962218#else
     
    22452267}
    22462268#endif
     2269
     2270#if FINAL_RPL_CHANGE_N0082
     2271Bool  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
    22472484//! \}
  • trunk/source/App/TAppEncoder/TAppEncCfg.h

    r313 r345  
    348348  Void  xPrintParameter ();                                   ///< print configuration values
    349349  Void  xPrintUsage     ();                                   ///< print usage
     350#if FINAL_RPL_CHANGE_N0082
     351  Bool  xconfirmExtraGOP (GOPEntry * ge);
     352#endif
    350353#if M0040_ADAPTIVE_RESOLUTION_CHANGE
    351354  Int       m_adaptiveResolutionChange;                       ///< Indicate adaptive resolution change frame
  • trunk/source/App/TAppEncoder/TAppEncLayerCfg.h

    r313 r345  
    8181  Int       m_scaledRefLayerBottomOffset[MAX_LAYERS];
    8282#endif 
     83#if FINAL_RPL_CHANGE_N0082
     84  GOPEntry  m_GOPListLayer[MAX_GOP];                            ///< for layer
     85#endif
    8386public:
    8487  TAppEncLayerCfg();
     
    141144  Bool    getRCForceIntraQP()         {return m_RCForceIntraQP;        }
    142145#endif
     146#if FINAL_RPL_CHANGE_N0082
     147  GOPEntry getGOPEntry(Int i )        {return m_GOPListLayer[i];  }
     148#endif
    143149}; // END CLASS DEFINITION TAppEncLayerCfg
    144150
  • trunk/source/App/TAppEncoder/TAppEncTop.cpp

    r313 r345  
    136136    m_acTEncTop[layer].setDecodingRefreshType          ( m_iDecodingRefreshType );
    137137    m_acTEncTop[layer].setGOPSize                      ( m_iGOPSize );
     138#if FINAL_RPL_CHANGE_N0082
     139    m_acTEncTop[layer].setGopList                      ( m_acLayerCfg[layer].m_GOPListLayer );
     140#else
    138141    m_acTEncTop[layer].setGopList                      ( m_GOPList );
     142#endif
    139143    m_acTEncTop[layer].setExtraRPSs                    ( m_extraRPSs );
    140144    for(Int i = 0; i < MAX_TLAYER; i++)
     
    884888  }
    885889#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
    886910#if VPS_EXTN_PROFILE_INFO
    887911  vps->getPTLForExtnPtr()->resize(vps->getNumLayerSets());
  • trunk/source/Lib/TLibCommon/CommonDef.h

    r313 r345  
    5757
    5858#if SVC_EXTENSION
    59 #define NV_VERSION        "trunk"                 ///< Current software version
     59#define NV_VERSION        "3.0"                 ///< Current software version
    6060#else
    6161#define NV_VERSION        "11.0"                ///< Current software version
  • trunk/source/Lib/TLibCommon/ContextTables.h

    r313 r345  
    9292#define NUM_SAO_MERGE_FLAG_CTX        1       ///< number of context models for SAO merge flags
    9393#define NUM_SAO_TYPE_IDX_CTX          1       ///< number of context models for SAO type index
    94 #if INTRA_BL
    95 #define NUM_INTRA_BL_PRED_CTX         3
    96 #endif
    9794
    9895#define NUM_TRANSFORMSKIP_FLAG_CTX    1       ///< number of context models for transform skipping
     
    330327};
    331328
    332 #if INTRA_BL
    333 static const UChar
    334 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 #endif
    341329static const UChar
    342330INIT_TRANSFORMSKIP_FLAG[3][2*NUM_TRANSFORMSKIP_FLAG_CTX] =
  • trunk/source/Lib/TLibCommon/TComDataCU.cpp

    r313 r345  
    16431643  pcTempCU = getPULeft( uiTempPartIdx, m_uiAbsIdxInLCU + uiAbsPartIdx );
    16441644 
    1645 #if INTRA_BL
    1646   iLeftIntraDir  = pcTempCU ? ( pcTempCU->isIntra( uiTempPartIdx ) && ( !pcTempCU->isIntraBL( uiTempPartIdx ) ) ? pcTempCU->getLumaIntraDir( uiTempPartIdx ) : DC_IDX ) : DC_IDX;
    1647 #else
    16481645  iLeftIntraDir  = pcTempCU ? ( pcTempCU->isIntra( uiTempPartIdx ) ? pcTempCU->getLumaIntraDir( uiTempPartIdx ) : DC_IDX ) : DC_IDX;
    1649 #endif
    16501646 
    16511647  // Get intra direction of above PU
    16521648  pcTempCU = getPUAbove( uiTempPartIdx, m_uiAbsIdxInLCU + uiAbsPartIdx, true, true );
    16531649 
    1654 #if INTRA_BL
    1655   iAboveIntraDir = pcTempCU ? ( pcTempCU->isIntra( uiTempPartIdx ) && ( !pcTempCU->isIntraBL( uiTempPartIdx ) ) ? pcTempCU->getLumaIntraDir( uiTempPartIdx ) : DC_IDX ) : DC_IDX;
    1656 #else
    16571650  iAboveIntraDir = pcTempCU ? ( pcTempCU->isIntra( uiTempPartIdx ) ? pcTempCU->getLumaIntraDir( uiTempPartIdx ) : DC_IDX ) : DC_IDX;
    1658 #endif
    1659  
    1660 #if SVC_BL_CAND_INTRA
    1661   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       else
    1682       {
    1683         iAboveIntraDir = (iColBaseDir == iLeftIntraDir) ? iAboveIntraDir : iLeftIntraDir;
    1684         iLeftIntraDir  = iColBaseDir;
    1685       }
    1686     }
    1687   }
    1688 #endif
    16891651 
    16901652  uiPredNum = 3;
     
    18281790  UInt log2CbSize = g_aucConvertToBit[getWidth( absPartIdx )] + 2;
    18291791  PartSize  partSize  = getPartitionSize( absPartIdx );
    1830 #if INTRA_BL
    1831   UInt quadtreeTUMaxDepth = isIntra( absPartIdx ) ? m_pcSlice->getSPS()->getQuadtreeTUMaxDepthIntra() : m_pcSlice->getSPS()->getQuadtreeTUMaxDepthInter();
    1832 #else
    18331792  UInt quadtreeTUMaxDepth = getPredictionMode( absPartIdx ) == MODE_INTRA ? m_pcSlice->getSPS()->getQuadtreeTUMaxDepthIntra() : m_pcSlice->getSPS()->getQuadtreeTUMaxDepthInter();
    1834 #endif
    18351793  Int intraSplitFlag = ( getPredictionMode( absPartIdx ) == MODE_INTRA && partSize == SIZE_NxN ) ? 1 : 0;
    18361794  Int interSplitFlag = ((quadtreeTUMaxDepth == 1) && (getPredictionMode( absPartIdx ) == MODE_INTER) && (partSize != SIZE_2Nx2N) );
     
    18541812  return log2MinTUSizeInCU;
    18551813}
    1856 
    1857 #if INTRA_BL
    1858 UInt TComDataCU::getCtxIntraBLFlag( UInt uiAbsPartIdx )
    1859 {
    1860 #if INTRA_BL_CTX_CHANGE
    1861   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 #else
    1866   TComDataCU* pcTempCU;
    1867   UInt        uiTempPartIdx;
    1868   UInt        uiCtx = 0;
    1869  
    1870   // Get BCBP of left PU
    1871 #if DEPENDENT_SLICES
    1872   Bool bDepSliceRestriction = ( !m_pcSlice->getPPS()->getDependentSliceEnabledFlag());
    1873   pcTempCU = getPULeft( uiTempPartIdx, m_uiAbsIdxInLCU + uiAbsPartIdx, true, bDepSliceRestriction );
    1874 #else
    1875   pcTempCU = getPULeft( uiTempPartIdx, m_uiAbsIdxInLCU + uiAbsPartIdx );
    1876 #endif 
    1877   uiCtx    = ( pcTempCU ) ? pcTempCU->isIntraBL( uiTempPartIdx ) : 0;
    1878  
    1879   // Get BCBP of above PU
    1880 #if DEPENDENT_SLICES
    1881   pcTempCU = getPUAbove( uiTempPartIdx, m_uiAbsIdxInLCU + uiAbsPartIdx, true, bDepSliceRestriction );
    1882 #else
    1883   pcTempCU = getPUAbove( uiTempPartIdx, m_uiAbsIdxInLCU + uiAbsPartIdx );
    1884 #endif 
    1885   uiCtx   += ( pcTempCU ) ? pcTempCU->isIntraBL( uiTempPartIdx ) : 0;
    1886  
    1887   return uiCtx;
    1888 #endif
    1889 }
    1890 #endif
    18911814
    18921815#if REF_IDX_ME_ZEROMV
     
    25862509  deriveLeftRightTopIdxGeneral( uiAbsPartIdx, uiPUIdx, uiPartIdxLT, uiPartIdxRT );
    25872510  deriveLeftBottomIdxGeneral  ( uiAbsPartIdx, uiPUIdx, uiPartIdxLB );
    2588 #if SVC_MVP
    2589   // BL collocated
    2590   TComDataCU *pcColCU = NULL;
    2591   UInt uiCUAddrBase = 0, uiAbsPartAddrBase = 0;
    2592 #if AVC_BASE
    2593   if( !this->getSlice()->getVPS()->getAvcBaseLayerFlag() || AVC_SYNTAX )
    2594 #endif
    2595   {
    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_BL
    2602       if( pcColCU && pcColCU->isIntraBL( uiAbsPartAddrBase ) )
    2603       {
    2604         pcColCU = NULL;
    2605       }
    2606 #endif
    2607 
    2608       if(pcColCU && !pcColCU->isIntra( uiAbsPartAddrBase ) )
    2609       {
    2610         abCandIsInter[iCount] = true;
    2611 
    2612         // get interDir
    2613         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 #endif
    26422511
    26432512  //left
     
    26452514  TComDataCU* pcCULeft = 0;
    26462515  pcCULeft = getPULeft( uiLeftPartIdx, uiPartIdxLB );
    2647 #if INTRA_BL
    2648   if( pcCULeft && pcCULeft->isIntraBL( uiLeftPartIdx ) )
    2649   {
    2650     pcCULeft = NULL;
    2651   }
    2652 #endif
     2516
    26532517  Bool isAvailableA1 = pcCULeft &&
    26542518  pcCULeft->isDiffMER(xP -1, yP+nPSH-1, xP, yP) &&
    2655 #if SVC_MVP
    2656   ( !pcColCU || pcColCU->isIntra( uiAbsPartAddrBase ) || !pcCULeft->hasEqualMotion( uiLeftPartIdx, puhInterDirNeighbours[0], &pcMvFieldNeighbours[0])) &&
    2657 #endif
    26582519  !( uiPUIdx == 1 && (cCurPS == SIZE_Nx2N || cCurPS == SIZE_nLx2N || cCurPS == SIZE_nRx2N) ) &&
    26592520  !pcCULeft->isIntra( uiLeftPartIdx ) ;
     
    26852546  TComDataCU* pcCUAbove = 0;
    26862547  pcCUAbove = getPUAbove( uiAbovePartIdx, uiPartIdxRT );
    2687 #if INTRA_BL
    2688   if( pcCUAbove && pcCUAbove->isIntraBL( uiAbovePartIdx ) )
    2689   {
    2690     pcCUAbove = NULL;
    2691   }
    2692 #endif
     2548
    26932549  Bool isAvailableB1 = pcCUAbove &&
    2694 #if SVC_MVP
    2695   ( !pcColCU || pcColCU->isIntra( uiAbsPartAddrBase ) || !pcCUAbove->hasEqualMotion( uiAbovePartIdx, puhInterDirNeighbours[0], &pcMvFieldNeighbours[0] )) &&
    2696 #endif
    26972550  pcCUAbove->isDiffMER(xP+nPSW-1, yP-1, xP, yP) &&
    26982551  !( uiPUIdx == 1 && (cCurPS == SIZE_2NxN || cCurPS == SIZE_2NxnU || cCurPS == SIZE_2NxnD) ) &&
     
    27252578  TComDataCU* pcCUAboveRight = 0;
    27262579  pcCUAboveRight = getPUAboveRight( uiAboveRightPartIdx, uiPartIdxRT );
    2727 #if INTRA_BL
    2728   if( pcCUAboveRight && pcCUAboveRight->isIntraBL( uiAboveRightPartIdx ) )
    2729   {
    2730     pcCUAboveRight = NULL;
    2731   }
    2732 #endif
     2580
    27332581  Bool isAvailableB0 = pcCUAboveRight &&
    2734 #if SVC_MVP && !IL_MRG_SIMPLIFIED_PRUNING
    2735   ( !pcColCU || pcColCU->isIntra( uiAbsPartAddrBase ) || !pcCUAboveRight->hasEqualMotion( uiAboveRightPartIdx, puhInterDirNeighbours[0], &pcMvFieldNeighbours[0] )) &&
    2736 #endif
    27372582  pcCUAboveRight->isDiffMER(xP+nPSW, yP-1, xP, yP) &&
    27382583  !pcCUAboveRight->isIntra( uiAboveRightPartIdx );
     
    27612606
    27622607  //left bottom
    2763 #if SVC_MVP
    2764   if( iCount < 4 )
    2765   {
    2766 #endif
    27672608  UInt uiLeftBottomPartIdx = 0;
    27682609  TComDataCU* pcCULeftBottom = 0;
    27692610  pcCULeftBottom = this->getPUBelowLeft( uiLeftBottomPartIdx, uiPartIdxLB );
    2770 #if INTRA_BL
    2771   if( pcCULeftBottom && pcCULeftBottom->isIntraBL( uiLeftBottomPartIdx ) )
    2772   {
    2773     pcCULeftBottom = NULL;
    2774   }
    2775 #endif
     2611
    27762612  Bool isAvailableA0 = pcCULeftBottom &&
    27772613  pcCULeftBottom->isDiffMER(xP-1, yP+nPSH, xP, yP) &&
    2778 #if SVC_MVP && !IL_MRG_SIMPLIFIED_PRUNING
    2779   ( !pcColCU || pcColCU->isIntra( uiAbsPartAddrBase ) || !pcCULeftBottom->hasEqualMotion( uiLeftBottomPartIdx, puhInterDirNeighbours[0], &pcMvFieldNeighbours[0])) &&
    2780 #endif
    27812614  !pcCULeftBottom->isIntra( uiLeftBottomPartIdx ) ;
    27822615  if ( isAvailableA0 && ( !isAvailableA1 || !pcCULeft->hasEqualMotion( uiLeftPartIdx, pcCULeftBottom, uiLeftBottomPartIdx ) ) )
     
    28022635    return;
    28032636  }
    2804 #if SVC_MVP
    2805   }
    2806 #endif
    28072637
    28082638  // above left
     
    28122642    TComDataCU* pcCUAboveLeft = 0;
    28132643    pcCUAboveLeft = getPUAboveLeft( uiAboveLeftPartIdx, uiAbsPartAddr );
    2814 #if INTRA_BL
    2815     if( pcCUAboveLeft && pcCUAboveLeft->isIntraBL( uiAboveLeftPartIdx ) )
    2816     {
    2817       pcCUAboveLeft = NULL;
    2818     }
    2819 #endif
     2644
    28202645    Bool isAvailableB2 = pcCUAboveLeft &&
    28212646    pcCUAboveLeft->isDiffMER(xP-1, yP-1, xP, yP) &&
    2822 #if SVC_MVP && !IL_MRG_SIMPLIFIED_PRUNING
    2823     ( !pcColCU || pcColCU->isIntra( uiAbsPartAddrBase ) || !pcCUAboveLeft->hasEqualMotion( uiAboveLeftPartIdx, puhInterDirNeighbours[0], &pcMvFieldNeighbours[0] )) &&
    2824 #endif
    28252647    !pcCUAboveLeft->isIntra( uiAboveLeftPartIdx );
    28262648    if ( isAvailableB2 && ( !isAvailableA1 || !pcCULeft->hasEqualMotion( uiLeftPartIdx, pcCUAboveLeft, uiAboveLeftPartIdx ) )
     
    31232945  UInt idx;
    31242946  tmpCU = getPUBelowLeft(idx, uiPartIdxLB);
    3125 #if INTRA_BL
    3126   bAddedSmvp = (tmpCU != NULL) && (!tmpCU->isIntra(idx));
    3127 #else
    31282947  bAddedSmvp = (tmpCU != NULL) && (tmpCU->getPredictionMode(idx) != MODE_INTRA);
    3129 #endif
    31302948
    31312949  if (!bAddedSmvp)
    31322950  {
    31332951    tmpCU = getPULeft(idx, uiPartIdxLB);
    3134 #if INTRA_BL
    3135     bAddedSmvp = (tmpCU != NULL) && (!tmpCU->isIntra(idx));
    3136 #else
    31372952    bAddedSmvp = (tmpCU != NULL) && (tmpCU->getPredictionMode(idx) != MODE_INTRA);
    3138 #endif
    31392953  }
    31402954
     
    35623376
    35633377  // use coldir.
    3564 #if M0457_COL_PICTURE_SIGNALING
     3378#if M0457_COL_PICTURE_SIGNALING && !REMOVE_COL_PICTURE_SIGNALING
    35653379  TComPic *pColPic;
    35663380  if (m_layerId > 0 && getSlice()->getAltColIndicationFlag())
     
    36993513  if (scaleFactor > 0)
    37003514  {
    3701 #if SVC_MVP
    3702     m_acCUMvField[0].compress(m_pePredMode, m_puhInterDir, scaleFactor);
    3703     m_acCUMvField[1].compress(m_pePredMode, m_puhInterDir, scaleFactor);   
    3704 #else
    37053515    m_acCUMvField[0].compress(m_pePredMode, scaleFactor);
    37063516    m_acCUMvField[1].compress(m_pePredMode, scaleFactor);   
    3707 #endif
    37083517  }
    37093518}
     
    41373946}
    41383947
    4139 #if INTRA_BL && !NO_RESIDUAL_FLAG_FOR_BLPRED
    4140 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   else
    4164   {
    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 #endif
    4175 
    41763948#if SVC_COL_BLK
    41773949TComDataCU*  TComDataCU::getBaseColCU( UInt refLayerIdc, UInt uiCuAbsPartIdx, UInt &uiCUAddrBase, UInt &uiAbsPartIdxBase )
     
    42734045#endif
    42744046
     4047#if N0139_POSITION_ROUNDING_OFFSET
     4048  iBX += 4;
     4049  iBY += 4;
     4050#endif
     4051
    42754052#if SCALED_REF_LAYER_OFFSETS
    42764053  if ( iBX >= cBaseColPic->getPicYuvRec()->getWidth() || iBY >= cBaseColPic->getPicYuvRec()->getHeight() ||
     
    43344111}
    43354112#endif
    4336 
    4337 #if SVC_MVP
    4338 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 #endif
    4360 
    43614113//! \}
  • trunk/source/Lib/TLibCommon/TComDataCU.h

    r313 r345  
    485485  Void          deriveLeftBottomIdxGeneral    ( UInt uiAbsPartIdx, UInt uiPartIdx, UInt& ruiPartIdxLB );
    486486 
    487 #if SVC_MVP
    488   Bool          hasEqualMotion              ( UInt uiAbsPartIdx, UChar uchInterDir, TComMvField* pcMvField  );
    489 #endif
    490  
    491487  // -------------------------------------------------------------------------------------------------------------------
    492488  // member functions for modes
    493489  // -------------------------------------------------------------------------------------------------------------------
    494490 
    495 #if INTRA_BL && !NO_RESIDUAL_FLAG_FOR_BLPRED
    496   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 #endif
    499 #if INTRA_BL
    500   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 #else
    503491  Bool          isIntra   ( UInt uiPartIdx )  { return m_pePredMode[ uiPartIdx ] == MODE_INTRA; }
    504 #endif
    505492  Bool          isSkipped ( UInt uiPartIdx );                                                     ///< SKIP (no residual)
    506493  Bool          isBipredRestriction( UInt puIdx );
     
    529516  UInt&         getTotalBins            ()                            { return m_uiTotalBins;                                                                                                  }
    530517
    531 #if INTRA_BL
    532   UInt          getCtxIntraBLFlag               ( UInt   uiAbsPartIdx                                 );
    533 #endif 
    534 
     518#if REF_IDX_FRAMEWORK
    535519#if FAST_INTRA_SHVC
    536520  Int           reduceSetOfIntraModes              (  UInt   uiAbsPartIdx, Int* uiIntraDirPred, Int &fullSetOfModes );
     
    540524  Bool xCheckZeroMVILRMerge(UChar uhInterDir, TComMvField& cMvFieldL0, TComMvField& cMvFieldL1);
    541525  Bool xCheckZeroMVILRMvdL1Zero(Int iRefList, Int iRefIdx, Int MvpIdx);
     526#endif
    542527#endif
    543528
     
    553538  UInt          getCoefScanIdx(UInt uiAbsPartIdx, UInt uiWidth, Bool bIsLuma, Bool bIsIntra);
    554539
     540#if REF_IDX_FRAMEWORK
    555541#if SVC_COL_BLK
    556542  TComDataCU*   getBaseColCU( UInt refLayerIdc, UInt uiCuAbsPartIdx, UInt &uiCUAddrBase, UInt &uiAbsPartIdxBase );
    557543  TComDataCU*   getBaseColCU( UInt refLayerIdc, UInt uiPelX, UInt uiPelY, UInt &uiCUAddrBase, UInt &uiAbsPartIdxBase );
    558544  Void          scaleBaseMV( UInt refLayerIdc, TComMvField& rcMvFieldEnhance, TComMvField& rcMvFieldBase );
     545#endif
    559546#endif
    560547};
  • trunk/source/Lib/TLibCommon/TComMotionInfo.cpp

    r313 r345  
    328328 * \param scale      Factor by which to subsample motion information
    329329 */
    330 #if SVC_MVP
    331 Void TComCUMvField::compress(Char* pePredMode, UChar* peInterDir, Int scale)
    332 #else
    333330Void TComCUMvField::compress(Char* pePredMode, Int scale)
    334 #endif
    335331{
    336332  Int N = scale * scale;
     
    351347      pePredMode[ uiPartIdx + i ] = predMode;
    352348      m_piRefIdx[ uiPartIdx + i ] = iRefIdx;
    353 #if SVC_MVP
    354       peInterDir[ uiPartIdx + i ] = peInterDir[ uiPartIdx ];
    355 #endif
    356349    }
    357350  }
  • trunk/source/Lib/TLibCommon/TComMotionInfo.h

    r313 r345  
    158158  }
    159159 
    160 #if SVC_MVP
    161   Void compress(Char* pePredMode, UChar* peInterDir, Int scale);
    162 #else
    163160  Void compress(Char* pePredMode, Int scale);
    164 #endif
    165161
    166162#if REF_IDX_MFM
  • trunk/source/Lib/TLibCommon/TComPrediction.cpp

    r313 r345  
    408408}
    409409
    410 #if INTRA_BL && !NO_RESIDUAL_FLAG_FOR_BLPRED
    411 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 #endif
    418 
    419410Void TComPrediction::motionCompensation ( TComDataCU* pcCU, TComYuv* pcYuvPred, RefPicList eRefPicList, Int iPartIdx )
    420411{
  • trunk/source/Lib/TLibCommon/TComPrediction.h

    r313 r345  
    101101 
    102102  Void    initTempBuff();
    103  
    104 #if INTRA_BL
    105   Void getBaseBlk ( TComDataCU* pcCU, TComYuv* pcYuvPred, Int iPartAddr, Int iWidth, Int iHeight );
    106 #endif
     103
    107104  // inter
    108105  Void motionCompensation         ( TComDataCU*  pcCU, TComYuv* pcYuvPred, RefPicList eRefPicList = REF_PIC_LIST_X, Int iPartIdx = -1 );
     
    121118  Int  getPredicBufHeight()       { return m_iYuvExtHeight; }
    122119
     120#if REF_IDX_FRAMEWORK
    123121#if SVC_UPSAMPLING
    124122#if SCALED_REF_LAYER_OFFSETS
     
    128126#endif
    129127#endif
     128#endif
    130129};
    131130
  • trunk/source/Lib/TLibCommon/TComSlice.cpp

    r313 r345  
    124124  m_numILRRefIdx = 0;
    125125#endif
    126 #if M0457_COL_PICTURE_SIGNALING
     126#if M0457_COL_PICTURE_SIGNALING && !REMOVE_COL_PICTURE_SIGNALING
    127127  m_altColIndicationFlag = false;
    128128  m_colRefLayerIdx       = 0;
     
    385385
    386386#if REF_IDX_FRAMEWORK
    387 #if ZERO_NUM_DIRECT_LAYERS
    388387  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 #else
    390   if ((getLayerId() == 0) ||
    391       ((getSPS()->getLayerId()) &&  !((getNalUnitType() >= NAL_UNIT_CODED_SLICE_BLA_W_LP) &&
    392        (getNalUnitType() <= NAL_UNIT_CODED_SLICE_CRA)) )
    393      )
    394 #endif
    395388  {
    396389#endif
     
    458451#if ILR_RESTR
    459452    Int maxSubLayerForILPPlus1 = ( m_layerId > 0 && m_activeNumILRRefIdx > 0)? m_pcVPS->getMaxSublayerForIlpPlus1(ilpPic[refLayerIdc]->getSlice(0)->getLayerId()) : 0;
    460 #if ZERO_NUM_DIRECT_LAYERS
    461453    if( m_layerId > 0 && m_activeNumILRRefIdx > 0 && ( ( (Int)(ilpPic[refLayerIdc]->getSlice(0)->getTLayer())<=  maxSubLayerForILPPlus1-1) || (maxSubLayerForILPPlus1==0 && ilpPic[refLayerIdc]->getSlice(0)->getRapPicFlag()) )  )
    462 #else
    463     if( m_layerId > 0 && ( ( (Int)(ilpPic[refLayerIdc]->getSlice(0)->getTLayer())<=maxSubLayerForILPPlus1-1) || (maxSubLayerForILPPlus1==0 && ilpPic[refLayerIdc]->getSlice(0)->getRapPicFlag()) )  )
    464 #endif
    465454#else //#if ILR_RESTR
    466 #if ZERO_NUM_DIRECT_LAYERS
    467455    if( m_layerId > 0 && m_activeNumILRRefIdx > 0 )
    468 #else
    469     if( m_layerId > 0 )
    470 #endif
    471456#endif //#if ILR_RESTR
    472457    {
     
    599584      rpsCurrList0[cIdx] = RefPicSetStCurr0[i];
    600585    }
    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
    610587#if REF_IDX_FRAMEWORK
    611588    if( m_layerId > 0 )
     
    619596        Int refLayerIdc = m_interLayerPredLayerIdc[i];
    620597#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
    621626         Int maxSubLayerForILPPlus1 = getVPS()->getMaxSublayerForIlpPlus1(ilpPic[refLayerIdc]->getSlice(0)->getLayerId());
    622627        if( ((Int)(ilpPic[refLayerIdc]->getSlice(0)->getTLayer())<=maxSubLayerForILPPlus1-1) || (maxSubLayerForILPPlus1==0 && ilpPic[refLayerIdc]->getSlice(0)->getRapPicFlag()) )
     
    625630      }
    626631    }
     632#endif
    627633#endif
    628634  assert(cIdx == numPocTotalCurr);
     
    707713  TComRefPicListModification* refPicListModification = &m_RefPicListModification;
    708714  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
    709718
    710719  assert(m_aiNumRefIdx[REF_PIC_LIST_0] > 1);
     
    712721
    713722  //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
    714726  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
    715731  refPicListModification->setRefPicListModificationFlagL0(hasModification);
    716732  if(hasModification)
     
    736752#endif
    737753      {
     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
    738764        refPicListModification->setRefPicSetIdxL0(m_aiNumRefIdx[REF_PIC_LIST_0] - i, numberOfRpsCurrTempList - i);
     765#endif
    739766      }
    740767    }
     
    773800}
    774801#endif
    775 
     802#if RPL_INIT_N0316_N0082
     803Int 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
    776822Int TComSlice::getNumRpsCurrTempList()
    777823{
     
    16161662#endif
    16171663#if JCTVC_M0203_INTERLAYER_PRED_IDC
     1664#if N0120_MAX_TID_REF_PRESENT_FLAG
     1665  m_maxTidIlRefPicsPlus1PresentFlag = true;
     1666#endif
    16181667  for( Int i = 0; i < MAX_VPS_LAYER_ID_PLUS1 - 1; i++)
    16191668  {
  • trunk/source/Lib/TLibCommon/TComSlice.h

    r313 r345  
    456456  UInt       m_layerIdInVps[MAX_VPS_LAYER_ID_PLUS1];            // Maps layer_id_in_nuh with the layer ID in the VPS
    457457#endif
     458#if ILP_SSH_SIG
     459  Bool       m_ilpSshSignalingEnabledFlag;
     460#endif
    458461#if VPS_EXTN_PROFILE_INFO
    459462  // Profile-tier-level signalling related
     
    491494  UInt       m_maxSublayerForIlpPlus1[MAX_VPS_LAYER_ID_PLUS1 - 1];
    492495#endif
     496#if N0120_MAX_TID_REF_PRESENT_FLAG
     497  Bool       m_maxTidIlRefPicsPlus1PresentFlag;
     498#endif
    493499#if M0040_ADAPTIVE_RESOLUTION_CHANGE
    494500  Bool       m_singleLayerForNonIrapFlag;
     
    588594  UInt   getLayerIdInVps(Int id)                                { return m_layerIdInVps[id];       }
    589595  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;}
    590600#endif
    591601#if VPS_EXTN_PROFILE_INFO
     
    653663  Void   setMaxSublayerForIlpPlus1(Int layerId, UInt maxSublayer)   { m_maxSublayerForIlpPlus1[layerId] = maxSublayer;            }
    654664#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
    655669#if M0040_ADAPTIVE_RESOLUTION_CHANGE
    656670  Bool   getSingleLayerForNonIrapFlag()                             { return m_singleLayerForNonIrapFlag; }
     
    15601574  Bool      getMvdL1ZeroFlag ()                                  { return m_bLMvdL1Zero;    }
    15611575  Int       getNumRpsCurrTempList();
     1576#if RPL_INIT_N0316_N0082
     1577  Int       getNumNegativeRpsCurrTempList();
     1578#endif
    15621579  Int       getList1IdxToList0Idx ( Int list1Idx )               { return m_list1IdxToList0Idx[list1Idx]; }
    15631580  Void      setReferenced(Bool b)                               { m_bRefenced = b; }
     
    17781795  Void      setMFMEnabledFlag(Bool flag)                { m_bMFMEnabledFlag = flag; }
    17791796  Bool      getMFMEnabledFlag()                         { return m_bMFMEnabledFlag; }
     1797#if !REMOVE_COL_PICTURE_SIGNALING
    17801798  Void      setColRefLayerIdx(Int i)                    { m_colRefLayerIdx = i;     }
    17811799  Int       getColRefLayerIdx()                         { return m_colRefLayerIdx;  }
     
    17841802  Void      setMotionPredIlp(TComPic *ilpPic)           { m_pcIlpPic = ilpPic; }
    17851803  TComPic*  getMotionPredIlp()                          { return m_pcIlpPic; }
     1804#endif
    17861805#endif
    17871806#endif
  • trunk/source/Lib/TLibCommon/TComTrQuant.cpp

    r313 r345  
    12351235    uiMode = pcCU->getLumaIntraDir( uiAbsPartIdx );
    12361236  }
    1237 #if INTRA_BL_DST4x4
    1238   else if(eTType == TEXT_LUMA && pcCU->isIntraBL(uiAbsPartIdx) )
    1239   {
    1240     uiMode = DC_IDX; //Using DST
    1241   }
    1242 #endif
    12431237  else
    12441238  {
     
    13141308    Int scalingListType = (pcCU->isIntra(uiAbsPartIdx) ? 0 : 3) + g_eTTable[(Int)eTxt];
    13151309    assert(scalingListType < 6);
    1316 #if NO_RESIDUAL_FLAG_FOR_BLPRED
    1317     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     else
    1322     {
    1323       invtransformNxN( pcCU->getCUTransquantBypass(uiAbsPartIdx), eTxt, REG_DCT, pResi, uiStride, rpcCoeff, uiWidth, uiHeight, scalingListType, pcCU->getTransformSkip(uiAbsPartIdx, eTxt) );
    1324     }
    1325 #else
    13261310    invtransformNxN( pcCU->getCUTransquantBypass(uiAbsPartIdx), eTxt, REG_DCT, pResi, uiStride, rpcCoeff, uiWidth, uiHeight, scalingListType, pcCU->getTransformSkip(uiAbsPartIdx, eTxt) );
    1327 #endif
    13281311  }
    13291312  else
     
    18091792  Int     ui16CtxCbf          = 0;
    18101793  Int     iBestLastIdxP1      = 0;
    1811 #if NO_RESIDUAL_FLAG_FOR_BLPRED
    1812   if( (!pcCU->isIntra( uiAbsPartIdx ) || pcCU->isIntraBL( uiAbsPartIdx )) && eTType == TEXT_LUMA && pcCU->getTransformIdx( uiAbsPartIdx ) == 0 )
    1813 #else
    18141794  if( !pcCU->isIntra( uiAbsPartIdx ) && eTType == TEXT_LUMA && pcCU->getTransformIdx( uiAbsPartIdx ) == 0 )
    1815 #endif
    18161795  {
    18171796    ui16CtxCbf   = 0;
  • trunk/source/Lib/TLibCommon/TComUpsampleFilter.cpp

    r313 r345  
    99{
    1010  {  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
    1117  {CNU,CNU,CNU,CNU,CNU,CNU,CNU,CNU}, //
    1218  {CNU,CNU,CNU,CNU,CNU,CNU,CNU,CNU}, //
    1319  {CNU,CNU,CNU,CNU,CNU,CNU,CNU,CNU}, //
    1420  {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
    1627  {CNU,CNU,CNU,CNU,CNU,CNU,CNU,CNU}, //       
    1728  {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
    1935  {CNU,CNU,CNU,CNU,CNU,CNU,CNU,CNU}, //
    2036  {CNU,CNU,CNU,CNU,CNU,CNU,CNU,CNU}, //
     37#endif
    2138  { -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
    2245  {CNU,CNU,CNU,CNU,CNU,CNU,CNU,CNU}, //
    2346  {CNU,CNU,CNU,CNU,CNU,CNU,CNU,CNU}, //
    2447  {CNU,CNU,CNU,CNU,CNU,CNU,CNU,CNU}, //
    2548  {CNU,CNU,CNU,CNU,CNU,CNU,CNU,CNU}  //
     49#endif
    2650};
    2751
    2852const Int TComUpsampleFilter::m_chromaFixedFilter[16][NTAPS_US_CHROMA] =
    2953{
    30 #if CHROMA_UPSAMPLING
    3154  {  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
    3260  {CNU,CNU,CNU,CNU},//
    3361  {CNU,CNU,CNU,CNU},//
    3462  {CNU,CNU,CNU,CNU},//
     63#endif
    3564  { -4, 54, 16, -2},// <-> actual phase shift 1/4,equal to HEVC MC, used for spatial scalability x1.5 (only for accurate Chroma alignement)
    3665  { -6, 52, 20, -2},// <-> actual phase shift 1/3, used for spatial scalability x1.5   
    3766  { -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
    3870  {CNU,CNU,CNU,CNU},//
     71#endif
    3972  { -4, 36, 36, -4},// <-> actual phase shift 1/2,equal to HEVC MC, used for spatial scalability x2
    4073  { -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
    4177  {CNU,CNU,CNU,CNU},//
     78#endif
    4279  { -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
    4384  {CNU,CNU,CNU,CNU},//
    4485  {CNU,CNU,CNU,CNU},//
     86#endif
    4587  { -2, 10, 58, -2},// <-> actual phase shift 7/8,equal to HEVC MC, used for spatial scalability x2 (only for accurate Chroma alignement) 
    4688  {  0,  4, 62, -2} // <-> actual phase shift 11/12, used for spatial scalability x1.5 (only for accurate Chroma alignement)
    47 #else
    48   {  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.5   
    54   { -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 x2
    57   { -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.5
    60   {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 #endif
    6589};
    6690
     
    183207    }
    184208
     209#if ARBITRARY_SPATIAL_RATIO
     210    assert ( widthEL >= widthBL );
     211    assert ( heightEL >= heightBL );
     212#else
    185213    assert ( widthEL == widthBL || widthEL == 2*widthBL || 2*widthEL == 3*widthBL );
    186214    assert ( heightEL == heightBL || heightEL == 2*heightBL || 2*heightEL == 3*heightBL );
     215#endif
    187216
    188217    pcBasePic->setBorderExtension(false);
     
    195224    Int   phaseY = 0;
    196225
     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
    197230    Int   addX       = ( ( ( widthBL * phaseX ) << ( shiftX - 2 ) ) + ( widthEL >> 1 ) ) / widthEL + ( 1 << ( shiftX - 5 ) );
    198231    Int   addY       = ( ( ( heightBL * phaseY ) << ( shiftY - 2 ) ) + ( heightEL >> 1 ) ) / heightEL+ ( 1 << ( shiftY - 5 ) );
     232#endif
    199233
    200234    Int   deltaX     = 4 * phaseX;
     
    216250    Int topStartL  = scalEL.getWindowTopOffset();
    217251    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;
    218259#endif
    219260
     
    236277      for( j = 0; j < heightBL ; j++ )
    237278      {
     279#if  N0214_INTERMEDIATE_BUFFER_16BITS
     280        *piDstY = sumLumaHor(piSrcY, coeff) >> shift1;
     281#else
    238282        *piDstY = sumLumaHor(piSrcY, coeff);
     283#endif
    239284        piSrcY += strideBL;
    240285        piDstY += strideEL;
     
    248293    pcTempPic->setHeight(heightEL);
    249294
     295#if  N0214_INTERMEDIATE_BUFFER_16BITS
     296    Int nShift = US_FILTER_PREC*2 - shift1;
     297#else
    250298    const Int nShift = US_FILTER_PREC*2;
     299#endif
    251300    Int iOffset = 1 << (nShift - 1);
    252301
     
    269318      piSrcY = piTempBufY + (refPos -((NTAPS_US_LUMA>>1) - 1))*strideEL;
    270319#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
    271345#if 1 // it should provide identical result
    272346      Pel* piDstY0 = piDstBufY + j * strideEL;           
     
    308382      }
    309383#endif
     384#endif
    310385#else
    311386      piDstY = piDstBufY + j * strideEL;
     
    351426    Int topStartC  = scalEL.getWindowTopOffset() >> 1;
    352427    Int bottomEndC = (pcUsPic->getHeight() >> 1) - (scalEL.getWindowBottomOffset() >> 1);
     428#if BUGFIX_RESAMPLE
     429    leftOffset = leftStartC > 0 ? leftStartC : 0;
     430#endif
    353431#endif
    354432
     
    359437    phaseY = 1;
    360438
     439#if ROUNDING_OFFSET
     440    addX       = ( ( phaseX * scaleX + 2 ) >> 2 ) + ( 1 << ( shiftX - 5 ) );
     441    addY       = ( ( phaseY * scaleY + 2 ) >> 2 ) + ( 1 << ( shiftY - 5 ) );
     442#else
    361443    addX       = ( ( ( widthBL * phaseX ) << ( shiftX - 2 ) ) + ( widthEL >> 1 ) ) / widthEL + ( 1 << ( shiftX - 5 ) );
    362444    addY       = ( ( ( heightBL * phaseY ) << ( shiftY - 2 ) ) + ( heightEL >> 1 ) ) / heightEL+ ( 1 << ( shiftY - 5 ) );
     445#endif
    363446
    364447    deltaX     = 4 * phaseX;
     
    379462    widthBL   = pcBasePic->getWidth () >> 1;
    380463    heightBL  = min<Int>( pcBasePic->getHeight() >> 1, heightEL );
     464#endif
     465
     466#if  N0214_INTERMEDIATE_BUFFER_16BITS
     467    shift1 = g_bitDepthC - 8;
    381468#endif
    382469
     
    401488      for( j = 0; j < heightBL ; j++ )
    402489      {
     490#if  N0214_INTERMEDIATE_BUFFER_16BITS
     491        *piDstU = sumChromaHor(piSrcU, coeff) >> shift1;
     492        *piDstV = sumChromaHor(piSrcV, coeff) >> shift1;
     493#else
    403494        *piDstU = sumChromaHor(piSrcU, coeff);
    404495        *piDstV = sumChromaHor(piSrcV, coeff);
     496#endif
    405497
    406498        piSrcU += strideBL;
     
    416508    pcTempPic->extendPicBorder   (); // extend the border.
    417509    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
    418515
    419516#if SCALED_REF_LAYER_OFFSETS
     
    436533      piSrcV = piTempBufV  + (refPos -((NTAPS_US_CHROMA>>1) - 1))*strideEL;
    437534#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
    438571#if 1 // it should provide identical result
    439572      Pel* piDstU0 = piDstBufU + j*strideEL;
     
    490623      }
    491624#endif
     625#endif
    492626#else
    493627      piDstU = piDstBufU + j*strideEL;
  • trunk/source/Lib/TLibCommon/TComYuv.cpp

    r313 r345  
    184184}
    185185
    186 #if NO_RESIDUAL_FLAG_FOR_BLPRED
    187 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   else
    223   {
    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 #endif
    238 
    239186Void TComYuv::copyToPartYuv( TComYuv* pcYuvDst, UInt uiDstPartIdx )
    240187{
  • trunk/source/Lib/TLibCommon/TComYuv.h

    r313 r345  
    115115  Void    copyFromPicLuma      ( TComPicYuv* pcPicYuvSrc, UInt iCuAddr, UInt uiAbsZorderIdx );
    116116  Void    copyFromPicChroma    ( TComPicYuv* pcPicYuvSrc, UInt iCuAddr, UInt uiAbsZorderIdx );
    117 #if NO_RESIDUAL_FLAG_FOR_BLPRED
    118   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 #endif
    121117 
    122118  //  Copy Small YUV buffer to the part of other Big YUV buffer
  • trunk/source/Lib/TLibCommon/TypeDef.h

    r313 r345  
    4141#define SVC_EXTENSION                    1
    4242
     43#define N0139_POSITION_ROUNDING_OFFSET   1
     44
    4345#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)]
    4446
    4547#if SVC_EXTENSION
    4648#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)
    4851#define M0464_TILE_BOUNDARY_ALIGNED_FLAG 1      ///< VUI flag to indicate tile boundary alignment
    4952#define M0463_VUI_EXT_ILP_REF            1      ///< VUI extension inter-layer dependency offset signalling
     
    5154#define SCALED_REF_LAYER_OFFSET_FLAG     0      ///< M0309: Signal scaled reference layer offsets in SPS
    5255#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
    5360
    5461#define VPS_RENAME                       1      ///< Rename variables max_layer_id and num_layer_sets_minus1 in VPS
     
    7481#define SVC_COL_BLK                      1      ///< get co-located block
    7582#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
    7787
    7888#define SIMPLIFIED_MV_POS_SCALING        1      ///< M0133/M0449: inter-layer MV scaling and pixel mapping position calculation
     
    97107#define JCTVC_M0458_INTERLAYER_RPS_SIG   1      ///< implementation of JCTVC-L0178
    98108#if JCTVC_M0458_INTERLAYER_RPS_SIG
    99 #define ZERO_NUM_DIRECT_LAYERS           1      ///< support of zero direct reference layers
    100109#define MAX_ONE_RESAMPLING_DIRECT_LAYERS 1      ///< Allow maximum of one resampling process for direct reference layers
    101110#endif
    102111#define JCTVC_M0203_INTERLAYER_PRED_IDC  1      ///< implementation of JCTVC-M0203 Inter-layer Prediction Indication
    103112#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
    105115#endif
    106116#if REF_IDX_MFM
     117#define REMOVE_COL_PICTURE_SIGNALING     1      ///< JCTVC-N0107 remove alternative collocated picture signalling
    107118#define M0457_COL_PICTURE_SIGNALING      1
    108119#endif
    109120
    110121#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
    112123#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
    131125#endif
    132126#endif
     
    134128#define FAST_INTRA_SHVC                  1      ///< M0115: reduction number of intra modes in the EL (encoder only)
    135129#if FAST_INTRA_SHVC
    136   #define NB_REMAIN_MODES                2      ///< nb of remaining modes (M0115)
    137 #endif
    138 
    139 #define RC_SHVC_HARMONIZATION            1  ///< JCTVC-M0037, rate control for SHVC
     130#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
    140134
    141135#else
     
    472466  MODE_INTER,           ///< inter-prediction mode
    473467  MODE_INTRA,           ///< intra-prediction mode
    474 #if INTRA_BL
    475   MODE_INTRA_BL,        ///< inter-layer intra-prediction mode
    476 #endif
    477468  MODE_NONE = 15
    478469};
  • trunk/source/Lib/TLibDecoder/TDecCAVLC.cpp

    r313 r345  
    951951#endif
    952952#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
    953971  for(i = 0; i < vps->getMaxLayers() - 1; i++)
    954972  {
     
    956974    assert( uiCode <= vps->getMaxTLayers() );
    957975  }
     976#endif
     977#endif
     978#if ILP_SSH_SIG
     979    READ_FLAG( uiCode, "all_ref_layers_active_flag" ); vps->setIlpSshSignalingEnabledFlag(uiCode ? true : false);
    958980#endif
    959981#if VPS_EXTN_PROFILE_INFO
     
    13821404#if JCTVC_M0458_INTERLAYER_RPS_SIG
    13831405    rpcSlice->setActiveNumILRRefIdx(0);
     1406#if ILP_SSH_SIG
     1407    if((sps->getLayerId() > 0) && rpcSlice->getVPS()->getIlpSshSignalingEnabledFlag() && (rpcSlice->getNumILRRefIdx() > 0) )
     1408#else
    13841409    if((sps->getLayerId() > 0)  &&  (rpcSlice->getNumILRRefIdx() > 0) )
     1410#endif
    13851411    {
    13861412      READ_FLAG(uiCode,"inter_layer_pred_enabled_flag");
     
    14041430            rpcSlice->setActiveNumILRRefIdx(1);
    14051431          }
     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
    14061443          for(Int i = 0; i < rpcSlice->getActiveNumILRRefIdx(); i++ )
    14071444          {
     
    14091446            rpcSlice->setInterLayerPredLayerIdc(uiCode,i);
    14101447          }
     1448#if ILP_NUM_REF_CHK
     1449          }
     1450#endif
    14111451        }
    14121452        else
     
    14171457      }
    14181458    }
     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
    14191470#if M0457_IL_SAMPLE_PRED_ONLY_FLAG
    14201471    rpcSlice->setInterLayerSamplePredOnlyFlag( false );
     
    15741625    {
    15751626#if REF_IDX_FRAMEWORK && M0457_COL_PICTURE_SIGNALING
     1627#if REMOVE_COL_PICTURE_SIGNALING
     1628      rpcSlice->setMFMEnabledFlag( rpcSlice->getNumMotionPredRefLayers() > 0 ? true : false );
     1629#else
    15761630      rpcSlice->setMFMEnabledFlag( false );
    15771631      rpcSlice->setColRefLayerIdx( 0 );
     
    15901644      else
    15911645      {
     1646#endif //REMOVE_COL_PICTURE_SIGNALING
    15921647#endif
    15931648      if ( rpcSlice->getSliceType() == B_SLICE )
     
    16121667        rpcSlice->setColRefIdx(0);
    16131668      }
    1614 #if REF_IDX_FRAMEWORK && M0457_COL_PICTURE_SIGNALING
     1669#if REF_IDX_FRAMEWORK && M0457_COL_PICTURE_SIGNALING && !REMOVE_COL_PICTURE_SIGNALING
    16151670      }
    16161671#endif
     
    22152270  return (cnt>0);
    22162271}
    2217 
    2218 #if INTRA_BL
    2219 Void TDecCavlc::parseIntraBLFlag      ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth )
    2220 {
    2221   assert(0);
    2222 }
    2223 #endif
    2224 
    22252272//! \}
    22262273
  • trunk/source/Lib/TLibDecoder/TDecCAVLC.h

    r313 r345  
    118118  Void updateContextTables  ( SliceType /*eSliceType*/, Int /*iQp*/ ) { return; }
    119119
    120 #if INTRA_BL
    121   Void parseIntraBLFlag     ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth );
    122 #endif
    123 
    124120  Void xParsePredWeightTable ( TComSlice* pcSlice );
    125121  Void  parseScalingList               ( TComScalingList* scalingList );
  • trunk/source/Lib/TLibDecoder/TDecCu.cpp

    r313 r345  
    334334    return;
    335335  }
    336 #if INTRA_BL
    337   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   else
    343   {
    344 #endif
    345336
    346337  m_pcEntropyDecoder->decodePredMode( pcCU, uiAbsPartIdx, uiDepth );
     
    357348    }
    358349  }
    359 #if INTRA_BL
     350
     351  UInt uiCurrWidth      = pcCU->getWidth ( uiAbsPartIdx );
     352  UInt uiCurrHeight     = pcCU->getHeight( uiAbsPartIdx );
     353 
    360354  // prediction mode ( Intra : direction mode, Inter : Mv, reference idx )
    361355  m_pcEntropyDecoder->decodePredInfo( pcCU, uiAbsPartIdx, uiDepth, m_ppcCU[uiDepth]);
    362   }
    363 #endif
    364 
    365   UInt uiCurrWidth      = pcCU->getWidth ( uiAbsPartIdx );
    366   UInt uiCurrHeight     = pcCU->getHeight( uiAbsPartIdx );
    367  
    368 #if !INTRA_BL
    369   // prediction mode ( Intra : direction mode, Inter : Mv, reference idx )
    370   m_pcEntropyDecoder->decodePredInfo( pcCU, uiAbsPartIdx, uiDepth, m_ppcCU[uiDepth]);
    371 #endif
    372356
    373357  // Coefficient decoding
     
    440424      xReconIntraQT( m_ppcCU[uiDepth], uiDepth );
    441425      break;
    442 #if INTRA_BL
    443     case MODE_INTRA_BL:
    444 #if NO_RESIDUAL_FLAG_FOR_BLPRED
    445       xReconIntraBL( m_ppcCU[uiDepth], uiAbsPartIdx, uiDepth );
    446 #else
    447       xReconIntraQT( m_ppcCU[uiDepth], uiAbsPartIdx, uiDepth );
    448 #endif
    449       break;
    450 #endif
    451426    default:
    452427      assert(0);
     
    516491 
    517492  //===== get prediction signal =====
    518 #if INTRA_BL && !NO_RESIDUAL_FLAG_FOR_BLPRED
    519   if(pcCU->isIntraBL ( uiAbsPartIdx ) )
    520   {
    521     pcCU->getBaseLumaBlk( uiWidth, uiHeight, uiAbsPartIdx, piPred, uiStride );
    522   }
    523   else
    524 #endif
    525493  m_pcPrediction->predIntraLumaAng( pcCU->getPattern(), uiLumaPredMode, piPred, uiStride, uiWidth, uiHeight, bAboveAvail, bLeftAvail );
    526494 
     
    607575 
    608576  //===== 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 ); 
    623582
    624583  //===== inverse transform =====
     
    930889
    931890}
    932 
    933 #if NO_RESIDUAL_FLAG_FOR_BLPRED
    934 Void
    935 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 recon
    942   xDecodeInterTexture( pcCU, 0, uiDepth );
    943 
    944   // clip for only non-zero cbp case
    945   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   else
    950   {
    951     m_ppcYuvReco[uiDepth]->copyPartToPartYuv( m_ppcYuvReco[uiDepth],0, pcCU->getWidth( 0 ),pcCU->getHeight( 0 ));
    952   }
    953 }
    954 #endif
    955 
    956891//! \}
  • trunk/source/Lib/TLibDecoder/TDecCu.h

    r313 r345  
    7777#endif
    7878 
    79 #if INTRA_BL
    80   TComPicYuv*         m_pcPicYuvRecBase;       ///< reconstructed base layer
    81 #endif
    82  
    8379public:
    8480  TDecCu();
     
    106102#if SVC_EXTENSION
    107103  TDecTop*   getLayerDec        ( UInt LayerId )  { return m_ppcTDecTop[LayerId]; }
    108 #if INTRA_BL
    109   Void  setBaseRecPic           ( TComPicYuv* p ) { m_pcPicYuvRecBase = p; }
    110 #endif
    111104#endif
    112105protected:
     
    122115  Void  xIntraRecLumaBlk        ( TComDataCU* pcCU, UInt uiTrDepth, UInt uiAbsPartIdx, TComYuv* pcRecoYuv, TComYuv* pcPredYuv, TComYuv* pcResiYuv );
    123116  Void  xIntraRecChromaBlk      ( TComDataCU* pcCU, UInt uiTrDepth, UInt uiAbsPartIdx, TComYuv* pcRecoYuv, TComYuv* pcPredYuv, TComYuv* pcResiYuv, UInt uiChromaId );
    124 #if NO_RESIDUAL_FLAG_FOR_BLPRED
    125   Void  xReconIntraBL           ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    126 #endif
    127117 
    128118  Void  xReconPCM               ( TComDataCU* pcCU, UInt uiDepth );
  • trunk/source/Lib/TLibDecoder/TDecEntropy.cpp

    r313 r345  
    5858}
    5959
    60 #if INTRA_BL
    61 Void TDecEntropy::decodeIntraBLFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth )
    62 {
    63   m_pcEntropyDecoderIf->parseIntraBLFlag( pcCU, uiAbsPartIdx, uiPartIdx, uiDepth );
    64 }
    65 #endif
    66 
    6760/** decode merge flag
    6861 * \param pcSubCU
     
    111104Void TDecEntropy::decodePredInfo    ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, TComDataCU* pcSubCU )
    112105{
    113 #if INTRA_BL
    114   if( pcCU->isIntraBL( uiAbsPartIdx ) )                                 // Do nothing for Intra BL mode.
    115   {
    116     return;
    117   }
    118 #endif
    119106  if( pcCU->isIntra( uiAbsPartIdx ) )                                 // If it is Intra mode, encode intra prediction mode.
    120107  {
     
    450437   
    451438    pcCU->setCbfSubParts ( 0, TEXT_LUMA, uiAbsPartIdx, uiDepth );
    452 #if INTRA_BL
    453 #if NO_RESIDUAL_FLAG_FOR_BLPRED
    454     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 #else
    456     if( ( !pcCU->isIntra(uiAbsPartIdx) ) && uiDepth == pcCU->getDepth( uiAbsPartIdx ) && !pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_U, 0 ) && !pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_V, 0 ) )
    457 #endif
    458 #else
    459439    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 #endif
    461440    {
    462441      pcCU->setCbfSubParts( 1 << uiTrDepth, TEXT_LUMA, uiAbsPartIdx, uiDepth );
     
    556535  UInt uiChromaOffset = uiLumaOffset>>2;
    557536 
    558 #if NO_RESIDUAL_FLAG_FOR_BLPRED
    559   if( pcCU->isIntra(uiAbsPartIdx) && !pcCU->isIntraBL(uiAbsPartIdx) )
    560 #else
    561537  if( pcCU->isIntra(uiAbsPartIdx) )
    562 #endif
    563538  {
    564539  }
  • trunk/source/Lib/TLibDecoder/TDecEntropy.h

    r313 r345  
    107107  virtual Void parseTransformSkipFlags ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt width, UInt height, UInt uiDepth, TextType eTType) = 0;
    108108
    109 #if INTRA_BL
    110   virtual Void parseIntraBLFlag   ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth ) = 0;
    111 #endif
    112 
    113109  virtual Void updateContextTables( SliceType eSliceType, Int iQp ) = 0;
    114110 
     
    170166  Void updateContextTables    ( SliceType eSliceType, Int iQp ) { m_pcEntropyDecoderIf->updateContextTables( eSliceType, iQp ); }
    171167 
    172 #if INTRA_BL
    173   Void decodeIntraBLFlag       ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth );
    174 #endif
    175  
    176168private:
    177169  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  
    7777, m_cTransformSkipSCModel     ( 1,             2,               NUM_TRANSFORMSKIP_FLAG_CTX    , m_contextModels + m_numContextModels, m_numContextModels)
    7878, m_CUTransquantBypassFlagSCModel( 1,          1,               NUM_CU_TRANSQUANT_BYPASS_FLAG_CTX, m_contextModels + m_numContextModels, m_numContextModels)
    79 #if INTRA_BL
    80 , m_cIntraBLPredFlagSCModel   (1,              1,               NUM_INTRA_BL_PRED_CTX         , m_contextModels + m_numContextModels, m_numContextModels)
    81 #endif
    8279{
    8380  assert( m_numContextModels <= MAX_NUM_CTX_MOD );
     
    138135
    139136  m_cCUTransSubdivFlagSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_TRANS_SUBDIV_FLAG );
    140 #if INTRA_BL
    141   m_cIntraBLPredFlagSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_INTRA_BL_PRED_FLAG );
    142 #endif
    143137  m_cTransformSkipSCModel.initBuffer     ( sliceType, qp, (UChar*)INIT_TRANSFORMSKIP_FLAG );
    144138  m_CUTransquantBypassFlagSCModel.initBuffer( sliceType, qp, (UChar*)INIT_CU_TRANSQUANT_BYPASS_FLAG );
     
    186180  m_cSaoTypeIdxSCModel.initBuffer        ( eSliceType, iQp, (UChar*)INIT_SAO_TYPE_IDX );
    187181  m_cCUTransSubdivFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_TRANS_SUBDIV_FLAG );
    188 #if INTRA_BL
    189   m_cIntraBLPredFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_INTRA_BL_PRED_FLAG );
    190 #endif
    191182  m_cTransformSkipSCModel.initBuffer     ( eSliceType, iQp, (UChar*)INIT_TRANSFORMSKIP_FLAG );
    192183  m_CUTransquantBypassFlagSCModel.initBuffer( eSliceType, iQp, (UChar*)INIT_CU_TRANSQUANT_BYPASS_FLAG );
     
    438429}
    439430
    440 #if INTRA_BL
    441 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 #endif
    467 
    468431/** parse merge flag
    469432 * \param pcCU
     
    555518  UInt uiSymbol, uiMode = 0;
    556519  PartSize eMode;
    557  
    558 #if INTRA_BL
    559   if ( pcCU->isIntraBL( uiAbsPartIdx ) )
    560   {
    561     assert( 0 );
    562   }
    563 #endif
     520
    564521  if ( pcCU->isIntra( uiAbsPartIdx ) )
    565522  {
  • trunk/source/Lib/TLibDecoder/TDecSbac.h

    r313 r345  
    135135  Void  parseScalingList ( TComScalingList* /*scalingList*/ ) {}
    136136
    137 #if INTRA_BL
    138   Void parseIntraBLFlag    ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth );
    139 #endif
    140137private:
    141138  UInt m_uiLastDQpNonZero;
     
    174171  ContextModel3DBuffer m_cTransformSkipSCModel;
    175172  ContextModel3DBuffer m_CUTransquantBypassFlagSCModel;
    176 #if INTRA_BL
    177   ContextModel3DBuffer m_cIntraBLPredFlagSCModel;
    178 #endif
    179173};
    180174
  • trunk/source/Lib/TLibDecoder/TDecSlice.cpp

    r313 r345  
    197197  UInt uiTileLCUX;
    198198  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
    202200  Bool depSliceSegmentsEnabled = rpcPic->getSlice(rpcPic->getCurrSliceIdx())->getPPS()->getDependentSliceSegmentsEnabledFlag();
    203201  uiTileStartLCU = rpcPic->getPicSym()->getTComTile(rpcPic->getPicSym()->getTileIdxMap(iStartCUAddr))->getFirstCUAddr();
  • trunk/source/Lib/TLibDecoder/TDecTop.cpp

    r313 r345  
    242242
    243243  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
    244249  if (m_cListPic.size() < (UInt)m_iMaxRefPicNum)
    245250  {
     
    812817#if REF_IDX_FRAMEWORK
    813818    if (m_layerId == 0)
    814 #elif INTRA_BL
    815     if( m_layerId > 0 )
    816     {
    817       pcSlice->setRefPicList( m_cListPic );
    818     }
    819     else
    820819#endif
    821820#if FIX1071
     
    913912
    914913#if REF_IDX_FRAMEWORK
    915 #if ZERO_NUM_DIRECT_LAYERS
    916914    if( m_layerId > 0 && pcSlice->getActiveNumILRRefIdx() )
    917 #else
    918     if(m_layerId > 0)
    919 #endif
    920915    {
    921916      setILRPic(pcPic);
     
    928923      {
    929924        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
    931926        pcSlice->setMotionPredIlp(getMotionPredIlp(pcSlice));
    932927#endif
     
    13211316  if( vps->getNumDirectRefLayers( m_layerId ) <= 0 )
    13221317  {
    1323 #if ZERO_NUM_DIRECT_LAYERS
    13241318    return (TDecTop *)getLayerDec( 0 );
    1325 #else
    1326     return NULL;
    1327 #endif
    13281319  }
    13291320 
     
    13861377#endif
    13871378
    1388 #if M0457_COL_PICTURE_SIGNALING
     1379#if M0457_COL_PICTURE_SIGNALING && !REMOVE_COL_PICTURE_SIGNALING
    13891380TComPic* TDecTop::getMotionPredIlp(TComSlice* pcSlice)
    13901381{
  • trunk/source/Lib/TLibDecoder/TDecTop.h

    r313 r345  
    230230  Void      xDecodePPS();
    231231  Void      xDecodeSEI( TComInputBitstream* bs, const NalUnitType nalUnitType );
    232 #if M0457_COL_PICTURE_SIGNALING
     232#if M0457_COL_PICTURE_SIGNALING && !REMOVE_COL_PICTURE_SIGNALING
    233233  TComPic*  getMotionPredIlp(TComSlice* pcSlice);
    234234#endif
  • trunk/source/Lib/TLibEncoder/TEncCavlc.cpp

    r313 r345  
    708708  }
    709709
     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
    710722  WRITE_FLAG( vps->getNuhLayerIdPresentFlag(),         "vps_nuh_layer_id_present_flag" );
    711723  for(i = 1; i < vps->getMaxLayers(); i++)
     
    737749#endif
    738750#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
    739761  for( i = 0; i < vps->getMaxLayers() - 1; i++)
    740762  {
    741763    WRITE_CODE(vps->getMaxSublayerForIlpPlus1(i), 3, "max_sublayer_for_ilp_plus1[i]" );
    742764  }
     765#endif
     766#endif
     767#if ILP_SSH_SIG
     768    WRITE_FLAG( vps->getIlpSshSignalingEnabledFlag(), "all_ref_layers_active_flag" );
    743769#endif
    744770#if VPS_EXTN_PROFILE_INFO
     
    10521078    }
    10531079
    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
    10561086    {
    10571087      WRITE_FLAG(pcSlice->getInterLayerPredEnabledFlag(),"inter_layer_pred_enabled_flag");
     
    10691099            WRITE_CODE(pcSlice->getActiveNumILRRefIdx() - 1, numBits,"num_inter_layer_ref_pics_minus1");
    10701100          }       
     1101#if ILP_NUM_REF_CHK
     1102          if( pcSlice->getNumILRRefIdx() != pcSlice->getActiveNumILRRefIdx() )
     1103          {
     1104#endif
    10711105          for(Int i = 0; i < pcSlice->getActiveNumILRRefIdx(); i++ )
    10721106          {
    10731107            WRITE_CODE(pcSlice->getInterLayerPredLayerIdc(i),numBits,"inter_layer_pred_layer_idc[i]");   
    10741108          }
     1109#if ILP_NUM_REF_CHK
     1110          }
     1111#endif
    10751112        }
    10761113      }
     
    11871224    if ( pcSlice->getEnableTMVPFlag() )
    11881225    {
    1189 #if REF_IDX_FRAMEWORK && M0457_COL_PICTURE_SIGNALING
     1226#if REF_IDX_FRAMEWORK && M0457_COL_PICTURE_SIGNALING && !REMOVE_COL_PICTURE_SIGNALING
    11901227      if ( !pcSlice->getIdrPicFlag() && pcSlice->getLayerId() > 0 && pcSlice->getActiveNumILRRefIdx() > 0 && pcSlice->getNumMotionPredRefLayers() > 0 )
    11911228      {
     
    12101247        WRITE_UVLC( pcSlice->getColRefIdx(), "collocated_ref_idx" );
    12111248      }
    1212 #if REF_IDX_FRAMEWORK && M0457_COL_PICTURE_SIGNALING
     1249#if REF_IDX_FRAMEWORK && M0457_COL_PICTURE_SIGNALING && !REMOVE_COL_PICTURE_SIGNALING
    12131250      }
    12141251#endif
     
    17261763  return true;
    17271764}
    1728 
    1729 #if INTRA_BL
    1730 Void TEncCavlc::codeIntraBLFlag( TComDataCU* pcCU, UInt uiAbsPartIdx )
    1731 {
    1732   assert(0);
    1733 }
    1734 
    1735 #endif
    17361765//! \}
  • trunk/source/Lib/TLibEncoder/TEncCavlc.h

    r313 r345  
    112112  Void codeMergeFlag     ( TComDataCU* pcCU, UInt uiAbsPartIdx );
    113113  Void codeMergeIndex    ( TComDataCU* pcCU, UInt uiAbsPartIdx );
    114 #if INTRA_BL
    115   Void codeIntraBLFlag   ( TComDataCU* pcCU, UInt uiAbsPartIdx );
    116 #endif
    117114 
    118115  Void codeInterModeFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiEncMode );
  • trunk/source/Lib/TLibEncoder/TEncCu.cpp

    r313 r345  
    763763          }
    764764        }
    765 #if INTRA_BL
    766       if(m_pcPicYuvRecBase)
    767       {
    768         xCheckRDCostIntraBL( rpcBestCU, rpcTempCU );
    769         rpcTempCU->initEstData( uiDepth, iQP );
    770       }
    771 #endif
    772765#if (ENCODER_FAST_MODE)
    773766      if(pcPic->getLayerId() > 0)
     
    12151208    return;
    12161209  }
    1217 #if INTRA_BL
    1218   m_pcEntropyCoder->encodeIntraBLFlag( pcCU, uiAbsPartIdx );
    1219   if ( !pcCU->isIntraBL( uiAbsPartIdx ) )
    1220   {
    1221 #endif
    12221210  m_pcEntropyCoder->encodePredMode( pcCU, uiAbsPartIdx );
    12231211 
     
    12381226  // prediction Info ( Intra : direction mode, Inter : Mv, reference idx )
    12391227  m_pcEntropyCoder->encodePredInfo( pcCU, uiAbsPartIdx );
    1240 #if INTRA_BL
    1241   }
    1242 #endif
    12431228 
    12441229  // Encode Coefficients
     
    15681553 
    15691554  m_pcEntropyCoder->resetBits();
    1570 #if INTRA_BL
    1571   m_pcEntropyCoder->encodeIntraBLFlag ( rpcTempCU, 0,       true );
    1572 #endif
     1555
    15731556  if ( rpcTempCU->getSlice()->getPPS()->getTransquantBypassEnableFlag())
    15741557  {
     
    16241607
    16251608  m_pcEntropyCoder->resetBits();
    1626 #if INTRA_BL
    1627   m_pcEntropyCoder->encodeIntraBLFlag ( rpcTempCU, 0,       true );
    1628 #endif
     1609
    16291610  if ( rpcTempCU->getSlice()->getPPS()->getTransquantBypassEnableFlag())
    16301611  {
     
    18791860#endif
    18801861
    1881 #if INTRA_BL
    1882 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_BLPRED
    1892   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 #else
    1901 
    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 Coefficients
    1913   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 #endif
    1926  
    1927   xCheckDQP( rpcTempCU );
    1928   xCheckBestMode(rpcBestCU, rpcTempCU, uiDepth);
    1929 }
    1930 #endif
    19311862#if (ENCODER_FAST_MODE)
    19321863Void TEncCu::xCheckRDCostILRUni(TComDataCU *&rpcBestCU, TComDataCU *&rpcTempCU, UInt refLayerId)
  • trunk/source/Lib/TLibEncoder/TEncCu.h

    r313 r345  
    8484  //  Access channel
    8585  TEncCfg*                m_pcEncCfg;
    86 #if INTRA_BL
    87   TComPicYuv*             m_pcPicYuvRecBase;       ///< reconstructed base layer
    88 #endif
    8986  TEncSearch*             m_pcPredSearch;
    9087  TComTrQuant*            m_pcTrQuant;
     
    134131  Int   updateLCUDataISlice ( TComDataCU* pcCU, Int LCUIdx, Int width, Int height );
    135132#endif
    136 #if INTRA_BL
    137   Void  setBaseRecPic       ( TComPicYuv* p ) { m_pcPicYuvRecBase = p; }   
    138 #endif
     133
    139134protected:
    140135  Void  finishCU            ( TComDataCU*  pcCU, UInt uiAbsPartIdx,           UInt uiDepth        );
     
    157152#endif
    158153  Void  xCheckRDCostIntra   ( TComDataCU*& rpcBestCU, TComDataCU*& rpcTempCU, PartSize ePartSize  );
    159 #if INTRA_BL
    160   Void  xCheckRDCostIntraBL ( TComDataCU*& rpcBestCU, TComDataCU*& rpcTempCU  );
    161 #endif
    162154#if ENCODER_FAST_MODE
    163155  Void  xCheckRDCostILRUni  ( TComDataCU*& rpcBestCU, TComDataCU*& rpcTempCU, UInt refLayerId);
  • trunk/source/Lib/TLibEncoder/TEncEntropy.cpp

    r313 r345  
    166166  }
    167167
    168 #if INTRA_BL
    169   if( pcCU->isIntraBL( uiAbsPartIdx ) )
    170   {
    171     return;
    172   }
    173 #endif
    174 
    175168  m_pcEntropyCoderIf->codePredMode( pcCU, uiAbsPartIdx );
    176169}
     
    251244    }
    252245  }
    253 #if INTRA_BL
    254     if( pcCU->isIntra(uiAbsPartIdx) && pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_NxN && uiDepth == pcCU->getDepth(uiAbsPartIdx) )
    255 #else
    256246 
    257247  if( pcCU->getPredictionMode(uiAbsPartIdx) == MODE_INTRA && pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_NxN && uiDepth == pcCU->getDepth(uiAbsPartIdx) )
    258 #endif
    259248  {
    260249    assert( uiSubdiv );
     
    342331    }
    343332   
    344 #if INTRA_BL
    345 #if NO_RESIDUAL_FLAG_FOR_BLPRED
    346     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 #else
    348     if( ( !pcCU->isIntra( uiAbsPartIdx ) ) && uiDepth == pcCU->getDepth( uiAbsPartIdx ) && !pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_U, 0 ) && !pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_V, 0 ) )
    349 #endif
    350 #else
    351333    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 #endif
    353334    {
    354335      assert( pcCU->getCbf( uiAbsPartIdx, TEXT_LUMA, 0 ) );
     
    431412Void TEncEntropy::encodePredInfo( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD )
    432413{
    433 #if INTRA_BL
    434   assert ( !pcCU->isIntraBL( uiAbsPartIdx ) );
    435 #endif
    436414  if( bRD )
    437415  {
     
    607585  UInt uiChromaOffset = uiLumaOffset>>2;
    608586   
    609 #if NO_RESIDUAL_FLAG_FOR_BLPRED
    610   if( pcCU->isIntra(uiAbsPartIdx) && !pcCU->isIntraBL(uiAbsPartIdx) )
    611 #else
    612587  if( pcCU->isIntra(uiAbsPartIdx) )
    613 #endif
    614588  {
    615589    DTRACE_CABAC_VL( g_nSymbolCounter++ )
     
    759733}
    760734
    761 #if INTRA_BL
    762 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 #endif
    776735//! \}
  • trunk/source/Lib/TLibEncoder/TEncEntropy.h

    r313 r345  
    8585  virtual Void codeMergeIndex    ( TComDataCU* pcCU, UInt uiAbsPartIdx ) = 0;
    8686  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
    9188  virtual Void codePartSize      ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0;
    9289  virtual Void codePredMode      ( TComDataCU* pcCU, UInt uiAbsPartIdx ) = 0;
     
    164161  Void encodeMergeFlag    ( TComDataCU* pcCU, UInt uiAbsPartIdx );
    165162  Void encodeMergeIndex   ( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD = false );
    166 #if INTRA_BL
    167   Void encodeIntraBLFlag  ( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD = false );
    168 #endif
    169163  Void encodePredMode          ( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD = false );
    170164  Void encodePartSize          ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, Bool bRD = false );
  • trunk/source/Lib/TLibEncoder/TEncGOP.cpp

    r313 r345  
    511511#if M0457_COL_PICTURE_SIGNALING
    512512      pcSlice->setMFMEnabledFlag(false);
     513#if !REMOVE_COL_PICTURE_SIGNALING
    513514      pcSlice->setAltColIndicationFlag(false);
     515#endif
    514516#endif
    515517    }
     
    645647      pcSlice->setNalUnitType(NAL_UNIT_CODED_SLICE_CRA);
    646648    }
    647 #if ZERO_NUM_DIRECT_LAYERS
     649
    648650    if( m_layerId > 0 && pcSlice->getActiveNumILRRefIdx() == 0 && pcSlice->getNalUnitType() >= NAL_UNIT_CODED_SLICE_BLA_W_LP && pcSlice->getNalUnitType() <= NAL_UNIT_CODED_SLICE_CRA )
    649651    {
    650652      pcSlice->setSliceType(I_SLICE);
    651653    }
    652     else
    653 #endif
    654     if( m_layerId > 0 && !m_pcEncTop->getElRapSliceTypeB() )
     654    else if( m_layerId > 0 && !m_pcEncTop->getElRapSliceTypeB() )
    655655    {
    656656      if( (pcSlice->getNalUnitType() >= NAL_UNIT_CODED_SLICE_BLA_W_LP) &&
     
    760760
    761761#if REF_IDX_FRAMEWORK
    762 #if ZERO_NUM_DIRECT_LAYERS
    763762    if( m_layerId > 0 && pcSlice->getActiveNumILRRefIdx() )
    764 #else
    765     if(m_layerId > 0)
    766 #endif
    767763    {
    768764#if RESTR_CHK
     
    820816    //  Set reference list
    821817#if REF_IDX_FRAMEWORK
    822 #if ZERO_NUM_DIRECT_LAYERS
    823818    if(m_layerId ==  0 || ( m_layerId > 0 && pcSlice->getActiveNumILRRefIdx() == 0 ) )
    824 #else
    825     if(m_layerId ==  0)
    826 #endif
    827819    {
    828820      pcSlice->setRefPicList( rcListPic);
     
    832824#endif
    833825#if REF_IDX_FRAMEWORK
    834 #if ZERO_NUM_DIRECT_LAYERS
    835826    if( m_layerId > 0 && pcSlice->getActiveNumILRRefIdx() )
    836 #else
    837     if(m_layerId > 0)
    838 #endif
    839827    {
    840828      m_pcEncTop->setILRPic(pcPic);
     
    848836      {
    849837        pcSlice->setRefPOCListILP(m_pcEncTop->getIlpList(), pcSlice->getBaseColPic());
    850 #if M0457_COL_PICTURE_SIGNALING
     838#if M0457_COL_PICTURE_SIGNALING && !REMOVE_COL_PICTURE_SIGNALING
    851839        pcSlice->setMotionPredIlp(getMotionPredIlp(pcSlice));
    852840#endif
     
    858846#if REF_IDX_MFM
    859847#if M0457_COL_PICTURE_SIGNALING
     848#if REMOVE_COL_PICTURE_SIGNALING
     849      if( pcSlice->getMFMEnabledFlag() && pcSlice->getActiveNumILRRefIdx() > 0 && m_pcEncTop->getNumMotionPredRefLayers() > 0 )
     850#else
    860851      if( pcSlice->getMFMEnabledFlag() && !(pcSlice->getActiveNumILRRefIdx() > 0 && m_pcEncTop->getNumMotionPredRefLayers() > 0) )
     852#endif
    861853#else
    862854      if( pcSlice->getSPS()->getMFMEnabledFlag() )
     
    30052997}
    30062998
    3007 #if M0457_COL_PICTURE_SIGNALING
     2999#if M0457_COL_PICTURE_SIGNALING && !REMOVE_COL_PICTURE_SIGNALING
    30083000TComPic* TEncGOP::getMotionPredIlp(TComSlice* pcSlice)
    30093001{
  • trunk/source/Lib/TLibEncoder/TEncGOP.h

    r313 r345  
    198198  }
    199199  Void dblMetric( TComPic* pcPic, UInt uiNumSlices );
    200 #if M0457_COL_PICTURE_SIGNALING
     200#if M0457_COL_PICTURE_SIGNALING && !REMOVE_COL_PICTURE_SIGNALING
    201201  TComPic* getMotionPredIlp(TComSlice* pcSlice);
    202202#endif
  • trunk/source/Lib/TLibEncoder/TEncSbac.cpp

    r313 r345  
    8383, m_cTransformSkipSCModel     ( 1,             2,               NUM_TRANSFORMSKIP_FLAG_CTX    , m_contextModels + m_numContextModels, m_numContextModels)
    8484, m_CUTransquantBypassFlagSCModel( 1,          1,               NUM_CU_TRANSQUANT_BYPASS_FLAG_CTX, m_contextModels + m_numContextModels, m_numContextModels)
    85 #if INTRA_BL
    86 , m_cIntraBLPredFlagSCModel   (1,              1,               NUM_INTRA_BL_PRED_CTX         , m_contextModels + m_numContextModels, m_numContextModels)
    87 #endif
    8885{
    8986  assert( m_numContextModels <= MAX_NUM_CTX_MOD );
     
    134131  m_cCUTransSubdivFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_TRANS_SUBDIV_FLAG );
    135132  m_cSaoMergeSCModel.initBuffer      ( eSliceType, iQp, (UChar*)INIT_SAO_MERGE_FLAG );
    136 #if INTRA_BL
    137   m_cIntraBLPredFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_INTRA_BL_PRED_FLAG );
    138 #endif
    139133  m_cSaoTypeIdxSCModel.initBuffer        ( eSliceType, iQp, (UChar*)INIT_SAO_TYPE_IDX );
    140134  m_cTransformSkipSCModel.initBuffer     ( eSliceType, iQp, (UChar*)INIT_TRANSFORMSKIP_FLAG );
     
    169163      curCost  = m_cCUSplitFlagSCModel.calcCost       ( curSliceType, qp, (UChar*)INIT_SPLIT_FLAG );
    170164      curCost += m_cCUSkipFlagSCModel.calcCost        ( curSliceType, qp, (UChar*)INIT_SKIP_FLAG );
    171 #if INTRA_BL
    172       curCost += m_cIntraBLPredFlagSCModel.calcCost   ( curSliceType, qp, (UChar*)INIT_INTRA_BL_PRED_FLAG );
    173 #endif
    174165      curCost += m_cCUMergeFlagExtSCModel.calcCost    ( curSliceType, qp, (UChar*)INIT_MERGE_FLAG_EXT);
    175166      curCost += m_cCUMergeIdxExtSCModel.calcCost     ( curSliceType, qp, (UChar*)INIT_MERGE_IDX_EXT);
     
    243234  m_cCUTransSubdivFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_TRANS_SUBDIV_FLAG );
    244235  m_cSaoMergeSCModel.initBuffer      ( eSliceType, iQp, (UChar*)INIT_SAO_MERGE_FLAG );
    245 #if INTRA_BL
    246   m_cIntraBLPredFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_INTRA_BL_PRED_FLAG );
    247 #endif
    248236  m_cSaoTypeIdxSCModel.initBuffer        ( eSliceType, iQp, (UChar*)INIT_SAO_TYPE_IDX );
    249237  m_cTransformSkipSCModel.initBuffer     ( eSliceType, iQp, (UChar*)INIT_TRANSFORMSKIP_FLAG );
     
    428416{
    429417  PartSize eSize         = pcCU->getPartitionSize( uiAbsPartIdx );
    430 #if INTRA_BL
    431   assert( !pcCU->isIntraBL( uiAbsPartIdx ) );
    432 #endif
     418
    433419  if ( pcCU->isIntra( uiAbsPartIdx ) )
    434420  {
     
    16001586}
    16011587
    1602 #if INTRA_BL
    1603 /** code intra_bl flag
    1604  * \param pcCU
    1605  * \param uiAbsPartIdx
    1606  * \returns Void
    1607  */
    1608 Void TEncSbac::codeIntraBLFlag( TComDataCU* pcCU, UInt uiAbsPartIdx )
    1609 {
    1610   // get context function is here
    1611   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 #endif
    16221588//! \}
  • trunk/source/Lib/TLibEncoder/TEncSbac.h

    r313 r345  
    132132  Void codeSplitFlag     ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    133133  Void codeMVPIdx        ( TComDataCU* pcCU, UInt uiAbsPartIdx, RefPicList eRefList );
    134  
    135 #if INTRA_BL
    136   Void codeIntraBLFlag      ( TComDataCU* pcCU, UInt uiAbsPartIdx );
    137 #endif
     134
    138135  Void codePartSize      ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    139136  Void codePredMode      ( TComDataCU* pcCU, UInt uiAbsPartIdx );
     
    206203  ContextModel3DBuffer m_cTransformSkipSCModel;
    207204  ContextModel3DBuffer m_CUTransquantBypassFlagSCModel;
    208 #if INTRA_BL
    209   ContextModel3DBuffer m_cIntraBLPredFlagSCModel;
    210 #endif
    211205};
    212206
  • trunk/source/Lib/TLibEncoder/TEncSearch.cpp

    r313 r345  
    906906        m_pcEntropyCoder->encodePredMode( pcCU, 0, true );
    907907      }
    908 #if INTRA_BL
    909       m_pcEntropyCoder->encodeIntraBLFlag ( pcCU, 0, true );
    910       if( pcCU->isIntraBL( 0 ) )
    911       {
    912         return;
    913       }
    914 #endif     
     908   
    915909      m_pcEntropyCoder  ->encodePartSize( pcCU, 0, pcCU->getDepth(0), true );
    916910
     
    950944    }
    951945  }
    952 #if INTRA_BL
    953   if( pcCU->isIntraBL( 0 ) )
    954   {
    955     return;
    956   }
    957 #endif
     946
    958947  if( bChroma )
    959948  {
     
    10551044    pcCU->getPattern()->initAdiPattern( pcCU, uiAbsPartIdx, uiTrDepth, m_piYuvExt, m_iYuvExtStride, m_iYuvExtHeight, bAboveAvail, bLeftAvail );
    10561045    //===== get prediction signal =====
    1057 #if INTRA_BL && !NO_RESIDUAL_FLAG_FOR_BLPRED
    1058     if(pcCU->isIntraBL ( uiAbsPartIdx ) )
    1059     {
    1060       pcCU->getBaseLumaBlk( uiWidth, uiHeight, uiAbsPartIdx, piPred, uiStride );
    1061     }
    1062     else
    1063 #endif
    10641046    predIntraLumaAng( pcCU->getPattern(), uiLumaPredMode, piPred, uiStride, uiWidth, uiHeight, bAboveAvail, bLeftAvail );
    10651047    // save prediction
     
    12471229
    12481230    //===== 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
    12591233    // save prediction
    12601234    if( default0Save1Load2 == 1 )
     
    45674541Void TEncSearch::encodeResAndCalcRdInterCU( TComDataCU* pcCU, TComYuv* pcYuvOrg, TComYuv* pcYuvPred, TComYuv*& rpcYuvResi, TComYuv*& rpcYuvResiBest, TComYuv*& rpcYuvRec, Bool bSkipRes )
    45684542{
    4569 #if NO_RESIDUAL_FLAG_FOR_BLPRED
    4570   if ( pcCU->isIntra(0) && !pcCU->isIntraBL(0))
    4571 #else
    45724543  if ( pcCU->isIntra(0) )
    4573 #endif
    45744544  {
    45754545    return;
     
    46824652      pcCU->setTransformSkipSubParts ( 0, 0, 0, 0, pcCU->getDepth(0) );
    46834653    }
    4684 #if NO_RESIDUAL_FLAG_FOR_BLPRED
    4685     else if(pcCU->getLayerId() > 0 && pcCU->isIntraBL(0) && uiZeroDistortion == uiDistortion) // all zeros
    4686     {
    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 #endif
    46984654    else
    46994655    {
     
    49944950      Int scalingListType = 3 + g_eTTable[(Int)TEXT_LUMA];
    49954951      assert(scalingListType < 6);     
    4996 #if NO_RESIDUAL_FLAG_FOR_BLPRED
    4997       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 only
    5000       }
    5001       else
    5002       {
    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 only
    5004       }
    5005 #else
    50064952      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 #endif
    5008      
    50094953      const UInt uiNonzeroDistY = m_pcRdCost->getDistPart(g_bitDepthY, m_pcQTTempTComYuv[uiQTTempAccessLayer].getLumaAddr( absTUPartIdx ), m_pcQTTempTComYuv[uiQTTempAccessLayer].getStride(),
    50104954      pcResi->getLumaAddr( absTUPartIdx ), pcResi->getStride(), trWidth,trHeight );
     
    52755219        assert(scalingListType < 6);     
    52765220
    5277 #if NO_RESIDUAL_FLAG_FOR_BLPRED
    5278         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         else
    5283         {
    5284           m_pcTrQuant->invtransformNxN( pcCU->getCUTransquantBypass(uiAbsPartIdx), TEXT_LUMA,REG_DCT, pcResiCurrY, m_pcQTTempTComYuv[uiQTTempAccessLayer].getStride(),  pcCoeffCurrY, trWidth, trHeight, scalingListType, true );
    5285         }
    5286 #else
    52875221        m_pcTrQuant->invtransformNxN( pcCU->getCUTransquantBypass(uiAbsPartIdx), TEXT_LUMA,REG_DCT, pcResiCurrY, m_pcQTTempTComYuv[uiQTTempAccessLayer].getStride(),  pcCoeffCurrY, trWidth, trHeight, scalingListType, true );
    5288 #endif
    52895222
    52905223        uiNonzeroDistY = m_pcRdCost->getDistPart(g_bitDepthY, m_pcQTTempTComYuv[uiQTTempAccessLayer].getLumaAddr( absTUPartIdx ), m_pcQTTempTComYuv[uiQTTempAccessLayer].getStride(),
     
    56175550
    56185551  {
    5619 #if INTRA_BL
    5620 #if NO_RESIDUAL_FLAG_FOR_BLPRED
    5621     assert( !pcCU->isIntra(uiAbsPartIdx) || pcCU->isIntraBL(uiAbsPartIdx));
    5622 #else
    5623     assert( !pcCU->isIntra(uiAbsPartIdx) );
    5624 #endif
    5625 #else
    56265552    assert( pcCU->getPredictionMode(uiAbsPartIdx) != MODE_INTRA );
    5627 #endif
    56285553    if( bSubdivAndCbf )
    56295554    {
     
    58595784    }
    58605785    m_pcEntropyCoder->encodeSkipFlag ( pcCU, 0, true );
    5861 #if INTRA_BL
    5862     if(m_pcEncCfg->getLayerId())
    5863     {
    5864       m_pcEntropyCoder->encodeIntraBLFlag(pcCU, 0, true);
    5865 #if !NO_RESIDUAL_FLAG_FOR_BLPRED
    5866       assert( pcCU->isIntraBL( 0 ) == false );
    5867 #endif
    5868     }
    5869 #endif
    5870 #if NO_RESIDUAL_FLAG_FOR_BLPRED
    5871     if( !pcCU->isIntraBL(0))
    5872     {
    5873 #endif
    58745786    m_pcEntropyCoder->encodePredMode( pcCU, 0, true );
    58755787    m_pcEntropyCoder->encodePartSize( pcCU, 0, pcCU->getDepth(0), true );
    58765788    m_pcEntropyCoder->encodePredInfo( pcCU, 0, true );
    5877 #if NO_RESIDUAL_FLAG_FOR_BLPRED
    5878     }
    5879 #endif
     5789
    58805790    Bool bDummy = false;
    58815791    m_pcEntropyCoder->encodeCoeff   ( pcCU, 0, pcCU->getDepth(0), pcCU->getWidth(0), pcCU->getHeight(0), bDummy );
     
    62956205#endif
    62966206
    6297 #if INTRA_BL
    6298 Void
    6299 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   else
    6315   {
    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 models
    6328   if( m_bUseSBACRD )
    6329   {
    6330     m_pcRDGoOnSbacCoder->load( m_pppcRDSbacCoder[uiDepth][CI_CURR_BEST] );
    6331   }
    6332  
    6333   // determine residual for partition
    6334   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 #endif
    63526207//! \}
  • trunk/source/Lib/TLibEncoder/TEncSearch.h

    r313 r345  
    9999#if SVC_EXTENSION
    100100  TEncTop**       m_ppcTEncTop;
    101 #if INTRA_BL
    102   TComPicYuv*     m_pcPicYuvRecBase;       ///< reconstructed base layer
    103 #endif
    104101#endif
    105102 
     
    192189                                  TComYuv*    pcRecoYuv,
    193190                                  UInt        uiPreCalcDistC );
    194  
    195 #if INTRA_BL
    196   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 #endif
    204191 
    205192  /// encoder estimation - inter prediction (non-skip)
  • trunk/source/Lib/TLibEncoder/TEncSlice.cpp

    r314 r345  
    345345
    346346#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 ) )
    348348  {
    349349    Int nCurLayer = rpcSlice->getLayerId();
     
    373373  weight = pow( 2.0, (iQP-g_aucChromaScale[qpc])/3.0 );  // takes into account of the chroma qp mapping and chroma qp Offset
    374374#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 )
    376376  {
    377377    dLambda *= 1.1;
     
    503503#if M0457_COL_PICTURE_SIGNALING
    504504    rpcSlice->setMFMEnabledFlag(m_ppcTEncTop[layerId]->getMFMEnabledFlag());
     505#if !REMOVE_COL_PICTURE_SIGNALING
    505506    rpcSlice->setAltColIndicationFlag(rpcSlice->getMFMEnabledFlag());
     507#endif
    506508#endif
    507509  }
     
    979981  UInt uiTileStartLCU = 0;
    980982  UInt uiTileLCUX     = 0;
    981 
    982 #if INTRA_BL
    983   m_pcCuEncoder->setBaseRecPic( rpcPic->getLayerId() > 0 ? rpcPic->getFullPelBaseRec(rpcPic->getLayerId()-1) : NULL);
    984 #endif
    985983
    986984  Bool depSliceSegmentsEnabled = pcSlice->getPPS()->getDependentSliceSegmentsEnabledFlag();
  • trunk/source/Lib/TLibEncoder/TEncTop.cpp

    r313 r345  
    886886  for( Int i = 0; i < getGOPSize()+m_extraRPSs; i++)
    887887  {
     888#if FINAL_RPL_CHANGE_N0082
     889    GOPEntry ge = m_ppcTEncTop[m_cSPS.getLayerId()]->getGOPEntry(i);
     890#else
    888891    GOPEntry ge = getGOPEntry(i);
     892#endif
    889893    rps = rpsList->getReferencePictureSet(i);
    890894    rps->setNumberOfPictures(ge.m_numRefPics);
     
    12041208  if( m_ppcTEncTop[m_layerId]->getNumDirectRefLayers() <= 0 )
    12051209  {
    1206 #if ZERO_NUM_DIRECT_LAYERS
    12071210    return (TEncTop *)getLayerEnc( 0 );
    1208 #else
    1209     return NULL;
    1210 #endif
    12111211  }
    12121212
Note: See TracChangeset for help on using the changeset viewer.