Implement SSDV - #1791
Conversation
|
With the power of an LLM there is now also an example that receives and decodes the JPEGs. LLMs are stupid and had to correct some very weird stuff and reduce lotsss of comments. But hey, otherwise we wouldn't have had this example. |
jgromes
left a comment
There was a problem hiding this comment.
Thank you, I only have two comments to the code. Also one general comment - I would really prefer to have the portions of AI-geenrated code marked in some way (e.g. as a comment or note in the doxygen method description).
| // Heap-allocate the ssdv_t decoder state. | ||
| // ssdv_t is a large struct (~2 KB) containing Huffman and quantisation | ||
| // table arrays; heap allocation avoids blowing the stack. | ||
| this->decoder = reinterpret_cast<ssdv_t*>(malloc(sizeof(ssdv_t))); |
There was a problem hiding this comment.
C++ new/delete should really by used here and elsewehre in the file instead of C malloc/free
| /*! | ||
| \brief malloc() returned NULL while allocating the packet buffer. | ||
| */ | ||
| #define RADIOLIB_ERR_SSDV_ALLOC_FAILED (-1506) |
There was a problem hiding this comment.
We ahve a generic error code for failed memory allocations, RADIOLIB_ERR_MEMORY_ALLOCATION_FAILED - I think a new error code is not needed.
See the pictures at https://ssdv.habhub.org/
The included
image.his the 256×256 RadioLib logo.Reception is not implemented. I have a file that receives the LoRa packets and parses the contents. It should be possible to reconstruct the image on-device but I have no incentive to implement this. But happy to add a function and example that returns a struct with the parsed info when supplied with a LoRa packet.
Please have a look at the licensing of the included files. And maybe Reed-Solomon should live in the
utilsdirectory?Closes #129.