feat(Rtc_AIavatar): 数字人透明 GIF 显示方案 PoC 完成(背景图+透明GIF叠加)
源代码变更: - main/dzbj/bg_gif_demo.c/h: 方案 C 最终实现 - JPG 背景图(lv_img) + 透明 GIF(lv_gif) 叠加 - main/dzbj/dual_gif_demo.c/h: 方案 B 中间产物 - 双 GIF 循环切换 - main/dzbj/sprite_demo.c/h: 方案 A 已弃用 - DMA 直写 GRAM 与 LVGL 争抢 LCD IO 失败 - main/dzbj/ai_chat_ui.c: 集成 USE_BG_GIF_POC 开关,加载背景图+透明 GIF - main/dzbj/lcd.c: panel_handle 移除 static,便于其他模块访问 - main/CMakeLists.txt: 新增 3 个 dzbj 模块编译 资源新增: - spiffs_image/Background_360x360.jpg: 设备背景图(20KB) - spiffs_image/hiyori_m05.gif: Cubism Editor 直接导出的透明 GIF(2.3MB) - docs/Rtc_AIavatar/: Live2D 模型(Hiyori/Haru) + 32 段 Haru GIF + 方案文档第18章 PoC 实战记录 - tools/sprite_poc/: Python GIF→RGB565 转换脚本 踩坑要点(详见 docs/Rtc_AIavatar 第18章): - PIL Image.quantize() 会破坏 RGBA 透明度,必须改用 gifsicle - PIL 保存动画 GIF 仅第1帧有透明,后续帧不透明 - LVGL gifdec 按帧读取 - Cubism Editor 直接导出 GIF 才能逐帧保留透明信息(FREE 版限制部分模型) - gifsicle --lossy 会严重锯齿化,去掉只保留 --colors 256 + -O3 即可 - 裁剪居中需用全帧 bbox 不能只看第1帧(Live2D 角色每帧位置有偏移) - LVGL 默认不支持 PNG,背景图用 JPG + esp_jpeg 解码到 RGB565 buffer - 透明 GIF 显示黑色背景: gifdec.c canvas 初始化 alpha 须改为 0x00
2
.vscode/settings.json
vendored
@ -109,7 +109,7 @@
|
||||
"random": "cpp",
|
||||
"*.obj": "cpp"
|
||||
},
|
||||
"idf.port": "/dev/tty.usbmodem834401",
|
||||
"idf.port": "/dev/tty.debug-console",
|
||||
"idf.espIdfPath": "/Users/rdzleo/esp/esp-idf/v5.4.2/esp-idf",
|
||||
"idf.toolsPath": "/Users/rdzleo/.espressif",
|
||||
"idf.pythonInstallPath": "/opt/homebrew/bin/python3",
|
||||
|
||||
BIN
docs/Rtc_AIavatar/Resources/Background_360x360.jpg
Normal file
|
After Width: | Height: | Size: 20 KiB |
BIN
docs/Rtc_AIavatar/Resources/Background_Image.png
Normal file
|
After Width: | Height: | Size: 305 KiB |
BIN
docs/Rtc_AIavatar/Resources/Clips/dance_00_haru_g_m01.gif
Normal file
|
After Width: | Height: | Size: 433 KiB |
BIN
docs/Rtc_AIavatar/Resources/Clips/dance_01_haru_g_m02.gif
Normal file
|
After Width: | Height: | Size: 318 KiB |
BIN
docs/Rtc_AIavatar/Resources/Clips/dance_02_haru_g_m03.gif
Normal file
|
After Width: | Height: | Size: 694 KiB |
BIN
docs/Rtc_AIavatar/Resources/Clips/dance_03_haru_g_m04.gif
Normal file
|
After Width: | Height: | Size: 780 KiB |
BIN
docs/Rtc_AIavatar/Resources/Clips/dance_04_haru_g_m05.gif
Normal file
|
After Width: | Height: | Size: 334 KiB |
BIN
docs/Rtc_AIavatar/Resources/Clips/dance_05_haru_g_m06.gif
Normal file
|
After Width: | Height: | Size: 680 KiB |
BIN
docs/Rtc_AIavatar/Resources/Clips/dance_06_haru_g_m07.gif
Normal file
|
After Width: | Height: | Size: 590 KiB |
BIN
docs/Rtc_AIavatar/Resources/Clips/dance_07_haru_g_m08.gif
Normal file
|
After Width: | Height: | Size: 710 KiB |
BIN
docs/Rtc_AIavatar/Resources/Clips/dance_08_haru_g_m09.gif
Normal file
|
After Width: | Height: | Size: 614 KiB |
BIN
docs/Rtc_AIavatar/Resources/Clips/dance_09_haru_g_m10.gif
Normal file
|
After Width: | Height: | Size: 897 KiB |
|
After Width: | Height: | Size: 30 KiB |
|
After Width: | Height: | Size: 30 KiB |
|
After Width: | Height: | Size: 32 KiB |
|
After Width: | Height: | Size: 32 KiB |
|
After Width: | Height: | Size: 31 KiB |
|
After Width: | Height: | Size: 28 KiB |
|
After Width: | Height: | Size: 28 KiB |
|
After Width: | Height: | Size: 28 KiB |
|
After Width: | Height: | Size: 28 KiB |
|
After Width: | Height: | Size: 28 KiB |
|
After Width: | Height: | Size: 28 KiB |
|
After Width: | Height: | Size: 28 KiB |
|
After Width: | Height: | Size: 28 KiB |
|
After Width: | Height: | Size: 28 KiB |
|
After Width: | Height: | Size: 28 KiB |
|
After Width: | Height: | Size: 28 KiB |
|
After Width: | Height: | Size: 28 KiB |
|
After Width: | Height: | Size: 28 KiB |
|
After Width: | Height: | Size: 28 KiB |
|
After Width: | Height: | Size: 28 KiB |
|
After Width: | Height: | Size: 28 KiB |
|
After Width: | Height: | Size: 28 KiB |
|
After Width: | Height: | Size: 28 KiB |
|
After Width: | Height: | Size: 28 KiB |
|
After Width: | Height: | Size: 28 KiB |
|
After Width: | Height: | Size: 27 KiB |
|
After Width: | Height: | Size: 28 KiB |
|
After Width: | Height: | Size: 28 KiB |
|
After Width: | Height: | Size: 28 KiB |
|
After Width: | Height: | Size: 28 KiB |
|
After Width: | Height: | Size: 28 KiB |
|
After Width: | Height: | Size: 28 KiB |
|
After Width: | Height: | Size: 28 KiB |
|
After Width: | Height: | Size: 27 KiB |
|
After Width: | Height: | Size: 28 KiB |
|
After Width: | Height: | Size: 31 KiB |
|
After Width: | Height: | Size: 31 KiB |
|
After Width: | Height: | Size: 32 KiB |
|
After Width: | Height: | Size: 31 KiB |
|
After Width: | Height: | Size: 30 KiB |
|
After Width: | Height: | Size: 29 KiB |
|
After Width: | Height: | Size: 27 KiB |
|
After Width: | Height: | Size: 27 KiB |
|
After Width: | Height: | Size: 27 KiB |
|
After Width: | Height: | Size: 27 KiB |
|
After Width: | Height: | Size: 27 KiB |
|
After Width: | Height: | Size: 27 KiB |
|
After Width: | Height: | Size: 27 KiB |
|
After Width: | Height: | Size: 27 KiB |
|
After Width: | Height: | Size: 27 KiB |
|
After Width: | Height: | Size: 27 KiB |
|
After Width: | Height: | Size: 27 KiB |
|
After Width: | Height: | Size: 27 KiB |
|
After Width: | Height: | Size: 27 KiB |
|
After Width: | Height: | Size: 27 KiB |
|
After Width: | Height: | Size: 27 KiB |
|
After Width: | Height: | Size: 27 KiB |
|
After Width: | Height: | Size: 27 KiB |
|
After Width: | Height: | Size: 700 B |
BIN
docs/Rtc_AIavatar/Resources/Clips/dance_10_haru_g_m11.gif
Normal file
|
After Width: | Height: | Size: 497 KiB |
BIN
docs/Rtc_AIavatar/Resources/Clips/dance_11_haru_g_m12.gif
Normal file
|
After Width: | Height: | Size: 785 KiB |
BIN
docs/Rtc_AIavatar/Resources/Clips/dance_12_haru_g_m13.gif
Normal file
|
After Width: | Height: | Size: 429 KiB |
BIN
docs/Rtc_AIavatar/Resources/Clips/dance_13_haru_g_m14.gif
Normal file
|
After Width: | Height: | Size: 494 KiB |
BIN
docs/Rtc_AIavatar/Resources/Clips/dance_14_haru_g_m15.gif
Normal file
|
After Width: | Height: | Size: 771 KiB |
BIN
docs/Rtc_AIavatar/Resources/Clips/dance_15_haru_g_m16.gif
Normal file
|
After Width: | Height: | Size: 579 KiB |
BIN
docs/Rtc_AIavatar/Resources/Clips/dance_16_haru_g_m17.gif
Normal file
|
After Width: | Height: | Size: 666 KiB |
BIN
docs/Rtc_AIavatar/Resources/Clips/dance_17_haru_g_m18.gif
Normal file
|
After Width: | Height: | Size: 488 KiB |
BIN
docs/Rtc_AIavatar/Resources/Clips/dance_18_haru_g_m19.gif
Normal file
|
After Width: | Height: | Size: 1.2 MiB |
BIN
docs/Rtc_AIavatar/Resources/Clips/dance_19_haru_g_m20.gif
Normal file
|
After Width: | Height: | Size: 867 KiB |
BIN
docs/Rtc_AIavatar/Resources/Clips/dance_20_haru_g_m21.gif
Normal file
|
After Width: | Height: | Size: 756 KiB |
BIN
docs/Rtc_AIavatar/Resources/Clips/dance_21_haru_g_m22.gif
Normal file
|
After Width: | Height: | Size: 748 KiB |
BIN
docs/Rtc_AIavatar/Resources/Clips/dance_22_haru_g_m23.gif
Normal file
|
After Width: | Height: | Size: 611 KiB |
BIN
docs/Rtc_AIavatar/Resources/Clips/dance_23_haru_g_m24.gif
Normal file
|
After Width: | Height: | Size: 509 KiB |
BIN
docs/Rtc_AIavatar/Resources/Clips/dance_24_haru_g_m25.gif
Normal file
|
After Width: | Height: | Size: 603 KiB |
BIN
docs/Rtc_AIavatar/Resources/Clips/dance_25_haru_g_m26.gif
Normal file
|
After Width: | Height: | Size: 784 KiB |
BIN
docs/Rtc_AIavatar/Resources/Clips/idle_0_haru_g_idle.gif
Normal file
|
After Width: | Height: | Size: 1.5 MiB |
BIN
docs/Rtc_AIavatar/Resources/Clips/idle_1_haru_g_m15.gif
Normal file
|
After Width: | Height: | Size: 776 KiB |
|
After Width: | Height: | Size: 30 KiB |
|
After Width: | Height: | Size: 30 KiB |
|
After Width: | Height: | Size: 31 KiB |
|
After Width: | Height: | Size: 32 KiB |
|
After Width: | Height: | Size: 32 KiB |
|
After Width: | Height: | Size: 31 KiB |
|
After Width: | Height: | Size: 28 KiB |
|
After Width: | Height: | Size: 28 KiB |
|
After Width: | Height: | Size: 28 KiB |
|
After Width: | Height: | Size: 28 KiB |