int[][]filter5=filter5Targets(// will ignore failed tiles
// null, // By Claude on 05/07/2026: use FAIL_PENDING sentinels in target_sequence_multi
target_sequence_multi,// final double [][][][] target_sequence_multi,
// if use motion and select_new will only consider tiles (and compare motion scores in motion_sequence) that have nulls in target_sequence_multi[nseq][ntile]
// if not use motion and select_new will only consider (and compare scores) tiles that have [RSLT_CENTERED] = 0.0
cuasMotion.getNoiseNeibs(),// final int [] noise_neibs,
// cuasMotion.getNoiseMap(), // final double [] noise_map,
// noisemax, // final double noise_max,
target_horizon,// final double lma_horizon, // horizon as maximal pixel Y
cuasMotion.tilesX);// final int tilesX,
getScore(
...
...
@@ -8528,6 +8503,15 @@ public class CuasMotion {
sortMultiTargets(
target_sequence_multi,// final double [][][][] target_multi,
true);// final boolean trim_nulls) { // trim null targets
int[]num_duplicates=removeWeakerDuplicates(// needs sortMultiTargets and after
target_sequence_multi,// final double [][][][] target_multi,
duplicate_tolerance);// final double pix_tolerance)
if(debugLevel>-4)System.out.println("Removed "+num_duplicates[1]+" good duplicate targets (total with bad - "+num_duplicates[0]+").");
sortMultiTargets(
target_sequence_multi,// final double [][][][] target_multi,
true);// final boolean trim_nulls) { // trim null targets
trimTargets(// limit number of targets per tile
target_sequence_multi,// final double [][][][] target_multi,
trim_first);// final int max_targets) {
...
...
@@ -8576,7 +8560,6 @@ public class CuasMotion {
}
int[][]filter5=filter5Targets(// will ignore failed tiles
// null, // motion_sequence, // final double [][][] target_sequence,
target_sequence_multi,// final double [][][][] target_sequence_multi,non-centered marked as "used"
// if use motion and select_new will only consider tiles (and compare motion scores in motion_sequence) that have nulls in target_sequence_multi[nseq][ntile]
// if not use motion and select_new will only consider (and compare scores) tiles that have [RSLT_CENTERED] = 0.0
...
...
@@ -8624,9 +8607,6 @@ public class CuasMotion {
break;
}
// render and process in centered mode
// double [][][] targets_nonoverlap = applyFilter( // motion vectors // will have nulls not top try
// motion_sequence, // double [][][] motion_scan,
// filter5); // boolean [][] filter5)
double[][][]targets_nonoverlap=applyFilter(// motion vectors // will have nulls not top try
public static int [][] filter5Targets( // should work for motion vectors and target coordinates returns index of selected target or -1 for unselected
final double [][][] motion_sequence, // may be null
final double [][][][] target_sequence_multi, // not null
// if use motion and select_new will only consider tiles (and compare motion scores in motion_sequence) that have nulls in target_sequence_multi[nseq][ntile]
// if not use motion and select_new will only consider (and compare scores) tiles that have [RSLT_CENTERED] = 0.0. After selection will mark those as
// if not select_new (assumes not use motion) will return best (and good) target indices
final boolean use_motion_in, // true - use motion vectors confidence, false - use target confidence
final boolean select_new_in, // true - use only untested tiles, false - use good tiles
// when using good ones - will select first good one (best if correctly ordered)
final double min_confidence, // 0 OK
final double lma_horizon, // target below horizon
final int tilesX,
final int range, // 1 or 2
final int [] remain,
final int [] passes, // debugging - number of passes required
final int debugLevel){
final boolean use_motion = use_motion_in; // By Claude on 05/07/2026: decouple from motion_sequence presence
final boolean select_new = select_new_in; // By Claude on 05/07/2026: decouple from motion_sequence
boolean debug_now = (debugLevel<5);
final int num_seq = target_sequence_multi.length;
final int num_tiles = target_sequence_multi[0].length;
final int tilesY = num_tiles/ tilesX;
final int [][] filter5 = new int [num_seq][num_tiles];
final Thread[] threads = ImageDtt.newThreadArray();
final AtomicInteger ai = new AtomicInteger(0);
final int dbg_tile = debug_now ?(51+38*80) : -1;
final int dbg_seq0 = debug_now ? 27: -1;
final int dbg_seq1 = debug_now ? 29: -1;
final int ihorizon = (lma_horizon > 0) ?( (int) Math.ceil(lma_horizon/GPUTileProcessor.DTT_SIZE)) : -1; // tiles with tileY >= ihorizon are removed
// removing final double [][][] motion_sequence, // AF 05/22/2026
publicstaticint[][]filter5Targets(// should work for motion vectors and target coordinates returns index of selected target or -1 for unselected
finaldouble[][][][]target_sequence_multi,// not null
// if use motion and select_new will only consider tiles (and compare motion scores in motion_sequence) that have nulls in target_sequence_multi[nseq][ntile]