Use PSNR for comparing equality in one HDR10 test

Also, fix incorrectly stretched golden file that was not detected with previous, less sensitive, average pixel error comparison.

PiperOrigin-RevId: 690643520
This commit is contained in:
dancho 2024-10-28 09:35:36 -07:00 committed by Copybara-Service
parent e67660f326
commit 4601a42aee
2 changed files with 1 additions and 6 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.0 MiB

After

Width:  |  Height:  |  Size: 7.0 MiB

View File

@ -491,12 +491,7 @@ public final class DefaultVideoFrameProcessorTextureOutputPixelTest {
videoFrameProcessorTestRunner.processFirstFrameAndEnd();
Bitmap actualBitmap = videoFrameProcessorTestRunner.getOutputBitmap();
// TODO(b/207848601): Switch to using proper tooling for testing against golden data.
float averagePixelAbsoluteDifference =
BitmapPixelTestUtil.getBitmapAveragePixelAbsoluteDifferenceFp16(
expectedBitmap, actualBitmap);
assertThat(averagePixelAbsoluteDifference)
.isAtMost(MAXIMUM_AVERAGE_PIXEL_ABSOLUTE_DIFFERENCE_DIFFERENT_DEVICE_FP16);
assertBitmapsAreSimilar(expectedBitmap, actualBitmap, HDR_PSNR_THRESHOLD);
}
@Test