[3.0] avcodec: vaapi: fetch profile if not available
The profile might not be available from Open(). It's rare case may happen if our hxxx packetizer is not loaded because the demuxer prevents it (b_packetized = false).
For the current issue, the extra data is set midstream by lavc (and not by our mkv demux).
The 4.0 branch does not need this patch since the VAAPI initialisation is done by lavc.
Thanks Steve for the hint, the same thing is done in directx_va.c.
Co-authored-by: Steve Lhomme robux4@ycbcr.xyz
Fixes #27163 (closed)
Merge request reports
Activity
changed milestone to %3.0.x maintenance
added Component::Decoders Hw label
mentioned in merge request !2287 (closed)
added 1 commit
- 1f2adebc - avcodec: vaapi: fetch profile if not available
- Resolved by Denis Charmet
This is blindly assuming that all FFmpeg profiles (even future FFmpeg defines) use the same encoding as in VLC, which is ostensibly wrong.
Then this also blindly assumes that FFmpeg wants to use whichever is the first SPS in the extra data, which is also ostensibly wrong. (This is basically paraphrasing what you yourself told Denis yesterday.)
Indeed, if you could extract the profile that easily from extra data, then there would be no reasons for avcodec not to inform the value in the first place. So either there is a bug in avcodec and this is an inappropriate workaround because it causes other bugs, or this is just plain wrong.
Edited by Rémi Denis-Courmont
added MRStatus::InReview label
- Resolved by Rémi Denis-Courmont
It seems that when the demuxer sets
b_packetized
the profile probing that would happen in the packetizer is not done. It should probably be up to the demuxer to set thei_profile
andi_level
in that case.Also
b_packetized
is true by default so a lot of code is not doing this by default.
- Resolved by Thomas Guillem
added 1 commit
- 81624ed4 - avcodec: vaapi: fetch profile if not available
mentioned in issue #27163 (closed)
- Resolved by Thomas Guillem
- Resolved by Thomas Guillem
added 1 commit
- 2f1f34ee - avcodec: vaapi: use profile from AVCodecContext
Updated with a new version. That was indeed a bug #27163 (closed).
For the record, I still think that my previous version is safer, specially for 3.0 only.
cf. 7d95dac7
added MRStatus::Acceptable label and removed MRStatus::InReview label
added MRStatus::Accepted label and removed MRStatus::Acceptable label
MR Acceptance result
This MergeRequest has been Accepted! Congratulations.MR acceptance checks details:
-
MR should be considered mergeable by Gitlab -
Last pipeline should be successful -
MergeRequest should have at least one external review and/or vote -
All threads should be resolved, and score >= 0 -
MergeRequest should have no activity (threads/votes) for (24h/24h)
-
added 22 commits
-
2f1f34ee...d4dd3372 - 21 commits from branch
videolan:3.0.x
- 7c897c4d - avcodec: vaapi: use profile from AVCodecContext
-
2f1f34ee...d4dd3372 - 21 commits from branch
enabled an automatic merge when the pipeline for 7c897c4d succeeds
changed milestone to %3.0.18