Hevc-Initialize estimation data (within the frame)

Source: Internet
Author: User
/** Initialize prediction data with enabling Sub-LCU-level delta QP * \ Param uidepth depth of the current Cu * \ Param 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; // sum of partition RD costs m_uitotaldistortion = 0; // sum of partition distortion m_uitotalbits = 0; // sum of partition bits is the number of encoded bits m_uitotalbins = 0; // sum of partition bins bin is the binary digit of the syntax element. 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 unidirectional prediction and bidirectional prediction 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 the intra-frame splitting mode m_pepredmode [UI] = mode_none is not supported; // mode_none = 15 is not the intra-frame prediction mode 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 (CBS) 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; // three kinds of memset (m_pctrcoeffy, 0, uitmp * sizeof (* m_pctrcoeffy); # If your memset (m_pcarlcoeffy, 0, uitmp * sizeof (* m_pcarlcoeffy); # endif memset (m_pcipcmsampley, 0, uitmp * sizeof (* m_pcipcmsampley )); // three uitmp> = 2 in the color sampling system buffer; // divided by 4. For memset (m_pctrcoeffcb, 0, uitmp * sizeof (* m_pctrcoeffcb); memset (m_pctrcoeffcr, 0, uitmp * sizeof (* m_pctrcoeffcr); # If adaptive_qp_selection // use adaptive QP to select ARl: adaptive Reconstruction level memset (m_pcarlcoeffcb, 0, uitmp * sizeof (* m_pcarlcoeffcb); memset (memory, 0, uitmp * sizeof (* m_pcarlcoeffcr )); # endif // use PCM mode for color sampling memset (m_pcipcmsamplecb, 0, uitmp * sizeof (* m_pcipcmsamplecb); memset (m_pcipcmsamplecr, 0, uitmp * sizeof (* m_pcipcmsamplecr ));}}

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.