PXP to only resize a buffer

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

PXP to only resize a buffer

Jump to solution
1,395 Views
jose_au_zone
Contributor II

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:

Untitled.png

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!

Labels (1)
Tags (1)
0 Kudos
1 Solution
1,371 Views
jeremyzhou
NXP Employee
NXP Employee

Hi,
Thanks for your reply.
1) Is it possible to do just a resizing without color conversion on PXP?
-- No, I'm afraid not, as scaling, color space conversion, rotation is integrated into a single processing engine.
Have a great day,
TIC

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

View solution in original post

0 Kudos
4 Replies
1,362 Views
jose_au_zone
Contributor II

Ok thanks

0 Kudos
1,376 Views
jose_au_zone
Contributor II

Thank you for the reply. My goal was to not use use any software conversion, and let PXP do everything due to time constraints. Is it possible to do just a resizing without color conversion on PXP?

 

Thank you!

0 Kudos
1,372 Views
jeremyzhou
NXP Employee
NXP Employee

Hi,
Thanks for your reply.
1) Is it possible to do just a resizing without color conversion on PXP?
-- No, I'm afraid not, as scaling, color space conversion, rotation is integrated into a single processing engine.
Have a great day,
TIC

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos
1,386 Views
jeremyzhou
NXP Employee
NXP Employee

Hi,
Thank you for your interest in NXP Semiconductor products and for the opportunity to serve you.
I'd like to suggest you configure the sensor to output an RGB8888 format or use an algorithm code to convert RGB888 into RGB8888 prior to outputting the buffer data to the PXP engine
Have a great day,
TIC

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos