Changeset 1315 in SHVCSoftware


Ignore:
Timestamp:
21 Jul 2015, 01:44:40 (9 years ago)
Author:
seregin
Message:

port rev 4389 and rev 4390

Location:
branches/SHM-dev/source/Lib
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • branches/SHM-dev/source/Lib/TLibCommon/ContextTables.h

    r1259 r1315  
    5858#define NUM_PRED_MODE_CTX             1       ///< number of context models for prediction mode
    5959
    60 #define NUM_ADI_CTX                   1       ///< number of context models for intra prediction
     60#define NUM_INTRA_PREDICT_CTX         1       ///< number of context models for intra prediction
    6161
    6262#define NUM_CHROMA_PRED_CTX           2       ///< number of context models for intra prediction (chroma)
     
    227227
    228228static const UChar
    229 INIT_INTRA_PRED_MODE[NUMBER_OF_SLICE_TYPES][NUM_ADI_CTX] =
     229INIT_INTRA_PRED_MODE[NUMBER_OF_SLICE_TYPES][NUM_INTRA_PREDICT_CTX] =
    230230{
    231231  { 183, },
  • branches/SHM-dev/source/Lib/TLibCommon/TComDataCU.cpp

    r1312 r1315  
    11491149}
    11501150
    1151 TComDataCU* TComDataCU::getPUAboveRight( UInt& uiARPartUnitIdx, UInt uiCurrPartUnitIdx, Bool bEnforceSliceRestriction )
    1152 {
    1153   UInt uiAbsPartIdxRT     = g_auiZscanToRaster[uiCurrPartUnitIdx];
    1154   UInt uiAbsZorderCUIdx   = g_auiZscanToRaster[ m_absZIdxInCtu ] + m_puhWidth[0] / m_pcPic->getMinCUWidth() - 1;
    1155   const UInt numPartInCtuWidth = m_pcPic->getNumPartInCtuWidth();
    1156  
    1157 #if SVC_EXTENSION
    1158   if( ( m_pcPic->getCtu(m_ctuRsAddr)->getCUPelX() + g_auiRasterToPelX[uiAbsPartIdxRT] + m_pcPic->getMinCUWidth() ) >= m_pcSlice->getPicWidthInLumaSamples() )
    1159 #else
    1160   if( ( m_pcPic->getCtu(m_ctuRsAddr)->getCUPelX() + g_auiRasterToPelX[uiAbsPartIdxRT] + m_pcPic->getMinCUWidth() ) >= m_pcSlice->getSPS()->getPicWidthInLumaSamples() )
    1161 #endif
    1162   {
    1163     uiARPartUnitIdx = MAX_UINT;
    1164     return NULL;
    1165   }
    1166 
    1167   if ( RasterAddress::lessThanCol( uiAbsPartIdxRT, numPartInCtuWidth - 1, numPartInCtuWidth ) )
    1168   {
    1169     if ( !RasterAddress::isZeroRow( uiAbsPartIdxRT, numPartInCtuWidth ) )
    1170     {
    1171       if ( uiCurrPartUnitIdx > g_auiRasterToZscan[ uiAbsPartIdxRT - numPartInCtuWidth + 1 ] )
    1172       {
    1173         uiARPartUnitIdx = g_auiRasterToZscan[ uiAbsPartIdxRT - numPartInCtuWidth + 1 ];
    1174         if ( RasterAddress::isEqualRowOrCol( uiAbsPartIdxRT, uiAbsZorderCUIdx, numPartInCtuWidth ) )
    1175         {
    1176           return m_pcPic->getCtu( getCtuRsAddr() );
    1177         }
    1178         else
    1179         {
    1180           uiARPartUnitIdx -= m_absZIdxInCtu;
    1181           return this;
    1182         }
    1183       }
    1184       uiARPartUnitIdx = MAX_UINT;
    1185       return NULL;
    1186     }
    1187     uiARPartUnitIdx = g_auiRasterToZscan[ uiAbsPartIdxRT + m_pcPic->getNumPartitionsInCtu() - numPartInCtuWidth + 1 ];
    1188 
    1189     if ( bEnforceSliceRestriction && !CUIsFromSameSliceAndTile(m_pCtuAbove) )
    1190     {
    1191       return NULL;
    1192     }
    1193     return m_pCtuAbove;
    1194   }
    1195 
    1196   if ( !RasterAddress::isZeroRow( uiAbsPartIdxRT, numPartInCtuWidth ) )
    1197   {
    1198     uiARPartUnitIdx = MAX_UINT;
    1199     return NULL;
    1200   }
    1201 
    1202   uiARPartUnitIdx = g_auiRasterToZscan[ m_pcPic->getNumPartitionsInCtu() - numPartInCtuWidth ];
    1203 
    1204   if ( bEnforceSliceRestriction && !CUIsFromSameSliceAndTile(m_pCtuAboveRight) )
    1205   {
    1206     return NULL;
    1207   }
    1208   return m_pCtuAboveRight;
    1209 }
    1210 
    1211 TComDataCU* TComDataCU::getPUBelowLeft( UInt& uiBLPartUnitIdx, UInt uiCurrPartUnitIdx, Bool bEnforceSliceRestriction )
    1212 {
    1213   UInt uiAbsPartIdxLB     = g_auiZscanToRaster[uiCurrPartUnitIdx];
    1214   const UInt numPartInCtuWidth = m_pcPic->getNumPartInCtuWidth();
    1215   UInt uiAbsZorderCUIdxLB = g_auiZscanToRaster[ m_absZIdxInCtu ] + (m_puhHeight[0] / m_pcPic->getMinCUHeight() - 1)*numPartInCtuWidth;
    1216 
    1217 #if SVC_EXTENSION
    1218   if( ( m_pcPic->getCtu(m_ctuRsAddr)->getCUPelY() + g_auiRasterToPelY[uiAbsPartIdxLB] + m_pcPic->getMinCUHeight() ) >= m_pcSlice->getPicHeightInLumaSamples() )
    1219 #else
    1220   if( ( m_pcPic->getCtu(m_ctuRsAddr)->getCUPelY() + g_auiRasterToPelY[uiAbsPartIdxLB] + m_pcPic->getMinCUHeight() ) >= m_pcSlice->getSPS()->getPicHeightInLumaSamples() )
    1221 #endif
    1222   {
    1223     uiBLPartUnitIdx = MAX_UINT;
    1224     return NULL;
    1225   }
    1226 
    1227   if ( RasterAddress::lessThanRow( uiAbsPartIdxLB, m_pcPic->getNumPartInCtuHeight() - 1, numPartInCtuWidth ) )
    1228   {
    1229     if ( !RasterAddress::isZeroCol( uiAbsPartIdxLB, numPartInCtuWidth ) )
    1230     {
    1231       if ( uiCurrPartUnitIdx > g_auiRasterToZscan[ uiAbsPartIdxLB + numPartInCtuWidth - 1 ] )
    1232       {
    1233         uiBLPartUnitIdx = g_auiRasterToZscan[ uiAbsPartIdxLB + numPartInCtuWidth - 1 ];
    1234         if ( RasterAddress::isEqualRowOrCol( uiAbsPartIdxLB, uiAbsZorderCUIdxLB, numPartInCtuWidth ) )
    1235         {
    1236           return m_pcPic->getCtu( getCtuRsAddr() );
    1237         }
    1238         else
    1239         {
    1240           uiBLPartUnitIdx -= m_absZIdxInCtu;
    1241           return this;
    1242         }
    1243       }
    1244       uiBLPartUnitIdx = MAX_UINT;
    1245       return NULL;
    1246     }
    1247     uiBLPartUnitIdx = g_auiRasterToZscan[ uiAbsPartIdxLB + numPartInCtuWidth*2 - 1 ];
    1248     if ( bEnforceSliceRestriction && !CUIsFromSameSliceAndTile(m_pCtuLeft) )
    1249     {
    1250       return NULL;
    1251     }
    1252     return m_pCtuLeft;
    1253   }
    1254 
    1255   uiBLPartUnitIdx = MAX_UINT;
    1256   return NULL;
    1257 }
    1258 
    1259 TComDataCU* TComDataCU::getPUBelowLeftAdi(UInt& uiBLPartUnitIdx,  UInt uiCurrPartUnitIdx, UInt uiPartUnitOffset, Bool bEnforceSliceRestriction)
     1151TComDataCU* TComDataCU::getPUBelowLeft(UInt& uiBLPartUnitIdx,  UInt uiCurrPartUnitIdx, UInt uiPartUnitOffset, Bool bEnforceSliceRestriction)
    12601152{
    12611153  UInt uiAbsPartIdxLB     = g_auiZscanToRaster[uiCurrPartUnitIdx];
     
    13051197}
    13061198
    1307 TComDataCU* TComDataCU::getPUAboveRightAdi(UInt&  uiARPartUnitIdx, UInt uiCurrPartUnitIdx, UInt uiPartUnitOffset, Bool bEnforceSliceRestriction)
     1199TComDataCU* TComDataCU::getPUAboveRight(UInt&  uiARPartUnitIdx, UInt uiCurrPartUnitIdx, UInt uiPartUnitOffset, Bool bEnforceSliceRestriction)
    13081200{
    13091201  UInt uiAbsPartIdxRT     = g_auiZscanToRaster[uiCurrPartUnitIdx];
     
    22812173      break;
    22822174  }
    2283 }
    2284 
    2285 Void TComDataCU::deriveLeftRightTopIdxAdi ( UInt& ruiPartIdxLT, UInt& ruiPartIdxRT, UInt uiPartOffset, UInt uiPartDepth )
    2286 {
    2287   UInt uiNumPartInWidth = (m_puhWidth[0]/m_pcPic->getMinCUWidth())>>uiPartDepth;
    2288   ruiPartIdxLT = m_absZIdxInCtu + uiPartOffset;
    2289   ruiPartIdxRT = g_auiRasterToZscan[ g_auiZscanToRaster[ ruiPartIdxLT ] + uiNumPartInWidth - 1 ];
    2290 }
    2291 
    2292 Void TComDataCU::deriveLeftBottomIdxAdi( UInt& ruiPartIdxLB, UInt uiPartOffset, UInt uiPartDepth )
    2293 {
    2294   UInt uiAbsIdx;
    2295   UInt uiMinCuWidth, uiWidthInMinCus;
    2296 
    2297   uiMinCuWidth    = getPic()->getMinCUWidth();
    2298   uiWidthInMinCus = (getWidth(0)/uiMinCuWidth)>>uiPartDepth;
    2299   uiAbsIdx        = getZorderIdxInCtu()+uiPartOffset+(m_uiNumPartition>>(uiPartDepth<<1))-1;
    2300   uiAbsIdx        = g_auiZscanToRaster[uiAbsIdx]-(uiWidthInMinCus-1);
    2301   ruiPartIdxLB    = g_auiRasterToZscan[uiAbsIdx];
    23022175}
    23032176
  • branches/SHM-dev/source/Lib/TLibCommon/TComDataCU.h

    r1312 r1315  
    414414                                              Bool bEnforceTileRestriction=true );
    415415  TComDataCU*   getPUAboveLeft              ( UInt&  uiALPartUnitIdx, UInt uiCurrPartUnitIdx, Bool bEnforceSliceRestriction=true );
    416   TComDataCU*   getPUAboveRight             ( UInt&  uiARPartUnitIdx, UInt uiCurrPartUnitIdx, Bool bEnforceSliceRestriction=true );
    417   TComDataCU*   getPUBelowLeft              ( UInt&  uiBLPartUnitIdx, UInt uiCurrPartUnitIdx, Bool bEnforceSliceRestriction=true );
    418416
    419417  TComDataCU*   getQpMinCuLeft              ( UInt&  uiLPartUnitIdx , UInt uiCurrAbsIdxInCtu );
     
    421419  Char          getRefQP                    ( UInt   uiCurrAbsIdxInCtu                       );
    422420
    423   TComDataCU*   getPUAboveRightAdi          ( UInt&  uiARPartUnitIdx, UInt uiCurrPartUnitIdx, UInt uiPartUnitOffset = 1, Bool bEnforceSliceRestriction=true );
    424   TComDataCU*   getPUBelowLeftAdi           ( UInt&  uiBLPartUnitIdx, UInt uiCurrPartUnitIdx, UInt uiPartUnitOffset = 1, Bool bEnforceSliceRestriction=true );
     421  /// returns CU and part index of the PU above the top row of the current uiCurrPartUnitIdx of the CU, at a horizontal offset (to the right) of uiPartUnitOffset (in parts)
     422  TComDataCU*   getPUAboveRight             ( UInt&  uiARPartUnitIdx, UInt uiCurrPartUnitIdx, UInt uiPartUnitOffset = 1, Bool bEnforceSliceRestriction=true );
     423  /// returns CU and part index of the PU left of the lefthand column of the current uiCurrPartUnitIdx of the CU, at a vertical offset (below) of uiPartUnitOffset (in parts)
     424  TComDataCU*   getPUBelowLeft              ( UInt&  uiBLPartUnitIdx, UInt uiCurrPartUnitIdx, UInt uiPartUnitOffset = 1, Bool bEnforceSliceRestriction=true );
    425425
    426426  Void          deriveLeftRightTopIdx       ( UInt uiPartIdx, UInt& ruiPartIdxLT, UInt& ruiPartIdxRT );
    427427  Void          deriveLeftBottomIdx         ( UInt uiPartIdx, UInt& ruiPartIdxLB );
    428 
    429   Void          deriveLeftRightTopIdxAdi    ( UInt& ruiPartIdxLT, UInt& ruiPartIdxRT, UInt uiPartOffset, UInt uiPartDepth );
    430   Void          deriveLeftBottomIdxAdi      ( UInt& ruiPartIdxLB, UInt  uiPartOffset, UInt uiPartDepth ); // NOTE: Unused function.
    431428
    432429  Bool          hasEqualMotion              ( UInt uiAbsPartIdx, TComDataCU* pcCandCU, UInt uiCandAbsPartIdx );
  • branches/SHM-dev/source/Lib/TLibCommon/TComPattern.cpp

    r1307 r1315  
    5454#endif
    5555                           const Pel* piRoiOrigin,
    56                                  Pel* piAdiTemp,
     56                                 Pel* piIntraTemp,
    5757                           const Bool* bNeighborFlags,
    5858                           const Int iNumIntraNeighbor,
     
    113113
    114114// TODO: move this function to TComPrediction.cpp.
    115 Void TComPrediction::initAdiPatternChType( TComTU &rTu, Bool& bAbove, Bool& bLeft, const ComponentID compID, const Bool bFilterRefSamples DEBUG_STRING_FN_DECLARE(sDebug))
     115Void TComPrediction::initIntraPatternChType( TComTU &rTu, Bool& bAbove, Bool& bLeft, const ComponentID compID, const Bool bFilterRefSamples DEBUG_STRING_FN_DECLARE(sDebug))
    116116{
    117117  const ChannelType chType    = toChannelType(compID);
     
    169169
    170170  {
    171     Pel *piAdiTemp   = m_piYuvExt[compID][PRED_BUF_UNFILTERED];
     171    Pel *piIntraTemp   = m_piYuvExt[compID][PRED_BUF_UNFILTERED];
    172172    Pel *piRoiOrigin = pcCU->getPic()->getPicYuvRec()->getAddr(compID, pcCU->getCtuRsAddr(), pcCU->getZorderIdxInCtu()+uiZorderIdxInPart);
    173173#if O0043_BEST_EFFORT_DECODING
     
    177177    fillReferenceSamples (bitDepthForChannel,
    178178#endif
    179                           piRoiOrigin, piAdiTemp, bNeighborFlags, iNumIntraNeighbor,  iUnitWidth, iUnitHeight, iAboveUnits, iLeftUnits,
     179                          piRoiOrigin, piIntraTemp, bNeighborFlags, iNumIntraNeighbor,  iUnitWidth, iUnitHeight, iAboveUnits, iLeftUnits,
    180180                          uiROIWidth, uiROIHeight, iPicStride);
    181181
     
    192192          if (x==0 || y==0)
    193193          {
    194             ss << piAdiTemp[y*uiROIWidth + x] << ", ";
     194            ss << piIntraTemp[y*uiROIWidth + x] << ", ";
    195195//          if (x%16==15) ss << "\nPart size: ~ ";
    196196          }
     
    206206
    207207            Int          stride    = uiROIWidth;
    208       const Pel         *piSrcPtr  = piAdiTemp                             + (stride * uiTuHeight2); // bottom left
     208      const Pel         *piSrcPtr  = piIntraTemp                           + (stride * uiTuHeight2); // bottom left
    209209            Pel         *piDestPtr = m_piYuvExt[compID][PRED_BUF_FILTERED] + (stride * uiTuHeight2); // bottom left
    210210
     
    213213      Bool useStrongIntraSmoothing = isLuma(chType) && sps.getUseStrongIntraSmoothing();
    214214
    215       const Pel bottomLeft = piAdiTemp[stride * uiTuHeight2];
    216       const Pel topLeft    = piAdiTemp[0];
    217       const Pel topRight   = piAdiTemp[uiTuWidth2];
     215      const Pel bottomLeft = piIntraTemp[stride * uiTuHeight2];
     216      const Pel topLeft    = piIntraTemp[0];
     217      const Pel topRight   = piIntraTemp[uiTuWidth2];
    218218
    219219      if (useStrongIntraSmoothing)
     
    224224        const Int  threshold     = 1 << (bitDepthForChannel - 5);
    225225#endif
    226         const Bool bilinearLeft  = abs((bottomLeft + topLeft ) - (2 * piAdiTemp[stride * uiTuHeight])) < threshold; //difference between the
    227         const Bool bilinearAbove = abs((topLeft    + topRight) - (2 * piAdiTemp[         uiTuWidth ])) < threshold; //ends and the middle
     226        const Bool bilinearLeft  = abs((bottomLeft + topLeft ) - (2 * piIntraTemp[stride * uiTuHeight])) < threshold; //difference between the
     227        const Bool bilinearAbove = abs((topLeft    + topRight) - (2 * piIntraTemp[         uiTuWidth ])) < threshold; //ends and the middle
    228228        if ((uiTuWidth < 32) || (!bilinearLeft) || (!bilinearAbove))
    229229        {
     
    332332#endif
    333333                           const Pel* piRoiOrigin,
    334                                  Pel* piAdiTemp,
     334                                 Pel* piIntraTemp,
    335335                           const Bool* bNeighborFlags,
    336336                           const Int iNumIntraNeighbor,
     
    353353    for (i=0; i<uiWidth; i++)
    354354    {
    355       piAdiTemp[i] = iDCValue;
     355      piIntraTemp[i] = iDCValue;
    356356    }
    357357    for (i=1; i<uiHeight; i++)
    358358    {
    359       piAdiTemp[i*uiWidth] = iDCValue;
     359      piIntraTemp[i*uiWidth] = iDCValue;
    360360    }
    361361  }
     
    368368    {
    369369#if O0043_BEST_EFFORT_DECODING
    370       piAdiTemp[i] = piRoiTemp[i] << bitDepthDelta;
     370      piIntraTemp[i] = piRoiTemp[i] << bitDepthDelta;
    371371#else
    372       piAdiTemp[i] = piRoiTemp[i];
     372      piIntraTemp[i] = piRoiTemp[i];
    373373#endif
    374374    }
     
    380380    {
    381381#if O0043_BEST_EFFORT_DECODING
    382       piAdiTemp[i*uiWidth] = (*(piRoiTemp)) << bitDepthDelta;
     382      piIntraTemp[i*uiWidth] = (*(piRoiTemp)) << bitDepthDelta;
    383383#else
    384       piAdiTemp[i*uiWidth] = *(piRoiTemp);
     384      piIntraTemp[i*uiWidth] = *(piRoiTemp);
    385385#endif
    386386      piRoiTemp += iPicStride;
     
    391391    // all above units have "unitWidth" samples each, all left/below-left units have "unitHeight" samples each
    392392    const Int  iTotalSamples = (iLeftUnits * unitHeight) + ((iAboveUnits + 1) * unitWidth);
    393     Pel  piAdiLine[5 * MAX_CU_SIZE];
    394     Pel  *piAdiLineTemp;
     393    Pel  piIntraLine[5 * MAX_CU_SIZE];
     394    Pel  *piIntraLineTemp;
    395395    const Bool *pbNeighborFlags;
    396396
     
    399399    for (i=0; i<iTotalSamples; i++)
    400400    {
    401       piAdiLine[i] = iDCValue;
     401      piIntraLine[i] = iDCValue;
    402402    }
    403403
    404404    // Fill top-left sample
    405405    piRoiTemp = piRoiOrigin - iPicStride - 1;
    406     piAdiLineTemp = piAdiLine + (iLeftUnits * unitHeight);
     406    piIntraLineTemp = piIntraLine + (iLeftUnits * unitHeight);
    407407    pbNeighborFlags = bNeighborFlags + iLeftUnits;
    408408    if (*pbNeighborFlags)
     
    415415      for (i=0; i<unitWidth; i++)
    416416      {
    417         piAdiLineTemp[i] = topLeftVal;
     417        piIntraLineTemp[i] = topLeftVal;
    418418      }
    419419    }
     
    421421    // Fill left & below-left samples (downwards)
    422422    piRoiTemp += iPicStride;
    423     piAdiLineTemp--;
     423    piIntraLineTemp--;
    424424    pbNeighborFlags--;
    425425
     
    431431        {
    432432#if O0043_BEST_EFFORT_DECODING
    433           piAdiLineTemp[-i] = piRoiTemp[i*iPicStride] << bitDepthDelta;
     433          piIntraLineTemp[-i] = piRoiTemp[i*iPicStride] << bitDepthDelta;
    434434#else
    435           piAdiLineTemp[-i] = piRoiTemp[i*iPicStride];
     435          piIntraLineTemp[-i] = piRoiTemp[i*iPicStride];
    436436#endif
    437437        }
    438438      }
    439439      piRoiTemp += unitHeight*iPicStride;
    440       piAdiLineTemp -= unitHeight;
     440      piIntraLineTemp -= unitHeight;
    441441      pbNeighborFlags--;
    442442    }
     
    445445    piRoiTemp = piRoiOrigin - iPicStride;
    446446    // offset line buffer by iNumUints2*unitHeight (for left/below-left) + unitWidth (for above-left)
    447     piAdiLineTemp = piAdiLine + (iLeftUnits * unitHeight) + unitWidth;
     447    piIntraLineTemp = piIntraLine + (iLeftUnits * unitHeight) + unitWidth;
    448448    pbNeighborFlags = bNeighborFlags + iLeftUnits + 1;
    449449    for (j=0; j<iAboveUnits; j++)
     
    454454        {
    455455#if O0043_BEST_EFFORT_DECODING
    456           piAdiLineTemp[i] = piRoiTemp[i] << bitDepthDelta;
     456          piIntraLineTemp[i] = piRoiTemp[i] << bitDepthDelta;
    457457#else
    458           piAdiLineTemp[i] = piRoiTemp[i];
     458          piIntraLineTemp[i] = piRoiTemp[i];
    459459#endif
    460460        }
    461461      }
    462462      piRoiTemp += unitWidth;
    463       piAdiLineTemp += unitWidth;
     463      piIntraLineTemp += unitWidth;
    464464      pbNeighborFlags++;
    465465    }
     
    467467    // Pad reference samples when necessary
    468468    Int iCurrJnit = 0;
    469     Pel  *piAdiLineCur   = piAdiLine;
    470     const UInt piAdiLineTopRowOffset = iLeftUnits * (unitHeight - unitWidth);
     469    Pel  *piIntraLineCur   = piIntraLine;
     470    const UInt piIntraLineTopRowOffset = iLeftUnits * (unitHeight - unitWidth);
    471471
    472472    if (!bNeighborFlags[0])
     
    479479          iNext++;
    480480        }
    481         Pel *piAdiLineNext = piAdiLine + ((iNext < iLeftUnits) ? (iNext * unitHeight) : (piAdiLineTopRowOffset + (iNext * unitWidth)));
    482         const Pel refSample = *piAdiLineNext;
     481        Pel *piIntraLineNext = piIntraLine + ((iNext < iLeftUnits) ? (iNext * unitHeight) : (piIntraLineTopRowOffset + (iNext * unitWidth)));
     482        const Pel refSample = *piIntraLineNext;
    483483        // Pad unavailable samples with new value
    484484        Int iNextOrTop = std::min<Int>(iNext, iLeftUnits);
     
    488488          for (i=0; i<unitHeight; i++)
    489489          {
    490             piAdiLineCur[i] = refSample;
     490            piIntraLineCur[i] = refSample;
    491491          }
    492           piAdiLineCur += unitHeight;
     492          piIntraLineCur += unitHeight;
    493493          iCurrJnit++;
    494494        }
     
    498498          for (i=0; i<unitWidth; i++)
    499499          {
    500             piAdiLineCur[i] = refSample;
     500            piIntraLineCur[i] = refSample;
    501501          }
    502           piAdiLineCur += unitWidth;
     502          piIntraLineCur += unitWidth;
    503503          iCurrJnit++;
    504504        }
     
    513513        {
    514514          const Int numSamplesInCurrUnit = (iCurrJnit >= iLeftUnits) ? unitWidth : unitHeight;
    515           const Pel refSample = *(piAdiLineCur-1);
     515          const Pel refSample = *(piIntraLineCur-1);
    516516          for (i=0; i<numSamplesInCurrUnit; i++)
    517517          {
    518             piAdiLineCur[i] = refSample;
     518            piIntraLineCur[i] = refSample;
    519519          }
    520           piAdiLineCur += numSamplesInCurrUnit;
     520          piIntraLineCur += numSamplesInCurrUnit;
    521521          iCurrJnit++;
    522522        }
     
    524524      else
    525525      {
    526         piAdiLineCur += (iCurrJnit >= iLeftUnits) ? unitWidth : unitHeight;
     526        piIntraLineCur += (iCurrJnit >= iLeftUnits) ? unitWidth : unitHeight;
    527527        iCurrJnit++;
    528528      }
     
    531531    // Copy processed samples
    532532
    533     piAdiLineTemp = piAdiLine + uiHeight + unitWidth - 2;
     533    piIntraLineTemp = piIntraLine + uiHeight + unitWidth - 2;
    534534    // top left, top and top right samples
    535535    for (i=0; i<uiWidth; i++)
    536536    {
    537       piAdiTemp[i] = piAdiLineTemp[i];
    538     }
    539 
    540     piAdiLineTemp = piAdiLine + uiHeight - 1;
     537      piIntraTemp[i] = piIntraLineTemp[i];
     538    }
     539
     540    piIntraLineTemp = piIntraLine + uiHeight - 1;
    541541    for (i=1; i<uiHeight; i++)
    542542    {
    543       piAdiTemp[i*uiWidth] = piAdiLineTemp[-i];
     543      piIntraTemp[i*uiWidth] = piIntraLineTemp[-i];
    544544    }
    545545  }
     
    681681  {
    682682    UInt uiPartAboveRight;
    683     TComDataCU* pcCUAboveRight = pcCU->getPUAboveRightAdi( uiPartAboveRight, uiPartIdxRT, uiOffset );
     683    TComDataCU* pcCUAboveRight = pcCU->getPUAboveRight( uiPartAboveRight, uiPartIdxRT, uiOffset );
    684684    if(pcCU->getSlice()->getPPS()->getConstrainedIntraPred())
    685685    {
     
    721721  {
    722722    UInt uiPartBelowLeft;
    723     TComDataCU* pcCUBelowLeft = pcCU->getPUBelowLeftAdi( uiPartBelowLeft, uiPartIdxLB, uiOffset );
     723    TComDataCU* pcCUBelowLeft = pcCU->getPUBelowLeft( uiPartBelowLeft, uiPartIdxLB, uiOffset );
    724724    if(pcCU->getSlice()->getPPS()->getConstrainedIntraPred())
    725725    {
  • branches/SHM-dev/source/Lib/TLibCommon/TComPrediction.h

    r1307 r1315  
    132132
    133133  // This function is actually still in TComPattern.cpp
    134   /// set parameters from CU data for accessing ADI data
    135   Void initAdiPatternChType ( TComTU &rTu,
     134  /// set parameters from CU data for accessing intra data
     135  Void initIntraPatternChType ( TComTU &rTu,
    136136                              Bool&       bAbove,
    137137                              Bool&       bLeft,
  • branches/SHM-dev/source/Lib/TLibCommon/TComRom.cpp

    r1292 r1315  
    507507
    508508// ====================================================================================================================
    509 // ADI
     509// Intra prediction
    510510// ====================================================================================================================
    511511
  • branches/SHM-dev/source/Lib/TLibCommon/TComRom.h

    r1292 r1315  
    139139
    140140// ====================================================================================================================
    141 // ADI table
     141// Intra prediction table
    142142// ====================================================================================================================
    143143
  • branches/SHM-dev/source/Lib/TLibCommon/TComYuv.cpp

    r1313 r1315  
    230230Void TComYuv::copyPartToPartComponent  ( const ComponentID compID, TComYuv* pcYuvDst, const UInt uiPartIdx, const UInt iWidthComponent, const UInt iHeightComponent ) const
    231231{
    232   const Pel* pSrc =           getAddr(compID);
     232  const Pel* pSrc =           getAddr(compID, uiPartIdx);
    233233        Pel* pDst = pcYuvDst->getAddr(compID, uiPartIdx);
    234234  if( pSrc == pDst )
  • branches/SHM-dev/source/Lib/TLibDecoder/TDecCu.cpp

    r1307 r1315  
    583583
    584584  DEBUG_STRING_NEW(sTemp)
    585   m_pcPrediction->initAdiPatternChType( rTu, bAboveAvail, bLeftAvail, compID, bUseFilteredPredictions  DEBUG_STRING_PASS_INTO(sTemp) );
     585  m_pcPrediction->initIntraPatternChType( rTu, bAboveAvail, bLeftAvail, compID, bUseFilteredPredictions  DEBUG_STRING_PASS_INTO(sTemp) );
    586586
    587587
  • branches/SHM-dev/source/Lib/TLibDecoder/TDecSbac.cpp

    r1305 r1315  
    7171, m_cCUPartSizeSCModel                       ( 1,             1,                      NUM_PART_SIZE_CTX                    , m_contextModels + m_numContextModels, m_numContextModels)
    7272, m_cCUPredModeSCModel                       ( 1,             1,                      NUM_PRED_MODE_CTX                    , m_contextModels + m_numContextModels, m_numContextModels)
    73 , m_cCUIntraPredSCModel                      ( 1,             1,                      NUM_ADI_CTX                          , m_contextModels + m_numContextModels, m_numContextModels)
     73, m_cCUIntraPredSCModel                      ( 1,             1,                      NUM_INTRA_PREDICT_CTX                , m_contextModels + m_numContextModels, m_numContextModels)
    7474, m_cCUChromaPredSCModel                     ( 1,             1,                      NUM_CHROMA_PRED_CTX                  , m_contextModels + m_numContextModels, m_numContextModels)
    7575, m_cCUDeltaQpSCModel                        ( 1,             1,                      NUM_DELTA_QP_CTX                     , m_contextModels + m_numContextModels, m_numContextModels)
  • branches/SHM-dev/source/Lib/TLibEncoder/TEncSbac.cpp

    r1307 r1315  
    6666, m_cCUPartSizeSCModel                 ( 1,             1,                      NUM_PART_SIZE_CTX                    , m_contextModels + m_numContextModels, m_numContextModels)
    6767, m_cCUPredModeSCModel                 ( 1,             1,                      NUM_PRED_MODE_CTX                    , m_contextModels + m_numContextModels, m_numContextModels)
    68 , m_cCUIntraPredSCModel                ( 1,             1,                      NUM_ADI_CTX                          , m_contextModels + m_numContextModels, m_numContextModels)
     68, m_cCUIntraPredSCModel                ( 1,             1,                      NUM_INTRA_PREDICT_CTX                , m_contextModels + m_numContextModels, m_numContextModels)
    6969, m_cCUChromaPredSCModel               ( 1,             1,                      NUM_CHROMA_PRED_CTX                  , m_contextModels + m_numContextModels, m_numContextModels)
    7070, m_cCUDeltaQpSCModel                  ( 1,             1,                      NUM_DELTA_QP_CTX                     , m_contextModels + m_numContextModels, m_numContextModels)
  • branches/SHM-dev/source/Lib/TLibEncoder/TEncSearch.cpp

    r1313 r1315  
    11751175    const Bool bUseFilteredPredictions=TComPrediction::filteringIntraReferenceSamples(compID, uiChFinalMode, uiWidth, uiHeight, chFmt, sps.getDisableIntraReferenceSmoothing());
    11761176
    1177     initAdiPatternChType( rTu, bAboveAvail, bLeftAvail, compID, bUseFilteredPredictions DEBUG_STRING_PASS_INTO(sDebug) );
     1177    initIntraPatternChType( rTu, bAboveAvail, bLeftAvail, compID, bUseFilteredPredictions DEBUG_STRING_PASS_INTO(sDebug) );
    11781178
    11791179    //===== get prediction signal =====
     
    22602260    if (tuRecurseWithPU.ProcessComponentSection(COMPONENT_Y))
    22612261    {
    2262       initAdiPatternChType( tuRecurseWithPU, bAboveAvail, bLeftAvail, COMPONENT_Y, true DEBUG_STRING_PASS_INTO(sTemp2) );
     2262      initIntraPatternChType( tuRecurseWithPU, bAboveAvail, bLeftAvail, COMPONENT_Y, true DEBUG_STRING_PASS_INTO(sTemp2) );
    22632263    }
    22642264
     
    39763976  else    //non ILR reference pic
    39773977#endif
    3978   xPatternSearchFracDIF( bIsLosslessCoded, pcPatternKey, piRefY, iRefStride, &rcMv, cMvHalf, cMvQter, ruiCost ); 
     3978  xPatternSearchFracDIF( bIsLosslessCoded, pcPatternKey, piRefY, iRefStride, &rcMv, cMvHalf, cMvQter, ruiCost );
    39793979
    39803980  m_pcRdCost->setCostScale( 0 );
Note: See TracChangeset for help on using the changeset viewer.