public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Philipp Zabel <philipp.zabel@gmail.com>
Cc: chf.fritz@googlemail.com,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	linux-media <linux-media@vger.kernel.org>,
	Norbert Wesp <n.wesp@phytec.de>, Dirk Bender <D.bender@phytec.de>
Subject: Re: [PATCH] uvcvideo: add quirk to force Phytec CAM 004H to GBRG
Date: Sat, 18 Aug 2018 00:50:39 +0300	[thread overview]
Message-ID: <2371417.kFLlxrCYBz@avalon> (raw)
In-Reply-To: <7233ce5ecd19fa6942afc1d86e3a7e97f8c3d734.camel@gmail.com>

Hi Philipp,

On Friday, 17 August 2018 20:46:33 EEST Philipp Zabel wrote:
> Am Donnerstag, den 16.08.2018, 19:39 +0300 schrieb Laurent Pinchart:
> > Hi Christoph,
> > 
> > (Philipp, there's a question for you at the end)
> 
> > On Thursday, 16 August 2018 15:48:15 EEST Christoph Fritz wrote:
> [...]
> 
> >>                         format->fcc = dev->forced_color_format;
> >>                         format->bpp = 8;
> >>                         width_multiplier = 2;
> > 
> > bpp and multiplier are more annoying. bpp is a property of the format,
> > which we could add to the uvc_fmts array.
> > 
> > I believe the multiplier could be computed by device bpp / bpp from
> > uvc_fmts. That would work at least for the Oculus VR Positional Tracker
> > DK2, but I don't have the Oculus VR Rift Sensor descriptors to check
> > that. Philipp, if you still have access to the device, could you send
> > that to me ?
> 
> Full lsusb -v output below, the UVC descriptors are not decoded because
> bFunctionClass is set to 255. The YUY2 uncompressed format descriptor
> looks like this:
> 
>                ___guidFormat__________________________________
> 1b 24 04 01 04 59 55 59 32 00 00 10 00 80 00 00 aa 00 38 9b 71 10 01 00 00
> 00 00 ^^
> so,                                           bBitsPerPixel == 16.

Thanks a lot, that's exactly the information I needed. We can thus compute the 
multiplier with something like

        if (dev->info->pixel_format) {
                fmtdesc = uvc_format_by_fourcc(dev->info->pixel_format);
                strlcpy(format->name, fmtdesc->name,
                        sizeof(format->name));
                format->fcc = fmtdesc->fcc;
                width_multiplier = format->bpp / fmtdesc->bpp;
                format->bpp = fmtdesc->bpp;
        }

(possibly with a better name for the pixel_format field)

-- 
Regards,

Laurent Pinchart

      reply	other threads:[~2018-08-18  0:54 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-21 11:26 [PATCH] uvcvideo: add quirk to force Phytec CAM 004H to GBRG Christoph Fritz
2018-02-21 19:37 ` Laurent Pinchart
2018-02-21 20:42   ` Christoph Fritz
2018-02-21 21:24     ` Laurent Pinchart
2018-08-06 23:14       ` Laurent Pinchart
2018-08-16 12:48         ` Christoph Fritz
2018-08-16 16:39           ` Laurent Pinchart
2018-08-17  7:09             ` Christoph Fritz
2018-08-17  8:49               ` Laurent Pinchart
2018-08-17  9:17                 ` [PATCH] media: uvcvideo: Store device information pointer in struct uvc_device Laurent Pinchart
2018-08-17 17:46             ` [PATCH] uvcvideo: add quirk to force Phytec CAM 004H to GBRG Philipp Zabel
2018-08-17 21:50               ` Laurent Pinchart [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2371417.kFLlxrCYBz@avalon \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=D.bender@phytec.de \
    --cc=chf.fritz@googlemail.com \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=n.wesp@phytec.de \
    --cc=philipp.zabel@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox