 Hello, and welcome to this presentation of the STM32 JPEG codec. I will present the features of this encoder decoder used for graphics-oriented applications. The JPEG codec integrated inside STM32 products is a hardware accelerator for JPEG image encoding and decoding. It includes a hardware JPEG header generator and parser for automatic JPEG file handling. All the JPEG tables needed for both encoding and decoding are fully programmable. As the JPEG codec is fully implemented in hardware, it delivers one data pixel per cycle without any CPU load. Thanks to this flexible feature and its high level of performances, the JPEG codec can be used for mJPEG video playback. The JPEG codec works with a standard pixel depth of 8 bits per channel. Encode and decode processes are fully implemented in hardware, but cannot operate simultaneously. Encoding and decoding processes are very efficient, allowing a throughput of one pixel data per clock cycle. JPEG headers can be handled automatically without any CPU load, thanks to the embedded header parser and generator. The JPEG tables needed by the codec are fully programmable. The codec supports up to four quantization tables and four Huffman tables. The JPEG codec has two operating modes for decoding and encoding. During decoding operations, the JPEG header can be automatically parsed. The codec supports all the makers relevant to the JPEG baseline algorithm. All the tables stored in the header are automatically copied into the local codec RAM. The data file is sent to the codec through a 32-byte input FIFO, and the decoded data are available through a 32-byte output FIFO. While encoding, the JPEG codec can automatically generate the JPEG header, copying its internal RAM content into the JPEG header. The output data file is sent through the 32-byte output FIFO while the picture data are fed into the 32-byte input FIFO. The decoding process follows the JPEG baseline algorithm. The file data are sent to the input FIFO. The file header is parsed and the corresponding internal RAM tables are updated. Once the header has been parsed, an interrupt can be raised. The compressed data are sent through the entropy decoder to generate the 8-byte minimum coded units, or MCUs, using the zigzag ordering. The resulting 8-byte tables are de-quantified and transformed through an inverse DCT or IDCT into the original picture data. The encoding process works in a similar way. If the header needs to be generated, the internal tables are copied into the output FIFO with the relevant JPEG markers. Once generated, the picture data to be compressed are sent through the input FIFO by 8-byte pixel blocks. The original data are transformed through a DCT and the resulting matrix is quantified thanks to the user-programmed quantification table. The 8-byte transform table is sent as a bit stream using the zigzag algorithm. The data are then processed by the entropy encoder and the compressed stream is sent through the output FIFO. The JPEG codec has six interrupt sources. Input FIFO threshold and input FIFO not full flags are used to manage the input FIFO either by the CPU or DMA. Output FIFO threshold and output FIFO not empty flags are used to manage the output FIFO either by the CPU or DMA. End of conversion flag indicates the end of the JPEG process. Header parsing done flag indicates the end of the header parsing operation. The JPEG codec is active in run and sleep modes. A JPEG codec interrupt can cause the device to exit sleep mode. In stop mode, the JPEG codec is frozen and its registers content is capped. In standby mode, the JPEG codec is powered down and it must be reinitialized afterwards. Rarable applications require low power management functions together with a high quality user interface. In this scope, the JPEG codec can be used to decode compressed background images or user pictures or even to play back certain videos for tutorials. You can refer to the training slides related to RCC, interrupts, DMA and GPIO for additional information. The JPEG codec is available in the STM32F7 series. For more details, please refer to the ISO IEC 10918-1 standard.