Posted
about 6 years
ago
tl;dr: dav1d another fast release
If you want a quick summary of this post, about our AV1 decoder:
dav1d is still ready for production, and getting used more,
dav1d has a speed gain of 12% on ARM64 mobile CPUs,
a gain of 15%-25% on SSSE3
... [More]
processors
and even a 5% gain on AVX-2 processors, which was already quite fast.
Read the following for more details...
A few reminders about dav1d
If you follow this blog, you should know everything about dav1d.
AV1 is a new video codec by the Alliance for Open Media, composed of most of the important Web companies (Google, Facebook, Netflix, Amazon, Microsoft, Mozilla...). AV1 has the potential to be up to 20% better than the HEVC codec, but the patents license is totally free, while HEVC patents licenses are insanely high and very confusing.
The VideoLAN, VLC and FFmpeg communities have started to work on a new decoder, sponsored by the Alliance for Open Media, in order to create the reference optimized decoder for AV1.
Third major Release
We just released the third version of dav1d, called 0.3.0 Sailfish.
The decoder is ready and being now largely used on all platforms, with excellent performance.
The focus for the first release was for AVX-2 processors, with up to 5x speedups compared to the reference decoder.
The second release was focusing on the other desktop CPU, SSSE3 and on mobile phones (2 to 4x faster) , and a lot more stability.
This third release continues to increase the ARM and SSSE3 speed, with more optimizations, as announced, and we get between 12 and 25% speed increases on those CPUs, depending on the samples.
However, more surprisingly, we got a speedup on AVX-2 CPU, by optimizing the MSAC (entropy decoding), while we did not find a good solution in the past. This brings 4-5% speed improvements, which is quite huge, knowing the maturity of the AVX-2 code.
Results
This are the gains we got for SSSE3 compared to the previous release:
And this is where we are, on desktop platforms, compared to aomdec:
As you can see, we're now getting consistently 2.5 to 4 times faster on SSSE3, 2 to 5 times faster on AVX-2 compared to aomdec.
On mobiles devices, we're now also getting 3 to 4 times faster with ARM64 CPU than aomdec. I don't have a fancy graph, but you can see results here.
What's next?
What's next is more complex to foretell: there are still some optimizations to do on SSSE3 and ARM64, but they are getting less important, so the speedups might not be as impressive as those shown today. We might improve AVX-2 still, but we're talking about a few percents, it's going to be hard to get more.
We're also going to toy with compute-shaders for decoding faster, but it's very hard to know if that's going to give a speed-up at all.
Keep in touch, and you'll see! [Less]
|
Posted
about 6 years
ago
VideoLAN is happy to present the new major version of VLC for Android platforms. Featuring AV1 decoding with dav1d, Android Auto, Launcher Shortcuts, Oreo/Pie integration, Video Groups, SMBv2, and OTG drive support, but also improvements on Cast, Chromebooks and managing the audio/video libraries, this is a quite large update.
|
Posted
about 6 years
ago
VideoLAN is happy to present the new major version of VLC for Android platforms. Featuring AV1 decoding with dav1d, Android Auto, Launcher Shortcuts, Oreo/Pie integration, Video Groups, SMBv2, and OTG drive support, but also improvements on Cast, Chromebooks and managing the audio/video libraries, this is a quite large update.
|
Posted
about 6 years
ago
VideoLAN is happy to present the new major version of VLC for Android platforms. Featuring AV1 decoding with dav1d, Android Auto, Launcher Shortcuts, Oreo/Pie integration, Video Groups, SMBv2, and OTG drive support, but also improvements on Cast, Chromebooks and managing the audio/video libraries, this is a quite large update.
|
Posted
about 6 years
ago
This is the first feature update in the VLC 3 cycle.
It brings back Android auto and improves support of Oreo and Pie.
This version only supports Android 4.2 and newer. This allows us to use up-to-date SDK and restore some features like Android
... [More]
Auto!
After 3.0 release, we could upgrade SDK and start a big refactoring. VLC now implements Android Arch Components, which helped us to drastically improve the application.
We basically rewrote the middle layer of VLC-Android from scratch, and made app architecture cleaner and safer. It results in a more stable app and more code shared between mobile and TV UIs.
Next feature releases will come quicker.
Onboarding
Scanning your whole device storage is no longer mandatory. We have the will to keep VLC application lightweight, and some of you only use it as a player.
We heard that, and now you can choose between the classic big scanning, a folders selection or no medialibrary at all!
VLC still provides a file and network browser, if that’s enough for you.
Launcher shortcuts
On Android 7.1 and above, you can resume the last playlist you were listening to without even opening VLC 😌
Just long press on VLC icon on your device and shortcuts will pop up.
They are only static shortcuts for now, we plan to make it customizable.
Group videos by folders
There is a new option in Settings→Video→Group videos, videos can now be grouped by folder. It’s a convenient way to present you your collection.
That was a much asked feature.
Android Auto is back!
Because of Android 2 support, VLC-Android 3.0 was stuck on an old SDK and Android Auto had become too buggy.
It is now restored, enjoy your music with VLC on the road again!
Large media libraries
Among the huge refactoring we did on VLC-Android, we implementend pagination for audio collection. This offers a better support of large collections.
Collections with like 10GB of MP3s no longer overflow VLC, it should handle the task now.
VLC won’t load all tracks at once anymore, it loads ‘pages’ of media and fills the list on the fly.
Home screen channel
You can now see last added videos from Android TV launcher (only for Android 8 and above), and even preview one when you focus on it!
File browser
Browser gains some neat additions.
First of all, OTG devices are now supported.
You also can now set any folder as favorite (not only network folders), so you will find them directly at root level of browser
To ease navigation, a breadcrumb is now displayed to show you where you are.
Other new goodies
Application:
Refactored subtitles downloader
Sorting preferences are now saved
A-B repeat
Manual orientation lock in video player
Podcast detection has been improved
Bottomsheet style for context menus
Playback notification is now persistent, even when app is closed by Android
TV:
Sort media
group videos by name
VLC:
AV1 software decoding.
SMB 2/3
[Less]
|
Posted
about 6 years
ago
This is the first feature update in the VLC 3 cycle.
It brings back Android auto and improves support of Oreo and Pie.
This version only supports Android 4.2 and newer. This allows us to use up-to-date SDK and restore some features like Android
... [More]
Auto!
After 3.0 release, we could upgrade SDK and start a big refactoring. VLC now implements Android Arch Components, which helped us to drastically improve the application.
We basically rewrote the middle layer of VLC-Android from scratch, and made app architecture cleaner and safer. It results in a more stable app and more code shared between mobile and TV UIs.
Release cycles will become shorter now, v3.2 should be released before the summer. It will be easier for us to publish it and VLC will keep up to date.
Onboarding
Scanning your whole device storage is no longer mandatory. We have the will to keep VLC application lightweight, and some of you only use it as a player.
We heard that, and now you can choose between the classic big scanning, a folders selection or no medialibrary at all!
VLC still provides a file and network browser, if that’s enough for you.
Launcher shortcuts
On Android 7.1 and above, you can resume the last playlist you were listening to without even opening VLC 😌
Just long press on VLC icon on your device and shortcuts will pop up.
They are only static shortcuts for now, we plan to make it customizable.
Group videos by folders
There is a new option in Settings→Video→Group videos, videos can now be grouped by folder. It’s a convenient way to present you your collection.
That was a much asked feature.
Android Auto is back!
Because of Android 2 support, VLC-Android 3.0 was stuck on an old SDK and Android Auto had become too buggy.
It is now restored, enjoy your music with VLC on the road again!
Large media libraries
Among the huge refactoring we did on VLC-Android, we implementend pagination for audio collection. This offers a better support of large collections.
Collections with like 10GB of MP3s no longer overflow VLC, it should handle the task now.
VLC won’t load all tracks at once anymore, it loads ‘pages’ of media and fills the list on the fly.
Home screen channel
You can now see last added videos from Android TV launcher (only for Android 8 and above), and even preview one when you focus on it!
File browser
Browser gains some neat additions.
First of all, OTG devices are now supported.
You also can now set any folder as favorite (not only network folders), so you will find them directly at root level of browser
To ease navigation, a breadcrumb is now displayed to show you where you are.
Other new goodies
Application:
Refactored subtitles downloader
Sorting preferences are now saved
A-B repeat
Manual orientation lock in video player
Podcast detection has been improved
Bottomsheet style for context menus
Playback notification is now persistent, even when app is closed by Android
TV:
Sort media
group videos by name
VLC:
AV1 software decoding.
SMB 2/3
For any feedback, you are welcome to join the VLC-Android community page! [Less]
|
Posted
about 6 years
ago
tl;dr: dav1d has its second release
If you want a quick summary of this post, about our AV1 decoder:
dav1d is really ready for production,
dav1d has impressive benchmarks on ARM devices,
dav1d is now fast on 32-bit desktop processors (SSSE3).
... [More]
Read the following for more details...
A few reminders about dav1d
If you follow this blog, you should know everything about dav1d.
AV1 is a new video codec by the Alliance for Open Media, composed of most of the important Web companies (Google, Facebook, Netflix, Amazon, Microsoft, Mozilla...). AV1 has the potential to be up to 20% better than the HEVC codec, but the patents license is totally free, while HEVC patents licenses are insanely high and very confusing.
The VideoLAN, VLC and FFmpeg communities have started to work on a new decoder, sponsored by the Alliance for Open Media, in order to create the reference optimized decoder for AV1.
Second Release
Today, we release the second version of dav1d, called 0.2.1, Antelope.
You can now safely use the decoder on all platforms, with excellent performance.
For the first release, we showed impressive benchmarks for AVX-2 processors, with up to 5x speedups compared to the reference decoder.
In this release, the focus has been toward ARM devices (32-bit and 64-bit) and desktop processors that did not support AVX-2.
It is important to know that the ARM and SSSE3 optimizations are not finished yet. You should expect more performance in the future.
ARM devices
For the ARM devices, we've been doing both ARMv7 and ARMv8 acceleration. We've been testing on iOS, Windows and Android to be sure that it works fine on all OSes.
On ARMv8, we achieve between 150% and 200% of the speed of aomdec:
On ARMv7, we achieve up to 400% on the SnapDragon 410:
It's interesting to see that dav1d is faster in ARMv7 mode than the reference decoder in ARMv8 mode on the same machine.
iOS and iPhones
The playback on iOS is quite important, since those are the fastest ARM devices, and quite widespread:
Depending on the samples, we have achieve 1080p at 75fps on Summer sample, and 40fps on more complex samples, like Chimera.
Desktop
For the desktop, we focused on SSSE3 optimizations, because they should cover 98% active of the desktop processors.
We also did optimizations for both 32-bit and 64-bit architectures, and not only 64bits, as we did for AVX-2.
In multi-thread scenarios, we show between 2x and 3x gains compared to aomdec:
Get it
You can get the tarball on our FTP: dav1d 0.2.1.
You can get the code and report issues on our gitlab project.
You can also join the project, or sponsor our work, by contacting me
Conclusion
Dav1d 0.2 is now faster than aomdec on all the 4 important architectures (x86/SSSE3, x64/AVX-2, ARMv7, ARMv8).
The speedups we see goes from x2 and x5, and on ARM devices, we are now approaching 1080p60 in software.
We're going to continue acceleration work on SSSE3 and ARM devices, in the next few releases. [Less]
|
Posted
about 6 years
ago
This post offers a basic implementation of a single suspending function managing the runtime permission process.
Runtime permission API
If you are reading this, you should already know this API. It is only composed of requestPermissions method
... [More]
, and its related callback onRequestPermissionsResult. But this is a View-level API, not really convenient.
We still are lucky, this API is accessible from fragments, and that will allow us to make it way easier to use.
Headless Fragment
The trick is to make it a headless fragment, i.e. a fragment without a view. It’s still bound to its activity and can fire dialogs, that’s what we want.
override fun onCreate(savedInstanceState: Bundle?) {
retainInstance = true
requestPermissions(arrayOf(Manifest.permission.READ_EXTERNAL_STORAGE), PERMISSION_STORAGE_CODE)
}
// No onCreateView() overriding
override fun onRequestPermissionsResult(requestCode: Int, permissions: Array<String>, grantResults: PermissionResults) {
when (requestCode) {
PERMISSION_STORAGE_CODE -> {
if (grantResults.granted()) {
deferredGrant.complete(true)
exit()
return
} else if (shouldShowRequestPermissionRationale(...)) {
// We insist
return
}
deferredGrant.complete(false)
exit()
}
}
}
protected fun exit() {
retainInstance = false
activity?.run {
if (!isFinishing) supportFragmentManager
.beginTransaction()
.remove(this@BaseHeadlessFragment)
.commitAllowingStateLoss()
}
}
Our runtime permission implementation has become modular, it can be called from any activity just by starting this fragment. That’s a first step!
The permission grant result is handled by deferredGrant.complete(boolean), that’s how we can get a suspend function controlling our fragment.
Deferred behavior
We will now leverage it, and create a single function to launch this permission granting process and get its result.
For this, we use a CompletableDeferred, which is a Deferred like the one returned by the async function, but we can complete it by ourselves once we have our result.
All we have to do is to launch our fragment, prepare a CompletableDeferred and await for it.
Voilà! We have our function:
protected val deferredGrant = CompletableDeferred<Boolean>()
suspend fun awaitGrant() = deferredGrant.await()
companion object {
suspend fun FragmentActivity.getStoragePermission() : Boolean {
if (canReadStorage()) return true
return launchFragment().awaitGrant()
}
}
Profit
Usage is straghtforward:
From a coroutine, any activity can call getStoragePermission(), and it suspends until user has made its choice.
No callback anymore, and it’s callable from any Activity or Fragment in your app \o/
if (getStoragePermission()) {
proceed()
} else {
retreat()
}
While the user is asked for the permission you want for your app, coroutine execution is suspended by getStoragePermission() condition. Then, the relevant branch of this if expression will be executed.
[Less]
|
Posted
over 6 years
ago
VideoLAN is releasing a new major version of libbluray: 1.1.0. It adds support for UHD menus (experimental), for more recents of Java, and improves vastly BD-J menus. This release fixes numerous small issues reported.
|
Posted
over 6 years
ago
VideoLAN is releasing a new major version of libbluray: 1.1.0. It adds support for UHD menus (experimental), for more recents of Java, and improves vastly BD-J menus. This release fixes numerous small issues reported.
|