From 9e5e06136a1fb141e7a77bdfdfd30290479fa66a Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Fri, 19 May 2023 10:48:49 +0200 Subject: [PATCH] Fix motion tracking not tracking at all A mistake in the recent ImBuf API refactor: the Libmv image accessor was copying destination to destination (possibly using the wrong number of channels as well). Pull Request: https://projects.blender.org/blender/blender/pulls/108070 --- source/blender/blenkernel/intern/tracking_util.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/blender/blenkernel/intern/tracking_util.cc b/source/blender/blenkernel/intern/tracking_util.cc index 8c2585359b2..f8d457dca9c 100644 --- a/source/blender/blenkernel/intern/tracking_util.cc +++ b/source/blender/blenkernel/intern/tracking_util.cc @@ -630,7 +630,7 @@ static ImBuf *make_grayscale_ibuf_copy(ImBuf *ibuf) IMB_assign_float_buffer(grayscale, rect_float, IB_TAKE_OWNERSHIP); for (int i = 0; i < grayscale->x * grayscale->y; i++) { - const float *pixel = rect_float + ibuf->channels * i; + const float *pixel = ibuf->float_buffer.data + ibuf->channels * i; rect_float[i] = 0.2126f * pixel[0] + 0.7152f * pixel[1] + 0.0722f * pixel[2]; }