Add support for residue in HEVC intra pred module

This commit is contained in:
2018-10-13 15:43:10 +01:00
parent f219ee1b3e
commit 5cea952d32
2 changed files with 19 additions and 5 deletions
+14 -1
View File
@@ -45,7 +45,9 @@ HEVCIntraPrediction::HEVCIntraPrediction()
( "mode", m_uiMode, "Intra mode (26-34) [26]" ) /**/
( "block_size", m_uiBlockSize, "Block size [4]" ) /**/
( "x_pel", m_uiXpel, "X coordinate [1]" ) /**/
( "y_pel", m_uiYpel, "Y coordinate [1]" );
( "y_pel", m_uiYpel, "Y coordinate [1]" ) /**/
( "recon", m_bShowResidue, "Show prediction residue [false]" ) /**/
;
m_pcPredBlock = NULL;
m_referenceMem = NULL;
@@ -157,6 +159,17 @@ CalypFrame* HEVCIntraPrediction::process( std::vector<CalypFrame*> apcFrameList
}
}
if( m_bShowResidue )
{
for( y = 0; y < m_uiBlockSize; y++ )
{
for( x = 0; x < m_uiBlockSize; x++ )
{
predBlock[y + 1][x + 1] = abs( refFrame[m_uiYpel + y - 1][m_uiXpel + x - 1] - predBlock[y + 1][x + 1] );
}
}
}
return m_pcPredBlock;
}
+1
View File
@@ -38,6 +38,7 @@ private:
unsigned int m_uiBlockSize;
unsigned int m_uiXpel;
unsigned int m_uiYpel;
bool m_bShowResidue;
ClpPel* m_referenceMem;
public: