Skip to content

Commit 579d0c3

Browse files
jenshannoschwalmTurboGit
authored andcommitted
Fix tiled OpenCL path for true monochromes
These sraw files present 4 channels to the demosaicer, when we have to tile we must allocate a cl_mem with 4 channels.
1 parent 0f7fa88 commit 579d0c3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/iop/demosaic.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1090,8 +1090,9 @@ int process_cl(dt_iop_module_t *self,
10901090
goto finish;
10911091
}
10921092

1093+
const int in_channels = true_monochrome ? 4 : 1;
10931094
out_image = direct ? dev_out : dt_opencl_alloc_device(devid, iwidth, iheight, sizeof(float) * 4);
1094-
t_in = tiling ? dt_opencl_alloc_device(devid, iwidth, tile_height, sizeof(float)) : in_image;
1095+
t_in = tiling ? dt_opencl_alloc_device(devid, iwidth, tile_height, sizeof(float) * in_channels) : in_image;
10951096
t_out = tiling ? dt_opencl_alloc_device(devid, iwidth, tile_height, sizeof(float) * 4) : out_image;
10961097
t_high = dual ? dt_opencl_alloc_device(devid, iwidth, tile_height, sizeof(float) * 4) : t_out;
10971098
t_low = dual ? dt_opencl_alloc_device(devid, iwidth, tile_height, sizeof(float) * 4) : NULL;

0 commit comments

Comments
 (0)