diff options
Diffstat (limited to 'components/external')
| -rw-r--r-- | components/external/libpng/pngconf.h | 2 | ||||
| -rw-r--r-- | components/external/tjpgd1a/SConscript | 2 | ||||
| -rw-r--r-- | components/external/tjpgd1a/tjpgd.c | 2 |
3 files changed, 4 insertions, 2 deletions
diff --git a/components/external/libpng/pngconf.h b/components/external/libpng/pngconf.h index 047376302d..bb0a189f9d 100644 --- a/components/external/libpng/pngconf.h +++ b/components/external/libpng/pngconf.h @@ -23,6 +23,8 @@ #include <rtthread.h> #define PNG_MAX_MALLOC_64K #define PNG_NO_STDIO +#define PNG_NO_ERROR_NUMBERS +#define PNG_ABORT() do { rt_kprintf("libpng abort.\n"); } while (0) #ifndef RT_USING_NEWLIB #define PNG_NO_WRITE_SUPPORTED diff --git a/components/external/tjpgd1a/SConscript b/components/external/tjpgd1a/SConscript index d5db35385f..37448fcc3b 100644 --- a/components/external/tjpgd1a/SConscript +++ b/components/external/tjpgd1a/SConscript @@ -8,7 +8,7 @@ tjpgd.c CPPPATH = [RTT_ROOT + '/components/external/tjpgd1a'] -group = DefineGroup('tjpgd', src, depend = ['RTGUI_IMAGE_TJPGD'], CPPPATH = CPPPATH) +group = DefineGroup('RTGUI', src, depend = ['RT_USING_RTGUI', 'RTGUI_IMAGE_TJPGD'], CPPPATH = CPPPATH) Return('group') diff --git a/components/external/tjpgd1a/tjpgd.c b/components/external/tjpgd1a/tjpgd.c index 9c69989ced..4203336c51 100644 --- a/components/external/tjpgd1a/tjpgd.c +++ b/components/external/tjpgd1a/tjpgd.c @@ -525,7 +525,7 @@ JRESULT mcu_load ( } while (++i < 64); /* Next AC element */ if (JD_USE_SCALE && jd->scale == 3) - *bp = (*tmp / 256) + 128; /* If scale ratio is 1/8, IDCT can be ommited and only DC element is used */ + *bp = (BYTE)((*tmp / 256) + 128); /* If scale ratio is 1/8, IDCT can be ommited and only DC element is used */ else block_idct(tmp, bp); /* Apply IDCT and store the block to the MCU buffer */ |
