chore(libs/jpg): rename lv_jpg to lv_tjpgd (#4573)

Signed-off-by: pengyiqiang <pengyiqiang@xiaomi.com>
Co-authored-by: pengyiqiang <pengyiqiang@xiaomi.com>
Co-authored-by: Gabor Kiss-Vamosi <kisvegabor@gmail.com>
This commit is contained in:
_VIFEXTech
2023-09-20 16:38:47 +08:00
committed by GitHub
parent 45fb2148d5
commit e53cd59fcb
22 changed files with 49 additions and 48 deletions

View File

@@ -1026,8 +1026,8 @@ menu "LVGL configuration"
config LV_USE_BMP config LV_USE_BMP
bool "BMP decoder library" bool "BMP decoder library"
config LV_USE_JPG config LV_USE_TJPGD
bool "JPG decoder library" bool "TJPGD decoder library"
config LV_USE_GIF config LV_USE_GIF
bool "GIF decoder library" bool "GIF decoder library"

View File

@@ -8,6 +8,7 @@
fs fs
bmp bmp
tjpgd
sjpg sjpg
lodepng lodepng
gif gif

View File

@@ -1,6 +1,6 @@
=========== =============
JPG decoder TJPGD decoder
=========== =============
Allow the use of JPG images in LVGL. Besides that it also allows the use Allow the use of JPG images in LVGL. Besides that it also allows the use
of a custom format, called Split JPG (SJPG), which can be decoded in of a custom format, called Split JPG (SJPG), which can be decoded in
@@ -83,13 +83,13 @@ The expected result is:
Example Example
------- -------
.. include:: ../examples/libs/jpg/index.rst .. include:: ../examples/libs/tjpgd/index.rst
API API
--- ---
:ref:`lv_sjpg` :ref:`lv_tjpgd`
:ref:`tjpgd` :ref:`tjpgd`

View File

@@ -486,8 +486,8 @@
<file category="sourceC" name="src/libs/rlottie/lv_rlottie.c" /> <file category="sourceC" name="src/libs/rlottie/lv_rlottie.c" />
<file category="sourceC" name="src/libs/qrcode/lv_qrcode.c" /> <file category="sourceC" name="src/libs/qrcode/lv_qrcode.c" />
<file category="sourceC" name="src/libs/qrcode/qrcodegen.c" /> <file category="sourceC" name="src/libs/qrcode/qrcodegen.c" />
<file category="sourceC" name="src/libs/sjpg/tjpgd.c" /> <file category="sourceC" name="src/libs/tjpgd/tjpgd.c" />
<file category="sourceC" name="src/libs/sjpg/lv_sjpg.c" /> <file category="sourceC" name="src/libs/tjpgd/lv_tjpgd.c" />
<file category="sourceC" name="src/libs/bmp/lv_bmp.c" /> <file category="sourceC" name="src/libs/bmp/lv_bmp.c" />
<file category="sourceC" name="src/layouts/grid/lv_grid.c" /> <file category="sourceC" name="src/layouts/grid/lv_grid.c" />
<file category="sourceC" name="src/layouts/flex/lv_flex.c" /> <file category="sourceC" name="src/layouts/flex/lv_flex.c" />
@@ -787,9 +787,9 @@
<component Cgroup="lvgl" Csub="Libs sJPG" condition="LVGL-Essential"> <component Cgroup="lvgl" Csub="Libs sJPG" condition="LVGL-Essential">
<description>Add sJPG support</description> <description>Add sJPG support</description>
<files> <files>
<!-- src/libs/sjpg --> <!-- src/libs/tjpgd -->
<file category="sourceC" name="src/libs/sjpg/lv_sjpg.c" /> <file category="sourceC" name="src/libs/tjpgd/lv_tjpgd.c" />
<file category="sourceC" name="src/libs/sjpg/tjpgd.c" /> <file category="sourceC" name="src/libs/tjpgd/tjpgd.c" />
</files> </files>
<RTE_Components_h> <RTE_Components_h>

View File

@@ -21,7 +21,7 @@ extern "C" {
#include "lodepng/lv_example_lodepng.h" #include "lodepng/lv_example_lodepng.h"
#include "qrcode/lv_example_qrcode.h" #include "qrcode/lv_example_qrcode.h"
#include "rlottie/lv_example_rlottie.h" #include "rlottie/lv_example_rlottie.h"
#include "jpg/lv_example_jpg.h" #include "tjpgd/lv_example_tjpgd.h"
#include "tiny_ttf/lv_example_tiny_ttf.h" #include "tiny_ttf/lv_example_tiny_ttf.h"
/********************* /*********************

View File

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

@@ -1,6 +1,6 @@
Load an SJPG image Load an SJPG image
------------------ ------------------
.. lv_example:: libs/sjpg/lv_example_sjpg_1 .. lv_example:: libs/tjpgd/lv_example_tjpgd_1
:language: c :language: c

View File

@@ -1,10 +1,10 @@
/** /**
* @file lv_example_jpg.h * @file lv_example_tjpgd.h
* *
*/ */
#ifndef LV_EXAMPLE_JPG_H #ifndef LV_EXAMPLE_TJPGD_H
#define LV_EXAMPLE_JPG_H #define LV_EXAMPLE_TJPGD_H
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
@@ -25,7 +25,7 @@ extern "C" {
/********************** /**********************
* GLOBAL PROTOTYPES * GLOBAL PROTOTYPES
**********************/ **********************/
void lv_example_jpg_1(void); void lv_example_tjpgd_1(void);
/********************** /**********************
* MACROS * MACROS
@@ -35,4 +35,4 @@ void lv_example_jpg_1(void);
} /*extern "C"*/ } /*extern "C"*/
#endif #endif
#endif /*LV_EXAMPLE_JPG_H*/ #endif /*LV_EXAMPLE_TJPGD_H*/

View File

@@ -1,17 +1,17 @@
#include "../../lv_examples.h" #include "../../lv_examples.h"
#if LV_USE_JPG && LV_BUILD_EXAMPLES #if LV_USE_TJPGD && LV_BUILD_EXAMPLES
/** /**
* Load a JPG image * Load a JPG image
*/ */
void lv_example_jpg_1(void) void lv_example_tjpgd_1(void)
{ {
lv_obj_t * wp; lv_obj_t * wp;
wp = lv_image_create(lv_scr_act()); wp = lv_image_create(lv_scr_act());
/* Assuming a File system is attached to letter 'A' /* Assuming a File system is attached to letter 'A'
* E.g. set LV_USE_FS_STDIO 'A' in lv_conf.h */ * E.g. set LV_USE_FS_STDIO 'A' in lv_conf.h */
lv_image_set_src(wp, "A:lvgl/examples/libs/jpg/img_lvgl_logo.jpg"); lv_image_set_src(wp, "A:lvgl/examples/libs/tjpgd/img_lvgl_logo.jpg");
lv_obj_center(wp); lv_obj_center(wp);
} }

View File

@@ -583,7 +583,7 @@
/* JPG + split JPG decoder library. /* JPG + split JPG decoder library.
* Split JPG is a custom format optimized for embedded systems. */ * Split JPG is a custom format optimized for embedded systems. */
#define LV_USE_JPG 0 #define LV_USE_TJPGD 0
/*GIF decoder library*/ /*GIF decoder library*/
#define LV_USE_GIF 0 #define LV_USE_GIF 0

2
lvgl.h
View File

@@ -95,7 +95,7 @@ extern "C" {
#include "src/libs/lodepng/lv_lodepng.h" #include "src/libs/lodepng/lv_lodepng.h"
#include "src/libs/gif/lv_gif.h" #include "src/libs/gif/lv_gif.h"
#include "src/libs/qrcode/lv_qrcode.h" #include "src/libs/qrcode/lv_qrcode.h"
#include "src/libs/jpg/lv_jpg.h" #include "src/libs/tjpgd/lv_tjpgd.h"
#include "src/libs/freetype/lv_freetype.h" #include "src/libs/freetype/lv_freetype.h"
#include "src/libs/rlottie/lv_rlottie.h" #include "src/libs/rlottie/lv_rlottie.h"
#include "src/libs/ffmpeg/lv_ffmpeg.h" #include "src/libs/ffmpeg/lv_ffmpeg.h"

View File

@@ -36,9 +36,9 @@
--exclude=../src/extra/libs/lodepng/lodepng.h --exclude=../src/extra/libs/lodepng/lodepng.h
--exclude=../src/extra/libs/qrcode/qrcodegen.c --exclude=../src/extra/libs/qrcode/qrcodegen.c
--exclude=../src/extra/libs/qrcode/qrcodegen.h --exclude=../src/extra/libs/qrcode/qrcodegen.h
--exclude=../src/extra/libs/sjpg/tjpgd.c --exclude=../src/extra/libs/tjpgd/tjpgd.c
--exclude=../src/extra/libs/sjpg/tjpgd.h --exclude=../src/extra/libs/tjpgd/tjpgd.h
--exclude=../src/extra/libs/sjpg/tjpgdcnf.h --exclude=../src/extra/libs/tjpgd/tjpgdcnf.h
--exclude=../tests/unity/unity.c --exclude=../tests/unity/unity.c
--exclude=../tests/unity/unity_internals.h --exclude=../tests/unity/unity_internals.h
--exclude=../tests/unity/unity_support.c --exclude=../tests/unity/unity_support.c

View File

@@ -1,5 +1,5 @@
/** /**
* @file lv_sjpg.c * @file lv_tjpgd.c
* *
*/ */
@@ -46,10 +46,10 @@
*********************/ *********************/
#include "../../../lvgl.h" #include "../../../lvgl.h"
#if LV_USE_JPG #if LV_USE_TJPGD
#include "tjpgd.h" #include "tjpgd.h"
#include "lv_jpg.h" #include "lv_tjpgd.h"
#include "../../misc/lv_fs.h" #include "../../misc/lv_fs.h"
/********************* /*********************
@@ -85,7 +85,7 @@ static int is_jpg(const uint8_t * raw_data, size_t len);
* GLOBAL FUNCTIONS * GLOBAL FUNCTIONS
**********************/ **********************/
void lv_jpg_init(void) void lv_tjpgd_init(void)
{ {
lv_image_decoder_t * dec = lv_image_decoder_create(); lv_image_decoder_t * dec = lv_image_decoder_create();
lv_image_decoder_set_info_cb(dec, decoder_info); lv_image_decoder_set_info_cb(dec, decoder_info);
@@ -288,4 +288,4 @@ static int is_jpg(const uint8_t * raw_data, size_t len)
return memcmp(jpg_signature, raw_data, sizeof(jpg_signature)) == 0; return memcmp(jpg_signature, raw_data, sizeof(jpg_signature)) == 0;
} }
#endif /*LV_USE_JPG*/ #endif /*LV_USE_TJPGD*/

View File

@@ -1,10 +1,10 @@
/** /**
* @file lv_sjpg.h * @file lv_tjpgd.h
* *
*/ */
#ifndef LV_SJPEG_H #ifndef LV_TJPGD_H
#define LV_SJPEG_H #define LV_TJPGD_H
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
@@ -14,7 +14,7 @@ extern "C" {
* INCLUDES * INCLUDES
*********************/ *********************/
#if LV_USE_JPG #if LV_USE_TJPGD
/********************* /*********************
* DEFINES * DEFINES
@@ -28,16 +28,16 @@ extern "C" {
* GLOBAL PROTOTYPES * GLOBAL PROTOTYPES
**********************/ **********************/
void lv_jpg_init(void); void lv_tjpgd_init(void);
/********************** /**********************
* MACROS * MACROS
**********************/ **********************/
#endif /*LV_USE_JPG*/ #endif /*LV_USE_TJPGD*/
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif /* LV_SJPEG_H */ #endif /* LV_TJPGD_H */

View File

@@ -1957,11 +1957,11 @@
/* JPG + split JPG decoder library. /* JPG + split JPG decoder library.
* Split JPG is a custom format optimized for embedded systems. */ * Split JPG is a custom format optimized for embedded systems. */
#ifndef LV_USE_JPG #ifndef LV_USE_TJPGD
#ifdef CONFIG_LV_USE_JPG #ifdef CONFIG_LV_USE_TJPGD
#define LV_USE_JPG CONFIG_LV_USE_JPG #define LV_USE_TJPGD CONFIG_LV_USE_TJPGD
#else #else
#define LV_USE_JPG 0 #define LV_USE_TJPGD 0
#endif #endif
#endif #endif

View File

@@ -16,8 +16,8 @@
#include "libs/freetype/lv_freetype.h" #include "libs/freetype/lv_freetype.h"
#include "libs/fsdrv/lv_fsdrv.h" #include "libs/fsdrv/lv_fsdrv.h"
#include "libs/gif/lv_gif.h" #include "libs/gif/lv_gif.h"
#include "libs/tjpgd/lv_tjpgd.h"
#include "libs/lodepng/lv_lodepng.h" #include "libs/lodepng/lv_lodepng.h"
#include "libs/jpg/lv_jpg.h"
#include "draw/lv_draw.h" #include "draw/lv_draw.h"
#include "misc/lv_cache.h" #include "misc/lv_cache.h"
#include "misc/lv_cache_builtin.h" #include "misc/lv_cache_builtin.h"
@@ -219,8 +219,8 @@ void lv_init(void)
lv_lodepng_init(); lv_lodepng_init();
#endif #endif
#if LV_USE_JPG #if LV_USE_TJPGD
lv_jpg_init(); lv_tjpgd_init();
#endif #endif
#if LV_USE_BMP #if LV_USE_BMP

View File

@@ -63,7 +63,7 @@
#define LV_USE_LODEPNG 1 #define LV_USE_LODEPNG 1
#define LV_USE_BMP 1 #define LV_USE_BMP 1
#define LV_USE_JPG 1 #define LV_USE_TJPGD 1
#define LV_USE_GIF 1 #define LV_USE_GIF 1
#define LV_USE_QRCODE 1 #define LV_USE_QRCODE 1
#define LV_USE_BARCODE 1 #define LV_USE_BARCODE 1

View File

@@ -39,7 +39,7 @@ static void create_images(void)
lv_obj_align(label, LV_ALIGN_CENTER, 100, 20); lv_obj_align(label, LV_ALIGN_CENTER, 100, 20);
} }
void test_jpg_1(void) void test_tjpgd_1(void)
{ {
create_images(); create_images();