Commit graph

22 commits

Author SHA1 Message Date
andrewlewis
ec7936f64d Increase pixel difference threshold
PiperOrigin-RevId: 467610621
2022-10-19 18:08:20 +00:00
leonwind
80f9ad9bf9 Refactor RgbaMatrix to RgbMatrix.
* Rename all Rgba instances to Rgb.
* Remove alpha value from the RGBA Matrices and apply the 4x4 matrix
only to the R, G, B channels.
* Restore the alpha from the input unchanged.

PiperOrigin-RevId: 467208888
2022-10-19 18:04:43 +00:00
Googler
06ce5ec738 Avoid spinning while queueing input to ExternalTextureProcessor.
This change adds ExternalTextureManager which implements
InputListener to only queue input frames to the
ExternalTextureProcessor when it is ready to accept an input
frame. This replaces the old retry-logic in GlEffectsFrameProcessor.

Before this change, the retrying in GlEffectFrameProcessor wasted
CPU time if input becomes available faster than the
ExternalTextureProcessor can process it.

PiperOrigin-RevId: 467177659
2022-10-19 18:00:59 +00:00
Googler
43aa89aa2e Fix ChainingGlTextureProcessorListener field name.
PiperOrigin-RevId: 466735554
2022-10-19 17:49:53 +00:00
Googler
9c366b3cfd Avoid spinning in between intermediate texture processors.
This change adds a new method onReadyToAcceptInputFrame to
GlTextureProcesssor.InputListener and changes maybeQueueInputFrame
to queueInputFrame, removing the boolean return value.
This avoids the re-trying in ChainingGlTextureProcessorListener
by allowing it to only feed frames from the producing to the consuming
GlTextureProcessor when there is capacity.

MediaPipeProcessor still needs re-trying when processing isn't 1:1.

PiperOrigin-RevId: 466626369
2022-10-19 17:42:37 +00:00
Googler
95a7dcaeda Remove times(1) from effect and transformer tests as it is the default.
PiperOrigin-RevId: 466324322
2022-10-19 17:27:57 +00:00
huangdarwin
7075f78eb2 HDR: Rename ColorInfo#isHdr to isTransferHdr.
While HDR is most closely tied to the color transfer (ex.
COLOR_TRANSFER_SDR is the only one explicitly mentioning dynamic
range), technically color spaces may be associated with HDR as well,
like BT.2020 commonly being used for HDR rather than BT.709 for SDR.

Therefore, it's more specific to mention just that the transfer is HDR.

PiperOrigin-RevId: 466316960
2022-10-19 17:24:19 +00:00
Googler
a2166a4142 Split GlTextureProcessor.Listener into input/output/error listener.
This simplifies ChainingGlTextureProcessor as it now only connects a
consuming and a producing GlTextureProcessor rather than a previous,
current, and next GlTextureProcessor.

Also use default no-op implementations of the listeners in
SingleFrameGlTextureProcessor and MediaPipeProcessor to avoid
null-checks.

PiperOrigin-RevId: 466301642
2022-10-19 17:20:38 +00:00
huangdarwin
e444eaa5b7 HDR: Input ColorInfo to the FrameProcessor.
This allows the GlEffectsFrameProcessor to later handle HLG and PQ
differently, or limited and full color range differently.

No functional change intended in this CL.

PiperOrigin-RevId: 466070764
2022-10-19 17:16:56 +00:00
leonwind
650a9d21ec Switch @param to @code tags in RgbAdjustment.
PiperOrigin-RevId: 465591877
2022-10-19 17:02:18 +00:00
leonwind
6502fce634 Add RgbAdjustment class to build RgbaMatrices
* Add RgbaMatrix interface implementation.
* Add Builder class for easy adjustments.
* Adjust existing RgbaMatrixPixelTests to use new RgbAdjustment class.

PiperOrigin-RevId: 465545429
2022-10-19 16:36:55 +00:00
leonwind
30fab8c008 Remove clamp function in contrast fragment shader.
* OpenGL automatically clamps the output colors to the [0, 1] interval.

PiperOrigin-RevId: 465071999
2022-10-19 16:18:51 +00:00
Googler
bbb7b1c0bc Fix saving previous debugSurfaceView in FinalMatrixTPWrapper.
PiperOrigin-RevId: 465067306
2022-10-19 16:11:06 +00:00
Googler
245326a043 Clean up FrameProcessor TODOs.
PiperOrigin-RevId: 465044342
2022-10-19 16:03:47 +00:00
Googler
707b061838 Move effects functionality out of transformer to effects module.
PiperOrigin-RevId: 465038852
2022-10-19 16:00:13 +00:00
Googler
26dcdcf1c0 Create effect module.
PiperOrigin-RevId: 464767396
2022-10-19 15:49:31 +00:00
olly
fb1cba3c92 Fix missing imports and package-info.java
PiperOrigin-RevId: 403071721
2021-10-14 16:12:48 +01:00
olly
fe0a5662de Move DataSink and upstream.crypto to common
PiperOrigin-RevId: 402812895
2021-10-14 11:50:36 +01:00
kimvde
0f0e11aaeb Make README structure match the desired androidx structure
PiperOrigin-RevId: 397319051
2021-09-17 16:06:00 +01:00
huangdarwin
7947d27819 Docs: Add demos and testapps documentation.
* Add new README files for the Transformer demo and media/testapps/.
* Add an androidx demos README in media/github/

PiperOrigin-RevId: 396784430
2021-09-16 12:01:45 +01:00
Oliver Woodman
75c8506a81 Remove VCT directories for now 2021-05-14 11:27:59 +01:00
gyumin
bd4ba4c583 Unnest session vct directories
Tested:
  $ ./gradlew :media-test-session-current:cAT
  $ blaze test test_session_current/src/androidTest:test_with_current_support_app
  The tests run but seem flaky, not related to this change.
PiperOrigin-RevId: 373677924
2021-05-14 11:24:23 +01:00