Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp341914pxb; Fri, 22 Apr 2022 02:00:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxDmnVZm0NFpWN45cmL9tbb16ccHOkauGY++lXtGGRII7UCtB0D32P8nWrhOSQWvwTWtbmV X-Received: by 2002:a17:90b:2786:b0:1d5:bfa1:c7f4 with SMTP id pw6-20020a17090b278600b001d5bfa1c7f4mr4192917pjb.101.1650618057894; Fri, 22 Apr 2022 02:00:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650618057; cv=none; d=google.com; s=arc-20160816; b=dEVRHGKFh/VTDYrnbr24c8FT2p3LHjXIWLjDIUnNj2byWsuEJCjR0/BnyrpxR8LVGo 32rN0ZMMjDClJIsAO4ydNQiE+ilHloyC1wdpam7iIYl2rRGwTgjYeZ08lGmEKrdd/9UU X2hGOwIigkDykMqHi836WIoNcAHSGTqqkJJCU4Kgpb2hJpNwSY757q6YLOf+8SD+TrpF ZyWmvRHQZ3a326Lmuh352dOim9N07U2GWZ3NJ7M+QjHd+LDEkjBVlRoKGvoLVZxdtBhI WClp2tCqzW4YNjmA+vwyg6OsJr1sNitYx5tL2RHbgNvgthM1plknCYz+MXsV12wrS9kx z9cw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent :content-transfer-encoding:references:in-reply-to:date:cc:to:from :subject:message-id:dkim-signature; bh=drE3Vvgc/V+fnpihrYOc9KMqNg1xdJOT7Hgu1lLOYXU=; b=MgBYXOtUTLER8iE9IEP7vn+w+UJ2g8vrbp2uoeqt2URFJZaJAUF7ZSmDcEAvjBLaA8 1K4UvGhze3T5C47AZGEd9fp9ZHF3tPg7RPuAKdPdQbtin39zsF89Wg7zy4H1k0FHAbkC t9fnqzQEYS9aagc/j+PwaUu5SGcYfz8CLbrRF6RtBMcwGEkSK++IZjngVdCz7sJSS6a+ 6fn9MAqugOnmEHqxGKgrmdlpF8O2MRI8DH9TuWHU8RrjU53+B8hS/dCZEZ6XmhaNnKRv XW3PHjLkdmvp/Dlqs51ONSQa6OU3crQvM/YUORcyusx6lA8oR4zQmSf+B5pQtAf3HgYB EBRA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ndufresne-ca.20210112.gappssmtp.com header.s=20210112 header.b=VNn55Yzn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f10-20020a63dc4a000000b003aa5155f4e8si7828997pgj.128.2022.04.22.02.00.43; Fri, 22 Apr 2022 02:00:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@ndufresne-ca.20210112.gappssmtp.com header.s=20210112 header.b=VNn55Yzn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243639AbiDSRjo (ORCPT + 99 others); Tue, 19 Apr 2022 13:39:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47766 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232267AbiDSRjn (ORCPT ); Tue, 19 Apr 2022 13:39:43 -0400 Received: from mail-qt1-x834.google.com (mail-qt1-x834.google.com [IPv6:2607:f8b0:4864:20::834]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CB104275CC for ; Tue, 19 Apr 2022 10:36:55 -0700 (PDT) Received: by mail-qt1-x834.google.com with SMTP id x12so1616948qtp.9 for ; Tue, 19 Apr 2022 10:36:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ndufresne-ca.20210112.gappssmtp.com; s=20210112; h=message-id:subject:from:to:cc:date:in-reply-to:references :content-transfer-encoding:user-agent:mime-version; bh=drE3Vvgc/V+fnpihrYOc9KMqNg1xdJOT7Hgu1lLOYXU=; b=VNn55YznefnmFxbiHeFybFRRx10q4N3WTgm8faUA9fqMHT+kESq+EtXlHOqGO7ztG7 rfE/DMNA86nYIOWkCHqeYgSCZmxu2D41dL5JKAGJcEmSTzQHh/35AuzT+sCBnH+DWsUD lBlNCL65a0dorLVD6Oy4LUMbr++3kxyIWjC8OxiGBuDWf8X9OXJ3/BdnDWPAxr/MjnN6 QB1dvv6lyaJgcQRpfZnvj0ZWkalUqHvHQy+JLy6VrQnnjrxy0+WsLkVeLOGHR1TRjl3n +u02J2wpzF5x9MQk3tj2enbSMxmhyl7W6LIeBRYsloK1+gPSKB5TjzMDUXefmph2Js// sOtg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:content-transfer-encoding:user-agent:mime-version; bh=drE3Vvgc/V+fnpihrYOc9KMqNg1xdJOT7Hgu1lLOYXU=; b=LcG5vNlCIk9ahf7+OuU6nT/rVfsGFahCo/aGqUnbFTJtCDmdI2aIqEd3Y98mNnM/tu bQAROcDI5jGZHSM6nsM9zHYjDxI+v/QbpY9k+5Lt5Bz0RARss8IUQFMlJhQNBtwo32Cg g8eIn50kTfmK5UG8681a/wJ1bgXAqXByUKxDQAW1QAgHjbBwVctn6R+LVEdIDK/DSDV3 GNPPwKseHxPahAwOSSB1+bzr6yd2a5mqtsERs1ODYOSoEioALzUMH+9pxD0HCNgdjX1G xff0kungIcipWdcPaKCtWxK9cVs2dvBZbH7c2P2+/doXaJ92nWMmw5XwFGTnjTEW4swU ubXg== X-Gm-Message-State: AOAM5319xP8XYnwuzd5wxqkFG2rQtSxRmbf3jbHGRxmiFl7z0rfuxTM6 9QVRICIj4Xot2855aa4b22964g== X-Received: by 2002:a05:622a:408f:b0:2ed:12b7:2e9c with SMTP id cg15-20020a05622a408f00b002ed12b72e9cmr11075993qtb.309.1650389814938; Tue, 19 Apr 2022 10:36:54 -0700 (PDT) Received: from nicolas-tpx395.localdomain (173-246-12-168.qc.cable.ebox.net. [173.246.12.168]) by smtp.gmail.com with ESMTPSA id s17-20020a05620a16b100b0069eb1eb06b7sm290943qkj.131.2022.04.19.10.36.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Apr 2022 10:36:54 -0700 (PDT) Message-ID: <4b6b65e72b3f3cd74af5a3f0069838c86a6725e9.camel@ndufresne.ca> Subject: Re: [PATCH v3] media: usb: uvc: Add UVC_GUID_FORMAT_H265 From: Nicolas Dufresne To: Ricardo Ribalda , Laurent Pinchart Cc: James_Lin , linux-kernel@vger.kernel.org, Mauro Carvalho Chehab , Matthias Brugger , Hans Verkuil , Ezequiel Garcia , Arnd Bergmann , Sergey Senozhatsky , Alexandre Courbot , Sakari Ailus , linux-media@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, sherlock.chang@mediatek.com, lecopzer.chen@mediatek.com, max.yan@mediatek.com, tm.wu@mediatek.com Date: Tue, 19 Apr 2022 13:36:53 -0400 In-Reply-To: References: <20220418090652.3156-1-Ping-lei.Lin@mediatek.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.44.0 (3.44.0-1.fc36) MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Le mardi 19 avril 2022 =C3=A0 14:18 +0200, Ricardo Ribalda a =C3=A9crit=C2= =A0: > On Tue, 19 Apr 2022 at 14:17, Laurent Pinchart > wrote: > >=20 > > Hello, > >=20 > > On Tue, Apr 19, 2022 at 01:46:15PM +0200, Ricardo Ribalda wrote: > > > On Mon, 18 Apr 2022 at 11:07, James_Lin w= rote: > > > >=20 > > > > This patch aims to add UVC_GUID_FORMAT_H265 > > > > High Efficiency Video Coding (HEVC), also known as H.265 and MPEG-H= Part 2. > > > > They describe the same video encoding method. > > > > So for handling their behavior is the same. > > > > However, when external camera device describes this encoding method= , > > > > some use hevc, some use h265. > > > > There is no uniform specification to describe this encoding method. > > > > So if an external camera device use h265 to describe this encoding = method, > > > > driver will not recognize it. > > > > Therefore, this patch is to enable driver to read HEVC/H265 > > > > and convert it to V4L2_PIX_FMT_HEVC. > > > >=20 > > > > Signed-off-by: James_Lin > > >=20 > > > Reviewed-by: Ricardo Ribalda > > > > --- > > > > drivers/media/usb/uvc/uvc_driver.c | 5 +++++ > > > > drivers/media/usb/uvc/uvcvideo.h | 3 +++ > > > > 2 files changed, 8 insertions(+) > > > >=20 > > > > diff --git a/drivers/media/usb/uvc/uvc_driver.c b/drivers/media/usb= /uvc/uvc_driver.c > > > > index dda0f0aa78b8..e437e9f95890 100644 > > > > --- a/drivers/media/usb/uvc/uvc_driver.c > > > > +++ b/drivers/media/usb/uvc/uvc_driver.c > > > > @@ -154,6 +154,11 @@ static struct uvc_format_desc uvc_fmts[] =3D { > > > > .guid =3D UVC_GUID_FORMAT_H264, > > > > .fcc =3D V4L2_PIX_FMT_H264, > > > > }, > > >=20 > > > Maybe I would add a comment here saying that some cameras represent > > > hevc as h265. > >=20 > > I wish there would be a 4CC and GUID standard with a centralized > > registry... >=20 > Thought that was the kernel codebase :) You'll find multiple fourcc for the same thing in the linux kernel ;-P >=20 > >=20 > > Reviewed-by: Laurent Pinchart > >=20 > > > > + { > > > > + .name =3D "H.265", > > > > + .guid =3D UVC_GUID_FORMAT_H265, > > > > + .fcc =3D V4L2_PIX_FMT_HEVC, > > > > + }, > > > > { > > > > .name =3D "Greyscale 8 L/R (Y8I)", > > > > .guid =3D UVC_GUID_FORMAT_Y8I, > > > > diff --git a/drivers/media/usb/uvc/uvcvideo.h b/drivers/media/usb/u= vc/uvcvideo.h > > > > index 143230b3275b..41f4d8c33f2a 100644 > > > > --- a/drivers/media/usb/uvc/uvcvideo.h > > > > +++ b/drivers/media/usb/uvc/uvcvideo.h > > > > @@ -139,6 +139,9 @@ > > > > #define UVC_GUID_FORMAT_H264 \ > > > > { 'H', '2', '6', '4', 0x00, 0x00, 0x10, 0x00, \ > > > > 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71} > > > > +#define UVC_GUID_FORMAT_H265 \ > > > > + { 'H', '2', '6', '5', 0x00, 0x00, 0x10, 0x00, \ > > > > + 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71} > > > > #define UVC_GUID_FORMAT_Y8I \ > > > > { 'Y', '8', 'I', ' ', 0x00, 0x00, 0x10, 0x00, \ > > > > 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71} > >=20 > > -- > > Regards, > >=20 > > Laurent Pinchart >=20 >=20 >=20