⚠️ VeridianOS Kernel Documentation - This is low-level kernel code. All functions are unsafe unless explicitly marked otherwise. no_std

Module codecs

Module codecs 

Source
Expand description

OGG Vorbis and MP3 audio decoders (integer-only, no_std)

Provides software decoding of OGG Vorbis and MPEG-1 Layer III (MP3) audio streams using only integer and fixed-point arithmetic. No floating-point operations are used, making these decoders suitable for kernel context where FPU state may not be available.

§Fixed-Point Formats

  • 16.16: General-purpose, used for volume/gain. 1.0 = 0x0001_0000.
  • 2.30: High-precision twiddle factors for MDCT/IMDCT. 1.0 = 0x4000_0000.

§OGG Vorbis

Implements the OGG container (RFC 3533) and Vorbis I codec (Xiph.org spec):

  • OGG page parsing with CRC32 verification
  • Vorbis identification, comment, and setup header decoding
  • Floor type 1, residue types 0/1/2, codebook Huffman trees
  • MDCT via integer butterfly operations with 2.30 twiddle factors
  • Vorbis window function via fixed-point lookup table

§MP3 (MPEG-1 Layer III)

Implements ISO 11172-3 / ISO 13818-3 Layer III decoding:

  • Frame sync and header parsing (bitrate, sample rate, channel mode)
  • Side information and scalefactor band decoding
  • Huffman decoding (33 tables)
  • Integer requantization via lookup tables
  • Joint stereo (MS and intensity)
  • 36-point and 12-point IMDCT via integer butterflies
  • 32-subband synthesis polyphase filterbank (integer coefficients)

Re-exports§

pub use mp3::*;
pub use vorbis::*;

Modules§

mp3
MP3 (MPEG-1 Layer III) decoder (integer-only, no_std)
vorbis
OGG Vorbis decoder (integer-only, no_std)

Enums§

CodecError
Error type for codec operations

Type Aliases§

CodecResult
Codec result type