On 06/10/18 07:21, Landgraph wrote:
> 1. Old logic meaned: everywhere, except Windows, ffmpeg has to use HW 
> acceleration, but on Windows ffmpeg has to use (unavailable) software encode 
> by default
> 2. Software encode is available only if you provide corresponding software 
> MediaSDK library, which isn't provided with ffmpeg. More information could be 
> found in 
> https://github.com/Intel-Media-SDK/MediaSDK/blob/master/doc/samples/readme-encode_linux.pdf
> 3. HW encode is available on Windows in the driver by default

This has been proposed before - I can't find the original discussion (maybe it 
was on IRC), but I did find 
<https://lists.libav.org/pipermail/libav-devel/2016-November/080419.html>.  The 
reason for not doing it is that a subset of the Intel drivers segfault 
immediately when the hardware plugin is loaded on some platforms.  That's a 
pain for anyone wanting to support diverse systems, so the decision was to 
continue to load the sw plugin by default so it doesn't crash (even if the 
software plugin isn't present), and leave the non-default case as the crashing 
one so the user has to do something to trigger it.

If you can characterise either the set of platforms it crashes on or a set of 
platforms it definitely works on then maybe we could conditionally change the 
default behaviour?

- Mark


> ---
>  libavcodec/qsvenc_hevc.c | 4 ----
>  1 file changed, 4 deletions(-)
> 
> diff --git a/libavcodec/qsvenc_hevc.c b/libavcodec/qsvenc_hevc.c
> index 4339b316a3..e7ca27d49f 100644
> --- a/libavcodec/qsvenc_hevc.c
> +++ b/libavcodec/qsvenc_hevc.c
> @@ -217,11 +217,7 @@ static av_cold int qsv_enc_close(AVCodecContext *avctx)
>      return ff_qsv_enc_close(avctx, &q->qsv);
>  }
> 
> -#if defined(_WIN32)
> -#define LOAD_PLUGIN_DEFAULT LOAD_PLUGIN_HEVC_SW
> -#else
>  #define LOAD_PLUGIN_DEFAULT LOAD_PLUGIN_HEVC_HW
> -#endif
> 
>  #define OFFSET(x) offsetof(QSVHEVCEncContext, x)
>  #define VE AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

Reply via email to