Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Pekka Paalanen <ppaalanen@gmail.com>
To: Maxime Ripard <maxime@cerno.tech>
Cc: igt-dev@lists.freedesktop.org, Petri Latvala <petri.latvala@intel.com>
Subject: Re: [igt-dev] [PATCH i-g-t v2 4/8] lib/igt_frame: Add function to dump frames in RGB and raw
Date: Thu, 5 May 2022 10:21:11 +0300	[thread overview]
Message-ID: <20220505102111.3a29571d@eldfell> (raw)
In-Reply-To: <20220504145631.jau23ekng6zdzhv4@houat>

[-- Attachment #1: Type: text/plain, Size: 2453 bytes --]

On Wed, 4 May 2022 16:56:31 +0200
Maxime Ripard <maxime@cerno.tech> wrote:

> Hi Pekka,
> 
> Thanks for reviewing those patches
> 
> On Fri, Apr 29, 2022 at 03:46:45PM +0300, Pekka Paalanen wrote:
> > On Mon, 28 Mar 2022 16:55:05 +0200
> > Maxime Ripard <maxime@cerno.tech> wrote:
> >   
> > > The igt_write_frame_to_png() already allows to dump the content of a
> > > cairo surface into a PNG image. However, it can be useful to have the
> > > raw content of the buffer as well, so let's create a function that will
> > > dump both a PNG image and its raw buffer.
> > > 
> > > Signed-off-by: Maxime Ripard <maxime@cerno.tech>  
> > 
> > Hi,
> > 
> > when exactly is the raw dump useful? Do you need it for checking alpha?
> > Or for YUV formats? Or for multi-planar formats? Or for greater than 8
> > bpc or floating point formats?  
> 
> Anything, really :)
> 
> When I started debugging this, the only feedback I got from IGT was the
> hash it computed from the image, which isn't particularly useful for
> debugging.
> 
> > How do you make use of the raw dump?  
> 
> I'm using http://rawpixels.net/
> 
> > PNG can store alpha channel as well, and if that's not convenient
> > alongsize RGB, you could save another image where alpha has been
> > converted to gray scale.
> > 
> > PNG can also go up to 16 bpc I think?
> > 
> > PAM file format (netpbm type P7) might also be an option, looks like it
> > can do up to RGBA 16 bpc, and is trivial to generate.
> > http://netpbm.sourceforge.net/doc/pam.html
> > 
> > It's not much different from a raw dump, but contains enough metadata
> > for tools to understand the image.  
> 
> TIL :)
> 
> But I'd assume all those formats are still RGB, right? So if we ever go
> to check other formats, we'll get back into the same situation.

Yes, they are all RGB(A).

I think you have to get rid of Cairo first, before non-RGB can even be
a problem in file saving.

Cairo does not even do 16 bpc RGB(A):
https://www.cairographics.org/manual/cairo-Image-Surfaces.html#cairo-format-t
It only goes up to 10 bpc.

> That being said, I don't have a strong opinion for that patch (and the
> next one). I've found it to be useful when debugging, but I'd definitely
> understand if that's not something we want in IGT.

I'm not opposing this patch, I just wanted to know how it's useful.
Something to add to the commit message maybe?


Thanks,
pq

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2022-05-05  7:21 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-28 14:55 [igt-dev] [PATCH i-g-t v2 0/8] Writeback fixes and improvements Maxime Ripard
2022-03-28 14:55 ` [igt-dev] [PATCH i-g-t v2 1/8] lib/igt_frame: Rename summary fd variable Maxime Ripard
2022-03-28 14:55 ` [igt-dev] [PATCH i-g-t v2 2/8] lib/igt_frame: Move frame dump logging to function Maxime Ripard
2022-03-28 14:55 ` [igt-dev] [PATCH i-g-t v2 3/8] lib/igt_frame: Move frame path creation " Maxime Ripard
2022-03-28 14:55 ` [igt-dev] [PATCH i-g-t v2 4/8] lib/igt_frame: Add function to dump frames in RGB and raw Maxime Ripard
2022-04-29 12:46   ` Pekka Paalanen
2022-05-04 14:56     ` Maxime Ripard
2022-05-05  7:21       ` Pekka Paalanen [this message]
2022-03-28 14:55 ` [igt-dev] [PATCH i-g-t v2 5/8] tests/kms_writeback: Use endianness accessor to fill pixels Maxime Ripard
2022-03-28 14:55 ` [igt-dev] [PATCH i-g-t v2 6/8] tests/kms_writeback: Dump the frames if the don't match Maxime Ripard
2022-04-29 12:55   ` Pekka Paalanen
2022-05-04 14:57     ` Maxime Ripard
2022-03-28 14:55 ` [igt-dev] [PATCH i-g-t v2 7/8] lib/igt_fb: Ignore the X component when computing CRC Maxime Ripard
2022-04-29 12:58   ` Pekka Paalanen
2022-03-28 14:55 ` [igt-dev] [PATCH i-g-t v2 8/8] tests/kms_writeback: Use a garbage X value to create fill our test buffer Maxime Ripard
2022-04-29 13:01   ` Pekka Paalanen
2022-03-28 16:07 ` [igt-dev] ✓ Fi.CI.BAT: success for Writeback fixes and improvements (rev2) Patchwork
2022-03-28 19:08 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
2022-03-30  7:30   ` Maxime Ripard

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=20220505102111.3a29571d@eldfell \
    --to=ppaalanen@gmail.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=maxime@cerno.tech \
    --cc=petri.latvala@intel.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