Commit 7f0ce136 authored by Andrey Filippov's avatar Andrey Filippov
Browse files

Claude: Fix NPE in refineMotionVectors debug CORR2D visualization



corr_partial_dbg() NPEs on null layers when sequences are skipped
(has_centered=false or no valid frame pairs). Fill null slots with
empty double[num_tiles][] before calling the visualizer.

Co-Authored-By: default avatarClaude Sonnet 4.6 <noreply@anthropic.com>
parent 1dfb402e
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -2453,6 +2453,11 @@ public class CuasMotion {
				slice_titles_ref[i] = (scene_titles_all != null && frame_center < scene_titles_all.length)
						? scene_titles_all[frame_center] : "nseq" + i;
			}
			// By Claude on 05/07/2026: corr_partial_dbg NPEs on null layers (skipped sequences); fill with empty arrays
			final int num_tiles = cuasMotion.tilesX * cuasMotion.tilesY;
			for (int i = 0; i < corr2d_ref.length; i++) {
				if (corr2d_ref[i] == null) corr2d_ref[i] = new double[num_tiles][];
			}
			double[][] dbg_2d_corrs = ImageDtt.corr_partial_dbg(
					corr2d_ref,
					cuasMotion.tilesX,