diff --git a/demos/transformer/src/main/java/androidx/media3/demo/transformer/BitmapOverlayProcessor.java b/demos/transformer/src/main/java/androidx/media3/demo/transformer/BitmapOverlayProcessor.java index b5d1e5337d..3643f65b2f 100644 --- a/demos/transformer/src/main/java/androidx/media3/demo/transformer/BitmapOverlayProcessor.java +++ b/demos/transformer/src/main/java/androidx/media3/demo/transformer/BitmapOverlayProcessor.java @@ -67,7 +67,7 @@ import java.util.Locale; * * @param context The {@link Context}. * @param useHdr Whether input textures come from an HDR source. If {@code true}, colors will be - * in linear RGB BT.2020. If {@code false}, colors will be in gamma RGB BT.709. + * in linear RGB BT.2020. If {@code false}, colors will be in linear RGB BT.709. * @throws FrameProcessingException If a problem occurs while reading shader files. */ public BitmapOverlayProcessor(Context context, boolean useHdr) throws FrameProcessingException { diff --git a/demos/transformer/src/main/java/androidx/media3/demo/transformer/PeriodicVignetteProcessor.java b/demos/transformer/src/main/java/androidx/media3/demo/transformer/PeriodicVignetteProcessor.java index 045b958a70..079843f22c 100644 --- a/demos/transformer/src/main/java/androidx/media3/demo/transformer/PeriodicVignetteProcessor.java +++ b/demos/transformer/src/main/java/androidx/media3/demo/transformer/PeriodicVignetteProcessor.java @@ -53,7 +53,7 @@ import java.io.IOException; * * @param context The {@link Context}. * @param useHdr Whether input textures come from an HDR source. If {@code true}, colors will be - * in linear RGB BT.2020. If {@code false}, colors will be in gamma RGB BT.709. + * in linear RGB BT.2020. If {@code false}, colors will be in linear RGB BT.709. * @param centerX The x-coordinate of the center of the effect. * @param centerY The y-coordinate of the center of the effect. * @param minInnerRadius The lower bound of the radius that is unaffected by the effect. diff --git a/demos/transformer/src/withMediaPipe/java/androidx/media3/demo/transformer/MediaPipeProcessor.java b/demos/transformer/src/withMediaPipe/java/androidx/media3/demo/transformer/MediaPipeProcessor.java index 80e880c344..84c06d3e49 100644 --- a/demos/transformer/src/withMediaPipe/java/androidx/media3/demo/transformer/MediaPipeProcessor.java +++ b/demos/transformer/src/withMediaPipe/java/androidx/media3/demo/transformer/MediaPipeProcessor.java @@ -85,7 +85,7 @@ import java.util.concurrent.Future; * * @param context The {@link Context}. * @param useHdr Whether input textures come from an HDR source. If {@code true}, colors will be - * in linear RGB BT.2020. If {@code false}, colors will be in gamma RGB BT.709. + * in linear RGB BT.2020. If {@code false}, colors will be in linear RGB BT.709. * @param graphName Name of a MediaPipe graph asset to load. * @param isSingleFrameGraph Whether the MediaPipe graph will eventually produce one output frame * each time an input frame (and no other input) has been queued. diff --git a/libraries/effect/src/main/java/androidx/media3/effect/ColorLutProcessor.java b/libraries/effect/src/main/java/androidx/media3/effect/ColorLutProcessor.java index f6d772dc16..e7131d6df4 100644 --- a/libraries/effect/src/main/java/androidx/media3/effect/ColorLutProcessor.java +++ b/libraries/effect/src/main/java/androidx/media3/effect/ColorLutProcessor.java @@ -41,7 +41,7 @@ import java.io.IOException; * @param context The {@link Context}. * @param colorLut The {@link ColorLut} to apply to each frame in order. * @param useHdr Whether input textures come from an HDR source. If {@code true}, colors will be - * in linear RGB BT.2020. If {@code false}, colors will be in gamma RGB BT.709. + * in linear RGB BT.2020. If {@code false}, colors will be in linear RGB BT.709. * @throws FrameProcessingException If a problem occurs while reading shader files. */ public ColorLutProcessor(Context context, ColorLut colorLut, boolean useHdr) diff --git a/libraries/effect/src/main/java/androidx/media3/effect/ContrastProcessor.java b/libraries/effect/src/main/java/androidx/media3/effect/ContrastProcessor.java index 164db51af1..0c4a5a4ab1 100644 --- a/libraries/effect/src/main/java/androidx/media3/effect/ContrastProcessor.java +++ b/libraries/effect/src/main/java/androidx/media3/effect/ContrastProcessor.java @@ -38,7 +38,7 @@ import java.io.IOException; * @param context The {@link Context}. * @param contrastEffect The {@link Contrast} to apply to each frame in order. * @param useHdr Whether input textures come from an HDR source. If {@code true}, colors will be - * in linear RGB BT.2020. If {@code false}, colors will be in gamma RGB BT.709. + * in linear RGB BT.2020. If {@code false}, colors will be in linear RGB BT.709. * @throws FrameProcessingException If a problem occurs while reading shader files. */ public ContrastProcessor(Context context, Contrast contrastEffect, boolean useHdr) diff --git a/libraries/effect/src/main/java/androidx/media3/effect/GlEffect.java b/libraries/effect/src/main/java/androidx/media3/effect/GlEffect.java index d19956e994..9c83e77e4f 100644 --- a/libraries/effect/src/main/java/androidx/media3/effect/GlEffect.java +++ b/libraries/effect/src/main/java/androidx/media3/effect/GlEffect.java @@ -35,7 +35,7 @@ public interface GlEffect extends Effect { * * @param context A {@link Context}. * @param useHdr Whether input textures come from an HDR source. If {@code true}, colors will be - * in linear RGB BT.2020. If {@code false}, colors will be in gamma RGB BT.709. + * in linear RGB BT.2020. If {@code false}, colors will be in linear RGB BT.709. */ GlTextureProcessor toGlTextureProcessor(Context context, boolean useHdr) throws FrameProcessingException; diff --git a/libraries/effect/src/main/java/androidx/media3/effect/HslProcessor.java b/libraries/effect/src/main/java/androidx/media3/effect/HslProcessor.java index 6c7a19ed21..a4ccdcd254 100644 --- a/libraries/effect/src/main/java/androidx/media3/effect/HslProcessor.java +++ b/libraries/effect/src/main/java/androidx/media3/effect/HslProcessor.java @@ -40,7 +40,7 @@ import java.io.IOException; * @param context The {@link Context}. * @param hslAdjustment The {@link HslAdjustment} to apply to each frame in order. * @param useHdr Whether input textures come from an HDR source. If {@code true}, colors will be - * in linear RGB BT.2020. If {@code false}, colors will be in gamma RGB BT.709. + * in linear RGB BT.2020. If {@code false}, colors will be in linear RGB BT.709. * @throws FrameProcessingException If a problem occurs while reading shader files. */ public HslProcessor(Context context, HslAdjustment hslAdjustment, boolean useHdr) diff --git a/libraries/effect/src/main/java/androidx/media3/effect/MatrixTextureProcessor.java b/libraries/effect/src/main/java/androidx/media3/effect/MatrixTextureProcessor.java index 2d9c49cb48..183b1b7cb6 100644 --- a/libraries/effect/src/main/java/androidx/media3/effect/MatrixTextureProcessor.java +++ b/libraries/effect/src/main/java/androidx/media3/effect/MatrixTextureProcessor.java @@ -50,7 +50,6 @@ import java.util.List; * *
Can copy frames from an external texture and apply color transformations for HDR if needed. */ -// TODO(b/241902517): Fix Gamma references since intermediate color space is now linear. @UnstableApi @SuppressWarnings("FunctionalInterfaceClash") // b/228192298 /* package */ final class MatrixTextureProcessor extends SingleFrameGlTextureProcessor @@ -132,8 +131,8 @@ import java.util.List; /** * Creates a new instance. * - *
Input and output are both intermediate optical colors, which are linear RGB BT.2020 if - * {@code useHdr} is {@code true} and gamma RGB BT.709 if not. + *
Input and output are both intermediate optical/linear colors, and RGB BT.2020 if {@code + * useHdr} is {@code true} and RGB BT.709 if not. * * @param context The {@link Context}. * @param matrixTransformations The {@link GlMatrixTransformation GlMatrixTransformations} to @@ -174,8 +173,8 @@ import java.util.List; * intermediate optical {@link GlTextureProcessor} color output, before {@code * matrixTransformations} and {@code rgbMatrices} are applied. * - *
Intermediate optical colors are linear RGB BT.2020 if {@code electricalColorInfo} is - * {@linkplain ColorInfo#isTransferHdr(ColorInfo) HDR}, and gamma RGB BT.709 if not. + *
Intermediate optical/linear colors are RGB BT.2020 if {@code electricalColorInfo} is + * {@linkplain ColorInfo#isTransferHdr(ColorInfo) HDR}, and RGB BT.709 if not. * * @param context The {@link Context}. * @param matrixTransformations The {@link GlMatrixTransformation GlMatrixTransformations} to @@ -235,8 +234,8 @@ import java.util.List; * GlTextureProcessor} color input, to electrical color output, after {@code * matrixTransformations} and {@code rgbMatrices} are applied. * - *
Intermediate optical colors are linear RGB BT.2020 if {@code electricalColorInfo} is - * {@linkplain ColorInfo#isTransferHdr(ColorInfo) HDR}, and gamma RGB BT.709 if not. + *
Intermediate optical/linear colors are RGB BT.2020 if {@code electricalColorInfo} is + * {@linkplain ColorInfo#isTransferHdr(ColorInfo) HDR}, and RGB BT.709 if not. * * @param context The {@link Context}. * @param matrixTransformations The {@link GlMatrixTransformation GlMatrixTransformations} to diff --git a/libraries/effect/src/main/java/androidx/media3/effect/RgbMatrix.java b/libraries/effect/src/main/java/androidx/media3/effect/RgbMatrix.java index 39a78e979a..2767cab815 100644 --- a/libraries/effect/src/main/java/androidx/media3/effect/RgbMatrix.java +++ b/libraries/effect/src/main/java/androidx/media3/effect/RgbMatrix.java @@ -33,7 +33,7 @@ public interface RgbMatrix extends GlEffect { * * @param presentationTimeUs The timestamp of the frame to apply the matrix on. * @param useHdr If {@code true}, colors will be in linear RGB BT.2020. If {@code false}, colors - * will be in gamma RGB BT.709. Must be consistent with {@code useHdr} in {@link + * will be in linear RGB BT.709. Must be consistent with {@code useHdr} in {@link * #toGlTextureProcessor(Context, boolean)}. * @return The {@code RgbMatrix} to apply to the frame. */ diff --git a/libraries/effect/src/main/java/androidx/media3/effect/SingleFrameGlTextureProcessor.java b/libraries/effect/src/main/java/androidx/media3/effect/SingleFrameGlTextureProcessor.java index fee83ad9c1..04b88a55e0 100644 --- a/libraries/effect/src/main/java/androidx/media3/effect/SingleFrameGlTextureProcessor.java +++ b/libraries/effect/src/main/java/androidx/media3/effect/SingleFrameGlTextureProcessor.java @@ -52,7 +52,7 @@ public abstract class SingleFrameGlTextureProcessor implements GlTextureProcesso * Creates a {@code SingleFrameGlTextureProcessor} instance. * * @param useHdr Whether input textures come from an HDR source. If {@code true}, colors will be - * in linear RGB BT.2020. If {@code false}, colors will be in gamma RGB BT.709. + * in linear RGB BT.2020. If {@code false}, colors will be in linear RGB BT.709. */ public SingleFrameGlTextureProcessor(boolean useHdr) { this.useHdr = useHdr;