修复摄像头、科大讯飞、rcsp、彩屏仓等相关测试问题;

This commit is contained in:
huxi
2025-12-10 09:40:24 +08:00
parent bc195654bf
commit 719f612ab5
84 changed files with 3520 additions and 178 deletions
@@ -92,7 +92,7 @@ u8 ntp_client_get_time_status(void);
When it succeed, it will post the net_event NET_NTP_GET_TIME_SUCC and set the ntp_client_time_status to 1.
*/
/*----------------------------------------------------------------------------*/
void ntp_client_get_time(const char *host);
int ntp_client_get_time(const char *host);
@@ -144,9 +144,6 @@ extern "C" {
#else
/* For size_t */
#include <stddef.h>
extern void *mbedtls_calloc(size_t n, size_t size);
extern void mbedtls_free(void *ptr);
/**
* \brief This function dynamically sets the memory-management
* functions used by the library, during runtime.
@@ -161,8 +158,25 @@ int mbedtls_platform_set_calloc_free(void *(*calloc_func)(size_t, size_t),
#endif /* MBEDTLS_PLATFORM_FREE_MACRO && MBEDTLS_PLATFORM_CALLOC_MACRO */
#else /* !MBEDTLS_PLATFORM_MEMORY */
extern void *jl_mbedtls_calloc(unsigned long count, unsigned long size);
extern void jl_mbedtls_free(void *pv);
__attribute__((weak))
void jl_mbedtls_free(void *pv)
{
if (pv != NULL) {
free(pv);
}
}
__attribute__((weak))
void *jl_mbedtls_calloc(unsigned long count, unsigned long size)
{
size_t total = count * size;
void *p = malloc(total);
if (p) {
memset(p, 0, total);
}
return p;
}
#define mbedtls_free jl_mbedtls_free
#define mbedtls_calloc jl_mbedtls_calloc
#endif /* MBEDTLS_PLATFORM_MEMORY && !MBEDTLS_PLATFORM_{FREE,CALLOC}_MACRO */
@@ -166,5 +166,18 @@ int websockets_serv_socket_hanshack(struct websocket_struct *websockets_info);
int websockets_serv_socket_init(struct websocket_struct *websockets_info);
int websockets_struct_check(int sizeof_struct);
void __attribute__((weak))jl_websocket_api_free(void *pv);
void __attribute__((weak)) *jl_websocket_api_malloc(size_t size);
void __attribute__((weak)) *jl_websocket_api_zalloc(size_t size);
void __attribute__((weak)) *jl_websocket_api_realloc(void *ptr, size_t size);
#define websocket_api_free jl_websocket_api_free
#define websocket_api_malloc jl_websocket_api_malloc
#define websocket_api_zalloc jl_websocket_api_zalloc
#define websocket_api_realloc jl_websocket_api_realloc
#endif
+4 -4
View File
@@ -20,9 +20,9 @@ extern "C" {
/* 当上层触发解码动作的速度比解码速度慢时,使用 2 个buff即保证每次来取数据都有已经解码完成的内容,改大没有意义 */
//#define BIT_BUFF_NUM 1
#ifndef BIT_BUFF_NUM
#define BIT_BUFF_NUM 1
#endif
// #ifndef BIT_BUFF_NUM
// #define BIT_BUFF_NUM 1
// #endif
/* Allow the number of cached MUC blocks , Default to 2 , 双buff乒乓或者单buff阻塞使用 */
/* 大致情况和 MCU 类似,主要考虑到输入bit流需要时32位对齐的地址空间,原始 bit 流需要从 flash 或者 SD 卡之中进行拷贝到RAM中,因此建议乒乓操作, 更多的 buff 没有意义,因为取 bit 流的动作会比解码动作慢 */
@@ -211,7 +211,7 @@ typedef struct _jdec_opj {
u16 *std_huffman_table;
u32 *huffman;
jdec_mcu_buff mcu_buff[MCU_BUFF_NUM]; /* MCU_BUFF_NUM mcu block buffers: 这些 buff 负责暂存解码后的 MCU 块数据和 MCU 块信息 */
jdec_bit_buff bit_buff[BIT_BUFF_NUM]; /* BIT_BUFF_NUM bit stream buffers: 这些 buff 负责暂存原始的 JPEG 数据或者 JPEG 段信息 */
jdec_bit_buff *bit_buff; /* BIT_BUFF_NUM bit stream buffers: 这些 buff 负责暂存原始的 JPEG 数据或者 JPEG 段信息 */
u8 *line_buf; /*mcu解码后数据先暂存到linebuf再统一变换输出,同时缓存部分数据给下一次解码使用,避免重复*/
struct rect draw_rect; /*jpeg在屏幕的绘制区域*/
struct rect jpeg_rect; /*在jpeg解码的相对位置*/