Commit 6921a585 authored by Laurent Claustre's avatar Laurent Claustre
Browse files

Merge branch '5-hw-roi-do-not-check-supported-camera-roi' into 'master'

Resolve "Hw Roi do not check supported camera Roi"

Closes #5

See merge request !5
parents dd2b1d2b 8e22ebbe
Pipeline #51764 passed with stages
in 14 minutes and 16 seconds
......@@ -876,7 +876,23 @@ void Camera::checkRoi(const Roi& set_roi, Roi& hw_roi)
//@BEGIN : check available values of Roi
if(set_roi.isActive())
{
hw_roi = set_roi;
setRoi(set_roi);
getRoi(hw_roi);
//hw roi X is multple of 4 and camera return the lower value
if (hw_roi.getTopLeft().x < set_roi.getTopLeft().x)
{
Size s1 = hw_roi.getSize();
//hw roi width is multiple of 8, so increase it to let lima doing subroi
Size* s2 = new Size(s1.getWidth()+8,s1.getHeight());
hw_roi.setSize(*s2);
}
if(hw_roi.getSize().getWidth() < set_roi.getSize().getWidth())
{
Size s1 = hw_roi.getSize();
//hw roi width is multiple of 8, so increase it to let lima doing subroi
Size* s2 = new Size(s1.getWidth()+8,s1.getHeight());
hw_roi.setSize(*s2);
}
}
else
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment