video: Add support for linear 8x128 NV12 tiles and 10bit BE tiles
This adds linear 8x128 NV12 based tiles and NV12 10bit big endian tiles. These formats are used by i.MX 8QXP/8QM VPU and exposed in V4L2.
Signed-off-by: Ming Qian ming.qian@nxp.com
Merge request reports
Activity
1173 1173 cr_h = GST_ROUND_UP_2 (cr_h); 1174 1174 info->size = info->offset[1] + info->stride[0] * cr_h; 1175 1175 break; 1176 case GST_VIDEO_FORMAT_NV12_8L128: 1177 { 1178 gint ws = GST_VIDEO_FORMAT_INFO_TILE_WS (info->finfo); 1179 gint hs = GST_VIDEO_FORMAT_INFO_TILE_HS (info->finfo); 1180 gint ALIGN_W = 256; changed this line in version 2 of the diff
added 1 commit
- 551fb122 - video: Add support for linear 8x128 NV12 tiles and 10bit BE tiles
added 1 commit
- e86f47e7 - video: Add support for linear 8x128 NV12 tiles and 10bit BE tiles
134 134 * @GST_VIDEO_FORMAT_RGBP: planar 4:4:4 RGB, 8 bits per channel (Since: 1.20) 135 135 * @GST_VIDEO_FORMAT_BGRP: planar 4:4:4 RGB, 8 bits per channel (Since: 1.20) 136 136 * @GST_VIDEO_FORMAT_AV12: Planar 4:2:0 YUV with interleaved UV plane with alpha as 3rd plane (Since: 1.20) 137 * @GST_VIDEO_FORMAT_NV12_8L128 : NV12 with 8x128 tiles in linear order (Since: 1.20) 138 * @GST_VIDEO_FORMAT_NV12_10BE_8L128 : NV12 10bit big endian with 8x128 tiles in linear order (Since: 1.20) Can you extend on this format ? Other tiling format here are expressing in bytes, as the tiling is related to DMA transfer (so chunk size) rather then pixels. So I'm just guessing the tiles are still 1kB, what I'm missing is how the 10bit is padded.
In Microsoft style, P010, 6ytes per pixel would be used, so you'd have 4 pixels per tile rows. In RK variant, they would fully pack the data, 4 pixels per 40bit, but 8bytes would not work, it's not a multiple of 40bits/5bytes. In Xilinx variant, you'd place 3 pixels per 32bit, with 2bit padding, that would hold for 6 pixels. That's the type of info we are looking for.
Yes, you are right, for this 10 bit format, 4 pixels will take 5 bytes. and the tile width is 8 bytes. it not enough for 8 pixels. so for some pixel, the high bits and the low bits may in different tiles. For example, the high 4 bits of the 7th pixel is in the first tile, and the low 6bits of the 7th pixel is in the second tile. This is why the pack and unpack function of 10 bits tile format is not same as the 8 bit format, that I can't use PACK_NV12_TILED directly
VPU_memory_tiling_v0.3.06082015.pdf
the document of the tiling format is attached.
added 37 commits
-
e86f47e7...ce937bcb - 36 commits from branch
gstreamer:master
- 528d0fab - video: Add support for linear 8x128 NV12 tiles and 10bit BE tiles
-
e86f47e7...ce937bcb - 36 commits from branch
mentioned in merge request gstreamer!1379 (merged)
Moved to gstreamer!1379 (merged) (mono repo).