How to activate IC resizer

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

How to activate IC resizer

1,032 Views
dmatteazzi
Contributor I

Hi to all,

I'm trying to activate the resizer hardware of the i.mx6 Dual. I can't understand how to do that.

I'm using kernel 4.9.11 and it's not possible for me to update it. So I'm trying to manipulate driver for my purpose.

I use an external camera connected con CSI0. It works fine. I would to resize from 1920x1080 to 640x360 i.e. 3:1 ratio.

The camera format is YUYV 4:2:2. I suppose I should use postprocessing of the IC, but I'm not sure. I set the IC_PP_RSC register. I set the value 2 into CSI_SENS_CONF_DATA field of the CSI_SENS_CONF register. But nothing happens. I suppose I should activate some IDMAC channels. 

Please help me.

Thanks in advance.

Labels (3)
0 Kudos
6 Replies

876 Views
denismatteazzi
Contributor I

I have parked the project for a while, but now I'm retrying to use the hw to resize the image captured from the csi. I can't use gstreamer, but what I want to do is to obtain a resized image directly from the imx. For me it's not clear what to do and I can't find any example. I think it is similar to the rotation. So, I think, I should set the resize coefficient and the downsize coefficient. And then? Should I redirect and enable idmac channel? But which?

Is there a more detailed explanation of the preprocessing and post processing processes? 

0 Kudos

876 Views
igorpadykov
NXP Employee
NXP Employee

Hi Denis

one can look at resize example on

resizing\mx6 - ipu-examples - i.MX IPU Examples 

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

876 Views
denism
Contributor I

Hi igorpadykiv,

I tried to use the /dev/mxc_ipu but when I do ioctl whith IPU_ALLOC I receive a message like this:

Inappropriate ioctl for device

0 Kudos

876 Views
denism
Contributor I

Hi.

I saw the example. Interesting

Thanks for your answer but in the example it is necessary to open a device (mxc_cpu) and send to it the raw image.

What I would to do is to connect CSI to IC, resize the image, and then read the image. 

0 Kudos

876 Views
igorpadykov
NXP Employee
NXP Employee

there are also example in baremetal sdk (1.1.0_iMX6_Platform_SDK.zip) available on

SMP Enable in IMX6 

Description can be found in sect.18.10.4 Image resizing example iMX6_Firmware_Guide.pdf

included in package.

Gstreamer examples : sect. 7.3.15 Video conversion Linux Guide included in

Linux 4.19.35_1.1.0 Documentation

Best regards
igor

0 Kudos

876 Views
dmatteazzi
Contributor I

I try this function:

void ipu_ic_init_pp (struct ipu_soc *ipu, uint32_t original_width,
                                uint32_t original_height,
                                uint32_t destination_width,
                                uint32_t destination_height,
                                uint32_t pixel_format)
{
    ipu_channel_params_t params;

    params.mem_pp_mem.outv_resize_ratio = 0;
    params.mem_pp_mem.outh_resize_ratio = 0;
    params.mem_pp_mem.in_height = original_height;
    params.mem_pp_mem.out_height = destination_height;
    params.mem_pp_mem.in_width = original_width;
    params.mem_pp_mem.out_width = destination_width;
    params.mem_pp_mem.in_pixel_fmt = pixel_format;
    params.mem_pp_mem.out_pixel_fmt = pixel_format;
    params.mem_pp_mem.graphics_combine_en = false;
    params.mem_pp_mem.global_alpha_en = false;
    params.mem_pp_mem.key_color_en = false;

    _ipu_ic_init_pp (ipu, &params);
}

But nothing changed.

0 Kudos