mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
Rewrite of black border detector to fix problems with overscan and xbmc video calibration settings
Former-commit-id: ed6dd4e6872ea69d682096a82e108a3f7e7ca4ae
This commit is contained in:
@@ -70,10 +70,11 @@ int main()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Verify that the border is indeed
|
||||
if (processor.getCurrentBorder().type != BlackBorder::none)
|
||||
if (processor.getCurrentBorder().unknown != false || processor.getCurrentBorder().horizontalSize != 0 || processor.getCurrentBorder().verticalSize != 0)
|
||||
{
|
||||
std::cerr << "Incorrectlty identified 'no border' (" << processor.getCurrentBorder().type << " != " << BlackBorder::none << ")" << std::endl;
|
||||
std::cerr << "Incorrectlty identified 'no border'" << std::endl;
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
@@ -99,14 +100,16 @@ int main()
|
||||
}
|
||||
}
|
||||
}
|
||||
if (processor.getCurrentBorder().type != BlackBorder::horizontal || processor.getCurrentBorder().size != borderSize)
|
||||
|
||||
if (processor.getCurrentBorder().unknown != false || processor.getCurrentBorder().horizontalSize != borderSize || processor.getCurrentBorder().verticalSize != 0)
|
||||
{
|
||||
std::cerr << "Incorrectlty found 'horizontal border' (" << processor.getCurrentBorder().type << " != " << BlackBorder::horizontal << ")" << std::endl;
|
||||
|
||||
std::cerr << "Incorrectlty found 'horizontal border' (" << processor.getCurrentBorder().unknown << "," << processor.getCurrentBorder().horizontalSize << "," << processor.getCurrentBorder().verticalSize << ")" << std::endl;
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
// Switch back (in one shot) to no border
|
||||
if (!processor.process(noBorderImage) || (processor.getCurrentBorder().type != BlackBorder::none))
|
||||
if (!processor.process(noBorderImage) || (processor.getCurrentBorder().unknown != false || processor.getCurrentBorder().horizontalSize != 0 || processor.getCurrentBorder().verticalSize != 0))
|
||||
{
|
||||
std::cerr << "Failed to switch back to 'no border' with one image" << std::endl;
|
||||
exit(EXIT_FAILURE);
|
||||
@@ -133,9 +136,10 @@ int main()
|
||||
}
|
||||
}
|
||||
}
|
||||
if (processor.getCurrentBorder().type != BlackBorder::vertical || processor.getCurrentBorder().size != borderSize)
|
||||
|
||||
if (processor.getCurrentBorder().unknown != false || processor.getCurrentBorder().horizontalSize != 0 || processor.getCurrentBorder().verticalSize != borderSize)
|
||||
{
|
||||
std::cerr << "Incorrectlty found 'vertical border' (" << processor.getCurrentBorder().type << " != " << BlackBorder::horizontal << ")" << std::endl;
|
||||
std::cerr << "Incorrectlty found 'vertical border'" << std::endl;
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user