JPEG DSaajan Sin6.375 FinSpringDecoderngh Chananal Projectg 2008Outz Overview of JPEGz Problem scopeImplementationzImplementationz Further worklineJPEG Oz Developed in late 198Experts Group)Experts Group)z Optimized for photoretone) imageszNot so good for text/czNot so good for text/cgraphicsz Wide-ranging standarpossible applicationsverview80s (Joint Photographic ealistic (continuous-omputer-generatedomputer-generated rd covering manyBaselinz Most common implemz Design criteria:Simple encoder/decod−Simple encoder/decod− Minimal memory usagSuitable for most com−Suitable for most come JPEGmentationder implementationder implementationgemon use casesmon use casesBaselinz 8 bits per pixel (per coz YCbCr colourspaceSequential encoding ozSequential encoding oz Huffman used for entrz Maximum of 2 sets of zAll tables encoded in fe JPEGomponent) orderorderropy codingpy gfHuffman tablesfileEncoding z Fundamental unit is 8z DCTQuantizationzQuantizationz Reording and entropygpyAlgorithmx8 tiley codingygDiscrete Cosiz Similar to DFT...but usmultiplicationsmultiplicationsne Transformses only realQuantization az Quantization – elemenby quantization matrixby quantization matrix− Reduces bitdepth fromdi l dcorrespondingly encod− Less important informz Diagonal reordering ksimilar frequency togeand Reorderingnt-by-element division xxm 12 to 8, and dd ided sizeation discardedff fkeeps coefficients of etherEntropyz Coefficients stored asintegers (varints)integers (varints)z Lower magnitude numz Each coefficient prece− Zero-run length− Varint size− (0, 0) is end of blockz Tokens are Huffman cy codings variable-length mbers take less spaceeded by an 8-bit token:codedMulticomponz Colour requires 3 comz Chroma components Each component canzEach component can z Interleaved: decoder mrequired`Minimum Coded BloczMinimum Coded Bloc− Up to 10 tilesnent Imagesmponents (Y, Cb, Cr) can be lower resolutionuse different tablesuse different tablesmust switch tables as ck'ckOutz Overview of JPEGz Problem scopeImplementationzImplementationz Further worklineProblemz Bitstream decoderz Not file decoding logicm ScopecTest z C program to read in Jdata structures imagedata structures, imagez Testbench sets up tabdata in, displays outpuplanJFIF file and dump out e bitse bits.bles, streams image utOutz Overview of JPEGz Problem scopeImplementationzImplementationz Further worklineImplemez Intermodule communiinterfacesinterfacesz Memory access via Centationication via Get/Put lient interfaceHuffman Dz Tree structure requiredereferencesdereferencesz `Easy' representation z Instead, record higheseach code length andeach code length andarrayz Easy to generate fromCutoffs/offsets cachedzCutoffs/offsets cachedaccessesDecodinges many pointer very sparsest valid codeword for compute offset into flat compute offset into flat m info in JPEG filed to reduce memoryd to reduce memoryDequantizz Fixed-pointz Uses standard VerilogIDCT is O(n^2)zIDCT is O(n^2)zer & IDCTg multipliersOutz Overview of JPEGz Problem scopeImplementationzImplementationz Further worklineFurthez Debugging... (!) z Faster DCT implemenExperiment with multizExperiment with multiz Trade off –size vs. mz Optimize memory arbr Workntationplier designplier designemory
View Full Document