From: Wenbin Chen <wenbin.chen-at-intel.com@ffmpeg.org> To: ffmpeg-devel@ffmpeg.org Subject: [FFmpeg-devel] [PATCH] libavcodec/qsvdec: use the parameter from decodeHeader to configure surface Date: Fri, 11 Feb 2022 10:37:36 +0800 Message-ID: <20220211023736.501863-1-wenbin.chen@intel.com> (raw) MSDK recognizes both yuv420p10 and yuv420p9 as MFX_FOURCC_P010, but parameters are different. When decode yuv420p9 video, ffmpeg-qsv will use yuv420p10le to configure surface which is different with param from DecoderHeader and this will lead to error. Now change it use param from decoderHeader to configure surface. Signed-off-by: Wenbin Chen <wenbin.chen@intel.com> --- libavcodec/qsvdec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/qsvdec.c b/libavcodec/qsvdec.c index f81737ab6d..6236391357 100644 --- a/libavcodec/qsvdec.c +++ b/libavcodec/qsvdec.c @@ -423,13 +423,13 @@ static int alloc_frame(AVCodecContext *avctx, QSVContext *q, QSVFrame *frame) if (frame->frame->format == AV_PIX_FMT_QSV) { frame->surface = *(mfxFrameSurface1*)frame->frame->data[3]; } else { - frame->surface.Info = q->frame_info; - frame->surface.Data.PitchLow = frame->frame->linesize[0]; frame->surface.Data.Y = frame->frame->data[0]; frame->surface.Data.UV = frame->frame->data[1]; } + frame->surface.Info = q->frame_info; + if (q->frames_ctx.mids) { ret = ff_qsv_find_surface_idx(&q->frames_ctx, frame); if (ret < 0) -- 2.32.0 _______________________________________________ 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".
next reply other threads:[~2022-02-11 2:37 UTC|newest] Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-02-11 2:37 Wenbin Chen [this message] 2022-02-16 5:45 ` Xiang, Haihao
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=20220211023736.501863-1-wenbin.chen@intel.com \ --to=wenbin.chen-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