Changeset 608 in 3DVCSoftware for trunk/source/Lib/TLibEncoder/TEncSlice.h


Ignore:
Timestamp:
1 Sep 2013, 22:47:26 (11 years ago)
Author:
tech
Message:

Merged DEV-2.0-dev0@604.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/Lib/TLibEncoder/TEncSlice.h

    r443 r608  
    44 * granted under this license. 
    55 *
    6  * Copyright (c) 2010-2012, ITU/ISO/IEC
     6 * Copyright (c) 2010-2013, ITU/ISO/IEC
    77 * All rights reserved.
    88 *
     
    4646#include "TEncCu.h"
    4747#include "WeightPredAnalysis.h"
     48#include "TEncRateCtrl.h"
    4849
    4950//! \ingroup TLibEncoder
     
    9091  TEncSbac*               m_pcRDGoOnSbacCoder;                  ///< go-on SBAC encoder
    9192  UInt64                  m_uiPicTotalBits;                     ///< total bits for the picture
     93#if H_3D_VSO
     94  Dist64                  m_uiPicDist;                          ///< total distortion for the picture
     95#else
    9296  UInt64                  m_uiPicDist;                          ///< total distortion for the picture
     97#endif
    9398  Double                  m_dPicRdCost;                         ///< picture-level RD cost
    9499  Double*                 m_pdRdPicLambda;                      ///< array of lambda candidates
    95100  Double*                 m_pdRdPicQp;                          ///< array of picture QP candidates (double-type for lambda)
    96   Int*                    m_piRdPicQp;                          ///< array of picture QP candidates (int-type)
     101  Int*                    m_piRdPicQp;                          ///< array of picture QP candidates (Int-type)
    97102  TEncBinCABAC*           m_pcBufferBinCoderCABACs;       ///< line of bin coder CABAC
    98103  TEncSbac*               m_pcBufferSbacCoders;                 ///< line to store temporary contexts
    99104  TEncBinCABAC*           m_pcBufferLowLatBinCoderCABACs;       ///< dependent tiles: line of bin coder CABAC
    100105  TEncSbac*               m_pcBufferLowLatSbacCoders;           ///< dependent tiles: line to store temporary contexts
    101  
     106  TEncRateCtrl*           m_pcRateCtrl;                         ///< Rate control manager
    102107  UInt                    m_uiSliceIdx;
    103 
    104 #if MERL_VSP_C0152
    105   // Data temporarily stored, will be sent to TComSlice level where the data will be actually used
    106   TComPic* m_pPicBaseTxt;
    107   TComPic* m_pPicBaseDepth;
    108 #if MERL_VSP_NBDV_RefVId_Fix_D0166
    109   Int*     m_aiShiftLUT[2]; ///< For reference views from LIST0 and LIST1
    110 #else
    111   Int*     m_aiShiftLUT;
    112 #endif
    113   Int      m_iShiftPrec;
    114 #endif
    115 #if MERL_VSP_NBDV_RefVId_Fix_D0166
    116   TComList<TComPic*>*  m_pcListDepthPic[MAX_VIEW_NUM]; ///< For three views in total, indexed as viewId = 0, 1, 2
    117 #endif
     108  std::vector<TEncSbac*> CTXMem;
    118109public:
    119110  TEncSlice();
     
    125116 
    126117  /// preparation of slice encoding (reference marking, QP and lambda)
    127 #if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046
    128 #if MTK_DEPTH_MERGE_TEXTURE_CANDIDATE_C0137
    129   Void    initEncSlice        ( TComPic*  pcPic, Int iPOCLast, UInt uiPOCCurr, Int iNumPicRcvd, Int iGOPid, TComSlice*& rpcSlice, TComVPS* pVPS, TComSPS* pSPS, TComPPS *pPPS, bool isDepth );
     118#if H_3D
     119  Void    initEncSlice        ( TComPic* pcPic, Int pocLast, Int pocCurr, Int iNumPicRcvd,
     120                                Int iGOPid, TComSlice*& rpcSlice, TComVPS* pVPS, TComSPS* pSPS, TComPPS *pPPS, Int layerId );
    130121#else
    131   Void    initEncSlice        ( TComPic*  pcPic, Int iPOCLast, UInt uiPOCCurr, Int iNumPicRcvd, Int iGOPid, TComSlice*& rpcSlice, TComVPS* pVPS, TComSPS* pSPS, TComPPS *pPPS );
     122  Void    initEncSlice        ( TComPic*  pcPic, Int pocLast, Int pocCurr, Int iNumPicRcvd,
     123                                Int iGOPid,   TComSlice*& rpcSlice, TComSPS* pSPS, TComPPS *pPPS );
    132124#endif
     125#if RATE_CONTROL_LAMBDA_DOMAIN
     126  Void    resetQP             ( TComPic* pic, Int sliceQP, Double lambda );
    133127#else
    134   Void    initEncSlice        ( TComPic*  pcPic, Int iPOCLast, UInt uiPOCCurr, Int iNumPicRcvd, Int iGOPid, TComSlice*& rpcSlice, TComSPS* pSPS, TComPPS *pPPS );
     128  Void    xLamdaRecalculation ( Int changeQP, Int idGOP, Int depth, SliceType eSliceType, TComSPS* pcSPS, TComSlice* pcSlice);
    135129#endif
    136130  // compress and encode slice
    137131  Void    precompressSlice    ( TComPic*& rpcPic                                );      ///< precompress slice for multi-loop opt.
    138132  Void    compressSlice       ( TComPic*& rpcPic                                );      ///< analysis stage of slice
    139   Void    encodeSlice         ( TComPic*& rpcPic, TComOutputBitstream* rpcBitstream, TComOutputBitstream* pcSubstreams  );
     133#if RATE_CONTROL_INTRA
     134  Void    calCostSliceI       ( TComPic*& rpcPic );
     135#endif
     136  Void    encodeSlice         ( TComPic*& rpcPic, TComOutputBitstream* pcSubstreams  );
    140137 
    141138  // misc. functions
     
    147144  UInt    getSliceIdx()         { return m_uiSliceIdx;                    }
    148145  Void    setSliceIdx(UInt i)   { m_uiSliceIdx = i;                       }
     146  Void      initCtxMem( UInt i );
     147  Void      setCtxMem( TEncSbac* sb, Int b )   { CTXMem[b] = sb; }
    149148
    150 #if MERL_VSP_C0152
    151 #if MERL_VSP_NBDV_RefVId_Fix_D0166
    152   Void     setBWVSPLUTParam  ( Int *pShiftLUT, Int iLoG2LUTPrec, Int iNeighborViewId ) { m_aiShiftLUT[iNeighborViewId] = pShiftLUT; m_iShiftPrec = 2-iLoG2LUTPrec; }
    153 #else
    154   Void     setBWVSPLUTParam    ( Int *pShiftLUT, Int iLoG2LUTPrec ) { m_aiShiftLUT = pShiftLUT; m_iShiftPrec = 2-iLoG2LUTPrec; }
    155 #endif
    156    Void     setRefPicBaseTxt    ( TComPic*pPicTxt   ) { m_pPicBaseTxt = pPicTxt;    }
    157    Void     setRefPicBaseDepth  ( TComPic*pPicDepth ) { m_pPicBaseDepth = pPicDepth;}
    158 #if MERL_VSP_NBDV_RefVId_Fix_D0166
    159    Void     getBWVSPLUTParam  ( Int*& pShiftLUT, Int& iShiftPrec, Int iNeighborViewId ) { pShiftLUT = m_aiShiftLUT[iNeighborViewId]; iShiftPrec = m_iShiftPrec; }
    160 #else
    161    Void     getBWVSPLUTParam    ( Int*& pShiftLUT, Int& iShiftPrec ) { pShiftLUT = m_aiShiftLUT; iShiftPrec = m_iShiftPrec; }
    162 #endif
    163    TComPic* getRefPicBaseTxt    () { return m_pPicBaseTxt;   }
    164    TComPic* getRefPicBaseDepth  () { return m_pPicBaseDepth; }
    165 #if MERL_VSP_NBDV_RefVId_Fix_D0166
    166    Void     setListDepthPic     ( TComList<TComPic*>* pListDepthPic, Int viewId ) { m_pcListDepthPic[viewId] = pListDepthPic; }
    167    TComList<TComPic*>* getListDepthPic(Int viewId)  { return m_pcListDepthPic[viewId]; }
    168 #endif
    169 #endif
     149private:
     150  Double  xGetQPValueAccordingToLambda ( Double lambda );
    170151};
    171152
Note: See TracChangeset for help on using the changeset viewer.