Skip to content

Conversation

njhollinghurst
Copy link
Collaborator

Changes to add RGBX support to the convert utility, including the workaround for RGBX output, even when Backend minor version is 0 (i.e. on BCM2712C1).

For clarity I have split this into 4 commits.

  • The first two add RGBX8888 support in general, to utilities and convert respectively.
  • The last two commits contain the hack for MINOR_VERSION == 0.

By analogy with our existing "RGB888", define "RGBX8888" to be
RGBX in byte address order, i.e. V4L2-style rather than DRM-style.
This implies that the ORDER_SWAPPED flag should not be set.

These strings are private to libpisp and mostly used only by convert.

Signed-off-by: Nick Hollinghurst <[email protected]>
We also check if the hardware platform supports this.

Signed-off-by: Nick Hollinghurst <[email protected]>
This is largely a hack to support scaling by a factor of exactly 2;
but nothing bad seems to happen when it is allowed (given we have a
2-pix-per-cycle ISP it's no more objectionable than odd-width 444).

Signed-off-by: Nick Hollinghurst <[email protected]>
@njhollinghurst
Copy link
Collaborator Author

@naushir Not sure if this is worth merging -- it may conflict with work you are doing...

@njhollinghurst njhollinghurst marked this pull request as ready for review August 1, 2025 11:49
By doubling the width, changing the output format to "UYVY" and
applying a matrix to swap the first two colour components, we
can output RGBX. The gotcha is that when downscaling, this can
result in an oversharp/aliasy image.

No support for RGBX input (though that would theoretically be
possible at unity scale, using a customized Resample kernel).

Signed-off-by: Nick Hollinghurst <[email protected]>
@njhollinghurst njhollinghurst merged commit 69d2084 into raspberrypi:main Aug 4, 2025
5 of 7 checks passed
@njhollinghurst njhollinghurst deleted the convert-rgbx branch August 4, 2025 12:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants