Skip to content

Examples to use Rockchip RK3588s RGA2-E/RGA3 platform.

Notifications You must be signed in to change notification settings

sravansenthiln1/rga-demos

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rockchip RGA Demos

Examples to use Rockchip RK3588s RGA2-E/RGA3 platform.

Compatible with Edge2

Check device driver version

sudo cat /sys/kernel/debug/rkrga/driver_version

Try Examples:

  • RGA info - Simple diagnostic info about system RGA

  • RGA copy - Copy a RGA image in virtual memory address

  • RGA dmaheap - Copy a RGA image stored in a dma-heap

  • RGA dmabuf - Copy a RGA image stored in a dma-buf

  • RGA crop - Crop into an RGA image

  • RGA rotate - Rotate an RGA image

  • RGA resize - Resize an RGA image

  • RGA cvt - Converts RGA image from RGB888 to NV12 color format.

  • RGA blend - Perform alpha blend of filter over RGA image.

  • RGA draw - Draw rectangles over an RGA image.

Docs

Operation capability

Version Codename Chip Source Destination Function Pixels/Cycle
min max min max
RGA2-Enhance Orion RK3588 2x2 8192x8192 2x2 4096x4096 90/180/270 Rotate
X/Y Mirror
Crop
1/16~16 scale
Alpha blend
Color key
Color fill
Color palette
ROP
NN quantize
IOMMU (32bit)
2
RGA3 Orion RK3588 68x2 8176x8176 68x2 8128x8128 90/180/270 Rotate
X/Y Mirror
Crop
1/8~8 scale
Alpha blend
Color key
FBC
IOMMU (40bit)
3 (by pass)
2 (scale)

Image format capability

  • Conversion with RK3588 possible under BT.601/BT.709/BT.2020(only RGA3)
Version Codename Chip Input Data Format Output Data Format
RGA3 Orion RK3588 RK_FORMAT_RGBA_8888
RK_FORMAT_BGRA_8888
RK_FORMAT_ARGB_8888
RK_FORMAT_ABGR_8888
RK_FORMAT_RGBX_8888
RK_FORMAT_BGRX_8888
RK_FORMAT_XRGB_8888
RK_FORMAT_XBGR_8888
RK_FORMAT_RGB_888
RK_FORMAT_BGR_888
RK_FORMAT_RGB_565
RK_FORMAT_BGR_565
RK_FORMAT_YCbCr_420_SP
RK_FORMAT_YCrCbr_420_SP
RK_FORMAT_YCbCr_422_SP
RK_FORMAT_YCrCbr_422_SP
RK_FORMAT_YUYV_422
RK_FORMAT_YVYU_422
RK_FORMAT_UYVY_422
RK_FORMAT_VYUY_422
RK_FORMAT_YCbCr_420_SP_10B
RK_FORMAT_YCrCb_420_SP_10B
RK_FORMAT_YCbCr_422_SP_10B
RK_FORMAT_YCrCb_422_SP_10B
RK_FORMAT_RGBA_8888
RK_FORMAT_BGRA_8888
RK_FORMAT_RGBX_8888
RK_FORMAT_BGRX_8888
RK_FORMAT_RGB_888
RK_FORMAT_BGR_888
RK_FORMAT_RGB_565
RK_FORMAT_BGR_565
RK_FORMAT_YCbCr_420_SP
RK_FORMAT_YCrCbr_420_SP
RK_FORMAT_YCbCr_422_SP
RK_FORMAT_YCrCbr_422_SP
RK_FORMAT_YUYV_422
RK_FORMAT_YVYU_422
RK_FORMAT_UYVY_422
RK_FORMAT_VYUY_422
RK_FORMAT_YCbCr_420_SP_10B
RK_FORMAT_YCrCb_420_SP_10B
RK_FORMAT_YCbCr_422_SP_10B
RK_FORMAT_YCrCb_422_SP_10B

Byte alignment requirement

Version Byte Stride Format Alignment
RGA2_Enhance 4 RK_FORMAT_RGBA_8888
RK_FORMAT_BGRA_8888
RK_FORMAT_ARGB_8888
RK_FORMAT_ABGR_8888
RK_FORMAT_RGBX_8888
RK_FORMAT_BGRX_8888
RK_FORMAT_XRGB_8888
RK_FORMAT_XBGR_8888
Width stride does not require alignment
RK_FORMAT_RGBA_4444
RK_FORMAT_BGRA_4444
RK_FORMAT_ARGB_4444
RK_FORMAT_ABGR_4444
RK_FORMAT_RGBA_5551
RK_FORMAT_BGRA_5551
RK_FORMAT_ARGB_5551
RK_FORMAT_ABGR_5551
RK_FORMAT_RGB_565
RK_FORMAT_BGR_565
Width stride must be 2-aligned
RK_FORMAT_YUYV_422
RK_FORMAT_YVYU_422
RK_FORMAT_UYVY_422
RK_FORMAT_VYUY_422
RK_FORMAT_YUYV_420
RK_FORMAT_YVYU_420
RK_FORMAT_UYVY_420
RK_FORMAT_VYUY_420
Width stride must be 2-aligned, x_offset, y_offset, width, height, height stride must be 2-aligned
RK_FORMAT_RGB_888
RK_FORMAT_BGR_888
Width stride must be 4-aligned
RK_FORMAT_YCbCr_420_SP
RK_FORMAT_YCrCbr_420_SP
RK_FORMAT_YCbCr_422_SP
RK_FORMAT_YCrCbr_422_SP
RK_FORMAT_YCbCr_420_P
RK_FORMAT_YCrCbr_420_P
RK_FORMAT_YCbCr_422_P
RK_FORMAT_YCrCbr_422_P
RK_FORMAT_YCbCr_400
RK_FORMAT_Y4
Width stride must be 4-aligned, x_offset, y_offset, width, height, height stride must be 2-aligned
RK_FORMAT_YCbCr_420_SP_10B
RK_FORMAT_YCrCb_420_SP_10B
RK_FORMAT_YCbCr_422_SP_10B
RK_FORMAT_YCrCb_422_SP_10B
Width stride must be 16-aligned, x_offset, y_offset, width, height, height stride must be 2-aligned
RGA3 16 RK_FORMAT_RGBA_8888
RK_FORMAT_BGRA_8888
RK_FORMAT_ARGB_8888
RK_FORMAT_ABGR_8888
RK_FORMAT_RGBX_8888
RK_FORMAT_BGRX_8888
RK_FORMAT_XRGB_8888
RK_FORMAT_XBGR_8888
Width stride must be 4-aligned
RK_FORMAT_RGB_565
RK_FORMAT_BGR_565
Width stride must be 8-aligned
RK_FORMAT_YUYV_422
RK_FORMAT_YVYU_422
RK_FORMAT_UYVY_422
RK_FORMAT_VYUY_422
Width stride must be 8-aligned, x_offset, y_offset, width, height, height stride must be 2-aligned
RK_FORMAT_RGB_888
RK_FORMAT_BGR_888
Width stride must be 16-aligned
RK_FORMAT_YCbCr_420_SP
RK_FORMAT_YCrCbr_420_SP
RK_FORMAT_YCbCr_422_SP
RK_FORMAT_YCrCbr_422_SP
Width stride must be 16-aligned, x_offset, y_offset, width, height, height stride must be 2-aligned
RK_FORMAT_YCbCr_420_SP_10B
RK_FORMAT_YCrCb_420_SP_10B
RK_FORMAT_YCbCr_422_SP_10B
RK_FORMAT_YCrCb_422_SP_10B
Width stride must be 64-aligned, x_offset, y_offset, width, height, height stride must be 2-aligned
FBC mode In addition to the format alignment requirements above, width stride, height stride must be 16-aligned
TILE8*8 mode In addition to the format alignment requirements above, width, height must be 8-aligned, input channel width stride, height stride must be 16-aligned

About

Examples to use Rockchip RK3588s RGA2-E/RGA3 platform.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published