XMOS JPEG compression

Technical questions regarding the XTC tools and programming with XMOS.
Post Reply
mhanuel
Member++
Posts: 16
Joined: Mon Apr 07, 2014 3:15 am

XMOS JPEG compression

Post by mhanuel »

Hello,

I would appreciate if someone can point me in the right direction.

I need to implement JPEG compression on XMOS.

I have found sc_dsp_transforms project, it has an app for jpeg compression which I would like to test. Does someone have use this app? Do you think this app can be use to compress JPEG from RGB or YUV?

If I build the app, the following appear at the console:

xmake all
Creating dependencies for image.c
Compiling image.c
Using modules: module_dct_jpeg module_huffman_jpeg
Creating app_jpeg_example.xe
Constraint check for "stdcore[0]" (node "0", tile 0):
Cores available: 8, used: 5+. MAYBE
Timers available: 10, used: 5+. MAYBE
Chanends available: 32, used: 8+. MAYBE
Memory available: 65536, used: 47332 . OKAY
(Stack: 23800, Code: 12128, Data: 11404)
Constraints checks PASSED WITH CAVEATS.


This shows the huge amount of resources needed.
I just need the most basic JPEG compression, is there anything I can do to reduce the resources used?

Comments will be appreciated!

Tkx for reading.


User avatar
andrew
Experienced Member
Posts: 114
Joined: Fri Dec 11, 2009 10:22 am

Post by andrew »

The jpeg module is for decoding jpeg images, is this what you require?
mhanuel
Member++
Posts: 16
Joined: Mon Apr 07, 2014 3:15 am

Post by mhanuel »

I need to encode JPEG from RGB or YUV format.

I thought the https://github.com/xcore/sc_dsp_transforms library include code for encoding.
As it says on the Key Features,

DCT Functionality:

Basic quantising DCT for JPEG compression
Basic Huffman encoder for JPEG encoder
Access functions to compress a series of blocks.
Example app to compress a PBM file into a JPEG file (PBM because that uses little memory to store).


Thank you.
Post Reply