Skip to content
Snippets Groups Projects
Commit cd87e938 authored by Christian Helmrich's avatar Christian Helmrich
Browse files

add chroma check around newly added code, to be on the safe side

parent 872964dc
No related branches found
No related tags found
1 merge request!1850Fix for Ticket #1296: Re-allow packed YUV output after RPR integration
......@@ -574,22 +574,25 @@ static bool writePlane( uint32_t orgWidth, uint32_t orgHeight, ostream& fd, cons
}
// here height444 and orgHeight are luma heights
for (uint32_t y444 = height444; y444 < orgHeight; y444++)
if ((compID == COMPONENT_Y) || (fileFormat != CHROMA_400 && srcFormat != CHROMA_400))
{
if ((y444 & mask_y_file) == 0) // if this is chroma, determine whether to skip every other row
for (uint32_t y444 = height444; y444 < orgHeight; y444++)
{
memset (reinterpret_cast<char*>(buf), 0, stride_file); // TODO: is this correct? Should behave similarly to code block at end of this function
fd.write (reinterpret_cast<const char*>(buf), stride_file);
if (fd.eof() || fd.fail())
if ((y444 & mask_y_file) == 0) // if this is chroma, determine whether to skip every other row
{
return false;
memset (reinterpret_cast<char*>(buf), 0, stride_file); // TODO: is this correct? Should behave similarly to code block at end of this function
fd.write (reinterpret_cast<const char*>(buf), stride_file);
if (fd.eof() || fd.fail())
{
return false;
}
}
}
if ((y444 & mask_y_src) == 0)
{
pSrcBuf += srcbuf_stride;
if ((y444 & mask_y_src) == 0)
{
pSrcBuf += srcbuf_stride;
}
}
}
}
......
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