forgive me if I’m wrong, but I think the two code snippets should be the same, and definitely don’t yield the same results [at least for me]. Sorry the rest of the code is not public at the moment.
fails
VideoBuffer &vb = in_glbl->frame_vb[0][line_is_gamma];
lambda_x_in = &(vb.data[__umul24(blockIdx.x / 2, vb.x)]);
vb = in_glbl->frame_vb[1][line_is_gamma];
gamma_x_in = &(vb.data[__umul24(blockIdx.x / 2, vb.x)]);
works
lambda_x_in = &(in_glbl->frame_vb[0][line_is_gamma].data[
__umul24(blockIdx.x / 2, in_glbl->frame_vb[0][line_is_gamma].x)]);
gamma_x_in = &(in_glbl->frame_vb[1][line_is_gamma].data[
__umul24(blockIdx.x / 2, in_glbl->frame_vb[1][line_is_gamma].x)]);