Skip to content
Snippets Groups Projects
Commit 37e74ca3 authored by Antti Hallapuro's avatar Antti Hallapuro
Browse files

Use getWinUnitX and getWinUnitY instead of manual subWidthC and subHeightC calculation

parent 8ac14f49
No related branches found
No related tags found
No related merge requests found
......@@ -1344,26 +1344,11 @@ void SEIEncoder::initSEINeuralNetworkPostFilterCharacteristics(SEINeuralNetworkP
#if JVET_AD0056_MOVE_COLOUR_DESC_FLAG
const ChromaFormat chromaFormatIdc = m_pcEncLib->getSPS(0)->getChromaFormatIdc();
uint8_t subWidthC;
uint8_t subHeightC;
if (chromaFormatIdc == ChromaFormat::_420)
{
subWidthC = 2;
subHeightC = 2;
}
else if (chromaFormatIdc == ChromaFormat::_422)
{
subWidthC = 2;
subHeightC = 1;
}
else
{
subWidthC = 1;
subHeightC = 1;
}
uint8_t subWidthC = SPS::getWinUnitX(chromaFormatIdc);
uint8_t subHeightC = SPS::getWinUnitY(chromaFormatIdc);
uint8_t outSubWidthC = subWidthC;
uint8_t outSubHeightC = subHeightC;
uint8_t outSubWidthC = subWidthC;
uint8_t outSubHeightC = subHeightC;
if ((sei->m_purpose & NNPC_PurposeType::CHROMA_UPSAMPLING) != 0)
{
if (sei->m_outSubCFlag)
......
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