Hello every one thanks for your time in advance. I have an issue maybe regarded to the ArduChip or JPEG format.
I am using ArduCAM-MINI-2MP-Plus. I use ESP-IDF SPI master driver to extract the JPEG binary from SPI to my ESP32 board. I have configure the resolutuon to 320x240 and output format RGB565. Therefore one image takes about 4K.
The binarys all start with 0xffd8, which seems correct to me. But I don't know why they ends with zero. I am reading the binary size by myCAM.read_fifo_length(); so this is the size that the ArduChip gives me. I think this is not caused by DMA allignment of my SPI driver, because in that case MISO should be inactice and I will read all 1 instead of all 0.
Hello every one thanks for your time in advance. I have an issue maybe regarded to the ArduChip or JPEG format.
I am using ArduCAM-MINI-2MP-Plus. I use ESP-IDF SPI master driver to extract the JPEG binary from SPI to my ESP32 board. I have configure the resolutuon to 320x240 and output format RGB565. Therefore one image takes about 4K.
By looking at the JPEG binary I noticed that the binary is zero-padded. For example a binary with size 3080 ends with
22 53 95 aa ab 9a 83 42 6 a8 4d 59 98 ca 69 a6 48 c3 4c aa 24 31 4f 2 81 13 25 5b 8a 4c 56 91 21 96 92 e6 ac 2d cd 68 41 32 cf 52 9 69 8 76 fa 42 68 11 1b 54 6d 40 88 8d 30 d0 23 a1 df 47 99 4c 68 43 35 46 d3 d4 96 55 92 6a 84 cd 52 50 6e a7 e6 a4 62 ef a5 6 90 c7 83 53 a5 0 58 4a 94 1a a1 a 5b 8a af 23 53 2 9c ed 59 b3 37 35 84 8e 98 15 99 aa 16 a8 2d 91 35 44 6a 8c c6 1a 61 aa 24 6d 18 aa 24 70 5a 91 56 82 49 0 a7 55 10 1b a9 e2 5a b4 c0 95 66 a9 d2 6a a2 49 d6 6a 7f 9b 41 21 be 90 9a 9 18 6a 33 40 1b f 2d 42 66 a4 cb 43 3c ec d2 19 2a 4b 20 77 a8 f3 52 4 a0 d2 ee a9 28 70 35 20 a6 4 c9 53 ad 0 4c a6 9d ba a8 41 ba a1 90 d0 32 9c d5 99 71 59 c8 da 25 6c d3 4d 66 68 30 d4 66 a8 92 32 29 b8 a6 40 9b 69 c1 69 92 48 12 a4 b 54 43 16 9b 54 48 da 28 0 a9 3 53 40 48 24 a9 4 b5 64 f 12 d3 fc ca 9 d f4 99 a0 47 ff d9 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
and a binary with size 4104 ends with
36 2b bd 42 6a 8c d8 c3 4c 35 44 c 34 da a2 44 c5 38 a 9 25 51 56 23 38 ab 44 b2 ca 4f 8a b0 b7 35 a5 c9 27 5b 8a 94 4f 4c 92 41 25 2e ea 42 18 4d 44 d4 8 8c d4 66 98 8e 84 bd 27 99 40 d0 d3 35 46 67 a9 2c af 24 b5 17 9d 52 50 6e a5 dd 50 31 77 53 81 a0 63 c1 a9 d2 80 27 4a 98 1a a1 b be a2 90 d3 2 a4 a6 b3 6e d 65 23 78 14 8b 54 4c 6b 23 52 26 a8 8d 51 3 d 30 d5 12 33 14 62 99 3 82 d3 c2 d3 24 90 2d 3a a8 90 a5 f 54 84 48 b2 d4 c9 35 55 c4 4e b3 54 a2 6a a2 7 79 94 9b a8 24 6d 30 d2 11 ae f2 d4 6 6a 4c d1 c 69 a9 37 d4 16 42 ef 51 e6 90 12 83 4b ba 91 43 81 a9 5 20 26 4a 9d 69 81 2a 9a 7e ea a1 9 ba 91 e8 2 a4 b5 9d 73 50 cd 62 67 b1 e6 9b 59 9b c 34 c2 28 24 61 14 dd b5 44 89 b6 97 6d 32 7 84 a7 85 aa 20 75 36 a8 91 b4 94 0 53 b3 4c 9 3 d4 82 4a a2 47 89 69 e2 4a a2 7 6f a4 dd 41 27 ff d9 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
The binarys all start with
0xffd8
, which seems correct to me. But I don't know why they ends with zero. I am reading the binary size bymyCAM.read_fifo_length();
so this is the size that the ArduChip gives me. I think this is not caused by DMA allignment of my SPI driver, because in that case MISO should be inactice and I will read all 1 instead of all 0.And sometimes the binary ends with multiple d9, for example a binary with size 4104 sometimes ends with
33 37 81 4a 47 aa ce 6b 33 62 6 a8 5a a8 cc 8c d3 d 51 3 4d 36 99 22 62 9e 5 31 12 2a d4 c9 c5 51 c 99 65 a9 96 7a d1 32 49 d6 e2 a6 5b 8a a1 12 89 69 fb e9 12 34 b5 46 68 11 19 a6 1a 4 6f 97 a6 99 29 94 86 19 aa 33 35 41 64 f 2d 45 e7 54 8c 5d d9 a5 cd 21 8b ba 9c d 21 92 a 99 28 19 3a 54 d9 a6 48 bb aa 39 d 30 2a ca 6b 36 e4 d6 72 36 81 44 b5 46 6b 23 62 23 51 9a a2 8 cd 30 d5 12 33 14 62 99 23 82 d4 81 69 90 48 16 96 a8 91 29 33 4c 43 c3 d4 ab 2d 52 62 26 59 aa 51 35 59 2c 7f 9b 4b be 82 44 cd 30 d2 24 d5 79 6a 13 35 4b 66 a8 8c cb 46 fa 82 88 9d a9 99 a0 64 80 d2 ee a9 18 e0 6a 51 40 c9 52 ac 2d 2 24 6 9f ba a8 42 6e a1 8f 14 c0 a9 2d 67 dc d4 b3 58 99 cc 79 a6 d6 46 a2 1a 61 a0 43 8 a6 6d aa 24 36 d2 ec a6 40 f0 b4 fd b5 44 b 4d aa 10 da 4a 4 14 50 3 c3 53 b7 d5 22 47 89 6a 41 25 51 23 bc ca 37 53 24 ff d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 d9 0 0 0 0 0 0 0 0
I want to know is this expected? If I encode the binary into base64 and send through MQTT, will it cause issue by the decompressor?
Best Regards Zhao