Optimize HD video playback at 30 FPS.

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

Optimize HD video playback at 30 FPS.

989 Views
ikshwaku_chauha
Contributor III

Hello Team,

We are trying to optimize HD video playback.

Rendering through the eglSwapBuffer() is a little slow, and if we create a texture of the size 1920*1080p, and render it using the GLES API, it takes more than 100ms to get the frame rendered callback. To make matters worse, the rendering happens through 3D GPU, and Weston is also using the 3D GPU to do composition.

 

 

We found out that cinemo uses a strategy to dowscale and do color space conversion of the video frames in 2D graphics unit, and finally renders by using wl_viv API.

 

I am able to downscale and do a color space conversion for Full HD frames at 30FPS, but for rendering it is not clear how to use the buffer from wl_viv API.

 

Ideally, the same physical memory offset that is used by 2D graphics unit to write the decoded frame, should be shared with the wayland surface. This should not need any memcpy operation. And there should be no need to use the 3D GPU to write to the surface.

 

wayland-viv-client-protocol.h has a create_buffer function, but there is no documentation on the parameters or example on how to use this function.

 

Can you please help us in getting some direction so that we can proceed further ?

Regards,

Ikshwaku

Labels (2)
Tags (2)
4 Replies

750 Views
Bio_TICFSL
NXP TechSupport
NXP TechSupport

Hello Ikshuwaku,

Sorry,  I am not sure what you want to ask after reading your post.

When you map video to texture, are you using glDirectTextMapVIV()?  Do you use the physical address from decoded frame?  it shouldn't be 100ms if you are using physical address to directly map. 

 

weston has both g2d(2D) and gles(3D) for compositor options, both should be hardware accelerated. You may refer to weston source code to learn how it handles created rendering buffers.  weston is open source.

regards

0 Kudos

750 Views
ikshwaku_chauha
Contributor III

Hello, 

Thanks for your reply.

When you map video to texture, are you using glDirectTextMapVIV()? Do you use the physical address from decoded frame?  

Yes, Sink Plugin uses glTextDirectVIVMap and The API requires both physical and virtual address.

We are facing less frame rate issue only for HD video playback. For lower resolution Frame rate is ok. 

That's way we wants to use wl_viv based rendering. so we are exploring the Wayland-viv-client-protocol apis, but not able to find any documentation for these apis. 

Could you please provide any reference or documentation where Wayland-viv client api's prototypes are explained or how to use them?

Regards,

Ikshwaku

0 Kudos

750 Views
Bio_TICFSL
NXP TechSupport
NXP TechSupport

1. I tried glTextDirectMap() myself, yes, the performance is not good for HD video, low resolution is OK.  I don't think it should be this low and video cannot play smoothly.

 

2. wayland and weston should be open source.  I don't have more documents than you do.  Weston code itself did graphics rendering, it may be as reference how to use wl_viv_based rendering.

regards

0 Kudos

750 Views
ikshwaku_chauha
Contributor III

Hello, 

2. wayland and weston should be open source.  I don't have more documents than you do.  Weston code itself did graphics rendering, it may be as reference how to use wl_viv_based rendering.

 

--> 

This statement is not accurate. The code for wl_viv based rendering with wayland API is not public, and is a part of imx-gpu-viv package. We have not been given the sources/documentation of this package..

Could you please help us in identifying the correct documentation for this.

Regards,

Ikshwaku 

0 Kudos