Fix image up-side-down in when playing a Composition
When playing a Composition, the color transfer of an image is incorrectly passed down to be SMPTE170M, but it should be SRGB. PiperOrigin-RevId: 626425396
This commit is contained in:
parent
fb037b9847
commit
716aedd019
@ -541,9 +541,11 @@ public final class CompositingVideoSinkProvider
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static ColorInfo getAdjustedInputColorInfo(@Nullable ColorInfo inputColorInfo) {
|
private static ColorInfo getAdjustedInputColorInfo(@Nullable ColorInfo inputColorInfo) {
|
||||||
return inputColorInfo != null && ColorInfo.isTransferHdr(inputColorInfo)
|
if (inputColorInfo == null || !inputColorInfo.isDataSpaceValid()) {
|
||||||
? inputColorInfo
|
return ColorInfo.SDR_BT709_LIMITED;
|
||||||
: ColorInfo.SDR_BT709_LIMITED;
|
}
|
||||||
|
|
||||||
|
return inputColorInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Receives input from an ExoPlayer renderer and forwards it to the video graph. */
|
/** Receives input from an ExoPlayer renderer and forwards it to the video graph. */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user