DSVL_Helpers.cpp: FlipImageRGB32 crash
Optical marker tracking and overlay for augmented reality.
Brought to you by:
philip_lamb
The function crash when flip_h=true and flip_v=false due to a out of range index:
** Fixed code **
...
else
{
if( flipImageH )
{
// only horizontal flip
for( int line = 0; line < height; line++ )
for( int pixel = 0; pixel < width/2; pixel ++ )
{
ptr[line*width+pixel] = ptr[line*width+pixel] ^ ptr[line*width + (width - pixel - 1)];
ptr[line*width + (width - pixel - 1)] = ptr[line*width+pixel] ^ ptr[line*width + (width - pixel - 1)];
ptr[line*width+pixel] = ptr[line*width+pixel] ^ ptr[line*width + (width - pixel - 1)];
}
}
}
Will try to check if this is still the case with the new in-tree copy of DSVL