On 24/04/2020 15:52, [email protected] wrote:
> From: Artem Galin <[email protected]>
>
> Adding DX11 relevant device type checks and adjusting callbacks with
> proper MediaSDK pair type support.
>
> Extending structure for proper MediaSDK pair type support.
>
> Signed-off-by: Artem Galin <[email protected]>
> ---
> libavcodec/qsv.c | 66 +++++++++++++++++++++++++++++++--------
> libavcodec/qsv_internal.h | 1 +
> 2 files changed, 54 insertions(+), 13 deletions(-)
>
> diff --git a/libavcodec/qsv.c b/libavcodec/qsv.c
> index db98c75073..35e62417f6 100644
> --- a/libavcodec/qsv.c
> +++ b/libavcodec/qsv.c
> @@ -36,6 +36,8 @@
> #include "avcodec.h"
> #include "qsv_internal.h"
>
> +#define MFX_IMPL_VIA_MASK(impl) (0x0f00 & (impl))
> +
> #if QSV_VERSION_ATLEAST(1, 12)
> #include "mfx/mfxvp8.h"
> #endif
> @@ -221,8 +223,15 @@ int ff_qsv_find_surface_idx(QSVFramesContext *ctx,
> QSVFrame *frame)
> int i;
> for (i = 0; i < ctx->nb_mids; i++) {
> QSVMid *mid = &ctx->mids[i];
> +#if CONFIG_VAAPI
> if (mid->handle == frame->surface.Data.MemId)
> return i;
> +#else
> + mfxHDLPair *pair = (mfxHDLPair*)frame->surface.Data.MemId;
> + if ((mid->handle_pair.first == pair->first) &&
> + (mid->handle_pair.second == pair->second))
> + return i;
> +#endif
Is there any reason not to pass around an mfxHDLPair on Linux as well? All the
#ifdefs you're adding here are not fun.
> }
> return AVERROR_BUG;
> }
> @@ -362,7 +371,11 @@ static int ff_qsv_set_display_handle(AVCodecContext
> *avctx, QSVSession *qs)
> int ff_qsv_init_internal_session(AVCodecContext *avctx, QSVSession *qs,
> const char *load_plugins, int gpu_copy)
> {
> +#if CONFIG_D3D11VA
> + mfxIMPL impl = MFX_IMPL_AUTO_ANY | MFX_IMPL_VIA_D3D11;
Does that still do the right thing on systems where only D3D9 works?
> ...
- Mark
_______________________________________________
ffmpeg-devel mailing list
[email protected]
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
[email protected] with subject "unsubscribe".