HEVC-初始化估計資料(幀間幀內)

來源:互聯網
上載者:User
/** initialize prediction data with enabling sub-LCU-level delta QP*\param  uiDepth  depth of the current CU*\param  qp     qp for the current CU*- set CU width and CU height according to depth*- set qp value according to input qp *- set last-coded qp value according to input last-coded qp */Void TComDataCU::initEstData( UInt uiDepth, Int qp ){  m_dTotalCost         = MAX_DOUBLE;//double 類型成員函數 總的分割代價sum of partition RD costs  m_uiTotalDistortion  = 0;         //無符號int 類型變數  總的分割失真sum of partition distortion  m_uiTotalBits        = 0;         //sum of partition bits  bits是編碼後的位元數  m_uiTotalBins        = 0;         //sum of partition bins  bin是句法元素的二進位位元  UChar uhWidth  = g_uiMaxCUWidth  >> uiDepth;  UChar uhHeight = g_uiMaxCUHeight >> uiDepth;  for (UInt ui = 0; ui < m_uiNumPartition; ui++)//64x64/4x4=256  {  if(getPic()->getPicSym()->getInverseCUOrderMap(getAddr())*m_pcPic->getNumPartInCU()+m_uiAbsIdxInLCU+ui >= getSlice()->getSliceSegmentCurStartCUAddr())    {  //Char*  m_apiMVPIdx[2]; ///< array of motion vector predictor candidates  //Char*  m_apiMVPNum[2]; ///< array of number of possible motion vectors predictors單向預測和雙向預測    m_apiMVPIdx[0][ui] = -1;      m_apiMVPIdx[1][ui] = -1;      m_apiMVPNum[0][ui] = -1;      m_apiMVPNum[1][ui] = -1;      m_puhDepth  [ui] = uiDepth;      m_puhWidth  [ui] = uhWidth;      m_puhHeight [ui] = uhHeight;      m_puhTrIdx  [ui] = 0;      //UChar* m_puhTransformSkip[3];///< array of transform skipping flags   m_puhTransformSkip[0][ui] = 0;//QP for Y      m_puhTransformSkip[1][ui] = 0;//QP forCb      m_puhTransformSkip[2][ui] = 0;//QP forCr from JCTVC-L1003_v34.doc 8.6.2Scaling and transformation process      m_skipFlag[ui]   = false;      m_pePartSize[ui] = SIZE_NONE; // SIZE_NONE=15 不支援幀內幀間分割模式      m_pePredMode[ui] = MODE_NONE; // MODE_NONE = 15 不是幀內幀間預測模式      m_CUTransquantBypass[ui] = false;      m_pbIPCMFlag[ui] = 0;      m_phQP[ui] = qp;      m_pbMergeFlag[ui] = 0;      m_puhMergeIndex[ui] = 0;      m_puhLumaIntraDir[ui] = DC_IDX;//#define DC_IDX  1  //index for intra DC mode      m_puhChromaIntraDir[ui] = 0;      m_puhInterDir[ui] = 0;      //UChar*   m_puhCbf[3];  ///< array of coded block flags (CBF)  m_puhCbf[0][ui] = 0;      m_puhCbf[1][ui] = 0;      m_puhCbf[2][ui] = 0;    }  }  UInt uiTmp = uhWidth*uhHeight;  if(getPic()->getPicSym()->getInverseCUOrderMap(getAddr())*m_pcPic->getNumPartInCU()+m_uiAbsIdxInLCU >= getSlice()->getSliceSegmentCurStartCUAddr())  {    m_acCUMvField[0].clearMvField();    m_acCUMvField[1].clearMvField();    uiTmp = uhWidth*uhHeight;    //亮度採樣係數緩衝器 3種    memset( m_pcTrCoeffY,    0, uiTmp * sizeof( *m_pcTrCoeffY    ) );#if ADAPTIVE_QP_SELECTION    memset( m_pcArlCoeffY ,  0, uiTmp * sizeof( *m_pcArlCoeffY   ) );#endif    memset( m_pcIPCMSampleY, 0, uiTmp * sizeof( *m_pcIPCMSampleY ) );//色度採樣系統緩衝器 3種    uiTmp>>=2;//除以4,對於色度長寬各減半//Tr:transformed變換後的    memset( m_pcTrCoeffCb,    0, uiTmp * sizeof( *m_pcTrCoeffCb    ) );    memset( m_pcTrCoeffCr,    0, uiTmp * sizeof( *m_pcTrCoeffCr    ) );#if ADAPTIVE_QP_SELECTION  //採用自適應QP選擇 ARL:Adaptive Reconstruction Level    memset( m_pcArlCoeffCb,   0, uiTmp * sizeof( *m_pcArlCoeffCb   ) );    memset( m_pcArlCoeffCr,   0, uiTmp * sizeof( *m_pcArlCoeffCr   ) );#endif                 //採用PCM模式進行色度採樣    memset( m_pcIPCMSampleCb, 0, uiTmp * sizeof( *m_pcIPCMSampleCb ) );    memset( m_pcIPCMSampleCr, 0, uiTmp * sizeof( *m_pcIPCMSampleCr ) );  }}

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.