Skip to content

Conversation

@6by9
Copy link
Contributor

@6by9 6by9 commented Feb 5, 2026

The 10bit column format from the HEVC codec is supported by the PISP BE, so add the configuration.
It requires some additional handling as it packs 3 10bit samples into 32 bits, with 2 bits of padding. Alignment and calculating strides is therefore not quite as straightforward.

The 10bit column format from the HEVC codec is supported by the
PISP BE, so add the configuration.
It requires some additional handling as it packs 3 10bit samples
into 32 bits, with 2 bits of padding. Alignment and calculating
strides is therefore not quite as straightforward.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
@6by9 6by9 requested a review from naushir February 5, 2026 19:00
*/
const unsigned int align =
p->bytesperline ? fmt->min_align : fmt->opt_align;
unsigned int pixel_grouping = fmt->pixel_grouping ?: 1;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will this type of statement be accepted upstream? It does the right thing with gcc, but is not standard C syntax.

Copy link
Contributor

@naushir naushir Feb 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Although there seems to be tons of this type of usage in other kernel source files.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Must be getting rusty - never seen that syntax before, had to look it up!

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Technically it is not C code. It's a gcc extension (that clang also supports).
But the kernel allows many gcc extensions and this idiom is commonly used.

@pelwell pelwell merged commit b96aacc into raspberrypi:rpi-6.18.y Feb 6, 2026
12 checks passed
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.

5 participants