Disable texture input when input is HDR

Verified by running all the tests in mh (excluding the analysis tests) on a pixel 7 pro

PiperOrigin-RevId: 530655237
This commit is contained in:
tofunmi 2023-05-09 17:50:20 +00:00 committed by Tofunmi Adigun-Hameed
parent dc4c6daf0b
commit 00d5031dcf

View file

@ -572,12 +572,12 @@ public final class DefaultVideoFrameProcessor implements VideoFrameProcessor {
inputSwitcher.registerInput(INPUT_TYPE_SURFACE);
if (!ColorInfo.isTransferHdr(inputColorInfo)) {
// HDR bitmaps are not supported.
// HDR bitmap or texture input is not supported.
inputSwitcher.registerInput(INPUT_TYPE_BITMAP);
}
if (inputColorInfo.colorTransfer != C.COLOR_TRANSFER_SRGB) {
// Image and textureId concatenation not supported.
inputSwitcher.registerInput(INPUT_TYPE_TEXTURE_ID);
if (inputColorInfo.colorTransfer != C.COLOR_TRANSFER_SRGB) {
// Image and textureId concatenation not supported.
inputSwitcher.registerInput(INPUT_TYPE_TEXTURE_ID);
}
}
inputSwitcher.setDownstreamShaderProgram(effectsShaderPrograms.get(0));