Commit 4230ea94 by huangdarwin Committed by Rohit Singh

HDR: Remove ColorInfo.SDR constant

The SDR constant also specified a color space and range, in addition to
C.COLOR_TRANSFER_SDR. However, it turns out that SDR videos may use different color
space and range values, so following prior ExoPlayer conventions to have `null`
mean "generic SDR" is preferable here.

PiperOrigin-RevId: 459296746
parent 95218076
......@@ -32,14 +32,6 @@ import org.checkerframework.dataflow.qual.Pure;
/** Stores color info. */
public final class ColorInfo implements Bundleable {
/** Standard Dynamic Range (SDR). */
public static final ColorInfo SDR =
new ColorInfo(
C.COLOR_SPACE_BT709,
C.COLOR_RANGE_LIMITED,
C.COLOR_TRANSFER_SDR,
/* hdrStaticInfo= */ null);
/**
* Returns the {@link C.ColorSpace} corresponding to the given ISO color primary code, as per
* table A.7.21.1 in Rec. ITU-T T.832 (03/2009), or {@link Format#NO_VALUE} if no mapping can be
......
......@@ -387,7 +387,7 @@ import org.checkerframework.dataflow.qual.Pure;
transformationRequest.videoMimeType != null
? transformationRequest.videoMimeType
: inputFormat.sampleMimeType)
.setColorInfo(fallbackToSdr ? ColorInfo.SDR : inputFormat.colorInfo)
.setColorInfo(fallbackToSdr ? null : inputFormat.colorInfo)
.build();
encoder =
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment