Method for encoding and decoding moving image, and decoding device
The method of dividing video data into blocks, descaling and clipping coefficients to a predetermined bit depth, and applying inverse transforms addresses the complexity and memory issues in H.264/AVC encoding, enhancing decoding efficiency for embedded systems.
Patent Information
- Application Number
- JP2024191430
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2011-01-18
- Filing Date
- 2024-10-31
- Publication Date
- 2025-01-20
- Estimated Expiration
- 2032-01-18
AI Technical Summary
Current encoding standards like H.264/AVC face increased computational complexity and memory requirements, leading to decreased encoding and decoding speed, especially in resource-constrained systems, due to large values produced by matrix multiplication and dequantization operations.
A method for encoding and decoding moving images that involves dividing video data into blocks, generating quantization coefficients, descaling and clipping these coefficients to a predetermined bit depth, and applying inverse transforms to reduce memory requirements and computational complexity.
This approach reduces memory requirements and computational complexity while maintaining acceptable rate-distortion performance, particularly suitable for embedded systems.
Smart Images

Figure 2025010339000001_ABST
Abstract
Description
[Technical field]
[0001] There is no cross-reference to related applications.
[0002] The present invention relates to reduced dynamic range image decoding. [Background technology]
[0003] Current coding standards such as H.264 / AVC generally achieve relatively high coding efficiency at the expense of increased computational complexity. As computational complexity increases, the encoding and / or decoding speed tends to decrease. Also, the demand for higher fidelity tends to increase over time, which tends to require larger and larger memory requirements and larger and larger memory bandwidth requirements. Particularly in the case of embedded systems, the increasing memory requirements and the increasing memory bandwidth requirements tend to result in more and more expensive and computationally complex circuits.
[0004] Referring to FIG. 1, many decoders receive coded data for blocks of an image (in other words, an encoder provides coded data for blocks of an image). Typically, an image is divided into blocks, and each block is coded using some method, such as a discrete cosine transform (DCT), and provided to a decoder. The decoder receives the coded blocks and decodes each block using some method, such as an inverse discrete cosine transform. Decoding of image coefficients of an image block is often performed by matrix multiplication. The matrix multiplication may be performed horizontally or vertically. In some cases, for example, an 8-bit value may become a 16-bit value by a first multiplication, and a 24-bit value by a second multiplication. Furthermore, the coding of each block of an image is usually quantized, where the coded values are mapped to a smaller set of quantized coefficients used for transmission. Quantization requires inverse quantization by the decoder, which maps the set of quantized coefficients used for transmission to the appropriate coded values. The desired number of bits for the inverse quantized data is a design parameter. The large values that matrix multiplication and inverse quantization operations can produce are problematic, especially for resource-constrained systems such as embedded systems.
[0005] The foregoing and other objects, features and advantages of the present invention will be readily understood from the following detailed description of the invention taken in conjunction with the accompanying drawings. Summary of the Invention
[0006] A preferred embodiment is a method for encoding video comprising the steps of: dividing the video data into one or more video blocks, each video block representing a number of pixels; encoding said one or more blocks of video images, said encoding comprising, for each block of video images, generating a set of quantized coefficients; transmitting to a decoding device a set of quantization coefficients corresponding to the one or more blocks of video images included in a bitstream; The decoding device includes: descaling the quantized coefficients based on a quantization parameter, a coefficient index, and a transform size to generate descaled coefficients; modifying the descaled coefficients to generate modified descaled coefficients, the modifying step including application of a variable based on the transform size; clipping the modified descaled coefficients to a predetermined bit depth to generate clipped coefficients; inverse transforming the clipped coefficients to output a decoded residual; The data of the moving image is decoded by executing a process including The above transform size is 8x8. [Brief description of the drawings]
[0007] [Figure 1] FIG. 2 illustrates an encoder and a decoder. [Diagram 2] FIG. 2 shows a decoder comprising an inverse quantizer and an inverse transformer. [Figure 3A] FIG. 2 illustrates a modified inverse quantizer. [Figure 3B] FIG. 2 illustrates a modified inverse quantizer. [Figure 4] FIG. 2 shows a modified inverse transformer. [Diagram 5] FIG. 2 shows another decoder. [Figure 6] FIG. 13 illustrates another decoder. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0008] Referring to Figure 2 (Prior Art), a decoder is shown at the relevant location that inverse quantizes and inverse transforms the quantized coefficients received from an encoder for a block of an image. The decoder receives quantized coefficients 200 at an inverse quantizer 210. The coefficients output from the inverse quantizer 210 are stored in a memory 220. The stored coefficients 220 are processed by a transform pair by an inverse transform unit 230 to obtain a decoded residue 310. The inverse transform uses a matrix multiplication operator to map data from the transform domain back to the spatial domain.
[0009] The inverse quantizer 210 includes a descaling process by the descaling unit 240. The descaling process by the descaling unit 240 descales the quantized coefficients 200. The descaling process corresponds to multiplying the multiplication level value (also called the quantized coefficients 200) by an integer that depends on the quantization parameter (QP), the coefficient index, and the transform size (N). An example of the descaling process by the descaling unit 240 is the "Level * IntegerValue(Remainder,Coefficient index) * 16, and other transform sizes, used in the inverse quantizer before transform * The descaling process by the descaling unit 240 is preferably based primarily on a function of the remainder, the transform size (N), and / or the coefficient index (e.g., position) to determine the intermediate set of values 250. The remainder is a function of the quantization parameter (QP) and P * This is the sum of the bit increment and the modulo P ((QP+P *The modulo is defined as x%y, the remainder when x is divided by y, where x is an integer x≧0 and y is an integer y>0, as defined in the H.264 / AVC standard. In one embodiment, P can take a value of 6. An adjustment mechanism A 260 may be applied to the value 250 or may be a variable that depends on the transform size (N) and / or a function of the received Period. Period is the ratio of the quantization parameter (QP) and P, where "BitIncrement" is the bit depth increment. * The sum of the BitIncrement and P is divided by ((QP+P * The " / " is defined as integer division with the result truncated towards 0 as defined in the H.264 / AVC standard. For example, 7 / 4 and -7 / -4 truncate to 1, and -7 / 4 and 7 / -4 truncate to -1. In one embodiment, P can take on a value of 6. The resulting value 250 may be further modified by adjustment mechanism A 260, but is not modified by correction unit 270, which may modify the resulting value 250 by 2. (Period+B) The residuals may be modified by a factor of B, where B is a variable depending on the transform size. The result of the modification by the modification unit 270 is stored in the memory 220. The inverse transform unit 230 may perform a one-dimensional inverse horizontal transform by an inverse horizontal transform unit 280, the result of which may be stored in the memory 290. The inverse transform unit 230 may also perform a one-dimensional inverse vertical transform by an inverse vertical transform unit 300, to obtain a decoded residual 310. The transform unit 280 and the transform unit 300 may be reversed in order, if necessary.
[0010] In implementing "Part 10: Advanced Video Coding," ISO Publication: ISO / IEC 14496-10:2005-Information Technology-Coding Of Audio-Visual Objects, (hereby incorporated by reference) (H.264 / AVC Standard), the memory bandwidth of the video decoder shown in FIG. 2 may be limited by using constraints. For example, in section 8.5.10 of the H.264 / AVC Standard, the width of memory accesses for 4×4 luma DC transform coefficients is limited by including the following statement: "The bitstream shall not exceed -2 (7+bitDepth) From 2 (7+bitDepth) Any element f that exceeds the integer range up to -1 ij (i, j = 0..3 in f) should not be included in the bit stream. (7+bitDepth) From 2 (7+bitDepth) Any element dcY that exceeds the integer range up to -1 ij(dcY for i, j = 0..3) should not be included in the remaining blocks. The H.264 / AVC standard includes similar memory limitations for other residual blocks. In addition to including a complex memory bandwidth limitation, the H.264 / AVC standard does not include a mechanism to ensure that this limitation is enforced. Similarly, the JCT-VC "Dradt Test Model Under Consideration", JCTVC-A205, JCT-VC Meeting, Dresden, April 2010 (JCT-VC) (incorporated herein by reference) does not include a memory bandwidth enforcement mechanism. For robustness, a decoder must be prepared to accept bitstreams that violate these limitations, either due to compliant bitstreams or transmission errors that damage a non-conforming encoder. To mitigate such potential limitations, decoders often include additional memory bandwidth to accommodate non-compliant bitstreams that are fed to them, at the expense of additional cost and complexity.
[0011] To achieve a more computationally robust decoder with limited memory bandwidth and / or memory storage requirements, the decoder should be modified in an appropriate manner. However, modifications of the decoder to reduce memory requirements should not significantly degrade the rate distortion performance of the corresponding video. Otherwise, even if memory requirements are reduced, the quality of the resulting video will be unsuitable for viewing by a viewer. The modification by the modifying unit 270 doubles the coefficient values every six steps in the quantization parameter, which may significantly increase the size of the memory requirements. The increased values result in one or more zeros (0) being included as the least significant bits.
[0012] With an understanding of the operation of the inverse quantizer 210 (see FIG. 2, prior art), and referring to FIG. 3A, an improved inverse quantizer (improved inverse quantizer, improved inverse quantizer) 400 (see FIGS. 3A and 3B, non-prior art) receives quantized coefficients 405 and descales the quantized coefficients by a descaling unit 410 to obtain an intermediate set of values 420. The descaling of the quantized coefficients is preferably based on a function of the remainder, the transform size (N), and / or the coefficient index (e.g., position). An optional adjustment mechanism C 430 may be applied. To determine the resulting data 440, the adjustment mechanism C 430 is preferably a variable that depends on a function of the transform size (N) or the received quantization parameter (QP). The resulting data 440 from the quantized coefficients 405 may contain problematic data or otherwise not comply with the standard. Therefore, the improved inverse quantizer 400 should impose a fixed restriction on the resulting data 440. The resulting data 440 is preferably clipped to a predetermined bit depth by a clipping unit 450, and the N×N block of data is stored in a memory internal to the inverse quantizer 400. For example, by clipping to a predetermined bit depth of 16 bits by the clipping unit 450, any value greater than 32,767 is set to a maximum value, i.e., 32,767. Similarly, for a predetermined bit depth of 16 bits, any value less than −32,767 is set to a minimum value, i.e., −32,767. Other bit depths and clipping values can be used as well. In this way, the maximum memory bandwidth required is limited by the system in a manner independent of the input quantization coefficients 405. This reduces the computational complexity of the system as well as the memory requirements, which is particularly suitable for embedded systems.
[0013] After clipping by the clipping unit 450, the data that has reached the maximum predetermined bit depth is doubled by the correction unit 460. (Period+B)The result of the modification by the modification unit 460 is provided as a coefficient 470. After clipping by the clipping unit 450, the modification unit 460 modifies the (Period+B) By performing the correction by a factor of 2, the rate-distortion loss is reduced. Preferably, the adjustment mechanism C 430 used for 8×8 transform coefficients is (5-Period) and the correction unit 460 (Period+B) is 2 (Period-6) The processing by the modifier 460 may be based on a function of the transform size (N) or the received quantization parameter (QP), as appropriate. Also, for transform coefficients of other sizes (4×4, 16×16, 32×32, etc.), the adjustment mechanism C 430 used is preferably zero (0), and the adjustment by the modifier 460 is preferably 2 (N=0). (Period+B) The value is 2 (Period) Also, B may be a function of N, and C may be a function of N. Referring to FIG 3B, a specific embodiment of FIG 3A is shown.
[0014] Referring to FIG. 4, the coefficients 470 from the inverse quantizer 400 (see FIG. 3A and FIG. 3B) are provided to an inverse transform unit 480 configured to provide a decoded residual 490 having an acceptable rate-distortion loss. The coefficients 470 may be preferably transformed by a one-dimensional inverse horizontal (or vertical) transform by a one-dimensional inverse horizontal (or vertical) transform unit 500. Based on the desired number of output bits to maintain an acceptable rate-distortion loss, the output of the transform unit 500 may be modified by right bit-shifting to the desired number of bits by a bit-shifting unit 510. In this manner, a selected number of least significant bits are discarded to reduce the memory requirements of the system. For example, if 19 bits are expected from the inverse transform unit 500 and a 16-bit result is desired, the right bit-shifting by the bit-shifting unit 510 removes the least significant 3 bits. The resulting shifted bits are clipped by a clipping unit 520 to a predetermined threshold value, such as 16 bits. The clipping by clipping unit 520 further enforces memory bandwidth limitations, and the result is stored in memory 530. The data stored in memory 530 is significantly smaller as a result of the shifting by bit shifting unit 510, which removes the least significant bit(s). The data stored in memory 530 is left bit-shifted by bit shifting unit 540, preferably by the same number of bits as the right bit-shifting by bit shifting unit 510. As a result of the shift, the least significant bit becomes zero (0). The shifted data is preferably transformed by a one-dimensional inverse vertical (or horizontal) transform by inverse vertical (or horizontal) transform unit 550, to obtain the decoded residual 490.
[0015] The rate distortion loss depends on the number of bits used in the processing and the data block size. The right bit shifting by the bit shifting unit 510 and the left bit shifting by the bit shifting unit 540 preferably depend on the block size N (horizontal pixels×vertical pixels for a square block of pixels). For example, the shift for a 4×4 block is 3, the shift for an 8×8 block is 2, the shift for a 16×16 block is 8, and the shift for a 32×32 block is 9. The right bit shifting by the bit shifting unit 510 and the left bit shifting by the bit shifting unit 540 may also be determined based on a bitstream-delivered parameter such as a quantization parameter (QP), an internal bit-depth increment (IBDI), a transform precision extension (TPE) parameter, or other decoder-selectable parameters.
[0016] 5, in another embodiment, the decoder receives quantized coefficients which are processed by any suitable inverse quantization unit (inverse quantizer) 600 and any suitable inverse transform unit 610. It is desirable to include express memory bandwidth limitations which are preferably achieved by including a clipping function by clipping unit 620. After the clipping function by clipping unit 620, the data is stored in memory 630. The data is then used for inverse transformation by inverse transform unit 610.
[0017] Referring to FIG. 6, in another embodiment, the decoder receives quantized coefficients that are processed by any suitable inverse quantization unit (inverse quantizer) 700 and any suitable inverse transform unit 710. For example, the inverse transform by the inverse transform unit 710 may be that shown in FIG. 4. To reduce computational complexity, it is desirable to include an express memory bandwidth limit, which is preferably realized by including a clipping function by the clipping unit 720. After the clipping function by the clipping unit 720, the data is stored in a memory 730. The data is then used for the inverse transform by the inverse transform unit 710. It is further desirable to include an explicit memory bandwidth limit, which is realized by including a clipping function by the clipping unit 740 between a pair of one-dimensional transforms. The one-dimensional transforms may be performed in any order and in any manner. After the clipping function by the clipping unit 740, the data is stored in a memory 750.
[0018] The terms and expressions employed in the foregoing specification are used herein as terms of description and not of limitation, and there is no intention in the use of such terms and expressions to exclude equivalents to the features shown and described, or portions thereof. It will be understood that the scope of the invention is defined and limited only by the claims which follow.
Claims
1. 1. A method for encoding and decoding video, comprising the steps of: dividing the video data into one or more video blocks, each video block representing a number of pixels; encoding said one or more blocks of video images, said encoding comprising, for each block of video images, generating a set of quantized coefficients; transmitting to a decoding device a set of quantization coefficients corresponding to the one or more blocks of video images included in a bitstream; The decoding device includes: descaling the quantized coefficients based on a quantization parameter, a coefficient index, and a transform size to generate descaled coefficients; modifying the descaled coefficients to generate modified descaled coefficients, the modifying step including application of a variable based on the transform size and not based on a quantization parameter; clipping the modified descaled coefficients to a predetermined bit depth to generate clipped coefficients; inverse transforming the clipped coefficients to output a decoded residual; The data of the moving image is decoded by executing a process including The transform size is 8x8.
2. Inverse transforming the clipped coefficients to output a decoded residual comprises: one-dimensionally inverse transforming the clipped coefficients in a first direction to generate inverse transformed coefficients in the first direction; right shifting the inverse transformed coefficients in the first direction to generate first shifted inverse transformed coefficients having a smaller bit depth than the inverse transformed coefficients in the first direction; clipping the first shifted and inverse transformed coefficients to the predetermined bit depth to generate second clipped coefficients; one-dimensionally inverse transforming the second clipped coefficients in a second direction to determine the decoded residual; The method of claim 1 , comprising:
3. The step of shifting the coefficients inverse transformed in the first direction to the right comprises: selecting a specific number of bits by which to shift the coefficients inverse transformed in the first direction based on a size of a block of a video image from among a plurality of different numbers of bits by which to shift the coefficients; shifting the inverse transformed coefficients in the first direction to the right by the particular number of bits; The method of claim 2 , comprising:
4. The method of claim 2 , wherein the first direction is a horizontal direction.
5. The method of claim 2 , wherein the first direction is a vertical direction.
6. The method of claim 2 , wherein the second direction is orthogonal to the first direction.
7. Shifting the inverse transformed coefficients in a first direction to the right to generate first shifted inverse transformed coefficients comprises: selecting a particular number of bits by which to shift the coefficients from among a plurality of different numbers of bits by which to shift the coefficients; shifting the inverse transformed coefficients in the first direction to the right the particular number of bits to generate first shifted inverse transformed coefficients; The method of claim 2 , comprising:
8. The step of selecting the particular number of bits by which to shift the coefficients may comprise: determining that blocks of a video image are of a particular size; selecting a specific number of bits by which to shift coefficients corresponding to a specific size of a block of the video from among a plurality of different numbers of bits by which to shift coefficients corresponding to different sizes of blocks of the video; The method of claim 7, comprising:
9. 3. The method of claim 2, wherein the step of right shifting the inverse transformed coefficients in a first direction includes right shifting the inverse transformed coefficients in a first direction an amount based on a transform precision extension parameter.
10. A decoding device for decoding a moving image, comprising: descaling quantized coefficients of the blocks of the video image based on a quantization parameter, a coefficient index, and a transform size to generate descaled coefficients; modifying the descaled coefficients to generate modified descaled coefficients, the modifying step including application of a variable based on the transform size and not based on a quantization parameter; clipping the modified descaled coefficients to a predetermined bit depth to generate clipped coefficients; inverse transforming the clipped coefficients to output a decoded residual; The data of the moving image is decoded by executing a process including A decoding device, wherein the transform size is 8×8.
Citation Information
Patent Citations
Inverse conversion circuit
JP2007079972A
Dequantization circuit, dequantization method, and image reproduction device
WO2008120433A1