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 9D6B54A2CF for ; Sun, 28 Apr 2024 14:14:20 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id BB16F68D2D6; Sun, 28 Apr 2024 17:14:17 +0300 (EEST) Received: from mail-wm1-f42.google.com (mail-wm1-f42.google.com [209.85.128.42]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id AF19F68D119 for ; Sun, 28 Apr 2024 17:14:11 +0300 (EEST) Received: by mail-wm1-f42.google.com with SMTP id 5b1f17b1804b1-41bf1b96aeaso5685415e9.3 for ; Sun, 28 Apr 2024 07:14:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jkqxz-net.20230601.gappssmtp.com; s=20230601; t=1714313650; x=1714918450; darn=ffmpeg.org; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=6geVmaiYSQ4ShgAmULD5VBBoIHXJlNd+6U20RaecGUw=; b=GLvWiWzM/9X8f7OZO5D5SGBJvt2+Lle+31yipFb3XvAsSqHT/05RsM2GV5EA3vU559 8FPWBKJiYbUDk7YxGVSdthSzEjJqNlVwieext/fqd0rYbHrR01BSZ6q/JaFuZOeG3tZ6 FQagnpf4X1Jdp0DcMDKwWdjip6QJ1EYt5ICT5wAKLSOSqnUV0rLnW/8dr6X3h1v+3JkG uHlCNc0YA/VPzlk0kh9F4Rd1DumNpa4QxRKSDYrCUFEUQ+BUacnlPaCGEQQgl416mRHA oWGpV93x661wdG6McAo3daD0FW0C/ryPZwtDYoJg/ZyPttzwEd20lHN5TyupjWK647/j OIQg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714313650; x=1714918450; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=6geVmaiYSQ4ShgAmULD5VBBoIHXJlNd+6U20RaecGUw=; b=Y4E5+x+ZCNt+Pw8Pv+2MCwJJRpuoT2PyfuSEg2ov7XS40hquL9nqoLQ4/guRzO8FdM OhyNN71PnMZMzJGj3e+a2yVkGKPk3lkdCN+mzNJV0TLvcMVURusNlo75gn8It0syBgeI pDb7+eNlxnd9FJfb5u5IkvW6+3rlUdvsx23GtM+3Qvhn4gNF2C5xT2wVYGuGbGw0RLhA mA6rAo2ZJHWiv27fQlERg5a815mUbEN2sYs2PCQHzyO5puWsaf5L3GP8HcZNTssPcBe/ keh1z0qtDdQVNHT1OSbcdJVO4zPQ6P9sweWqYglpQLV9XajFsK1Acf6SIGoTPcm1RnLu w2Wg== X-Gm-Message-State: AOJu0YydQBFfug0g900rh2FIy0Y5kjt0NbEgUiCBDEs86OoDe/IclvhI WzPjHQRvQ9lVQcMaID//YGH4SDh+Hlj15hl3nfOelzIg7Fn760n226UWtB3ZIcqeAB+fl7oub0h S X-Google-Smtp-Source: AGHT+IH/NYIEiNRIg+ZOfMQKIwcFdguS2aR2HxDU6PeDskceSU1h9xcxcOT2zX2ZvgKUCN+M+e3KdQ== X-Received: by 2002:a05:600c:1d12:b0:418:f760:abfb with SMTP id l18-20020a05600c1d1200b00418f760abfbmr6270293wms.5.1714313649999; Sun, 28 Apr 2024 07:14:09 -0700 (PDT) Received: from [192.168.0.15] (cpc92302-cmbg19-2-0-cust1183.5-4.cable.virginm.net. [82.1.212.160]) by smtp.gmail.com with ESMTPSA id m15-20020a05600c460f00b0041a964b55ddsm6666135wmo.1.2024.04.28.07.14.09 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 28 Apr 2024 07:14:09 -0700 (PDT) Message-ID: <831fdccd-7064-4d59-a528-eb1fe7fbe032@jkqxz.net> Date: Sun, 28 Apr 2024 15:14:36 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: en-US To: ffmpeg-devel@ffmpeg.org References: <20240318042111.21983-1-fei.w.wang@intel.com> <90d041b98b5d9ba69b093d9dcae168130389b364.camel@intel.com> <1fa0491e-4609-49ae-bad4-820ea63a52b0@jkqxz.net> <6aca0a524bb0862d07f6469097a4c1b1a991e222.camel@intel.com> <4bccfe20-83a0-4c8f-a6d3-974faf064dbc@jkqxz.net> <1bcdfb6e-8d63-4d1f-9cd9-631e79c03f5f@jkqxz.net> <6a904f10e7dab1ad088c643bc348f4ef793d9f0a.camel@intel.com> From: Mark Thompson In-Reply-To: <6a904f10e7dab1ad088c643bc348f4ef793d9f0a.camel@intel.com> Subject: Re: [FFmpeg-devel] [PATCH 2/2] lavc/vaapi_hevc: Don't require exact profiles 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: On 24/04/2024 14:45, Xiang, Haihao wrote: > On Ma, 2024-04-22 at 22:23 +0100, Mark Thompson wrote: >> Rather than turning the constraint flags into a single profile and then >> searching for that profile (and failing if it doesn't match any profile >> exactly), instead search all supported profiles and use the first one >> which supports the given set of constraint flags. >> --- >> This fixes decode of rext 8-bit 4:2:0; it will correctly pick Main 12 or Main >> 4:2:2 10 or Main 4:4:4 (first one available) to use as the decoding profile >> after this patch. > > sw decoding and vaapi decoding might have different bits (There is the same > issue if applying Fei's patchset). > > For example: > $ ffmpeg -hwaccel vaapi -f lavfi -i testsrc -vf 'format=nv12,hwupload' -c:v > hevc_vaapi -profile:v rext -vframes 30 -y out.mp4 > > 8bit ouput if using sw decoding: > $ ffmpeg -i out.mp4 -f null - > [...] > Stream #0:0(und): Video: wrapped_avframe, yuv420p(tv, progressive), 320x240 [SAR > 1:1 DAR 4:3], q=2-31, 200 kb/s, 25 fps, 25 tbn (default) > > 12bit output if using vaapi decoding: > $ ffmpeg -hwaccel vaapi -i out.mp4 -f null - > [...] > Stream #0:0(und): Video: wrapped_avframe, p012le(tv, progressive), 320x240 [SAR > 1:1 DAR 4:3], q=2-31, 200 kb/s, 25 fps, 25 tbn (default) That comes from what the driver reports support for, though? E.g. with the Intel iHD driver, I have { "profile": 23, "name": "HEVCMain12", ... "surface_formats": [ { "rt_format": "YUV420", "max_width": 16384, "max_height": 16384, "memory_types": [ "VA", "DRM_PRIME_2", ], "pixel_formats": [ "P012", "P016", ], }, So to decode a 4:2:0 8-bit input it is asking for a P012 or P016 surface. If the driver reported that a Main 12 profile 4:2:0 8-bit input could be decoded to an NV12 surface then it would be picked by the logic in vaapi_decode_find_best_format(), since it would be a better match than the higher-depth formats. Thanks, - Mark _______________________________________________ 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".