Skip to content
Snippets Groups Projects

video: Add support for linear 8x128 NV12 tiles and 10bit BE tiles

Closed ming qian requested to merge (removed):video_foramt_add_nv12_8l128 into master
3 unresolved threads

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

Edited by ming qian

Merge request reports

Checking pipeline status.

Closed by Nicolas DufresneNicolas Dufresne 3 years ago (Nov 23, 2021 4:30pm UTC)

Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
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;
    • Some more note, need to drop the Signed-of-by in the commit, as it's not use in this project. And you should add proper reference for the format, V4L2 doc if it exists yet, or IMX manual refernence, these can be publicly obtained in exchange of an name and email.

    • (references are needed for me to complete the code review, as I don't have anything to compare against, strict explanation of the format in the commit message would be needed otherwise)

    • Please register or sign in to reply
  • ming qian added 1 commit

    added 1 commit

    • 551fb122 - video: Add support for linear 8x128 NV12 tiles and 10bit BE tiles

    Compare with previous version

  • ming qian added 1 commit

    added 1 commit

    • e86f47e7 - video: Add support for linear 8x128 NV12 tiles and 10bit BE tiles

    Compare with previous version

  • 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

    • and I will attach the references document tomorrow, maybe it explains more clearly

    • Thanks a lot, and the overlap between tiles is important, I'll review the stride calculation accordingly. I'll try and review the pack/unpack code now that I actually understand that 10bit variant.

    • VPU_memory_tiling_v0.3.06082015.pdf

      the document of the tiling format is attached.

    • Please register or sign in to reply
  • ming qian added 37 commits

    added 37 commits

    • e86f47e7...ce937bcb - 36 commits from branch gstreamer:master
    • 528d0fab - video: Add support for linear 8x128 NV12 tiles and 10bit BE tiles

    Compare with previous version

  • mentioned in merge request gstreamer!1379 (merged)

  • Moved to gstreamer!1379 (merged) (mono repo).

  • Please register or sign in to reply
    Loading