DOC PREVIEW
MIT 6 375 - OGG VORBIS BLUESPEC IMPLEMENTATIN

This preview shows page 1-2-3-4-5-6 out of 19 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 19 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 19 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 19 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 19 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 19 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 19 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 19 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

OGG VORBIS BLUESPEC IMPLEMENTATINMAREK DONIECContents1. Introduction 22. Ogg Vorbis 22.1. The Ogg Container Format 22.2. The Vorbis Audio Codec 22.3. Overview of the decode process 22.4. Vorbis Header Packets 32.5. Vorbis Identification Header 32.6. Vorbis Comment Header 32.7. Vorbis Setup Header Decode 32.8. Vorbis Audio Packet Decode 43. Implementation 63.1. The Decoder 63.2. Debug Mode 143.3. Supported of the Ogg Vorbis Specification 153.4. Possibilities for Parallelization 164. Testing Environment 175. Results and Discussion 18References 19Key words and phrases. Ogg, Vorbis, Bluespec, Verilog, Hardware, FPGA.The author would like to thank Myron King and Kermin Fleming for making their IMDCTimplementation available. The IMDCT core used in this project is developed entirely by them.For continious support throughout the project I would like to thank Prof. Arvind and AbhinavAgarwal.12 MAREK DONIEC1. IntroductionIn this work a Bluespec[1] implementation of an Ogg Vorbis[3] decoder is pre-sented. Ogg Vorbis is an open source, royalty and licence free audio codec developedand maintained by the Xiph.org Foundation [2]. Because of its very serial struc-ture most currently available implementations, even those for embedded systems,are processor based, frequently with an external inverse modified discrete cosinetransform [7]. This project aims to move all parts of the decode process onto anfpga with the ultimate goal to explore the possibily of parallizing the decode pro-cess and making it run in hardware at low clock frequencies. As a first step aBluespec implementation is presented and tested in simulation. The fixed pointdecoder Tremor is used as a reference decoder [6]. All modules but the inversemodified discrete cosine transform are implemented purely in Bluespec and can bethus compiled into verilog and further into hardware. A short analysis is given onwhat needs to be done to make this implementation fit into an FPGA.This report is structures as follows. The second section Describes the Ogg Vorbisaudio format and give a rough outline of the decode process. The third sectionpresents a Bluespec implementation of an Ogg Vorbis decoder. In the forth sectionthe test environment is described. The final section presents results and gives ashort discussion.2. Ogg VorbisThe Ogg Vorbis audio codec actually consists of two formats, the Ogg mediacontainer format and the Vorbis audio codec. Both formats have been developedby Xiph.org, are open source, as well as royalty and license free [2].2.1. The Ogg Container Format. Ogg is a multimedia container format. I isused to encapsulate compressed data from other codecs. This can be a simple Vorbisaudio stream, mutliple audio streams, or mutliplexed audio and video streams. Oggsplitts the data stream into ogg packets. The structure of each packet is as shownin table 1. Each ogg packet can contain up to 255 segments of the underlying datastream.2.2. The Vorbis Audio Codec. Vorbis is the actually audio codec used to com-press the audio signal. The current specification is available at [4]. This sectionstartes with a very short overview of the decode process and proceeds to explainmore technical details in the following subsections. For an in-depth definition ofVorbis please refer to the specification.2.3. Overview of the decode process. A single Vorbis stream can contain upto 255 audio channels. The encoded audio stream is splitt into frames of a givenblocksize, where up to two different blocksizes are used in one Vorbis stream. Eachframe contains information for all encoded autio channels and is stored in a seperateVorbis packet. For each channel in every frame a floor curve and a residue vectorare reconstructed from the logical bitstream. The floor curve contains the roughaudio spectrum, while the residue vector contains the details. If multiple audiochannels are being encoded then inverse coupling is performed after the residueshave been decoded. After this the floor and residue curves are combined for eachchannel by performing a per entry dot product of the two. The result is the audiospectrum for each channel in this frame and is fed into the inverse modified discreteOGG VORBIS BLUESPEC IMPLEMENTATION 3pos bytes field0x0000 4 capture pattern ”‘Oggs”’0x0004 1 stream structure version0x0005 1 header type flag0x0006 8 absolute granule position0x000e 4 stream serial number0x0012 4 page sequence number0x0016 4 page checksum0x001a 1 page segments n0x001b n segment table0x001b + n m packet data segmentsTable 1. Ogg multimedia container format packet.cosine transform (IMDCT). Finally the output of the IMDCT is windowed using afixed window function and overlapped with data from the previous frame to formthe output.The data for the floor curves and residue vectors is encoded using Huffman codingand vector quantization (VQ) tables. However as oposed to other audio codecs, likeMP3, Vorbis does not assume a fixed probability or physioaccoustic model. Thismeans that the Huffman trees and VQ tables used are not know a priori but are alsoencoded in the Vorbis stream. In particular, the first three packets of the streamare header packets that contain this setup information. All the packets after thisare audio packets.2.4. Vorbis Header Packets. Every Vorbis audio stream contains three headerpackets, namely the identification header, the comment header, and the setupheader. These packets have to be stored in just that order. Otherwise the streamis not decodable. Every packet starts with a packet type byte (0x01, 0x03, 0x05respectively) and the 6 bytes long identification string ”‘vorbis”’. The followinginformatin is specific to each packet.2.5. Vorbis Identification Header. The identification header contains informa-tion about the Vorbis version used, the number of audio channels, the sample rate,information about the bitrate of the encoded stream, and finally the two blocksizesused in this pariticular stream. The Vorbis version supported by this decoder isthe only currently existing version, namely Vorbis I, encoded with a 0.2.6. Vorbis Comment Header. The comment header contains metadata likesong name, artists name, or record label. This field is not needed for decoding, butneeds to be identified and skipped properly to guarantee alignment.2.7. Vorbis Setup Header Decode. The setup header contains the majority ofthe information needed to initialize the decoder. It contains the codebooks, theVQ tables, floor setup information, residue setup


View Full Document

MIT 6 375 - OGG VORBIS BLUESPEC IMPLEMENTATIN

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 BLUESPEC IMPLEMENTATIN
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 BLUESPEC IMPLEMENTATIN 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 BLUESPEC IMPLEMENTATIN 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?