Skip to content

Commit 00e568d

Browse files
committed
backend: Set the correct input block dirty flags from SetInputFormat()
Ensure we set either the Bayer or RGB input flag depending on the input format used. Signed-off-by: Naushir Patuck <[email protected]>
1 parent 857f287 commit 00e568d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/libpisp/backend/backend.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
#include <cstring>
1212

1313
#include "common/logging.hpp"
14+
#include "common/pisp_common.h"
1415

1516
using namespace libpisp;
1617

@@ -61,7 +62,10 @@ void BackEnd::GetGlobal(pisp_be_global_config &global) const
6162
void BackEnd::SetInputFormat(pisp_image_format_config const &input_format)
6263
{
6364
be_config_.input_format = input_format;
64-
be_config_extra_.dirty_flags_bayer |= PISP_BE_BAYER_ENABLE_INPUT;
65+
if (PISP_IMAGE_FORMAT_THREE_CHANNEL(input_format.format))
66+
be_config_extra_.dirty_flags_bayer |= PISP_BE_BAYER_ENABLE_INPUT;
67+
else
68+
be_config_extra_.dirty_flags_rgb |= PISP_BE_RGB_ENABLE_INPUT;
6569
retile_ = true;
6670
}
6771

0 commit comments

Comments
 (0)