WO2012094909A1 - 变换系数块的扫描方法、装置和系统 - Google Patents
变换系数块的扫描方法、装置和系统 Download PDFInfo
- Publication number
- WO2012094909A1 WO2012094909A1 PCT/CN2011/080325 CN2011080325W WO2012094909A1 WO 2012094909 A1 WO2012094909 A1 WO 2012094909A1 CN 2011080325 W CN2011080325 W CN 2011080325W WO 2012094909 A1 WO2012094909 A1 WO 2012094909A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- texture
- block
- decoded
- scan order
- scanning
- Prior art date
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/102—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
- H04N19/129—Scanning of coding units, e.g. zig-zag scan of transform coefficients or flexible macroblock ordering [FMO]
Definitions
- the present invention relates to the field of communications technologies, and in particular, to a method and apparatus for scanning transform coefficient blocks in video codec. Background technique
- the scanning of transform coefficient blocks is an integral part of video coding and decoding techniques.
- the scanning of the transform coefficient block has the following applications:
- the video encoding end scans the transformed two-dimensional transform coefficient block in the transform domain by the video encoding end, so that the two-dimensional transform coefficient in the transform coefficient block is converted into one-dimensional A sequence of transform coefficients.
- the scanning order needs to be selected according to the transformation mode of the current transform coefficient block, so that the scanned one-dimensional transform coefficient sequence tends to be arranged from large to small, thereby improving coding efficiency;
- at the video decoding end by video
- the decoding end converts the one-dimensional transform coefficient sequence into a two-dimensional transform coefficient block according to the transform mode and selects the reverse scan order.
- transforming the prediction residual is performed to obtain transform coefficients, and before performing transform coefficient scanning, reference block information and quantized transform coefficient information may also be obtained;
- a set of optimal scan modes is selected by the rate distortion optimization criterion from the following three scan modes: Z-scan mode, horizontal scan mode, and vertical scan mode; then the selected scan mode pair transform is used.
- the coefficients are scanned, and the selection information of the scan mode is encoded into the code stream and passed to the decoder.
- the mode selection is required in the three scanning modes, so that the encoding end has high complexity; in addition, the selection information of the scanning mode needs to be programmed into the code stream, which affects the compression coding efficiency.
- Embodiments of the present invention provide a scanning method and apparatus for transform coefficient blocks, which improve compression coding efficiency.
- the scanning method embodiment of the transform coefficient block provided by the present invention may be It is realized by the following technical solutions:
- the texture embodies a variation rule of the transform coefficient block of the block to be encoded or decoded in each of the transform coefficients ;
- a scan order corresponding to the texture is selected from the preset candidate scan orders, and the transform coefficient block of the block to be encoded or decoded is scanned in accordance with the selected scan order.
- a scanning method for a transform coefficient block comprising:
- the texture embodies a variation rule of the transform coefficient block of the block to be coded in each of the transform coefficients
- Performing rate distortion on the preset candidate scan order is preferably processed to obtain a preferred scan order, and scanning the transform coefficient block of the block to be coded according to a preferred scan order;
- the context model is: predicting the information of the block to be encoded by the information of the coded block.
- a scanning method for a transform coefficient block comprising:
- the texture embodies a variation rule of the transform coefficient block of the block to be decoded in each of the transform coefficients
- the parsing code stream obtains a difference between the selected scanning order and the preferred scanning order, calculating a sum of the difference value and the selected scanning order to obtain a preferred scanning order; if the detecting the difference fails, Determining a scan order to establish a context model, and parsing a code stream according to the context model to obtain a preferred scan order, wherein the context model is: predicting information of a block to be decoded by information of the decoded block; The transform coefficient block of the decoded block is scanned.
- a scanning method for a transform coefficient block comprising:
- the texture embodies a variation rule of the transform coefficient block of the block to be coded in each of the transform coefficients
- Performing rate distortion on the zigzag scanning order and the selected scanning order is preferably processed to obtain a preferred scanning order, and scanning the transform coefficient blocks of the block to be encoded in a preferred scanning order;
- the indication information indicating whether the scanning order used for scanning is a Z-shaped scanning order is encoded into the code stream.
- a scanning method for a transform coefficient block comprising:
- the texture embodies the transform of the block to be decoded
- the coefficient block changes the transform coefficient in each direction; the scan order corresponding to the texture is selected from the preset candidate scan order, and the transform coefficient block of the block to be decoded is scanned according to the selected scan order.
- a scanning device for transform coefficient blocks comprising:
- a first detecting unit configured to detect a texture of an encoded or decoded block that is a reference of a block to be encoded or decoded, the texture embodies a variation rule of transform coefficients of the transform coefficient block of the block to be encoded or decoded in each direction ;
- a first selecting unit configured to select a scan order corresponding to the texture from a preset candidate scan order
- a first scanning unit configured to scan the transform coefficient block of the block to be encoded or decoded according to the selected scan order.
- a scanning device for transform coefficient blocks comprising:
- a second detecting unit configured to detect a texture of the encoded block that is a reference of the block to be encoded, where the texture reflects a variation rule of the transform coefficient block of the block to be encoded in each of the transform coefficients;
- a second selecting unit configured to select a scan order corresponding to the texture from a preset candidate scan order
- a second processing unit configured to perform rate distortion optimization processing on the preset candidate scan order to obtain a preferred scan order
- a second scanning unit configured to scan a transform coefficient block of the block to be coded according to a preferred scan order
- a scanning device for transform coefficient blocks comprising:
- a third detecting unit configured to detect a texture of the decoded block that is a reference of the block to be decoded, where the texture reflects a variation rule of the transform coefficient block of the block to be decoded in each of the transform coefficients;
- a third selecting unit configured to select a scan order corresponding to the texture from a preset candidate scan order
- a third decoding unit configured to calculate a difference between the selected scan order and a preferred scan order if the stream is parsed, and obtain a preferred scan order by comparing the difference with the selected scan order; If the difference fails, the context model is established by the selected scan order, and the preferred scan order is obtained by parsing the code stream according to the context model, where the context model is: predicting the block to be encoded or decoded by the information of the encoded or decoded block. Information;
- a third scanning unit configured to scan the transform coefficient block of the block to be decoded according to a preferred scan order.
- a scanning device for transform coefficient blocks comprising:
- a fourth detecting unit configured to detect a texture of the encoded block as a reference of the block to be encoded, where the texture reflects a variation rule of the transform coefficient block of the block to be encoded in each of the transform coefficients;
- a fourth selecting unit configured to select a scan order corresponding to the texture from a preset candidate scan order
- a fourth processing unit configured to perform rate distortion optimization on the preset Z-scan sequence and the selected scan order to obtain a preferred scan order
- a fourth scanning unit configured to scan a transform coefficient block of the block to be coded according to a preferred scan order
- a fourth coding unit configured to encode the indication information of whether the scanning order used for scanning is a Z-shaped scanning order into the code stream.
- a scanning device for transform coefficient blocks comprising:
- a fifth parsing unit configured to parse the code stream to obtain indication information
- a fifth determining unit configured to determine whether the indication information indicates that the scanning order is a Z-shaped scanning sequence
- a fifth detecting unit configured to detect, if the determination result is no, a texture of the encoded or decoded block that is a reference of the block to be decoded, where the texture reflects the transform coefficient block of the block to be decoded in each of the transform coefficients Law of change;
- a fifth selecting unit configured to select a scan order corresponding to the texture from a preset candidate scan order;
- a fifth scanning unit configured to: if the determination result is yes, scan the transform coefficient block of the block to be decoded according to a zigzag scan order; or, to the block to be decoded according to a scan order selected by the fifth selecting unit The transform coefficient block is scanned.
- a scanning system for transform coefficient blocks comprising: a decoding device and/or an encoding device provided by an embodiment of the present invention.
- the above technical solution detects a texture of an encoded or decoded block as a reference of a block to be encoded or decoded; selects a scan order corresponding to the texture from a preset candidate scan order, and pairs the selected scan order The transform coefficient block of the encoded or decoded block is scanned, so that the scan information does not need to be encoded into the code stream, and the compression coding efficiency is improved.
- FIG. 1 is a schematic flowchart of a method according to an embodiment of the present invention.
- FIG. 2A is a schematic diagram showing a scanning sequence of a horizontal texture according to an embodiment of the present invention.
- 2B is a schematic diagram showing a scanning sequence of a vertical texture according to an embodiment of the present invention.
- 2C is a schematic diagram showing a scanning sequence of a diagonal texture according to an embodiment of the present invention.
- FIG. 3 is a schematic flowchart of a method according to an embodiment of the present invention.
- FIG. 4 is a schematic flowchart of a method according to an embodiment of the present invention.
- FIG. 5 is a schematic flowchart of a method according to an embodiment of the present invention.
- FIG. 6 is a schematic flowchart of a method according to an embodiment of the present invention.
- FIG. 7 is a schematic structural view of an apparatus according to an embodiment of the present invention.
- FIG. 8 is a schematic structural view of an apparatus according to an embodiment of the present invention.
- FIG. 9 is a schematic structural diagram of an apparatus according to an embodiment of the present invention.
- FIG. 10 is a schematic structural diagram of an apparatus according to an embodiment of the present invention.
- 11 is a schematic structural view of an apparatus according to an embodiment of the present invention
- 12 is a schematic structural diagram of an apparatus according to an embodiment of the present invention
- FIG. 13 is a schematic structural diagram of an apparatus according to an embodiment of the present invention.
- FIG. 14 is a schematic structural diagram of a system according to an embodiment of the present invention. detailed description
- the encoding end of the embodiment of the present invention selects an optimal inter-frame coding type according to a rate-distortion criterion from among various inter-coding types for each block to be coded, and obtains motion information, and motion information.
- the encoded reconstructed frame information obtains a predicted value of the block to be coded, performs a difference between the predicted value and the pixel value of the block to be coded, obtains a residual value, and sequentially transforms, quantizes, scans, and entropy encodes the residual value , the code stream is programmed, and the motion information is programmed into the code stream to complete the encoding process.
- the scanning in the encoding and decoding process will be specifically described below.
- the transform mentioned in the embodiment of the present invention may be a Discrete Cosine Transform (DCT); or a multi-transformation technique, such as a KL transform (KLT), which is not limited in this embodiment of the present invention.
- a scanning method of a transform coefficient block which can be performed on the encoding end or the decoding end in the embodiment, as shown in FIG. 1 , including:
- detecting a texture of an encoded or decoded block that is a reference of a block to be encoded or decoded that is, detecting a texture of a coded block that is a reference to a block to be coded, or a texture of a decoded block that is a reference to a block to be decoded
- the texture embodies the variation rule of the transform coefficient block of the above-mentioned block to be encoded or decoded in each of the transform coefficients;
- the above 101 belongs to a physical derivation, and the texture of the encoded or decoded block as a reference approximates the texture of the current block to be encoded or decoded, and the texture of the block to be encoded or decoded is similar to the residual texture of the block to be encoded or decoded.
- the distribution law of transform coefficients is closely related to the residual texture.
- the above texture includes a horizontal texture, a vertical texture, and a diagonal texture; wherein the oblique texture can also be regarded as being textureless.
- the above detecting the texture of the encoded or decoded block includes:
- the texture is determined to be a vertical texture, and the vertical gradient value is greater than N times the horizontal gradient value to determine that the texture is a horizontal texture, otherwise the texture is determined to be a diagonal texture;
- the texture is determined to be a vertical texture, and the offset of the horizontal direction of the intra prediction mode direction is within M.
- the embodiment of the present invention further provides an implementation manner of correcting the preset value: if the ratio of the horizontal texture to the vertical texture exceeds the third preset value in the block that has been encoded or decoded, the value of N is reduced, if the horizontal texture If the ratio to the vertical texture is less than N, the value of N is increased.
- the third preset value may be obtained by intra-coding the sequence of transform coefficients of different characteristics, and calculating the proportional relationship between the horizontal and vertical prediction directions, and the proportional relationship may be used as the third preset value.
- the texture of the already encoded block or the decoded block is known, and the information may be used to reduce the amount of operations;
- the texture of the detected transform coefficient block includes: detecting the code to be encoded Or the decoding block sets the texture of the already encoded block or the decoded block within the time domain or spatial domain distance, and determines the detected texture as the texture of the transform coefficient block.
- the scan information is not required to be encoded into the code stream, and the compression coding efficiency is improved.
- the scanning order corresponding to the above texture includes as shown in FIGS. 2A to 2C: the horizontal scanning corresponds to the horizontal scanning order of the progressive scanning, the vertical texture corresponds to the vertical scanning order of the column-by-column scanning, and the oblique texture corresponds to the Z-shaped sequential scanning. Scan order.
- a 4 ⁇ 4 matrix is taken as an example, in which a circle represents a transform coefficient, a value under a circle represents a coordinate (ie, a position) at which a transform coefficient is located, and an arrow direction represents a scan direction, that is, a scan order.
- the matrix on the left and the matrix and on the right of Figure 2C represent A Z-shaped scanning sequence
- the Z-shaped scanning order is self-definable, so there are many possible types, and the example of FIG. 2C is not exhaustive; therefore, the Z-shaped scanning order is not limited in the embodiment of the present invention.
- the embodiment further provides an example of an implementation manner of a preset candidate scan sequence, where the preset candidate scan sequence includes:
- the scan rule determines the order of the scan; or, pre-statistically counts the number of transform coefficients of each position of two or more transform coefficient blocks to be non-zero, and arranges each non-zero in descending order
- the position of the transform coefficient corresponding to the number of times determines the order of the positions of the above-described transform coefficients obtained as the preset candidate scan order.
- the quantized residuals can be classified into three categories: horizontal texture The corresponding quantized residual, the quantized residual corresponding to the vertical texture, and the quantized residual corresponding to the oblique texture; the manner of determining the scanning order is: establishing a counter group having the same number of transform coefficients (for example, 16 counters for 4x4 transform) And then counting with a counter, specifically: determining whether each transform coefficient is zero, if non-zero, the corresponding position counter is incremented by one; after the detected number of transform coefficient blocks reaches a set number, each counter has its The value of the count; at this time, the values of the respective counters can be arranged from large to small, and the order of the positions of the above-described transform coefficients obtained by the arrangement can be determined as a preset candidate scan order.
- the position of the transform coefficient corresponding to the vertical texture for example, 16 counters for 4x4 transform
- Example 1 The following describes the scanning process in the encoding process:
- A code according to the encoding process until the transform coefficient is scanned
- inter-frame coding (Inter) is performed, the reference block texture is detected to obtain its texture (horizonous Hor texture, vertical ver texture, oblique texture); if intra-frame coding (Intra) is performed In the case, if the direction of the intra prediction mode (ipmode) is ver +/- 5, the texture is a vertical texture with a direction of Hor +/- 5, the texture is a horizontal texture, and the rest is a diagonal texture.
- the offset set in this embodiment is 5, and may of course be set to other values, which is not limited in this embodiment of the present invention.
- the detection method in the above B can be:
- a difference is obtained for every two pixel points of the adjacent detection step in the horizontal direction; an absolute value of the accumulated difference value is obtained as a horizontal gradient value;
- Step C judging whether the threshold N needs to be updated according to the horizontal, vertical, and oblique texture ratio distribution in the coded block, determining whether the ratio of the horizontal gradient value to the vertical gradient value exceeds a preset value, and if so, increasing Preset value, no, the preset value is reduced.
- the preset value is obtained by the following method: by intra-coding the sequence of transform coefficients with different characteristics, and the proportional relationship between the statistical level and the vertical prediction direction, the proportional relationship can be used as the preset value.
- Step C is the pre-predetermined value An automatic correction process for setting, which is not a step that must be performed.
- the scanning order corresponding to the obtained texture is selected from the preset candidate scanning order, the transform coefficient block is scanned using the selected scanning order, and then the subsequent encoding process can be continued. It can be understood that the encoded result (code stream) is sent to the decoding end after the encoding is completed, and other positions of the embodiment of the present invention are not described.
- the corresponding decoding process is similar to the scanning process of the encoding process:
- A Decode according to the decoding process until the transform coefficient scan is performed
- inter-frame decoding (Inter) is being performed, the reference block texture is detected to obtain its texture (horizontal texture, vertical texture, oblique texture); if intra-frame decoding (Intra) is performed If the ipmode direction is ver +/- 5 , the texture is a vertical texture with a direction of Hor +/- 5 , the texture is a horizontal texture, and the rest is untextured or oblique texture.
- the offset set in this embodiment is 5, and may be set to other values, which is not limited in this embodiment of the present invention.
- the detection method can refer to the detection method of texture in the encoding process.
- This step can refer to step C in the encoding process. This step is also optional.
- the scanning order corresponding to the obtained texture is selected from the preset candidate scanning order, the transform coefficient block is scanned using the selected scanning order, and then the subsequent decoding process can be continued.
- the horizontal scanning order is in a "transpose” relationship with the vertical scanning order, and the Z-shaped scanning order is a "mirror" relationship with respect to the diagonal from the upper left to the lower right; for example, taking 4x4TU as an example:
- the scan results of the horizontal scan order are:
- the scan result of the vertical scan order is:
- the result of the scan sequence scan is:
- step B in the above encoding and decoding process detecting the texture of the already encoded block or the decoded block within the distance of the time domain or the spatial domain to be encoded or decoded, and determining the detected texture as The texture of the transform coefficient block of the block to be encoded or decoded. More specifically, for example, the texture of the encoded or decoded block of the periphery (upper, left, upper left, upper right, lower left) of the block to be encoded or decoded is detected as the texture of the block of the block of transform coefficients to be currently encoded or decoded.
- a scanning method of a transform coefficient block which can be executed on the encoding end, as shown in FIG. 3, and includes:
- the texture of the coded block can be detected. Referring to the method of the corresponding embodiment of FIG.
- the difference between the selected scan order and the preferred scan mode is encoded into the code stream, or the context model is established by the selected scan order, and the preferred scan mode is programmed into the code stream according to the context model;
- the context model is : Predicting the information of the block to be encoded or decoded by the information of the encoded or decoded block.
- the embodiment of the present invention further provides a scanning method of a transform coefficient block performed on the decoding end. As shown in FIG. 4, the method includes:
- the texture of the decoded block can be detected by referring to the method of the corresponding embodiment of Fig. 1.
- the parsing code stream obtains a difference between the selected scan order and the preferred scan order, calculating a sum of the difference value and the selected scan order to obtain a preferred scan order; otherwise, establishing a context model by the selected scan order, Decomposing a code stream according to the foregoing context model to obtain a preferred scan order, where the context model is: predicting information of a block to be encoded or decoded by using information of the encoded or decoded block;
- Example 2 The following describes the scanning process in the encoding process:
- A code according to the encoding process until the transform coefficient is scanned
- This step can refer to step B of the first scheme, and according to the obtained texture, select a scan order corresponding to the obtained texture from the preset candidate scan order;
- Context model refers to predicting to be encoded or by surrounding encoded or decoded information. Decoding the information of the block in order to achieve the purpose of having a consistent coding feature, which is part of the entropy coding link, can improve the coding efficiency.
- the corresponding decoding process is similar to the scanning process of the encoding process:
- A Decode according to the decoding process until the transform coefficient scan is performed
- This step can refer to step B of the first scheme, and select a scan order corresponding to the texture from the preset candidate scan order according to the obtained texture;
- the parsing code stream obtains a difference, the difference is the difference between the scanning order selected in the encoding process and the preferred scanning order; calculating the sum of the difference and the selected scanning order to obtain a preferred scanning order, and then performing E If you do not get the difference, execute D;
- the context model is established by the scan order selected in the process B, and the context model is the same as the context model established in the coding process; the code stream is parsed according to the above context model to obtain a preferred scan order, and then E is executed;
- a scanning method of a transform coefficient block which can be executed on the encoding end, as shown in FIG. 5, and includes:
- 504 Write the indication information of the scan order used for scanning to the Z-scan order to the code stream.
- the embodiment of the present invention further provides a scanning method of a transform coefficient block performed on the decoding end. As shown in FIG. 6, the method includes:
- 601 parsing the code stream to obtain indication information, determining whether the indication information indicates that the scanning order is a Z-shaped scanning order; if yes, executing 602, if not, executing 603;
- 602 Scan a transform coefficient block of the decoded block according to a zigzag scan order
- 603 Detect a texture of a decoded block that is a reference of the to-be-decoded block, where the texture reflects a variation rule of a transform coefficient block of the block to be decoded in each of the upward transform coefficients; and selects from the preset candidate scan order.
- the scan order corresponding to the texture, and the transform coefficient block of the block to be decoded is scanned in accordance with the selected scan order.
- Example 3 The following describes the scanning process in the encoding process:
- A code according to the encoding process until the transform coefficient is scanned
- This step can refer to step B of the first scheme, and select a scan order corresponding to the texture from the preset candidate scan order according to the obtained texture;
- the corresponding decoding process is similar to the scanning process of the encoding process:
- A Decode according to the decoding process until the transform coefficient scan is performed
- step B parsing the code stream, and obtaining indication information, that is, the indication information in step D of the encoding process; determining whether the indication information indicates that the scanning order is a Z-shaped scanning order; if yes, executing F; otherwise, executing C;
- This step can refer to step B of the first scheme, and according to the obtained texture, select the scan order corresponding to the above texture from the preset candidate scan order, and then execute D;
- test conditions JCTVC high efficiency low delay test condition
- Test Results The third column is the result of the technical solution integrated in the TMuC (New Generation Video Coding Test Software Platform), and the fourth column is the result of the solution of the embodiment of the present invention. It can be seen that the solution of the embodiment of the present invention is more efficient.
- a scanning device for transform coefficient blocks as described above in FIG. 7, a first detecting unit 701, configured to detect a texture of an encoded or decoded block that is a reference of a block to be encoded or decoded, where the texture reflects a change of transform coefficients of the transform coefficient block of the block to be encoded or decoded in each direction law;
- the first selecting unit 702 is configured to select a scan order corresponding to the texture from the preset candidate scan order;
- the first scanning unit 703 is configured to scan the transform coefficient block of the block to be encoded or decoded according to the selected scan order.
- the texture includes: a horizontal texture, a vertical texture, and a diagonal texture;
- the scan order corresponding to the texture includes: a horizontal texture corresponding to a horizontal scan order of the progressive scan, a vertical texture corresponding to a vertical scan order of the column-by-column scan,
- the oblique texture corresponds to the Z-shaped scanning order of the Z-shaped sequential scanning.
- the first detecting unit 701 is specifically configured to: when performing inter-frame encoding or decoding, calculate a horizontal gradient value in a horizontal direction of the encoded or decoded block and a vertical gradient value in a vertical direction; the horizontal gradient value is a horizontal direction.
- a sum of absolute values of difference values of adjacent pixel points, and a vertical gradient value is a sum of absolute values of difference values of adjacent pixel points in a vertical direction;
- the texture is determined to be a vertical texture, and the vertical gradient value is greater than N times the horizontal gradient value to determine that the texture is a horizontal texture, otherwise the texture is determined to be a diagonal texture; a preset value;
- the texture is determined to be a vertical texture, and the offset of the horizontal direction of the intra prediction mode direction is within M.
- the texture is determined to be a horizontal texture, otherwise the texture is determined to be a diagonal texture; the M is a second preset value.
- the foregoing apparatus further includes:
- the adjusting unit 801 is configured to: if the ratio of the horizontal texture to the vertical texture exceeds the third preset value in the block that has been encoded or decoded, reduce the value of N, and if the ratio of the horizontal texture to the vertical texture is less than N, increase The value of N.
- the foregoing first detecting unit 701 is specifically configured to: detect a texture of an already encoded block or a decoded block in a time domain or a spatial domain distance to be encoded or decoded, and determine the detected texture as an encoded or decoded block. Texture.
- the foregoing apparatus further includes:
- the receiving unit 901 is configured to receive a predefined scan rule, where the scan rule determines the order of the scan, and determines the received predefined scan rule as a preset candidate scan order; Or the above device further includes:
- the statistic unit 902 is configured to count the number of times that the transform coefficients of each position of the two or more transform coefficient blocks are non-zero;
- the sorting unit 903 arranges the positions of the transform coefficients corresponding to the respective non-zero numbers in descending order, and determines the order of the positions of the transform coefficients obtained as the preset candidate scan order.
- the scan information is not required to be encoded into the code stream, and the compression coding efficiency is improved.
- a scanning device for transform coefficient blocks includes:
- a second detecting unit 1001 configured to detect a texture of the encoded block as a reference of the block to be encoded, where the texture reflects a variation rule of the transform coefficient block of the block to be encoded in each of the transform coefficients; 1002, configured to select a scan order corresponding to the foregoing texture from a preset candidate scan order;
- the second processing unit 1003 is configured to perform rate distortion optimization processing on the preset candidate scan order to obtain a preferred scan order.
- a second scanning unit 1004 configured to scan a transform coefficient block of the block to be coded according to a preferred scan order
- the second coding unit 1005 is configured to encode the difference between the selected scan order and the preferred scan order into the code stream, or establish a context model by using the selected scan order, and encode the preferred scan order according to the context model.
- Stream The above context model is: predicting information of a block to be encoded or decoded by information of the encoded or decoded block.
- a scanning device for transform coefficient blocks includes:
- a third detecting unit 1101 configured to detect a texture of a decoded block that is a reference of a block to be decoded, where the texture reflects a variation rule of a transform coefficient block of the block to be decoded in each of the transform coefficients; 1102. The method is used to select a scan order corresponding to the foregoing texture from a preset candidate scan order.
- the third decoding unit 1103 is configured to: if the code stream is parsed to obtain a difference between the selected scan order and the preferred scan order, calculate a sum of the difference and the selected scan order to obtain a preferred scan order; if the difference is detected If the failure occurs, the context model is established by the selected scan order, and the preferred scan order is obtained by parsing the code stream according to the context model, and the context model is: predicting information of the block to be encoded or decoded by using the information of the encoded or decoded block;
- a third scanning unit 1104 configured to perform a transform coefficient block of the block to be decoded according to a preferred scan order Scan.
- a scanning device for transform coefficient blocks includes:
- a fourth detecting unit 1201 configured to detect a texture of a coded block that is a reference of a block to be coded, where the texture reflects a variation rule of a transform coefficient block of the block to be coded in each of the transform coefficients; 1202.
- the method is configured to select a scan order corresponding to the foregoing texture from a preset candidate scan order.
- the fourth processing unit 1203 is configured to perform rate distortion optimization processing on the preset candidate scan order and the selected scan order to obtain a preferred scan order;
- a fourth scanning unit 1204 configured to scan a transform coefficient block of the block to be coded according to a preferred scan order
- the fourth coding unit 1205 is configured to encode the indication information indicating whether the scanning order used for scanning is a Z-shaped scanning order into the code stream.
- a scanning device for transform coefficient blocks includes:
- a fifth parsing unit 1301, configured to parse the code stream to obtain indication information
- the fifth determining unit 1302 is configured to determine whether the indication information indicates that the scanning order is a Z-shaped scanning sequence
- the fifth detecting unit 1303 is configured to: if the determination result is no, detect a texture of the encoded or decoded block that is a reference of the block to be decoded, where the texture reflects the transform coefficient block of the block to be decoded in each of the transform coefficients Law of change
- a fifth selecting unit 1304, configured to select a scan order corresponding to the texture from the preset candidate scan order
- a fifth scanning unit 1305, configured to: if the determination result is yes, scan the transform coefficient block of the to-be-decoded block according to a Z-shaped scanning order; or, the to-be-decoded block according to a scanning order selected by the fifth selecting unit The transform coefficient block is scanned.
- the apparatus corresponding to Figures 10 to 13 only needs to be selected between the horizontal and vertical scanning order and the Z-shaped scanning order, which is an alternative to the horizontal, vertical and Z-shaped scanning sequences (
- the choice between three choices of zig-zag can use one less to carry the selected information, so it saves resources when it is coded into the encoding header information; in addition, it is more efficient when it is selected.
- a scanning system of a transform coefficient block includes: a decoding device 1401 and an encoding device 1402, wherein the decoding device 1401 and the encoding device 1402 each include the device of any one of FIGS. 7 to 9; The system does not need to program the scan information into the code stream, which improves the compression coding efficiency.
- the encoding device 1402 is the device of FIG. 10, and the decoding device 1401 is the device of FIG. 11.
- the encoding device 1402 is the device of FIG. 12, and the decoding device 1401 is the device of FIG.
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Compression Or Coding Systems Of Tv Signals (AREA)
- Compression Of Band Width Or Redundancy In Fax (AREA)
Description
变换系数块的扫描方法、 装置和系统
本申请要求于 2011 年 01 月 13 日提交中国专利局、 申请号为 201110006848.1、 发明名称为 "一种变换系数块的扫描方法、 装置和系统" 的 中国专利申请的优先权, 其全部内容通过引用结合在本申请中。 技术领域
本发明涉及通信技术领域,特別涉及一种视频编解码中变换系数块的扫描 方法和装置。 背景技术
变换系数块的扫描是视频编解码技术的一个组成部分。变换系数块的扫描 有如下的应用: 视频编码端, 由视频编码端对经过变换后在变换域的二维的变 换系数块进行扫描,使变换系数块中的二维的变换系数转变成一维的变换系数 序列。 在这一过程中, 需要根据当前变换系数块的变换方式选择扫描顺序, 使 扫描所得的一维变换系数序列更趋向于由大到小的排列, 从而提高编码效率; 在视频解码端, 由视频解码端根据变换方式,选择反扫描顺序将一维变换系数 序列转换成二维的变换系数块。
目前在视频编码端,在执行视频编码过程中, 首先对预测残差进行变换操 作得到变换系数, 在进行变换系数扫描之前, 还可以得到参考块信息, 以及量 化后的变换系数信息; 当高频变换系数非零时, 从以下三种扫描模式: Z型扫 描模式, 水平扫描模式以及竖直扫描模式中,通过率失真优化准则选择一组最 优的扫描模式; 然后使用选择的扫描模式对变换系数进行扫描, 并将扫描模式 的选择信息编入码流, 传递给解码端。
由于在视频的编码端, 需要在三种扫描模式中进行模式的选择,使编码端 复杂度高;另夕卜,需要将扫描模式的选择信息编入码流,影响了压缩编码效率。 发明内容
本发明实施例提供一种变换系数块的扫描方法和装置, 提高压缩编码效 率。
为解决上述技术问题,本发明所提供的变换系数块的扫描方法实施例可以
通过以下技术方案实现:
检测作为待编码块参考的已编码块的纹理或作为待解码块参考的已解码 块的纹理,所述纹理体现了所述待编码或解码块的变换系数块在各方向上变换 系数的变化规律;
从预置的候选扫描顺序中选择与所述纹理对应的扫描顺序,并按照选择的 扫描顺序对所述待编码或解码块的变换系数块进行扫描。
一种变换系数块的扫描方法, 包括:
检测作为待编码块的参考的已编码块的纹理,所述纹理体现了所述待编码 块的变换系数块在各方向上变换系数的变化规律;
从预置的候选扫描顺序中选择与所述纹理对应的扫描顺序;
对预置的候选扫描顺序进行率失真优选处理得到优选扫描顺序,并按照优 选扫描顺序对所述待编码块的变换系数块进行扫描;
将所述选择的扫描顺序与优选扫描顺序的差值编入码流, 或者, 由所述选 择的扫描顺序建立上下文模型,根据所述上下文模型将所述优选扫描顺序编入 码流; 所述上下文模型为: 通过已编码块的信息来预测待编码块的信息。
一种变换系数块的扫描方法, 包括:
检测作为待解码块的参考的已解码块的纹理,所述纹理体现了所述待解码 块的变换系数块在各方向上变换系数的变化规律;
从预置的候选扫描顺序中选择与所述纹理对应的扫描顺序;
若解析码流得到所述选择的扫描顺序与优选扫描顺序的差值,则计算所述 差值与所述选择的扫描顺序的和得到优选扫描顺序; 若检测所述差值失败, 则 由所述选择的扫描顺序建立上下文模型,根据所述上下文模型解析码流得到优 选扫描顺序,所述上下文模型为:通过已解码块的信息来预测待解码块的信息; 按照优选扫描顺序对所述待解码块的变换系数块进行扫描。
一种变换系数块的扫描方法, 包括:
检测作为待编码块的参考的已编码块的纹理,所述纹理体现了所述待编码 块的变换系数块在各方向上变换系数的变化规律;
从预置的候选扫描顺序中选择与所述纹理对应的扫描顺序;
对 Z形扫描顺序和选择的扫描顺序进行率失真优选处理得到优选扫描顺 序, 并按照优选扫描顺序对所述待编码块的变换系数块进行扫描;
将所述进行扫描使用的扫描顺序是否为 Z形扫描顺序的指示信息编入码 流。
一种变换系数块的扫描方法, 包括:
判断所述指示信息是否指示扫描顺序为 Z形扫描顺序;
若是, 则按照 Z形扫描顺序对待解码块的变换系数块进行扫描; 若否, 则检测作为所述待解码块的参考的已解码块的纹理, 所述纹理体现 了所述待解码块的变换系数块在各方向上变换系数的变化规律;从预置的候选 扫描顺序中选择与所述纹理对应的扫描顺序,并按照选择的扫描顺序对待解码 块的变换系数块进行扫描。
一种变换系数块的扫描装置, 包括:
第一检测单元,用于检测作为待编码或解码块的参考的已编码或解码块的 纹理,所述纹理体现了所述待编码或解码块的变换系数块在各方向上变换系数 的变化规律;
第一选择单元,用于从预置的候选扫描顺序中选择与所述纹理对应的扫描 顺序;
第一扫描单元,用于按照选择的扫描顺序对所述待编码或解码块的变换系 数块进行扫描。
一种变换系数块的扫描装置, 包括:
第二检测单元, 用于检测作为待编码块的参考的已编码块的纹理, 所述纹 理体现了所述待编码块的变换系数块在各方向上变换系数的变化规律;
第二选择单元,用于从预置的候选扫描顺序中选择与所述纹理对应的扫描 顺序;
第二处理单元,用于对预置的候选扫描顺序进行率失真优选处理得到优选 扫描顺序;
第二扫描单元, 用于按照优选扫描顺序对待编码块的变换系数块进行扫 描;
第二编码单元,用于将所述选择的扫描顺序与优选扫描顺序的差值编入码 流, 或者, 由所述选择的扫描顺序建立上下文模型, 根据所述上下文模型将所 述优选扫描顺序编入码流; 所述上下文模型为: 通过已编码或解码块的信息来 预测待编码或解码块的信息。
一种变换系数块的扫描装置, 包括:
第三检测单元, 用于检测作为待解码块的参考的已解码块的纹理, 所述纹 理体现了所述待解码块的变换系数块在各方向上变换系数的变化规律;
第三选择单元,用于从预置的候选扫描顺序中选择与所述纹理对应的扫描 顺序;
第三解码单元,用于若解析码流得到所述选择的扫描顺序与优选扫描顺序 的差值, 则计算所述差值与所述选择的扫描顺序的和得到优选扫描顺序; 若检 测所述差值失败, 则由所述选择的扫描顺序建立上下文模型,根据所述上下文 模型解析码流得到优选扫描顺序, 所述上下文模型为: 通过已编码或解码块的 信息来预测待编码或解码块的信息;
第三扫描单元, 用于按照优选扫描顺序对待解码块的变换系数块进行扫 描。
一种变换系数块的扫描装置, 包括:
第四检测单元, 用于检测作为待编码块的参考的已编码块的纹理, 所述纹 理体现了所述待编码块的变换系数块在各方向上变换系数的变化规律;
第四选择单元,用于从预置的候选扫描顺序中选择与所述纹理对应的扫描 顺序;
第四处理单元, 用于对预置的 Z形扫描顺序和选择的扫描顺序进行率失真 优选处理得到优选扫描顺序;
第四扫描单元, 用于按照优选扫描顺序对待编码块的变换系数块进行扫 描;
第四编码单元, 用于将所述进行扫描使用的扫描顺序是否为 Z形扫描顺序 的指示信息编入码流。
一种变换系数块的扫描装置, 包括:
第五解析单元, 用于解析码流得到指示信息;
第五判断单元, 用于判断所述指示信息是否指示扫描顺序为 Z形扫描顺 序;
第五检测单元, 用于若判断结果为否, 则检测作为待解码块的参考的已编 码或解码块的纹理,所述纹理体现了所述待解码块的变换系数块在各方向上变 换系数的变化规律;
第五选择单元,用于从预置的候选扫描顺序中选择与所述纹理对应的扫描 顺序;
第五扫描单元, 用于若判断结果为是, 则按照 Z形扫描顺序对所述待解码 块的变换系数块进行扫描; 或者,按照第五选择单元选择的扫描顺序对所述待 解码块的变换系数块进行扫描。
一种变换系数块的扫描系统, 包括: 本发明实施例提供的解码设备和 /或 编码设备.
上述技术方案通过检测作为待编码或解码块的参考的已编码或解码块的 纹理; 从预置的候选扫描顺序中选择与所述纹理对应的扫描顺序, 并按照选择 的扫描顺序对所述待编码或解码块的变换系数块进行扫描,从而不需要将扫描 信息编入码流, 提高了压缩编码效率。 附图说明
为了更清楚地说明本发明实施例的技术方案,下面将对实施例描述中所需 要使用的附图作筒单地介绍, 显而易见地, 下面描述中的附图仅仅是本发明的 一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下, 还可以根据这些附图获得其他的附图。
图 1为本发明实施例方法流程示意图;
图 2A为本发明实施例水平纹理的扫描顺序示意图;
图 2 B为本发明实施例竖直纹理的扫描顺序示意图;
图 2C为本发明实施例斜纹理的扫描顺序示意图;
图 3为本发明实施例方法流程示意图;
图 4为本发明实施例方法流程示意图;
图 5为本发明实施例方法流程示意图;
图 6为本发明实施例方法流程示意图;
图 7为本发明实施例装置结构示意图;
图 8为本发明实施例装置结构示意图;
图 9为本发明实施例装置结构示意图;
图 10为本发明实施例装置结构示意图;
图 11为本发明实施例装置结构示意图;
图 12为本发明实施例装置结构示意图;
图 13为本发明实施例装置结构示意图;
图 14为本发明实施例系统结构示意图。 具体实施方式
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清 楚、 完整地描述, 显然, 所描述的实施例仅仅是本发明一部分实施例, 而不是 全部的实施例。基于本发明中的实施例, 本领域普通技术人员在没有作出创造 性劳动前提下所获得的所有其他实施例, 都属于本发明保护的范围。
本发明实施例的编码端在帧间编码过程中,对于每一待编码块,从各种帧 间编码类型中根据率失真准则选择最优的帧间编码类型, 同时得到运动信息, 由运动信息及已编码的重构帧信息,得到待编码块的预测值,对预测值和待编 码块的像素值做差, 得到残差值, 对残差值依次进行变换、 量化、 扫描、 熵编 码操作, 编入码流, 同时将运动信息编入码流, 完成编码过程。 以下对编码和 解码过程中的扫描进行具体说明。本发明实施例提到的变换可以是离散余弦变 换(Discrete Cosine Transform, DCT ); 也可以是多变换技术, 例如 KL变换 ( Karhunen Loeve Transform , KLT )对此本发明实施例不予限定。
一种变换系数块的扫描方法,本实施例方法可以在编码端也可以在解码端 执行, 如图 1所示, 包括:
101 : 检测作为待编码或解码块的参考的已编码或解码块的纹理, 即: 检 测作为待编码块参考的已编码块的纹理, 或,作为待解码块参考的已解码块的 纹理;上述纹理体现了上述待编码或解码块的变换系数块在各方向上变换系数 的变化规律;
上述 101属于一种物理推导, 作为参考的已编码或解码块的纹理近似于当 前的待编码或解码块的纹理,而待编码或解码块的纹理又近似于待编码或解码 块的残差纹理, 变换系数的分布规律与残差纹理密切相关。
更具体地, 上述纹理包括水平纹理、 竖直纹理和斜纹理; 其中斜纹理也可 以看作是无纹理。
更具体地, 上述检测已编码或解码块的纹理包括:
在执行帧间编码或解码时,计算变换系数块的水平方向上的水平梯度值和
竖直方向上的竖直梯度值;水平梯度值为水平方向上各相邻像素点的差值的绝 对值的和, 竖直梯度值为竖直方向上各相邻像素点的差值的绝对值的和; 上述 作为参考的变换系数块即为上述已编码或解码块的变化系数块;
若水平梯度值大于 N倍的竖直梯度值则确定纹理为竖直纹理, 竖直梯度值 大于 N倍的水平梯度值则确定纹理为水平纹理, 否则确定纹理为斜纹理; 上述 N为第一预置值, N可以由分辨率宽度来确定, 例如分辨率宽度大于 1000时 N=2, 分辨率宽度小于 1000时 N=1.5; 以上 N的取值可以根据经验来确定, 具体 的取值本发明实施例对此不予限定。
在执行帧内编码或解码时,若帧内预测模式方向的竖直方向的偏移量在 M 以内则确定纹理为竖直纹理,帧内预测模式方向的水平方向的偏移量在 M以内 则确定纹理为水平纹理, 否则确定纹理为斜纹理; 上述 M为第二预置值, M也 可以由分辨率宽度来确定, 例如设置成 5 , 还可以设置成其他值例如 3、 4等, 对此本发明实施例不予限定。
进一步地, 本发明实施例还提供了修正预置值的实现方式: 若已经编码或 解码的块中, 水平纹理与竖直纹理的比值超过第三预置值则缩小 N的值, 若水 平纹理与竖直纹理的比值小于 N, 则增大 N的值。 第三预置值可以由以下方式 得到, 通过对不同特点的变换系数的序列进行帧内编码, 统计水平、 竖直预测 方向的比例关系, 该比例关系即可以作为第三预置值。
可选地, 若存在已经编码块或解码块, 那么已经编码块或解码块的纹理则 是已知的, 此时可以利用这些信息减少运算量; 上述检测变换系数块的纹理包 括: 检测待编码或解码块设定时域或空域距离内已经编码块或解码块的纹理, 将检测到的纹理确定为变换系数块的纹理。
102: 从预置的候选扫描顺序中选择与上述纹理对应的扫描顺序, 并按照 选择的扫描顺序对待编码或解码块的变换系数块进行扫描。
以上实施例, 不需要将扫描信息编入码流, 提高了压缩编码效率。
上述纹理对应的扫描顺序包括如图 2A~ 2C所示的:水平纹理对应逐行扫 描的水平扫描顺序、 竖直纹理对应逐列扫描的竖直扫描顺序、 斜纹理对应 Z形 顺序扫描的 Z形扫描顺序。 图 2A~ 2C中以 4X4矩阵为例, 其中圓形代表变换 系数, 圓形下的数值表示变换系数其所在的坐标(即位置), 箭头方向表示扫 描方向, 即扫描顺序。 需要说明的是图 2C左边和矩阵和右边的矩阵分別代表
一种 Z形扫描顺序, Z形扫描顺序是可以自定义的, 所以可能的种类较多, 图 2C的举例也不是穷举; 因此本发明实施例对 Z形扫描顺序不予限定。
更具体地, 本实施例还提供了预置候选扫描顺序的实现方式的举例, 上述 预置候选扫描顺序包括:
预先定义的扫描规则, 扫描规则确定了扫描的顺序; 或者, 预先统计两个 或两个以上的变换系数块各位置的变换系数为非零的次数,按从大到小的顺序 排列各个非零次数对应的变换系数的位置,将排列得到的上述变换系数的位置 的顺序确定为预置的候选扫描顺序。
在以上的预置候选扫描方式的举例的后一种实现方式本发明实施例给出 了一个举例说明: 在编码器中, 依据残差块的纹理, 量化残差可以分为三类: 水平纹理对应的量化残差、竖直纹理对应的量化残差、斜纹理对应的量化残差; 确定扫描顺序的方式为: 建立与变换系数个数相同的计数器组(例如 4x4变换 则为 16个计数器), 然后用计数器进行计数, 具体为: 判断各个变换系数上是 否为零, 如果非零, 则对应位置的计数器加一; 检测的变换系数块的数量达到 设定的数量以后,各个计数器均有其计数的数值; 此时可以从大到小排列各个 计数器的值,将排列得到的上述变换系数的位置的顺序确定为预置的候选扫描 顺序。 使用该方法, 按照得到的顺序进行扫描时, 数值大的计数器其所对应的 变换系数位置会在扫描顺序中排在前面。
举例方案一、 以下对编码过程中的扫描环节进行具体说明:
A: 按照编码流程编码, 直到进行变换系数扫描之前;
B: 若在执行的是帧间编码(Inter ), 则对参考块纹理进行检测, 得到其纹 理(水平 Hor纹理、 竖直 ver纹理、 斜纹理); 若在执行的是帧内编码( Intra ) 的情况, 如果帧内预测模式 ( intra prediction mode , ipmode )的方向为 ver+/-5 , 其纹理为竖直纹理, 方向为 Hor+/-5 , 其纹理为水平纹理, 其余情况为斜纹理。 本实施例中设置的偏移量是 5 , 当然还可以设置成其他值, 对此本发明实施例 不予限定。
上述 B中的检测方法可以是:
B1 : 确定检测步长。 该步骤为不同变换单元(Transform Unit, TU )设置 不同的检测步长, 例如 TU = 4时, 步长为 1 , TU = 8时, 步长为 1 , TU = 16时, 步长为 2, TU = 32时, 步长为 4, 也可以所有大小的 TU对应步长均为 1 ; 如果
所有大小的 TU都使用相同的步长那么 B1这个步骤是可以省略的。
B2: 对参考块(即作为参考的变换系数块) 中, 水平方向相邻检测步长 的每两个像素点求差值; 累加差值的绝对值得到水平梯度值;
B3: 对参考块中, 竖直方向相邻检测步长的每两个像素点求差值; 累加 差值的绝对值得到竖直梯度值;
B4: 如果水平梯度值大于 N倍的竖直梯度值, 则确定其纹理为竖直纹理; 如果竖直梯度值大于 N倍的水平梯度值, 则确定其纹理为水平纹理; 其它情况 为斜纹理;
C: 根据已编码块中的水平、 竖直、 斜纹理比例分布, 判断阈值 N是否需 要更新, 判断方式是判断水平梯度值与竖直梯度值的比例是否超过预置值, 若 是, 则增大预置值, 否, 则缩小预置值。 (其中预置值由以下方式得到, 通过 对不同特点的变换系数的序列进行帧内编码, 统计水平、 竖直预测方向的比例 关系, 该比例关系即可以作为预置值。 步骤 C是对预置值的一个自动修正的过 程, 该过程并不是必须执行的步骤。
D: 根据 B中得到的纹理, 从预置的候选扫描顺序中选择与得到的纹理对 应的扫描顺序,使用选择的扫描顺序对变换系数块执行扫描, 然后可以继续后 续的编码过程。 可以理解的是, 编码完成后会将编码的结果(码流)发送给解 码端, 对此本发明实施例其他位置不——说明。
对应的解码过程与编码过程扫描的方法类似:
A: 按照解码流程解码, 直到进行变换系数扫描之前;
B: 若在执行的是帧间解码(Inter ), 则对参考块纹理进行检测, 得到其纹 理(水平纹理、 竖直纹理、 斜纹理); 若在执行的是帧内解码(Intra )的情况, 如果 ipmode方向为 ver+/-5 , 其纹理为竖直纹理, 方向为 Hor+/-5 , 其纹理为水 平纹理, 其余情况为无纹理或斜纹理。 本实施例中设置的偏移量是 5 , 当然还 可以设置成其他值,对此本发明实施例不予限定。检测方法可以参考编码过程 中纹理的检测方法。
C: 本步骤可以参考编码过程中的步骤 C, 该步骤也是可选的。
D: 根据 B中得到的纹理, 从预置的候选扫描顺序中选择与得到的纹理对 应的扫描顺序,使用选择的扫描顺序对变换系数块执行扫描, 然后可以继续后 续的解码过程。
使用水平扫描顺序与竖直扫描顺序是呈 "转置" 关系的, 而 Z形扫描顺序 则呈关于自左上至右下的对角线的 "镜像" 关系; 举例说明, 以 4x4TU为例: 若水平扫描顺序的扫描结果是:
100 68 41 28
93 62 37 20
75 49 30 14
59 37 21 6
则竖直扫描顺序的扫描结果是:
100 93 75 59
68 62 49 37
41 37 30 21
28 20 14 6
Ζ形扫描顺序扫描的结果是:
100 82 57 40
82 69 49 31
57 49 37 22
40 31 22 10
以上扫描顺序的好处是, 当存储扫描顺序时, 水平扫描顺序、 竖直扫描顺 序只需要存储一套的数据, 而斜纹理扫描顺序只需要存储一半的数据, 经复杂 度分析可以节省了 46%的存储空间。 需要说明的是 4x4TU的值是多种多样的, 显然以上的举例不应理解为对本发明实施例的限定。
另外, 对于以上编码和解码过程中的步骤 B可以有替代的方案: 检测待编 码或解码块设定时域或空域的距离内已经编码块或解码块的纹理,将检测到的 纹理确定为作为待编码或解码块的变换系数块的纹理。 更具体地, 例如将检测 待编码或解码块周边(上、 左、 左上、 右上、 左下)的已编码或解码块的纹理 作为当前待编码或解码块变换系数块的纹理。
一种变换系数块的扫描方法, 本实施例方案可以在编码端执行, 如图 3所 示, 包括:
301 : 检测作为待编码块的参考的已编码块的纹理, 上述纹理体现了上述 待编码块的变换系数块在各方向上变换系数的变化规律;
此处检测已编码块的纹理可以参考图 1对应实施例的方法。
302: 从预置的候选扫描顺序中选择与上述纹理对应的扫描顺序, 得到选 择的扫描顺序;
303: 对预置的候选扫描顺序进行率失真优选处理得到优选扫描顺序, 并 按照优选扫描顺序对待编码块的变换系数块进行扫描;
304: 将上述选择的扫描顺序与优选扫描方式的差值编入码流, 或者, 由 上述选择的扫描顺序建立上下文模型,根据上述上下文模型将上述优选扫描方 式编入码流; 上述上下文模型为: 通过已编码或解码块的信息来预测待编码或 解码块的信息。
对应的,本发明实施例还提供了在解码端执行的一种变换系数块的扫描方 法, 如图 4所示, 包括:
401 : 检测作为待解码块的参考的已解码块的纹理, 上述纹理体现了上述 待解码块的变换系数块在各方向上变换系数的变化规律;
此处检测已解码块的纹理可以参考图 1对应实施例的方法。
402: 从预置的候选扫描顺序中选择与上述纹理对应的扫描顺序;
403: 若解析码流得到上述选择的扫描顺序与优选扫描顺序的差值, 则计 算上述差值与上述选择的扫描顺序的和得到优选扫描顺序; 否则, 由上述选择 的扫描顺序建立上下文模型, 根据上述上下文模型解析码流得到优选扫描顺 序, 上述上下文模型为: 通过已编码或解码块的信息来预测待编码或解码块的 信息;
404: 按照优选扫描顺序对待解码块的变换系数块进行扫描。
举例方案二、 以下对编码过程中的扫描环节进行具体说明:
A: 按照编码流程编码, 直到进行变换系数扫描之前;
B: 本步骤可以参考举例方案一的步骤 B , 并根据得到的纹理, 从预置的 候选扫描顺序中选择与得到的纹理对应的扫描顺序;
C: 对预置的候选扫描顺序进行率失真优选处理, 获得优扫描顺序; D: 将 B中选择的扫描顺序与优选扫描方式的差值编入码流, 或者, 由 B 中选择的扫描顺序建立上下文模型, 根据上下文模型将上述 C中的优选扫描方 式编入码流; 上述上下文模型为: 通过已编码或解码块的信息来预测待编码或 解码块的信息。上下文模型是指通过周边已编码或解码的信息来预测待编码或
解码块的信息,以期达到具有一致编码特征的目的,属于熵编码环节的一部分, 可以提高编码效率。
E: 按照优选扫描顺序对待解码块的变换系数块进行扫描, 然后继续后续 的编码过程。
对应的解码过程与编码过程扫描的方法类似:
A: 按照解码流程解码, 直到进行变换系数扫描之前;
B: 本步骤可以参考举例方案一的步骤 B , 并根据得到的纹理从预置的候 选扫描顺序中选择与上述纹理对应的扫描顺序;
C: 若解析码流得到差值, 上述差值是在编码过程中选择的扫描顺序与优 选扫描顺序的差值;计算上述差值与上述选择的扫描顺序的和得到优选扫描顺 序, 然后执行 E; 如果没有得到差值, 执行 D;
D: 由本流程 B中选择的扫描顺序建立上下文模型, 这个上下文模型与编 码流程中建立的上下文模型是相同的;根据上述上下文模型解析码流得到优选 扫描顺序, 然后执行 E;
E: 按照优选扫描顺序对待解码块的变换系数块进行扫描, 然后继续执行 后续解码过程。
一种变换系数块的扫描方法, 本实施例方案可以在编码端执行, 如图 5所 示, 包括:
501 : 检测作为待编码块的参考的已编码块的纹理, 上述纹理体现了上述 待编码块的变换系数块在各方向上变换系数的变化规律;
502: 从预置的候选扫描顺序中选择与上述纹理对应的扫描顺序;
503:对预置的 Z形扫描顺序和选择的扫描顺序进行率失真优选处理得到优 选扫描顺序, 并按照优选扫描顺序对待编码块的变换系数块进行扫描;
504:将上述进行扫描使用的扫描顺序是否为 Z形扫描顺序的指示信息编入 码流。
对应的,本发明实施例还提供了在解码端执行的一种变换系数块的扫描方 法, 如图 6所示, 包括:
601 : 解析码流得到指示信息, 判断上述指示信息是否指示扫描顺序为 Z 形扫描顺序; 若是, 执行 602, 若否, 执行 603;
602: 按照 Z形扫描顺序对待解码块的变换系数块进行扫描;
603: 检测作为上述待解码块的参考的已解码块的纹理, 上述纹理体现了 上述待解码块的变换系数块在各方向上变换系数的变化规律;从预置的候选扫 描顺序中选择与上述纹理对应的扫描顺序,并按照选择的扫描顺序对待解码块 的变换系数块进行扫描。
举例方案三、 以下对编码过程中的扫描环节进行具体说明:
A: 按照编码流程编码, 直到进行变换系数扫描之前;
B: 本步骤可以参考举例方案一的步骤 B, 并根据得到的纹理从预置的候 选扫描顺序中选择与上述纹理对应的扫描顺序;
C: 对预置的 Z形扫描顺序和选择的扫描顺序进行率失真优选处理得到优 选扫描顺序;
D: 将上述进行扫描使用的扫描顺序是否为 Z形扫描顺序的指示信息编入 码流;
E: 按照 C中的优选扫描顺序对待编码块的变换系数块进行扫描, 然后继 续后续的编码过程。
对应的解码过程与编码过程扫描的方法类似:
A: 按照解码流程解码, 直到进行变换系数扫描之前;
B: 解析码流, 得到指示信息, 该指示信息即编码过程的步骤 D中的指示 信息; 判断指示信息是否指示扫描顺序为 Z形扫描顺序; 若是, 执行 F; 否则 执行 C;
C: 本步骤可以参考举例方案一的步骤 B, 并根据得到的纹理从预置的候 选扫描顺序中选择与上述纹理对应的扫描顺序, 然后执行 D;
D: 按照选择的扫描顺序对待解码块的变换系数块进行扫描, 然后继续后 续的解码过程。
E: 按照 Z形扫描顺序对待解码块的变换系数块进行扫描, 然后继续后续 的解码过程。
以上举例方案二和三, 只需要在水平和竖直的扫描顺序与 Z形扫描顺序间 做选择, 是二选一的选择, 相比于在水平、 竖直以及 Z形扫描顺序 (zig-zag ) 之间的三选一的选择可以少使用一位来携带选择的信息,因此在将其编入编码 头信息时, 会节省资源; 另外, 在选择的时候效率也更高。
以下是对本发明实施例提供的方案进行的仿真实验的结果。
;则试条件: JCTVC high efficiency low delay test condition;
测试结果: 其中第三列是集成于 TMuC (新一代视频编码测试软件平台) 技术方案的结果, 第四列是本发明实施例方案的结果, 可以看出本发明实施例 方案效率较高。
种变换系数块的扫描装置, 如图 7上述,
第一检测单元 701 , 用于检测作为待编码或解码块的参考的已编码或解码 块的纹理,所述纹理体现了所述待编码或解码块的变换系数块在各方向上变换 系数的变化规律;
第一选择单元 702, 用于从预置的候选扫描顺序中选择与上述纹理对应的 扫描顺序;
第一扫描单元 703 , 用于按照选择的扫描顺序对所述待编码或解码块的变 换系数块进行扫描。
更具体地, 上述纹理包括: 水平纹理、 竖直纹理和斜纹理; 上述纹理对应 的扫描顺序包括: 水平纹理对应逐行扫描的水平扫描顺序、 竖直纹理对应逐列 扫描的竖直扫描顺序、 斜纹理对应 Z形顺序扫描的 Z形扫描顺序。
上述第一检测单元 701具体用于: 在执行帧间编码或解码时, 计算已编码 或解码块的水平方向上的水平梯度值和竖直方向上的竖直梯度值;水平梯度值 为水平方向上各相邻像素点的差值的绝对值的和,竖直梯度值为竖直方向上各 相邻像素点的差值的绝对值的和;
若水平梯度值大于 N倍的竖直梯度值则确定纹理为竖直纹理, 竖直梯度值 大于 N倍的水平梯度值则确定纹理为水平纹理, 否则确定纹理为斜纹理; 所述 N为第一预置值;
在执行帧内编码或解码时,若帧内预测模式方向的竖直方向的偏移量在 M 以内则确定纹理为竖直纹理,帧内预测模式方向的水平方向的偏移量在 M以内 则确定纹理为水平纹理, 否则确定纹理为斜纹理; 所述 M为第二预置值。
进一步地, 如图 8所示, 上述装置还包括:
调整单元 801 , 用于若已经编码或解码的块中, 水平纹理与竖直纹理的比 值超过第三预置值则缩小 N的值, 若水平纹理与竖直纹理的比值小于 N, 则增 大 N的值。
更具体地, 上述第一检测单元 701具体用于: 检测待编码或解码块设定时 域或空域距离内已经编码块或解码块的纹理,将检测到的纹理确定为已编码或 解码块的纹理。
进一步地, 如图 9所示, 上述装置还包括:
接收单元 901 , 用于接收预先定义的扫描规则, 扫描规则确定了扫描的顺 序, 将接收到的预先定义的扫描规则确定为预置的候选扫描顺序;
或者上述装置还包括:
统计单元 902 , 统计两个或两个以上的变换系数块各位置的变换系数为非 零的次数;
排序单元 903 , 按从大到小的顺序排列各个非零次数对应的变换系数的位 置, 将排列得到的上述变换系数的位置的顺序确定为预置的候选扫描顺序。
以上实施例, 不需要将扫描信息编入码流, 提高了压缩编码效率。
一种变换系数块的扫描装置, 如图 10所示, 包括:
第二检测单元 1001 , 用于检测作为待编码块的参考的已编码块的纹理, 所 述纹理体现了所述待编码块的变换系数块在各方向上变换系数的变化规律; 第二选择单元 1002,用于从预置的候选扫描顺序中选择与上述纹理对应的 扫描顺序;
第二处理单元 1003,用于对预置的候选扫描顺序进行率失真优选处理得到 优选扫描顺序;
第二扫描单元 1004,用于按照优选扫描顺序对待编码块的变换系数块进行 扫描;
第二编码单元 1005,用于将上述选择的扫描顺序与优选扫描顺序的差值编 入码流, 或者, 由上述选择的扫描顺序建立上下文模型, 根据上述上下文模型 将上述优选扫描顺序编入码流; 上述上下文模型为: 通过已编码或解码块的信 息来预测待编码或解码块的信息。
一种变换系数块的扫描装置, 如图 11所示, 包括:
第三检测单元 1101 , 用于检测作为待解码块的参考的已解码块的纹理, 所 述纹理体现了所述待解码块的变换系数块在各方向上变换系数的变化规律; 第三选择单元 1102,用于从预置的候选扫描顺序中选择与上述纹理对应的 扫描顺序;
第三解码单元 1103,用于若解析码流得到上述选择的扫描顺序与优选扫描 顺序的差值, 则计算上述差值与上述选择的扫描顺序的和得到优选扫描顺序; 若检测所述差值失败, 则由上述选择的扫描顺序建立上下文模型,根据上述上 下文模型解析码流得到优选扫描顺序, 上述上下文模型为: 通过已编码或解码 块的信息来预测待编码或解码块的信息;
第三扫描单元 1104,用于按照优选扫描顺序对待解码块的变换系数块进行
扫描。
一种变换系数块的扫描装置, 如图 12所示, 包括:
第四检测单元 1201 , 用于检测作为待编码块的参考的已编码块的纹理, 所 述纹理体现了所述待编码块的变换系数块在各方向上变换系数的变化规律; 第四选择单元 1202,用于从预置的候选扫描顺序中选择与上述纹理对应的 扫描顺序;
第四处理单元 1203,用于对预置的候选扫描顺序和选择的扫描顺序进行率 失真优选处理得到优选扫描顺序;
第四扫描单元 1204,用于按照优选扫描顺序对待编码块的变换系数块进行 扫描;
第四编码单元 1205, 用于将上述进行扫描使用的扫描顺序是否为 Z形扫描 顺序的指示信息编入码流。
一种变换系数块的扫描装置, 如图 13所示, 包括:
第五解析单元 1301 , 用于解析码流得到指示信息;
第五判断单元 1302, 用于判断上述指示信息是否指示扫描顺序为 Z形扫描 顺序;
第五检测单元 1303, 用于若判断结果为否, 则检测作为待解码块的参考的 已编码或解码块的纹理,上述纹理体现了上述待解码块的变换系数块在各方向 上变换系数的变化规律;
第五选择单元 1304,用于从预置的候选扫描顺序中选择与上述纹理对应的 扫描顺序;
第五扫描单元 1305, 用于若判断结果为是, 则按照 Z形扫描顺序对所述待 解码块的变换系数块进行扫描; 或者,按照第五选择单元选择的扫描顺序对所 述待解码块的变换系数块进行扫描。
以的图 10至 13对应的装置, 只需要在水平和竖直的扫描顺序与 Z形扫描顺 序间做选择,是二选一的选择,相比于在水平、竖直以及 Z形扫描顺序( zig-zag ) 之间的三选一的选择可以少使用一位来携带选择的信息,因此在将其编入编码 头信息时, 会节省资源; 另外, 在选择的时候效率也更高。
一种变换系数块的扫描系统, 如图 14所示, 包括: 解码设备 1401和编码设 备 1402, 其中, 解码设备 1401和编码设备 1402均包含图 7至 9任意一项的装置;
该系统不需要将扫描信息编入码流,提高了压缩编码效率。或者,编码设备 1402 为图 10的装置, 解码设备 1401为图 11的装置; 或者, 编码设备 1402为图 12的装 置,解码设备 1401为图 13的装置。后面的两个系统只需要在水平和竖直的扫描 顺序与 Z形扫描顺序间做选择, 是二选一的选择, 相比于在水平、 竖直以及 Z 形扫描顺序(zig-zag )之间的三选一的选择可以少使用一位来携带选择的信息, 因此在将其编入编码头信息时,会节省资源;另外,在选择的时候效率也更高。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分步骤 是可以通过程序来指令相关的硬件完成,上述的程序可以存储于一种计算机可 读存储介质中, 上述提到的存储介质可以是只读存储器, 磁盘或光盘等。
以上对本发明实施例所提供的一种变换系数块的扫描方法、装置和系统进 述, 以上实施例的说明只是用于帮助理解本发明的方法及其核心思想; 同时, 对于本领域的一般技术人员,依据本发明的思想,在具体实施方式及应用范围 上均会有改变之处, 综上, 本说明书内容不应理解为对本发明的限制。
Claims
1、 一种变换系数块的扫描方法, 其特征在于, 包括:
检测作为待编码块参考的已编码块的纹理或作为待解码块参考的已解码 块的纹理,所述纹理体现了所述待编码或解码块的变换系数块在各方向上变换 系数的变化规律;
从预置的候选扫描顺序中选择与所述纹理对应的扫描顺序,并按照选择的 扫描顺序对所述待编码或解码块的变换系数块进行扫描。
2、根据权利要求 1所述方法, 其特征在于, 所述检测已编码或解码块的纹 理包括:
在执行帧间编码或解码时,计算已编码或解码块的水平方向上的水平梯度 值和竖直方向上的竖直梯度值;水平梯度值为水平方向上各相邻像素点的差值 的绝对值的和, 竖直梯度值为竖直方向上各相邻像素点的差值的绝对值的和; 若水平梯度值大于 N倍的竖直梯度值则确定纹理为竖直纹理, 竖直梯度值 大于 N倍的水平梯度值则确定纹理为水平纹理, 否则确定纹理为斜纹理; 所述 N为第一预置值;
在执行帧内编码或解码时,若帧内预测模式方向的竖直方向的偏移量在 M 以内则确定纹理为竖直纹理,帧内预测模式方向的水平方向的偏移量在 M以内 则确定纹理为水平纹理, 否则确定纹理为斜纹理; 所述 M为第二预置值。
3、 根据权利要求 2所述方法, 其特征在于, 还包括:
若已经编码或解码的块中,水平纹理与竖直纹理的比值大于第三预置值则 缩小 N的值, 若水平纹理与竖直纹理的比值小于 N, 则增大 N的值。
4、 根据权利要求 1所述方法, 其特征在于, 所述检测作为待编码块参考的 已编码块的纹理或作为待解码块参考的已解码块的纹理包括:
检测待编码或解码块设定的时域或空域距离内已经编码块或解码块的纹 理, 将检测到的纹理确定为已编码或解码块的纹理。
5、根据权利要求 1所述方法,其特征在于,所述预置的候选扫描顺序包括: 预先定义的扫描规则, 扫描规则确定了扫描的顺序; 或者, 预先统计两个 或两个以上的变换系数块各位置的变换系数为非零的次数,按从大到小的顺序 排列各个非零次数对应的变换系数的位置,将排列得到的所述变换系数的位置 的顺序确定为预置的候选扫描顺序。
6、 一种变换系数块的扫描方法, 其特征在于, 包括:
检测作为待编码块的参考的已编码块的纹理,所述纹理体现了所述待编码 块的变换系数块在各方向上变换系数的变化规律;
从预置的候选扫描顺序中选择与所述纹理对应的扫描顺序;
对预置的候选扫描顺序进行率失真优选处理得到优选扫描顺序,并按照优 选扫描顺序对所述待编码块的变换系数块进行扫描;
将所述选择的扫描顺序与优选扫描顺序的差值编入码流, 或者, 由所述选 择的扫描顺序建立上下文模型,根据所述上下文模型将所述优选扫描顺序编入 码流; 所述上下文模型为: 通过已编码块的信息来预测待编码块的信息。
7、根据权利要求 6所述方法,其特征在于,所述检测已编码块的纹理包括: 在执行帧间编码时,计算已编码或解码块的水平方向上的水平梯度值和竖 直方向上的竖直梯度值;水平梯度值为水平方向上各相邻像素点的差值的绝对 值的和, 竖直梯度值为竖直方向上各相邻像素点的差值的绝对值的和;
若水平梯度值大于 N倍的竖直梯度值则确定纹理为竖直纹理, 竖直梯度值 大于 N倍的水平梯度值则确定纹理为水平纹理, 否则确定纹理为斜纹理; 所述 N为第一预置值;
在执行帧内编码时,若帧内预测模式方向的竖直方向的偏移量在 M以内则 确定纹理为竖直纹理,帧内预测模式方向的水平方向的偏移量在 M以内则确定 纹理为水平纹理, 否则确定纹理为斜纹理; 所述 M为第二预置值。
8、 一种变换系数块的扫描方法, 其特征在于, 包括:
检测作为待解码块的参考的已解码块的纹理,所述纹理体现了所述待解码 块的变换系数块在各方向上变换系数的变化规律;
从预置的候选扫描顺序中选择与所述纹理对应的扫描顺序;
若解析码流得到所述选择的扫描顺序与优选扫描顺序的差值,则计算所述 差值与所述选择的扫描顺序的和得到优选扫描顺序; 若检测所述差值失败, 则 由所述选择的扫描顺序建立上下文模型,根据所述上下文模型解析码流得到优 选扫描顺序,所述上下文模型为:通过已解码块的信息来预测待解码块的信息; 按照优选扫描顺序对所述待解码块的变换系数块进行扫描。
9、 根据权利要求 8所述方法, 其特征在于, 所述检测已解码的纹理包括: 在执行帧间解码时,计算解码块的水平方向上的水平梯度值和竖直方向上 的竖直梯度值; 水平梯度值为水平方向上各相邻像素点的差值的绝对值的和, 竖直梯度值为竖直方向上各相邻像素点的差值的绝对值的和;
若水平梯度值大于 N倍的竖直梯度值则确定纹理为竖直纹理, 竖直梯度值 大于 N倍的水平梯度值则确定纹理为水平纹理, 否则确定纹理为斜纹理; 所述 N为第一预置值;
在执行帧内解码时,若帧内预测模式方向的竖直方向的偏移量在 M以内则 确定纹理为竖直纹理,帧内预测模式方向的水平方向的偏移量在 M以内则确定 纹理为水平纹理, 否则确定纹理为斜纹理; 所述 M为第二预置值。
10、 一种变换系数块的扫描方法, 其特征在于, 包括:
检测作为待编码块的参考的已编码块的纹理,所述纹理体现了所述待编码 块的变换系数块在各方向上变换系数的变化规律;
从预置的候选扫描顺序中选择与所述纹理对应的扫描顺序;
对 Z形扫描顺序和选择的扫描顺序进行率失真优选处理得到优选扫描顺 序, 并按照优选扫描顺序对所述待编码块的变换系数块进行扫描;
将所述进行扫描使用的扫描顺序是否为 Z形扫描顺序的指示信息编入码 流。
11、 根据权利要求 10所述方法, 其特征在于, 所述检测已编码块的纹理包 括:
在执行帧间编码时,计算已编码块的水平方向上的水平梯度值和竖直方向 上的竖直梯度值; 水平梯度值为水平方向上各相邻像素点的差值的绝对值的 和, 竖直梯度值为竖直方向上各相邻像素点的差值的绝对值的和;
若水平梯度值大于 N倍的竖直梯度值则确定纹理为竖直纹理, 竖直梯度值 大于 N倍的水平梯度值则确定纹理为水平纹理, 否则确定纹理为斜纹理; 所述 N为第一预置值;
在执行帧内编码时,若帧内预测模式方向的竖直方向的偏移量在 M以内则 确定纹理为竖直纹理,帧内预测模式方向的水平方向的偏移量在 M以内则确定 纹理为水平纹理, 否则确定纹理为斜纹理; 所述 M为第二预置值。
12、 一种变换系数块的扫描方法, 其特征在于, 包括:
判断所述指示信息是否指示扫描顺序为 Z形扫描顺序;
若是, 则按照 Z形扫描顺序对所述待解码块的变换系数块进行扫描; 若否, 则检测作为所述待解码块的参考的已解码块的纹理, 所述纹理体现 了所述待解码块的变换系数块在各方向上变换系数的变化规律;从预置的候选 扫描顺序中选择与所述纹理对应的扫描顺序,并按照选择的扫描顺序对待解码 块的变换系数块进行扫描。
13、根据权利要求 12所述方法,其特征在于,所述检测已解码的纹理包括: 在执行帧间解码时,计算已编码或解码块的水平方向上的水平梯度值和竖 直方向上的竖直梯度值;水平梯度值为水平方向上各相邻像素点的差值的绝对 值的和, 竖直梯度值为竖直方向上各相邻像素点的差值的绝对值的和;
若水平梯度值大于 N倍的竖直梯度值则确定纹理为竖直纹理, 竖直梯度值 大于 N倍的水平梯度值则确定纹理为水平纹理, 否则确定纹理为斜纹理; 所述 N为第一预置值;
在执行帧内解码时,若帧内预测模式方向的竖直方向的偏移量在 M以内则 确定纹理为竖直纹理,帧内预测模式方向的水平方向的偏移量在 M以内则确定 纹理为水平纹理, 否则确定纹理为斜纹理; 所述 M为第二预置值。
14、 一种变换系数块的扫描装置, 其特征在于, 包括:
第一检测单元,用于检测作为待编码块参考的已编码块的纹理或作为待解 码块参考的已解码块的纹理,所述纹理体现了所述待编码或解码块的变换系数 块在各方向上变换系数的变化规律;
第一选择单元,用于从预置的候选扫描顺序中选择与所述纹理对应的扫描 顺序;
第一扫描单元,用于按照选择的扫描顺序对所述待编码或解码块的变换系 数块进行扫描。
15、 根据权利要求 14所述装置, 其特征在于,
所述第一检测单元具体用于: 在执行帧间编码或解码时,计算已编码或解 码块的水平方向上的水平梯度值和竖直方向上的竖直梯度值;水平梯度值为水 平方向上各相邻像素点的差值的绝对值的和,竖直梯度值为竖直方向上各相邻 像素点的差值的绝对值的和;
若水平梯度值大于 N倍的竖直梯度值则确定纹理为竖直纹理, 竖直梯度值 大于 N倍的水平梯度值则确定纹理为水平纹理, 否则确定纹理为斜纹理; 所述 N为第一预置值; 在执行帧内编码或解码时,若帧内预测模式方向的竖直方向的偏移量在 M 以内则确定纹理为竖直纹理,帧内预测模式方向的水平方向的偏移量在 M以内 则确定纹理为水平纹理, 否则确定纹理为斜纹理; 所述 M为第二预置值。
16、 根据权利要求 15所述装置, 其特征在于, 还包括:
调整单元, 用于若已经编码或解码的块中, 水平纹理与竖直纹理的比值超 过第三预置值则缩小 N的值, 若水平纹理与竖直纹理的比值小于 N, 则增大 N 的值。
17、 根据权利要求 14所述装置, 其特征在于,
所述第一检测单元具体用于:检测待编码或解码块设定时域或空域距离内 已经编码块或解码块的纹理, 将检测到的纹理确定为已编码或解码块的纹理。
18、 根据权利要求 14所述装置, 其特征在于, 还包括:
接收单元, 用于接收预先定义的扫描规则, 扫描规则确定了扫描的顺序, 将接收到的预先定义的扫描规则确定为预置的候选扫描顺序;
或者还包括:
统计单元,统计两个或两个以上的变换系数块各位置的变换系数为非零的 次数;
排序单元, 按从大到小的顺序排列各个非零次数对应的变换系数的位置, 将排列得到的所述变换系数的位置的顺序确定为预置的候选扫描顺序。
19、 一种变换系数块的扫描装置, 其特征在于, 包括:
第二检测单元, 用于检测作为待编码块的参考的已编码块的纹理, 所述纹 理体现了所述待编码块的变换系数块在各方向上变换系数的变化规律;
第二选择单元,用于从预置的候选扫描顺序中选择与所述纹理对应的扫描 顺序;
第二处理单元,用于对预置的候选扫描顺序进行率失真优选处理得到优选 扫描顺序;
第二扫描单元, 用于按照优选扫描顺序对待编码块的变换系数块进行扫 描;
第二编码单元,用于将所述选择的扫描顺序与优选扫描顺序的差值编入码 流, 或者, 由所述选择的扫描顺序建立上下文模型, 根据所述上下文模型将所 述优选扫描顺序编入码流; 所述上下文模型为: 通过已编码或解码块的信息来 预测待编码或解码块的信息。
20、 一种变换系数块的扫描装置, 其特征在于, 包括:
第三检测单元, 用于检测作为待解码块的参考的已解码块的纹理, 所述纹 理体现了所述待解码块的变换系数块在各方向上变换系数的变化规律;
第三选择单元,用于从预置的候选扫描顺序中选择与所述纹理对应的扫描 顺序;
第三解码单元,用于若解析码流得到所述选择的扫描顺序与优选扫描顺序 的差值, 则计算所述差值与所述选择的扫描顺序的和得到优选扫描顺序; 若检 测所述差值失败, 则由所述选择的扫描顺序建立上下文模型,根据所述上下文 模型解析码流得到优选扫描顺序, 所述上下文模型为: 通过已编码或解码块的 信息来预测待编码或解码块的信息;
第三扫描单元, 用于按照优选扫描顺序对待解码块的变换系数块进行扫 描。
21、 一种变换系数块的扫描装置, 其特征在于, 包括:
第四检测单元, 用于检测作为待编码块的参考的已编码块的纹理, 所述纹 理体现了所述待编码块的变换系数块在各方向上变换系数的变化规律;
第四选择单元,用于从预置的候选扫描顺序中选择与所述纹理对应的扫描 顺序;
第四处理单元, 用于对预置的 Z形扫描顺序和选择的扫描顺序进行率失真 优选处理得到优选扫描顺序;
第四扫描单元, 用于按照优选扫描顺序对待编码块的变换系数块进行扫 描;
第四编码单元, 用于将所述进行扫描使用的扫描顺序是否为 Z形扫描顺序 的指示信息编入码流。
22、 一种变换系数块的扫描装置, 其特征在于, 包括:
第五解析单元, 用于解析码流得到指示信息;
第五判断单元, 用于判断所述指示信息是否指示扫描顺序为 Z形扫描顺 序;
第五检测单元, 用于若判断结果为否, 则检测作为待解码块的参考的已编 码或解码块的纹理,所述纹理体现了所述待解码块的变换系数块在各方向上变 换系数的变化规律;
第五选择单元,用于从预置的候选扫描顺序中选择与所述纹理对应的扫描 顺序;
第五扫描单元, 用于若判断结果为是, 则按照 Z形扫描顺序对所述待解码 块的变换系数块进行扫描; 或者,按照第五选择单元选择的扫描顺序对所述待 解码块的变换系数块进行扫描。
23、 一种变换系数块的扫描系统, 包括: 解码设备和编码设备, 其特征在 于:
解码设备和编码设备均包含权利要求 14至 18任意一项所述的装置; 或者, 编码设备为权利要求 19的装置, 解码设备为权利要求 20的装置; 或者, 编码设 备为权利要求 21的装置, 解码设备为权利要求 22的装置。
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201110006848.1 | 2011-01-13 | ||
CN201110006848.1A CN102595113B (zh) | 2011-01-13 | 2011-01-13 | 一种变换系数块的扫描方法、装置和系统 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2012094909A1 true WO2012094909A1 (zh) | 2012-07-19 |
Family
ID=46483270
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2011/080325 WO2012094909A1 (zh) | 2011-01-13 | 2011-09-29 | 变换系数块的扫描方法、装置和系统 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN102595113B (zh) |
WO (1) | WO2012094909A1 (zh) |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104702954B (zh) * | 2013-12-05 | 2017-11-17 | 华为技术有限公司 | 视频编码方法及装置 |
CN105872539B (zh) | 2015-02-08 | 2020-01-14 | 同济大学 | 图像编码方法和装置及图像解码方法和装置 |
CN110650343B (zh) * | 2018-06-27 | 2024-06-07 | 中兴通讯股份有限公司 | 图像的编码、解码方法及装置、电子设备及系统 |
CN114079771B (zh) * | 2020-08-14 | 2023-03-28 | 华为技术有限公司 | 基于小波变换的图像编解码方法及装置 |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2007079782A1 (en) * | 2006-01-13 | 2007-07-19 | Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V. | Quality scalable picture coding with particular transform coefficient scan path |
CN101317462A (zh) * | 2005-11-30 | 2008-12-03 | 皇家飞利浦电子股份有限公司 | 应用系数重新排序的编码方法和装置 |
CN101325707A (zh) * | 2007-06-12 | 2008-12-17 | 浙江大学 | 纹理自适应视频编解码系统 |
CN101356823A (zh) * | 2006-01-09 | 2009-01-28 | 马蒂亚斯·纳罗施克 | 混合视频编码中预测误差的自适应编码 |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20020030101A (ko) * | 2000-06-30 | 2002-04-22 | 요트.게.아. 롤페즈 | 비디오 시퀀스의 압축을 위한 인코딩 방법 |
EP2018070A1 (en) * | 2007-07-17 | 2009-01-21 | Thomson Licensing | Method for processing images and the corresponding electronic device |
-
2011
- 2011-01-13 CN CN201110006848.1A patent/CN102595113B/zh active Active
- 2011-09-29 WO PCT/CN2011/080325 patent/WO2012094909A1/zh active Application Filing
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101317462A (zh) * | 2005-11-30 | 2008-12-03 | 皇家飞利浦电子股份有限公司 | 应用系数重新排序的编码方法和装置 |
CN101356823A (zh) * | 2006-01-09 | 2009-01-28 | 马蒂亚斯·纳罗施克 | 混合视频编码中预测误差的自适应编码 |
WO2007079782A1 (en) * | 2006-01-13 | 2007-07-19 | Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V. | Quality scalable picture coding with particular transform coefficient scan path |
CN101325707A (zh) * | 2007-06-12 | 2008-12-17 | 浙江大学 | 纹理自适应视频编解码系统 |
Also Published As
Publication number | Publication date |
---|---|
CN102595113A (zh) | 2012-07-18 |
CN102595113B (zh) | 2014-06-04 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
KR102398644B1 (ko) | 인트라 예측 정보 부호화 방법 및 장치 | |
WO2012113328A1 (zh) | 一种变换系数块的扫描方法和装置 | |
JP6073405B2 (ja) | 映像復号化方法及び装置 | |
JP5266342B2 (ja) | 映像イントラ予測方法及び装置 | |
KR100667808B1 (ko) | 영상의 인트라 예측 부호화, 복호화 방법 및 장치 | |
JP5401009B2 (ja) | 映像のイントラ予測符号化、復号化方法及び装置 | |
JP6076415B2 (ja) | 映像の符号化方法及び装置、並びに映像の復号化方法及び装置 | |
CN103283238B (zh) | 利用按照编码单元的并行帧内预测进行编码和解码的方法和装置 | |
JP5832646B2 (ja) | ビデオ復号化方法及びビデオ復号化装置 | |
JP2006014342A5 (zh) | ||
WO2016180129A1 (zh) | 预测模式选择方法、装置及设备 | |
CN1925619B (zh) | 视频编码和解码的装置和方法 | |
TW201526617A (zh) | 影像處理方法與系統、解碼方法、編碼器與解碼器 | |
CN102665079A (zh) | 用于hevc的自适应快速帧内预测模式决策 | |
CN102934433A (zh) | 使用自适应系数扫描顺序对图像进行编码和解码的方法和设备以及对图像进行解码的方法和设备 | |
WO2012094921A1 (zh) | 多图像块划分的编解码方法和装置 | |
CN105721878A (zh) | Hevc视频编解码中执行帧内预测的图像处理装置及方法 | |
WO2009097809A1 (zh) | 基于自适应块变换的帧内预测方法及装置 | |
CN102196256A (zh) | 一种视频编码方法及装置 | |
KR20130116215A (ko) | 병렬 처리를 위한 비디오 부호화 방법 및 장치, 비디오 복호화 방법 및 장치 | |
WO2012094909A1 (zh) | 变换系数块的扫描方法、装置和系统 | |
CN110913232B (zh) | 一种tu划分模式的选择方法及装置、可读存储介质 | |
CN105791865B (zh) | 帧内预测及去块滤波方法 | |
WO2012113197A1 (zh) | 一种预测模式的编码或解码方法及装置 | |
JP4216769B2 (ja) | 動画像符号化方法、動画像符号化装置、動画像符号化プログラム及びそのプログラムを記録したコンピュータ読み取り可能な記録媒体 |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 11855577 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 11855577 Country of ref document: EP Kind code of ref document: A1 |