#7030: qsv in ffmpeg -------------------------------------+------------------------------------- Reporter: palich2000 | Owner: Type: defect | Status: open Priority: important | Component: avcodec Version: git-master | Resolution: Keywords: qsv | Blocked By: regression | Reproduced by developer: 0 Blocking: | Analyzed by developer: 0 | -------------------------------------+-------------------------------------
Comment (by palich2000): This patch solves the problem, but only for qsv. {{{ 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", }; }}} -- Ticket URL: <https://trac.ffmpeg.org/ticket/7030#comment:7> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker _______________________________________________ FFmpeg-trac mailing list FFmpeg-trac@avcodec.org http://ffmpeg.org/mailman/listinfo/ffmpeg-trac