APPARATUS AND METHOD FOR BUFFERING CONTEXT ARRAYS REFERENCED FOR PERFORMING ENTROPY DECODING UPON MULTI-TILE ENCODED PICTURE AND RELATED ENTROPY DECODER
A buffering apparatus for buffering context arrays of a multi-tile encoded picture having a plurality of tiles includes a first buffer and a second buffer. The first buffer is arranged to buffer a first context array referenced for performing entropy decoding upon a first tile of the multi-tile encoded picture. The second buffer is arranged to buffer a second context array referenced for performing entropy decoding upon a second tile of the multi-tile encoded picture. When the first tile is currently decoded according to the first context array buffered in the first buffer, the second context array is buffered in the second buffer.
This is a continuation of U.S. application Ser. No. 14/343,388 (filed on Mar. 7, 2014), which is National Stage Entry of PCT application No. PCT/CN2012/081288 (filed on Sep. 12, 2012). In addition, the PCT application No. PCT/CN2012/081288 claims the benefit of U.S. provisional application No. 61/553,350 (filed on Oct. 31, 2011) and U.S. provisional application No. 61/566,984 (filed on Dec. 5, 2011). The entire contents of all related applications are incorporated herein by reference.
BACKGROUNDThe disclosed embodiments of the present invention relate to decoding a multi-tile video/image bitstream which transmits a plurality of multi-tile encoded pictures/compressed frames each having a plurality of tiles, and more particularly, to an apparatus and a method for buffering context arrays referenced for performing entropy decoding upon a multi-tile encoded picture and a related entropy decoder.
As proposed in High-Efficiency Video Coding (HEVC) specification, one picture can be partitioned into multiple tiles.
Inside each tile, largest coding units (LCUs)/treeblocks (TBs) are raster scanned, as shown in
There are two types of tiles, independent tiles and dependent tiles. As to the independent tiles, they are treated as sub-pictures/sub-streams. Hence, encoding/decoding LCUs/TBs of an independent tile (e.g., motion vector prediction, intra prediction, entropy coding, etc.) does not need data from other tiles. Besides, assume that data of the LCUs/TBs is encoded/decoded using arithmetic coding such as a context-based adaptive binary arithmetic coding (CABAC) algorithm. Regarding each independent tile, the CABAC statistics are initialized/re-initialized at the start of the tile, and the LCUs outside the tile boundaries of the tile are regarded as unavailable. For example, the CABAC statistics at the first LCU/TB indexed by “1” in the tile T11′ would be initialized when decoding of the tile T11′ is started, the CABAC statistics at the first LCU/TB indexed by “13” in the tile T12′ would be re-initialized when decoding of the tile T12′ is started, the CABAC statistics at the first LCU/TB indexed by “31” in the tile T13′ would be re-initialized when decoding of the tile T13′ is started, and the CABAC statistics at the first LCU/TB indexed by “40” in the tile T21′ would be re-initialized when decoding of the tile T21′ is started.
However, encoding/decoding LCUs/TBs of a dependent tile (e.g., motion vector prediction, intra prediction, entropy coding, etc.) has to consider data provided by other tiles. Hence, vertical and horizontal buffers are required for successfully decoding a multi-tile encoded picture/compressed frame having dependent tiles included therein. Specifically, the vertical buffer is used for buffering decoded information of LCUs/TBs of an adjacent tile beside a vertical boundary (e.g., a left vertical boundary) of a currently decoded tile, and the horizontal buffer is used for buffering decoded information of LCUs/TBs of another adjacent tile beside a horizontal boundary (e.g., a top horizontal boundary) of the currently decoded tile. As a result, the buffer size for decoding the multi-tile encoded picture/compressed frame would be large, leading to higher production cost. Besides, assume that data of the LCUs/TBs is encoded/decoded using arithmetic coding such as a CABAC algorithm. Regarding a dependent tile, the CABAC statistics may be initialized at the start of the tile or inherited from another tile. For example, the CABAC statistics at the first LCU/TB indexed by “1” in the tile T11′ would be initialized when decoding of the tile T11′ is started, the CABAC statistics at the first LCU/TB indexed by “13” in the tile T12′ would be inherited from the CABAC statistics at the last LCU/TB indexed by “12” in the tile T11′ when decoding of the tile T12′ is started, the CABAC statistics at the first LCU/TB indexed by “31” in the tile T13′ would be inherited from the CABAC statistics at the last LCU/TB indexed by “30” in the tile T12′ when decoding of the tile T13′ is started, and the CABAC statistics at the first LCU/TB indexed by “40” in the tile T21′ would be inherited from the CABAC statistics at the last LCU/TB indexed by “39” in the tile T13′ when decoding of the tile T21′ is started.
As the conventional decoder design employs a tile scan order for decoding a multi-tile encoded picture, the vertical buffer (column buffer) is necessitated by the tile scan order for buffering decoded information of LCUs/TBs of an adjacent tile beside a vertical boundary (e.g., a left vertical boundary) of a currently decoded dependent tile, which increases the production cost inevitably. Thus, there is a need for an innovative entropy decoder design which is capable of reducing or omitting the vertical buffer (column buffer) when decoding the multi-tile encoded picture/compressed frame.
SUMMARYIn accordance with exemplary embodiments of the present invention, an apparatus and a method for buffering context arrays referenced for performing entropy decoding upon a multi-tile encoded picture and a related entropy decoder, to solve the above-mentioned problems.
According to a first aspect of the present invention, an exemplary buffering apparatus for buffering context arrays of a multi-tile encoded picture having a plurality of tiles is disclosed. The exemplary buffering apparatus includes a first buffer and a second buffer. The first buffer is arranged to buffer a first context array referenced for performing entropy decoding upon a first tile of the multi-tile encoded picture. The second buffer is arranged to buffer a second context array referenced for performing entropy decoding upon a second tile of the multi-tile encoded picture. When the first tile is currently decoded according to the first context array buffered in the first buffer, the second context array is buffered in the second buffer.
According to a second aspect of the present invention, an exemplary buffering method for buffering context arrays of a multi-tile encoded picture having a plurality of tiles is disclosed. The exemplary buffering method includes: buffering a first context array referenced for performing entropy decoding upon a first tile of the multi-tile encoded picture; and buffering a second context array referenced for performing entropy decoding upon a second tile of the multi-tile encoded picture when the first tile is currently decoded according to the buffered first context array.
According to a third aspect of the present invention, an exemplary entropy decoder is disclosed. The exemplary entropy decoder includes an entropy decoding core and a buffering apparatus. The entropy decoding core is arranged to perform entropy decoding upon a multi-tile encoded picture, having a plurality of tiles included therein, in a raster scan order, wherein the entropy decoding core starts decoding a portion of a current tile after decoding a portion of a previous tile. The buffering apparatus is coupled to the entropy decoding core, and arranged for buffering context arrays of the multi-tile encoded picture. The buffering apparatus includes a first buffer and a second buffer. The first buffer is arranged to buffer a first context array referenced for entropy decoding a first tile of the multi-tile encoded picture. The second buffer is arranged to buffer a second context array referenced for entropy decoding a second tile of the multi-tile encoded picture. When the first tile is currently decoded according to the first context array buffered in the first buffer, the second context array is buffered in the second buffer.
These and other objectives of the present invention will no doubt become obvious to those of ordinary skill in the art after reading the following detailed description of the preferred embodiment that is illustrated in the various figures and drawings.
Certain terms are used throughout the description and following claims to refer to particular components. As one skilled in the art will appreciate, manufacturers may refer to a component by different names. This document does not intend to distinguish between components that differ in name but not function. In the following description and in the claims, the terms “include” and “comprise” are used in an open-ended fashion, and thus should be interpreted to mean “include, but not limited to . . . ”. Also, the term “couple” is intended to mean either an indirect or direct electrical connection. Accordingly, if one device is electrically connected to another device, that connection may be through a direct electrical connection, or through an indirect electrical connection via other devices and connections.
Please refer to
In this embodiment, data of the LCUs/TBs is encoded using a context-based adaptive binary arithmetic coding (CABAC) algorithm. Hence, the context model, which is a probability model, should be properly selected and updated during the entropy decoding of the multi-tile encoded picture PIC_IN. It should be noted that the entropy decoding core 102 does not necessarily re-initialize the CABAC statistics at the first LCU/TB of each tile. That is, the CABAC statistics at the first LCU/TB of a current tile may be inherited from the CABAC statistics at a specific LCU/TB of a previous tile horizontally adjacent to the current tile, where the first LCU/TB and the specific LCU/TB are horizontally adjacent to each other and located at opposite sides of a tile boundary (i.e., a vertical/column boundary) between the current tile and the previous tile. As can be seen from
The entropy decoding core 102 employs the decoding order including successive decoding sequences S1-S8. Hence, the LCUs/TBs in the same tile are not decoded continuously due to the fact that the entropy decoding core 102 starts decoding a portion of a current tile after decoding a portion of a previous tile. As can be seen from
The buffering apparatus 104 is implemented for buffering context arrays of the multi-tile encoded picture PIC_IN. The context arrays include context models each being a probability model for one or more bins of the binarized symbol in the arithmetic coding, such as CABAC in H.264 and HEVC. A context model may be chosen from a selection of available models, depending on the statistics of recently-coded data symbols. The context model stores the probability of each bin being “1” or “0”. Details of the context model can be found in a published paper: Marpe et al., “Context-Based Adaptive Binary Arithmetic Coding in the H.264/AVC Video Compression Standard”, IEEE TRANSACTIONS ON CIRCUITS AND SYSTEMS FOR VIDEO TECHNOLOGY, VOL. 13, NO. 7, July 2003, which is incorporated herein by reference. Further description is therefore omitted here for brevity.
By way of example, but not limitation, the number of buffered context arrays maintained by the buffering apparatus 104 during entropy decoding of the multi-tile encoded picture PIC_IN depends on the partitioning setting of the multi-tile encoded picture PIC_IN. For example, when the multi-tile encoded picture PIC_IN has N horizontally adjacent partitions (i.e., N horizontal partitions/tiles at the same row), the number of buffered context arrays maintained by the buffering apparatus 104 during entropy decoding of the multi-tile encoded picture is equal to N. Regarding the example shown in
The first buffer 106 and the second buffer 512 may be allocated in the same storage device or implemented using separate storage devices, depending upon actual design consideration. For example, the first buffer 106 maybe implemented using a register of the entropy decoder 100, and the second buffer 104 may be implemented using an internal buffer (e.g., a static random access memory (SRAM)) of the entropy decoder 100. The first buffer 106 is arranged to buffer a context array (e.g., CA1) referenced for performing entropy decoding upon a specific tile of the multi-tile encoded picture PIC_IN, and the second buffer 108 is arranged to buffer context arrays (e.g., CA2-CAN) referenced for performing entropy decoding upon other tiles of the multi-tile encoded picture PIC_IN, where N is equal to the number of horizontally adjacent partitions (i.e., horizontal partitions/tiles at the same row). When the specific tile is currently decoded according to the context array CA1 buffered in the first buffer 106, the context arrays CA2-CAN are buffered/maintained in the second buffer 108. That is, the first buffer 106 stores a context array of a currently decoded tile, and the second buffer 108 stores context arrays of other tiles which are not currently decoded. When the entropy decoding of the specific tile encounters a tile boundary (e.g., a right vertical/column boundary), the currently used context array CA1 is stored into the second buffer 108 to update the original context array CA1 stored in the second buffer 108, and the context array CA2 needed for decoding the next tile is loaded into the first buffer 106, as shown in
An exemplary buffer maintenance operation of the buffering apparatus 104 is described with reference to
As mentioned above, the entropy decoding core 102 decodes all LCUs/TBs of the whole multi-tile encoded picture PIC_IN in a raster scan manner, where the decoding order includes successive decoding sequences S1-S8 as shown in
As the first buffer 106 is used to maintain a context array of one currently decoded tile and the second buffer 108 is used to maintain context arrays of other tiles that are not currently decoded, the context arrays are loaded and stored between the first buffer 106 and the second buffer 108. If the first buffer 106 is a register or an internal buffer (e.g., SRAM) of the entropy decoder and the second buffer 108 is an external buffer such as a dynamic random access memory (DRAM), the decoding performance of the entropy decoder may be degraded due to read/write latency of the external buffer. The present invention therefore proposes a modified entropy decoder with enhanced buffer read/write efficiency.
Please refer to
The pre-fetch mechanism 518 is used for pre-fetching a context array (e.g., CA2 shown in
In the embodiment shown in
The entropy decoder 500 in
The buffers 608_1-608_N may be allocated in the same storage device or implemented using separate storage devices, depending upon actual design consideration. For example, the buffers 608_1-608_N may be implemented using registers, internal buffers (e.g., SRAMs), external buffers (e.g., DRAMs), or a combination thereof. The major difference between the buffering apparatuses 104 and 604 is that each of the buffers 608_1-608_N is dedicated to maintaining one context array. As can be seen from
When the entropy decoding of the first tile encounters a tile boundary (e.g., a right vertical/column boundary), the MUX 606 switches the interconnection 607_1 between the first connection port P1 and the second connection port N to another interconnection 607_2 between the first connection port P2 and the second connection port N, as shown in
To put it simply, during the entropy decoding of the multi-tile encoded picture PIC_IN, multiple context arrays for different tiles may be concurrently maintained by the buffering apparatus 604, thereby facilitating the discontinuous decoding of the LCUs/TBs in each tile. Besides, as the context arrays are buffered in respective designated buffers and selected under the control of a multiplexer, there is no loading and storing of context arrays between two buffers. In this way, the decoding performance of the entropy decoder may be improved by using a switchable hard-wired interconnection between the entropy decoding core and the buffers.
An exemplary buffer maintenance operation of the buffering apparatus 604 is described with reference to
In conclusion, a buffering method employed by any of the aforementioned entropy decoders for buffering context arrays of a multi-tile encoded picture having a plurality of tiles may include at least the following steps: buffering a first context array referenced for performing entropy decoding upon a first tile of the multi-tile encoded picture; and buffering a second context array referenced for performing entropy decoding upon a second tile of the multi-tile encoded picture when the first tile is currently decoded according to the buffered first context array.
Those skilled in the art will readily observe that numerous modifications and alterations of the device and method may be made while retaining the teachings of the invention. Accordingly, the above disclosure should be construed as limited only by the metes and bounds of the appended claims.
Claims
1. A buffering apparatus for buffering context arrays of a multi-tile encoded picture having a plurality of tiles, the buffering apparatus comprising:
- a first buffer, arranged to buffer a first context array referenced for performing entropy decoding upon a first tile of the multi-tile encoded picture;
- a second buffer, arranged to buffer a second context array referenced for performing entropy decoding upon a second tile of the multi-tile encoded picture; and
- a multiplexer, coupled to one of the first buffer and the second buffer;
- wherein when the first tile is currently decoded according to the first context array buffered in the first buffer, the second context array is buffered in the second buffer; entropy decoding of the second tile is started before the first tile is fully entropy decoded; and when entropy decoding of the first tile encounters a tile boundary, the multiplexer switches between the first buffer and the second buffer.
2. The buffering apparatus of claim 1, wherein when the entropy decoding of the first tile encounters the tile boundary, the first context array is stored into the second buffer, and the second context array is loaded into the first buffer.
3. The buffering apparatus of claim 2, further comprising:
- a buffer access enhancement circuit, coupled between the first buffer and the second buffer, for pre-fetching the second context array from the second buffer or post-storing the first context array into the second buffer.
4. The buffering apparatus of claim 1, wherein when the second tile is currently decoded according to the second context array buffered in the second buffer, the first context array is buffered in the first buffer.
5. The buffering apparatus of claim 1, wherein the multiplexer has a plurality of first connection ports and a second connection port; wherein the first buffer and the second buffer are coupled to a first specific port and a second specific port included in the first connection ports, respectively.
6. The buffering apparatus of claim 5, wherein when the entropy decoding of the first tile encounters the tile boundary, the multiplexer switches an interconnection between the second connection port and the first specific port to an interconnection between the second connection port and the second specific port.
7. The buffering apparatus of claim 1, wherein the first tile and the second tile are dependent tiles.
8. The buffering apparatus of claim 1, wherein at least one of the first buffer and the second buffer is a register, an internal buffer or an external buffer of an entropy decoder.
9. The buffering apparatus of claim 1, wherein the multi-tile encoded picture has N horizontally adjacent partitions, and a number of buffered context arrays maintained by the buffering apparatus during entropy decoding of the multi-tile encoded picture is equal to N.
10. A buffering method for buffering context arrays of a multi-tile encoded picture having a plurality of tiles, the buffering method comprising:
- buffering a first context array referenced for performing entropy decoding upon a first tile of the multi-tile encoded picture;
- buffering a second context array referenced for performing entropy decoding upon a second tile of the multi-tile encoded picture when the first tile is currently decoded according to the buffered first context array; and
- when entropy decoding of the first tile encounters a tile boundary, performing a multiplexing operation to switch between the buffered first context array and the buffered second context array;
- wherein entropy decoding of the second tile is started before the first tile is fully entropy decoded.
11. The buffering method of claim 10, wherein the first context array is buffered in a first buffer, the second context array is buffered in a second buffer, and the buffering method further comprises:
- when the entropy decoding of the first tile encounters the tile boundary, storing the first context array into the second buffer, and loading the second context array into the first buffer.
12. The buffering method of claim 11, further comprising:
- pre-fetching the second context array from the second buffer; or
- post-storing the first context array into the second buffer.
13. The buffering method of claim 10, wherein the step of buffering the first context array comprises:
- buffering the first context array when the second tile is currently decoded according to the second context array.
14. The buffering method of claim 10, wherein the step of performing the multiplexing operation to switch between the buffered first context array and the buffered second context array comprises:
- outputting the buffered second context array to substitute for the buffered first context array.
15. The buffering method of claim 10, wherein the first tile and the second tile are dependent tiles.
16. The buffering method of claim 10, wherein at least one of the first context array and the second context array is stored in a register, an internal buffer or an external buffer of an entropy decoder.
17. The buffering method of claim 10, wherein the multi-tile encoded picture has N horizontally adjacent partitions, and a number of buffered context arrays maintained during entropy decoding of the multi-tile encoded picture is equal to N.
18. An entropy decoder, comprising:
- an entropy decoding core, arranged to perform entropy decoding upon a multi-tile encoded picture, having a plurality of tiles included therein, in a raster scan order, wherein the entropy decoding core starts decoding a portion of a current tile after decoding a portion of a previous tile; and
- a buffering apparatus, coupled to the entropy decoding core, for buffering context arrays of the multi-tile encoded picture, the buffering apparatus comprising: a first buffer, arranged to buffer a first context array referenced for performing entropy decoding upon a first tile of the multi-tile encoded picture; a second buffer, arranged to buffer a second context array referenced for performing entropy decoding upon a second tile of the multi-tile encoded picture; and a multiplexer, coupled to one of the first buffer and the second buffer;
- wherein when the first tile is currently decoded according to the first context array buffered in the first buffer, the second context array is buffered in the second buffer; entropy decoding of the second tile is started before the first tile is fully entropy decoded; and when entropy decoding of the first tile encounters a tile boundary, the multiplexer switches between the first buffer and the second buffer.
19. The entropy decoder of claim 18, wherein the multi-tile encoded picture has N horizontally adjacent partitions, and a number of buffered context arrays maintained by the buffering apparatus during entropy decoding of the multi-tile encoded picture is equal to N.
Type: Application
Filed: Dec 28, 2016
Publication Date: Apr 20, 2017
Inventors: Chia-Yun Cheng (Hsinchu County), Yung-Chang Chang (New Taipei City)
Application Number: 15/391,854