How use g2d to convert image data from yuv422 to yuv420?

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

How use g2d to convert image data from yuv422 to yuv420?

1,898 Views
zoechen
Contributor I

Hello everyone,

     I want to use g2d to convert my image data from yuv422 to yuv420, so I set it as follow:

src.format = G2D_UYVY;

    src.planes[0] = src_buf->buf_paddr;

    src.left = 0;

    src.top = 0;

    src.right = width;

    src.bottom = height;

    src.stride = width;

    src.width = width;

    src.height = height;

    src.rot = G2D_ROTATION_0;

    dst.format = G2D_I420;

    dst.planes[0] = dst_buf->buf_paddr;

    dst.planes[1] = dst_buf->buf_paddr + width + height;

    dst.planes[2] = dst_buf->buf_paddr + width + height * 2;

    dst.left = 0;

    dst.top = 0;

    dst.right = width;

    dst.bottom = height;

    dst.stride = width;

    dst.width = width;

    dst.height = height;

    dst.rot = G2D_ROTATION_0;

Then the log tell me "g2d_blit_2d: Invalid dst format 21!", whether g2d do not support yuv format as dst format?

BR,

Zoe

Labels (3)
0 Kudos
Reply
3 Replies

1,271 Views
weidong_sun
NXP TechSupport
NXP TechSupport

Hi Zoe,

    For linux 3.0.35, g2d only supports YUV to RGB output.

    For linux 3.10.xx g2d supports YUV422 & RGB output.

    But not support YUV422 to YUV420 output !!

Regards,

Weidong

0 Kudos
Reply

1,271 Views
saurabh206
Senior Contributor III

Hi weidong.sun

Does g2d able to do color space conversion from RGB24 to RGB565?

Thanks

Saurabh

0 Kudos
Reply

1,271 Views
zoechen
Contributor I

Dear WeiDong,

Thank you for your reply. I will convert it by software, thanks again!

BR,

Zoe

在 2015年08月05日 12:06, weidong.sun 写道:

>

Freescale Community

<http://jiveon.jivesoftware.com/mpss/c/mQA/PDcDAA/t.1pb/oW3Qhfz2THCtP8cdzBUsUQ/h0/eqhG5v9o4WV1pCmWaB03cUjBPgRj-2F3GoJUaXSZ409bQ-3D>

<http://jiveon.jivesoftware.com/mpss/c/mQA/PDcDAA/t.1pb/oW3Qhfz2THCtP8cdzBUsUQ/h0/eqhG5v9o4WV1pCmWaB03cUjBPgRj-2F3GoJUaXSZ409bQ-3D>

>

How use g2d to convert image data from yuv422 to yuv420?

reply from Weidong Sun

<http://jiveon.jivesoftware.com/mpss/c/mQA/PDcDAA/t.1pb/oW3Qhfz2THCtP8cdzBUsUQ/h1/eqhG5v9o4WV1pCmWaB03cUjBPgRj-2F3GoJUaXSZ409bS3y2vRYSrRHJMazAcdRM6i-2Btkrwe-2BRgT7FgRqTlIZbdO0dOiK5iPv1BjohgpaJFOk-3D>

in /i.MX Community/ - View the full discussion

<http://jiveon.jivesoftware.com/mpss/c/mQA/PDcDAA/t.1pb/oW3Qhfz2THCtP8cdzBUsUQ/h2/eqhG5v9o4WV1pCmWaB03cUjBPgRj-2F3GoJUaXSZ409bSazAlkkSPGNYtTVG36TNhVGxTCabsMtYboUuE6F3Y1keLLrkOQLEn0RzCpmVhBY4M-3D>

>

0 Kudos
Reply