-
Notifications
You must be signed in to change notification settings - Fork 3.2k
vd_lavc: add hwdec-min-height option to limit hw decoding #17299
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
bfc9c9e to
1b538dc
Compare
|
should probably be |
|
Hot take: make it min-area. For a 16:9 video that's 360p, that'd be 230400 pixels. It's less ergonomic for users but means aspect ratio does not matter. |
1b538dc to
2c043a4
Compare
Set to 360 by default. Only attempt to use hardware accelerated video decoding if the video size in either dimension is more than 360. This is taken from Chromium*, basically using CPU decoding should be more efficient if the video resolution is this small. * https://github.com/chromium/chromium/blob/a2575bd8b31fb964352efd9cab974ef72db6fe55/media/filters/decoder_selector.cc#L49-L63
2c043a4 to
a1ad6f6
Compare
|
Changed this to look at size in either dimension |
Probably makes sense.
While I understand the idea, the 360p limit makes this feature really niche and overall complication and "why hwdec doesn't work for AAAxBBB questions". While I agree that technically it may be correct, the web browsers have higher stake here, because they are more likely to show some random ad or animated image, that doesn't make sense to spin hwdec. mpv is rather explicit in usage, and not like you open some small videos by accident. Also for 2h 360p movie likely the hwdec init overhead is compensated by the length of the content. |
|
I mean this is still relevant for libmpv then. We can set the default to |
|
Important thing to make sure that it still uses hwdec if no software decoder is available or software decoder fails. Common example is build without dav1d in which case, you have to use hwdec, regardless of resolution. |
This isn't the case on master either |
|
Set to 360 by default. Only attempt to use hardware accelerated video decoding if the video height is more than 360. This is taken from Chromium*, basically using CPU decoding should be more efficient if the video resolution is this small.