Changeset 1313 in 3DVCSoftware for trunk/source/Lib/TLibCommon/TComPattern.h


Ignore:
Timestamp:
13 Aug 2015, 17:38:13 (9 years ago)
Author:
tech
Message:

Merged 14.1-update-dev1@1312.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/Lib/TLibCommon/TComPattern.h

    r1179 r1313  
    22 * License, included below. This software may be subject to other third party
    33 * and contributor rights, including patent rights, and no such rights are
    4  * granted under this license. 
     4 * granted under this license.
    55 *
    6 * Copyright (c) 2010-2015, ITU/ISO/IEC
     6 * Copyright (c) 2010-2015, ITU/ISO/IEC
    77 * All rights reserved.
    88 *
     
    4040
    4141// Include files
    42 #include <stdio.h>
    4342#include "CommonDef.h"
    4443
     
    5150
    5251class TComDataCU;
     52class TComTU;
    5353
    5454/// neighbouring pixel access class for one component
     
    5656{
    5757private:
    58   Int   m_iOffsetLeft;
    59   Int   m_iOffsetAbove;
    60   Pel*  m_piPatternOrigin;
    61  
     58  Pel*  m_piROIOrigin;
     59
    6260public:
    6361  Int   m_iROIWidth;
    6462  Int   m_iROIHeight;
    6563  Int   m_iPatternStride;
    66  
    67   /// return starting position of buffer
    68   Pel*  getPatternOrigin()        { return  m_piPatternOrigin; }
    69  
     64  Int   m_bitDepth;
     65
    7066  /// return starting position of ROI (ROI = &pattern[AboveOffset][LeftOffset])
    7167  __inline Pel*  getROIOrigin()
    7268  {
    73     return  m_piPatternOrigin + m_iPatternStride * m_iOffsetAbove + m_iOffsetLeft;
     69    return  m_piROIOrigin;
    7470  }
    75  
     71
    7672  /// set parameters from Pel buffer for accessing neighbouring pixels
    77   Void setPatternParamPel ( Pel*        piTexture,
    78                            Int         iRoiWidth,
    79                            Int         iRoiHeight,
    80                            Int         iStride,
    81                            Int         iOffsetLeft,
    82                            Int         iOffsetAbove );
    83  
    84   /// set parameters of one color component from CU data for accessing neighbouring pixels
    85   Void setPatternParamCU  ( TComDataCU* pcCU,
    86                            UChar       iComp,
    87                            UChar       iRoiWidth,
    88                            UChar       iRoiHeight,
    89                            Int         iOffsetLeft,
    90                            Int         iOffsetAbove,
    91                            UInt        uiAbsZorderIdx );
     73  Void setPatternParamPel( Pel* piTexture, Int iRoiWidth, Int iRoiHeight, Int iStride, Int bitDepth );
    9274};
    9375
     
    9779private:
    9880  TComPatternParam  m_cPatternY;
    99   TComPatternParam  m_cPatternCb;
    100   TComPatternParam  m_cPatternCr;
    101 #if H_3D_IC
     81//  TComPatternParam  m_cPatternCb;
     82  //TComPatternParam  m_cPatternCr;
     83#if NH_3D_IC
    10284  Bool              m_bICFlag;
    10385#endif
    104 #if H_3D_INTER_SDC
     86#if NH_3D_SDC_INTER
    10587  Bool              m_bSDCMRSADFlag;
    10688#endif
    107   static const UChar m_aucIntraFilter[5];
    108  
     89
     90
    10991public:
    110  
     92
    11193  // ROI & pattern information, (ROI = &pattern[AboveOffset][LeftOffset])
    11294  Pel*  getROIY()                 { return m_cPatternY.getROIOrigin();    }
     
    11496  Int   getROIYHeight()           { return m_cPatternY.m_iROIHeight;      }
    11597  Int   getPatternLStride()       { return m_cPatternY.m_iPatternStride;  }
     98  Int   getBitDepthY()            { return m_cPatternY.m_bitDepth; }
    11699
    117 #if H_3D_IC
     100#if NH_3D_IC
    118101  Bool  getICFlag()               { return m_bICFlag; }
    119102  Void  setICFlag( Bool bICFlag ) { m_bICFlag = bICFlag; }
    120103#endif
    121 #if H_3D_INTER_SDC
     104#if NH_3D_SDC_INTER
    122105  Bool  getSDCMRSADFlag()         { return m_bSDCMRSADFlag; }
    123106  Void  setSDCMRSADFlag( Bool bSDCMRSADFlag )    { m_bSDCMRSADFlag = bSDCMRSADFlag; }
    124107#endif
    125108
    126   // access functions of ADI buffers
    127   Int*  getAdiOrgBuf              ( Int iCuWidth, Int iCuHeight, Int* piAdiBuf );
    128   Int*  getAdiCbBuf               ( Int iCuWidth, Int iCuHeight, Int* piAdiBuf );
    129   Int*  getAdiCrBuf               ( Int iCuWidth, Int iCuHeight, Int* piAdiBuf );
    130  
    131   Int*  getPredictorPtr           ( UInt uiDirMode, UInt uiWidthBits, Int* piAdiBuf );
    132109  // -------------------------------------------------------------------------------------------------------------------
    133110  // initialization functions
    134111  // -------------------------------------------------------------------------------------------------------------------
    135  
     112
    136113  /// set parameters from Pel buffers for accessing neighbouring pixels
    137   Void initPattern            ( Pel*        piY,
    138                                Pel*        piCb,
    139                                Pel*        piCr,
    140                                Int         iRoiWidth,
    141                                Int         iRoiHeight,
    142                                Int         iStride,
    143                                Int         iOffsetLeft,
    144                                Int         iOffsetAbove );
    145  
    146   /// set parameters from CU data for accessing neighbouring pixels
    147   Void  initPattern           ( TComDataCU* pcCU,
    148                                UInt        uiPartDepth,
    149                                UInt        uiAbsPartIdx );
    150  
    151   /// set luma parameters from CU data for accessing ADI data
    152   Void  initAdiPattern        ( TComDataCU* pcCU,
    153                                UInt        uiZorderIdxInPart,
    154                                UInt        uiPartDepth,
    155                                Int*        piAdiBuf,
    156                                Int         iOrgBufStride,
    157                                Int         iOrgBufHeight,
    158                                Bool&       bAbove,
    159                                Bool&       bLeft
    160                               ,Bool        bLMmode = false // using for LM chroma or not
    161                                );
    162  
    163   /// set chroma parameters from CU data for accessing ADI data
    164   Void  initAdiPatternChroma  ( TComDataCU* pcCU,
    165                                UInt        uiZorderIdxInPart,
    166                                UInt        uiPartDepth,
    167                                Int*        piAdiBuf,
    168                                Int         iOrgBufStride,
    169                                Int         iOrgBufHeight,
    170                                Bool&       bAbove,
    171                                Bool&       bLeft );
    172 
    173 private:
    174 
    175   /// padding of unavailable reference samples for intra prediction
    176   Void  fillReferenceSamples        (Int bitDepth, Pel* piRoiOrigin, Int* piAdiTemp, Bool* bNeighborFlags, Int iNumIntraNeighbor, Int iUnitSize, Int iNumUnitsInCu, Int iTotalUnits, UInt uiCuWidth, UInt uiCuHeight, UInt uiWidth, UInt uiHeight, Int iPicStride, Bool bLMmode = false);
    177  
    178 
    179   /// constrained intra prediction
    180   Bool  isAboveLeftAvailable  ( TComDataCU* pcCU, UInt uiPartIdxLT );
    181   Int   isAboveAvailable      ( TComDataCU* pcCU, UInt uiPartIdxLT, UInt uiPartIdxRT, Bool* bValidFlags );
    182   Int   isLeftAvailable       ( TComDataCU* pcCU, UInt uiPartIdxLT, UInt uiPartIdxLB, Bool* bValidFlags );
    183   Int   isAboveRightAvailable ( TComDataCU* pcCU, UInt uiPartIdxLT, UInt uiPartIdxRT, Bool* bValidFlags );
    184   Int   isBelowLeftAvailable  ( TComDataCU* pcCU, UInt uiPartIdxLT, UInt uiPartIdxLB, Bool* bValidFlags );
    185 
     114  Void initPattern( Pel* piY, Int iRoiWidth, Int iRoiHeight, Int iStride, Int bitDepthLuma );
    186115};
    187116
Note: See TracChangeset for help on using the changeset viewer.