TWI242935B - Encode system, decode system and method - Google Patents

Encode system, decode system and method Download PDF

Info

Publication number
TWI242935B
TWI242935B TW93132042A TW93132042A TWI242935B TW I242935 B TWI242935 B TW I242935B TW 93132042 A TW93132042 A TW 93132042A TW 93132042 A TW93132042 A TW 93132042A TW I242935 B TWI242935 B TW I242935B
Authority
TW
Taiwan
Prior art keywords
symbol
length
encoding
bit
basic
Prior art date
Application number
TW93132042A
Other languages
Chinese (zh)
Other versions
TW200614687A (en
Inventor
Chua-Chin Wang
Chun-Chih Chen
Original Assignee
Univ Nat Sun Yat Sen
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Univ Nat Sun Yat Sen filed Critical Univ Nat Sun Yat Sen
Priority to TW93132042A priority Critical patent/TWI242935B/en
Application granted granted Critical
Publication of TWI242935B publication Critical patent/TWI242935B/en
Publication of TW200614687A publication Critical patent/TW200614687A/en

Links

Landscapes

  • Compression, Expansion, Code Conversion, And Decoders (AREA)

Abstract

The invention relates to a codec (encoder-decoder) system and method for interfacing variable-length and fixed-length data compression. The codec system of the invention is to encode more symbols in the redundant bits of the padding bits of the fixed-length packets. The poor memory efficiency caused by the variable-length words converting into a fixed-length packet such that the compression can be hardwaredly and parallelly processing is significantly improved. The codec system of the invention relaxes the intrinsic poor bit rate of the traditional fixed-length data compression.

Description

1242935 九、發明說明: 【發明所屬之技術領域】 本發明係關於一種編碼系統、解碼系統及其方法。 【先前技術】 在資料壓縮上面,目前學術上已經有許多有效的壓縮方 式被提出來,例如:向量量化編碼(Vect〇r Quantizati〇n)、 離散餘弦轉換編碼(Decrete Cosine Transform)、運行長度編 碼(Rim Length)…等(如美國專利US6731812、uS 6700935、 US6754268),而為了能達到高速的資料壓縮以便能夠應 用,使用赫夫曼編碼和運行長度編碼的組合是較成功的方 式之一,例如 MPEG (Moving Picture Experts Gr〇up,如美 國專利 US 6700935)。 這類可變長度的編碼比固定長度編碼,在理論的分析上 具有較尚的壓縮率的優點。然而可變長度編碼方式(如美國 專利US6717535、US670436卜US6696993)有著兩個嚴重的 缺點:記憶體使用效率差,和資料相互間的依賴性。儘管 上述的兩項缺點可以透過更進一步發展的演算法加以改 善,但是卻必須付出較長的處理時間的代價,這些代價可 能會影響即時影像的品質。 【發明内容】 本發明之一目的在於提供一種編碼方法,用以將複數個 可變長度符號編碼至一固定長度封包,該編碼方法包括以 下步驟··(a)附加至少一多餘位元至一第一長度符號,以成 為一第一基本符號,其中該第一長度符號具有一第一長 96282.doc 1242935 度该弟一基本符號具有一固定長 铃仿一 5 μ 口疋長度,(b)附加至少一個多 餘位7C至一弟二長度符號, » + 苟弟一基本符號,苴中 该弟二長度符號具有一第二長度,該才①一中 m ^ ^ . 省弟—基本符號具有該 ;亥第一及⑷將—第三長度符號做編竭運算,分別置於 基V;:符'及該第二基本符號之多餘位元,使該第-:編::二為一弟一編碼符號,該第二基本符號成為-第 該固定長心 竹说及為第-編碼符號之長度為 本發明之另一目的在於提供。一 7鮮馬方法,用以將一 疋長度封包解碼成複數個可變 度付就,該解碼方法包 括以下步驟:(a)依據一編碼資 為一裳Mo 將帛一編碼符號解碼 馬弟一長度符號及至少一經運瞀夕夕17 左運#之多餘位元,其中該第 一長度符號具有一第一毒疮wu、> # 弟長度,(b)依據該編碼資訊,將一第 二編碼符號解碼為-第二長度符號及至少—經 位元,”該第二長度符號具有一第二長度;及⑷將該: 一編碼符號内之該經運算 做解碼運算,及該第 …扁碼付相之該經運算之多餘位元做解碼運算 -第二長度符號,該第三長度符號具有_第三長度。 =月之又目的在於提供一種編石馬系統,用以將複數 個可變長度符號編碼至一 ’芏固疋長度封包,該編碼系統包 3可文長度解碼器及-多重符號編碼器。該可變長产 解碼器用以附加至少一多雜办-=^ 夕餘位70至一第—長度符號,以成 為-第-基本符號’其中該第一長度符號具有一 度’該第一基本符號具有-固定長度;及附加至少—個; 96282.doc 1242935 餘位元至一第二長度符號,以成 门乐一基本符號,苴中 該第二長度符號具有一第二長产,>笛 u ^ τ ^^^ 度该弟二基本符號具有該 口疋長度。該多重付號編碼器用 m… f 弟二長度符號做編 碼運鼻,分別置於該第一基本符號 χ弟一基本符號之多 餘位元,使該第一基本符號成為_第_ q 矛編碼符號,該第二 基本付號成為一弟一編碼符號,該第一 ^ 矛編碼符號及該第二 、扁碼符號之長度為該固定長度。 本發明之再一目的在於提供一種解 — 但胛馬糸統,用以將一固 疋長度封包解碼成複數個可變長声势 人· 贡度付唬,該解碼系統包 各·至少一早一符號解碼器及一額夕卜游$ & hh 頻外付唬解碼器。該單一 付號解碼器用以依據一編碼資訊,將 ^ ^ 將苐一編碼符號解碼 為一第一長度符號及至少一經運算&彡 思异之夕餘位儿,其中該第 一長度符號具有一第一長度;及將一第― 一 乐一編碼符號解碼為 一第二長度符號及至少-經運算之多餘位元,其中該第二 長度符號具有一第二長度。該額外符號解碼器用以將該第 一編碼符號内之該經運算之多餘位元做解碼^,及該第 二編碼符號内之該經運算之多#位元做解碼㈣,以=成 一第三長度符號,該第三長度符號具有一第三長度。 利用本發明之系統及方法,將經過可變長度編碼後的資 料轉換成可以平行處理的固定長度封包,由於在轉換成固 定長度封包的過程甲會加上一些多餘位元,為了利用這多 餘位元,將其他符號的資料嵌入到這些多餘位元中,以改 善該等增加的多餘位元所造成的影響’可提升編碼及解碼 速度。再者’利用本發明之系統及方法可避免習知可變長 96282.doc 1242935 度編碼之上以個缺點,並且保留f知可變長編碼的優 點。本發明之系統會將可變長度編碼轉換成固定長度的封 包’使得在硬體上解碼時就可以平行的進行。本發明之系 統可以緩和固定長度編碼原有的低壓縮率的問題。 【實施方式】 假設有-個集合H,且H=(S,P),其令s為一個來源符號 的集口 ’ S-{S】 ’s2’ s3’…,sn} ’其中每—個符號對應的出 現機率為P1,也就是P(S1)=P1。依據每一個符號的出現機 率,可以建構出一個赫夫曼樹,由赫夫曼樹可以找出每一 個符號的赫夫曼編碼’其中,最長的赫夫曼編碼的長度為m。 為了讓每-個符號的編碼都等I,我財在每一個編碼 長度小於m的赫夫曼編碼後面加上〇,使得每—個符號的編 碼長度都等於m,我們稱這些加上去的位元為多餘位元。這 些多餘位元的加入會使得整個編碼後的資料大量的增加, 為了改善這個現象,最簡單的方式就是將其他符號的編法 甘欠入到這些多餘位元中。 首先’我們將已經加上多餘位元的X個符號,看成一個固 定長度的封包,我們稱這些符號為基本符號(BS,Basic Symbol)。接著,計算這些基本符號總共包含了幾個多餘位 元,如果多餘位元的數目大於一個基本符號的長度,則這 些多餘位元可以嵌入一個基本符號的資訊,如果多餘位元 的數目大於兩個基本符號的長度,則這些多餘位元可以嵌 入兩個基本符號的資訊,以此類推。我們稱這種編碼為 多重符號編碼,其中X為基本符號的個數,γ為多餘位元可 96282.doc 1242935 嵌入的最多基本符號數。這些嵌入在多餘位元的符號我們 稱為附加符號(ES,Extra Symbol)。 依據不同的赫夫曼樹,χ-γ編碼會有不同的組合,例如 1 3 3 2…4。為了使演异法易於了解,我們採用2_i 多重符號編碼的方式做為本發明演算法的例子。所謂多 重符號編碼即為2個基本符號之多餘位元總和大於丨個基本 符號,並使該丨個基本符號可以嵌入該2個基本符號之多餘 位元内。 假設有兩個基本符號Si和Sj,在不失一般性的情形下,假 設叫。其中’ Si為一第一基本符號,&為一第二基本符號。 Sfh a2 …ai ai+1 ai+2...am)=(a】a2 〇〜〇) sj-(bi b2 …bj bj + 1 bj+h.bmXbi b2…bj 0…〇) 其中ai心…ai和bl b^..bj分別是\和Sj的赫夫曼編碼,其 他的位元収加上〇的多餘位元。亦即,該第—基本符號^ i括第長度符唬(ai a^..ai)及複數個多餘位元,該第二 基本㈣Sj包括—第二長度㈣(Μ..、)及複數個多餘位 兀參考圖1所不’該第一基本符號&包括該第一長度符號 及複數個多餘位元。該第二基本符號§」包括該第二長 f符號(1,1,〇)及複數個多餘位元。該第一基本符號Si及該 第二基本符號Sj為固定長度(等於5)。 接著假設將被嵌入至上述多餘位元的第三長度符號^ 為: \=(。丨 c2…Ck ck+1 ck+2…cm) 其中c】4··.4是sk的赫夫曼編碼。如圖丨所示,該第三長 96282.doc 1242935 度符號s^(l, 1,1,〇, ο),其長度kg5。 當㈣叫+(則)時,,亦即依據固定長度之該第一基本符 號及該第二基本符號的多餘位元數目總和,決定是否嵌入 該第三長度符號。在本實施例中,m為該固定長度等於5, i 為第-長度符號之長度為2, j為第二長度符號之長度為3, k為第三長度符號之長度為5。因此,在本實施例中, 5=(5_2)+(5·3) ’該第-基本符號及該第二基本符號的多餘 位元數目,恰可嵌入該第三長度符號。 配合參考圖1 ’詳細說明本發明之該編碼方法之步驟: ⑻)將第-基本符號Sl和第二基本符μ的多餘位元的 起始位置分別標示為P i和P j。 _第-基本符號Si和第二基本符號\的長度延伸到m 個位元,並將延伸的多餘位元初始化為〇。 (E3)從第三長度符號Sk的第一個位元(即最高位元開 始’將違第二長度符號sk之-最高位元(ei==1)與該第一長度 符號之一最低位元(a产0)做X0R的運算,將運算結果置於該 第一基本符號之該起始位置標示之多餘位元。亦即,在第 一基本符號之多餘位元起始位置(api)為上述運算之結果 =1),如圖1之(E3)之步驟⑷所示。 Ρϊ 接著,將該第三長度符號Sk之一次高位元(C2=1)與在該起 始位置標示之多餘位元(\=”做乂〇11的運算,將運管姅果 置於該第一基本符號之該起始位置標示之下一多餘位元 (aPm=0),如圖1之(E3)之步驟⑻所示。 重複上述步驟⑻,依序將該第三長度符號之—位元㈣) 96282.doc 10- 1242935 與在該第一基本符號8之一 、、工連#之多餘位兀(aPi+I=0)做 XOR的運算,將運算社杲罟於 开、、°果置於下一未經運算之多餘位元 (aPl+2=l) ’直到該第—基本符號&之—最低位元被取代為 止,使該第-基本符號成為一第一編碼符號,如圖i之㈣ 之步驟(C)所示。 (二將該第三長度符號未經運算之—最高位元(㈣)與 :»亥第-基本符號&之該最低位元、+ 2=1)做x〇R的運 异,將運算結果置於該第二基本符號K —最低多餘位元 (bPj + 1 = l),如圖1之斤4)之步驟⑷所示。 重複上述步驟,依序將該第三長度符號未經運算之一位 7G (C5-〇)與在該第二基本符號之一經運算之多餘位元 (bPj + 1 = l)做XOR的運算,將運算結果置於下一未經運算之多 餘位元(b^· =1),直到該第三長度符號之最低位元均經運算 並置於該第二基本符號之一結束多餘位元為止,使該第I 基本符號成為一第二編碼符號。亦即,從第二基本符號I 的最低位元往最高位元的方向重複x〇R的運算,直到所有 的Sk都被肷入至多餘位元中,如圖1之(E4)之步驟(匕)所示。 在本貫施例中,因k=(m-i)+(m-j),該第三長度符號恰可 兀全嵌入至多餘位元。當時,在第二基本符 號Sj中將會有到bP(n小υ的多餘位元沒有用到,依舊維持初 始4匕的0。 只要在多餘位元的長度比要額外符號的長度要長的情況 下’此編碼方式可以輕易的應用到更高階的編碼方式,例 如 3-2,4-2,5-3.··等。 96282.doc -11 - 1242935 配合參考® 2 ’詳細說日林發明之該解碼方法之步驟,在 接收端的解碼步驟可以說是將上述提到的編碼步驟反轉過 來,其步驟說明如下·· (D1)依據上述編射法之—編碼資訊,將-第-編碼符 號解碼為一第一長声爲缺]R S , 负度付唬及至少一經運算之多餘位元,其 中邊第-長度符號具有—第一長度;及依據該編碼資訊, 將-第二編碼符號解碼為一第二長度符號及至少一經運算 之多餘位元’其中該第二長度符號具有一第二長度。亦即 ,出M°Sj的原始赫夫曼編碼的最後位元的位置,分別將其 標示為P i和P j。 ㈣依據該編碼資訊,取得該第二編碼符號Sj之-結束多 餘位元(bPj + 1 1) ’朝该第二編碼符號Sj之最低位元方向,該 1夕餘位7L與相鄰之多餘位元〜+ 2=Wx〇R的運算,將 運Μ果(等於0)置於一堆疊器(stack)中;料,從、開始 對,低位7L方向的下—個位元做丽的運算,將結果送入 堆噓中。重複上述步驟,朝該第二編碼符號Sj之最低位元 方向依序將㈣二編碼符號\之—多餘位元與相鄰之多 餘位7G做XOR的運#,並依序將運算結果置於該堆疊器 中,直到該第二編碼符號8』之最低多餘位元。亦即,往最 低位7G方向重複:^的運算直到^的肖尾,並將運算的結 果送入堆疊中。 (D3)將该第二編碼符號\之最低多餘位元广〇與該 第編碼符旒&之最低多餘位元(aPi+3=l)做X〇R的運算,將 運算結果(等於〇)置於該堆疊器中。 96282.doc -12- 1242935 (D4)朝該第—編碼符號SI之最高位元方向,該第-編碼符 说SA最低多餘位元κ + 3=1)與相鄰之多餘位元(% = 〇)做 x〇R的運算,將運算結果(等於υ置於該堆疊器中,如圖2 之(二)之步驟⑷所示,·重複上述步驟,朝該第一編碼符號 之最高位元方向,依序將該第一編碼符號&之一多餘位元 (aPi+2,與相鄰之多餘位元(apHi = 1)做職的運算並依序 將運算結果(等於1}置於該堆疊器中,如圖叫以)之步驟⑻ 所不。重複上述步驟,直到該第一編碼符號中該第-長度 ^虎之最後位元位置,如圖2之(〇4)之步驟⑷所示。 (D5)由該堆疊器中之最高位元至最低位元,依序取出該 堆疊器之内容,則為該第三長度符號心。 隨著應用的不同’赫夫曼樹也不—樣,演算法的實作上 也隨著不同’所以本發明以MPEG_4的赫夫曼樹為主,採用 2-1多重符號編碼解碼演算法說明之。 參考圖3所示’本發明之編碼系統3 〇,用以將複數個可變 長度符號編碼至—固定長度封包。該編碼系統3G包含:一 可變長度解碼器301及一多重符號編碼器3〇2。配合參考圖^ 之步驟(E2),該可變長度解碼器3〇1用以附加至少一多餘位 兀至一第一長度符號,以成為-第-基本符號Si,其中該 第一長度符號具有—第—長度,該第一基本符號具有一固 疋長度,及附加至少一徊农抓Λν _ X 咕 ^ ^ 個多餘位几至一第二長度符號,以 成為-第二基本符號Sj,其中該第二長度符號具有一第二 長度,該第二基本符號S具有該固定長度。 可變長度解碼器3 0 1將輪入的可變長度串流轉換成固定 96282.doc -13- 1242935 又付號並輸出此時多餘位元的長度,因此必須4切的找 出每個符號的編碼和長度,此發明使用有限狀態機來實現 這個區塊。將赫夫曼樹中的每個節點當成—個狀態,每輸 入個位元就從赫夫曼樹的根往葉節點方向轉換狀態,當 到達葉節點後,依據目前的狀態即可知道目前這個符號的 編碼和長度,接著將此符號的編碼加上多餘位元後轉換成 固定長度的封包,㈣將固冑長度的封包和多餘位元的長 度輸出。 該多重符號編碼器302用以將一第三長度符號做編碼運 异,分別置於該第-基本符號及該第二基本符號之多餘位 疋’使該第-基本符號成為一第一編石馬符號,該第二基本 符號成為-第二編碼符號,該第'編碼符號及該第二編碼 符號之長度為該固定長度’如圖i之步驟㈣及(e4)所示。 依據上述實施例之說明,該多重符號編碼器則系將第三 長度符號做爾的編碼運算。並且,該多重符號編碼器3〇2 依據固定長度之該第一基太鉻铼 一 币丞丰付唬及该第二基本符號的多餘 位元數目總和,決定是否嵌入哕筮_ 〇 入°亥弟二長度符號。該多重符 就編碼裔3 0 2以有限狀能德的古斗、盘 心钺的方式貫現多重符號編碼演算 法,依據上述說明之2-1編碼、、宫瞀、、土 属碼肩异法,可以得到此有限狀態 機的狀態流程圖,如圖4所示。 本發明之編碼系統30另包括一鏟播σ ^ 轉換态303,用以將並列輸 入之固定長度第一編碼符號乃笼一 及第一編碼符號封包轉換成一 序列輸出之固定長度封包。 參考圖5所示,本發明之解碼备 解碼糸統50用以將一固定長度封 96282.doc -14- 1242935 包解碼成複數個可變長度符號。該解碼系統5〇包含:至少 一單一符號解碼器502、503及一額外符號解碼器5〇4。該單 一符號解碼器502用以依據-編碼資訊,將一第一編碼符號 解碼為-第-長度符號及至少—經運算之多餘位元,其中 該第一長度符號具有一第一長度。該單一符號解碼器5〇3 將一第二編碼符號解碼為一第二長度符號及至少一經運算 之多餘位元,其中該第二長度符號具有一第二長度。該單 -:號解碼器502及503可輸出該第一長度符號及該第二長 度符號,並將經運算之多餘位元傳送至該額外符號解碼器 504 〇 亦P單符唬解碼器502、503的功能在於解出每一個 ,本付#u的多餘位元的數量,並將其還原為未嵌入的額外 们虎的基本符號。單_符號解碼器5〇2、如採用查表的方 式依據MPEG-4的_夫曼編碼表將其加上多餘位元的編碼 轉換成運行長度(RunLength)的編碼,4就是在經過可變長 度編碼之前的資料。單一符號解碼器502、5〇3除了將輸出 運订長度、4碼外’也會輸出此符號編碼所包含的多餘位元 長度至額外符號解碼器504。 :額:卜符號解碼器504用以將該第一編碼符號内之該經 夕餘位7C做解碼運算,及該第三編碼符號内之該經 异之多餘位元做解碼運算’以組成一第三長度符號,該 弟,長度符號具有—第三長度。 外符號解碼㈣4依據該卜編碼符號内之該經運 异之夕餘位S,及該第二編碼符號内之該經運算之多餘位 96282.doc -15- !242935 編碼符號及該第二編碼符號内是 如果有的話,將依據上述實施例 元長度總合,判斷該第一 否嵌入該第三長度符號。 < 1夕ί符唬解碼演算法將第三I度符冑的資料解碼出 來並依據MPEG-4的赫夫曼編瑪表轉換成運行長度編碼輸 出。在本發明中查表的方式皆以硬體接線的方式完成,以 :加解碼¥的速度。其中,該額外符號編碼器5⑸用以將該 第=編碼符號内之該經運算之多餘位元做x〇R的運算,及 該第二編碼符號内之該經運算之多餘位元做x〇r的運算。 本發明之解碼系統50另包括一轉換器5〇1,用以將一序列 輪入之固疋長度封包轉換成並列輸出之固定長度第一編碼 符號及第二編碼符號。 图員示本發明之多重符號編碼器以台灣積體電路公司 之0.35 um 2P4M 〇以〇3製程佈局後所作的模擬,在最慢的 製程角落(SS Corner)下,多重符號編碼器在工作頻率為1〇〇 MHz日守的輸出波形。圖7顯示本發明之多重符號解碼器以台 Θ積體電路公司之〇·35 um 2P4M CM〇s製程佈局後所作的 模擬,在最慢的製程角落(ss corner)下,多重符號解碼器 在工作頻率為1 66 MHz時的輸出波形。 本發明可適用於·· DVD播放器、影音多媒體手機等等, 但不限於上述之應用。惟上述實施例僅為說明本發明之原 理及其功效,而非限制本發明。因此,習於此技術之人士 了在不运月本發明之精神對上述實施例進行修改及變化。 本發明之權利範圍應如後述之申請專利範圍所列。 【圖式簡單說明】 96282.doc -16- 1242935 圖1為本發明編碼方法之實施例示意圖; 圖2為本發明解碼方法之實施例示意圖·, 圖3為本赉明編碼糸統之架構圖; 圖4為本發明編碼方法之流程示意圖; 圖5為本發明解碼系統之架構圖; 圖6為本發明編碼系統之輸出波形圖(工作頻率為1〇〇 MHz);及 圖7為本發明編碼系統之輸出波形圖(工作頻率為1⑼ MHz) 〇 【主要元件符號說明】 30 本發明之編碼系統 301 可變長度解碼器 302 多重符號編碼器 303 並列輸入轉換序列輸出之轉換器 50 本發明之解碼系統 501 序列輸入轉換並列輸出之轉換器 502 、 503 單一符號解碼器 504 額外符號解碼器 96282.doc1242935 IX. Description of the invention: [Technical field to which the invention belongs] The present invention relates to an encoding system, a decoding system, and a method thereof. [Previous technology] In terms of data compression, many effective compression methods have been proposed in the academic field, such as: vector quantization coding (Vect〇r Quantizati〇n), discrete cosine transform coding (Decrete Cosine Transform), run-length coding (Rim Length) ... etc. (such as US Patent US67318112, uS 6700935, US6754268), and in order to achieve high-speed data compression so that it can be applied, using a combination of Huffman coding and run-length coding is one of the more successful methods, such as MPEG (Moving Picture Experts Grup), such as US Pat. No. 6,700,935. This type of variable-length encoding has the advantage of a higher compression ratio in theoretical analysis than fixed-length encoding. However, variable-length encoding methods (such as US patents US6717535, US670436, and US6696993) have two serious disadvantages: poor memory use efficiency and the dependence of data on each other. Although the above two shortcomings can be improved by further developed algorithms, they must pay a longer processing time, which may affect the quality of the real-time image. SUMMARY OF THE INVENTION An object of the present invention is to provide an encoding method for encoding a plurality of variable-length symbols into a fixed-length packet. The encoding method includes the following steps: (a) At least one extra bit is added to A first length symbol to become a first basic symbol, wherein the first length symbol has a first length 96282.doc 1242935 degrees, and the first basic symbol has a fixed long bell imitation of a 5 μ mouth length, (b ) At least one extra digit 7C is added to the first and second length symbol, »+ Gotti, a basic symbol, and the second and second length symbols have a second length, so only ① one m ^ ^. Provincial-the basic symbol has The first and second symbols will be used to perform the exhaustion calculation on the third length symbol, and are placed in the base V ;: symbol 'and the extra bits of the second basic symbol, so that the first- A coding symbol, the second basic symbol becomes-the first fixed heart and said-the length of the-coding symbol is another object of the present invention to provide. A fresh horse method, which is used to decode a packet of length into a plurality of variables, and the decoding method includes the following steps: (a) decoding a coded symbol for a younger brother and a length symbol according to a code for a skirt Mo And at least one extra bit of Yun Zuo Xi 17 Zuo Yun #, where the first length symbol has a first poisonous sore, ># brother length, (b) a second encoding symbol according to the encoding information Decode to-a second length symbol and at least-warp bits, "the second length symbol has a second length; and ⑷ the: the operation within a coded symbol for a decoding operation, and the first ... In contrast, the calculated extra bits are used for decoding operations-the second length symbol, and the third length symbol has a third length. = The purpose of the month is to provide a stone horse system for changing a plurality of variable lengths. The symbol is encoded into a packet with a fixed length, and the encoding system includes a 3-length decoder and a -multi-symbol encoder. The variable-length decoder is used to attach at least one more miscellaneous-= ^ evening surplus 70 to A first-length symbol to become- -Basic symbol 'where the first length symbol has a degree' The first basic symbol has-a fixed length; and at least one additional; 96282.doc 1242935 bits to a second length symbol to form a basic symbol of Menlo , The second length symbol in 苴 has a second long product, > flute u ^ τ ^ ^ ^ degree, the second basic symbol has the length of the mouth. The multi-number sign encoder uses m ... f second length symbol The coding nose is placed in the extra bits of the first basic symbol χ and a basic symbol, respectively, so that the first basic symbol becomes a _th_q spear code symbol, and the second basic symbol becomes a first code symbol. The length of the first ^ code symbol and the second and flat code symbols is the fixed length. It is another object of the present invention to provide a solution-but the system is used to decode a fixed-length packet into a complex number. Variable-length momentum guys · Gongdu Fufu, the decoding system includes at least one early symbol decoder and one $ $ & hh out-of-band decoder. The single payout decoder is based on a Encoding information, ^ ^ will (I) decoding a coded symbol into a first length symbol and at least one operation & 彡 彡 异 余, where the first length symbol has a first length; and decoding a first-a music and one coding symbol into A second length symbol and at least-operated extra bits, wherein the second length symbol has a second length. The extra symbol decoder is used to decode the extra bits in the first encoded symbol ^, And the calculated number of # bits in the second encoding symbol to decode ㈣, to = into a third length symbol, the third length symbol has a third length. Using the system and method of the present invention, After the variable-length coded data is converted into a fixed-length packet that can be processed in parallel, some extra bits will be added in the process of converting into a fixed-length packet. In order to use this extra bit, the data of other symbols are embedded in Among these extra bits, to improve the influence caused by these extra bits, the encoding and decoding speed can be improved. Furthermore, using the system and method of the present invention can avoid a shortcoming of the conventional variable length 96282.doc 1242935 degree coding, and retain the advantages of the known variable length coding. The system of the present invention converts a variable-length code into a fixed-length packet 'so that it can be decoded in parallel in hardware. The system of the present invention can alleviate the problem of the low compression rate inherent in fixed-length encoding. [Embodiment] Assume that there is a set H and H = (S, P), and let s be a set of source symbols. S- {S] 's2' s3 '..., sn}' Each of them The occurrence probability of the corresponding sign is P1, that is, P (S1) = P1. According to the occurrence probability of each symbol, a Huffman tree can be constructed. From the Huffman tree, the Huffman coding of each symbol can be found. Among them, the length of the longest Huffman coding is m. In order to make the encoding of every symbol equal to I, we add 0 to each Huffman encoding whose encoding length is less than m, so that the encoding length of each symbol is equal to m. We call these added bits Yuan is extra bits. The addition of these extra bits will greatly increase the entire encoded data. In order to improve this phenomenon, the easiest way is to owe the coding of other symbols to these extra bits. First, we will regard the X symbols with extra bits as a fixed-length packet. We call these symbols the basic symbols (BS, Basic Symbol). Next, calculate that these basic symbols contain a few extra bits in total. If the number of extra bits is greater than the length of a basic symbol, these extra bits can embed the information of a basic symbol. If the number of extra bits is greater than two The length of the basic symbol, these extra bits can embed the information of the two basic symbols, and so on. We call this encoding as multiple symbol encoding, where X is the number of basic symbols and γ is the maximum number of basic symbols that can be embedded in the extra bits 96282.doc 1242935. These symbols embedded in extra bits are called extra symbols (ES, Extra Symbol). According to different Huffman trees, there are different combinations of χ-γ coding, such as 1 3 3 2 ... 4. In order to make the algorithm easier to understand, we use 2_i multiple symbol coding as an example of the algorithm of the present invention. The so-called multiple symbol coding is that the sum of the extra bits of the two basic symbols is greater than 丨 basic symbols, and the 丨 basic symbols can be embedded in the extra bits of the 2 basic symbols. Suppose there are two basic symbols Si and Sj, and without losing generality, suppose to call. Where 'Si is a first basic symbol and & is a second basic symbol. Sfh a2… ai ai + 1 ai + 2 ... am) = (a) a2 〇 ~ 〇) sj- (bi b2… bj bj + 1 bj + h.bmXbi b2… bj 0… 〇) where ai heart… ai and bl b ^ .. bj are Huffman codes of \ and Sj respectively, and the other bits receive the extra bits plus 0. That is, the first elementary symbol ^ i includes the first length symbol (ai a ^ .. ai) and a plurality of redundant bits, and the second elementary jSj includes a second length ㈣ (M ..,) and a plurality of extra bits. The redundant bits refer to FIG. 1. The first basic symbol & includes the first length symbol and a plurality of redundant bits. The second basic symbol § "includes the second long f symbol (1, 1, 0) and a plurality of extra bits. The first basic symbol Si and the second basic symbol Sj have a fixed length (equal to 5). Then suppose that the third length symbol to be embedded in the above extra bits ^ is: \ = (. 丨 c2… Ck ck + 1 ck + 2… cm) where c] 4 ·· .4 is the Huffman coding of sk . As shown in FIG. 丨, the third length 96282.doc 1242935 degree symbol s ^ (l, 1, 1, 0, ο) has a length of kg5. When the tweet is + (then), that is, whether to embed the third length symbol is determined based on the sum of the number of extra bits of the first basic symbol and the second basic symbol of a fixed length. In this embodiment, m is the fixed length equal to 5, i is the length of the first length symbol is 2, j is the length of the second length symbol is 3, and k is the length of the third length symbol is 5. Therefore, in this embodiment, 5 = (5_2) + (5 · 3) ', the number of extra bits of the first basic symbol and the second basic symbol can be embedded in the third length symbol. With reference to Fig. 1 ', the steps of the encoding method of the present invention will be described in detail: ⑻) The start positions of the extra bits of the first basic symbol S1 and the second basic symbol μ are marked as P i and P j, respectively. The length of the -th basic symbol Si and the second basic symbol \ extends to m bits, and the extended extra bits are initialized to 0. (E3) Starting from the first bit of the third length symbol Sk (that is, the most significant bit) will violate the -most significant bit (ei == 1) of the second length symbol sk and the least significant bit of the first length symbol The element (a produces 0) performs the operation of X0R, and places the result of the operation in the extra bit indicated by the starting position of the first basic symbol. That is, the starting position (api) of the extra bit in the first basic symbol. The result of the above operation = 1), as shown in step ⑷ of (E3) in FIG. 1. Ρϊ Next, perform the operation of the first high-order bit (C2 = 1) of the third length symbol Sk and the extra bit (\ =) marked at the starting position on 乂 〇11, and place the transport management result in the first place. An extra bit (aPm = 0) below the starting position of a basic symbol is shown in step (E3) of Fig. 1. Repeat the above step ⑻, and sequentially place the third length symbol in- Bit ㈣) 96282.doc 10- 1242935 Performs XOR operation with the redundant bit (aPi + I = 0) of Gonglian #, which is one of the first basic symbols 8. ° If it is placed in the next unused extra bit (aPl + 2 = l) 'until the first-most symbol & the lowest bit is replaced, the first-most symbol becomes a first encoding symbol , As shown in step (C) of (i) in (i). (2) The third-length symbol has not been calculated—the highest bit (㈣) and: »The lowest bit of the basic symbol &, + 2 = 1) Do the operation of x〇R, and place the result of the operation in the second basic symbol K — the least significant bit (bPj + 1 = l), as shown in step ⑷ of Figure 4). Repeat The above steps, according to Perform an XOR operation on the uncalculated bit 7G (C5-〇) of the third length symbol and the extra bits (bPj + 1 = l) calculated on one of the second basic symbols, and place the result of the operation below An uncalculated redundant bit (b ^ · = 1), until the lowest bit of the third length symbol is calculated and placed in one of the second basic symbols to end the redundant bit, so that the first basic symbol It becomes a second encoding symbol. That is, the operation of x〇R is repeated from the lowest bit to the highest bit of the second basic symbol I until all Sks are inserted into the extra bits, as shown in Figure 1. The step (dagger) of (E4) is shown. In the present embodiment, because k = (mi) + (mj), the third length symbol may be fully embedded into the extra bits. At that time, in the second In the basic symbol Sj, there will be bP (n small υ extra bits are not used, and the initial 4 is still 0. As long as the length of the extra bits is longer than the length of the extra symbol, this encoding Method can be easily applied to higher-order encoding methods, such as 3-2, 4-2, 5-3, etc. 96282.doc -11-1242935 Refer to ® 2 'for details of the decoding method invented by Nichirin. The decoding step at the receiving end can be said to reverse the encoding step mentioned above. The steps are described as follows. (D1) According to the above coding method —Encoding information, decoding the -first-coded symbol into a first long sound is missing] RS, negative bluff and at least one extra bit that has been calculated, where the side-length symbol has -first length; and according to the Encoding information, decoding the second encoding symbol into a second length symbol and at least one extra bit after operation, wherein the second length symbol has a second length. That is, the position of the last bit of the original Huffman code of M ° Sj is denoted as P i and P j respectively. ㈣According to the encoding information, obtain the -end redundant bit (bPj + 1 1) of the second encoding symbol Sj toward the lowest bit of the second encoding symbol Sj, and the remaining 7L of the night and the adjacent excess Bit ~ + 2 = Wx〇R operation, put the operation result (equal to 0) in a stack; it is expected that from, start to, the next 7 bits in the lower 7L direction do beautiful calculations And send the results to the pile of boo. Repeat the above steps, and sequentially execute the second encoding symbol \ of the second encoding symbol Sj-the redundant bit and the adjacent redundant bit 7G XOR operation #, and sequentially place the operation result in In the stacker, up to the lowest redundant bit of the second encoding symbol 8 ′. That is, the operation is repeated toward the lowest 7G direction: the operation of ^ is performed until the end of the ^, and the result of the operation is sent to the stack. (D3) Perform the XOR operation on the lowest redundant bit of the second encoding symbol \ and the lowest redundant bit (aPi + 3 = 1) of the second encoding symbol 旒 &, and calculate the operation result (equal to 0). ) In the stacker. 96282.doc -12- 1242935 (D4) toward the highest bit of the first-coded symbol SI, the second-coded symbol says the lowest excess bit of SA κ + 3 = 1) and the adjacent excess bit (% = 〇) Do the operation of x〇R, put the result of the operation (equal to υ in the stacker, as shown in step (2) of Figure 2), repeat the above steps toward the highest bit of the first coding symbol Direction, sequentially perform an operation on one of the redundant bits (aPi + 2) of the first coding symbol & and the adjacent redundant bits (apHi = 1), and sequentially set the operation result (equal to 1) In the stacker, as shown in step ⑻ of the figure), repeat the above steps until the last bit position of the -length ^ tiger in the first coding symbol, as shown in step (〇4) of Fig. 2 (D5) From the highest bit to the lowest bit in the stacker, sequentially taking out the contents of the stacker is the third length symbol center. With different applications, the Huffman tree also No, the implementation of the algorithm also varies according to the 'so this invention is based on the MPEG_4 Huffman tree, using 2-1 multiple symbol encoding and decoding algorithm description Refer to the encoding system 3 of the present invention shown in FIG. 3 for encoding a plurality of variable-length symbols into a fixed-length packet. The encoding system 3G includes a variable-length decoder 301 and a multi-symbol encoding. Device 302. In conjunction with step (E2) referring to Figure ^, the variable-length decoder 3101 is used to append at least one extra bit to a first length symbol to become a -th-basic symbol Si, where The first length symbol has a first length, the first basic symbol has a fixed length, and at least one extra length Λν _ X is added to a second length symbol to become a first Two basic symbols Sj, wherein the second length symbol has a second length, and the second basic symbol S has the fixed length. The variable-length decoder 3 0 1 converts a rounded variable-length stream into a fixed 96282. doc -13- 1242935 also signs and outputs the length of the extra bits at this time, so you must find the code and length of each symbol in 4 cuts. This invention uses a finite state machine to implement this block. The Huffman tree Each node in the network is regarded as a state, Each input bit changes the state from the root of the Huffman tree to the direction of the leaf node. When the leaf node is reached, the current code and length of the symbol can be known according to the current state. After the bits are converted into a fixed-length packet, the fixed-length packet and the length of the extra bits are output. The multi-symbol encoder 302 is used to encode a third-length symbol and place it in the- The basic symbol and the extra bits of the second basic symbol 'make the first basic symbol a first stone horse symbol, the second basic symbol become a second encoding symbol, the first encoding symbol and the second encoding The length of the symbol is the fixed length 'as shown in steps (i) and (e4) of FIG. According to the description of the above embodiment, the multi-symbol encoder performs encoding operation on the third-length symbol. In addition, the multi-symbol encoder 30 determines whether or not to embed 哕 筮 〇〇 °° based on the sum of the fixed-length first base chrome, one coin, full payment, and the number of extra bits of the second basic symbol. Brother two length symbol. The multi-symbol is a code-generating 3 0 2 that implements a multi-symbol coding algorithm in the form of finite fighting and enthusiasm. According to the above description of the 2-1 coding, the code, the palace, and the native code are different. Method, you can get the state flow chart of this finite state machine, as shown in Figure 4. The encoding system 30 of the present invention further includes a broadcast σ ^ conversion state 303 for converting a fixed-length first encoding symbol input in parallel into a cage and the first encoding symbol packet into a sequence of fixed-length packets. Referring to FIG. 5, the decoding system 50 of the present invention is used to decode a fixed-length packet 96282.doc -14-1242935 into a plurality of variable-length symbols. The decoding system 50 includes: at least a single symbol decoder 502, 503 and an additional symbol decoder 504. The single-symbol decoder 502 is configured to decode a first coded symbol into a -th-length symbol and at least an extra bit after operation according to the -coded information, wherein the first-length symbol has a first length. The single symbol decoder 503 decodes a second coded symbol into a second length symbol and at least one extra bit after operation, wherein the second length symbol has a second length. The single-: number decoders 502 and 503 may output the first length symbol and the second length symbol, and transmit the extra bits after the operation to the additional symbol decoder 504. Also, the single-sign decoder 502, The function of 503 is to find out the number of extra bits in each of them, and pay them back to the basic symbols of the extra embedded tigers. Single _symbol decoder 502. If a table lookup method is used to convert the code with the extra bits into a RunLength code according to the MPEG-4 _Fuman coding table, 4 is in a variable Information before length encoding. The single symbol decoders 502 and 503 will output the extra bit length included in the symbol code to the extra symbol decoder 504 in addition to the order length and 4 codes. : E: The symbol decoder 504 is used to perform a decoding operation on the 7C remaining bits in the first encoding symbol, and a decoding operation of the different extra bits in the third encoding symbol to form a The third length symbol, the brother, the length symbol has-the third length. Outer symbol decoding ㈣4 is based on the extra digit S in the coded symbol, and the calculated extra bits in the second coded symbol 96282.doc -15-! 242935 coded symbol and the second code Within the symbol, if there is one, it is determined whether the first length is embedded in the third length symbol according to the sum of the element lengths in the above embodiment. < The encoding algorithm for decoding the third-degree symbol is decoded and converted into a run-length coded output according to the MPEG-4 Huffman coding table. In the present invention, the way of looking up the tables is all done by means of hardware wiring, with the speed of: adding and decoding ¥. Among them, the extra symbol encoder 5 ′ is used to perform the operation on the extra bits in the coded symbol x × R, and the extra bits in the second encoding symbol are to perform x〇R. The operation of r. The decoding system 50 of the present invention further includes a converter 501 for converting a sequence of fixed-length packets into a fixed-length first encoding symbol and a second encoding symbol output in parallel. The figure shows the simulation of the multi-symbol encoder of the present invention after 0.35 um 2P4M of Taiwan Semiconductor Manufacturing Co., Ltd. was laid out in the 〇3 process. Under the slowest process corner (SS Corner), the multi-symbol encoder works at the operating frequency. It is the output waveform of 100MHz day guard. FIG. 7 shows the simulation of the multi-symbol decoder of the present invention after the layout of the .35 um 2P4M CMos process of Taiwan Θ Semiconductor Manufacturing Company. At the slowest process corner, the multi-symbol decoder is Output waveform at 1 66 MHz. The present invention can be applied to a DVD player, an audiovisual multimedia mobile phone, and the like, but is not limited to the aforementioned applications. However, the above embodiments are only for explaining the principle of the present invention and its effects, but not for limiting the present invention. Therefore, those skilled in the art have made modifications and changes to the above embodiments without departing from the spirit of the present invention. The scope of rights of the present invention should be listed in the scope of patent application described later. [Schematic description] 96282.doc -16- 1242935 Figure 1 is a schematic diagram of an embodiment of the encoding method of the present invention; Figure 2 is a schematic diagram of an embodiment of the decoding method of the present invention. Figure 4 is a flow chart of the coding method of the present invention; Figure 5 is a structural diagram of the decoding system of the present invention; Figure 6 is an output waveform diagram of the coding system of the present invention (working frequency is 100 MHz); and Figure 7 is the present invention Output waveform diagram of the encoding system (working frequency is 1⑼ MHz) 〇 [Description of main component symbols] 30 The encoding system 301 of the present invention 301 variable length decoder 302 multiple symbol encoder 303 parallel input conversion sequence output converter 50 of the present invention Decoding system 501 Sequence input conversion parallel output converter 502, 503 single symbol decoder 504 additional symbol decoder 96282.doc

Claims (1)

1242935 、申請專利範圍: :種編碼方法,用以將複數個可變長度符號編碼至—固 疋長度封包’該編碼方法包括以下步驟: ⑷:加至少一多餘位元至一第一長度符號,以成為—第 一基本符號,其中該第一長度符號具有一第一長度, 該第一基本符號具有一固定長度; X (b) 附加至少—個多餘位元至一第二長度符號,以成為— 第一基本符號,其中該第二長度符號具有一第二長 度’該第二基本符號具有該固定長度;及 (c) 將一第三長度符號做編碼運算,分別置於該第一美本 符號及該第二基本符號之多餘位元,使該第_基本符 號成為—f-編碼符號,言亥第二基本符號成為一第二 編碼符號,該第-編碼符號及該第二編碼符號之長度 為該固定長度。 X 2. 4. 如明求項1之編碼方法,另包括一声 力匕秸铩不步驟,用以標示步 驟(a)及步驟(b)中該多餘位元之起始位置。 如請求項2之編碼方法,其中在步驟⑷及步驟該 位元初始化為〇。 如請求項1之編碼方法,豆中呤铉— 、十 *八中"亥弟二長度付號係做XOR的 運算。 如明求項2之編碼方法盆由a丰 3乃忐,其中在步驟(c)中另包括以步 驟: (cl)將該第三長度符 -古a - t κ反付唬之一取咼位疋與該第一長度符號 之一最低位元做X0R的運算,將運算結果置於該第一 96282.doc 1242935 基本符號之該起始位置標示之多餘位元; ^ Λ第一長度符唬之一次高位元與在該起始位置標 不之多餘位兀做x〇R的運算,將運算結果置於該第一 基本符號之該起始位置標示之下一多餘位元; (c3)重❹驟㈣,依序將該第三長度符號之—位元與在 =第-基本符號之-經運算之多餘位元做舰的運 异々,將運算結果置於下一未經運算之多餘位元,直到 ’秦基本符唬之一最低位元被取代為止,使該第一 基本付號成為該第一編碼符號; c η 長度符號未經運算之一最高位元與在該第 基本符號之該最低位元做X0R的運算,將運算纟士 置=該第二基本符號之一最低多餘位元;及、σ ()重複步驟(e4),依序將該第三長度符號未經運算之 位το與在该第二基本符號之一經運算之多餘位元 做職的運算,將運算結果置於下一未經運算之多餘 位凡,直到該第三長度符號之最低位元均經運算並置 於該第二基本符號之一結束多餘位元為止,使該第二 基本符號成為一第二編碼符號。 6· 如明求項1之編碼方法,另包括_轉換步驟,用以將並 輸入之固定長度第_绝臣— 、·、、、付说及弟二編碼符號封包轉換 成一序列輸出之固定長度封包。 、 7. 一種解碼方法 變長度符號, 」用以將一固定長度封包解碼成複數個6亥解碼方法包括以下步驟: 可 (a)依據一編碼資訊 將一第一編碼符號解碼為一第一長 96282.doc -2- 1242935 度符號及至少-經運算之多餘位元,其中該第一長度 符號具有一第_長度; ⑻依據該編碼資訊,將1二編碼符號解碼為—第二長 度符號及至少一經運算之多餘位元,其中該第二長: 符號具有一第二長度;及 (1該第-編碼符號内之該經運算之多餘位元做解碼運 ^ ^孩第二編碼符號内之該經運算之多餘位元做解 焉運开,以組成一第三長度符號,該第三*度符號具 有一第三長度。 ^ 8. 如請求項7之解碼方法,另包括一標示步驟,用以標示步 驟⑷中該第一長度符號之最後位元位置及步驟⑻中該第 一長度符號之最後位元位置。 9. 如請求項7之解碼方法,其中在步驟⑷中,將該第一編竭 符號内之該經運算之多餘位元做x〇R的運算,及該第二 編碼符號内<該經運算之多餘位元做應的運算,以组 成一第三長度符號。 、 10·如凊求項8之解碼方法,其中在步驟⑷中另包括以下步 驟: (Cl)依據該編碼資訊,取得該第二編碼符號之-結束多餘 位7L,朝该第二編碼符號之最低位元方向,該結束多 餘位兀與相鄰之多餘位元做XOR的運算,將運算結果 置於一堆疊器中; ()重複步驟(c 1)’朝該第二編碼符號之最低位元方 向依序將该第二編碼符號之一多餘位元與相鄰之多 96282.doc 1242935 餘位元做XOR的運算,並依序將運算結果置於該堆疊 器中,直到該第二編碼符號之最低多餘位元; (c3)將該第二編碼符號之最低多餘位元與該第一編碼符 號之最低多餘位元做x〇R的運算,將運算結果置於該 堆疊器中; (c4)朝該第一編碼符號之最高位元方向,該第一編碼符號 之最低多餘位元與相鄰之多餘位元做x〇R的運算,將 運算結果置於該堆疊器中; (c5)重複步驟(c4),朝該第一編碼符號之最高位元方 向,依序將遠第一編碼符號之一多餘位元與相鄰之多 餘位70做X〇R的運算,並依序將運算結果置於該堆疊 為中,直到該第一編碼符號中該第一長度符號之最後 位元位置;及 (C6)由該堆疊器中之最高位元至最低位元,依序取出該堆 璺器之内容,則為該第三長度符號。 11. 12. 如請求項7之解碼方法,另包括一轉換步驟,肖以將一序 歹J輸入之固疋長度封包轉換成並列輸出之固定長度第一 編碼符號及第二編碼符號。 -種編碼系統,用以將複數個可變長度符號編碼至一固 定長度封包,該編碼系統包含: 一可變長度解碼器’用以附加至少一多餘位元至一第 -長度符號’以成為一第一基本符號,其中該第一長度 符號具有—第—長度’該第—基本符號具有-固定長 度及附加至少一個多餘位凡至—第二長度符號,以成 96282.doc -4- 1242935 為一第二基本符號,其中該第二長度符號具有一第二長 度’該第二基本符號具有該固定長度;及 -多重符號編碼器,用以將—第三長度符號做編碼運 算,分別置於該第一基本符號及該第二基本符號之多餘 位7L,使該第一基本符號成為一第一編碼符號,該第二 基本符號成為一第二編碼符號,該第—編碼符號及該第 二編碼符號之長度為該固定長度。 13 14 15, 16. 17. •如晴求項12之、編碼系统,其中該乡重符號編碼器將第三 長度符號做XOR的編碼運算。 凊求項12之編碼系統,其中該多重符號編碼器依據固 定長度之該第一基本符號及該第二基本符號的多餘位元 數目,決定是否嵌入該第三長度符號。 如明求項12之編碼系統,其中該多重符號編碼器係以有 限狀態機實現。 如請求項12之編碼系統,另包括一轉換器,用以將並列 輸入之固疋長度第一編碼符號及第二編碼符號封包轉換 成一序列輸出之固定長度封包。 了種解碼系統,用以將-固定長度封包解碼成複數個可 變長度符號,該解碼系統包含: 至夕單付號解碼器,依據一編碼資訊,將一第一 編碼符號解碼為-第—長度符號及至少—經運算之多餘 位兀’其中該第一長度符號具有一第一長度;及將一第 一編碼符號解碼為一第二長度符號及至少一經運算之多 餘位兀’其中該第二長度符號具有-第二長度;及 96282.doc 1242935 -員卜付就解碼器’用以將該第一編碼符號内之該經 運π =夕餘位做解碼運算,及該第:編碼符號内之該 經運异之多餘位元做解碼運算,w組成_第三長度符 號’該第三長度符號具有一第三長度。 18. 19. 20. 21. 胃长員17之解碼I統,其中該單—符號解碼器係採用 查表的方式解碼,並以硬體接線完成。 如:求項17之解碼系統,其中該額外符號編碼器用以將 : 扁馬符號内之該經運算之多餘位元做XOR的運 异,及該第二編碼符號内之該經運算之多餘位元做X0R 的運算。 如:求項17項之解碼i統’其中該額外符號解碼器依據 忒第一編碼符號内之該經運算之多餘位元,及該第二編 碼符號内之該經運算之多餘位元長度總合,判斷該第'一 編碼符號及該第二編碼符號内是否嵌入該第三長度符 號。 如睛求項17之解碼系、統,另包括—轉換器,用以將_序 歹J輸入之固定長度封包轉換成並列輸出之固定長度第一 編碼符號及第二編碼符號。 96282.doc1242935 Scope of patent application: A coding method for coding a plurality of variable-length symbols to a fixed-length packet. The coding method includes the following steps: ⑷: Add at least one extra bit to a first length symbol To become a first basic symbol, wherein the first length symbol has a first length, and the first basic symbol has a fixed length; X (b) append at least one extra bit to a second length symbol to Become-a first basic symbol, wherein the second length symbol has a second length 'the second basic symbol has the fixed length; and (c) a third length symbol is encoded and placed in the first beauty The extra bits of this symbol and the second basic symbol make the _ basic symbol become an -f-coding symbol, and the second basic symbol becomes a second coding symbol, the first-coding symbol and the second coding symbol The length is the fixed length. X 2. 4. If the coding method of item 1 is specified, it also includes a sound step, which is used to mark the starting position of the extra bits in step (a) and step (b). For example, the encoding method of item 2, wherein the bit is initialized to 0 in step (1) and step. For example, the encoding method of item 1, Doudorin, 十, 中,;, 亥, 二, 亥, and 亥 二 二 2 length pay numbers are used for XOR operation. For example, the encoding method of the term 2 is a Feng 3 Nai, where step (c) further includes the following steps: (cl) take one of the third length character-ancient a-t κ anti-bluff The bit 疋 performs an X0R operation with one of the lowest bits of the first length symbol, and places the result of the operation in the extra bits marked at the starting position of the first 96282.doc 1242935 basic symbol; ^ Λ first length symbol Perform an x〇R operation on the high-order bits and the extra bits not marked at the starting position, and place the result of the operation at an extra bit below the starting position mark of the first basic symbol; (c3) Repeat the steps, in order to make the difference between the bit of the third length symbol and the extra bit calculated in = -the -basic symbol in order, and place the operation result in the next uncalculated one. Redundant bits until one of the lowest bits of the Qin basic symbol is replaced, so that the first basic sign becomes the first coding symbol; c η length symbol has not been calculated with one of the highest bits and the first basic symbol The lowest bit of the symbol is calculated by X0R, and the operation operator is set to one of the second basic symbol. Low redundant bits; and, σ () repeats step (e4), and sequentially performs the operation of the third length symbol without operation bit το and the redundant bits operated on one of the second basic symbols, The operation result is placed in the next unused redundant bit until the lowest bit of the third length symbol is calculated and placed in one of the second basic symbols to end the extra bit, so that the second basic symbol becomes a The second encoding symbol. 6 · If the enumeration method of item 1 is required, it also includes a conversion step to convert and input the fixed-length No. _ Jue — — ,,,, Fu said, and the second encoding code packet into a sequence of fixed-length output Packet. 7. A decoding method of variable-length symbols, "" used to decode a fixed-length packet into a plurality of decoding methods including the following steps: (a) decoding a first coded symbol into a first long according to a coded message; 96282.doc -2- 1242935 degree symbol and at least-redundant bits after operation, where the first length symbol has a _th length; ⑻ decode the 1st and 2nd encoding symbols to-the second length symbol and At least one calculated extra bit, wherein the second length: the symbol has a second length; and (1 the calculated extra bit in the first-coded symbol is decoded ^ ^ The calculated extra bits are decoded and operated to form a third length symbol, and the third * degree symbol has a third length. ^ 8. If the decoding method of claim 7 further includes a marking step, It is used to mark the last bit position of the first length symbol in step 及 and the last bit position of the first length symbol in step 。. 9. If the decoding method of claim 7, wherein in step ,, the first bit One The extra bits in the coded symbol are subjected to the operation of x〇R, and the extra bits in the second coded symbol are subjected to the corresponding operation to form a third length symbol. 10 · The method for decoding item 8 above, which further includes the following steps in step (1): (Cl) According to the encoding information, obtain the-end excess bit 7L of the second encoding symbol, and move toward the lowest bit of the second encoding symbol Element direction, the end redundant bit is XORed with adjacent excess bits, and the operation result is placed in a stacker; () Repeat step (c 1) 'toward the lowest bit of the second encoding symbol Sequentially perform an XOR operation on one extra bit of the second encoding symbol and the adjacent excess 96282.doc 1242935, and place the operation result in the stacker in sequence until the second encoding symbol The least redundant bit of the second encoding symbol; (c3) performing an operation of x0R on the least redundant bit of the second encoding symbol and the least redundant bit of the first encoding symbol, and placing the operation result in the stacker; (c4) ) Toward the highest bit of the first encoding symbol, the Perform the operation of x〇R on the lowest redundant bit of the first encoding symbol and the adjacent redundant bit, and place the operation result in the stacker; (c5) Repeat step (c4) to the highest of the first encoding symbol. In the bit direction, an X0R operation is performed sequentially on one extra bit far from the first encoding symbol and the adjacent extra bit 70, and the operation result is sequentially placed in the stacking operation until the first encoding. The last bit position of the first length symbol in the symbol; and (C6) the content of the stacker is sequentially taken from the highest bit to the lowest bit in the stacker, which is the third length symbol. 12. If the decoding method of claim 7 further includes a conversion step, Xiao Yi converts a fixed-length packet inputted in sequence J into a fixed-length first encoding symbol and a second encoding symbol output in parallel. An encoding system for encoding a plurality of variable-length symbols into a fixed-length packet, the encoding system comprising: a variable-length decoder 'for appending at least one extra bit to a first-length symbol' to Become a first basic symbol, where the first length symbol has -first-length ', the first basic symbol has -fixed length and appended at least one extra bit to -the second length symbol to form 96282.doc -4- 1242935 is a second basic symbol, wherein the second length symbol has a second length 'the second basic symbol has the fixed length; and-a multi-symbol encoder for encoding the third length symbol, respectively, The extra bit 7L placed on the first basic symbol and the second basic symbol makes the first basic symbol a first encoding symbol, the second basic symbol becomes a second encoding symbol, the first encoding symbol and the The length of the second encoding symbol is the fixed length. 13 14 15, 16. 17. • If the term 12 is the encoding system, the weight symbol encoder performs the XOR encoding operation on the third length symbol. (2) The encoding system of claim 12, wherein the multi-symbol encoder determines whether to embed the third-length symbol according to the number of extra bits of the first basic symbol and the second basic symbol of a fixed length. For example, the encoding system of claim 12, wherein the multi-symbol encoder is implemented by a finite state machine. For example, the encoding system of claim 12, further comprising a converter for converting the fixed-length first coded symbols and the second coded symbol packets input in parallel into a sequence of fixed-length packets. A decoding system is used to decode a fixed-length packet into a plurality of variable-length symbols. The decoding system includes: a single-number sign decoder, which decodes a first coded symbol into a -number- A length symbol and at least-an extra bit that is calculated, where the first length symbol has a first length; and a first coded symbol that is decoded into a second length symbol and at least one extra bit that is calculated, where the first The two-length symbol has-the second length; and 96282.doc 1242935-The decoder is used to perform the decoding operation on the transported π = evening bits in the first encoding symbol, and the first: encoding symbol The extra redundant bits in it are decoded, and w constitutes a _third length symbol. The third length symbol has a third length. 18. 19. 20. 21. Decoding system of Stomach Captain 17, in which the single-symbol decoder is decoded by look-up table and completed by hardware wiring. For example: the decoding system of term 17, in which the additional symbol encoder is used to XOR the extra bits in the flat horse symbol and the extra bits in the second code symbol. Yuan does X0R operation. For example: find the decoding system of term 17, where the extra symbol decoder is based on the calculated extra bits in the first encoding symbol and the total length of the extra bits in the second encoding symbol. Then, it is determined whether the third length symbol is embedded in the first coding symbol and the second coding symbol. For example, the decoding system and system of item 17 are further included, and a converter is used to convert the fixed-length packet input by _ sequence 歹 J into the fixed-length first encoding symbol and the second encoding symbol that are output side by side. 96282.doc
TW93132042A 2004-10-21 2004-10-21 Encode system, decode system and method TWI242935B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW93132042A TWI242935B (en) 2004-10-21 2004-10-21 Encode system, decode system and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW93132042A TWI242935B (en) 2004-10-21 2004-10-21 Encode system, decode system and method

Publications (2)

Publication Number Publication Date
TWI242935B true TWI242935B (en) 2005-11-01
TW200614687A TW200614687A (en) 2006-05-01

Family

ID=37022660

Family Applications (1)

Application Number Title Priority Date Filing Date
TW93132042A TWI242935B (en) 2004-10-21 2004-10-21 Encode system, decode system and method

Country Status (1)

Country Link
TW (1) TWI242935B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8027242B2 (en) 2005-10-21 2011-09-27 Qualcomm Incorporated Signal coding and decoding based on spectral dynamics
US8392176B2 (en) 2006-04-10 2013-03-05 Qualcomm Incorporated Processing of excitation in audio coding and decoding
US8428957B2 (en) 2007-08-24 2013-04-23 Qualcomm Incorporated Spectral noise shaping in audio coding based on spectral dynamics in frequency sub-bands
US8547255B2 (en) 2008-07-11 2013-10-01 Fraunhofer-Gesellschaft Zur Foerderung Der Angewandten Forschung E.V. Method for encoding a symbol, method for decoding a symbol, method for transmitting a symbol from a transmitter to a receiver, encoder, decoder and system for transmitting a symbol from a transmitter to a receiver

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8027242B2 (en) 2005-10-21 2011-09-27 Qualcomm Incorporated Signal coding and decoding based on spectral dynamics
US8392176B2 (en) 2006-04-10 2013-03-05 Qualcomm Incorporated Processing of excitation in audio coding and decoding
US8428957B2 (en) 2007-08-24 2013-04-23 Qualcomm Incorporated Spectral noise shaping in audio coding based on spectral dynamics in frequency sub-bands
US8547255B2 (en) 2008-07-11 2013-10-01 Fraunhofer-Gesellschaft Zur Foerderung Der Angewandten Forschung E.V. Method for encoding a symbol, method for decoding a symbol, method for transmitting a symbol from a transmitter to a receiver, encoder, decoder and system for transmitting a symbol from a transmitter to a receiver
TWI453734B (en) * 2008-07-11 2014-09-21 Fraunhofer Ges Forschung Method for encoding a symbol, method for decoding a symbol, method for transmitting a symbol from a transmitter to a receiver, encoder, decoder and system for transmitting a symbol from a transmitter to a receiver

Also Published As

Publication number Publication date
TW200614687A (en) 2006-05-01

Similar Documents

Publication Publication Date Title
CN101075857B (en) Method for generating turbo-code block intersection and HARQ packet
CN101432969B (en) Forward error-correcting (FEC) coding and streaming
JP4971144B2 (en) File download and streaming system
US20060077890A1 (en) Efficient source blocking algorithm for FEC for MBMS streaming
JP5795446B2 (en) Content delivery system with allocation of source data and repair data between HTTP servers
US20130254631A1 (en) Content delivery system with allocation of source data and repair data among http servers
US20060075321A1 (en) Forming of error correction data
WO2011022555A2 (en) Methods and apparatus employing fec codes with permanent inactivation of symbols for encoding and decoding processes
Bertoni et al. Sakura: a flexible coding for tree hashing
TWI424718B (en) Communication methods and systems
WO2009079934A1 (en) A coding method and means for low density generator matrix
RU2461970C2 (en) Method and apparatus for receiving data
TW200816732A (en) An interleaving scheme for an LDPC coded 16APSK system
CN107733562B (en) Method and device for encoding and decoding polarization code
TWI242935B (en) Encode system, decode system and method
Shi et al. Zigzag decodable online fountain codes with high intermediate symbol recovery rates
TW200406998A (en) Apparatus for iterative hard-decision forward error correction decoding
Finiasz et al. Improved fast syndrome based cryptographic hash functions
WO2008063873A2 (en) Methods and apparatus for encoding data in a communication network
US20100318875A1 (en) Data Transmission Method and Equipment
US8301961B2 (en) Decoding method for low density generator matrix code
CN105915317A (en) Method for constructing coding coefficient matrix of Zigzag decodable forward erasure code
CN102547295B (en) Lossless-compression encoding method of image data
TWI520528B (en) Supercharged codes
ES2797349T3 (en) System and method for arithmetic encoding and decoding

Legal Events

Date Code Title Description
MM4A Annulment or lapse of patent due to non-payment of fees