From patchwork Mon Apr 15 13:23:40 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Fu, Linjie" X-Patchwork-Id: 12743 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id 527FB447644 for ; Mon, 15 Apr 2019 08:23:53 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 39BD668A331; Mon, 15 Apr 2019 08:23:53 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id B6E7E680A00 for ; Mon, 15 Apr 2019 08:23:46 +0300 (EEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 Apr 2019 22:23:44 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,352,1549958400"; d="scan'208";a="131412627" Received: from media_lj_kbl.sh.intel.com ([10.239.13.101]) by orsmga007.jf.intel.com with ESMTP; 14 Apr 2019 22:23:44 -0700 From: Linjie Fu To: ffmpeg-devel@ffmpeg.org Date: Mon, 15 Apr 2019 21:23:40 +0800 Message-Id: <20190415132340.20256-1-linjie.fu@intel.com> X-Mailer: git-send-email 2.17.1 Subject: [FFmpeg-devel] [PATCH, v3] lavu/hwcontext_qsv: Fix the realign check for hwupload X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 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 Cc: Linjie Fu MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Fix the aligned check in hwupload, input surface should be 16 aligned too. Fix #7830. Signed-off-by: Linjie Fu --- libavutil/hwcontext_qsv.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libavutil/hwcontext_qsv.c b/libavutil/hwcontext_qsv.c index b6d8bfe2bf..197dd8002a 100644 --- a/libavutil/hwcontext_qsv.c +++ b/libavutil/hwcontext_qsv.c @@ -891,8 +891,7 @@ static int qsv_transfer_data_to(AVHWFramesContext *ctx, AVFrame *dst, if (ret < 0) return ret; - - if (src->height & 16 || src->linesize[0] & 16) { + if (src->height & 15 || src->linesize[0] & 15) { realigned = 1; memset(&tmp_frame, 0, sizeof(tmp_frame)); tmp_frame.format = src->format;