HDR: Don't assume that swapping between BT709 and BT601 needs tone-map.
VideoFrameProcessor treats BT601 and BT709 as roughly equivalent now, so we shouldn't be making checks that assume BT709 <-> requires tone-mapping. Also, the color transfer is a better determinant for tone-mapping than color range, so use just the transfer to determine if tone-mapping is required. PiperOrigin-RevId: 603083100
This commit is contained in:
parent
1163660918
commit
cebe6d8ba5
@ -869,8 +869,7 @@ public final class DefaultVideoFrameProcessor implements VideoFrameProcessor {
|
||||
checkArgument(outputColorInfo.isDataSpaceValid());
|
||||
checkArgument(outputColorInfo.colorTransfer != C.COLOR_TRANSFER_LINEAR);
|
||||
|
||||
if (inputColorInfo.colorSpace != outputColorInfo.colorSpace
|
||||
|| ColorInfo.isTransferHdr(inputColorInfo) != ColorInfo.isTransferHdr(outputColorInfo)) {
|
||||
if (ColorInfo.isTransferHdr(inputColorInfo) != ColorInfo.isTransferHdr(outputColorInfo)) {
|
||||
// OpenGL tone mapping is only implemented for BT2020 to BT709 and HDR to SDR.
|
||||
checkArgument(inputColorInfo.colorSpace == C.COLOR_SPACE_BT2020);
|
||||
checkArgument(outputColorInfo.colorSpace != C.COLOR_SPACE_BT2020);
|
||||
|
Loading…
x
Reference in New Issue
Block a user