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
This commit is contained in:
parent
87adb88f57
commit
7078ce312d
@ -31,14 +31,6 @@ import org.checkerframework.dataflow.qual.Pure;
|
|||||||
/** Stores color info. */
|
/** Stores color info. */
|
||||||
@UnstableApi
|
@UnstableApi
|
||||||
public final class ColorInfo implements Bundleable {
|
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
|
* 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
|
* 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 != null
|
||||||
? transformationRequest.videoMimeType
|
? transformationRequest.videoMimeType
|
||||||
: inputFormat.sampleMimeType)
|
: inputFormat.sampleMimeType)
|
||||||
.setColorInfo(fallbackToSdr ? ColorInfo.SDR : inputFormat.colorInfo)
|
.setColorInfo(fallbackToSdr ? null : inputFormat.colorInfo)
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
encoder =
|
encoder =
|
||||||
|
Loading…
x
Reference in New Issue
Block a user