Hello!
Is it possible to use PXP to only resize an image? Without any color conversion?
Right now I'm using PXP to get data from a 10626 sensor (YUV to RGB888). That part is fine.
But I need access to that RGB888 image buffer, so I am using that buffer and then trying to configure PXP again just to do a resize, but I'm getting wrong results
The output buffer config of the first step (from camera to RGB888) is configured like this:
/* PS configure. */
const pxp_output_buffer_config_t outputBufferConfig = {
.pixelFormat = kPXP_OutputPixelFormatRGB888P,
.interlacedMode = kPXP_OutputProgressive,
.buffer0Addr = (uint32_t) camera_buffer_rgb24,
.buffer1Addr = 0U,
.pitchBytes = cameraWidth * 3,
.width = cameraWidth,
.height = cameraHeight,
};
This works fine! Now I want to just resize that buffer, so the second stage is configured like this:
Output buffer config:
/* PS configure. */
const pxp_output_buffer_config_t outputBufferConfig = {
.pixelFormat = kPXP_OutputPixelFormatRGB888P,
.interlacedMode = kPXP_OutputProgressive,
.buffer0Addr = (uint32_t) input_buffer,
.buffer1Addr = 0U,
.pitchBytes = output_size * 3,
.width = output_size,
.height = output_size,
};
Input buffer config (from the output of the first stage [YUV to RGB888]):
/* PS config. */
inputBufferConfig.pixelFormat = kPXP_PsPixelFormatRGB888;
inputBufferConfig.bufferAddrU = 0U;
inputBufferConfig.bufferAddrV = 0U;
inputBufferConfig.bufferAddr = (uint32_t) camera_buffer_rgb24;
inputBufferConfig.pitchBytes = cameraWidth * 3;
inputBufferConfig.swapByte = false;
But the output image is in greyscale (should be colored) and its shifted like in the following picture:

One thing that I noticed is that the enum _pxp_ps_pixel_format doesn't have the an RGB888 packed format, it only has the kPXP_PsPixelFormatRGB888 format which is unpacked (opposed to the enum _pxp_output_pixel_format which has the format kPXP_OutputPixelFormatRGB888P which is packed)
Any input will be greatly appreciated!
Thanks!