Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: "Xiang, Haihao" <haihao.xiang-at-intel.com@ffmpeg.org>
To: "ffmpeg-devel@ffmpeg.org" <ffmpeg-devel@ffmpeg.org>
Subject: Re: [FFmpeg-devel] [PATCH] lavc/qsvenc: set base address for V plane
Date: Tue, 28 Dec 2021 08:37:43 +0000
Message-ID: <13fbf53c1e8ce3e0c0653500b01da7d5bdc60dd4.camel@intel.com> (raw)
In-Reply-To: <20211213064055.17139-1-haihao.xiang@intel.com>

On Mon, 2021-12-13 at 14:40 +0800, Haihao Xiang wrote:
> The SDK checks Data.V when using system memory for VP9 encoding. This
> fixed the error below:
> 
> $ ffmpeg -qsv_device /dev/dri/renderD129 -f lavfi -i yuvtestsrc -c:v
> vp9_qsv -f null -
> 
> [vp9_qsv @ 0x55b8387cbe90] Error during encoding: NULL pointer (-2)
> Video encoding failed
> ---
>  libavcodec/qsvenc.c | 17 ++++++++++++++++-
>  1 file changed, 16 insertions(+), 1 deletion(-)
> 
> diff --git a/libavcodec/qsvenc.c b/libavcodec/qsvenc.c
> index 26a94cd419..7431ccfca5 100644
> --- a/libavcodec/qsvenc.c
> +++ b/libavcodec/qsvenc.c
> @@ -1389,8 +1389,23 @@ static int submit_frame(QSVEncContext *q, const AVFrame
> *frame,
>          qf->surface.Data.PitchLow  = qf->frame->linesize[0];
>          qf->surface.Data.Y         = qf->frame->data[0];
>          qf->surface.Data.UV        = qf->frame->data[1];
> -    }
>  
> +        /* The SDK checks Data.V when using system memory for VP9 encoding */
> +        switch (frame->format) {
> +        case AV_PIX_FMT_NV12:
> +            qf->surface.Data.V     = qf->surface.Data.UV + 1;
> +            break;
> +
> +        case AV_PIX_FMT_P010:
> +            qf->surface.Data.V     = qf->surface.Data.UV + 2;
> +            break;
> +
> +        default:
> +            /* should not reach here */
> +            av_assert0(0);
> +            break;
> +        }
> +    }
>      qf->surface.Data.TimeStamp = av_rescale_q(frame->pts, q->avctx-
> >time_base, (AVRational){1, 90000});
>  
>      *new_frame = qf;

Will apply if no objection

-Haihao

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

           reply	other threads:[~2021-12-28  8:38 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <20211213064055.17139-1-haihao.xiang@intel.com>]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=13fbf53c1e8ce3e0c0653500b01da7d5bdc60dd4.camel@intel.com \
    --to=haihao.xiang-at-intel.com@ffmpeg.org \
    --cc=ffmpeg-devel@ffmpeg.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git