Comments (9)
I've started a bounty for this to be implemented.
https://app.bountysource.com/issues/116504826-question-video-hw-decoder
from libnx.
I've released a FFmpeg fork enabling acceleration for all codecs supported by the hardware. I don't feel this really belongs in libnx, as most of it is not specific to the Switch/Horizon OS.
https://github.com/averne/FFmpeg/tree/tx1
from libnx.
I have to try this out on NXMP replacing the ffmpeg in use.
Thanks for this great result
You can contact me on discord @avhe if you run into issues.
Basic integration isn't hard, but for optimal performance you would need a deko3d graphics backend for mpv. In OpenGL, you are unable to directly import frames from the decoder, so the following happens:
decoder output (block linear) -> copied to staging buffer (pitch linear) using VIC -> copied to GPU texture (block linear) using GPU copy engine.
With deko3d, you just need to create a texture with DkImageFlags_UsageVideo over the frame data.
from libnx.
Any update on this?
from libnx.
Any plans for this ever?
from libnx.
I agree that this shouldn't be in libnx. @proconsule, can you close this so I can award @averne the bounty?
from libnx.
I have to try this out on NXMP replacing the ffmpeg in use.
Thanks for this great result
from libnx.
I've released a FFmpeg fork enabling acceleration for all codecs supported by the hardware. I don't feel this really belongs in libnx, as most of it is not specific to the Switch/Horizon OS. https://github.com/averne/FFmpeg/tree/tx1
Would be awesome if you got this upstreamed to FFmpeg but also PR'd needed changes to dkP packages repo. I've put a quick test @ https://github.com/devkitPro/pacman-packages/tree/ffmpeg-update but I'm not 100% what configure options we need.
fwiw, that package can be installed using [sudo] [dkp-]pacman -U https://pkg.devkitpro.org/packages/switch-ffmpeg-6.0-1-any.pkg.tar.zst
if anyone wants to test.
from libnx.
Would be awesome if you got this upstreamed to FFmpeg
I contacted the FFmpeg maintainers, not sure it could be upstreamed in its current state as it contains nvidia headers (even though they are under a permissive license). There are also a number of hacks, especially surface alignment, that would need some cleaning up.
I'm not 100% what configure options we need.
At minimum, you need to add --enable-gpl since the hwaccel is gated by this. I used the following flags, but I see the devkitPro package has some others. I'll merge those flags and put together a proper PR.
--cc=aarch64-none-elf-gcc --cxx=aarch64-none-elf-g++ --ar=aarch64-none-elf-ar --nm=aarch64-none-elf-nm --extra-cflags='-isystem /opt/devkitpro/libnx/include' --enable-asm --enable-gpl --enable-tx1 --enable-static --disable-shared --enable-zlib --enable-bzlib --enable-libass --enable-libfreetype --enable-libfribidi --disable-doc --disable-programs --target-os=horizon --enable-cross-compile --cross-prefix=aarch64-none-elf- --arch=aarch64 --cpu=cortex-a57 --enable-neon --enable-pic --disable-autodetect --disable-runtime-cpudetect --disable-debug
from libnx.
Related Issues (20)
- inet_pton() failure for 0.0.0.0
- Can't open file sys/lock.h HOT 1
- Linking errors with nwindowGetDefault() HOT 8
- Rotated/Normalized controller layouts using the pad abstraction API HOT 2
- Question: Home button HOT 3
- SL/SR buttons usage on hiddbg HOT 6
- Linear framebuffer crashes on certain dimensions HOT 2
- hidScanInput() was not declared in this scope HOT 6
- When i try to compile a .nro in devkitpro, i get this error: HOT 3
- web applet fails to connect to local server running on the switch HOT 17
- Nintendo HOT 1
- make a relase/how to compile it HOT 2
- ASCII Usage of "\" HOT 2
- Problem to print special chars in console mode HOT 4
- bool to pointer
- Wrong Github (sorry)
- Support: How to get a list of installed DLCs? HOT 2
- devkitPro on NixOS? HOT 1
- Support for HID Vibrations HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from libnx.