Skip to content

Commit 47ac329

Browse files
committed
cleanup
1 parent e3b46e6 commit 47ac329

File tree

1 file changed

+5
-10
lines changed

1 file changed

+5
-10
lines changed

src/iop/demosaic.c

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2975,22 +2975,17 @@ void process_pixelshift(dt_dev_pixelpipe_iop_t *piece, const float *const in, fl
29752975
const size_t col_offset = 1;
29762976
const size_t row_offset = roi_out->width;
29772977

2978-
size_t pout = 0;
2979-
//size_t pin = 0;
2980-
size_t pin3 = 0;
29812978
for(size_t j = 1; j < roi_out->height-1; j++)
29822979
{
29832980
for(size_t i = 1; i < roi_out->width-1; i++)
29842981
{
2985-
pout = (size_t)4 * (((size_t)roi_out->width * j) + i);
2986-
//pin = (roi_in->width * (j + oy)) + ox + i;
2987-
///TODO why do i ignore offset of input roi?
2988-
pin3 = (roi_in->width * j) + i;
2982+
size_t pout = (size_t)4 * (((size_t)roi_out->width * j) + i);
2983+
size_t pin = (roi_in->width * j) + i;
29892984

29902985
{
2991-
out[pout+0] = frames_in[0][pin3];
2992-
out[pout+1] = (frames_in[1][pin3-col_offset] + frames_in[2][pin3-col_offset-row_offset])/2.0f;
2993-
out[pout+2] = frames_in[3][pin3-row_offset];
2986+
out[pout+0] = frames_in[0][pin];
2987+
out[pout+1] = (frames_in[1][pin-col_offset] + frames_in[2][pin-col_offset-row_offset])/2.0f;
2988+
out[pout+2] = frames_in[3][pin-row_offset];
29942989
}
29952990

29962991
/*for(size_t c=0;c<3;++c)

0 commit comments

Comments
 (0)