Day: February 13, 2013

Playing with JPEG on ARM9 120MHz

I downloaded libjpeg from and crosscompiled to my camera (ARM9 @ 120MHz) and started playing with JPEG decoding (djpeg application). Initially it was delaying 2.8s to convert, then I tested some parameters to improve it a little bit:

# time ./djpeg -fast -dct fast -nosmooth -onepass -grayscale tigre-fractal.jpg > tigre3.bmp
real    0m 0.88s
user    0m 0.83s
sys     0m 0.05s

More info about JPEG:

U-Boot of VStarCAM H6837WI fails to transfer file bigger than 3MB

If you try to transfer files bigger than 3MB using ymodem protocol on H6837WI it will fail.

Then we should to divide our big file (4MB) in 2 chunk files of 2MB each:

$ dd if=mtd3_RootFS_noreboot.img of=mtd3_RootFS_noreboot_part1.img bs=1k count=2048
2048+0 registros de entrada
2048+0 registros de saída
2097152 bytes (2,1 MB) copiados, 0,0111315 s, 188 MB/s

$ dd if=mtd3_RootFS_noreboot.img of=mtd3_RootFS_noreboot_part2.img bs=1k skip=2048
2000+0 registros de entrada
2000+0 registros de saída
2048000 bytes (2,0 MB) copiados, 0,0146331 s, 140 MB/s

$ cat mtd3_RootFS_noreboot_part1.img mtd3_RootFS_noreboot_part2.img > mtd3_RootFS_noreboot_rebuild.img

$ cmp mtd3_RootFS_noreboot.img mtd3_RootFS_noreboot_rebuild.img 

If cmp command returned nothing than original and reconstructed file are equals (good)!