]> git.sesse.net Git - ffmpeg/commit
dxva: add declarative profile checks
authorwm4 <nfxjfg@googlemail.com>
Thu, 22 Jun 2017 12:52:52 +0000 (14:52 +0200)
committerwm4 <nfxjfg@googlemail.com>
Tue, 27 Jun 2017 16:05:02 +0000 (18:05 +0200)
commite2afcc33e0bcba92ab6c767f09f17a67911a4928
treee232da249195e8b877c7f27293273850588f48e3
parent3125a4a8a8fc7dde938bff6a668f53b26bf47860
dxva: add declarative profile checks

Make supported codec profiles part of each dxva_modes entry. Every DXVA2
mode is representative for a codec with a subset of supported profiles,
so reflecting that in dxva_modes seems appropriate.

In practice, this will more strictly check MPEG2 profiles, will stop
relying on the surface format checks for selecting the correct HEVC
profile, and remove the verbose messages for mismatching H264/HEVC
profiles. Instead of the latter, it will now print the more nebulous "No
decoder device for codec found" verbose message.

This also respects AV_HWACCEL_FLAG_ALLOW_PROFILE_MISMATCH. Move the
Main10 HEVC entry before the normal one to make this work better.

Originally inspired by VLC's code.

Merges Libav commit 70e5e7c02232d1e51c362d5572c567a9e2a8dcc2.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
libavcodec/dxva2.c