Cu segmentation Information Extraction (updated)

Source: Internet
Author: User

This article focuses on the csdn blogs of feixiang_john, hevc_cjl, zhuix7788, yangxiao_xiang, and others to learn and use the content of Cu segmentation. For details, refer to their blog:
Feixiang_john: hevc/h.265 reference code tracking

Http://blog.csdn.net/feixiang_john/article/details/7876227#comments

Hevc_cjl: The final division of Cu

Http://blog.csdn.net/hevc_cjl/article/details/8275260

Http://blog.csdn.net/hevc_cjl/article/details/8299529

Http://blog.csdn.net/hevc_cjl/article/details/8639835

Zhuix7788: mode and Division information

Http://blog.csdn.net/zhuix7788/article/details/8214685

Yangxiao_xiang: hevc intra-Frame Prediction encoding-LCU quad-tree Block

Http://blog.csdn.net/yangxiao_xiang/article/details/8270723

Http://blog.csdn.net/yangxiao_xiang/article/details/8275181

Http://blog.csdn.net/yangxiao_xiang/article/details/8478283

Add the header file # include <fstream> to the beginning of the CPP file.

========================================================== ========================================================== ==================================================================/// Public Member functions // ============================================ ========================================================== ===================================================/ ** \ Param rpccu pointer of Cu data class * // a Summary of the methods used to obtain the optimal Cu Division: // after calling xcompresscu in Hm (at least after compresscu calls it, the optimal Pu is m_ppcbestcu [0]), // after calling ENC Before odecu (or later, as long as the pccu has not been modified), // execute a similar statement on the pccu parameter of compresscu: pccu-> getdepth (uiabspartidx ), // you can obtain the depth of 4x4 blocks whose Z order is uiabspartidx. If the depth of each 4x4 block of the entire Cu is determined, then its division is naturally determined. Void tenccu: compresscu (tcomdatacu * & rpccu) {// initialize Cu data m_ppcbestcu [0]-> initcu (rpccu-> getpic (), rpccu-> getaddr ()); m_ppctempcu [0]-> initcu (rpccu-> getpic (), rpccu-> getaddr (); # If between m_addsaddepth = 0; m_lcupredictionsad = 0; m_temporalsad = 0; # endif // analysis of Cu xcompresscu (m_ppcbestcu [0], m_ppctempcu [0], 0 ); // obtain the optimal Pu: m_ppcbestcu [0] // ======= LCU Split unit Depth Information Transmission Output: 2013.3.27 ==================== uint lcudepth [256]; ofstream OUTFILE ("basketballdrillcu.txt", IOS: In | IOs :: APP); For (INT I = 0; I <256; I + = 4) // The maximum Cu split is 8x8, and the storage split information is 4x4, therefore, I + = 4 processes {lcudepth [I] = m_ppcbestcu [0]-> getdepth (I); OUTFILE <lcudepth [I] <; OUTFILE <Endl ;} // else # If adaptive_qp_selection if (m_pcenccfg-> getuseadaptqpselect () {If (rpccu-> getslice ()-> Ge Tslicetype ()! = I _slice) // iiii {xlcucollectarlstats (rpccu); }}# endif}

Note: because it is the first frame of basketballdrive. YUV, and the resolution is 1920x1080, the number of pixels is not a multiple of 8, so the split of the last line is abnormal.

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.