Skip to content
Snippets Groups Projects
Commit 322dad02 authored by Frank Bossen's avatar Frank Bossen
Browse files

Partial fix for #161: be mindful of large blocks

Large blocks, i.e. with either width or height equal to 64, have
fewer coefficients. The number of coefficients should thus be
set accordingly
parent bd11686e
No related branches found
No related tags found
No related merge requests found
......@@ -402,7 +402,13 @@ namespace DQIntern
m_chType = chType;
m_width = width;
m_height = height;
#if JVET_M0257
const uint32_t nonzeroWidth = std::min<uint32_t>(JVET_C0024_ZERO_OUT_TH, m_width);
const uint32_t nonzeroHeight = std::min<uint32_t>(JVET_C0024_ZERO_OUT_TH, m_height);
m_numCoeff = nonzeroWidth * nonzeroHeight;
#else
m_numCoeff = m_width * m_height;
#endif
#if JVET_M0102_INTRA_SUBPARTITIONS
m_log2SbbWidth = g_log2SbbSize[m_chType][ g_aucLog2[m_width] ][ g_aucLog2[m_height] ][0];
m_log2SbbHeight = g_log2SbbSize[m_chType][ g_aucLog2[m_width] ][ g_aucLog2[m_height] ][1];
......@@ -415,8 +421,8 @@ namespace DQIntern
m_sbbSize = ( 1 << m_log2SbbSize );
m_sbbMask = m_sbbSize - 1;
#if JVET_M0257
m_widthInSbb = std::min<unsigned>(JVET_C0024_ZERO_OUT_TH, m_width) >> m_log2SbbWidth;
m_heightInSbb = std::min<unsigned>(JVET_C0024_ZERO_OUT_TH, m_height) >> m_log2SbbHeight;
m_widthInSbb = nonzeroWidth >> m_log2SbbWidth;
m_heightInSbb = nonzeroHeight >> m_log2SbbHeight;
#else
m_widthInSbb = m_width >> m_log2SbbWidth;
m_heightInSbb = m_height >> m_log2SbbHeight;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment