DOC PREVIEW
MIT 6 375 - Ogg Vorbis Decoder Implementation in Bluespec

This preview shows page 1-2-3-4 out of 13 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 13 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 13 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 13 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 13 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 13 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Ogg Vorbis DecoderImplementationin BluespecMarek DoniecMIT CSAIL 2008Image source: http://www.vorbis.com2Ogg What!?Ogg Vorbis audio codec: General purpose, perceptual.Decoder computationally simple.Open source! License & royalty free!3Outline1.) Internal decoder structure.2.) Current hardware implementation.3.) Decoder performance and future work.4Ogg Vorbis Decoderstream decoderesidue decoder*01000101 residue vectorfloor vectorfloor decode IMDCTframe spectrum input bit streamframe overlapPCM output audio frame5Ogg Container for Vorbis DataOgg Vorbis streamheadersegment size tablesegments=Vorbis packetsheader...Ogg packetmore packetsinitialization headercomment headersetup headeraudio packet 0...Vorbis packets6Initialization and Comment Headers●Initialization header:–Vorbis version–Number of channels, sample rate–Small and large frame size (block sizes)●Comment header:–Song title, artist, weblink, ...–Not important for decoder!7Setup Header●Contains probability model:–Huffman codebooks–Vector quantization (VQ) tables–Floors (type, size, resolution, cb index)–Residues (type, size, resolution, passes, cb index)–Modes and Mappings●Needs to be stored for further decode:–Large memory consumption: header > 2kb–When unpacked > 256kb!8Audio Packets●Each packet contains one frame for all channels.●First Floors are stored (coarse spectrum)●Residues follow (spectral details)●Decoder reconstructs spectrum and feeds it to IMDCT. The result is overlapped with previous frames to generate output.9Bluespec ImplementationRAM withOgg Vorbis fileOggReaderRAM → bit streamrule basedhigh level controlinit FSMcomment FSMsetup FSMcb gen FSMaudio FSMreq respstartResidueGenFloorGenCodebooksVQ tablesMemoryCouplingDotIMDCTOverlapOutputPCMreset10Audio Packet Setupm Modesblocksizemappingmode[0]...mode[m-1]mode[1]mode[2]packetmodenumbern Mappingsc Couplingsmagnitude[0]angle[0]mapping[0]...mapping[n-1]mapping[1]mapping[2]currentchannelnumber2 Blocksizesblocksize[0]blocksize[1]...magnitude[c-1]angle[c-1]mux[0]...mux[a-1]s Submapssubmap floor[0]submap residue[0]...submap floor[s-1]submap residue[s-1]f Floorsfloor[0]...floor[f-1]floor[1]floor[2]r Residuesresidue[0]...residue[r-1]residue[1]residue[2]a Muxescouplingstepnumber11Huffman Codebooks●Need low memory usage + fast decode!●Binary tree with one 16 bit entry per node–MSB: data?–15LSB: data/ right child offset–Left child is in next entry.●Current usage: ~16kbHuffman Tree RAM+1001+30+1011213111......01 23000111bit streamfrom packetdecodedentry number......12Codebooks and VQ TablesHuffman Tree RAM+1multiplicand[0]n Codebookscodebook[0]codebook[1]codebook[2]...codebook[n-1]d dimensionse entrieslookup typecase (lookup type)1: l = log (e) lookup values2: l = e / d lookup valueshuffman ram offsetd...multiplicand[l-1]Optional: if lookup type > 0001+30+1011213111......01 23000111bit streamfrom packetdecodedentry numberVQ RAM...value[0,d-1]...value[0,0]...value[e-1,d-1]value[e-1,0].........codeword length[0]...codeword length[e-1]VQ ram offset+·dreturnfixed point vectorVQ context?yesnoreturn integercodebooknumberdelta valuemin value...13Performance and Future Work●Tested with 16 bit mono, 22050 Hz audio files:–Lowest quality < 1 MHz / sec–Highest quality < 2 MHz / sec–Verilog multiplications and Divisions are used!●To be done next:–Place queues and pipeline!–Optimize VQ tables (clock cycles vs RAM)–Test multichannel


View Full Document

MIT 6 375 - Ogg Vorbis Decoder Implementation in Bluespec

Documents in this Course
IP Lookup

IP Lookup

15 pages

Verilog 1

Verilog 1

19 pages

Verilog 2

Verilog 2

23 pages

Encoding

Encoding

21 pages

Quiz

Quiz

10 pages

IP Lookup

IP Lookup

30 pages

Load more
Download Ogg Vorbis Decoder Implementation in Bluespec
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Ogg Vorbis Decoder Implementation in Bluespec and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Ogg Vorbis Decoder Implementation in Bluespec 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?