mirror of
https://github.com/samsonjs/media.git
synced 2026-03-26 09:35:47 +00:00
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
(cherry picked from commit 7078ce312d)
This commit is contained in:
parent
c199608589
commit
bde5f9e30d
2 changed files with 1 additions and 9 deletions
|
|
@ -31,14 +31,6 @@ import org.checkerframework.dataflow.qual.Pure;
|
|||
/** Stores color info. */
|
||||
@UnstableApi
|
||||
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 =
|
||||
|
|
|
|||
Loading…
Reference in a new issue