[FFmpeg-devel] [PATCH 3/6] lavc/qsv: Enable hwaccel qsv_vidmem.
Jean-Baptiste Kempf
jb at videolan.org
Thu Aug 25 10:26:52 EEST 2016
On 25 Aug, Nablet Developer wrote :
> From: ChaoX A Liu <chaox.a.liu at intel.com>
what is vidmem?
> diff --git a/ffmpeg.c b/ffmpeg.c
> diff --git a/ffmpeg.h b/ffmpeg.h
I doubt this should be in the same commit.
> +INTEL CORPORATION PROPRIETARY INFORMATION
> +This software is supplied under the terms of a license agreement or nondisclosure
> +agreement with Intel Corporation and may not be copied or disclosed except in
> +accordance with the terms of that agreement
> +Copyright(c) 2011-2014 Intel Corporation. All Rights Reserved.
WHAT?
> diff --git a/libavcodec/qsvdec.c b/libavcodec/qsvdec.c
> index b9de0af..47dd818 100644
> --- a/libavcodec/qsvdec.c
> +++ b/libavcodec/qsvdec.c
> @@ -72,6 +72,7 @@ static int qsv_decode_init(AVCodecContext *avctx, QSVContext *q, AVPacket *avpkt
> q->iopattern = qsv->iopattern;
> q->ext_buffers = qsv->ext_buffers;
> q->nb_ext_buffers = qsv->nb_ext_buffers;
> + qsv->nb_decoder_surfaces = q->async_depth;
> }
> if (!q->session) {
> if (!q->internal_qs.session) {
> @@ -88,7 +89,7 @@ static int qsv_decode_init(AVCodecContext *avctx, QSVContext *q, AVPacket *avpkt
> if (ret < 0) {
> av_log(avctx, AV_LOG_ERROR, "Failed to load plugins %s, ret = %s\n",
> q->load_plugins, av_err2str(ret));
> - return ff_qsv_error(ret);
> + return ret;
> }
> }
>
> @@ -149,7 +150,7 @@ static int qsv_decode_init(AVCodecContext *avctx, QSVContext *q, AVPacket *avpkt
> So weare pre-allocating fifo big enough for 17 elements:
> */
> if (!q->async_fifo) {
> - q->async_fifo = av_fifo_alloc((1 + 16) *
> + q->async_fifo = av_fifo_alloc((1 + 16 + q->async_depth) *
> (sizeof(mfxSyncPoint) + sizeof(QSVFrame*)));
> if (!q->async_fifo)
> return AVERROR(ENOMEM);
I doubt those changes are OK.
> diff --git a/libavcodec/qsvenc.c b/libavcodec/qsvenc.c
> index 81b8f6f..041f298 100644
> --- a/libavcodec/qsvenc.c
> +++ b/libavcodec/qsvenc.c
> @@ -760,6 +760,8 @@ int ff_qsv_enc_init(AVCodecContext *avctx, QSVEncContext *q)
>
> q->param.ExtParam[q->param.NumExtParam++] = q->extparam_internal[i];
> }
> +
> + qsv->nb_encoder_surfaces = q->req.NumFrameSuggested + q->async_depth;
> } else {
> q->param.ExtParam = q->extparam_internal;
> q->param.NumExtParam = q->nb_extparam_internal;
Patch is way too big, and does too many unrelated things.
With my kindest regards,
--
Jean-Baptiste Kempf
http://www.jbkempf.com/ - +33 672 704 734
Sent from my Electronic Device
More information about the ffmpeg-devel
mailing list