mirror of
https://github.com/androidx/media.git
synced 2025-04-30 06:46:50 +08:00
UltraHDR Ovelays: remove texture unit clash
Do not use the same texture unit for two different textures. This was causing tests to fail on multiple devices. PiperOrigin-RevId: 690610094
This commit is contained in:
parent
9653fa64fe
commit
5bb9e1a932
@ -142,7 +142,7 @@ import java.io.IOException;
|
|||||||
glProgram.setSamplerTexIdUniform(
|
glProgram.setSamplerTexIdUniform(
|
||||||
"uGainmapTexSampler" + texUnitIndex,
|
"uGainmapTexSampler" + texUnitIndex,
|
||||||
gainmapTexIds.get(texUnitIndex),
|
gainmapTexIds.get(texUnitIndex),
|
||||||
texUnitIndex);
|
/* texUnitIndex= */ overlays.size() + texUnitIndex);
|
||||||
GainmapUtil.setGainmapUniforms(
|
GainmapUtil.setGainmapUniforms(
|
||||||
glProgram, lastGainmaps.get(texUnitIndex), texUnitIndex);
|
glProgram, lastGainmaps.get(texUnitIndex), texUnitIndex);
|
||||||
}
|
}
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 7.5 MiB After Width: | Height: | Size: 7.6 MiB |
Binary file not shown.
Before Width: | Height: | Size: 1.7 MiB After Width: | Height: | Size: 1.7 MiB |
@ -359,12 +359,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
|
||||||
@ -394,12 +389,9 @@ 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.
|
// TODO: b/376016540 - use HDR_PSNR_THRESHOLD when HDR videos are processed with high floating
|
||||||
float averagePixelAbsoluteDifference =
|
// point precision.
|
||||||
BitmapPixelTestUtil.getBitmapAveragePixelAbsoluteDifferenceFp16(
|
assertBitmapsAreSimilar(expectedBitmap, actualBitmap, /* psnrThresholdDb= */ 42.5);
|
||||||
expectedBitmap, actualBitmap);
|
|
||||||
assertThat(averagePixelAbsoluteDifference)
|
|
||||||
.isAtMost(MAXIMUM_AVERAGE_PIXEL_ABSOLUTE_DIFFERENCE_DIFFERENT_DEVICE_FP16);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
Loading…
x
Reference in New Issue
Block a user