[FFmpeg-devel] [PATCH] https://trac.ffmpeg.org/ticket/7030 fix

Hendrik Leppkes h.leppkes at gmail.com
Fri Mar 2 14:02:29 EET 2018


On Fri, Mar 2, 2018 at 12:54 PM, Yuri Palich <y.palich.t at gmail.com> wrote:
> From 7056d06412214bd601afb4b423d20ab6100e6ac5 Mon Sep 17 00:00:00 2001
> From: palich2000 <y.palich.t at gmail.com>
> Date: Fri, 2 Mar 2018 11:48:22 +0000
> Subject: [PATCH] https://trac.ffmpeg.org/ticket/7030 fix
>
> ---
>  libavcodec/qsvenc_h264.c | 15 +++++++++++++++
>  1 file changed, 15 insertions(+)
>
> diff --git a/libavcodec/qsvenc_h264.c b/libavcodec/qsvenc_h264.c
> index 09e4c0e..5f60675 100644
> --- a/libavcodec/qsvenc_h264.c
> +++ b/libavcodec/qsvenc_h264.c
> @@ -34,6 +34,7 @@
>  #include "qsv.h"
>  #include "qsv_internal.h"
>  #include "qsvenc.h"
> +#include "hwaccel.h"
>
>  typedef struct QSVH264EncContext {
>      AVClass *class;
> @@ -169,6 +170,16 @@ static const AVCodecDefault qsv_enc_defaults[] = {
>      { NULL },
>  };
>
> +#define HWACCEL_QSV(codec) \
> +    HW_CONFIG_HWACCEL(1, 1, 1, QSV,          QSV,          ff_ ## codec ##
> _qsv_hwaccel)
> +
> +const AVHWAccel ff_h264_qsv_hwaccel = {
> +    .name                 = "h264_qsv",
> +    .type                 = AVMEDIA_TYPE_VIDEO,
> +    .id                   = AV_CODEC_ID_H264,
> +    .pix_fmt              = AV_PIX_FMT_QSV
> +};
> +

Didn't we intentionally get rid of those fake hwaccels some time ago?

>  AVCodec ff_h264_qsv_encoder = {
>      .name           = "h264_qsv",
>      .long_name      = NULL_IF_CONFIG_SMALL("H.264 / AVC / MPEG-4 AVC /
> MPEG-4 part 10 (Intel Quick Sync Video acceleration)"),
> @@ -186,5 +197,9 @@ AVCodec ff_h264_qsv_encoder = {
>      .priv_class     = &class,
>      .defaults       = qsv_enc_defaults,
>      .caps_internal  = FF_CODEC_CAP_INIT_CLEANUP,
> +    .hw_configs            = (const AVCodecHWConfigInternal*[]) {
> +                       HWACCEL_QSV(h264),
> +    NULL
> +    },
>      .wrapper_name   = "qsv",
>  };
> --
> 1.8.3.1
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


More information about the ffmpeg-devel mailing list