From patchwork Tue Nov 22 08:16:01 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jun Zhao X-Patchwork-Id: 1526 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.103.90.1 with SMTP id o1csp2061712vsb; Tue, 22 Nov 2016 00:28:16 -0800 (PST) X-Received: by 10.194.47.242 with SMTP id g18mr12796169wjn.203.1479803296437; Tue, 22 Nov 2016 00:28:16 -0800 (PST) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id k64si1311549wme.23.2016.11.22.00.28.15; Tue, 22 Nov 2016 00:28:16 -0800 (PST) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE dis=NONE) header.from=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 7027D680D42; Tue, 22 Nov 2016 10:28:10 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-pg0-f67.google.com (mail-pg0-f67.google.com [74.125.83.67]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 7BACB680D07 for ; Tue, 22 Nov 2016 10:28:03 +0200 (EET) Received: by mail-pg0-f67.google.com with SMTP id e9so1459985pgc.1 for ; Tue, 22 Nov 2016 00:28:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=to:from:subject:message-id:date:user-agent:mime-version; bh=+kCQeNlMWx7cjV1QkSeOY9bv4OpH7MJ3ohnhLCW4TQ4=; b=JMvzAPZPsVvAQPREwSch46iX10Q6QG0ePdgV6ikBuq8JMRjNDSX+WGwH1CjoZR9Jdi 4x3Q1XbNXWB5/HUPSdAAgvho0sRETi4Xw5wavw4n7Tf9uga6Vkz5yTNXbMtVhKQNdnch /VXI/xnVcdGTeb5UGuQqBBr78GVlw6MMH7WVfg3tfhy+61+UcQXo94Xsuf8oztqeKMxV gCbhuecOHCcxFrxVOgJLIhJaz0sSZU26T7k6npvUEstoZ/U9pJUQBq7WttNyCsyGNuJg dI4oJqm5KAHmwBNpc4Aco4TyU/kyMROqKjvevlX2A28+ctAN55wIIV9kDLZOeg9Y6Ext XuYQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:to:from:subject:message-id:date:user-agent :mime-version; bh=+kCQeNlMWx7cjV1QkSeOY9bv4OpH7MJ3ohnhLCW4TQ4=; b=dG5mb/1VsU3C/PcQuU+xjI+7M9qEHt/wYOjxDnwxe0uIik+PIIKuEIJfIPicIswidk RxVCobhcSeV/Dq1ohl+v6wRL7eU+vyAp0QMkWPG0Ieqa39PAn8eLZJiFjlwOn3ctdYTm ezeLxfz4ZH/MzsC3GCLrMHTyxHe0tvLyegS84Gpuy7labGclEEvcjXedQayyyEu1fIFQ FveZyPpmOBKfHX2h3a2EPofdHnUETmR3WDWuwDoF672k50aMZBPPWOJizRgOGe+oA+dU 9suPgs2S4A7/ustHI3ayvouBqpg4Q0Nr6kI9r8U3G7u3BGcedKxAJ2NWKtZ+DhaWeGjg 5e5g== X-Gm-Message-State: AKaTC00Wa9ma1b5uauE+46IjeMFC5K0q2F8gsvamDtlUXhH+t0ofZUYRE9++pAsfn2dtbg== X-Received: by 10.99.217.81 with SMTP id e17mr41381771pgj.127.1479802565310; Tue, 22 Nov 2016 00:16:05 -0800 (PST) Received: from [10.239.204.183] (fmdmzpr02-ext.fm.intel.com. [192.55.55.37]) by smtp.gmail.com with ESMTPSA id b12sm40571805pfb.78.2016.11.22.00.16.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 22 Nov 2016 00:16:04 -0800 (PST) To: FFmpeg development discussions and patches , jun.zhao@intel.com, Mark Thompson , Yi Wang , mypopy@gmail.com From: Jun Zhao Message-ID: <236bdaae-2ca9-3c12-63ac-a9012afe8928@gmail.com> Date: Tue, 22 Nov 2016 16:16:01 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.5.0 MIME-Version: 1.0 Content-Disposition: attachment; filename*0="0001-lavc-vaapi_hevc-fix-scaling-list-duplicate-transfer-.pa"; filename*1="tch" X-Content-Filtered-By: Mailman/MimeDel 2.1.20 Subject: [FFmpeg-devel] [PATCH] lavc/vaapi_hevc: fix scaling list duplicate transfer issue. 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" From 4059bc56cba30b26bc194673968c3a51014e315f Mon Sep 17 00:00:00 2001 From: Jun Zhao Date: Tue, 22 Nov 2016 15:58:50 +0800 Subject: [PATCH] lavc/vaapi_hevc: fix scaling list duplicate transfer issue. scaling list is already transfered to raster scan during head parsing, so no need to transfer it again. And after this fix, FATE test SLIST_A_Sony_4/SLIST_B_Sony_8/ SLIST_C_Sony_3/SLIST_D_Sony_9 will pass in i965/Skylake. used the comand: make HWACCEL='vaapi -vaapi_device /dev/dri/renderD128 \ -hwaccel_output_format yuv420p' fate-hevc -i | \ grep "recipe for target" | wc -l test and verify. Signed-off-by: Wang, Yi A Signed-off-by: Jun Zhao --- libavcodec/vaapi_hevc.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/libavcodec/vaapi_hevc.c b/libavcodec/vaapi_hevc.c index 62f783e..dd43463 100644 --- a/libavcodec/vaapi_hevc.c +++ b/libavcodec/vaapi_hevc.c @@ -265,7 +265,7 @@ static int vaapi_hevc_start_frame(AVCodecContext *avctx, VAPictureParameterBufferHEVC *pic_param; VAIQMatrixBufferHEVC *iq_matrix; ScalingList const * scaling_list; - int i, j, pos; + int i, j; ff_dlog(avctx, "vaapi_hevc_start_frame()\n"); @@ -293,15 +293,13 @@ static int vaapi_hevc_start_frame(AVCodecContext *avctx, for (i = 0; i < 6; ++i) { for (j = 0; j < 16; ++j) { - pos = 4 * ff_hevc_diag_scan4x4_y[j] + ff_hevc_diag_scan4x4_x[j]; - iq_matrix->ScalingList4x4[i][j] = scaling_list->sl[0][i][pos]; + iq_matrix->ScalingList4x4[i][j] = scaling_list->sl[0][i][j]; } for (j = 0; j < 64; ++j) { - pos = 8 * ff_hevc_diag_scan8x8_y[j] + ff_hevc_diag_scan8x8_x[j]; - iq_matrix->ScalingList8x8[i][j] = scaling_list->sl[1][i][pos]; - iq_matrix->ScalingList16x16[i][j] = scaling_list->sl[2][i][pos]; + iq_matrix->ScalingList8x8[i][j] = scaling_list->sl[1][i][j]; + iq_matrix->ScalingList16x16[i][j] = scaling_list->sl[2][i][j]; if (i < 2) { - iq_matrix->ScalingList32x32[i][j] = scaling_list->sl[3][i * 3][pos]; + iq_matrix->ScalingList32x32[i][j] = scaling_list->sl[3][i * 3][j]; } } iq_matrix->ScalingListDC16x16[i] = scaling_list->sl_dc[0][i];