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

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: 's avatarClaude Sonnet 4.6 <noreply@anthropic.com>
parent 1dfb402e
...@@ -2453,6 +2453,11 @@ public class CuasMotion { ...@@ -2453,6 +2453,11 @@ public class CuasMotion {
slice_titles_ref[i] = (scene_titles_all != null && frame_center < scene_titles_all.length) slice_titles_ref[i] = (scene_titles_all != null && frame_center < scene_titles_all.length)
? scene_titles_all[frame_center] : "nseq" + i; ? 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( double[][] dbg_2d_corrs = ImageDtt.corr_partial_dbg(
corr2d_ref, corr2d_ref,
cuasMotion.tilesX, cuasMotion.tilesX,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment