Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp336226pxb; Fri, 22 Apr 2022 01:49:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwIvjFaY+BPsnnHWxPnKXQIIf7wuyYqejj5Okehw+FmpYRMs4jtTD+6WYFP31EmC0KgvYn5 X-Received: by 2002:a05:6402:26d1:b0:423:fc04:8e78 with SMTP id x17-20020a05640226d100b00423fc048e78mr3619853edd.133.1650617368462; Fri, 22 Apr 2022 01:49:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650617368; cv=none; d=google.com; s=arc-20160816; b=HJt6iFVkVjWAGCGS1fhAZ37U9OnI4yrCK1MhbwB7DLqKFmYuC4nGiGKlPTdhKp9j4v I42hTxasgXPHDAC0Db5SjNV9DBOMCnX1b49v/MMpJaHvq0zdURhPvOF7q0cdRLxn9A1T dxcgFuuAoXzOiy9ZvVxBAkEGcQzetOqVQRRas+sOdJyOl1jcyc5r2in5DDpWSucHkXiM RHOeXAZnbUFE9wtaT4PYMEYfJb/krDc3itTl5RihZcvCRaDHrWkZeSDDwoUfz9mhGxtR v9kGjfnvgWrxdWZjNATGRwOMxuGVpiRI9c/gq0sil9nVfiPifDsh2dWXoS2TyxFA80Sc JuZw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=zr+VGX0mhBp9NZinaclK39Iaheyjh+GcxufQM98q2T4=; b=A8/+APNEYIN5brAh0wEVEvvtV1ukuX2DAaPQNTlNhZfo7W5FXetNtTHTeNsZXgl3oe dy3peuK4BOMmx+j7GzWO3nfkOGtHMczzZQk6tJnq+gPPccXij7XiYrhAZhRI18R+Vdzf kq4sce2aPm53uojRkTI3tFrwBWbEf4sST4If4xozKWif+02T6gkPKeTQWtT9fn7GuU+Y 9zF26ZXrZcMlWBwwc8a0PMBznLzOlREAXM7tFpYuZXKy84eIdmoq5lctGiUtXvrol0L/ HmpJKpSCL9Qbf4OCsIn6aGYd9c9TPzW4pGkMeVSker1INJrB3a1jtpwC2MvH+SI28VgT WkqA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=TaPVENVs; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j8-20020a170906430800b006e7111d4ab0si5756825ejm.178.2022.04.22.01.49.04; Fri, 22 Apr 2022 01:49:28 -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=@chromium.org header.s=google header.b=TaPVENVs; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351803AbiDSLtP (ORCPT + 99 others); Tue, 19 Apr 2022 07:49:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39852 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1351842AbiDSLtL (ORCPT ); Tue, 19 Apr 2022 07:49:11 -0400 Received: from mail-oi1-x235.google.com (mail-oi1-x235.google.com [IPv6:2607:f8b0:4864:20::235]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 93FC52AE2E for ; Tue, 19 Apr 2022 04:46:29 -0700 (PDT) Received: by mail-oi1-x235.google.com with SMTP id bj24so12351385oib.11 for ; Tue, 19 Apr 2022 04:46:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=zr+VGX0mhBp9NZinaclK39Iaheyjh+GcxufQM98q2T4=; b=TaPVENVs6UeX/0wd28BijzB9+2vH3hkykLfAx6Z+TianLJL/RErxbAX9zvCD+siM/Z uLqmKaIs6I21/BZuoX5aH54xHpMduMGKHjQmyllRJaUuuBA2culEnlxqKuir7uxiFapV 3KrFAo/2ggciJwo9Etg/qeEu5hsSc4fTqlm8c= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=zr+VGX0mhBp9NZinaclK39Iaheyjh+GcxufQM98q2T4=; b=U3Wpxd9CpUGKzZy9qWyos3h5yMgwVjEh7C5DWM3fIH1AXGkwrZahWlrEGm0tStdMoL gnuNTK4hCjAmvsnJ4RAT/nCW3x1u5yDcL1Hyf6V9W4/z2ZrEjhzRT6hbc9+DWkm8MtdF fvK/fICM2Jme8e9CjYugxt0tvBXQWtOCa6oW68UTZCLX/OAvustUUZXuv6C2mxf8V9t5 Rq2SA7k/EsSg0FQqgL+I52kaG4QusUTbrhoVFJ8BYX5Dv/4JrVHfAFnnovm3B/Z9ZKUg Ixy8x7SLIVsyjAkubijYFcUa1aD7ghc8Qkm0ioYyDXBYeTFOoVJrcaAPKxrJD8nHRVks PnIQ== X-Gm-Message-State: AOAM533drcuHUiw6VYvmKchcKQPxNdY+LtWlBloHo1d9nuFkn+8LEwLS zz7IFYGFLi4WWW6oyn7aEgpZlWCRl/Nq3Q== X-Received: by 2002:a05:6808:1d7:b0:322:5866:9ee3 with SMTP id x23-20020a05680801d700b0032258669ee3mr6682848oic.171.1650368788691; Tue, 19 Apr 2022 04:46:28 -0700 (PDT) Received: from mail-oo1-f48.google.com (mail-oo1-f48.google.com. [209.85.161.48]) by smtp.gmail.com with ESMTPSA id x2-20020a4a2a42000000b0033a3c4392c3sm2277798oox.26.2022.04.19.04.46.26 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 19 Apr 2022 04:46:27 -0700 (PDT) Received: by mail-oo1-f48.google.com with SMTP id 65-20020a4a1a44000000b00333316787bbso2642786oof.3 for ; Tue, 19 Apr 2022 04:46:26 -0700 (PDT) X-Received: by 2002:a4a:8081:0:b0:33a:52ed:3b3b with SMTP id z1-20020a4a8081000000b0033a52ed3b3bmr1777631oof.26.1650368786395; Tue, 19 Apr 2022 04:46:26 -0700 (PDT) MIME-Version: 1.0 References: <20220418090652.3156-1-Ping-lei.Lin@mediatek.com> In-Reply-To: <20220418090652.3156-1-Ping-lei.Lin@mediatek.com> From: Ricardo Ribalda Date: Tue, 19 Apr 2022 13:46:15 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v3] media: usb: uvc: Add UVC_GUID_FORMAT_H265 To: James_Lin Cc: linux-kernel@vger.kernel.org, Laurent Pinchart , 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 Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,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 Hi James Thanks for your patch On Mon, 18 Apr 2022 at 11:07, James_Lin wrote: > > 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. > > Signed-off-by: James_Lin Reviewed-by: Ricardo Ribalda > --- > drivers/media/usb/uvc/uvc_driver.c | 5 +++++ > drivers/media/usb/uvc/uvcvideo.h | 3 +++ > 2 files changed, 8 insertions(+) > > 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[] = { > .guid = UVC_GUID_FORMAT_H264, > .fcc = V4L2_PIX_FMT_H264, > }, Maybe I would add a comment here saying that some cameras represent hevc as h265. > + { > + .name = "H.265", > + .guid = UVC_GUID_FORMAT_H265, > + .fcc = V4L2_PIX_FMT_HEVC, > + }, > { > .name = "Greyscale 8 L/R (Y8I)", > .guid = UVC_GUID_FORMAT_Y8I, > diff --git a/drivers/media/usb/uvc/uvcvideo.h b/drivers/media/usb/uvc/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} > -- > 2.18.0 > -- Ricardo Ribalda