mirror of
https://github.com/androidx/media.git
synced 2025-04-30 06:46:50 +08:00
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:
parent
e67660f326
commit
4601a42aee
Binary file not shown.
Before Width: | Height: | Size: 7.0 MiB After Width: | Height: | Size: 7.0 MiB |
@ -491,12 +491,7 @@ public final class DefaultVideoFrameProcessorTextureOutputPixelTest {
|
|||||||
videoFrameProcessorTestRunner.processFirstFrameAndEnd();
|
videoFrameProcessorTestRunner.processFirstFrameAndEnd();
|
||||||
Bitmap actualBitmap = videoFrameProcessorTestRunner.getOutputBitmap();
|
Bitmap actualBitmap = videoFrameProcessorTestRunner.getOutputBitmap();
|
||||||
|
|
||||||
// TODO(b/207848601): Switch to using proper tooling for testing against golden data.
|
assertBitmapsAreSimilar(expectedBitmap, actualBitmap, HDR_PSNR_THRESHOLD);
|
||||||
float averagePixelAbsoluteDifference =
|
|
||||||
BitmapPixelTestUtil.getBitmapAveragePixelAbsoluteDifferenceFp16(
|
|
||||||
expectedBitmap, actualBitmap);
|
|
||||||
assertThat(averagePixelAbsoluteDifference)
|
|
||||||
.isAtMost(MAXIMUM_AVERAGE_PIXEL_ABSOLUTE_DIFFERENCE_DIFFERENT_DEVICE_FP16);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
Loading…
x
Reference in New Issue
Block a user