New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 915051 link

Starred by 1 user

Issue metadata

Status: Untriaged
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Bug



Sign in to add a comment

minigbm [NV12, x86]: UVPlane's size is the same as YPlane's size

Project Member Reported by hiroh@chromium.org, Dec 14

Issue description

In NV12, UV Plane's size is half of Y Plane's size.
However, on x86, minigbm allocates UV Plane whose size is the same as Y Plane's size and gbm_bo_get_plane_size(bo, 1) returns Y Plane's size.
For example, in the case of NV12 on x86,
gbm_bo_get_plane_size(bo, 0): 138240
gbm_bo_get_plane_size(bo, 1): 138240

This is not critical issue, because seems like minigbm actually allocates the size on the second plane. 

Memory usage will be saved if this is fixed.
 
We have special alignment for i915:

https://chromium.googlesource.com/chromiumos/platform/minigbm/+/master/i915.c

What's the size dimensions of the buffer?  Also can you call gbm_bo_get_format_modifier so we can know which type of buffer it is?  That way we can tell if it's by design or a bug.

I cannot recall dimension right now.
I remember modifier was 0.
Components: OS>Kernel>Graphics
I thought we were doing this because of a limitation of intel hw...
If the modifier was 0, then we have I915_TILING_NONE


https://chromium.googlesource.com/chromiumos/platform/minigbm/+/master/i915.c#219

For that, we have libva alignment requirements.  hiroh@, can you get the width/height whenever you get the chance?  That'll let us do a back of the envelope calculation about this.

Sure. I observed it when I play video with SW decoder.
Let me check size on Monday.
I checked those values again.
When the size is (640, 360), format is YUV_420_BIPLANAR (i.e. NV12) and modifier is zero (i.e. non-tiled), the size of planes are,
1st: 230400
2nd: 230400
It's quite strange. I think we may need to do some printfs in minigbm, because my inspection of the code couldn't spot a way that would make the 2nd plane the same as 1st for this format and resolution.

Sign in to add a comment