移动了文件位置

This commit is contained in:
2026-04-18 09:16:58 +08:00
parent 2b49081589
commit 1575212f13
10236 changed files with 72 additions and 1436438 deletions

View File

@@ -0,0 +1,37 @@
/*
* hal_asw.h
*@brief hal asw header file.
*
* Copyright (c) 2012 Semidrive Semiconductor.
* All rights reserved.
*
* Description:
*
* Revision History:
* -----------------
* 2022/09/19 create this file
*/
#ifndef __HAL_ASW_H__
#define __HAL_ASW_H__
#include "hal_asw_define.h"
#include "hal_comm_define.h"
/* full buf stride, must align 8 bit */
int HAL_ASW_FillTriangle(const HAL_FillRatriaInfo *info);
/* full buf stride, must align 8 bit */
int HAL_ASW_FillRect(const HAL_FillRectInfo *info);
/* cpu copy, Multi-threading is not supported */
int HAL_ASW_Rotate(const HAL_RotateInfo *info);
int HAL_ASW_RotateEx(const HAL_RotateInfo *info);
/****************************************************
inner function
*****************************************************/
int ASW_Rotate(const ASW_RotateInfo *info);
#endif //__HAL_ASW_H__

View File

@@ -0,0 +1,32 @@
/*
* hal_asw_define.h
*@brief hal asw define header file.
*
* Copyright (c) 2012 Semidrive Semiconductor.
* All rights reserved.
*
* Description:
*
* Revision History:
* -----------------
* 2022/06/01 create this file
*/
#ifndef __HAL_ASW_DEFINE_H__
#define __HAL_ASW_DEFINE_H__
#include "hal_errno.h"
#include "hal_comm_define.h"
#define HAL_ASW_NOT_INIT HAL_GENERATE_ERRNO(HAL_MOD_ASW, HAL_ERRNO_NOT_INIT)
#define HAL_ASW_NULL_PTR HAL_GENERATE_ERRNO(HAL_MOD_ASW, HAL_ERRNO_NULL_PTR)
#define HAL_ASW_ERR_PARAM HAL_GENERATE_ERRNO(HAL_MOD_ASW, HAL_ERRNO_ERR_PARAM)
#define HAL_ASW_NOT_SUPPORT HAL_GENERATE_ERRNO(HAL_MOD_ASW, HAL_ERRNO_NOT_SUPPORT)
#define HAL_ASW_NO_MEM HAL_GENERATE_ERRNO(HAL_MOD_ASW, HAL_ERRNO_NO_MEM)
typedef struct {
HAL_RotateInfo rotate;
uint8_t *tmpBuf; /* tmp rect buf */
uint32_t tmpStride; /* tmp rect buf strde*/
} ASW_RotateInfo;
#endif // __HAL_ASW_DEFINE_H__

View File

@@ -0,0 +1,23 @@
/*
* hal_disp.h
*@brief hal disp header file.
*
* Copyright (c) 2012 Semidrive Semiconductor.
* All rights reserved.
*
* Description:
*
* Revision History:
* -----------------
* 2022/09/19 create this file
*/
#ifndef __HAL_DISP_H__
#define __HAL_DISP_H__
#include "hal_disp_define.h"
#include "hal_comm_define.h"
HAL_HANDLE HAL_DISP_GetHandle(HAL_DISP_ScreenType type);
int HAL_DISP_Post(HAL_HANDLE handle, const HAL_DISP_Info *info);
#endif // __HAL_DISP_H__

View File

@@ -0,0 +1,55 @@
/*
* hal_disp_define.h
*@brief hal disp define header file.
*
* Copyright (c) 2012 Semidrive Semiconductor.
* All rights reserved.
*
* Description:
*
* Revision History:
* -----------------
* 2022/09/19 create this file
*/
#ifndef __HAL_DISP_DEFINE_H__
#define __HAL_DISP_DEFINE_H__
#include "hal_errno.h"
#include "hal_comm_define.h"
#define HAL_DISP_NOT_INIT HAL_GENERATE_ERRNO(HAL_MOD_DISP, HAL_ERRNO_NOT_INIT)
#define HAL_DISP_NULL_PTR HAL_GENERATE_ERRNO(HAL_MOD_DISP, HAL_ERRNO_NULL_PTR)
#define HAL_DISP_ERR_PARAM HAL_GENERATE_ERRNO(HAL_MOD_DISP, HAL_ERRNO_ERR_PARAM)
#define HAL_DISP_NOT_SUPPORT HAL_GENERATE_ERRNO(HAL_MOD_DISP, HAL_ERRNO_NOT_SUPPORT)
#define HAL_DISP_WIN_MAX_CNT 2
#define HAL_DISP_YUVA_ADDR_CNT 4
typedef enum {
HAL_SCREEN_TYPE_CLUSTER = 0,
HAL_SCREEN_TYPE_BUTT
} HAL_DISP_ScreenType;
typedef struct {
uint32_t id;
int dirty;
int en;
HAL_Format fmt;
HAL_Rect src;
uint8_t *addr[HAL_DISP_YUVA_ADDR_CNT];//YUVA
uint32_t srcStride[HAL_DISP_YUVA_ADDR_CNT];
HAL_Rect dst;
int enCkey;
int ckey;
int enAlpha;
char alpha;
int zOrder;
int security;
} HAL_DISP_WindowInfo;
typedef struct {
uint32_t winCnt;
HAL_DISP_WindowInfo winInfo[HAL_DISP_WIN_MAX_CNT];
} HAL_DISP_Info;
#endif // __HAL_DISP_DEFINE_H__

View File

@@ -0,0 +1,33 @@
/*
* hal_g2dlite.h
*@brief hal g2dlite header file.
*
* Copyright (c) 2012 Semidrive Semiconductor.
* All rights reserved.
*
* Description:
*
* Revision History:
* -----------------
* 2022/06/01 create this file
*/
#ifndef __HAL_G2DLITE_H__
#define __HAL_G2DLITE_H__
#include "hal_g2dlite_define.h"
int HAL_G2DLITE_Init(void);
int HAL_G2DLITE_Deinit(void);
int HAL_G2DLITE_ClearRect(HAL_G2DLITE_OutputInfo *info);
int HAL_G2DLITE_BlendImg(const HAL_G2DLITE_BlendImgInfo *info);
int HAL_G2DLITE_BlendImgWithPd(const HAL_G2DLITE_BlendImgInfo *info, HAL_G2DLITE_PorterDuffInfo *pdInfo);
int HAL_G2DLITE_BlendRleImg(const HAL_G2DLITE_BlendImgInfo *info, HAL_G2DLITE_RleInfo *rleInfo);
int HAL_G2DLITE_BlendRleImgWithPd(const HAL_G2DLITE_BlendImgInfo *info, HAL_G2DLITE_RleInfo *rleInfo, HAL_G2DLITE_PorterDuffInfo *pdInfo);
int HAL_G2DLITE_BlendMask(const HAL_G2DLITE_BlendMaskInfo *info);
int HAL_G2DLITE_FillMask(const HAL_G2DLITE_FillMaskInfo *info);
int HAL_G2DLITE_FillTriangle(const HAL_FillRatriaInfo *triangle_info);
int HAL_G2DLITE_FillRect(const HAL_FillRectInfo *rect);
int HAL_G2DLITE_FastCopy(const HAL_G2DLITE_FastCopyInfo *src,
const HAL_G2DLITE_FastCopyInfo *dst);
#endif //__HAL_G2DLITE_H__

View File

@@ -0,0 +1,126 @@
/*
* hal_g2dlite_define.h
*@brief hal g2dlite define header file.
*
* Copyright (c) 2012 Semidrive Semiconductor.
* All rights reserved.
*
* Description:
*
* Revision History:
* -----------------
* 2022/09/23 create this file
*/
#ifndef __HAL_G2DLITE_DEFINE_H__
#define __HAL_G2DLITE_DEFINE_H__
#include "hal_errno.h"
#include "hal_comm_define.h"
#define HAL_G2DLITE_NOT_INIT HAL_GENERATE_ERRNO(HAL_MOD_G2DLITE, HAL_ERRNO_NOT_INIT)
#define HAL_G2DLITE_NULL_PTR HAL_GENERATE_ERRNO(HAL_MOD_G2DLITE, HAL_ERRNO_NULL_PTR)
#define HAL_G2DLITE_ERR_PARAM HAL_GENERATE_ERRNO(HAL_MOD_G2DLITE, HAL_ERRNO_ERR_PARAM)
#define HAL_G2DLITE_NOT_SUPPORT HAL_GENERATE_ERRNO(HAL_MOD_G2DLITE, HAL_ERRNO_NOT_SUPPORT)
typedef enum {
HAL_G2DLITE_RLE_IN_BG_SURFACE = 0, /* run-length encoding in the background surface */
HAL_G2DLITE_RLE_IN_FG_SURFACE, /* run-length encoding in the foreground surface */
HAL_G2DLITE_RLE_BUTT
} HAL_G2DLITE_RleSurfaceType;
typedef struct {
HAL_G2DLITE_RleSurfaceType rleType; /* run-length encoding type */
} HAL_G2DLITE_RleInfo;
/* porter duff blend mode */
typedef enum {
HAL_G2DLITE_PD_MODE_CLEAR = 0,
HAL_G2DLITE_PD_MODE_SRC,
HAL_G2DLITE_PD_MODE_DST,
HAL_G2DLITE_PD_MODE_SRC_OVER,
HAL_G2DLITE_PD_MODE_DST_OVER,
HAL_G2DLITE_PD_MODE_SRC_IN,
HAL_G2DLITE_PD_MODE_DST_IN,
HAL_G2DLITE_PD_MODE_SRC_OUT,
HAL_G2DLITE_PD_MODE_DST_OUT,
HAL_G2DLITE_PD_MODE_SRC_ATOP,
HAL_G2DLITE_PD_MODE_DST_ATOP,
HAL_G2DLITE_PD_MODE_XOR,
HAL_G2DLITE_PD_MODE_DARKEN,
HAL_G2DLITE_PD_MODE_LIGHTEN,
HAL_G2DLITE_PD_MODE_MULTIPLY,
HAL_G2DLITE_PD_MODE_SCREEN,
HAL_G2DLITE_PD_MODE_ADD,
HAL_G2DLITE_PD_MODE_OVERLAY,
HAL_G2DLITE_PD_MODE_SRC_SUB,
HAL_G2DLITE_PD_MODE_DES_SUB,
HAL_G2DLITE_PD_MODE_BUTT
} HAL_G2DLITE_PdMode;
typedef enum {
HAL_G2DLITE_PD_TYPE_SRC_IN_BG = 0, /* porter duff src in background surface */
HAL_G2DLITE_PD_TYPE_SRC_IN_FG, /* porter duff src in in the foreground surface */
HAL_G2DLITE_PD_TYPE_BUTT
} HAL_G2DLITE_PdSurfaceType;
typedef struct {
HAL_G2DLITE_PdMode pdMode; /* porter duff blend mode */
HAL_G2DLITE_PdSurfaceType pdType; /* porter duff type */
} HAL_G2DLITE_PorterDuffInfo;
typedef enum {
HAL_G2DLITE_BLEND_PIXEL_NONE = 0, /* Use of global alpha */
HAL_G2DLITE_BLEND_PIXEL_PREMULTI, /* Premultiply, alpha is already premultiplied into data. */
HAL_G2DLITE_BLEND_PIXEL_COVERAGE, /* Use of iamge alpha */
HAL_G2DLITE_BLEND_PIXEL_BUTT
} HAL_G2DLITE_BlendMode;
typedef struct {
uint8_t *buf; // surface buf addr
uint8_t alpha; // surface alpha
uint32_t stride; // surface buf stride
HAL_Format fmt; // surface format type
HAL_Rect srcRect; // surface source rect
HAL_Rect dstRect; // surface destination rect
HAL_G2DLITE_BlendMode blendMode; // surface blend mode
} HAL_G2DLITE_SurfaceInfo;
typedef struct {
uint8_t *buf; // output buf addr
uint32_t stride; // output rect buf stride
HAL_Format fmt; // output rect buf format
HAL_Rect dstRect; // Output to the area of the output rectangle
} HAL_G2DLITE_OutputInfo;
typedef struct {
HAL_G2DLITE_SurfaceInfo fgSurface; // need to synthetic the upper surface
HAL_G2DLITE_SurfaceInfo bgSurface; // need to synthesize the lower surface
HAL_G2DLITE_OutputInfo output; // outout rect info
} HAL_G2DLITE_BlendImgInfo;
typedef struct {
uint8_t *buf; // mask area buf
uint32_t color; // mask area color, ARGB888, A:bit[31:24], R:bit[23:16], G:bit[15:8], B:bit[7:0]
uint32_t stride; // mask area buf stride
HAL_Rect rect; // mask area
} HAL_G2DLITE_MaskInfo;
typedef struct {
HAL_G2DLITE_SurfaceInfo surfaceInfo; // need to synthetic the surface
HAL_G2DLITE_OutputInfo output; // outout area info
HAL_G2DLITE_MaskInfo maskInfo; // need to synthetic the mask area info
} HAL_G2DLITE_BlendMaskInfo;
typedef struct {
HAL_G2DLITE_OutputInfo output; // outout area info
HAL_G2DLITE_MaskInfo maskInfo; // need to synthetic the mask area info
} HAL_G2DLITE_FillMaskInfo;
typedef struct {
uint8_t *buf; // copy area buf addr
HAL_Format fmt; // copy area format
HAL_Rect rect; // copy region location
uint32_t stride; // copy area buf stride
} HAL_G2DLITE_FastCopyInfo;
#endif // __HAL_G2DLITE_DEFINE_H__

View File

@@ -0,0 +1,22 @@
/*
* hal_gpu.h
*@brief hal gpu header file.
*
* Copyright (c) 2012 Semidrive Semiconductor.
* All rights reserved.
*
* Description:
*
* Revision History:
* -----------------
* 2022/06/01 create this file
*/
#ifndef __HAL_GPU_H__
#define __HAL_GPU_H__
#include "hal_gpu_define.h"
int HAL_GPU_Rotate(const HAL_RotateInfo *info);
int HAL_GPU_RotateEx(const HAL_RotateInfo *info);
#endif //__HAL_GPU_H__

View File

@@ -0,0 +1,50 @@
/*hal_gpu_define.h
*@brief hal gpu define header file.
*
* Copyright (c) 2012 Semidrive Semiconductor.
* All rights reserved.
*
* Description:
*
* Revision History:
* -----------------
* 2022/09/19 create this file
*/
#ifndef __HAL_GPU_DEFINE_H__
#define __HAL_GPU_DEFINE_H__
#include "hal_errno.h"
#include "hal_comm_define.h"
#define HAL_GPU_NOT_INIT HAL_GENERATE_ERRNO(HAL_MOD_GPU, HAL_ERRNO_NOT_INIT)
#define HAL_GPU_NULL_PTR HAL_GENERATE_ERRNO(HAL_MOD_GPU, HAL_ERRNO_NULL_PTR)
#define HAL_GPU_ERR_PARAM HAL_GENERATE_ERRNO(HAL_MOD_GPU, HAL_ERRNO_ERR_PARAM)
#define HAL_GPU_NOT_SUPPORT HAL_GENERATE_ERRNO(HAL_MOD_GPU, HAL_ERRNO_NOT_SUPPORT)
#define HAL_GPU_NO_MEM HAL_GENERATE_ERRNO(HAL_MOD_GPU, HAL_ERRNO_NO_MEM)
/************old define*************/
typedef struct {
uint8_t * buf; /* tmp buf for rotation */
int buf_len; /* tmp buf len for rotation */
} aswlite_rotate_buf;
typedef struct {
int src_x;
int src_y;
int src_w;
int src_h;
uint8_t *src_buf;
int src_fmt;
int src_stride;
uint8_t *dst_buf;
int dst_fmt;
int dst_w;
int dst_h;
int dst_stride;
double angle;
int bg_color;
} hal_asw_rotate_info;
#endif // __HAL_GPU_DEFINE_H__

View File

@@ -0,0 +1,25 @@
/*
* hal_sys.h
*@brief hal sys header file.
*
* Copyright (c) 2012 Semidrive Semiconductor.
* All rights reserved.
*
* Description:
*
* Revision History:
* -----------------
* 2022/09/19 create this file
*/
#ifndef __HAL_SYS_H__
#define __HAL_SYS_H__
#include "hal_sys_define.h"
#include "hal_comm_define.h"
int HAL_SYS_CleanCacheRange(const HAL_SYS_CacheInfo *info);
int HAL_SYS_InvalidateCacheRange(const HAL_SYS_CacheInfo *info);
int HAL_SYS_CleanInvalidateCacheRange(const HAL_SYS_CacheInfo *info);
void HAL_SYS_CleanInvalidateCacheAll(void);
#endif //__HAL_SYS_H__

View File

@@ -0,0 +1,32 @@
/*
* hal_sys_define.h
*@brief hal sys define header file.
*
* Copyright (c) 2012 Semidrive Semiconductor.
* All rights reserved.
*
* Description:
*
* Revision History:
* -----------------
* 2022/09/19 create this file
*/
#ifndef __HAL_SYS_DEFINE_H__
#define __HAL_SYS_DEFINE_H__
#include "hal_errno.h"
#include "hal_comm_define.h"
#define HAL_SYS_NOT_INIT HAL_GENERATE_ERRNO(HAL_MOD_SYS, HAL_ERRNO_NOT_INIT)
#define HAL_SYS_NULL_PTR HAL_GENERATE_ERRNO(HAL_MOD_SYS, HAL_ERRNO_NULL_PTR)
#define HAL_SYS_ERR_PARAM HAL_GENERATE_ERRNO(HAL_MOD_SYS, HAL_ERRNO_ERR_PARAM)
#define HAL_SYS_NOT_SUPPORT HAL_GENERATE_ERRNO(HAL_MOD_SYS, HAL_ERRNO_NOT_SUPPORT)
typedef struct {
uint8_t *buf; /* cache buf addr */
HAL_Rect rect; /* clean cache rect */
HAL_Format fmt; /* cache format */
uint32_t stride; /* cache buf format */
} HAL_SYS_CacheInfo;
#endif // __HAL_SYS_DEFINE_H__