1、添加virfat备份与恢复;
2、修复sensorhub低功耗越界问题; 3、修复rcsp传输相关问题; 4、更新flash_params_v3.bin; 5、修复摄像头、科大讯飞相关问题;
This commit is contained in:
@@ -123,6 +123,7 @@ extern void gpu_free_frame_buf(void *p);
|
||||
extern void jpeg_module_free_res_cb(void *p);
|
||||
extern struct element *ui_core_get_root();
|
||||
extern u8 buf_is_heap_addr(void *p);
|
||||
extern int ui_buf_is_psram(void *buf);
|
||||
extern const int JLUI_GPU_DMA_TO_PSRAM;
|
||||
extern void *jlgpu_unit_to_instruction(pJLGPUTaskUnit_t taskp);
|
||||
extern const int config_gpu_cache_psram_jpeg_en ;
|
||||
@@ -182,7 +183,7 @@ static int jlgpu_lcd_buf_line_get(int left_space, int stride, int buf_num, int m
|
||||
/* ------------------------------------------------------------------------------------*/
|
||||
static void jlgpu_scheduler_aysnc_free_buf_cb(void *p)
|
||||
{
|
||||
if (buf_is_heap_addr(p)) {
|
||||
if (buf_is_heap_addr(p) || ui_buf_is_psram(p)) {
|
||||
gpu_free_frame_buf(p);
|
||||
} else {
|
||||
ASSERT(0, "p:%x", (int)p);
|
||||
|
||||
@@ -10,6 +10,8 @@
|
||||
#include <math.h>
|
||||
#include "ui/lcd/lcd_drive.h" // lcd 驱动
|
||||
|
||||
#if TCFG_UI_ENABLE
|
||||
|
||||
#define LOG_TAG_CONST JPEG
|
||||
#define LOG_TAG "[JPEG]"
|
||||
#define LOG_ERROR_ENABLE
|
||||
@@ -650,18 +652,20 @@ static void jpeg_draw_cb(int id, u8 *dst_buf, struct rect *dst_r, struct rect *s
|
||||
|
||||
/* 计算变换后图片的输出区域 */
|
||||
struct rect jpeg_draw_src;
|
||||
memcpy(&jpeg_draw_src, src_r, sizeof(struct rect));
|
||||
//放大时为中心放大
|
||||
int center_y = src_r->top + src_r->height / 2;
|
||||
jpeg_draw_src.height = opj->height / ratio_h;
|
||||
jpeg_draw_src.top = center_y - jpeg_draw_src.height / 2;
|
||||
int center_x = src_r->left + src_r->width / 2;
|
||||
jpeg_draw_src.width = opj->width / ratio_w;
|
||||
jpeg_draw_src.left = center_x - jpeg_draw_src.width / 2;
|
||||
if (matrix) {
|
||||
int center_y = src_r->top + src_r->height / 2;
|
||||
jpeg_draw_src.height = opj->height / ratio_h;
|
||||
jpeg_draw_src.top = center_y - jpeg_draw_src.height / 2;
|
||||
int center_x = src_r->left + src_r->width / 2;
|
||||
jpeg_draw_src.width = opj->width / ratio_w;
|
||||
jpeg_draw_src.left = center_x - jpeg_draw_src.width / 2;
|
||||
} else {
|
||||
memcpy(&jpeg_draw_src, src_r, sizeof(struct rect));
|
||||
}
|
||||
/* DUMP_RECT(__func__, __LINE__, "dst_r", dst_r); //推屏buf */
|
||||
/* DUMP_RECT(__func__, __LINE__, "src_r", src_r); //jpeg显示区域 */
|
||||
/* DUMP_RECT(__func__, __LINE__, "jpeg_draw_src", &jpeg_draw_src); //jpeg缩放后区域 */
|
||||
|
||||
/* 计算图片输出和推屏Buf的重叠区域 */
|
||||
struct rect cover_r_t;
|
||||
if (!get_rect_cover(dst_r, src_r, &cover_r_t)) {
|
||||
@@ -707,7 +711,15 @@ static void jpeg_draw_cb(int id, u8 *dst_buf, struct rect *dst_r, struct rect *s
|
||||
/* DUMP_RECT(__func__, __LINE__, "jpeg_dec_r", &jpeg_dec_r); */
|
||||
u8 *disp_buf = dst_buf + (block_r.top - dst_r->top) * 2 * dst_r->width;
|
||||
/*启动解码*/
|
||||
jljpeg_decode_start(opj, &jpeg_draw_src, &jpeg_dec_r, &cover_r, &block_r, disp_buf);
|
||||
int jpg_dec_ret = jljpeg_decode_start(opj, &jpeg_draw_src, &jpeg_dec_r, &cover_r, &block_r, disp_buf);
|
||||
#if 0
|
||||
//用于jpeg_stream debug
|
||||
if (jpg_dec_ret != JDEC_OK) {
|
||||
extern int jljpeg_stream_src_data_save_to_file(s8 * filename);
|
||||
jljpeg_stream_src_data_save_to_file("storage/sd0/C/ERROR/err_****.jpg");
|
||||
ASSERT(0);
|
||||
}
|
||||
#endif
|
||||
sub_top += sub_height;
|
||||
sub_height = (sub_top + sub_height + draw_top < draw_btm) ? max_dec_height : draw_btm - draw_top - sub_top;
|
||||
}
|
||||
@@ -981,9 +993,7 @@ void *jpeg_module_opj_create_file(void *path, int path_len, u32 check, u32 index
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif /*#if TCFG_UI_ENABLE */
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -22,6 +22,8 @@
|
||||
#include "jpeg_stream.h"
|
||||
#include "video/avi/avilib.h"
|
||||
|
||||
#if CONFIG_JL_UI_ENABLE
|
||||
|
||||
#define LOG_TAG_CONST JPEG
|
||||
#define LOG_TAG "[JPEG_STREAM]"
|
||||
#define LOG_ERROR_ENABLE
|
||||
@@ -719,3 +721,6 @@ int jpeg_image_file_psram(struct draw_context *dc, int left, int top, int width,
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif /*#if CONFIG_JL_UI_ENABLE*/
|
||||
|
||||
|
||||
@@ -1874,7 +1874,8 @@ static int jlui_close_draw_context(struct draw_context *dc)
|
||||
/* 如果 dc->refresh 没有使能,说明是3D特效创建GPU任务链,此时不释放缓存,由特效退出时主动释放 */
|
||||
if (dc->refresh && (config_gpu_cache_psram_jpeg_en || config_gpu_cache_psram_file_res_en)) {
|
||||
/* gpu_input_stream_cache_reset(); */
|
||||
gpu_input_stream_cache_clr_non_resident();
|
||||
/* gpu_input_stream_cache_clr_non_resident(); */
|
||||
gpu_input_stream_cache_clr_by_index(dc->index);
|
||||
}
|
||||
|
||||
__this->dc_flag &= ~BIT(dc->index);
|
||||
@@ -4350,12 +4351,19 @@ void *cache_gpu_input_data(void *head, pJLGPUTaskParam_t task_param, void *fp, i
|
||||
task_param->texture.data = (u8 *)((u32)task_param->texture.data - tab_size);
|
||||
task_param->image.len += tab_size;
|
||||
}
|
||||
|
||||
#if 1
|
||||
u32 res_hash = 5383;
|
||||
res_hash = mmu_hash(res_hash, (u8 *)&task_param->image, sizeof(struct image_file));
|
||||
res_hash = mmu_hash(res_hash, (u8 *)&task_param->task_id, 4);
|
||||
res_hash = mmu_hash(res_hash, (u8 *)&task_param->element_id, 4);
|
||||
u32 data_crc = res_hash;
|
||||
#else
|
||||
u32 tab[3] ALIGNED(4);
|
||||
tab[0] = (u32)fp;
|
||||
tab[1] = (u32)task_param->texture.data;
|
||||
tab[2] = task_param->image.len;
|
||||
u16 data_crc = CRC16(&tab[0], sizeof(tab));
|
||||
#endif
|
||||
/* 检查是否已经有缓存,如果需要缓存的图片没在cache里,释放原来的,缓存新的 */
|
||||
void *cache_addr = gpu_input_stream_cache_check(data_crc);
|
||||
int vaild_index = index;
|
||||
@@ -4377,6 +4385,7 @@ void *cache_gpu_input_data(void *head, pJLGPUTaskParam_t task_param, void *fp, i
|
||||
}
|
||||
#endif
|
||||
cache_addr = gpu_input_stream_cache_add(fp, task_param->texture.data, task_param->image.len, data_crc, task_param->texture.mmu_tab_base, (task_param->info.tab_size >> 2));
|
||||
/* printf("[cache]add elm_id:%x task_id:%d index:%d addr:0x%x", task_param->element_id, task_param->task_id,index, (u32)cache_addr); */
|
||||
task_param->texture.data = cache_addr;
|
||||
task_param->texture.mmu_tab_base = NULL;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user