Question

so I'm playing around with the code of HEVC, and was wondering how to find the pixels of a block. To be more specific, say I have a 32x32 CU, how can I find the actual pixels in that 32x32 block?

The code I'm using to extract the CU is (taken form TEncSearch.cpp of 3d-HEVC):

TComPic*      pcPicTex = pcCU->getSlice()->getTexturePic();
TComDataCU* pcColTexCU = pcPicTex->getCU( pcCU->getAddr() );

from that I've added the following, which results in a 32x32 block:

printf("CU %ux%u \n", pcColTexCU->getWidth(0), pcColTexCU->getHeight(0) );

Does anyone know how I can find the actual pixels of that 32x32 block?

Thanks

Était-ce utile?

La solution

Since deblocking filter module conducts filtering on the reconstructed pixels, you can refer the source code (TComLoopFilter.cpp) to see how to access the reconstructed pixels.

TComPicYuv* pcPicYuvRec = pcCU->getPic()->getPicYuvRec();
Pel* piSrc    = pcPicYuvRec->getLumaAddr( pcCU->getAddr(), uiAbsZorderIdx );

pcCU->getAddr() means that index of CTU

uiAbsZorderIdx means that zindex (might be 4x4 block index usually) in a CTU

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top