From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f45.google.com (mail-wm1-f45.google.com [209.85.128.45]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EBDE637A493 for ; Thu, 9 Apr 2026 07:43:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.45 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775720592; cv=none; b=h11tH3n58suOOlC2JfpwDaajNh3CLYU6iDI6Qt2D1bU8PcpDLVIUwdNT275qKR7GER5D7G8kLV2PBIstWhz3pPX99n3VCDkwmMAbhkTMQeTtwQbLS21HR7zks50pIK7XzB8lGVK6d9Fu3xWySaTSIKHf6WsXOeNJgtGRISppdt4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775720592; c=relaxed/simple; bh=p15WCfIkJ4SuEu8l36dZ0rdpBrY1geE7hTvdbwzRuog=; h=Message-ID:Date:MIME-Version:From:Subject:To:Cc:References: In-Reply-To:Content-Type; b=tI9PxO0OB+kF3NQAGGiL0JO0rtJ8Ji6iun6tjMHw1siM9aYIsBCEzm3XBQswe+pMeBNTX5dM6fevoOi8Ns2krfyMnc7wWqkfVc6tyvGyt5+W6xrQEjHh0afaWS5Z8yShbXgIxoSKacn8u0tQlIqs7AWc/1HM/2kzlWl24oLNk6o= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=p730qma9; arc=none smtp.client-ip=209.85.128.45 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="p730qma9" Received: by mail-wm1-f45.google.com with SMTP id 5b1f17b1804b1-483487335c2so5673185e9.2 for ; Thu, 09 Apr 2026 00:43:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1775720589; x=1776325389; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:organization:autocrypt :content-language:references:cc:to:subject:reply-to:from:user-agent :mime-version:date:message-id:from:to:cc:subject:date:message-id :reply-to; bh=Y4vfOVI2lZlL/h4O6xl86sUjxxrqaTqlcGZT6I0Ul4I=; b=p730qma93HiWUROiqyzh1t/JxqNoePaQB9CwXS/9VRfmCJZWmF/s6nOxGJgMqWx/PP ugBPj7SPRIh+LsrnTeAVWQ3IrdePIG5GAPHMI29UYkwGIYWZQnT7zhEalJdyBNKJBuLB X51+rA0LJFRlDncpgLGHKaVq2OR+QraCk0rFD2a/qbIMWw0f/vcYU8rOpN8taZ1B9+ev 2cpLNOaG8F0UiU/6Cb0GtvJswGg5XVB6EvhRNRW5R90AWQGxE4LuQd+jUEJe25+e4MSe /RmhbnDyXKb1UvbHNqWnrtdxgDJ2Z370aBbGP+oWoFv3Il/nGZZhIANW5lwDq2X/AfmG 94+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1775720589; x=1776325389; h=content-transfer-encoding:in-reply-to:organization:autocrypt :content-language:references:cc:to:subject:reply-to:from:user-agent :mime-version:date:message-id:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Y4vfOVI2lZlL/h4O6xl86sUjxxrqaTqlcGZT6I0Ul4I=; b=ktZQGIfrWqilmv598zQxvwbsdmp85ACFtrd1KoIAK/1Bdd3prBjxpwp6Sp2KslevRF Q10AZlBkGvRCL+vuYjjCxP05vyv8v2gegqRdShMjf3O/wgZYf0H+Jiaiy24GS8mbd5jE /1GeW3s+1O1oYBs/5xH2BIRnv6FdCcLImU++7rEbhMGjUH2WzDEr2/O/19Lx21wCp6G8 RCLq2kc5t3pEJ7WZhe9lO5tScilLTAGWQqOAYrhkQDPFM16FzADdFS6bfNNTdyxuUdEr yvw38wvdN3X0qWlpUlZG6QnQz7unjhKPo8UII0VuyFwvHQY4YCsBieSuOGFFK/WnmELt RWCw== X-Forwarded-Encrypted: i=1; AJvYcCVXtXgUMFuYAQ00FBXowPwdy4ESFbn7pTSL97FyRValrAn8kZj2J+AIWU59BIFvjY0pFd+QOyVAIAsNcbI=@vger.kernel.org X-Gm-Message-State: AOJu0Ywp0mvqEzuA2FStVQX1fjbeHWm2TasJDtyK4PxjHYaWeTr3y1Wb bPKSnt55vU542TmzVoxs+557sjN62aGFropDO8uj4Biq7IxaV+AR0GiwotRKKd057bc= X-Gm-Gg: AeBDievhiiz6vpWpmgho2PiqSRNdFLzWNs8CAWi6XNCqo1+RBSFYuvghM+vTY8YVmSR 3Kk6eOXECXVQVDPjj2KzNh7Igx3uTyO5iH+UtceL27nkYih+cix+QH8g4fYjOwMSvLoFp7abHOi ooZOKmPCsL4jNoNoGb0ujd6t6pYKHD3G2FVwPbg1naaz+H3zOtmEVAwFuKPnrw5M9VEskkswxaN oBRuJNWQ8wEucbz/ZabvUx3HwOW8FnrRH0a3az8KFlEd553OGooEY4hDwIgoF8wD5SCXJZhEBIr O7ek+1qYHuWWMuc2pEdGtcYASYL+cR1CWLOIbZymOk0xQ+th+FmVy4GWULHl3emplfz8cydUAtW d0MoC7QZnKVkGrrvyWIHw5KW9LhDeJGTxjK5dx4qmTPps9aVIA0H9pV95gNI1Wa2CjxhObezThk n7wnTMw6+X1Abe2krNf3WorQi9BJMU4DfhlADTwrxF0e9fO8Xk4WH5GlsWbLewWA6gp8DtkWZk0 pBsMLs= X-Received: by 2002:a05:600c:630a:b0:485:2fe9:336f with SMTP id 5b1f17b1804b1-488998e3cbemr338436225e9.30.1775720589094; Thu, 09 Apr 2026 00:43:09 -0700 (PDT) Received: from ?IPV6:2a01:e0a:106d:1080:70d5:8219:5bd4:e213? ([2a01:e0a:106d:1080:70d5:8219:5bd4:e213]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-488cfa5d118sm34101905e9.11.2026.04.09.00.43.08 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 09 Apr 2026 00:43:08 -0700 (PDT) Message-ID: <5ceff68e-f636-40d3-a189-8ead1be936c1@linaro.org> Date: Thu, 9 Apr 2026 09:43:08 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird From: Neil Armstrong Reply-To: Neil Armstrong Subject: Re: [PATCH RFC 0/7] media: qcom: iris: add support for decoding 10bit formats To: Dmitry Baryshkov , Nicolas Dufresne Cc: Vikash Garodia , Dikshita Agarwal , Abhinav Kumar , Bryan O'Donoghue , Mauro Carvalho Chehab , linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org References: <20260408-topic-sm8x50-iris-10bit-decoding-v1-0-428c1ec2e3f3@linaro.org> <454f0f277cbaee5774c25d34a33fc3bc478fa756.camel@ndufresne.ca> Content-Language: en-US, fr Autocrypt: addr=neil.armstrong@linaro.org; keydata= xsBNBE1ZBs8BCAD78xVLsXPwV/2qQx2FaO/7mhWL0Qodw8UcQJnkrWmgTFRobtTWxuRx8WWP GTjuhvbleoQ5Cxjr+v+1ARGCH46MxFP5DwauzPekwJUD5QKZlaw/bURTLmS2id5wWi3lqVH4 BVF2WzvGyyeV1o4RTCYDnZ9VLLylJ9bneEaIs/7cjCEbipGGFlfIML3sfqnIvMAxIMZrvcl9 qPV2k+KQ7q+aXavU5W+yLNn7QtXUB530Zlk/d2ETgzQ5FLYYnUDAaRl+8JUTjc0CNOTpCeik 80TZcE6f8M76Xa6yU8VcNko94Ck7iB4vj70q76P/J7kt98hklrr85/3NU3oti3nrIHmH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gTCS KmbUuLv1CtxKQF+fUV1cVaTPMyT25Od+RC1K+iOR0F54oUJvJeq7fUzbn/KdlhA8XPGzwGRy 4zcsPWvwnXgfe5tk680fEKZVwOZKIEuJC3v+/yZpQzDvGYJvbyix0lHnrCzq43WefRHI5XTT QbM0WUIBIcGmq38+OgUsMYu4NzLu7uZFAcmp6h8g Organization: Linaro In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 4/9/26 03:40, Dmitry Baryshkov wrote: > On Wed, Apr 08, 2026 at 09:04:02PM -0400, Nicolas Dufresne wrote: >> Hi, >> >> Le jeudi 09 avril 2026 à 03:02 +0300, Dmitry Baryshkov a écrit : >>> On Wed, Apr 08, 2026 at 06:43:53PM +0200, Neil Armstrong wrote: >>>> This adds the plumbing to support decoding HEVC and AV1 >>>> streams into 10bit pixel formats, linear and compressed. >>>> >>>> This has only been tested on SM8650 with HEVC, and was inspired by >>>> Venus and the downstream vidc driver for the buffer >>>> calculations and HFI messages. >>>> >>>> I was unable to get 10bit decoding working with Gstreamer >>>> and ffmpeg, but v4l2-ctl works with: >>> >>> Any particular errors? I assume Gstreamer needs to be taught about >>> Q10C. But P010 should (hopefully) work. >> >> P010 should work for both Gst and FFMPEG, its probably a user error, or there is >> a hidden bug in the driver that make it fail, v4l2-ctl is very permissive as it >> simply dump to disk. You should provide an updated fluster score, so you have to >> use one of these. >> >> For Q10C on GStreamer, it needs mapping [0] and you need some bugfix [1] and >> another that I will be sending tomorrow. We had never tested video compression >> with this module before. >> >> [0] https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8195 >> [1] https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/11222 >> >> The last issue has to do with: >> https://gitlab.freedesktop.org/gstreamer/gstreamer/-/blob/38965e2d9c1119674a65dc437ee7e8ec95339f31/subprojects/gst-plugins-good/sys/v4l2/gstv4l2object.c#L4378 >> >> V4L2 format gives us the number of allocation, but not really the number of >> planes, and we forgot to initialize that number for the "opaque" format case. A >> tempory fix might be to add this after S_FMT: >> >> if (GST_VIDEO_INFO_FORMAT (&info.vinfo) == GST_VIDEO_FORMAT_DMA_DRM) >> n_v4l_planes = format.fmt.pix_mp.num_planes; >> >> Works for AFBC and QC at leat, since both are unambiguously single plane, and so >> cannot have mplane variants. > > Reading this made me realize another suggestion for Neil: > > Please check that the data returned by Iris matches the display driver > expectations. See the comments in the _dpu_format_populate_addrs_ubwc(). I just checked and they match as I already checked against the venus driver already, which shares the same calculation scheme. I had to add the HFI_PROP_UBWC_STRIDE_SCANLINE command otherwise the firmware would give other alignments and wouldn't display properly with some streams. Neil > >> >> Let me know how far you get! Please be aware that Robert and I are making these >> patches based on feedback, we don't have access to any boards capable of >> decoding to QC compressed formats. >> >>> >>>> v4l2-ctl --verbose --set-fmt-video-out=pixelformat=HEVC --set-fmt-video=pixelformat=P010 --stream-mmap --stream-out-mmap --stream-from-hdr Big_Buck_Bunny_1080_10s_30MB_main10.h265.hdr --stream-to out.P010 >>>> v4l2-ctl --verbose --set-fmt-video-out=pixelformat=HEVC --set-fmt-video=pixelformat=Q10C --stream-mmap --stream-out-mmap --stream-from-hdr Big_Buck_Bunny_1080_10s_30MB_main10.h265.hdr --stream-to out.QC10 >>>> >>>> The non-10bit decoding still works as before. >>>> >>>> With Big_Buck_Bunny_1080_10s_30MB reencoded in 10-bit profile >>>> and tranformed in v4l2 header format with [1]: >>>> ffmpeg -i Big_Buck_Bunny_1080_10s_30MB.h264 -pix_fmt yuv420p10le -c:v libx265 -crf 28 -x265-params profile=main10 Big_Buck_Bunny_1080_10s_30MB_main10.h265 >>>> /path/to/mkhdr.sh Big_Buck_Bunny_1080_10s_30MB_main10.h265 raw Big_Buck_Bunny_1080_10s_30MB_main10.h265.hdr >>>> >>>> The frames correctness has been verified buy displaying them >>>> via Vulkan DMA_BUF import, including QC10C and QC08C. >> >> In GStreamer, once the video4linux plugin issues are fixed, you should be able >> to display the frames using glimagesink. GL only allow for RGB render, which >> damages the data, so its not good enough for conformance testing with >> compression enabled, but usually just doing visual inspection is acceptable. > > Nice! Looking forward to testing Q08C aka NV12-UBWC on the display. > Maybe I should try rebuilding the plugins with the mentioned patches and > provide my r-b or report issues there. > >