From patchwork Sat Dec 10 12:50:20 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Thompson X-Patchwork-Id: 1740 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.103.65.86 with SMTP id o83csp813309vsa; Sat, 10 Dec 2016 04:50:41 -0800 (PST) X-Received: by 10.194.171.66 with SMTP id as2mr86534622wjc.77.1481374241403; Sat, 10 Dec 2016 04:50:41 -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 i67si21808004wmh.90.2016.12.10.04.50.40; Sat, 10 Dec 2016 04:50:41 -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=@jkqxz-net.20150623.gappssmtp.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 Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 8110D689F52; Sat, 10 Dec 2016 14:50:34 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wj0-f174.google.com (mail-wj0-f174.google.com [209.85.210.174]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 1B589689F03 for ; Sat, 10 Dec 2016 14:50:28 +0200 (EET) Received: by mail-wj0-f174.google.com with SMTP id xy5so35463122wjc.0 for ; Sat, 10 Dec 2016 04:50:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jkqxz-net.20150623.gappssmtp.com; s=20150623; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding; bh=V/N7rN3Xvduyxo5WiIWA72wKAyMd7oCnDmbTnEOOCH4=; b=GcFJyICWR5fks5YmoJlQraKFUXWbfWpQo6jR1PcRLN8sU2iqEZYP51cRmIsFJQpj8Q 7SVg4qP0M3sUEUUVTSRbrqU4sgLp6+WL3tUYRqbVWXgydqZFu22o0YA9ghPkEImC/7Sp NDnuAMM6iALnA1FAmnhp6P4NYKHYraEDaLojC9Qobh+AkjvYGS2N7tNaMhsaN5tCQfN1 67PLtNJTrixaLQfiBbZ/fLUw4kxbzAeIfY3TPQwLq0R8zR0+aZrZic33r5rwDcUPVcy4 94I+IjUeJ/kAcs/rOStnrJOyNoI6lD+7CEDB9HP+w5jEuUNxjGor+YsLAnyGbBXXILgr b9Dw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=V/N7rN3Xvduyxo5WiIWA72wKAyMd7oCnDmbTnEOOCH4=; b=SMGCBSebZ+b9Lfw0VoLuV+sUgjPby0Hx+fYS1RPTlM9xTPnlDeOZH/AIW8JavjHBg2 EP6cgmYqEuSB7Lvr9N6VtklKePICbNyrSaXGVqXzVpGgvl2+sPNaULAeNyiQV2N8gsuF GytV8nyRxF+U8KGZV/X03RFO7GWrtZwr+QgnaF8uxpOnMWfy2uIMpHlK5naWeLA6sun0 DcKt/1lJScorWEtDjCtarJ0W6ytMPTLZPqsrjSyF1hcGrsCLz6liRpJFBIpwWuqKOkKR wo0Bxv+IukjT6iPeXKLRyJasSb4Vc1ZmgM9jMG0ZTAYeuMzPk8jSwoCQWQpWhVpAjGr6 2aWQ== X-Gm-Message-State: AKaTC01ciEJqqtPabGGjk83QeL8n6cP4I6I3o/umE3/Y0NyInqA/VFSmI78/ccYXqqxYGQ== X-Received: by 10.194.5.165 with SMTP id t5mr38473337wjt.107.1481374231554; Sat, 10 Dec 2016 04:50:31 -0800 (PST) Received: from [192.168.0.8] (cpc91242-cmbg18-2-0-cust650.5-4.cable.virginm.net. [82.8.130.139]) by smtp.gmail.com with ESMTPSA id c202sm3931306wme.1.2016.12.10.04.50.30 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 10 Dec 2016 04:50:31 -0800 (PST) To: FFmpeg development discussions and patches References: <20161205203259.2479-1-matmaul@gmail.com> <20161205203259.2479-2-matmaul@gmail.com> <01ee65fc-c93d-7142-333f-aad786d3384b@jkqxz.net> From: Mark Thompson Message-ID: <6911c4ec-bce5-0f4a-653d-a2997e4dfaaf@jkqxz.net> Date: Sat, 10 Dec 2016 12:50:20 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Icedove/45.4.0 MIME-Version: 1.0 In-Reply-To: Subject: [FFmpeg-devel] [PATCH] vaapi_vp9: Do not set bit_depth on old versions 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" Fixes ticket #6003. --- On 10/12/16 12:09, Carl Eugen Hoyos wrote: > 2016-12-08 16:51 GMT+01:00 Mark Thompson : >> Fixes ticket #6003. > >>> May I suggest to revert this? >>> >>>> + pp->bit_depth = h->h.bpp; >>> >>> Google doesn't easily find a version of va_dec_vp9.h >>> with _VADecPictureParameterBufferVP9->bit_depth. >> >> Urgh: libva 1.6.0 to 1.6.2 don't have this field. >> >> Hacky fix enclosing, only compile tested. > > As long as you work on a "better" fix, please either > apply or revert the original patch, build regressions > are not acceptable. Please review the two suggested fixes and hopefully express approval for one or other of them - a fixed and tested version of the first is in this mail, the second can be found in . Thanks, - Mark libavcodec/vaapi_vp9.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/libavcodec/vaapi_vp9.c b/libavcodec/vaapi_vp9.c index 9b3e81a..a355a99 100644 --- a/libavcodec/vaapi_vp9.c +++ b/libavcodec/vaapi_vp9.c @@ -38,7 +38,10 @@ static void fill_picture_parameters(AVCodecContext *avctx, pp->first_partition_size = h->h.compressed_header_size; pp->profile = h->h.profile; + +#if VA_CHECK_VERSION(0, 39, 0) pp->bit_depth = h->h.bpp; +#endif pp->filter_level = h->h.filter.level; pp->sharpness_level = h->h.filter.sharpness; @@ -97,6 +100,14 @@ static int vaapi_vp9_start_frame(AVCodecContext *avctx, FFVAContext * const vactx = ff_vaapi_get_context(avctx); VADecPictureParameterBufferVP9 *pic_param; +#if !VA_CHECK_VERSION(0, 39, 0) + if (h->h.profile >= 2) { + av_log(avctx, AV_LOG_ERROR, "VP9 profile %d is not supported " + "with this libva version.\n", h->h.profile); + return AVERROR(ENOSYS); + } +#endif + vactx->slice_param_size = sizeof(VASliceParameterBufferVP9); pic_param = ff_vaapi_alloc_pic_param(vactx, sizeof(VADecPictureParameterBufferVP9));