Skip to content
This repository has been archived by the owner on Mar 19, 2021. It is now read-only.

HW decoding ? #26

Closed
G-Ray opened this issue Sep 8, 2019 · 5 comments
Closed

HW decoding ? #26

G-Ray opened this issue Sep 8, 2019 · 5 comments
Labels
enhancement New feature or request

Comments

@G-Ray
Copy link
Contributor

G-Ray commented Sep 8, 2019

Chiaki is an awesome projet, thank you for your work 👏

Do you plan to enable HW decoding acceleration using apis like vaapi ? I think this should greatly reduce latency.

@thestr4ng3r
Copy link
Owner

Yes, definitely planned. Afaik ffmpeg can already support some hardware decoding by itself, but it will also be good to skip the step of reading back the frame to the CPU and pushing it into OpenGL again.
Also, HW decoding will be even more important for the Android port.

@thestr4ng3r thestr4ng3r added the enhancement New feature or request label Sep 28, 2019
@lsiudut
Copy link
Contributor

lsiudut commented Apr 18, 2020

I just hacked this - lsiudut@38fe128

Pure PoC (dog science 100%, first time touching VAAPI hwaccel) but I want to test it a bit and make a good PR - with proper options entry to enable hw decoding.

For now this is just VAAPI. I got frustrated as sw decoding at FHD + 60 fps was sometimes saturating my i7-8650U (during scenes with lots of details). This seem to be helping a lot. Most of CPU is now wasted on converting surfaces from NV12 to YUV420P. I'm pretty sure that there's a way to display image directy from VAAPI surface...

@lsiudut
Copy link
Contributor

lsiudut commented Apr 18, 2020

So, CPU usage is still quite high:

(1) solor space conversion - nv12->yuv420p
(2) on 4k screen window scaling seems to be consuming ~30% of single CPU core

Even though CPU load is predictable (pretty much the same all the time, no more peaks), definitely lower than w/o hw decoding and finally - I haven't experience any artifacts until now (~2h gameplay).

I'll come up with more solid numbers once I clean the code up and put PR.

@thestr4ng3r
Copy link
Owner

Nice, looking forward to it!

@lsiudut
Copy link
Contributor

lsiudut commented Apr 18, 2020

Yea I put up #205 , just to move things forward. Probably far from elegant, but let's start poking on this, sooner better :).

Repository owner deleted a comment from dshine28D Apr 19, 2020
Repository owner deleted a comment from dshine28D Apr 19, 2020
Repository owner deleted a comment from dshine28D Apr 19, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants