PXP to only resize a buffer

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

PXP to only resize a buffer

跳至解决方案
1,846 次查看
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!

标签 (1)
标记 (1)
0 项奖励
回复
1 解答
1,822 次查看
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 项奖励
回复
4 回复数
1,813 次查看
jose_au_zone
Contributor II

Ok thanks

0 项奖励
回复
1,827 次查看
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 项奖励
回复
1,823 次查看
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 项奖励
回复
1,837 次查看
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 项奖励
回复