顯示具有 Compression 標籤的文章。 顯示所有文章
顯示具有 Compression 標籤的文章。 顯示所有文章

2009年9月13日 星期日

Vertical Bit Map Coding

[2009-09-20]

Bad news. I have found one bug in my Matlab code. The bitrate counter have been implemented in a wrong way so that the bitrate have been overcounted. The bitstream of 32kbps is actually the bitstream of 64kbps. Therefore, the coding efficiency shall be further underestimated.

=====================================================

A. Introduction
For recording my research in audio bit plane coding technique, here I demonstrate a series of decoded results produced by a fine-grain-scalable lossy-to-lossless audio coder. The key idea is quite simple but effective. From my doctoral study, I learned the significant map (the most significant bits of all coefficient to be encoded) plays a critical role in both coding efficiency and audio quality. If I can use as less bits as possible to encode the significant map, then the decoded quality will be as good as possible even in a very low bitrate. Unlike the scalable audio coder, Harmonic Quad Tree coding (HQT), in my doctoral thesis, this coder explores the relationship between the most significant bits of two adjacent frequency coefficients, not harmonic relationships among frequency coefficients. In addition, the bit plane coding technique, Set Partitioning In Hierarchical Trees (SPIHT), is absent in the new coder. I would like to named this coder as Vertical Bit Map coding (VBM) at this moment.

B. Experiment
The chosen test audio piece is from "castant" which is a famous test material for audio compression. Due to its rich and fast claps, the audio artifact so called "pre-echo" can be easily perceived after lossy compressed.

The following two examples show an interesting function I called it variable bitrate playback. To make you quickly understand this function, I decoded the bitstreams according a series of specified varying bitrates frame by frame and drawn their spectrum. The figures have the original spectrum in the top, the decoded spectrum in the middle, and the specified varying decoding bitrate of each frame in the bottom.

The first experiment is set the varying bitrate from 16kbps to 64kbps in a step size of 2kbits.


The second experiment is set the varying bitrate from 32kbps to 64kbps in a step unit of 1kbits.
The audio qualities are very defective because these two experiments are extraordinary only for demonstration. In an usual scenario, the varying decoding bitrate is expected to change in a smooth way. For keeping acceptable audio quality, the decoding bitrate would not be allowed to adjust so frequently and amplify so large range in a short time.

There are also some comparsions with other scalable audio coders. They can be downloaded from Result Comparsion, all 44.1KHz, 16-bit, mono.

The file list describes briefly here,
cast_ori.wav – castant original wave file
cast_rec_(16_64_2kbps).wav – the first experiment
cast_rec_(32_64_1kbps).wav – the second experiment
cast_rec_(16kbps).wav – 16kbps fixed rate VBM version
cast_rec_(32kbps).wav – 32kbps fixed rate VBM version
cast_rec_(64kbps).wav – 64kbps fixed rate VBM version
cast32_bsac.wav – 32kbps fixed rate MPEG4 BSAC version
cast32_sac.wav – 32kbps fixed rate Scala SAC version
cast32_hqt.wav – 32kbps fixed rate HQT version
cast32_eac.wav – 32kbps fixed rate Mircosoft EAC version

C. Summary
As a conclusion and a reminder for myself, this VBM coder is an experiment of my speculation in the importance of significat map in audio coding. This VBM audio coder can be categorized as:
1. Fine-scalability: scalable grain is downto 1 bit,
2. Lossy-to-lossless: the embedded bitstream contains all possible playback bitrates, even the archive,
3. Low complexity: there are very few prediction calculations and history storages in analyzing and reconstucting the significant map. Therefore it can be claimed that complexity is equivalent and low in both encoding and decoding,

and has the following features:
1. Encode once, decode many time: the basic goal VBM tries to achieve,
2. Variable bitrate playback: by indicating the decoding bitrate of every frame, decoder can achieve variable bitrate playback in frame scale,
3. Real-time encoding and decoding.

It is noted that the VBM coder has NO
1. Psychoaoustic model: there is no perceptual controlling in the current implement,
2. Window switch: there is no attack detection to control long/short window switch. Yes, there is one single frame size.

2009年7月16日 星期四

Codec, the long-short road

Codec據說是SCREAM Lab的強項之一, 而且應該是蠻強的, 不過我們卻一直低調而且有一點不甘願做. 可是多年來也一直做下來了, 我想因為codec紅, 而且似乎好找事, 所以我們還是有一串研究可以繼續下去.

實驗室的codec其實有audio也有image/video, 最近smallnew與daphne連手做出的image coder很棒的, 希望可以接續下去, 不過最popular的還是MPEG4/264與AAC.

在MPEG-4 video方面, 我們有一個PS3 Cell BE版本, 也是bbb學長的論文裡所用的例子, 還得過教育部比賽第三名, 不過口試委員吳安宇與洪士灝教授希望把SIMD完成, 所以這是雙魚要做的第一件事.



 

其二是在一般非Multicore環境下, 有中多寫得不錯的Open source, 希望雙魚可以將其速度改進並加到SCREAM Lab的SLIM之下.

其三是AAC decoder的改進, 這個跟第二部分相似, 不再贅述.

我必須等雙魚對一干codec有進一步的了解才可以決定下一步要怎麼走, 這是一個紅的領域, 競爭者眾. 不過請放心, 不管是Smallnew/Daphne的image coder或DNA的audio coder都可以跟世界一流的coder一比高下, 就看雙魚的努力有多少, 成就就有多少, 學長姐已經為你開出一條很平坦的路來了.

2008年11月12日 星期三

Fast SPIHT for VLSI

整理了一下Code 目前只能給Source, 沒有文件說明
有興趣的可以下載, 順便看有沒有Bug

這個實作的特點:
1. 編碼用的記憶體少
2. 不需要3個List
3. 每個Coefficient只會讀2次
4. 速度快
5. 編出來的Bitstream和原始的SPIHT完全一樣

2008年11月10日 星期一

2008年11月6日 星期四

2008_11_6電腦音樂與音訊處理課程_MPEG Audio Coder簡介

這幾周的課我會講有關MPEG Audio Coder的基本概念, 內容涵蓋MP3到HE-AAC. 不過投影片包含太多東西, 連File Format都有, 所以我會skip一些這類跟演算法無關的部分. 這份資料是我2007年在光寶科技所做的talk. 希望同學對於傳統與現在的主流音訊編碼技術可以有一個深入淺出的認識.

感謝當初維城, 小鄔與其偉的幫忙, 完成這一份資料.



這是完整的投影片

2008年11月4日 星期二

2008_10_29在MATLAB的演講: Electronic System Level Simulation/Verification in Heterogeneous Environment Using MATLAB/Simulink and FPGA

演講的題目主要是實驗室中所做的把SystemC, FPGA與Matlab/Simulink合起來 一起進行simulation. 我們用很簡單的JPEG encoder來當例子. JPEG的source code是網路上下載的open source. 經過簡單的修改後嵌入到SystemC模組裡, 並且把DCT搬到外面來, 如此可以驗證在三個不同的DCT實做是否一致. 以FPGA來代替一般的HDL Simulato, 速度當然很快.

感謝巴菲特與DNA的協助, 這個demo很成功. 下面是demo的snapshot. webcam對著aaa的背景, 然後用上面的工具壓一張JPEG影像.

  .

 



當天有一百多人來聽, 演講後也有約7,8人來問, 其中還有Sunplus Core的技術副總監, 因為時間有限而且我知道他們的DSP是跟工研院STC技轉來的, 所以我跟他說以後我們會跟STC合作, 以後三方可以就此一議題來合作.

題目與摘要如下:

Electronic System Level Simulation/Verification in Heterogeneous Environment Using MATLAB/Simulink and FPGA

Abstract

Electronic System Level (ESL) design has become the most popular methodology for designing highly complex VLSI systems such as SoC. Instead of working on implementation details, transaction level modeling (TLM) has been considered a powerful method to speed up design process by building a reference model on which hardware and software development can be based. Currently, SystemC2.2 and TLM2.0 library have become IEEE/OSCI standard tools.

However, since modules/parts in a system may be developed separately using different tools in different design stages at different speeds of progress, it is necessary to be able to simulate and verify the system in such a heterogeneous environment. In this talk, system level simulation incorporating SystemC/TLM, MATLAB/Simulink and FPGA is presented. MATLAB which is usually used for algorithm development may sit at the highest abstraction level while FPGA which is used in emulation usually sits at the much lower abstraction level. Hence, simulation/verification across different abstraction levels can be achieved. The consistency of a module designed in different abstraction levels can be maintained. As such, functionality correctness of system can be improved.

投影片在此:

System Level Design/Simulation/Verification Using MATLAB/Simulink and FPGA

鈦思科技的活動網頁在此