About the performance of MX8QM G2D

cancel
Showing results for 
Search instead for 
Did you mean: 

About the performance of MX8QM G2D

87 Views
RobbieJiang
Contributor IV

 

I need to use G2D  Blt Engine to handle image cropping and color space conversion on MX8QM/Linux BSP 5.4.

In my application, we have 2 CSI cameras which outputs video with 1920x1080@30fps, in YUYV format.

After getting each frame, we need to crop to 800x480 and convert to BGRA format.

Two threads are created to handle the following tasks for two different cameras:

Capture frame from camera (via dmabuf) -> G2D crop and CSC -> DRM display

Here is my core G2D code:

 

src.planes[0] = buf_y;

src.left = crop.left;

src.top = crop.top;

src.right = crop.right;

src.bottom = crop.bottom;

src.stride = y_stride;

src.width = y_width;//1920

src.height = y_height;//1080

src.rot = G2D_ROTATION_0;

src.format = G2D_YUYV;

 

dst.planes[0] = buf_rgba;

dst.left = 0;

dst.top = 0;

dst.right = disp_width; //800

dst.bottom = disp_height;//480

dst.stride = disp_width;

dst.width = disp_width;

dst.height = disp_height;

dst.rot = G2D_ROTATION_0;

dst.format = G2D_BGRA8888;

g2d_blit(handle, &src, &dst);

g2d_finish(handle); 

 

So I would like to know the performance of MX8QM 2D Blt Engine.

Can it deal with 120M Pixels/s with crop and CSC simultaneously?

 

Another question:

Is the G2D API thread-safe?

Should I use a mutex to protect g2d_blit() and g2d_finish() between 2 threads?

0 Kudos
2 Replies

69 Views
Bio_TICFSL
NXP TechSupport
NXP TechSupport

Hello RobbieJiang,

 

Yes, you can crop and csc at 120M pixels at the same time simultaneously, however the use of mutex can not be accomplish because the max layers of g2dblt don't let you put this.however is the API is thread safe you image can be secure.

Regards

0 Kudos

61 Views
RobbieJiang
Contributor IV

Hi Bio_TICFSL, 

 

Thanks for your reply.

However, there is something I do not understand.

"the use of mutex can not be accomplish because the max layers of g2dblt don't let you put this."

What does this exactly mean?

 

 

0 Kudos