Hardware Blocks for Instant AVIF Encoding on SoCs
This article examines the specialized silicon blocks required within a System-on-Chip (SoC) to achieve instantaneous, real-time AVIF still-image encoding directly from a camera pipeline. Because AVIF uses the intra-frame compression tools of the AV1 video codec packaged inside an ISOBMFF container, achieving sub-100 millisecond capture-to-storage times requires tight integration between the image pipeline, a high-throughput AV1 encoding core, low-latency memory architectures, and dedicated bitstream muxing hardware.
1. Dedicated AV1 Hardware Encoder Core
The cornerstone of instant AVIF encoding is a dedicated AV1 hardware video processing unit (VPU) with full intra-frame profile support. AVIF files are essentially standalone AV1 keyframes (intra-frames). The encoder block must feature:
- Spatial Intra-Prediction Engines: Silicon dedicated to calculating 56 directional intra-modes, recursive filtering, and chroma-from-luma (CFL) prediction.
- Transform and Quantization Logic: Support for large 64x64 and recursive rectangular Discrete Cosine Transforms (DCT) and Asymmetric Discrete Sine Transforms (ADST).
- Hardware In-Loop Filters: Real-time processing pipelines for Constrained Directional Enhancement Filter (CDEF) and Loop Restoration (Wiener and self-guided filters) to clean up compression artifacts without software overhead.
- 10-Bit and 12-Bit Color Pipelines: Native hardware support for high dynamic range (HDR) color depths and 4:2:0, 4:2:2, or 4:4:4 chroma subsampling formats.
2. High-Throughput Image Signal Processor (ISP)
Before encoding can occur, the raw sensor data must be conditioned instantaneously. The ISP must be linked directly to the encoding subsystem. Essential capabilities include:
- Real-Time Demosaicing and Denoising: Converting Bayer or Quad-Bayer RAW data into high-resolution color representations without dropping frames.
- Hardware Color Space Conversion (CSC): Converting RAW/linear RGB into YUV color spaces natively supported by the AV1 encoding core.
- Tiling and Slice Partitioning: Splitting ultra-high-resolution images (e.g., 48MP to 200MP) into parallel strips or tiles that can feed multiple encoder cores simultaneously.
3. Direct Memory Access (DMA) and System-Level Cache (SLC)
Transferring uncompressed, multi-megapixel frames to external DRAM creates latency and thermal bottlenecks. Instant encoding requires:
- Zero-Copy Memory Interconnects: A shared, coherent memory bus that allows the ISP to stream processed image buffers directly into the encoder’s input FIFO queues.
- Large On-Chip SRAM / System-Level Cache: Keeping intermediate frames, reference blocks, and transform coefficients on-chip avoids the multi-gigabyte-per-second DRAM bandwidth spikes associated with large still images.
4. Hardware Bitstream Formatter and Container Muxer
Once the AV1 core outputs the compressed Open Bitstream Units (OBUs), the data must be packaged into the standard AVIF container (ISO/IEC 23000-22).
- ISOBMFF Box Generator: A dedicated micro-engine or
hardware-assisted direct-memory-transfer block that writes ISOBMFF
metadata boxes (
ftyp,meta,hdlr,iloc,mdat) in parallel with the compression pipeline. - Metadata Injector: Hardware-accelerated merging of EXIF, XMP, and ICC color profiles into the container stream to ensure the file is finalized immediately as the last image tile completes encoding.