Description of the main LCU analysis function xCompressCU in HEVC

Source: Internet
Author: User

 
All LCUs implement CU/PU division by calling xCompressCU, and then calling the TEncCu: xencodeCU function through the result to compress and encode all CUs.
 
XCompressCU can be divided into three parts.
[Cpp] view plaincopyprint?
Void TEncCu: xCompressCU ()
 
{
 
// The first block for (Int iQP = iMinQP; iQP <= iMaxQP; iQP ++)
 
// Do inter modes, SKIP and 2Nx2N
 
If (rpcBestCU-> getSlice ()-> getSliceType ()! = I _SLICE)
 
{
 
XCheckRDCostInter (rpcBestCU, rpcTempCU, SIZE_2Nx2N );
 
XCheckRDCostMerge2Nx2N (rpcBestCU, rpcTempCU, & earlyDetectionSkipMode );
 
}
 
// The second block for (Int iQP = iMinQP; iQP <= iMaxQP; iQP ++)
 
// Do inter modes, NxN, 2NxN, and Nx2N
 
If (rpcBestCU-> getSlice ()-> getSliceType ()! = I _SLICE)
 
{
 
XCheckRDCostInter (rpcBestCU, rpcTempCU, SIZE_NxN );
 
XCheckRDCostInter (rpcBestCU, rpcTempCU, SIZE_Nx2N );
 
XCheckRDCostInter (rpcBestCU, rpcTempCU, SIZE_2NxN );
 
}
 
//! Try AMP (SIZE_2NxnU, SIZE_2NxnD, SIZE_nLx2N, SIZE_nRx2N)
 
// Do normal intra modes // speedup for inter frames
 
{
 
XCheckRDCostIntra (rpcBestCU, rpcTempCU, SIZE_2Nx2N );
 
XCheckRDCostIntra (rpcBestCU, rpcTempCU, SIZE_NxN );
 
}
 
// Test PCM
 
XCheckIntraPCM (rpcBestCU, rpcTempCU );
 
Block 3 // for (Int iQP = iMinQP; iQP <= iMaxQP; iQP ++)
 
// Further split
 
For (UInt uiPartUnitIdx = 0; uiPartUnitIdx <4; uiPartUnitIdx ++)
 
{
 
If (rpcBestCU-> isIntra (0 ))
 
XCompressCU (pcSubBestPartCU, pcSubTempPartCU, uhNextDepth, SIZE_NONE );
 
Else
 
XCompressCU (pcSubBestPartCU, pcSubTempPartCU, uhNextDepth, rpcBestCU-> getPartitionSize (0 ));
 
}
 
// Check whether split is used
 
XCheckBestMode (rpcBestCU, rpcTempCU, uiDepth );
 
}
The first two enable RDcost calculation for the LCU mode of the current layer. The last one implements the lower layer split calculation. Finally, xCheckBestMode is used to compare whether segmentation is selected!
 
 
 

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.