Skip to content

Commit

Permalink
libcamera: pispbe: Use uppercase formats identifiers
Browse files Browse the repository at this point in the history
The mainline kernel driver uses uppercase for macros that
identify an image format.

Adjust the libcamera implementation to use the same ids.

Signed-off-by: Jacopo Mondi <[email protected]>
  • Loading branch information
Jacopo Mondi authored and naushir committed Jul 9, 2024
1 parent 396ea8c commit 0eb1861
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/libcamera/pipeline/rpi/pisp/pisp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1856,7 +1856,7 @@ int PiSPCameraData::configureCfe()
input.format = image;
input.format.format = PISP_IMAGE_FORMAT_BPS_16;

if (PISP_IMAGE_FORMAT_compressed(image.format)) {
if (PISP_IMAGE_FORMAT_COMPRESSED(image.format)) {
pisp_compress_config compress;
compress.offset = DefaultCompressionOffset;
compress.mode = (image.format & PISP_IMAGE_FORMAT_COMPRESSION_MASK) /
Expand Down Expand Up @@ -1935,7 +1935,7 @@ int PiSPCameraData::configureBe(const std::optional<ColorSpace> &yuvColorSpace)
global.bayer_order = toPiSPBayerOrder(cfeFormat.fourcc);

ispOutputTotal_ = 1; /* Config buffer */
if (PISP_IMAGE_FORMAT_compressed(inputFormat.format)) {
if (PISP_IMAGE_FORMAT_COMPRESSED(inputFormat.format)) {
pisp_decompress_config decompress;
decompress.offset = DefaultCompressionOffset;
decompress.mode = (inputFormat.format & PISP_IMAGE_FORMAT_COMPRESSION_MASK)
Expand Down Expand Up @@ -1999,7 +1999,7 @@ int PiSPCameraData::configureBe(const std::optional<ColorSpace> &yuvColorSpace)
be_->SetTdnOutputFormat(tdnFormat);
be_->SetTdnInputFormat(tdnFormat);

if (PISP_IMAGE_FORMAT_compressed(tdnFormat.format)) {
if (PISP_IMAGE_FORMAT_COMPRESSED(tdnFormat.format)) {
pisp_decompress_config tdnDecompress;
pisp_compress_config tdnCompress;

Expand All @@ -2018,7 +2018,7 @@ int PiSPCameraData::configureBe(const std::optional<ColorSpace> &yuvColorSpace)
be_->SetStitchOutputFormat(stitchFormat);
be_->SetStitchInputFormat(stitchFormat);

if (PISP_IMAGE_FORMAT_compressed(stitchFormat.format)) {
if (PISP_IMAGE_FORMAT_COMPRESSED(stitchFormat.format)) {
pisp_decompress_config stitchDecompress;
pisp_compress_config stitchCompress;

Expand Down

0 comments on commit 0eb1861

Please sign in to comment.