andrewlewis
dce7c45cf0
Avoid encoder default color info when tone-mapping
...
The encoder color info [defaults](https://cs.android.com/android/platform/superproject/+/master:frameworks/av/media/libstagefright/foundation/ColorUtils.cpp;l=377;drc=891c19ccfa4953b5e5f7b87118e007b994d8074c ) to a value that depends on the input resolution, but when tone-mapping is enabled we should always get BT.709 color space. Hard-code this constant for now to avoid behavior depending on the resolution. A future change should use the decoder output media format to populate the color info.
PiperOrigin-RevId: 465070378
(cherry picked from commit 40a28d5aee )
2022-08-03 16:06:45 +00:00
andrewlewis
3c4ee51e10
Avoid encoder default color info when tone-mapping
...
The encoder color info [defaults](https://cs.android.com/android/platform/superproject/+/master:frameworks/av/media/libstagefright/foundation/ColorUtils.cpp;l=377;drc=891c19ccfa4953b5e5f7b87118e007b994d8074c ) to a value that depends on the input resolution, but when tone-mapping is enabled we should always get BT.709 color space. Hard-code this constant for now to avoid behavior depending on the resolution. A future change should use the decoder output media format to populate the color info.
PiperOrigin-RevId: 465070378
2022-08-03 16:06:45 +00:00
andrewlewis
f8aaed1ac7
Avoid encoder default color info when tone-mapping
...
The encoder color info [defaults](https://cs.android.com/android/platform/superproject/+/master:frameworks/av/media/libstagefright/foundation/ColorUtils.cpp;l=377;drc=891c19ccfa4953b5e5f7b87118e007b994d8074c ) to a value that depends on the input resolution, but when tone-mapping is enabled we should always get BT.709 color space. Hard-code this constant for now to avoid behavior depending on the resolution. A future change should use the decoder output media format to populate the color info.
PiperOrigin-RevId: 465070378
(cherry picked from commit 3c4ee51e10 )
2022-08-03 16:06:45 +00:00
Googler
8d1b91a413
Fix saving previous debugSurfaceView in FinalMatrixTPWrapper.
...
PiperOrigin-RevId: 465067306
(cherry picked from commit bbb7b1c0bc )
2022-08-03 15:52:24 +00:00
hschlueter
a28a508d2d
Fix saving previous debugSurfaceView in FinalMatrixTPWrapper.
...
PiperOrigin-RevId: 465067306
2022-08-03 15:52:24 +00:00
hschlueter
110c442758
Fix saving previous debugSurfaceView in FinalMatrixTPWrapper.
...
PiperOrigin-RevId: 465067306
(cherry picked from commit a28a508d2d )
2022-08-03 15:52:24 +00:00
claincly
19f6b5422b
Clean up NOP constructor lines in RTP readers
...
PiperOrigin-RevId: 465067191
(cherry picked from commit 13e9ec9959 )
2022-08-03 15:51:48 +00:00
claincly
ed60c885f2
Clean up NOP constructor lines in RTP readers
...
PiperOrigin-RevId: 465067191
2022-08-03 15:51:48 +00:00
claincly
076218be9d
Clean up NOP constructor lines in RTP readers
...
PiperOrigin-RevId: 465067191
(cherry picked from commit ed60c885f2 )
2022-08-03 15:51:48 +00:00
Googler
ff35958c54
Clean up FrameProcessor TODOs.
...
PiperOrigin-RevId: 465044342
(cherry picked from commit 245326a043 )
2022-08-03 13:53:53 +00:00
hschlueter
c5d1940fba
Clean up FrameProcessor TODOs.
...
PiperOrigin-RevId: 465044342
2022-08-03 13:53:53 +00:00
hschlueter
89edfbc12b
Clean up FrameProcessor TODOs.
...
PiperOrigin-RevId: 465044342
(cherry picked from commit c5d1940fba )
2022-08-03 13:53:53 +00:00
Googler
89a2685052
Move effects functionality out of transformer to effects module.
...
PiperOrigin-RevId: 465038852
(cherry picked from commit 707b061838 )
2022-08-03 13:19:15 +00:00
hschlueter
22725ddfa8
Move effects functionality out of transformer to effects module.
...
PiperOrigin-RevId: 465038852
2022-08-03 13:19:15 +00:00
hschlueter
8b9203a3ea
Move effects functionality out of transformer to effects module.
...
PiperOrigin-RevId: 465038852
(cherry picked from commit 22725ddfa8 )
2022-08-03 13:19:15 +00:00
Googler
368d28268b
Update Leanback library from androidx-platform-dev with build#8803384
...
TGP: https://fusion2.corp.google.com/presubmit/tap/459592967/OCL:459592967:BASE:464692555:1659412331108:1ed6eb4e/targets
If you need additional help investigating this issue, please consider using g/androidx-discuss to reach the wider Jetpack library owner and client community. For general questions about prebuilt drops, refer to go/androidx/g3_faq
PiperOrigin-RevId: 464852576
(cherry picked from commit a3de13c9a9 )
2022-08-02 19:01:58 +00:00
olly
8762322060
Update Leanback library
2022-08-02 19:01:58 +00:00
hschlueter
93bb191cb1
Create effect module.
...
PiperOrigin-RevId: 464767396
(cherry picked from commit 4d09ca6698 )
2022-08-02 12:36:47 +00:00
Googler
0b0475e81b
Create effect module.
...
PiperOrigin-RevId: 464767396
(cherry picked from commit 26dcdcf1c0 )
2022-08-02 12:36:47 +00:00
hschlueter
4d09ca6698
Create effect module.
...
PiperOrigin-RevId: 464767396
2022-08-02 12:36:47 +00:00
leonwind
d15f2ed388
Implement RGBA color matrices processor
...
* Transform frame colors using a defined RGBA Matrix to apply filters.
PiperOrigin-RevId: 464523581
2022-08-08 08:36:03 +00:00
leonwind
ae1915ea1a
Migrate Contrast asset to emulator generated one.
...
PiperOrigin-RevId: 464519030
2022-08-08 08:35:12 +00:00
huangdarwin
687a50e9b3
HDR: Have @C.ColorTransfer check consider NO_VALUE as SDR.
...
Format.NO_VALUE is a placeholder value for an invalid @C.ColorTransfer, used
for example when the decoder doesn't support this transfer function.
When encountering this invalid value, interpret this as COLOR_TRANSFER_SDR.
Confirmed locally that an exception is thrown when transcoding on p4head, and no exception is thrown when transcoding with this CL.
PiperOrigin-RevId: 464135080
2022-08-08 08:34:12 +00:00
hschlueter
480c129c54
Move FrameProcessor and related interfaces to common.
...
This will allow effects preview in ExoPlayer to use the
Effect and FrameProcessor interface (and the interfaces
they depend on) without depending on transformer or the
future effects module.
PiperOrigin-RevId: 464060047
2022-08-08 08:33:22 +00:00
bachinger
a28b3ef778
Add interface version of MediaSessionStub
...
PiperOrigin-RevId: 464052708
2022-08-08 08:32:29 +00:00
leonwind
3fae9df8a9
Add slider option for contrast in demo app
...
PiperOrigin-RevId: 464050072
2022-08-08 08:30:43 +00:00
tonihei
61e4f92310
Merge pull request #109 from tzugen:patch-1
...
PiperOrigin-RevId: 464045351
2022-08-08 08:28:35 +00:00
huangdarwin
534740fd46
Transformer: Improve misc javadocs and exception logs.
...
PiperOrigin-RevId: 463971447
2022-08-08 08:26:35 +00:00
bachinger
c8089ead42
Add interface version of MediaControllerStub
...
PiperOrigin-RevId: 463930162
2022-08-08 08:25:47 +00:00
huangdarwin
65a2a3a0a0
HDR: Centralize getting Colorinfo from MediaFormat
...
* Sets KEY_HDR_STATIC_INFO from MediaFormat in the DefaultCodec.
* Adds checks in mediaparser to ensure color space, range, and transfer are valid
values.
PiperOrigin-RevId: 463921325
2022-08-08 08:24:51 +00:00
tonihei
92816023f1
Merge pull request #115 from ittiam-systems:rtp_vp9fix
...
PiperOrigin-RevId: 463852948
2022-08-08 08:23:56 +00:00
christosts
4713c7fea8
Minor: Change URL in test
...
Use a URL with a `.test` tld (RFC 2606) to make it clear
it's an testing URL.
PiperOrigin-RevId: 463852174
2022-08-08 08:23:04 +00:00
tonihei
e331bf2c53
Ignore stale events in StreamEventCallbackV29.
...
Despite unregistering the callback and clearing pending Handler
messages, the callback may still receive pending calls if they
are already triggered by the AudioTrack. Instead of asserting
that the track is correct, we should gracefully ignore stale
events.
PiperOrigin-RevId: 463851393
2022-08-08 08:22:08 +00:00
claincly
e848352a3e
Fix VP8 reader fragment packet size
...
Merging c37a767fdf
PiperOrigin-RevId: 463826373
2022-08-08 08:21:15 +00:00
christosts
95becec1e2
Support ApplicationVersion = 1 for HDR10+
...
MediaCodecRenderer allows passing HDR10+ out-of-bound metadata
with ApplicationVersion = 1.
PiperOrigin-RevId: 463822315
2022-08-08 08:20:26 +00:00
tonihei
ac42b593cc
Delay unbinding the controller until pending commands are handled.
...
Once a controller bound to a MediaSessionService unbinds, this service
may be destroyed immediately if this was the last bound controller and
the service isn't started in the foreground.
At the time of releasing the controller, there may still be pending
commands that need to be handled by the session service. These commands
may cause the session service to post a foreground notification to
keep it alive. So to avoid the destruction of the service while these
commands are still handled, we need to keep the controller bound.
We also add a timeout in case the session tasks are never completed
by the session implementation. In case the controller is destroyed,
the unbinding happens automatically by the system.
PiperOrigin-RevId: 463802220
2022-08-08 08:19:35 +00:00
tonihei
7f08ab729a
Merge pull request #126 from stoyicker:cap_concurrent_remove_tasks
...
PiperOrigin-RevId: 463792127
2022-08-08 08:18:45 +00:00
hschlueter
0f96d8615d
Generalize frame processing error codes.
...
TransformationException error codes were previously tied to OpenGL
but other FrameProcessor implementations are possible. So this CL
renames the error codes.
Also, remove GL_INIT_FAILED error code, as FrameProcessor
implemenations may initialize resources on a background thread
after the factory method returns, so it's not obvious how to
distinguish between initialization failures and processing failures.
PiperOrigin-RevId: 463704902
2022-08-08 08:17:46 +00:00
hschlueter
580e44fc47
Add Effect marker interface.
...
This allows non-GL effects to be passed to custom FrameProcessor
implementations.
PiperOrigin-RevId: 463696384
2022-08-08 08:16:50 +00:00
hschlueter
b28fb13998
Remove redundant interface from FinalMatrixTPWrapper.
...
PiperOrigin-RevId: 463646211
2022-08-08 08:15:55 +00:00
hschlueter
b1b9ba825f
Make FrameInfo and SurfaceInfo public.
...
Both are used in the public FrameProcessor interface, so they
should be public too.
PiperOrigin-RevId: 463454859
2022-08-08 08:14:59 +00:00
samrobinson
56e50b63ec
Add 8 new videos, representing lower resolutions.
...
Downsampled from 3840x2160 resolution videos using ffmpeg:
`ffmpeg -i <inputFilename> -filter:v scale=<width>:<height> -c:a copy <outputFilename>`
PiperOrigin-RevId: 463454628
2022-08-08 08:14:03 +00:00
samrobinson
60d6654b8d
Add H265 as a parameter to SsimMapperTest.
...
PiperOrigin-RevId: 463452893
2022-08-08 08:13:05 +00:00
leonwind
302a742c94
Rename ContrastProcessorPixelTest and make contexts final
...
PiperOrigin-RevId: 463450395
2022-08-08 08:12:15 +00:00
samrobinson
4a0b07b4f7
Add an SsimMapperTest, which binary searches for 95% ssim.
...
This is possible because SSIM increases monotonically with bitrate.
PiperOrigin-RevId: 463434373
2022-08-08 08:11:22 +00:00
huangdarwin
a7a17dc2bb
Rename findEncoderWithClosestFormatSupport.
...
Just a misc nit, since I found the name a bit confusing, and figured
findEncoderWithClosestSupportedFormat might be more descriptive.
PiperOrigin-RevId: 463433646
2022-08-08 08:10:23 +00:00
hschlueter
22822d8e19
Allow FrameProcessor.Factory to be set on Transformer.Builder.
...
Extract a FrameProcessor.Factory interface from GlEffectsFrameProcessor
and allow it to be customized using a setter on Transformer.Builder.
PiperOrigin-RevId: 463433438
2022-08-08 08:09:33 +00:00
bachinger
2bde3f1e31
Clean up hashCode/equals of SessionTokenImplBase
...
#minor-release
PiperOrigin-RevId: 463338680
2022-08-08 08:08:41 +00:00
bachinger
428fc89635
Normalize constructors of SessionTokenImplBase/SessionTokenImplLegacy
...
#minor-release
PiperOrigin-RevId: 463328436
2022-08-08 08:07:47 +00:00
hmzh
9c33b47f15
Add seeking to arbitrary time points
...
PiperOrigin-RevId: 463328405
2022-08-08 08:06:57 +00:00