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

Carl Eugen Hoyos ceffmpeg at gmail.com
Tue Jul 3 20:29:38 EEST 2018


2018-07-03 10:55 GMT+02:00, Li, Zhong <zhong.li at intel.com>:
>> -----Original Message-----
>> From: ffmpeg-devel [mailto:ffmpeg-devel-bounces at ffmpeg.org] On Behalf
>> Of Yuri Palich
>> Sent: Friday, March 2, 2018 7:55 PM
>> To: ffmpeg-devel <ffmpeg-devel at ffmpeg.org>
>> Subject: [FFmpeg-devel] [PATCH] https://trac.ffmpeg.org/ticket/7030 fix
>>
>> 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
>> +};
>> +
>>  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
>
> LGTM. Verified this fix # ticket 7030.

You could improve the commit message.

Carl Eugen


More information about the ffmpeg-devel mailing list