update lib JPEGDEC to v1.8.4 (#24120)
This commit is contained in:
parent
c126fb3181
commit
01dfb76d36
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "JPEGDEC",
|
"name": "JPEGDEC",
|
||||||
"version": "1.8.3",
|
"version": "1.8.4",
|
||||||
"description": "A fast JPEG library with a unique set of functions to make viewing image on microcontrollers easy. Includes fast downscaling options and the ability to view Exif embedded thumbnails. Supports baseline grayscale and color images with Huffman encoding.",
|
"description": "A fast JPEG library with a unique set of functions to make viewing image on microcontrollers easy. Includes fast downscaling options and the ability to view Exif embedded thumbnails. Supports baseline grayscale and color images with Huffman encoding.",
|
||||||
"repository":
|
"repository":
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
name=JPEGDEC
|
name=JPEGDEC
|
||||||
version=1.8.3
|
version=1.8.4
|
||||||
author=Larry Bank
|
author=Larry Bank
|
||||||
maintainer=Larry Bank
|
maintainer=Larry Bank
|
||||||
sentence=Optimized JPEG decoder for MCUs with 32K+ RAM.
|
sentence=Optimized JPEG decoder for MCUs with 32K+ RAM.
|
||||||
|
|||||||
13
lib/libesp32/JPEGDEC/linux/examples/jpeg_perf_test/Makefile
Normal file
13
lib/libesp32/JPEGDEC/linux/examples/jpeg_perf_test/Makefile
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
CFLAGS=-ggdb -D__LINUX__ -Wall -O2 -I../../
|
||||||
|
LIBS=-g -lJPEGDEC
|
||||||
|
|
||||||
|
all: jpeg_perf_test
|
||||||
|
|
||||||
|
jpeg_perf_test: main.o
|
||||||
|
$(CXX) main.o $(LIBS) -o jpeg_perf_test
|
||||||
|
|
||||||
|
main.o: main.cpp
|
||||||
|
$(CXX) $(CFLAGS) -c main.cpp
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -rf *.o jpeg_perf_test
|
||||||
62
lib/libesp32/JPEGDEC/linux/examples/jpeg_perf_test/main.cpp
Normal file
62
lib/libesp32/JPEGDEC/linux/examples/jpeg_perf_test/main.cpp
Normal file
@ -0,0 +1,62 @@
|
|||||||
|
//
|
||||||
|
// Perf Test
|
||||||
|
//
|
||||||
|
#include <JPEGDEC.h>
|
||||||
|
#include <time.h>
|
||||||
|
#include "../../../test_images/tulips.h" // 640x480 56k byte test image
|
||||||
|
JPEGDEC jpeg;
|
||||||
|
|
||||||
|
long micros(void)
|
||||||
|
{
|
||||||
|
int iTime;
|
||||||
|
struct timespec res;
|
||||||
|
|
||||||
|
clock_gettime(CLOCK_MONOTONIC, &res);
|
||||||
|
iTime = 1000000*res.tv_sec + res.tv_nsec/1000;
|
||||||
|
|
||||||
|
return (long)iTime;
|
||||||
|
} /* micros() */
|
||||||
|
|
||||||
|
int JPEGDraw(JPEGDRAW *pDraw)
|
||||||
|
{
|
||||||
|
// do nothing
|
||||||
|
return 1; // continue decode
|
||||||
|
} /* JPEGDraw() */
|
||||||
|
|
||||||
|
int main(int argc, char *argv[]) {
|
||||||
|
long lTime;
|
||||||
|
|
||||||
|
if (jpeg.openFLASH((uint8_t *)tulips, sizeof(tulips), JPEGDraw)) {
|
||||||
|
lTime = micros();
|
||||||
|
if (jpeg.decode(0,0,0)) { // full sized decode
|
||||||
|
lTime = micros() - lTime;
|
||||||
|
printf("full sized decode in %d us\n", (int)lTime);
|
||||||
|
}
|
||||||
|
jpeg.close();
|
||||||
|
}
|
||||||
|
if (jpeg.openFLASH((uint8_t *)tulips, sizeof(tulips), JPEGDraw)) {
|
||||||
|
lTime = micros();
|
||||||
|
if (jpeg.decode(0,0,JPEG_SCALE_HALF)) { // 1/2 sized decode
|
||||||
|
lTime = micros() - lTime;
|
||||||
|
printf("half sized decode in %d us\n", (int)lTime);
|
||||||
|
}
|
||||||
|
jpeg.close();
|
||||||
|
}
|
||||||
|
if (jpeg.openFLASH((uint8_t *)tulips, sizeof(tulips), JPEGDraw)) {
|
||||||
|
lTime = micros();
|
||||||
|
if (jpeg.decode(0,0,JPEG_SCALE_QUARTER)) { // 1/4 sized decode
|
||||||
|
lTime = micros() - lTime;
|
||||||
|
printf("quarter sized decode in %d us\n", (int)lTime);
|
||||||
|
}
|
||||||
|
jpeg.close();
|
||||||
|
}
|
||||||
|
if (jpeg.openFLASH((uint8_t *)tulips, sizeof(tulips), JPEGDraw)) {
|
||||||
|
lTime = micros();
|
||||||
|
if (jpeg.decode(0,0,JPEG_SCALE_EIGHTH)) { // 1/8 sized decode
|
||||||
|
lTime = micros() - lTime;
|
||||||
|
printf("eighth sized decode in %d us\n", (int)lTime);
|
||||||
|
}
|
||||||
|
jpeg.close();
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
} /* main() */
|
||||||
@ -3766,6 +3766,7 @@ static void JPEGPutMCU22(JPEGIMAGE *pJPEG, int x, int iPitch)
|
|||||||
#endif // ESP32S3_SIMD
|
#endif // ESP32S3_SIMD
|
||||||
|
|
||||||
#ifdef HAS_NEON
|
#ifdef HAS_NEON
|
||||||
|
if (x+8 <= iPitch && (iPitch & 15) == 0) { // only for non-clipped MCUs
|
||||||
if (pJPEG->ucPixelType == RGB8888) {
|
if (pJPEG->ucPixelType == RGB8888) {
|
||||||
int8x8_t i88Cr, i88Cb;
|
int8x8_t i88Cr, i88Cb;
|
||||||
uint8x16_t u816YL, u816YR;
|
uint8x16_t u816YL, u816YR;
|
||||||
@ -3998,6 +3999,7 @@ static void JPEGPutMCU22(JPEGIMAGE *pJPEG, int x, int iPitch)
|
|||||||
} // for each row
|
} // for each row
|
||||||
return;
|
return;
|
||||||
} // 16bpp
|
} // 16bpp
|
||||||
|
} // not clipped
|
||||||
#endif // HAS_NEON
|
#endif // HAS_NEON
|
||||||
|
|
||||||
#ifdef HAS_SSE
|
#ifdef HAS_SSE
|
||||||
@ -5124,7 +5126,9 @@ static int DecodeJPEG(JPEGIMAGE *pJPEG)
|
|||||||
}
|
}
|
||||||
for (x = 0; x < cx && bContinue && iErr == 0; x++)
|
for (x = 0; x < cx && bContinue && iErr == 0; x++)
|
||||||
{
|
{
|
||||||
|
if (pJPEG->pFramebuffer == NULL) {
|
||||||
pJPEG->usPixels = &pAlignedPixels[iDMAOffset]; // make sure output is correct offset for DMA
|
pJPEG->usPixels = &pAlignedPixels[iDMAOffset]; // make sure output is correct offset for DMA
|
||||||
|
}
|
||||||
|
|
||||||
iSkipMask = 0; // assume not skipping
|
iSkipMask = 0; // assume not skipping
|
||||||
if (bSkipRow || x*mcuCX < pJPEG->iCropX || x*mcuCX > pJPEG->iCropX+pJPEG->iCropCX) {
|
if (bSkipRow || x*mcuCX < pJPEG->iCropX || x*mcuCX > pJPEG->iCropX+pJPEG->iCropCX) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user