Fix HDR effect pipeline
NPE in toneMap_hlgFrame_matchesGoldenFile and toneMap_pqFrame_matchesGoldenFile was created because a uEnableColorTransfer uniform was being created on the HDR path, when HDR shader files don't have this uniform. (they don't support disable color transfers right now) Fix: only create the uniform when input is SDR. manually tested on failing tests PiperOrigin-RevId: 522002603
This commit is contained in:
parent
219967c5a3
commit
5d6ffaaf55
@ -334,7 +334,6 @@ import java.util.List;
|
||||
ColorInfo outputColorInfo,
|
||||
boolean enableColorTransfers)
|
||||
throws VideoFrameProcessingException {
|
||||
glProgram.setIntUniform("uEnableColorTransfer", enableColorTransfers ? GL_TRUE : GL_FALSE);
|
||||
boolean isInputTransferHdr = ColorInfo.isTransferHdr(inputColorInfo);
|
||||
@C.ColorTransfer int outputColorTransfer = outputColorInfo.colorTransfer;
|
||||
if (isInputTransferHdr) {
|
||||
@ -362,6 +361,7 @@ import java.util.List;
|
||||
outputColorTransfer != Format.NO_VALUE && outputColorTransfer != C.COLOR_TRANSFER_SDR);
|
||||
glProgram.setIntUniform("uOutputColorTransfer", outputColorTransfer);
|
||||
} else {
|
||||
glProgram.setIntUniform("uEnableColorTransfer", enableColorTransfers ? GL_TRUE : GL_FALSE);
|
||||
checkArgument(
|
||||
outputColorInfo.colorSpace != C.COLOR_SPACE_BT2020,
|
||||
"Converting from SDR to HDR is not supported.");
|
||||
|
Loading…
x
Reference in New Issue
Block a user