]> 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)
committerLuca Barbato <lu_zero@gentoo.org>
Mon, 26 Jun 2017 22:23:12 +0000 (00:23 +0200)
commit70e5e7c02232d1e51c362d5572c567a9e2a8dcc2
tree0a03dc56fe211ab60fa1d4effb097bf3d158c1bf
parent0e83e95c60892747f2f1bd8382f915f2397f99a5
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.

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