Problem with IPU : Rotation by 90 and 270 degree

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Problem with IPU : Rotation by 90 and 270 degree

1,478件の閲覧回数
rinkeshpatel
Contributor II

We are using i.MX6 SabreSD Dual board.

We are trying to perform captured frames using IPU.

We are working on resolutions 720p and 1080p.

We tried both capture(V4L2_CID_MXC_ROT) and display(V4L2_CID_ROTATE) IOCTLs for rotation. But rotation is only possible for 180 and 0 degree.

Where as we are getting below error while doing rotation of 90 and 270 degrees.

mxc_v4l2_output mxc_v4l2_output.0: display work fail ret = -22.

we observed that IPU rotation(90 and 270 degree) works fine for VGA resolution but not for 720p and 1080p.

Can you please suggest any possible approach?

0 件の賞賛
4 返答(返信)

917件の閲覧回数
binjiao
Contributor I

Hi Rinkesh Patel

0 件の賞賛

917件の閲覧回数
rinkeshpatel
Contributor II

Hi,

According to below analysis, it seems like IPU doesn't support all 90 degree related rotations(90=90Right,270=90Left,etc. mentioned below).

/* ipu.h */

typedef enum {

    IPU_ROTATE_NONE = 0,

    IPU_ROTATE_VERT_FLIP = 1,

    IPU_ROTATE_HORIZ_FLIP = 2,

    IPU_ROTATE_180 = 3,

    IPU_ROTATE_90_RIGHT = 4,

    IPU_ROTATE_90_RIGHT_VFLIP = 5,

    IPU_ROTATE_90_RIGHT_HFLIP = 6,

    IPU_ROTATE_90_LEFT = 7,

} ipu_rotate_mode_t;

After debugging calling sequence, below are the observations. Please refer NOTE for more detail.

mxc_vout.c

mxc_vidioc_s_crop()->mxc_vout_try_task()->ipu_try_task()->ipu_check_task()

ipu_device.c

ipu_check_task()->check_task()->update_split_setting()

NOTE :

1) mxc_vidioc_s_crop is being called when ioctl VIDIOC_S_CROP is invoked from application

2) Update_split_setting() is being called if crop width or crop height is > 1024

3) Inside update_split_setting(), at the start of function if requested rotation in case of split(i.e. crop width/height is greater than 1024) is related to 90degree, then error IPU_CHECK_ERR_SPLIT_WITH_ROT is returned. Refer below code.

/* ipu_device.c */

static int update_split_setting(struct ipu_task_entry *t, bool vdi_split)

{

    :

    if (t->output.rotate >= IPU_ROTATE_90_RIGHT)

        return IPU_CHECK_ERR_SPLIT_WITH_ROT;

    :

}

Please provide suggestions on below query

1) Is above understanding correct?

2) Is it feasible to modify driver to support 90 degree rotation for resolution above 1024X1024?

3) Are there any hardware IPU limitations due to which 90 degree rotation is not achievable above 1024X1024 resolution?

0 件の賞賛

917件の閲覧回数
alejandrolozan1
NXP Employee
NXP Employee

Hi,

I.MX6 IPU does not support rotation (limitation of IC module) above 1024x1024,

so one needs to split image on smaller areas and rotate them, after that

combine to whole image. Unfortunately I lack of an example like that.

/Alejandro

0 件の賞賛

917件の閲覧回数
binjiao
Contributor I

Hi

0 件の賞賛