JP2007295157A - Unit, method and program for data coding, and information recording medium having recorded data coding program - Google Patents

Unit, method and program for data coding, and information recording medium having recorded data coding program Download PDF

Info

Publication number
JP2007295157A
JP2007295157A JP2006118918A JP2006118918A JP2007295157A JP 2007295157 A JP2007295157 A JP 2007295157A JP 2006118918 A JP2006118918 A JP 2006118918A JP 2006118918 A JP2006118918 A JP 2006118918A JP 2007295157 A JP2007295157 A JP 2007295157A
Authority
JP
Japan
Prior art keywords
data
encoding
bus
length
sub
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
JP2006118918A
Other languages
Japanese (ja)
Inventor
Manabu Shiraki
白木  学
Yasushi Sugisawa
裕史 杉澤
Hiroto Tomita
裕人 冨田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial Co Ltd
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 Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP2006118918A priority Critical patent/JP2007295157A/en
Publication of JP2007295157A publication Critical patent/JP2007295157A/en
Pending legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To realize Exp-Golomb coding, required for coding a syntax element in H. 264/AVC, at high speed with a small-scale integrated circuit. <P>SOLUTION: When the data length of an Exp-Golomb coded data does not exceed a bus bit length, the entire coded data are output to the bus at one time. When the data length of the coded data exceeds (2×K-1) times as long as the bus bit length while it does not exceed 2×K times, a first portion is output to the bus after being divided into one or a plurality of times, and a second portion and a third portion are output to the bus after divided into one or a plurality of times. When the data length of the coded data exceeds 2×K times as long as the bus bit length while it does not exceed (2×K+1) times, the first portion is output to the bus after being divided into one or a plurality of times, and a first data not exceeding the bus width, a second data and a third data exceeding an integer multiple of the bus width are output, and the third portion is output to the bus after divided into one or a plurality of times. <P>COPYRIGHT: (C)2008,JPO&INPIT

Description

本特許出願に係る発明(以後、「本発明」という)は、入力されたデータを所定の方式に従って符号化し、符号化されたデータを所定のビット長のバスに出力する、データ符号化装置、データ符号化方法、データ符号化プログラム及びデータ符号化プログラムを記録した情報記録媒体に関するものである。   The invention according to the present patent application (hereinafter referred to as “the present invention”) is a data encoding device that encodes input data according to a predetermined method and outputs the encoded data to a bus having a predetermined bit length. The present invention relates to a data encoding method, a data encoding program, and an information recording medium on which the data encoding program is recorded.

新しい動画符号化方式としてH.264が提案されている。H.264は、ITU−TのVideo Coding Experts Group(VCEG)によって策定された動画圧縮ための規格で、ISO/IEC JTC 1のMoving Picture Experts Groupが、MPEG−4 Part 10 Advanced Video Coding(AVC)として標準化していた規格と統合され、H.264/MPEG−4 AVCや、H.264/AVCと呼ばれることもある。   As a new video encoding method, H.264 is used. H.264 has been proposed. H. H.264 is a standard for video compression established by ITU-T Video Coding Experts Group (VCEG). ISO / IEC JTC 1 Moving Picture Experts Group (MPEG-4 Part 10 Advanced Coding) H. is integrated with the standard. H.264 / MPEG-4 AVC and H.264. Sometimes referred to as H.264 / AVC.

この方式では、従来の圧縮技術に加えて、サブマクロブロック分割、イントラ予測、デブロッキング・フィルタ等、新しい技術を利用することによって圧縮性能を向上させており、従来方式であるMPEG−2等と比較して2倍以上の圧縮効率を実現すると言われている。   In this method, in addition to the conventional compression technology, the compression performance is improved by using new technologies such as sub-macroblock division, intra prediction, deblocking filter, etc. It is said that the compression efficiency is more than doubled compared to the above.

このような高圧縮性能によって、携帯電話等の用途向け低ビットレートから、HDTVクラスの高ビットレートに至るまで、幅広い利用が期待されている。   Such high compression performance is expected to be widely used from low bit rates for applications such as mobile phones to high bit rates of the HDTV class.

H.264/AVCでは、シンタックス要素を符号化するための符号化方式の1つとして、指数Golomb符号(Exp−Golomb codes:Exponential Golomb codes)や、CAVLC(Context−based Adaptive VLC)や、CABAC(Context−based Adaptive Binary Arithmetic Coding)等を使用することが規定されている。   H. In H.264 / AVC, as one of encoding methods for encoding syntax elements, exponential Golomb codes (Exponential Golomb codes), CAVLC (Context-based Adaptive VLC), and CABAC (on-CAC) -Based Adaptive Binary Arithmetic Coding) is specified.

従来の、Exp−Golomb符号化を行うExp−Golomb符号化装置の一例である、Exp−Golomb符号化装置800のブロック構成図を図6に示す。   FIG. 6 shows a block configuration diagram of an Exp-Golomb encoding device 800, which is an example of a conventional Exp-Golomb encoding device that performs Exp-Golomb encoding.

符号化の対象データとなるシンタックス要素データ810がExp−Golomb符号化装置800に入力されると、このシンタックス要素データ810は、最初に入力制御部801に入力される。   When syntax element data 810 to be encoded data is input to the Exp-Golomb encoding device 800, the syntax element data 810 is first input to the input control unit 801.

入力制御部801では、このシンタックス要素データ810のデータタイプに基づいて、codeNum(符号番号)を生成するための方式が決定される。   The input control unit 801 determines a method for generating codeNum (code number) based on the data type of the syntax element data 810.

codeNumを生成する方式には、Unsigned、Signed、Mappedや、その他の方式があるが、ここでは、Unsigned、Signed、Mappedの3タイプとして説明する。また、このcodeNumを生成する方式も、それぞれの仕様に基づいて決定されるもので、本発明の本質とは直接関係しないので、詳細な説明は省略する。   There are three methods for generating codeNum: Unsigned, Signed, Mapped, and other methods. Here, three types of Unsigned, Signed, and Mapped are described. Further, the method for generating the codeNum is also determined based on the respective specifications, and is not directly related to the essence of the present invention, and thus detailed description thereof is omitted.

入力制御部801で、シンタックス要素データ810のデータタイプに基づいてcodeNum(符号番号)を生成するための方式が決定されると、そのシンタックス要素データ810は、codeNum生成部802に送られる。codeNum生成部は、Unsigned、Signed、Mappedの、それぞれの方式でcodeNumを生成するための部分に分かれており、これらをUnsigned部821、Signed部822、Mapped部823と呼ぶ。各シンタックス要素データ810は、決定された方式に対応して、それぞれの方式でcodeNumを生成するための部分に送られる。   When the input control unit 801 determines a method for generating codeNum (code number) based on the data type of the syntax element data 810, the syntax element data 810 is sent to the codeNum generation unit 802. The codeNum generation unit is divided into portions for generating codeNum in the respective methods of Unsigned, Signed, and Mapped, and these are referred to as an unsigned unit 821, a signed unit 822, and a mapped unit 823. Each syntax element data 810 is sent to a portion for generating codeNum in each method corresponding to the determined method.

codeNum生成部802でcodeNumが生成されると、そのcodeNumは、符号生成部803に送られる。この符号生成部803が、Exp−Golomb符号化を実行する中心である。   When the codeNum generation unit 802 generates codeNum, the codeNum is sent to the code generation unit 803. The code generation unit 803 is the center for executing Exp-Golomb encoding.

Exp−Golomb符号化されたデータは、一旦中間バッファ804へ送られて蓄積され、必要に応じて、また各種のタイミングに同期して、出力信号生成部805へ送られ、出力信号生成部805で出力形式に変換されてデータバス806に出力される。   The Exp-Golomb encoded data is once sent to the intermediate buffer 804 and accumulated, and sent to the output signal generation unit 805 as necessary and in synchronization with various timings. The data is converted into an output format and output to the data bus 806.

Exp−Golomb符号は可逆圧縮符号の一種で、符号化されたデータは、先行ゼロ部と、INFO部と、先行ゼロ部とINFO部とを分離する分離部との、3つの部分から構成される。   The Exp-Golomb code is a kind of lossless compression code, and the encoded data is composed of three parts: a leading zero part, an INFO part, and a separating part that separates the leading zero part and the INFO part. .

上記codeNumに、1を加えた値の2を低とする対数値を求め、その整数部をMとすると、先行ゼロ部はM個の「0」から構成される。   When a logarithmic value in which 2 of a value obtained by adding 1 to the codeNum is low is obtained and the integer part is M, the leading zero part is composed of M “0” s.

分離部は、常に1つの「1」で構成される。   The separation unit is always composed of one “1”.

INFO部は、上記codeNumに1を加えた値を2進数で表現した時の、最上位の1を除いたビット列で構成される。これはまた、codeNumに1を加えた値から2のM乗を引いた値を、M桁の2進数で表現した時のビット列ということもできる。   The INFO section is composed of a bit string excluding the most significant 1 when a value obtained by adding 1 to the codeNum is expressed in binary. This can also be referred to as a bit string when a value obtained by subtracting 2 to the power of M from a value obtained by adding 1 to codeNum is expressed by an M-digit binary number.

このようにすると、先行ゼロ部とINFO部とは、必ず同じビット長になることが分る。   In this way, it can be seen that the leading zero part and the INFO part always have the same bit length.

一例として、シンタックス要素タイプがUnsigned(符号なし整数)であるシンタックス要素データ810として、値「21」が入力されたと仮定し、このシンタックス要素データ810が、Exp−Golomb符号化される様子を、図7に示す。   As an example, it is assumed that the value “21” is input as syntax element data 810 whose syntax element type is “Unsigned” (unsigned integer), and this syntax element data 810 is Exp-Golob encoded. Is shown in FIG.

このシンタックス要素データ810は、そのデータタイプがUnsignedであるから、codeNumは入力された値と同じ「21」になる。   Since the syntax element data 810 has a data type of “Unsigned”, codeNum is “21” which is the same as the input value.

この21に1を加えた値の2を低とする対数値を求め、その整数部を取り出すと「4」であるから、Exp−Golomb符号化されたデータの先行ゼロ部は4桁の0、すなわち、「0000」になる。   Since the logarithmic value in which 2 of 1 obtained by adding 1 to 21 is low and the integer part is taken out is “4”, the leading zero part of the Exp-Golomb encoded data is 4 digits of 0, That is, “0000”.

codeNumに1を加えた値は「22」で、この値を2進数で表現すると「10110」であるから、INFO部はこの最上位の1を除いた「0110」になる。   The value obtained by adding 1 to codeNum is “22”, and this value is expressed as “10110” in binary, so that the INFO part is “0110” excluding the highest-order 1.

また、22から2の4乗を引くと6であり、これを4桁の2進数で表すと、同じ「0110」になる。   Also, subtracting the fourth power of 2 from 22 is 6, and when this is expressed by a 4-digit binary number, the same "0110" is obtained.

従って、Exp−Golomb符号化されたデータは、「000010110」になる。   Therefore, Exp-Golomb encoded data is “000010110”.

このようにして、最大32ビットの数値データに対して指数Golomb符号化を行うと仮定すると、Exp−Golomb符号化されたデータは最大65ビットになる可能性がある。   Assuming that exponential Golomb encoding is performed on numerical data having a maximum of 32 bits in this way, Exp-Golomb encoded data may have a maximum of 65 bits.

従って、中間バッファ804のバッファサイズは65ビット分が必要になる。そして、データバス806のバス幅を32ビットと仮定し、65ビットのExp−Golomb符号化されたデータをこのバス幅32ビットに合わせて出力すると仮定すると、出力信号生成部805は、65ビット分のシフトレジスタ等が必要になる。   Therefore, the buffer size of the intermediate buffer 804 needs to be 65 bits. Assuming that the bus width of the data bus 806 is 32 bits, and assuming that 65-bit Exp-Golomb encoded data is output in accordance with the bus width of 32 bits, the output signal generation unit 805 outputs 65 bits. Shift registers are required.

このようにして、Golomb符号化されたデータを出力する例が、下記特許文献1に記載されている。
特開2004−104159号公報
An example of outputting Golomb encoded data in this way is described in Patent Document 1 below.
JP 2004-104159 A

しかしながら、上記従来のExp−Golomb符号化装置では、32ビットの入力データをExp−Golomb符号化して32ビットのバスに出力するのに、65ビット分の中間バッファとシフトレジスタ等が必要になり、集積回路化するにも回路構成が複雑かつ大規模なものとならざるをえず、簡単かつ小規模な集積回路として実現することはできなかった。   However, in the above conventional Exp-Golomb encoding device, an intermediate buffer for 65 bits, a shift register, etc. are required to encode 32-bit input data to Exp-Golomb and output it to a 32-bit bus. In order to make an integrated circuit, the circuit configuration has to be complicated and large-scale, and cannot be realized as a simple and small-scale integrated circuit.

本発明は、上記のような課題を解決するために行われたもので、H.264/AVCにおいてシンタックス要素を符号化するために必要となる、Exp−Golomb符号化を、簡単かつ小規模な集積回路によって実現することを可能とするものである。   The present invention has been made to solve the above-described problems. It is possible to implement Exp-Golomb encoding, which is necessary for encoding syntax elements in H.264 / AVC, with a simple and small-scale integrated circuit.

そのために、具体的には以下のような構成を採用する。   Therefore, specifically, the following configuration is adopted.

請求項1に記載のデータ符号化装置では、元のデータを符号化する符号化部と、符号化部によって符号化されたデータのデータ長を判断するデータ長判断部と、データ長判断部の判断結果に基づいて符号化されたデータを所定のビット長に分割する分割部と、分割されたデータをバスに出力する出力部とを有する。   In the data encoding device according to claim 1, an encoding unit that encodes original data, a data length determination unit that determines a data length of data encoded by the encoding unit, and a data length determination unit A dividing unit that divides the encoded data based on the determination result into a predetermined bit length; and an output unit that outputs the divided data to a bus.

このような構成によって、H.264/AVC等においてシンタックス要素等を符号化するために必要となる符号化を、簡単かつ小規模な集積回路によって実現するとともに、効率的かつ高速にバス出力することが可能になる。   With such a configuration, H.P. It is possible to realize encoding required for encoding syntax elements in H.264 / AVC and the like with a simple and small-scale integrated circuit, and to output the bus efficiently and at high speed.

請求項2に記載のデータ符号化装置では、符号化されたデータは第1のサブデータと第2のサブデータと第3のサブデータから構成され、第1のサブデータと第3のサブデータとはそのデータ長が同じビット長である。   In the data encoding device according to claim 2, the encoded data includes first sub data, second sub data, and third sub data, and the first sub data and the third sub data. The data length is the same bit length.

このような構成によって、特にその符号化されたデータが第1のサブデータと第2のサブデータと第3のサブデータからなり、第1のサブデータと第3のサブデータとのデータ長が同じビット長であるような場合において、より有効に符号化を簡単かつ小規模な集積回路によって実現するとともに、より効率的かつ高速にバス出力することが可能になる。   With such a configuration, in particular, the encoded data includes the first sub data, the second sub data, and the third sub data, and the data lengths of the first sub data and the third sub data are In the case where the bit lengths are the same, encoding can be more effectively realized by a simple and small-scale integrated circuit, and the bus can be output more efficiently and at high speed.

請求項3に記載のデータ符号化装置では、符号化されたデータのデータ長が所定のビット長を超えない時は、符号化されたデータの全てを1回でバスに出力し、Kを1つの自然数とする時、符号化されたデータのデータ長が、所定のビット長の「2×K−1」倍を超え「2×K」倍を超えない時は、第1のサブデータを1回または複数回に分割してバスに出力した後に、第2のサブデータと第3のサブデータを1回または複数回に分割してバスに出力し、符号化されたデータのデータ長が、所定のビット長の「2×K」倍を超え「2×K+1」倍を超えない時は、第1のサブデータを1回または複数回に分割してバスに出力し、第1のサブデータの所定のビット長未満の部分と第2のサブデータ及び第3のサブデータの所定のビット長の整数倍を超えている部分をバスに出力した後に、第3のサブデータを1回または複数回に分割してバスに出力する。   4. The data encoding apparatus according to claim 3, wherein when the data length of the encoded data does not exceed a predetermined bit length, all of the encoded data is output to the bus at one time, and K is set to 1 When the data length of the encoded data exceeds “2 × K−1” times the predetermined bit length and does not exceed “2 × K” times, the first sub-data is set to 1. Divided into multiple or multiple times and output to the bus, then the second sub-data and the third sub-data are divided into one or more times and output to the bus, and the data length of the encoded data is When the predetermined bit length exceeds “2 × K” times and does not exceed “2 × K + 1” times, the first sub-data is divided into one time or a plurality of times and outputted to the bus. Less than a predetermined bit length and an integral multiple of the predetermined bit length of the second and third sub-data The part that exceeds after outputting to the bus, by dividing the third sub data to one or more times and output to the bus.

このような構成によって、より具体的な構成を使用して、符号化を簡単かつ小規模な集積回路によって実現するとともに、効率的かつ高速にバス出力することが可能になる。   With such a configuration, it is possible to realize encoding with a simple and small-scale integrated circuit using a more specific configuration, and to perform bus output efficiently and at high speed.

請求項4に記載のデータ符号化装置では、符号化は指数Golomb符号化であり、第1のサブデータは先行ゼロ部であり、第3のサブデータはINFO部であり、第2のサブデータは先行ゼロ部とINFO部との分離部である。   5. The data encoding device according to claim 4, wherein the encoding is exponential Golomb encoding, the first sub-data is a leading zero part, the third sub-data is an INFO part, and the second sub-data Is a separation part of the leading zero part and the INFO part.

このような構成によって、符号化がGolomb符号化である時にも、より有効に符号化を簡単かつ小規模な集積回路によって実現するとともに、より効率的かつ高速にGolomb符号化されたデータをバス出力することが可能になる。   With such a configuration, even when the encoding is Golomb encoding, encoding is more effectively realized by a simple and small-scale integrated circuit, and Golomb-encoded data is output to the bus more efficiently and at high speed. It becomes possible to do.

請求項5に記載のデータ符号化装置では、所定のビット長はバスのビット長に等しい。   In the data encoding device according to claim 5, the predetermined bit length is equal to the bit length of the bus.

このような構成によって、与えられた所定のバス幅にあわせて、符号化データを分割し、より効率的かつ高速にバス出力することが可能になる。   With such a configuration, it is possible to divide the encoded data in accordance with a given predetermined bus width and to output the bus more efficiently and at high speed.

請求項6に記載のデータ符号化装置では、所定のビット長を記憶するレジスタを備えている。   According to a sixth aspect of the present invention, there is provided a data encoding device comprising a register for storing a predetermined bit length.

このような構成によって、分割するべきビット長を記憶し、この記憶しているビット長を利用して効率的かつ高速に符号化データを分割し、より効率的かつ高速にバス出力することができると同時に、分割するべきビット長を必要に応じてフレキシブルに変更することも可能になる。   With such a configuration, the bit length to be divided can be stored, the encoded data can be divided efficiently and at high speed using the stored bit length, and the bus can be output more efficiently and at high speed. At the same time, the bit length to be divided can be flexibly changed as necessary.

請求項7に記載のデータ符号化方法では、元のデータを符号化する符号化手順と、符号化手順によって符号化されたデータのデータ長を判断するデータ長判断手順と、データ長判断手順の判断結果に基づいて符号化されたデータを所定のビット長に分割する分割手順と、分割されたデータをバスに出力する出力手順とを有する。   In the data encoding method according to claim 7, an encoding procedure for encoding original data, a data length determination procedure for determining a data length of data encoded by the encoding procedure, and a data length determination procedure A division procedure for dividing the encoded data based on the determination result into a predetermined bit length and an output procedure for outputting the divided data to the bus are included.

このような構成によって、H.264/AVC等においてシンタックス要素等を符号化するために必要となる符号化を、簡単かつ小規模な集積回路によって実現するとともに、効率的かつ高速にバス出力する方法を実行することが可能になる。   With such a configuration, H.P. H.264 / AVC and the like can realize encoding required for encoding syntax elements and the like with a simple and small-scale integrated circuit, and can execute an efficient and high-speed bus output method. Become.

請求項8に記載のデータ符号化プログラムは、コンピュータによって実行可能なプログラムであって、元のデータを符号化する符号化ステップと、符号化ステップによって符号化されたデータのデータ長を判断するデータ長判断ステップと、データ長判断ステップの判断結果に基づいて符号化されたデータを所定のビット長に分割する分割ステップと、分割されたデータをバスに出力する出力ステップとを有する。   The data encoding program according to claim 8 is a program that can be executed by a computer, an encoding step that encodes original data, and data that determines a data length of data encoded by the encoding step A length determining step, a dividing step of dividing the encoded data based on the determination result of the data length determining step into a predetermined bit length, and an output step of outputting the divided data to the bus.

このような構成によって、上記のようなデータ符号化装置とデータ符号化方法とを、コンピュータとそのコンピュータによって実行されるプログラムを使用して、具体的に実現し、実行することが可能になる。   With such a configuration, the above-described data encoding device and data encoding method can be specifically realized and executed using a computer and a program executed by the computer.

請求項9に記載の発明は、コンピュータによって読み取り可能な情報記録媒体であって、請求項8に記載のデータ符号化プログラムを記録した情報記録媒体である。   A ninth aspect of the present invention is an information recording medium readable by a computer, in which the data encoding program according to the eighth aspect is recorded.

このような構成によって、上記本発明のデータ符号化プログラムを記録媒体に記録し、保存し、使用し、コンピュータによって読み出して実行することが可能になる。   With such a configuration, the data encoding program of the present invention can be recorded on a recording medium, stored, used, read out by a computer, and executed.

本発明では、H.264/AVCにおいてシンタックス要素を符号化するために必要となる、Exp−Golomb符号化を、簡単かつ小規模な集積回路によって効率的かつ高速に実現することが可能になる。   In the present invention, H.P. Exp-Golomb encoding, which is necessary for encoding syntax elements in H.264 / AVC, can be realized efficiently and at high speed with a simple and small-scale integrated circuit.

(実施の形態)
以下に、本発明の実施の形態について、図面を参照しながら説明する。
(Embodiment)
Embodiments of the present invention will be described below with reference to the drawings.

図1は、本発明の実施の形態の1つである、Exp−Golomb符号化装置の全体概要図である。このExp−Golomb符号化装置100は、主にExp−Golomb符号生成部102と、出力制御部104と、メモリ部103とから構成される。Exp−Golomb符号化装置100はその他の部分も含んでいるが、本発明の本質と直接関係しないので省略をしている。   FIG. 1 is an overall schematic diagram of an Exp-Golomb encoding apparatus, which is one embodiment of the present invention. The Exp-Golomb encoding device 100 mainly includes an Exp-Golomb code generation unit 102, an output control unit 104, and a memory unit 103. Exp-Golomb encoding apparatus 100 includes other parts, but is omitted because it is not directly related to the essence of the present invention.

このExp−Golomb符号化装置100は、プロセッサ201と接続されており、プロセッサ201からデータ211とコマンド212とを受け取る。   The Exp-Golomb encoding apparatus 100 is connected to the processor 201 and receives data 211 and a command 212 from the processor 201.

例えば、このExp−Golomb符号化装置100が携帯電話に使われていたとすると、プロセッサ201は携帯電話全体を制御するCPUであることもあるし、携帯電話の画像処理を制御するCPUであることもあるし、携帯電話の通信を制御するCPUであることもある。あるいは、例えば、このExp−Golomb符号化装置100がテレビ受信機に使われていたとすると、プロセッサ201はテレビ受信機全体を制御するCPUであることもあるし、テレビ受信機の画像処理を制御するCPUであることもあるし、テレビ受信機の放送電波受信を制御するCPUであることもある。このExp−Golomb符号化装置100は、例えば上記のような携帯電話、テレビ受信機に使われることがあり、あるいはまた、DVD(デジタル・バーサタイル・ディスク)のような映像記録再生装置に使われることもあるし、PC(パーソナル・コンピュータ)やPDA(携帯情報端末装置)等に使われることもあるし、FAXやコピー機を始めとする各種の事務用電気・電子機器に使われることもあるし、各種の家庭用電気・電子機器に使われることもあるし、その他のあらゆる電気・電子機器に使われることもある。本明細書において説明するのは、その中のごく一部の例にすぎず、本発明が本明細書で説明する例に限定されるものではない(本明細書中の全ての説明において同様)。   For example, if this Exp-Golomb encoding device 100 is used in a mobile phone, the processor 201 may be a CPU that controls the entire mobile phone, or may be a CPU that controls image processing of the mobile phone. Or, it may be a CPU that controls communication of a mobile phone. Alternatively, for example, if the Exp-Golomb encoding device 100 is used in a television receiver, the processor 201 may be a CPU that controls the entire television receiver, or controls image processing of the television receiver. It may be a CPU, or it may be a CPU that controls broadcast radio wave reception of a television receiver. This Exp-Golomb encoding device 100 may be used in, for example, the mobile phone and the television receiver as described above, or may be used in a video recording / reproducing device such as a DVD (Digital Versatile Disc). It may be used for PCs (personal computers), PDAs (personal digital assistants), etc., and may be used for various office electrical and electronic devices such as fax machines and copiers. It may be used in various household electrical and electronic devices, and may be used in all other electrical and electronic devices. The description in this specification is only a few examples, and the present invention is not limited to the examples described herein (the same applies to all descriptions in this specification). .

このような、あらゆる電気・電子機器において、Exp−Golomb符号は使われる可能性があり、Exp−Golomb符号が使われる可能性がある限りにおいて、このExp−Golomb符号化装置100は使われる可能性がある。   The Exp-Golomb code may be used in all such electric / electronic devices, and the Exp-Golomb encoding device 100 may be used as long as the Exp-Golomb code may be used. There is.

また、プロセッサ201は、必ずしも独立した1つのCPUまたはMPUであるとは限らず、1つのLSIやゲートアレー等の一部であるCPUコア等であっても構わないし、必ずしも汎用的なCPU等ではなく、特定の目的に使用されるDSP等であっても構わない。   Further, the processor 201 is not necessarily an independent CPU or MPU, and may be a CPU core that is a part of one LSI, a gate array, or the like. Alternatively, a DSP or the like used for a specific purpose may be used.

このExp−Golomb符号化装置100は、このプロセッサ201から、データ211とコマンド212とを受け取る。このデータ211はExp−Golomb符号化の対象となるデータやその他のデータであり、コマンド212は、例えば「データ211をExp−Golomb符号に変換せよ」というコマンドであり、それ以外の各種コマンドであることもある。   The Exp-Golomb encoding apparatus 100 receives data 211 and a command 212 from the processor 201. This data 211 is data to be subjected to Exp-Golomb encoding and other data, and the command 212 is, for example, a command “Convert data 211 to Exp-Golomb code”, and other various commands. Sometimes.

Exp−Golomb符号化装置100は、受け取ったデータ211を、コマンド212に従って、その内部のExp−Golomb符号生成部102と、出力制御部104と、メモリ部103とを使って、Exp−Golomb符号化する。そして、Exp−Golomb符号化したデータを、データバス301に出力する。これらの処理を、簡単かつ小規模な集積回路によって実現することが本発明の目的であり、その特徴である。   The Exp-Golomb encoding apparatus 100 uses the Exp-Golomb code generation unit 102, the output control unit 104, and the memory unit 103 in the Exp-Golomb encoding of the received data 211 in accordance with the command 212. To do. Then, the Exp-Golomb encoded data is output to the data bus 301. It is an object of the present invention to realize these processes with a simple and small-scale integrated circuit, and is a feature of the present invention.

本実施の形態のExp−Golomb符号化装置100をより詳細に説明するため、本実施の形態のExp−Golomb符号化装置100のブロック構成図を図2に示す。   In order to describe the Exp-Golomb encoding device 100 of the present embodiment in more detail, FIG. 2 shows a block configuration diagram of the Exp-Golomb encoding device 100 of the present embodiment.

上記のとおり、Exp−Golomb符号化装置100は、データ211とコマンド212とを受け取る。このデータ211は、例えば、H.264/AVCにおけるシンタックス要素データである。   As described above, the Exp-Golomb encoding apparatus 100 receives the data 211 and the command 212. This data 211 is, for example, H.264. H.264 / AVC syntax element data.

また、やはり上記のとおり、このExp−Golomb符号化装置100は、主にExp−Golomb符号生成部102と、出力制御部104と、メモリ部103とから構成される。Exp−Golomb符号化装置100はその他の部分も含んでいるが、本発明の本質と直接関係しないので省略をしている。   Also, as described above, this Exp-Golomb encoding device 100 mainly includes an Exp-Golomb code generation unit 102, an output control unit 104, and a memory unit 103. Exp-Golomb encoding apparatus 100 includes other parts, but is omitted because it is not directly related to the essence of the present invention.

Exp−Golomb符号化を実行する中心的な役割を担うのは、Exp−Golomb符号生成部102である。このExp−Golomb符号生成部102は、入力制御部121と、codeNum生成部122と、符号生成部123とから、主に構成される。Exp−Golomb符号生成部102はその他の部分も含んでいるが、本発明の本質と直接関係しないので省略をしている。   The Exp-Golomb code generation unit 102 plays a central role in executing Exp-Golomb coding. The Exp-Golomb code generation unit 102 mainly includes an input control unit 121, a codeNum generation unit 122, and a code generation unit 123. The Exp-Golomb code generation unit 102 includes other parts, but is omitted because it is not directly related to the essence of the present invention.

Exp−Golomb符号化装置100に入力されたデータ211とコマンド212とをまず受け取るのはこのExp−Golomb符号生成部102であり、その中でも特に、入力制御部121である。入力制御部121は、この入力されたデータ211とコマンド212とを受け取り、データ211のデータタイプに基づいて、codeNum(符号番号)を生成するための方式を決定する。このcodeNumを生成するための方式には、Unsigned、Signed、Mappedがある。codeNumを生成するための方式には、これら以外の方式もあるが、必ずしも本発明の本質とは直接関わらないので省略をする。   The Exp-Golomb code generation unit 102 first receives the data 211 and the command 212 input to the Exp-Golomb encoding device 100, and in particular, the input control unit 121 among them. The input control unit 121 receives the input data 211 and the command 212, and determines a method for generating codeNum (code number) based on the data type of the data 211. As a method for generating this codeNum, there are Unsigned, Signed, and Mapped. There are other methods for generating codeNum, but they are not directly related to the essence of the present invention, and will be omitted.

そして、入力制御部121は、入力されたコマンド212に従って、データ211をExp−Golomb符号化するための前提準備として、codeNum生成部122へ送ってcodeNumを生成する。この時に、codeNumを生成するための決定した方式に基づいて、codeNum生成部122に含まれる、Unsigned部124、Signed部125、Mapped部126の、それぞれのデータタイプに従ったcodeNumを生成するための部分に振り分けて、データ211を送り出す。   Then, in accordance with the input command 212, the input control unit 121 sends the code 211 to the codeNum generation unit 122 as a preparatory preparation for encoding the data 211 with Exp-Golomb encoding. At this time, based on the determined method for generating codeNum, the CodeNum for generating codeNum according to the respective data types of the Unsigned unit 124, the Signed unit 125, and the Mapped unit 126 included in the codeNum generation unit 122. The data 211 is sent out by dividing into parts.

codeNum生成部122の、Unsigned部124、Signed部125、Mapped部126のそれぞれの部分では、送られてきたデータ211を受け取り、それぞれの方式に従って、codeNumを生成する。codeNumは非負の整数値であり、codeNumがExp−Golomb符号化の対象となるデータになる。codeNumの生成方法に関しては、それぞれのExp−Golomb符号化の対象となるシンタックス要素の種別によって定まり、Unsigned、Signed、Mapped、その他があることは上記のとおりであるが、本発明の本質と直接関係しないのでこれ以上詳細な説明は省略する。さらに、本明細書の説明では、codeNumは32ビットのデータであると仮定する。上記のとおり、本発明がこの例に限定されるものではない。   In the codeNum generation unit 122, the Unsigned unit 124, the Signed unit 125, and the Mapped unit 126 receive the received data 211 and generate codeNum according to the respective methods. codeNum is a non-negative integer value, and codeNum is data to be subjected to Exp-Golomb encoding. The codeNum generation method is determined by the type of syntax element that is the subject of each Exp-Golomb encoding, and there are Unsigned, Signed, Mapped, and others as described above, but directly with the essence of the present invention. Since it is not related, further detailed explanation is omitted. Further, in the description herein, codeNum is assumed to be 32-bit data. As described above, the present invention is not limited to this example.

このようにして、codeNum生成部122において、Unsigned、Signed、Mappedの、それぞれのデータタイプに従って生成されたcodeNumは、符号生成部123へ送られる。そして、符号生成部123で、codeNumからExp−Golomb符号への符号化が実行される。上記説明した従来技術における符号生成部803と同様に、この符号生成部123が、Exp−Golomb符号化を実行する中心である。   In this way, the codeNum generation unit 122 sends the codeNum generated according to each data type of Unsigned, Signed, and Mapped to the code generation unit 123. Then, the code generation unit 123 performs encoding from codeNum to Exp-Golomb code. Similar to the code generation unit 803 in the conventional technology described above, the code generation unit 123 is the center for executing Exp-Golomb encoding.

符号生成部123におけるExp−Golomb符号化の手順と、Exp−Golomb符号化されたデータは、上記説明した従来技術における符号生成部803と同様である。Exp−Golomb符号化されたデータは、先行ゼロ部と、INFO部と、先行ゼロ部とINFO部とを分離する分離部との、3つの部分から構成される。上記codeNumに、1を加えた値の2を低とする対数値を求め、その整数部をMとすると、先行ゼロ部はM個の「0」から構成される。分離部は、常に1つの「1」で構成される。INFO部は、上記codeNumに1を加えた値を2進数で表現した時の、最上位の1を除いたビット列で構成される。これはまた、codeNumに1を加えた値から2のM乗を引いた値を、M桁の2進数で表現した時のビット列ということもできる。このようにして、最大32ビットの数値データに対して指数Golomb符号化を行うと仮定すると、Exp−Golomb符号化されたデータは最大65ビットになる可能性がある。   The procedure of Exp-Golomb encoding in the code generation unit 123 and the data subjected to Exp-Golomb encoding are the same as those of the code generation unit 803 in the above-described conventional technology. Exp-Golomb encoded data is composed of three parts: a leading zero part, an INFO part, and a separating part that separates the leading zero part and the INFO part. When a logarithmic value in which 2 of a value obtained by adding 1 to the codeNum is low is obtained and the integer part is M, the leading zero part is composed of M “0” s. The separation unit is always composed of one “1”. The INFO section is composed of a bit string excluding the most significant 1 when a value obtained by adding 1 to the codeNum is expressed in binary. This can also be referred to as a bit string when a value obtained by subtracting 2 to the power of M from a value obtained by adding 1 to codeNum is expressed by an M-digit binary number. Assuming that exponential Golomb encoding is performed on numerical data having a maximum of 32 bits in this way, Exp-Golomb encoded data may have a maximum of 65 bits.

しかしながら、本実施の形態では、この最大65ビットになる可能性があるExp−Golomb符号を全て生成するのでなく、INFO部だけを生成し、このINFO部だけをメモリ部103の中間バッファ131へ送り出す。   However, in the present embodiment, not all of the Exp-Golomb code that may be 65 bits at the maximum is generated, but only the INFO part is generated, and only this INFO part is sent to the intermediate buffer 131 of the memory part 103. .

そして、この最大65ビット長になるExp−Golomb符号のデータ長を、出力制御部104の分割判断部141に送る。   Then, the data length of the Exp-Golomb code having a maximum length of 65 bits is sent to the division determination unit 141 of the output control unit 104.

出力制御部104の分割判断部141は、このExp−Golomb符号化されたデータのデータ長をみながら、Exp−Golomb符号化されたデータの分割方法を判断し、メモリ部103の中間バッファ131と出力信号生成部132とを制御して、Exp−Golomb符号化されたデータを、32ビット長のデータバス301に出力する。   The division determination unit 141 of the output control unit 104 determines the division method of the Exp-Golomb encoded data while looking at the data length of the Exp-Golomb encoded data, and the intermediate buffer 131 of the memory unit 103 The output signal generator 132 is controlled to output Exp-Golomb encoded data to the 32-bit data bus 301.

この時の分割サイズは、例えばデータバス301のビット長である32ビットとすることができる。これによって、Exp−Golomb符号化されたデータをデータバスのバス幅にあわせて分割し、より効率的かつ高速にバス出力することが可能になる。但し、この分割サイズをデータバス301のビット長に合わせるのは1つの例であり、本発明がこの例に限られるものではない。   The division size at this time can be set to 32 bits, which is the bit length of the data bus 301, for example. As a result, Exp-Golomb encoded data can be divided in accordance with the bus width of the data bus, and the bus can be output more efficiently and at high speed. However, matching the division size to the bit length of the data bus 301 is one example, and the present invention is not limited to this example.

この時また、この分割サイズを例えば分割判断部141が保有するレジスタに記憶し、保存しておくことができる。これによって、記憶・保存しているビット長を読み出して効率的かつ高速に符号化データを分割し、より効率的かつ高速にバス出力することができると同時に、レジスタの内容を変更することによって、分割するべきビット長を必要に応じてフレキシブルに変更することも可能になる。   At this time, this division size can also be stored and stored in, for example, a register held by the division determination unit 141. As a result, the bit length stored and saved can be read out, and the encoded data can be divided efficiently and at high speed, and the bus output can be performed more efficiently and at the same time. The bit length to be divided can be flexibly changed as necessary.

次に、Exp−Golomb符号化されたデータのデータ長がバスのビット長を超えない時と、Exp−Golomb符号化されたデータのデータ長が、上記バスのビット長の「2×K−1」倍を超え、「2×K」倍を超えない時と、Exp−Golomb符号化されたデータのデータ長が、上記バスのビット長の「2×K」倍を超え、「2×K+1」倍を超えない時とに区分して、出力制御部104の分割判断部141が実行する分割方法の判断と、メモリ部103の中間バッファ131と出力信号生成部132とを制御して、Exp−Golomb符号化されたデータを、32ビット長のデータバス301に出力する時の制御方法を説明する。   Next, when the data length of the data encoded by Exp-Golomb does not exceed the bit length of the bus, the data length of the data encoded by Exp-Golomb encodes “2 × K−1” of the bit length of the bus. ”Times and not exceeding“ 2 × K ”times, and the data length of Exp-Golomb encoded data exceeds“ 2 × K ”times the bit length of the bus, and“ 2 × K + 1 ”. When the division method is not exceeded, the division determination unit 141 of the output control unit 104 determines the division method, the intermediate buffer 131 and the output signal generation unit 132 of the memory unit 103 are controlled, and the Exp− A control method for outputting Golomb encoded data to the 32-bit data bus 301 will be described.

まず最初に、Exp−Golomb符号化されたデータのデータ長がデータバス301のビット長を超えない時について説明をする。これは、言い替えるとExp−Golomb符号の先行ゼロ部と分離部とINFO部との合計がデータバス301のビット長である32を超えない時であり、INFO部のデータ長が15ビットを超えない時である。   First, a case where the data length of Exp-Golomb encoded data does not exceed the bit length of the data bus 301 will be described. In other words, this is when the sum of the leading zero part, separation part, and INFO part of the Exp-Golomb code does not exceed 32 which is the bit length of the data bus 301, and the data length of the INFO part does not exceed 15 bits. It's time.

この時のデータ構造と出力方法の概要を図3に示す。   An outline of the data structure and output method at this time is shown in FIG.

この時には、分割判断部141は、全てのExp−Golomb符号を一度にデータバス301に出力が可能であり、全てのExp−Golomb符号を一度にデータバス301に出力すると判断する。そして、中間バッファ131に対しては、全てのINFO部のデータを一度に出力信号生成部132へ送るように指示をする。これによって、ビット長N(但し、Nは0よりも大きく15以下の整数である)のINFO部が、そのまま出力信号生成部132へ送られる。   At this time, the division determination unit 141 determines that all Exp-Golomb codes can be output to the data bus 301 at one time and all Exp-Golomb codes are output to the data bus 301 at one time. Then, the intermediate buffer 131 is instructed to send all the INFO data to the output signal generator 132 at a time. As a result, the INFO section having a bit length N (where N is an integer greater than 0 and equal to or less than 15) is sent to the output signal generation section 132 as it is.

出力信号生成部132に対しては、中間バッファ131から送られた全てのINFO部のデータを受け取り、それと同じビット長Nの先行ゼロ部と、1ビットの「1」からなる分離部とを付加して、Exp−Golomb符号を生成し、そのExp−Golomb符号を一度にデータバス301に出力するように、指示が行われる。   The output signal generator 132 receives all the INFO data sent from the intermediate buffer 131, and adds a leading zero part having the same bit length N and a separating part consisting of 1 bit “1”. Then, an instruction is issued so as to generate an Exp-Golomb code and output the Exp-Golomb code to the data bus 301 at a time.

出力信号生成部132は、この指示に従い、中間バッファ131から送られた全てのINFO部のデータを受け取り、それと同じビット長Nの先行ゼロ部と、1ビットの「1」からなる分離部とを付加して、Exp−Golomb符号を生成し、そのExp−Golomb符号を一度にデータバス301に出力する。上記のとおり、この場合のExp−Golomb符号化されたデータのデータ長は、2×N+1ビット長であり、このビット長は32以下であるから、Exp−Golomb符号化されたデータを一度にデータバス301に出力することが可能である。   In accordance with this instruction, the output signal generation unit 132 receives the data of all the INFO units sent from the intermediate buffer 131, and outputs a leading zero part having the same bit length N and a separation unit consisting of 1 bit “1”. In addition, an Exp-Golomb code is generated, and the Exp-Golomb code is output to the data bus 301 at a time. As described above, the data length of the Exp-Golomb encoded data in this case is 2 × N + 1 bit length, and this bit length is 32 or less, so that the Exp-Golomb encoded data is data at a time. It is possible to output to the bus 301.

次に、Kをある自然数とする時、Exp−Golomb符号化されたデータのデータ長が、データバス301のビット長32の「2×K−1」倍を超え、「2×K」倍を超えない時について、説明をする。   Next, when K is a natural number, the data length of the data encoded by Exp-Golomb exceeds “2 × K−1” times the bit length 32 of the data bus 301, and increases by “2 × K” times. Explain when not exceeding.

上記のとおり本実施の形態では、codeNumの最大ビット長を32ビットと仮定し、Exp−Golomb符号化されたデータの最大ビット長を65ビットと仮定しているので、上記条件においてK≧2となる、すなわち、Exp−Golomb符号化されたデータのデータ長が、データバス301のビット長32の(2×2−1=3)倍を超えることは起こりえない。従って、本実施の形態においてこの条件に該当するのは、K=1、すなわち、Exp−Golomb符号化されたデータのデータ長が、データバス301のビット長32の(2×1−1=1)倍を超え、(2×1=2)倍を超えない時だけになる。   As described above, in the present embodiment, the maximum bit length of codeNum is assumed to be 32 bits, and the maximum bit length of Exp-Golomb encoded data is assumed to be 65 bits. That is, the data length of the Exp-Golomb encoded data cannot exceed (2 × 2−1 = 3) times the bit length 32 of the data bus 301. Therefore, in this embodiment, this condition corresponds to K = 1, that is, the data length of the data encoded with Exp-Golob is 32 (2 × 1-1 = 1) with the bit length 32 of the data bus 301. ) Times greater than (2 × 1 = 2) times.

具体的には、Exp−Golomb符号化されたデータのデータ長が、32ビット以上で63ビット以下の時であり、言い替えると、INFO部のデータ長が16ビット以上で31ビット以下の時が該当する。   Specifically, this is when the data length of Exp-Golomb encoded data is 32 bits or more and 63 bits or less, in other words, when the data length of the INFO section is 16 bits or more and 31 bits or less. To do.

この時のデータ構造と出力方法の概要を図4に示す。   FIG. 4 shows an outline of the data structure and output method at this time.

この時には、分割判断部141は、まず最初に、中間バッファ131に対して、INFO部を出力信号生成部132に送ることを待機させる。   At this time, the division determination unit 141 first causes the intermediate buffer 131 to wait to send the INFO unit to the output signal generation unit 132.

そして、この中間バッファ131がINFO部を出力信号生成部132に送ることを待機している間に、出力信号生成部132に対して、INFO部のビット長N(但し、Nは16以上で31以下の自然数である)に相当するビット長の先行ゼロ部を、何回かに分割してデータバス302に出力するように指示をする。本実施の形態では、上記のとおり、INFO部のビット長Nは16以上で31以下の自然数であると仮定しているので、1回でこの先行ゼロ部をデータバス302に出力することができる。   While this intermediate buffer 131 is waiting for the INFO section to be sent to the output signal generation section 132, the output signal generation section 132 is informed of the bit length N of the INFO section (where N is 16 or more and 31 It is instructed to divide the leading zero part having a bit length corresponding to (the following natural number) into the data bus 302 by dividing it into several times. In the present embodiment, as described above, it is assumed that the bit length N of the INFO part is a natural number of 16 or more and 31 or less, so that the leading zero part can be output to the data bus 302 at one time. .

この先行ゼロ部の出力が終わると、次に、分割判断部141は、中間バッファ131に対して、INFO部を出力信号生成部132に送るように指示をする。この指示に従って、中間バッファ131は、INFO部を出力信号生成部132に送る。上記のとおり、このINFO部のデータ長Nは、16ビット以上で31ビット以下である。   When the output of the leading zero part is finished, next, the division determination unit 141 instructs the intermediate buffer 131 to send the INFO part to the output signal generation part 132. In accordance with this instruction, the intermediate buffer 131 sends the INFO unit to the output signal generation unit 132. As described above, the data length N of the INFO portion is 16 bits or more and 31 bits or less.

そして、分割判断部141は、出力信号生成部132に対して、中間バッファ131から送られたINFO部を受け取り、このINFO部の前に分離部を付加し、これを何回かに分割してデータバス302に出力するように指示をする。   Then, the division determination unit 141 receives the INFO unit sent from the intermediate buffer 131 to the output signal generation unit 132, adds a separation unit in front of the INFO unit, and divides this into several times. Instruct to output to the data bus 302.

本実施の形態では、上記のとおり、INFO部のデータ長Nは16ビット以上で31ビット以下であるから、INFO部の前に分離部を付加した部分のデータ長は17ビット以上で32ビット以下であり、1回でこのINFO部に分離部を付加した部分をデータバス302に出力することができる。   In the present embodiment, as described above, since the data length N of the INFO part is 16 bits or more and 31 bits or less, the data length of the part to which the separation part is added before the INFO part is 17 bits or more and 32 bits or less. A portion obtained by adding a separation unit to the INFO unit can be output to the data bus 302 at one time.

最後に、Kをある自然数とする時、Exp−Golomb符号化されたデータのデータ長が、データバス301のビット長32の「2×K」倍を超え、「2×K+1」倍を超えない時について、説明をする。   Finally, when K is a natural number, the data length of the data encoded by Exp-Golomb exceeds “2 × K” times the bit length 32 of the data bus 301 and does not exceed “2 × K + 1” times. Explain about time.

上記のとおり本実施の形態では、codeNumの最大ビット長を32ビットと仮定し、Exp−Golomb符号化されたデータの最大ビット長を65ビットと仮定しているので、上記条件においてK≧2となる、すなわち、Exp−Golomb符号化されたデータのデータ長が、データバス301のビット長32の(2×2=4)倍を超えることは起こりえない。従って、本実施の形態においてこの条件に該当するのは、K=1、すなわち、Exp−Golomb符号化されたデータのデータ長が、データバス301のビット長32の(2×1=2)倍を超え、(2×1+1=3)倍を超えない時だけになる。   As described above, in the present embodiment, the maximum bit length of codeNum is assumed to be 32 bits, and the maximum bit length of Exp-Golomb encoded data is assumed to be 65 bits. In other words, the data length of the Exp-Golomb encoded data cannot exceed (2 × 2 = 4) times the bit length 32 of the data bus 301. Therefore, in this embodiment, this condition corresponds to K = 1, that is, the data length of the data encoded by Exp-Golomb is (2 × 1 = 2) times the bit length 32 of the data bus 301. Only when (2 × 1 + 1 = 3) times is not exceeded.

具体的には、Exp−Golomb符号化されたデータのデータ長が、64ビット以上で95ビット以下の時であり、言い替えると、INFO部のデータ長が32ビット以上で47ビット以下の時が該当する。また、上記のとおり、本実施の形態では、codeNumの最大ビット長を32ビットと仮定し、Exp−Golomb符号化されたデータの最大データ長は65ビットと仮定しているので、この条件に該当するのは、INFO部のデータ長が32ビットで、Exp−Golomb符号化されたデータのデータ長が65ビットの時だけになる。   Specifically, this is when the data length of Exp-Golomb encoded data is 64 bits or more and 95 bits or less, in other words, when the data length of the INFO section is 32 bits or more and 47 bits or less. To do. In addition, as described above, in this embodiment, the maximum bit length of codeNum is assumed to be 32 bits, and the maximum data length of Exp-Golomb encoded data is assumed to be 65 bits. Only when the data length of the INFO portion is 32 bits and the data length of the data encoded with Exp-Golomb is 65 bits.

この時のデータ構造と出力方法の概要を図5に示す。   An outline of the data structure and output method at this time is shown in FIG.

この時もまた、分割判断部141は、まず最初に、中間バッファ131に対して、INFO部を出力信号生成部132に送ることを待機させる。   Also at this time, the division determination unit 141 first causes the intermediate buffer 131 to wait to send the INFO unit to the output signal generation unit 132.

そして、この中間バッファ131がINFO部を出力信号生成部132に送ることを待機している間に、出力信号生成部132に対して、INFO部のビット長Nに相当するビット長の先行ゼロ部を、何回かに分割してデータバス302に出力し、先行ゼロ部にバス幅未満の大きさの端数に相当するデータがある時には、それはそのまま残すように指示をする。本実施の形態では、上記のとおり、INFO部のビット長Nは32だけであると仮定しているので、1回でこの先行ゼロ部の全てをデータバス302に出力することができ、先行ゼロ部にバス幅未満の大きさの端数に相当するデータは残らない。   While this intermediate buffer 131 is waiting for the INFO section to be sent to the output signal generation section 132, the output signal generation section 132 is preceded by a leading zero section having a bit length corresponding to the bit length N of the INFO section. Is output to the data bus 302, and when there is data corresponding to a fraction less than the bus width in the leading zero part, it is instructed to leave it as it is. In the present embodiment, as described above, it is assumed that the bit length N of the INFO part is only 32. Therefore, all of the leading zero part can be output to the data bus 302 at one time, and the leading zero can be output. No data corresponding to a fraction less than the bus width remains in the part.

この先行ゼロ部の出力が終わると、次に、分割判断部141は、中間バッファ131に対して、INFO部を出力信号生成部132に送るように指示をする。この指示に従って、中間バッファ131は、INFO部を出力信号生成部132に送る。上記のとおり、このINFO部のデータ長Nもまた、32ビットのみである。   When the output of the leading zero part is finished, next, the division determination unit 141 instructs the intermediate buffer 131 to send the INFO part to the output signal generation part 132. In accordance with this instruction, the intermediate buffer 131 sends the INFO unit to the output signal generation unit 132. As described above, the data length N of this INFO part is also only 32 bits.

そして、分割判断部141は、出力信号生成部132に対して、中間バッファ131から送られたINFO部を受け取り、先行ゼロ部のバス幅未満の端数に相当するデータの残りがある場合にはこの先行ゼロ部の残りと、その後ろに分離部である1ビットの「1」を付加し、さらにその後にINFO部のデータバス幅32の整数倍を超えている部分を付加したものを、何回かに分割してデータバス302に出力するように指示をする。   Then, the division determination unit 141 receives the INFO unit sent from the intermediate buffer 131 to the output signal generation unit 132, and when there is a remaining data corresponding to a fraction less than the bus width of the leading zero part, What is the number of times when the remainder of the leading zero part and the 1-bit “1” that is the separation part are added after that, and then the part exceeding the integer multiple of the data bus width 32 of the INFO part is added? An instruction is given to divide the data into data and output it to the data bus 302.

本実施の形態では、上記のとおり、先行ゼロ部のバス幅未満の端数に相当するデータの残り部分は存在しない。また、INFO部のデータ長Nは32ビットであるから、INFO部のデータバス302のバス幅32の整数倍を超えている部分も存在しない。   In the present embodiment, as described above, there is no remaining portion of data corresponding to a fraction less than the bus width of the leading zero part. Further, since the data length N of the INFO part is 32 bits, there is no part exceeding an integral multiple of the bus width 32 of the data bus 302 of the INFO part.

従って、次に、分離部の1ビットの「1」だけがデータバス302に出力される。   Therefore, next, only 1 bit “1” of the separation unit is output to the data bus 302.

そして次に、INFO部の残り部分であるデータバス302のバス幅32の整数倍の部分を、このバス幅32ずつの大きさに分割し、データバス302に出力するように指示をする。   Next, an instruction is given to divide a portion of the data bus 302 that is an integral multiple of the bus width 32, which is the remaining portion of the INFO portion, into a size corresponding to the bus width 32 and output it to the data bus 302.

出力信号生成部132は、この指示に従って、INFO部の残り部分、すなわち、中間バッファ131から受け取ったINFO部の全てを、データバス302のバス幅32ずつに分割しながら、データバス302に出力する。本実施の形態では、INFO部のデータ長は32ビットであると仮定しているので、中間バッファ131から受け取ったINFO部の全てを、データバス302に1回で出力することができる。   In accordance with this instruction, the output signal generation unit 132 outputs the remaining part of the INFO unit, that is, the entire INFO unit received from the intermediate buffer 131 to the data bus 302 while dividing the INFO unit by the bus width 32 of the data bus 302. . In this embodiment, since it is assumed that the data length of the INFO section is 32 bits, all of the INFO sections received from the intermediate buffer 131 can be output to the data bus 302 once.

このようにすることで、Exp−Golomb符号化されたデータの最大ビット長は65ビットであるが、メモリ部103の内部に65ビット長のバッファメモリやシフトレジスタ等を持つ必要が無く、Exp−Golomb符号化装置全体の回路規模を削減することが可能になる。   In this way, the maximum bit length of Exp-Golomb encoded data is 65 bits, but there is no need to have a 65-bit buffer memory or shift register inside the memory unit 103, and Exp- It is possible to reduce the circuit scale of the entire Golomb encoding device.

また、データバス302に対して、32ビット長単位で出力可能であるので、後段の回路における処理も、他の符号化結果と共用のものを使用することができる。   In addition, since data can be output in units of 32 bits to the data bus 302, the processing in the subsequent circuit can also use the same processing as other encoding results.

なお、本実施の形態では、INFO部のデータの最大長を32ビット、Exp−Golomb符号化されたデータの最大長を65ビットと仮定して説明をしたが、このデータサイズよりも大きなデータサイズの時にも上記説明は同様に適用できるので、詳細な説明は省略をする。   In the present embodiment, the description has been made assuming that the maximum length of data in the INFO section is 32 bits and the maximum length of Exp-Golomb encoded data is 65 bits. However, a data size larger than this data size is described. At this time, the above description can be applied in the same manner, and thus detailed description is omitted.

また、本実施の形態のGolomb符号化装置100が実行するのは、本発明のGolomb符号化方法の1つの実施の形態であり、このGolomb符号化装置100は、図示しないが、マイクロコンピュータを始めとするコンピュータによって実現されることがあり、このコンピュータを制御してGolomb符号化を実行させるのは、本発明のGolomb符号化プログラムの1つの実施の形態である。また、この本発明のGolomb符号化プログラムの1つの実施の形態であるプログラムはコンピュータ読み取り可能な情報記録媒体に記録され、この情報記録媒体は、本発明のGolomb符号化プログラムを記録した情報記録媒体の1つの実施の形態である。   The Golomb encoding apparatus 100 according to the present embodiment executes one embodiment of the Golomb encoding method according to the present invention. The Golomb encoding apparatus 100 includes a microcomputer (not shown). It is an embodiment of the Golomb encoding program of the present invention that controls the computer to execute Golomb encoding. Also, the program that is one embodiment of the Golomb encoding program of the present invention is recorded on a computer-readable information recording medium, and this information recording medium is an information recording medium that records the Golomb encoding program of the present invention. This is one embodiment.

本発明では、H.264/AVCにおいてシンタックス要素を符号化するために必要となる、Exp−Golomb符号化を、簡単かつ小規模な集積回路によって実現することが可能になり、その産業上の利用可能性は極めて大きい。   In the present invention, H.P. Exp-Golomb encoding required for encoding syntax elements in H.264 / AVC can be realized by a simple and small-scale integrated circuit, and its industrial applicability is extremely large. .

本発明の実施の形態の1つであるExp−Golomb符号化装置の全体概要図1 is an overall schematic diagram of an Exp-Golomb encoding device that is one embodiment of the present invention. 本発明の実施の形態のExp−Golomb符号化装置のブロック構成図The block block diagram of the Exp-Golomb encoding apparatus of embodiment of this invention INFO部のデータ長が15ビットを超えない時のデータ構造と出力方法の概要を示す図The figure which shows the outline | summary of the data structure and output method when the data length of an INFO part does not exceed 15 bits INFO部のデータ長が16ビット以上で31ビット以下の時のデータ構造と出力方法の概要を示す図The figure which shows the outline of the data structure and output method when the data length of the INFO section is 16 bits or more and 31 bits or less INFO部のデータ長が32ビットの時のデータ構造と出力方法の概要を示す図The figure which shows the outline of the data structure and output method when the data length of an INFO part is 32 bits 従来のExp−Golomb符号化装置のブロック構成図Block diagram of a conventional Exp-Golomb encoding device シンタックス要素データがExp−Golomb符号化される様子を示す図The figure which shows a mode that syntax element data is Exp-Golomb encoding.

符号の説明Explanation of symbols

100,800 Exp−Golomb符号化装置
102 Exp−Golomb符号生成部
103 メモリ部
104 出力制御部
121,801 入力制御部
122,802 codeNum生成部
123,803 符号生成部
124,821 Unsigned部
125,822 Signed部
126,823 Mapped部
131,804 中間バッファ
132,805 出力信号生成部
141 分割判断部
201 プロセッサ
211 データ
212 コマンド
301,806 データバス
810 シンタックス要素データ
DESCRIPTION OF SYMBOLS 100,800 Exp-Golomb encoding apparatus 102 Exp-Golomb code generation part 103 Memory part 104 Output control part 121,801 Input control part 122,802 codeNum generation part 123,803 Code generation part 124,821 Unsigned part 125,822 Signed Unit 126, 823 Mapped unit 131, 804 Intermediate buffer 132, 805 Output signal generation unit 141 Division determination unit 201 Processor 211 Data 212 Command 301, 806 Data bus 810 Syntax element data

Claims (9)

元のデータを符号化する符号化部と、
前記符号化部によって符号化されたデータのデータ長を判断するデータ長判断部と、
前記データ長判断部の判断結果に基づいて前記符号化されたデータを所定のビット長に分割する分割部と、
前記分割されたデータをバスに出力する出力部と、
を有するデータ符号化装置。
An encoding unit for encoding the original data;
A data length determination unit for determining a data length of data encoded by the encoding unit;
A division unit that divides the encoded data into a predetermined bit length based on a determination result of the data length determination unit;
An output unit for outputting the divided data to a bus;
A data encoding device.
前記符号化されたデータは第1のサブデータと第2のサブデータと第3のサブデータから構成され、
前記第1のサブデータと第3のサブデータとはそのデータ長が同じビット長である、
請求項1に記載のデータ符号化装置。
The encoded data is composed of first sub data, second sub data, and third sub data,
The first sub-data and the third sub-data have the same bit length.
The data encoding apparatus according to claim 1.
前記符号化されたデータのデータ長が前記所定のビット長を超えない時は、前記符号化されたデータの全てを1回で前記バスに出力し、
Kを1つの自然数とする時、
前記符号化されたデータのデータ長が、前記所定のビット長の「2×K−1」倍を超え「2×K」倍を超えない時は、前記第1のサブデータを1回または複数回に分割して前記バスに出力した後に、前記第2のサブデータと第3のサブデータを1回または複数回に分割して前記バスに出力し、
前記符号化されたデータのデータ長が、前記所定のビット長の「2×K」倍を超え「2×K+1」倍を超えない時は、前記第1のサブデータを1回または複数回に分割して前記バスに出力し、前記第1のサブデータの前記所定のビット長未満の部分と前記第2のサブデータ及び前記第3のサブデータの前記所定のビット長の整数倍を超えている部分を前記バスに出力した後に、前記第3のサブデータを1回または複数回に分割して前記バスに出力する、
請求項2に記載のデータ符号化装置。
When the data length of the encoded data does not exceed the predetermined bit length, all of the encoded data is output to the bus at a time,
When K is a natural number,
When the data length of the encoded data exceeds “2 × K−1” times the predetermined bit length and does not exceed “2 × K” times, the first sub-data is set once or a plurality of times. Dividing the output into the times and outputting to the bus, then dividing the second sub-data and the third sub-data into one or more times and outputting to the bus,
When the data length of the encoded data exceeds “2 × K” times the predetermined bit length and does not exceed “2 × K + 1” times, the first sub-data is set once or a plurality of times. Dividing and outputting to the bus, the portion of the first sub data less than the predetermined bit length and an integer multiple of the predetermined bit length of the second sub data and the third sub data After outputting the portion to the bus, the third sub-data is divided into one or more times and output to the bus.
The data encoding device according to claim 2.
前記符号化は指数Golomb符号化であり、
前記第1のサブデータは先行ゼロ部であり、
前記第3のサブデータはINFO部であり、
前記第2のサブデータは前記先行ゼロ部と前記INFO部との分離部である、
請求項3に記載のデータ符号化装置。
The encoding is exponential Golomb encoding;
The first sub-data is a leading zero part;
The third sub-data is an INFO section;
The second sub-data is a separation part between the leading zero part and the INFO part.
The data encoding device according to claim 3.
前記所定のビット長は前記バスのビット長に等しい、
請求項1から請求項4のいずれか1項に記載のデータ符号化装置。
The predetermined bit length is equal to the bit length of the bus;
The data encoding device according to any one of claims 1 to 4.
前記所定のビット長を記憶するレジスタを備えた、
請求項1から請求項5のいずれか1項に記載のデータ符号化装置。
A register for storing the predetermined bit length;
The data encoding device according to any one of claims 1 to 5.
元のデータを符号化する符号化手順と、
前記符号化手順によって符号化されたデータのデータ長を判断するデータ長判断手順と、
前記データ長判断手順の判断結果に基づいて前記符号化されたデータを所定のビット長に分割する分割手順と、
前記分割されたデータをバスに出力する出力手順と、
を有するデータ符号化方法。
An encoding procedure for encoding the original data;
A data length determination procedure for determining the data length of the data encoded by the encoding procedure;
A division procedure for dividing the encoded data into a predetermined bit length based on a determination result of the data length determination procedure;
An output procedure for outputting the divided data to a bus;
A data encoding method comprising:
コンピュータによって実行可能なプログラムであって、
元のデータを符号化する符号化ステップと、
前記符号化ステップによって符号化されたデータのデータ長を判断するデータ長判断ステップと、
前記データ長判断ステップの判断結果に基づいて前記符号化されたデータを所定のビット長に分割する分割ステップと、
前記分割されたデータをバスに出力する出力ステップと、
を有するデータ符号化プログラム。
A program executable by a computer,
An encoding step for encoding the original data;
A data length determining step of determining a data length of the data encoded by the encoding step;
A division step of dividing the encoded data into a predetermined bit length based on a determination result of the data length determination step;
An output step of outputting the divided data to a bus;
A data encoding program.
コンピュータによって読み取り可能な情報記録媒体であって、
請求項8に記載のデータ符号化プログラムを記録した情報記録媒体。
An information recording medium readable by a computer,
An information recording medium on which the data encoding program according to claim 8 is recorded.
JP2006118918A 2006-04-24 2006-04-24 Unit, method and program for data coding, and information recording medium having recorded data coding program Pending JP2007295157A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2006118918A JP2007295157A (en) 2006-04-24 2006-04-24 Unit, method and program for data coding, and information recording medium having recorded data coding program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2006118918A JP2007295157A (en) 2006-04-24 2006-04-24 Unit, method and program for data coding, and information recording medium having recorded data coding program

Publications (1)

Publication Number Publication Date
JP2007295157A true JP2007295157A (en) 2007-11-08

Family

ID=38765345

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006118918A Pending JP2007295157A (en) 2006-04-24 2006-04-24 Unit, method and program for data coding, and information recording medium having recorded data coding program

Country Status (1)

Country Link
JP (1) JP2007295157A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010141884A (en) * 2008-12-15 2010-06-24 Nvidia Corp Encoding video compression method and system
CN103152567A (en) * 2013-02-26 2013-06-12 中国科学院光电技术研究所 Any order number index Columbus encoder and method thereof
CN109313260A (en) * 2017-10-27 2019-02-05 深圳市大疆创新科技有限公司 Radar data processing method, equipment and moveable platform

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010141884A (en) * 2008-12-15 2010-06-24 Nvidia Corp Encoding video compression method and system
CN101754020B (en) * 2008-12-15 2013-03-27 辉达公司 Method and system for encoded video compression
CN103152567A (en) * 2013-02-26 2013-06-12 中国科学院光电技术研究所 Any order number index Columbus encoder and method thereof
CN109313260A (en) * 2017-10-27 2019-02-05 深圳市大疆创新科技有限公司 Radar data processing method, equipment and moveable platform

Similar Documents

Publication Publication Date Title
US8487791B2 (en) Parallel entropy coding and decoding methods and devices
JP4540585B2 (en) Encoding device and decoding device
JP5069571B2 (en) Decryption processing device
US8400336B2 (en) Methods and devices for reordered parallel entropy coding and decoding
US20030085822A1 (en) High performance memory efficient variable-length coding decoder
EP2362657A1 (en) Parallel entropy coding and decoding methods and devices
JP2010278668A (en) Coding apparatus and method, and decoding apparatus and method
KR102449190B1 (en) Method and apparatus for parallel entropy encoding/decoding
KR102123620B1 (en) Method and apparatus for entropy encoding or entropy decoding of video signals for large-scale parallel processing
JP4896944B2 (en) Image decoding device
JP2010178319A (en) Image coding apparatus and image coding method
US20150326859A1 (en) Video quantization-parameter encoding method, video quantization-parameter decoding method, device, and program
JP2007295157A (en) Unit, method and program for data coding, and information recording medium having recorded data coding program
Wen et al. Multiple-symbol parallel CAVLC decoder for H. 264/AVC
JP2008193248A (en) Image encoder and image decoder
JP6614935B2 (en) Video encoding apparatus and program
JP2007158698A (en) Image decoding apparatus and image decoding method
EP3149947B1 (en) Dedicated arithmetic encoding instruction
US20120147972A1 (en) Image decoding apparatus, image decoding method, image encoding apparatus, image encoding method, and program
US8391367B1 (en) High performance context-adaptive video processor
JP5307520B2 (en) Image compression device
JP2006345348A (en) Video decoding device
JP5194082B2 (en) Image encoding device
CN113905233A (en) Entropy decoding method based on audio video coding standard, readable medium and electronic device thereof
WO2012067412A2 (en) Method and apparatus for parallel entropy encoding/decoding