From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id F3C9240F2E for ; Fri, 11 Feb 2022 02:37:51 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 6998568B175; Fri, 11 Feb 2022 04:37:49 +0200 (EET) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 137EC68A48D for ; Fri, 11 Feb 2022 04:37:41 +0200 (EET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1644547067; x=1676083067; h=from:to:subject:date:message-id:mime-version: content-transfer-encoding; bh=4B675sFcpwy5jLKGalnXkwi1LSD7AQ72wWL3hMiq13g=; b=gOMGQh4g5boRRpxBoxVIt3BrcxBkKjqggjQ6KXT90cCe7PkIOfzmqMmf M83iMmgQHQEpFhMfqBKG5ZJz2GJiHJoZ/PqfZcTtdXzKFiTpHUEEocD1m lmZMG9QOYp1ma524wO4fDtCChh4zKph/djjaZLg1peTReOZoY76lg+ky+ KyRnBkvkZu+RYgyzzLzXEr9cdf98nOKR0pffJj8XL8/2+F7biHl3+SJqa iZOJvtiKhcl20T6SvstxapIACEvGbgGkE4+w91TZtqmOxTnROD0AD2nLL PcyUkmmtnvZ5VZdNcWDfXM8X1ahdF3Yk8UTv11wfwgJxW2YO2XWlRKRsK w==; X-IronPort-AV: E=McAfee;i="6200,9189,10254"; a="248475279" X-IronPort-AV: E=Sophos;i="5.88,359,1635231600"; d="scan'208";a="248475279" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Feb 2022 18:37:39 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,359,1635231600"; d="scan'208";a="771941730" Received: from wenbin-z390-aorus-ultra.sh.intel.com ([10.239.35.110]) by fmsmga006.fm.intel.com with ESMTP; 10 Feb 2022 18:37:39 -0800 From: Wenbin Chen To: ffmpeg-devel@ffmpeg.org Date: Fri, 11 Feb 2022 10:37:36 +0800 Message-Id: <20220211023736.501863-1-wenbin.chen@intel.com> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH] libavcodec/qsvdec: use the parameter from decodeHeader to configure surface X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: 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 --- 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".