Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
SDK
/
exoplayer
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
f3d13214
authored
Sep 26, 2022
by
huangdarwin
Committed by
Marc Baechinger
Oct 19, 2022
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
HDR: Update gamma comments to linear.
Comment-only change. PiperOrigin-RevId: 476873286
parent
ccb820dd
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
15 additions
and
16 deletions
demos/transformer/src/main/java/com/google/android/exoplayer2/transformerdemo/BitmapOverlayProcessor.java
demos/transformer/src/main/java/com/google/android/exoplayer2/transformerdemo/PeriodicVignetteProcessor.java
demos/transformer/src/withMediaPipe/java/androidx/media3/demo/transformer/MediaPipeProcessor.java
google3/third_party/java_src/android_libs/media/libraries/effect/src/main/java/androidx/media3/effect/ColorLutProcessor.java
google3/third_party/java_src/android_libs/media/libraries/effect/src/main/java/androidx/media3/effect/ContrastProcessor.java
google3/third_party/java_src/android_libs/media/libraries/effect/src/main/java/androidx/media3/effect/GlEffect.java
google3/third_party/java_src/android_libs/media/libraries/effect/src/main/java/androidx/media3/effect/HslProcessor.java
google3/third_party/java_src/android_libs/media/libraries/effect/src/main/java/androidx/media3/effect/MatrixTextureProcessor.java
google3/third_party/java_src/android_libs/media/libraries/effect/src/main/java/androidx/media3/effect/RgbMatrix.java
google3/third_party/java_src/android_libs/media/libraries/effect/src/main/java/androidx/media3/effect/SingleFrameGlTextureProcessor.java
demos/transformer/src/main/java/com/google/android/exoplayer2/transformerdemo/BitmapOverlayProcessor.java
View file @
f3d13214
...
@@ -67,7 +67,7 @@ import java.util.Locale;
...
@@ -67,7 +67,7 @@ import java.util.Locale;
*
*
* @param context The {@link Context}.
* @param context The {@link Context}.
* @param useHdr Whether input textures come from an HDR source. If {@code true}, colors will be
* @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.
* @throws FrameProcessingException If a problem occurs while reading shader files.
*/
*/
public
BitmapOverlayProcessor
(
Context
context
,
boolean
useHdr
)
throws
FrameProcessingException
{
public
BitmapOverlayProcessor
(
Context
context
,
boolean
useHdr
)
throws
FrameProcessingException
{
...
...
demos/transformer/src/main/java/com/google/android/exoplayer2/transformerdemo/PeriodicVignetteProcessor.java
View file @
f3d13214
...
@@ -53,7 +53,7 @@ import java.io.IOException;
...
@@ -53,7 +53,7 @@ import java.io.IOException;
*
*
* @param context The {@link Context}.
* @param context The {@link Context}.
* @param useHdr Whether input textures come from an HDR source. If {@code true}, colors will be
* @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 centerX The x-coordinate of the center of the effect.
* @param centerY The y-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.
* @param minInnerRadius The lower bound of the radius that is unaffected by the effect.
...
...
demos/transformer/src/withMediaPipe/java/androidx/media3/demo/transformer/MediaPipeProcessor.java
View file @
f3d13214
...
@@ -85,7 +85,7 @@ import java.util.concurrent.Future;
...
@@ -85,7 +85,7 @@ import java.util.concurrent.Future;
*
*
* @param context The {@link Context}.
* @param context The {@link Context}.
* @param useHdr Whether input textures come from an HDR source. If {@code true}, colors will be
* @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 graphName Name of a MediaPipe graph asset to load.
* @param isSingleFrameGraph Whether the MediaPipe graph will eventually produce one output frame
* @param isSingleFrameGraph Whether the MediaPipe graph will eventually produce one output frame
* each time an input frame (and no other input) has been queued.
* each time an input frame (and no other input) has been queued.
...
...
google3/third_party/java_src/android_libs/media/libraries/effect/src/main/java/androidx/media3/effect/ColorLutProcessor.java
View file @
f3d13214
...
@@ -41,7 +41,7 @@ import java.io.IOException;
...
@@ -41,7 +41,7 @@ import java.io.IOException;
* @param context The {@link Context}.
* @param context The {@link Context}.
* @param colorLut The {@link ColorLut} to apply to each frame in order.
* @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
* @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.
* @throws FrameProcessingException If a problem occurs while reading shader files.
*/
*/
public
ColorLutProcessor
(
Context
context
,
ColorLut
colorLut
,
boolean
useHdr
)
public
ColorLutProcessor
(
Context
context
,
ColorLut
colorLut
,
boolean
useHdr
)
...
...
google3/third_party/java_src/android_libs/media/libraries/effect/src/main/java/androidx/media3/effect/ContrastProcessor.java
View file @
f3d13214
...
@@ -38,7 +38,7 @@ import java.io.IOException;
...
@@ -38,7 +38,7 @@ import java.io.IOException;
* @param context The {@link Context}.
* @param context The {@link Context}.
* @param contrastEffect The {@link Contrast} to apply to each frame in order.
* @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
* @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.
* @throws FrameProcessingException If a problem occurs while reading shader files.
*/
*/
public
ContrastProcessor
(
Context
context
,
Contrast
contrastEffect
,
boolean
useHdr
)
public
ContrastProcessor
(
Context
context
,
Contrast
contrastEffect
,
boolean
useHdr
)
...
...
google3/third_party/java_src/android_libs/media/libraries/effect/src/main/java/androidx/media3/effect/GlEffect.java
View file @
f3d13214
...
@@ -33,7 +33,7 @@ public interface GlEffect extends Effect {
...
@@ -33,7 +33,7 @@ public interface GlEffect extends Effect {
*
*
* @param context A {@link Context}.
* @param context A {@link Context}.
* @param useHdr Whether input textures come from an HDR source. If {@code true}, colors will be
* @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
)
GlTextureProcessor
toGlTextureProcessor
(
Context
context
,
boolean
useHdr
)
throws
FrameProcessingException
;
throws
FrameProcessingException
;
...
...
google3/third_party/java_src/android_libs/media/libraries/effect/src/main/java/androidx/media3/effect/HslProcessor.java
View file @
f3d13214
...
@@ -40,7 +40,7 @@ import java.io.IOException;
...
@@ -40,7 +40,7 @@ import java.io.IOException;
* @param context The {@link Context}.
* @param context The {@link Context}.
* @param hslAdjustment The {@link HslAdjustment} to apply to each frame in order.
* @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
* @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.
* @throws FrameProcessingException If a problem occurs while reading shader files.
*/
*/
public
HslProcessor
(
Context
context
,
HslAdjustment
hslAdjustment
,
boolean
useHdr
)
public
HslProcessor
(
Context
context
,
HslAdjustment
hslAdjustment
,
boolean
useHdr
)
...
...
google3/third_party/java_src/android_libs/media/libraries/effect/src/main/java/androidx/media3/effect/MatrixTextureProcessor.java
View file @
f3d13214
...
@@ -49,7 +49,6 @@ import java.util.List;
...
@@ -49,7 +49,6 @@ import java.util.List;
*
*
* <p>Can copy frames from an external texture and apply color transformations for HDR if needed.
* <p>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.
@SuppressWarnings
(
"FunctionalInterfaceClash"
)
// b/228192298
@SuppressWarnings
(
"FunctionalInterfaceClash"
)
// b/228192298
/* package */
final
class
MatrixTextureProcessor
extends
SingleFrameGlTextureProcessor
/* package */
final
class
MatrixTextureProcessor
extends
SingleFrameGlTextureProcessor
implements
ExternalTextureProcessor
{
implements
ExternalTextureProcessor
{
...
@@ -130,8 +129,8 @@ import java.util.List;
...
@@ -130,8 +129,8 @@ import java.util.List;
/**
/**
* Creates a new instance.
* Creates a new instance.
*
*
* <p>Input and output are both intermediate optical
colors, which are linear RGB BT.2020 if
* <p>Input and output are both intermediate optical
/linear colors, and RGB BT.2020 if {@code
*
{@code useHdr} is {@code true} and gamma
RGB BT.709 if not.
*
useHdr} is {@code true} and
RGB BT.709 if not.
*
*
* @param context The {@link Context}.
* @param context The {@link Context}.
* @param matrixTransformations The {@link GlMatrixTransformation GlMatrixTransformations} to
* @param matrixTransformations The {@link GlMatrixTransformation GlMatrixTransformations} to
...
@@ -172,8 +171,8 @@ import java.util.List;
...
@@ -172,8 +171,8 @@ import java.util.List;
* intermediate optical {@link GlTextureProcessor} color output, before {@code
* intermediate optical {@link GlTextureProcessor} color output, before {@code
* matrixTransformations} and {@code rgbMatrices} are applied.
* matrixTransformations} and {@code rgbMatrices} are applied.
*
*
* <p>Intermediate optical
colors are linear
RGB BT.2020 if {@code electricalColorInfo} is
* <p>Intermediate optical
/linear colors are
RGB BT.2020 if {@code electricalColorInfo} is
* {@linkplain ColorInfo#isTransferHdr(ColorInfo) HDR}, and
gamma
RGB BT.709 if not.
* {@linkplain ColorInfo#isTransferHdr(ColorInfo) HDR}, and RGB BT.709 if not.
*
*
* @param context The {@link Context}.
* @param context The {@link Context}.
* @param matrixTransformations The {@link GlMatrixTransformation GlMatrixTransformations} to
* @param matrixTransformations The {@link GlMatrixTransformation GlMatrixTransformations} to
...
@@ -233,8 +232,8 @@ import java.util.List;
...
@@ -233,8 +232,8 @@ import java.util.List;
* GlTextureProcessor} color input, to electrical color output, after {@code
* GlTextureProcessor} color input, to electrical color output, after {@code
* matrixTransformations} and {@code rgbMatrices} are applied.
* matrixTransformations} and {@code rgbMatrices} are applied.
*
*
* <p>Intermediate optical
colors are linear
RGB BT.2020 if {@code electricalColorInfo} is
* <p>Intermediate optical
/linear colors are
RGB BT.2020 if {@code electricalColorInfo} is
* {@linkplain ColorInfo#isTransferHdr(ColorInfo) HDR}, and
gamma
RGB BT.709 if not.
* {@linkplain ColorInfo#isTransferHdr(ColorInfo) HDR}, and RGB BT.709 if not.
*
*
* @param context The {@link Context}.
* @param context The {@link Context}.
* @param matrixTransformations The {@link GlMatrixTransformation GlMatrixTransformations} to
* @param matrixTransformations The {@link GlMatrixTransformation GlMatrixTransformations} to
...
...
google3/third_party/java_src/android_libs/media/libraries/effect/src/main/java/androidx/media3/effect/RgbMatrix.java
View file @
f3d13214
...
@@ -31,7 +31,7 @@ public interface RgbMatrix extends GlEffect {
...
@@ -31,7 +31,7 @@ public interface RgbMatrix extends GlEffect {
*
*
* @param presentationTimeUs The timestamp of the frame to apply the matrix on.
* @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
* @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)}.
* #toGlTextureProcessor(Context, boolean)}.
* @return The {@code RgbMatrix} to apply to the frame.
* @return The {@code RgbMatrix} to apply to the frame.
*/
*/
...
...
google3/third_party/java_src/android_libs/media/libraries/effect/src/main/java/androidx/media3/effect/SingleFrameGlTextureProcessor.java
View file @
f3d13214
...
@@ -50,7 +50,7 @@ public abstract class SingleFrameGlTextureProcessor implements GlTextureProcesso
...
@@ -50,7 +50,7 @@ public abstract class SingleFrameGlTextureProcessor implements GlTextureProcesso
* Creates a {@code SingleFrameGlTextureProcessor} instance.
* Creates a {@code SingleFrameGlTextureProcessor} instance.
*
*
* @param useHdr Whether input textures come from an HDR source. If {@code true}, colors will be
* @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
)
{
public
SingleFrameGlTextureProcessor
(
boolean
useHdr
)
{
this
.
useHdr
=
useHdr
;
this
.
useHdr
=
useHdr
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment