14964 Commits

Author SHA1 Message Date
huangdarwin
09776f3d72 HDR: Add period to end of error message.
For tone mapping error messages.

PiperOrigin-RevId: 477447799
(cherry picked from commit 05ce639ea05b8806f6c8bae7d1816ddae5d99fb7)
2022-09-28 14:30:48 +00:00
huangdarwin
619333fe3c HDR: Add tests for tone mapping.
Also, add checks for output file color.

PiperOrigin-RevId: 477439139
(cherry picked from commit 507a1be61d24baf8fd26047938360db48dffabdb)
2022-09-28 13:42:36 +00:00
ibaker
0be36d084b Add a troubleshooting section about slow seeking
#minor-release

PiperOrigin-RevId: 477432256
(cherry picked from commit f8f2ec64c9b8ba8c19e95cd68e52cc67fb0094fa)
2022-09-28 13:15:03 +00:00
Googler
3b97b99230 Fix checkboxes on configuration page
PiperOrigin-RevId: 477166507
(cherry picked from commit bcea7bd355b7c33e6c56b4c911817de1f2f34e0e)
2022-09-27 14:31:59 +00:00
samrobinson
d348157777 Fix badly formatted AudioProcessor javadoc.
PiperOrigin-RevId: 476909855
(cherry picked from commit 9b1909e56362a5b44ba41d8cad9c3d927bdb650b)
2022-09-26 16:00:10 +00:00
huangdarwin
c9f019eb15 HDR: Update gamma comments to linear.
Comment-only change.

PiperOrigin-RevId: 476873286
(cherry picked from commit f3d132141e2c40797b80fab674e9ed8f4062e7ba)
2022-09-26 13:00:17 +00:00
tonihei
289d039410 Add setPreferredAudioDevice method to ExoPlayer
This allows to access the associated functionality of AudioTrack and
fills a feature gap to MediaPlayer, which has a similar method.

Issue: androidx/media#135
PiperOrigin-RevId: 476398964
(cherry picked from commit ccb820dd2f43ff20dff06a92a4e29c13676e647d)
2022-09-23 17:05:43 +00:00
leonwind
8b807432ca Add example CLUT to demo.
PiperOrigin-RevId: 476390089
(cherry picked from commit 29cf09316e8056e3703809d6b6ac8eea890e2e4e)
2022-09-23 16:28:25 +00:00
leonwind
0a1f30aba5 Store LUT bitmap as texture with processor creation.
* Before this CL, the texture was stored during the construction of the LUT processor. This failed since if one creates a list of GlEffects on the application thread, the texture will get stored in the application thread during the effect creation and not on the GL thread, which executes the FrameProcessors.
* This is an issue since the executing thread then can't index from the texture stored on a different thread.

PiperOrigin-RevId: 476388021
(cherry picked from commit f745c6ee0ea0b610cfdf6a146818b0da7d06326a)
2022-09-23 16:19:43 +00:00
Marc Baechinger
d648c1910c Merge pull request #123 from stoyicker:wrapping_media_source
PiperOrigin-RevId: 476376463
(cherry picked from commit 8623f1f01657abc6a1359f3677a59d1cbde07b37)
2022-10-19 23:42:52 +00:00
leonwind
61a2cc76aa Add HSL Adjustments to the demo.
PiperOrigin-RevId: 476373520
(cherry picked from commit 5725ebbeeaf1cbb1a1ffc156d67472640059bd0a)
2022-09-23 15:11:52 +00:00
ibaker
55e44b1399 Fix broken links on https://exoplayer.dev/troubleshooting.html
#minor-release

PiperOrigin-RevId: 476366214
(cherry picked from commit 0969118041e9fb0a8641240282c91959805c271d)
2022-09-23 14:41:59 +00:00
leonwind
91fb951e2a Remove TODOs for merging RGB and MatrixTransformation processors.
PiperOrigin-RevId: 476362571
(cherry picked from commit af19f82f994e5820889a9166c0a97606496fd17d)
2022-09-23 14:21:38 +00:00
michaelkatz
9ac9322a45 Try alternative decoder for Dolby Vision if display does not support
If the sample type is dolby vision and the following conditions match
a)There is a supported alternative codec mimetype
b)Display does not support Dolby Vision
Then getDecoderInfos will return the alternative types.

Issue: google/ExoPlayer#9794
PiperOrigin-RevId: 476356223
(cherry picked from commit 94a88e93d91e86c93239639a65612eab297efa9b)
2022-09-23 13:43:21 +00:00
huangdarwin
a3a08f8355 HDR: Assert output C.ColorTransfer for tests.
To confirm that tone mapping did or did not happen.

PiperOrigin-RevId: 476354606
(cherry picked from commit df58107eae0dd7e19f9b551751d1fbb19ca05e6d)
2022-09-23 13:33:28 +00:00
leonwind
55d3c5ac0c Add HSL Adjustments to the effects module.
PiperOrigin-RevId: 476144167
(cherry picked from commit 2c27cd82f1e97d14f609ea5bb6924398a9dddfd6)
2022-09-22 17:56:54 +00:00
leonwind
a534f60f56 Add OETF and EOTF ES2 fragment shaders for non-HDR frames.
* Transform the intermediate color space to linear SDR by applying the SMPTE 170M EOTF and OETF.
* Use linear colors for the color filter pixel tests and update all golden bitmaps.

PiperOrigin-RevId: 476124592
(cherry picked from commit afd829e5db17c48abccea30842eec20b702aa330)
2022-09-22 16:45:28 +00:00
ibaker
eb496dabcd Work around a bug in the Android 13 ClearKey implementation
The ClearKey CDM will attach an 'invalid' URL in `KeyRequest` objects,
when the documentation states this should be an empty string if a
default URL is not known.

#minor-release

PiperOrigin-RevId: 476113513
(cherry picked from commit 331d4d626fcb1b65088c7ab849c0a0a3f5f6ba0e)
2022-09-22 15:59:44 +00:00
leonwind
109ab70e00 Add RGB Adjustments to transformer demo.
PiperOrigin-RevId: 476049125
(cherry picked from commit cfc0eef24ec4a24bc00b0a657f3dad07e9c29ade)
2022-09-22 10:04:42 +00:00
samrobinson
61acf5871a Add file size to TransformationResult at the end of a Transformation.
Tested:
  * Manually using both path and file descriptor.
PiperOrigin-RevId: 475860978
(cherry picked from commit 08bb01b218461506352ae4c2f17efd27989553e5)
2022-09-21 17:18:42 +00:00
leonwind
b23c966c5a Use golden bitmaps in contrast pixel tests.
PiperOrigin-RevId: 475805421
(cherry picked from commit 06c0040ab43820164bc048d85556727aaa9fa4f8)
2022-09-21 12:53:42 +00:00
rohks
a6f58bdb29 Fix instrumentation tests not working via Gradle
PiperOrigin-RevId: 475560401
(cherry picked from commit 6015f052ba1b21bea4ded5bfc4924dc1c096b07a)
2022-09-20 15:25:38 +00:00
leonwind
0a811bd4a1 Fix outdated command in bitmap/README.md.
* The command changed after creating a custom effects module.

PiperOrigin-RevId: 474777823
(cherry picked from commit fd6b0d1551af6db9de49dd17c30937a4b292357d)
2022-09-16 10:40:19 +00:00
yschimke
3af297101c Fix tracing under offload.
Currently doSomeWork is never closed and so tracing is deceiving.

See https://screenshot.googleplex.com/eZDzn5APpBNnhe5

PiperOrigin-RevId: 474755816
(cherry picked from commit 005b73c82a1a3264a7167ffdf93a9387c4d22b95)
2022-09-16 08:26:54 +00:00
leonwind
eb6cf356bb Add LUT functionalities to transformer.
* Adds SDR 3D LUT functionalities with OpenGL 2.0 support.

PiperOrigin-RevId: 474561060
(cherry picked from commit 702419dd227cec4b23cd6e723a6a15908313f7c9)
2022-09-15 14:49:19 +00:00
leonwind
b041e4dce6 Fix testId and match it to the test name.
PiperOrigin-RevId: 474363545
(cherry picked from commit 0e2b6a03b5f91eda6d307b63f49986dfdcc97bfe)
2022-09-14 19:41:11 +00:00
samrobinson
3adfa48f34 Add support for skipping windows in MssimCalculator.
By skipping every other row and column, SSIM calculation time reduces by 10-30%.

PiperOrigin-RevId: 474286702
(cherry picked from commit 6dd2a6dac655f538020a4057e3ab6d997449a9fe)
2022-09-14 14:35:12 +00:00
samrobinson
766b9cd385 Clarify the replaceOutputBuffer parameter because count is unclear.
PiperOrigin-RevId: 474279220
(cherry picked from commit 3e0ad6d8042c9e6604c281e283885b9e07eb8786)
2022-09-14 13:54:06 +00:00
leonwind
2576346e45 Change ContrastProcessor java doc for consistency.
PiperOrigin-RevId: 474002026
(cherry picked from commit 7c435621ae3b3ea870fe16524ff7aaa5bd54e931)
2022-09-13 13:28:30 +00:00
samrobinson
c4f4c42e1d Add MssimCalculatorTest to verify SSIM calculations.
As part of this change, MssimCalculator is moved from androidTest/ to main/

PiperOrigin-RevId: 473771344
(cherry picked from commit 20aa22c9fad2c1e2d237dc9a8bee81781a729445)
2022-09-12 16:45:36 +00:00
leonwind
5b084dd470 Add java docs for ContrastProcessor constructor.
* Add docs for the public constructor for consistency with all the
other frame processors.

PiperOrigin-RevId: 473726586
(cherry picked from commit 696ef2a5e718ac8df1edf54ad5359389686267b0)
2022-09-12 13:02:32 +00:00
leonwind
474a5571e2 Add rgb matrices to java docs for public constructors.
PiperOrigin-RevId: 473699927
(cherry picked from commit 75f920bf25bf052630a16d1d983516409e797363)
2022-09-12 09:52:09 +00:00
claincly
2fa9042058 Split decoding out of the test
This method is useful for other tests also.

PiperOrigin-RevId: 473574282
(cherry picked from commit f770324f31cd1d63f229b3d536d7f5a58a0fc511)
2022-09-11 13:01:26 +00:00
leonwind
7e810b50e0 Rename MatrixTransformationProcessor to MatrixTextureProcessor.
PiperOrigin-RevId: 473283967
(cherry picked from commit 40f1bd345a601648bac8f812b4e247140bc420b1)
2022-09-09 17:23:24 +00:00
samrobinson
d10dbc56d5 Rollback of eb6c1183b6
*** Original commit ***

Handle int instead of byte in SSIM.

The value of pixels are converted to integers at the point of use,
move this logic to the initialisation step.

This is a prerequisite step for testing SSIM calculation, which
will lead on to some SSIM improvements being verifiable.

Tested manually and SSIM values match for the same video
before and after this change.

***

PiperOrigin-RevId: 473259446
(cherry picked from commit 8f9c9d0f88374573f32d76cf7d3a8fde9ca83f87)
2022-09-09 15:33:08 +00:00
samrobinson
c714b51c04 Handle int instead of byte in SSIM.
The value of pixels are converted to integers at the point of use,
move this logic to the initialisation step.

This is a prerequisite step for testing SSIM calculation, which
will lead on to some SSIM improvements being verifiable.

Tested manually and SSIM values match for the same video
before and after this change.

PiperOrigin-RevId: 473231779
(cherry picked from commit eb6c1183b69d319a610d79ef57028f62e74a7614)
2022-09-09 13:07:14 +00:00
huangdarwin
e725600b0c Decoder: Reduce max pending frame count limit down to 5.
PiperOrigin-RevId: 473212543
(cherry picked from commit 41963fce9b7ad7d2cd9d0fdb428c44eb2bddf5f1)
2022-09-09 10:56:03 +00:00
leonwind
7098d3b810 Add caching for compositeRgbMatrixArray.
* Refactor caching for matrix transformations to reuse it for rgb matrices.

PiperOrigin-RevId: 473042194
(cherry picked from commit 593370bb69ca5db1d693d42509da78ad496218db)
2022-09-08 18:31:11 +00:00
huangdarwin
8eab7391c2 HDR: Add fallback MH tests.
Test that HDR editing succeeds on devices supporting HDR editing, tone maps on
devices supporting tone mapping, and throws exceptions on all other devices.

Also, only restrict HDR editing and tone mapping support to API 31+ only when
transcoding, not for all transformations.

PiperOrigin-RevId: 472958965
(cherry picked from commit 8ee2121627c2702419402b514fa93dbe8ac19b8b)
2022-09-08 12:03:40 +00:00
claincly
ce4ba2b6de Remove conditional check for no-longer flaky API version
PiperOrigin-RevId: 472949850
(cherry picked from commit caefa565f76912922011155cc580d45243e86ecc)
2022-09-08 11:02:51 +00:00
claincly
240ca99ced Clarify GlTextureProcessor.InputListener contract
PiperOrigin-RevId: 472745311
(cherry picked from commit 32a21641a2de5fe1fac1c6f1d1a0d644101a4c0b)
2022-09-07 16:33:44 +00:00
bachinger
b47c7a37ac Add withAvailableAd for server side inserted ad groups
#minor-release

PiperOrigin-RevId: 472714732
(cherry picked from commit 072f376b4839b6d4e71bcd09366695b3b9fc2c02)
2022-09-07 14:01:26 +00:00
tonihei
8df931b1fe Discard backbuffer before playback gets stuck.
If the back buffer is using too much memory, there is a risk
playback could get stuck because LoadControl refuses to load
further data. This eventually results in a stuck-buffering
playback error.

We can detect this case, clear the back buffer and then ask
the LoadControl again to avoid failing playback in such a case.

PiperOrigin-RevId: 472679797
(cherry picked from commit 125646e4c98e80b35d1a8b195300d324a9aaf2b5)
2022-09-07 10:09:29 +00:00
claincly
7acffcfe34 Remove redundant constant definition
PiperOrigin-RevId: 472522846
(cherry picked from commit 9a9baa54a5cdf701695556a91436b2778868cddd)
2022-09-06 19:06:17 +00:00
bachinger
018ea9a44e Bump IMA SDK version for gradle
PiperOrigin-RevId: 472500789
(cherry picked from commit 60a3ea48b8abf3949a87a2b3bc930ce83cf4ce3f)
2022-09-06 17:43:37 +00:00
bachinger
d7d75a0157 Update presentation time of metadata when the stream offset changes
The stream offset is used to calculate the presentation time of
a metadata object when reading and later when playing, to calculate
the current presentation time to decide whether to send the metadata
to the output.

Accordingly, the presentation time of a pending metadata that has been
calculated with a given offset needs to be recalculated when the
stream offset changes.

#minor-release

PiperOrigin-RevId: 472499943
(cherry picked from commit 5a1223777c4d4ee2faa4043be2079971e44093a9)
2022-09-06 17:40:52 +00:00
Marc Baechinger
d2623dda9b Merge pull request #10549 from ferhatparmak:release-requirementswatcher
PiperOrigin-RevId: 472488921
(cherry picked from commit 92cfa7467b8f74daab22276c6db4e885b76e7c28)
2022-10-19 21:14:45 +00:00
Marc Baechinger
0a0df93334 Merge pull request #10570 from Artemych:fix/progressive_downloader_infinite_loop
PiperOrigin-RevId: 472475124
(cherry picked from commit 9c56b2c4b631062731ccfc0d8e5b5c105449074c)
2022-10-19 21:10:57 +00:00
claincly
912da2910c Include CamcorderProfile resolution in encoder capability test
PiperOrigin-RevId: 472459423
(cherry picked from commit 6e45824992c8fe72ffd2f4edb726aa0cd8f8c29e)
2022-09-06 15:05:46 +00:00
leonwind
7477eb6656 Make MatrixTransformationsProcessor constructor to take in Lists.
* Replace ImmutableLists to List interface for constructors

PiperOrigin-RevId: 472433434
(cherry picked from commit ce0e3a4fa3e829c987e541f30694a73d8abbc25b)
2022-09-06 12:37:47 +00:00