Skip to content

Commit a116f76

Browse files
committed
cesium/oracle: passes() must not accept -inf PSNR
is_infinite() is true for both +inf and -inf; a -inf PSNR would wrongly satisfy any minimum-PSNR gate. Only +inf (identical buffers, MSE=0) should auto-pass. (CodeRabbit, oracle.rs passes().) https://claude.ai/code/session_017GFLBnDy23AWBqvkbHHC41
1 parent 9f4b88e commit a116f76

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

crates/cesium/src/oracle.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ impl ParityMetrics {
295295
/// }
296296
/// ```
297297
pub fn passes(&self, min_ssim: f32, min_psnr_db: f32) -> bool {
298-
self.ssim >= min_ssim && (self.psnr >= min_psnr_db || self.psnr.is_infinite())
298+
self.ssim >= min_ssim && (self.psnr >= min_psnr_db || self.psnr == f32::INFINITY)
299299
}
300300
}
301301

0 commit comments

Comments
 (0)