BINARY ARITHMETIC CODING APPARATUS AND METHOD
A binary arithmetic coding apparatus is implemented in a video encoder chip. The binary arithmetic coding apparatus outputs a code word according to a syntax element value, and includes a look-up table (LUT), a suffix generator and a combiner. The LUT outputs a first binary string according to the syntax element value. The suffix generator performs exp-Golomb binarization on the syntax element value to generate a second binary string. When the syntax element value is smaller than or equal to a threshold, the first binary string is outputted as the code word. When the syntax element value is greater than the threshold, the combiner combines the first binary string and the second binary string to form the code word.
This application claims the benefit of U.S. Provisional Application Ser. No. 62/438,472, filed Dec. 23, 2016, the subject matter of which is incorporated herein by reference.
BACKGROUND OF THE INVENTION Field of the InventionThe invention relates in general to a binary arithmetic coding apparatus and method, and more particularly to a binary arithmetic coding apparatus and method applied in a video encoder chip.
Description of the Related ArtVideo compression and transmission have long since been the development focus of the electronics industry. Original data of video is formed by a colossal number of video frames, each of which includes a colossal number of pixels. Transmitting these video signals without compression results in a tremendous waste in both circuit area and bandwidth, and is in fact infeasible. Thus, there are numerous video compression standards developed in response, e.g., Moving Picture Experts Group (MPEG) and H.264 video compression standards. These video compression standards use entropy coding to perform encoding. Entropy coding uses statistical characteristics, and represents data appearing more frequently by shorter code words and data appearing less frequently by longer code words, thus obtaining a higher compression rate. Binary arithmetic coding is a type of entropy coding. However, implementing binary arithmetic coding on a semiconductor chip needs to consider issues of circuit area occupied and coding efficiency. Therefore, there is a need for a binary arithmetic coding circuit that attends to both circuit area occupied and encoding efficiency.
SUMMARY OF THE INVENTIONIt is an object of the present invention to provide a binary arithmetic coding apparatus applied in a video encoder chip. The binary arithmetic coding apparatus is capable of generating exp-Golomb arithmetic codes by two approaches—a look-up table (LUT) and arithmetic. The LUT provides an advantage of being fast in speed, and the arithmetic provides an advantage of saving circuit area. The binary arithmetic coding apparatus is capable of maintaining balance between these two advantages.
It is another object of the present invention to provide a binary arithmetic coding apparatus applied in a video encoder chip. The binary arithmetic coding apparatus is capable of separately processing a prefix and a suffix of an exp-Golomb binary code, providing more efficient code acquisition.
A binary arithmetic coding apparatus implemented in an encoder chip is provided according to an embodiment of the present invention. The binary arithmetic coding apparatus outputs a code word according to a syntax element value, and includes an LUT, a suffix generator and a combiner. The LUT outputs a first binary string according to the syntax element value, and is provided with two binarization methods that are respectively unary binarization and exp-Golomb binarization. The suffix generator performs exp-Golomb binarization according to the syntax element value to generate a second binary string. The combiner is for combining the first binary string and the second binary string. When the syntax element value is smaller than or equal to a threshold, the first binary string is outputted as the code word. When the syntax element value is greater than the threshold, the combiner combines the first binary string and the second binary string to form the code word.
A binary arithmetic coding apparatus implemented in a video encoder chip is provided according to another embodiment of the present invention. The binary arithmetic coding apparatus outputs a code word according to a syntax element value, and includes an LUT, a suffix generator and a multiplexer. The LUT outputs a first binary string according to the syntax element value, and is provided with two binarization methods that are respectively unary binarization and exp-Golomb binarization. The suffix generator performs exp-Golomb binarization according to the syntax element value to generate a second binary string. The multiplexer receives the first binary string and the second binary string as an input. When the syntax element value is smaller than or equal to a threshold, the multiplexer selects and outputs the first binary string. When the syntax element value is greater than the threshold, the multiplexer sequentially selects and outputs the first binary string and the second binary string.
A binary arithmetic coding method implemented in a video encoder chip is provided according to yet another embodiment of the present invention. The binary arithmetic coding method outputs a code word according to a syntax element value, and includes steps of: receiving a syntax element value; determining whether the syntax element value is greater than a threshold; utilizing an LUT to output a binary string as the code word when the syntax element value is smaller than or equal to the threshold; and utilizing the LUT to output a prefix, utilizing a suffix generator to generate a suffix, and combining the prefix and the suffix to form the code word when the syntax element value is greater than the threshold.
The above and other aspects of the invention will become better understood with regard to the following detailed description of the preferred but non-limiting embodiments. The following description is made with reference to the accompanying drawings.
Referring to
The suffix generator 120 adopts exp-Golomb binarization. In some embodiments, the suffix generator 120 may be implemented by the pseudo codes below.
These pseudo codes may form a hardware circuit. For example, these pseudo codes are re-written by a hardware description language (HDL), and are synthesized into a physical circuit to be implemented on a semiconductor chip. In this example, the suffix generator 120 obtains the suffix through logic calculation performed by a physical circuit instead of from the LUT. In this embodiment, UEG0_input in these pseudo codes is an 11-bit input, and UEG0_input_tmp is equal to UEG0_input plus 1. In another embodiment, the suffix generator 120 may also be implemented by an LUT.
Referring to
One advantage of an LUT is being fast in speed, and one advantage of arithmetic is saving circuit area. The binary arithmetic coding apparatus of the embodiments of the present invention is capable of maintaining balance between the two advantages above. Further, the embodiments of the present invention are capable of separately processing the prefix and the suffix of exp-Golomb binarization, providing more efficient code acquisition.
While the invention has been described by way of example and in terms of the preferred embodiments, it is to be understood that the invention is not limited thereto. On the contrary, it is intended to cover various modifications and similar arrangements and procedures, and the scope of the appended claims therefore should be accorded the broadest interpretation so as to encompass all such modifications and similar arrangements and procedures.
Claims
1. A binary arithmetic coding apparatus, implemented in a video encoder chip, outputting a code word according to a syntax element value, comprising:
- a look-up table (LUT), outputting a first binary string according to the syntax element value, the LUT being provided with two binarization methods including unary binarization and exp-Golomb binarization;
- a suffix generator, performing exp-Golomb binarization according to the syntax element value to generate a second binary string; and
- a combiner, for combining the first binary string and the second binary string;
- wherein, when the syntax element value is smaller than or equal to a threshold, the first binary string is outputted as the code word; when the syntax element value is greater than the threshold, the combiner combines the first binary string and the second binary string to form the code word.
2. The binary arithmetic coding apparatus according to claim 1, wherein the threshold is 31.
3. The binary arithmetic coding apparatus according to claim 1, further comprising a first-in-first-out (FIFO), the binary arithmetic coding apparatus storing the code word into the FIFO.
4. The binary arithmetic coding apparatus according to claim 1, wherein the LUT comprises a prefix column and a suffix column, and the first binary string comprises a combination formed by a prefix selected from the prefix column and a suffix selected from the suffix column.
5. The binary arithmetic coding apparatus according to claim 4, wherein the suffix column comprises unary binarization and exp-Golomb binarization, and the suffix column comprises exp-Golomb binarization.
6. The binary arithmetic coding apparatus according to claim 1, wherein when the syntax element is smaller than or equal to 15, the first binary string comprises only unary binarization.
7. A binary arithmetic coding apparatus, implemented in a video encoder chip, outputting a code word according to a syntax element value, comprising:
- a look-up table (LUT), outputting a first binary string according to the syntax element value, the LUT being provided with two binarization methods including unary binarization and exp-Golomb binarization;
- a suffix generator, performing exp-Golomb binarization according to the syntax element value to generate a second binary string; and
- a multiplexer, receiving the first binary string and the second binary string as an input;
- wherein, when the syntax element value is smaller than a threshold, the multiplexer selects and outputs the first binary string; when the syntax element value is greater than the threshold, the multiplexer sequentially selects and outputs the first binary string and the second binary string.
8. The binary arithmetic coding apparatus according to claim 7, wherein the threshold is 31.
9. The binary arithmetic coding apparatus according to claim 7, further comprising a first-in-first-out (FIFO) that receives an output of the multiplexer.
10. The binary arithmetic coding apparatus according to claim 7, wherein the LUT comprises a prefix column and a suffix column, and the first binary string comprises a combination formed by a prefix selected from the prefix column and a suffix selected from the suffix column.
11. The binary arithmetic coding apparatus according to claim 10, wherein the suffix column comprises unary binarization and exp-Golomb binarization, and the suffix column comprises exp-Golomb binarization.
12. The binary arithmetic coding apparatus according to claim 7, wherein when the syntax element value is smaller than 15, the first binary string comprises only unary binarization.
13. A binary arithmetic coding method, implemented in a video encoder chip, outputting a code word according to a syntax element value, comprising:
- receiving the syntax element value;
- determining whether the syntax element value is greater than a threshold;
- utilizing a look-up table (LUT) to output a binary string as the code word when the syntax element value is smaller than or equal to the threshold, wherein the LUT comprises unary binarization and exp-Colomb binarization; and utilizing the LUT to output a prefix of exp-Golomb binarization, utilizing a suffix generator to generate a suffix of exp-Golomb binarization, and combining the prefix and the suffix to form the code word when the syntax element value is greater than the threshold.
14. The binary arithmetic coding method according to claim 13, wherein the threshold is 31.
15. The binary arithmetic coding method according to claim 13, further comprising:
- storing the code word into a first-in-first-out (FIFO).
16. The binary arithmetic coding method according to claim 13, wherein the LUT comprises a prefix column and a suffix column, and the first binary string comprises a combination formed by a prefix selected from the prefix column and a suffix selected from the suffix column.
17. The binary arithmetic coding method according to claim 16, wherein the suffix column comprises unary binarization and exp-Golomb binarization, and the suffix column comprises exp-Golomb binarization.
18. The binary arithmetic coding method according to claim 13, wherein the first binary string comprises only unary binarization when the syntax element is smaller than or equal to 15.
Type: Application
Filed: Dec 15, 2017
Publication Date: Jun 28, 2018
Inventors: Pai-Chin LIU (Hsinchu Hsien), He-Yuan LIN (Hsinchu Hsien)
Application Number: 15/842,986