Skip to content

Commit

Permalink
[Sample] [Media] - Implementation of "UltraHDR to HDR Video" (#83)
Browse files Browse the repository at this point in the history
* Testing Implementation for UltraHDR to HDR Video

* Complete HW aceel implementation

* Add temp muxer to write file

* working implementation of output

* Clean up implementation of UltraHDR to HDR Video

* Slight fixes to implementation, better coroutines

* pr nits
  • Loading branch information
madebymozart authored and yrezgui committed Dec 7, 2023
1 parent 202f1d6 commit 00781b4
Show file tree
Hide file tree
Showing 12 changed files with 827 additions and 6 deletions.
14 changes: 11 additions & 3 deletions .idea/runConfigurations/app.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ androidxTestExtTruth = "1.5.0"
androidxTestRules = "1.5.0"
androidxTestRunner = "1.5.2"
androidxUiAutomator = "2.2.0"
media3 = "1.0.2"
media3 = "1.1.0"

[libraries]

Expand Down Expand Up @@ -128,6 +128,7 @@ androidx-constraintlayout = "androidx.constraintlayout:constraintlayout:2.1.4"
androidx-datastore-preferences = { module = "androidx.datastore:datastore-preferences", version.ref = "androidx-datastore" }
androidx-draganddrop = "androidx.draganddrop:draganddrop:1.0.0"
androidx-dynamicanimation = "androidx.dynamicanimation:dynamicanimation-ktx:1.0.0-alpha03"
androidx-media3-common = { module = "androidx.media3:media3-common", version.ref = "media3" }
androidx-media3-exoplayer = { module = "androidx.media3:media3-exoplayer", version.ref = "media3" }
androidx-media3-ui = { module = "androidx.media3:media3-ui", version.ref = "media3" }

Expand Down
2 changes: 2 additions & 0 deletions samples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@ The sample demonstrates the importance of having proper labels for
buildSpannedString is useful for quickly building a rich text.
- [UltraHDR Image Capture](camera/camera2/src/main/java/com/example/platform/camera/imagecapture/Camera2UltraHDRCapture.kt):
This sample demonstrates how to capture a 10-bit compressed still image and
- [UltraHDR to HDR Video](media/ultrahdr/src/main/java/com/example/platform/media/ultrahdr/video/UltraHDRToHDRVideo.kt):
This sample demonstrates converting a series of UltraHDR images into a HDR
- [Visualizing an UltraHDR Gainmap](graphics/ultrahdr/src/main/java/com/example/platform/graphics/ultrahdr/display/VisualizingAnUltraHDRGainmap.kt):
This sample demonstrates visualizing the underlying gainmap of an UltraHDR
- [WindowInsetsAnimation](user-interface/window-insets/src/main/java/com/example/platform/ui/insets/WindowInsetsAnimation.kt):
Expand Down
4 changes: 2 additions & 2 deletions samples/graphics/ultrahdr/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# UltraHDR Samples
# UltraHDR Graphics Samples

This is a catalog of graphics related UltraHDR samples that demonstrate the usage and capabilities of UltraHDR images on the Android Platform

> 🚧 **Work-in-Progress:** We are activtly working on bringing more UltraHDR samples
> 🚧 **Work-in-Progress:** We are actively working on bringing more UltraHDR samples
Check out the UltraHDR HDR specifications at https://developer.android.com/guide/topics/media/hdr-image-format

Expand Down
24 changes: 24 additions & 0 deletions samples/media/ultrahdr/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# UltraHDR Media Samples

This is a catalog of media related UltraHDR samples that demonstrate the usage and capabilities of UltraHDR images on the Android Platform

> 🚧 **Work-in-Progress:** We are actively working on bringing more UltraHDR samples
Check out the UltraHDR HDR specifications at https://developer.android.com/guide/topics/media/hdr-image-format

## License
```
Copyright 2023 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
```
42 changes: 42 additions & 0 deletions samples/media/ultrahdr/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
/*
* Copyright 2023 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/


plugins {
id("com.example.platform.sample")
}

android {
namespace = "com.example.platform.media.ultrahdr"
viewBinding.isEnabled = true
}

dependencies {
// Media3 Common
implementation(libs.androidx.media3.common)

// Media3 ExoPlayer
implementation(libs.androidx.media3.exoplayer)

// Media3 Ui
implementation(libs.androidx.media3.ui)

// Glide
implementation(libs.glide)

// Link to UltraHDR Graphics Samples
implementation(project(mapOf("path" to ":samples:graphics:ultrahdr")))
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 00781b4

Please sign in to comment.