From patchwork Fri Sep 29 01:58:57 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jun Zhao X-Patchwork-Id: 5336 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.2.61.197 with SMTP id n188csp229585jan; Thu, 28 Sep 2017 18:59:09 -0700 (PDT) X-Received: by 10.28.92.136 with SMTP id q130mr2549991wmb.104.1506650349418; Thu, 28 Sep 2017 18:59:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1506650349; cv=none; d=google.com; s=arc-20160816; b=mEAEQlSJ1JM6PrwHp8sbzNWh6khZuWuVwmY7j4F5H0TqweGA2S1Yjw/njgmc1aC1lK PBMluQP3gRiRLX2h2lS7n/Vuwd3E2vzb+MhBYz4zFgnen7xZ0lAit576EkzIC6kD4pAi 3JoZ3zy9wCLEMi9ZUlOECXkcjwfbcTjplUK3/SJ35jUBm0BnrKDmzbEzFpAgy9Xwk+An CIJ3rnQ1hLB0Hw/AV/3hyJSnFu6W1ZwK33ToSgkmhvwtjBhH37rigra7FxaaDhjWH64O 1hH3MhxeeVCiYFNNVT1PFXNZodRIjU3vgtMqhpAk/ZfmN1Vlt+6Zrd7ir18J2wdIdXPa S4IQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence:subject :content-language:mime-version:user-agent:date:message-id:from:to :dkim-signature:delivered-to:arc-authentication-results; bh=qpMx3DIAhBzsCkZ11fr13SVxnE8AtfbL7DcxK6/Ydag=; b=GaBLSujfnkknbEQ6fBriJ9iWoot5LyYJbKi6/U1tmsJW96QJctFsSHyr10peT46qSv NNAHAsbFqTO8R5xoxswRZQjtLz1KYfCNbMDezl5NbKPWohJwVM491R/SuV2sTqF3QC+j Phxmpi6cZmwWgP06uXaKzDw04t55VHgBf6rF9SY83ZZeu3qUAuCIQkGWMlC/EY7nyO9q EzqI1k7aS05sXiDwQ8oymXmKP4orkmDMXszwQ4P68xcarDTWyGP2iVBZabyxgnGfHUrU YniInv/qfI64Y3/ePUH4AJIPy6WKnnJK9qGcN44dfax1qYcRwU4uY+P+BaFV7EVyT/HS 8zYg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=lCsmUa3q; 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 sp=NONE dis=NONE) header.from=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id 75si1843946wma.61.2017.09.28.18.59.09; Thu, 28 Sep 2017 18:59:09 -0700 (PDT) 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 header.s=20161025 header.b=lCsmUa3q; 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 sp=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 37E34689A14; Fri, 29 Sep 2017 04:58:55 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-pf0-f171.google.com (mail-pf0-f171.google.com [209.85.192.171]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 21E2E689224 for ; Fri, 29 Sep 2017 04:58:49 +0300 (EEST) Received: by mail-pf0-f171.google.com with SMTP id l188so1759825pfc.6 for ; Thu, 28 Sep 2017 18:59:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=to:from:subject:message-id:date:user-agent:mime-version :content-language; bh=KmsGN9W7Mbf+d3i3rB+Zzycq6qrP4pXxgazQQFRy/fU=; b=lCsmUa3qFc9TB2BYt7ZTXMPf11piUMWsRt4nd77du+6+C4rra8OgYWG1mU6214YO3x kIPnXG16MgqTiBAqpp3spmYL5ERMxWaZBOm7UYhvmz5qz7IDH88/Evax01fgOO6J7ECz BfOBMpI5CknlP0KTPHUQAcUUEXinCdi7dBpgz1fc16457J/z40YOLmHRVr4d+pr6zgq2 4x1w3XRb7IfzvlP7LAu3X0TzEv82rT7DmfbsOr7b5uoVtFDKII+enBUclC9GFc7FsS6r 5VfQcXoKpXiRU5bKzmvg8LTV9T6Rz+KUwwoIG+NQKdNhzPZbXDjcThUcS0RKXzsBtq6W 2bpg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:from:subject:message-id:date:user-agent :mime-version:content-language; bh=KmsGN9W7Mbf+d3i3rB+Zzycq6qrP4pXxgazQQFRy/fU=; b=YAk2ycVCfXEqliP0yjd62y7gILXZ7kDt30hp0kJwew6PPGBE4kfEysfOwx8q2BSPmG 1/eccOOF+HFksdow4xJqctc4m/XHoGOolPpICOL8Cb4l94YhGvDnd1jOSbpwQArvY9mc KEDt+9tKgaeDakJvVnCJNOfI68EvO0J4hZYMAMHWW5G+z/0uL1cT/nx3zpqDg9tW61rE /9/NMSith4aDYefyin8pT4cqSznUcRNjBKikcM1tWx3B855fbAFPhp1nub3dmDB8szxb bYYSjnhL5fFp2V8v5hoiNGnZMYYAqG47xPNzZOs7ot596tqOIH58y0R2+dCkKTYjGvsE 71pQ== X-Gm-Message-State: AHPjjUj3i1RalCiQtFEif+Jcmepz/IWhICCdwoaB7HVVgUfJPbtXje9/ zbCYginhwjpc99eHUvbCMCA= X-Google-Smtp-Source: AOwi7QBtmSdO7Usyl5Ymr4yktM+vCdLdqZZ2HxC8h8uVliSofjbouLT0wH2SgFKYdWC/gdQxLw5p5g== X-Received: by 10.99.184.9 with SMTP id p9mr5668377pge.6.1506650340844; Thu, 28 Sep 2017 18:59:00 -0700 (PDT) Received: from [10.67.68.33] (fmdmzpr01-ext.fm.intel.com. [192.55.54.36]) by smtp.gmail.com with ESMTPSA id x19sm5490360pfa.16.2017.09.28.18.58.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 28 Sep 2017 18:59:00 -0700 (PDT) To: FFmpeg development discussions and patches , Mark Thompson From: Jun Zhao Message-ID: <35b150fc-f427-743b-f0de-f824598a6b7f@gmail.com> Date: Fri, 29 Sep 2017 09:58:57 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 Content-Language: en-US Subject: [FFmpeg-devel] [PATCH V2 2/2] lavc/vaapi_decode: fix profile search when disable exact profile match. 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 94604d623de1fec6f363dcda4d61712865257a0a Mon Sep 17 00:00:00 2001 From: Jun Zhao Date: Thu, 21 Sep 2017 02:44:42 -0400 Subject: [PATCH V2 2/2] lavc/vaapi_decode: fix profile search when disable exact profile match. when disable exact profile, use the alt_profile for VAAPI HWAccel decoder. Signed-off-by: Jun Zhao --- libavcodec/vaapi_decode.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavcodec/vaapi_decode.c b/libavcodec/vaapi_decode.c index cf58aae4c6..f0dccf481b 100644 --- a/libavcodec/vaapi_decode.c +++ b/libavcodec/vaapi_decode.c @@ -328,7 +328,7 @@ static int vaapi_decode_make_config(AVCodecContext *avctx) if (j < profile_count) { if (exact_match) break; - alt_profile = vaapi_profile_map[i].codec_profile; + alt_profile = vaapi_profile_map[i].va_profile; } } av_freep(&profile_list); @@ -348,6 +348,7 @@ static int vaapi_decode_make_config(AVCodecContext *avctx) av_log(avctx, AV_LOG_WARNING, "Using possibly-" "incompatible profile %d instead.\n", alt_profile); + profile = alt_profile; } else { av_log(avctx, AV_LOG_VERBOSE, "Codec %s profile %d not " "supported for hardware decode.\n",