WO2013064120A1 - 一种变换模式的编解码方法和装置 - Google Patents
一种变换模式的编解码方法和装置 Download PDFInfo
- Publication number
- WO2013064120A1 WO2013064120A1 PCT/CN2012/084082 CN2012084082W WO2013064120A1 WO 2013064120 A1 WO2013064120 A1 WO 2013064120A1 CN 2012084082 W CN2012084082 W CN 2012084082W WO 2013064120 A1 WO2013064120 A1 WO 2013064120A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- mode
- transform
- prediction
- transformation
- candidate
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Ceased
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/60—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding
- H04N19/61—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding in combination with predictive coding
-
- 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/12—Selection from among a plurality of transforms or standards, e.g. selection between discrete cosine transform [DCT] and sub-band transform or selection between H.263 and H.264
- H04N19/122—Selection of transform size, e.g. 8x8 or 2x4x8 DCT; Selection of sub-band transforms of varying structure or type
-
- 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/134—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
- H04N19/146—Data rate or code amount at the encoder output
- H04N19/147—Data rate or code amount at the encoder output according to rate distortion criteria
-
- 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/134—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
- H04N19/157—Assigned coding mode, i.e. the coding mode being predefined or preselected to be further used for selection of another element or parameter
- H04N19/159—Prediction type, e.g. intra-frame, inter-frame or bidirectional frame prediction
-
- 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/169—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
- H04N19/17—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
- H04N19/176—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a block, e.g. a macroblock
-
- 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/46—Embedding additional information in the video signal during the compression process
Definitions
- the present invention relates to the field of communications technologies, and in particular, to a coding and decoding method and apparatus for a transform mode. Background technique
- Transform coding is an integral part of video codec technology.
- Transform coding refers to performing a function transformation on a signal, transforming a signal from one signal space into another signal space, and then quantizing and encoding the transformed signal.
- Compressing data in a transform coding system has three steps: transform, quantization, and entropy coding.
- the transformation process is reversible, that is, there is an inverse transformation to recover the original data.
- the coding end obtains the residual data of the video image by predictive coding, quantizes the residual data, and then encodes the code stream through the entropy coding link to complete the coding process.
- the decoding end obtains the data by parsing the code stream, reconstructs the residual data by inverse quantization and inverse transform operations, and combines the predicted values obtained by the predictive coding part to reconstruct the decoded image to complete the decoding process.
- transform mode to process three types of residual block types: positive square, horizontal long square and vertical long square, as shown in Figure 1.
- the optimal transformation mode is selected by the rate distortion optimization criterion from the above three transformation modes; then the residual data is transformed using the selected transformation mode, and the transformation mode is
- the selection information is programmed 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 transform mode needs to be encoded into the code stream, which affects the compression coding efficiency.
- the embodiments of the present invention provide a coding and decoding method and apparatus for a transform mode, so as to reduce the complexity of the coding end and improve the compression coding efficiency.
- An embodiment of the present invention provides a coding mode coding method, including:
- the embodiment of the present invention provides a decoding mode decoding method, including:
- An embodiment of the present invention provides a coding apparatus for a transform mode, including:
- a first acquiring unit configured to acquire a prediction mode of the prediction data block corresponding to the residual data block of the to-be-encoded video image
- a first selecting unit configured to select, from the candidate transform mode set, a transform mode corresponding to the prediction mode
- a first processing unit configured to perform a transform operation on the residual data block of the video image to be encoded by using the transform mode
- An embodiment of the present invention provides a decoding apparatus for a transform mode, including:
- a fourth acquiring unit configured to acquire a prediction mode of the prediction data block corresponding to the transform coefficient block of the image to be decoded
- a fourth selecting unit configured to select, from the candidate transform mode set, a transform mode corresponding to the prediction mode
- a fourth processing unit configured to perform an inverse transform operation on the transform coefficient block of the image to be decoded using the transform mode
- An embodiment of the present invention provides a coding mode coding method, including:
- the optimal transform mode is used to minimize distortion of the reconstructed video image of the video image to be encoded and the decoding end
- the minimum number of coded bits required to encode the video image is;
- An embodiment of the present invention provides a decoding mode decoding method, including:
- the embodiment of the present invention provides an encoding apparatus for the transform mode, including:
- a second acquiring unit configured to acquire a prediction mode of the prediction data block corresponding to the residual data block of the to-be-encoded video image
- a second determining unit configured to determine, according to the prediction mode, a candidate set of candidate transform modes according to a correspondence between the candidate transform mode set and the prediction mode;
- a second selecting unit selecting, from the binned candidate transform mode set, an optimal transform mode, wherein the optimal transform mode is used to minimize distortion of the reconstructed video image of the video image to be encoded and the decoding end
- the minimum number of coded bits required to encode the video image is;
- a second coding unit configured to encode an index of the optimal transform mode into a code stream
- a second processing unit configured to perform a transform operation on the residual data block of the video image to be encoded by using the optimal transform mode
- An embodiment of the present invention provides a decoding apparatus for a transform mode, including:
- a fifth acquiring unit configured to acquire a prediction mode of the prediction data block corresponding to the transform coefficient block of the image to be decoded
- a fifth determining unit configured to determine, according to the prediction mode, a candidate set of candidate transform modes according to a correspondence between the candidate transform mode set and the prediction mode;
- a fifth decoding unit configured to parse the code stream to obtain an index of an optimal transform mode
- An embodiment of the present invention provides a coding mode coding method, including:
- the index of the optimal transform mode is encoded into the code stream
- An embodiment of the present invention provides a decoding mode decoding method, including:
- the parsing code stream obtains an index of the optimal transform mode; performing an inverse transform operation on the transform coefficient block of the image to be decoded using the optimal transform mode;
- Device including:
- a third acquiring unit configured to acquire a prediction mode of the prediction data block corresponding to the residual data block of the video image to be encoded
- a third selection unit that preferentially selects an optimal transformation mode from the candidate transformation mode set, wherein the optimal transformation mode is used to minimize distortion of the reconstructed video image of the video image to be encoded and the decoding end, and to enable the video image to be encoded The minimum number of coded bits required;
- a third determining unit configured to determine whether the optimal transform mode is a mode that has a corresponding relationship with the prediction mode
- a third coding unit configured to encode the judgment result and an index of the optimal transformation mode into a code stream
- a third processing unit configured to perform a transform operation on the residual data block of the video image to be encoded by using the optimal transform mode
- An embodiment of the present invention provides a decoding apparatus for a transform mode, including: a sixth acquiring unit, configured to acquire a prediction mode of the prediction data block corresponding to the transform coefficient block of the image to be decoded;
- a sixth determining unit configured to determine, in the candidate transform mode set, a transform mode corresponding to the prediction mode
- a sixth decoding unit configured to parse the code stream to obtain an optimal transformation mode, a judgment result of a mode corresponding to the prediction mode, and an index of the optimal transformation mode
- a sixth processing unit configured to perform an inverse transform operation on the transform coefficient block of the image to be decoded, by using the transform mode, by using the foregoing technical solution, by using a correlation between the prediction mode and the change mode,
- the optimization of the optimal transform mode candidate set saves resources when it is encoded into the encoding header information.
- the encoding efficiency is also higher.
- 1A is a schematic diagram of a residual data block of a video image to be encoded and a transform coefficient block shape of an image to be decoded corresponding to a positive block transform according to an embodiment of the present invention
- 1B is a schematic diagram showing a shape of a transform coefficient block of a to-be-coded video image corresponding to a horizontally long block transform according to an embodiment of the present invention
- 1C is a schematic diagram of a residual data block of a video image to be encoded and a transform coefficient block shape of an image to be decoded corresponding to a vertical long block transform according to an embodiment of the present invention
- FIG. 2 is a schematic flowchart of a method 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 structural view of an apparatus according to an embodiment of the present invention.
- Figure 5 is a schematic structural view of an apparatus 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 flowchart of a method 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
- 9 is a schematic structural diagram of an apparatus according to an embodiment of the present invention.
- FIG. 10 is a schematic flowchart of a method according to an embodiment of the present invention.
- FIG. 11 is a schematic flowchart of a method according to an embodiment of the present invention.
- FIG. 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.
- 16 is a schematic structural diagram of an apparatus according to an embodiment of the present invention.
- FIG. 17 is a schematic structural diagram of an apparatus according to an embodiment of the present invention.
- FIG. 20 is a schematic structural diagram of an apparatus according to an embodiment of the present invention.
- 21 is a schematic structural view of an apparatus according to an embodiment of the present invention.
- the optimal coding type is selected according to the rate distortion criterion from various coding types, and the prediction information is obtained, and the prediction information and the coded reconstruction are obtained.
- the frame information is obtained, and the predicted value of the block to be coded is obtained, and the difference between the predicted value and the pixel value of the block to be coded is obtained, and the residual value is obtained, and the residual value is sequentially transformed, quantized, scanned, entropy encoded, and encoded into the code stream.
- the prediction 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 or a multi-transformation technique, which is not limited in this embodiment of the present invention.
- the following describes the transformation mode selection link performed on the encoding end, as shown in FIG. 2, including:
- a transform mode corresponding to the prediction mode Select, from the candidate transform mode set, a transform mode corresponding to the prediction mode, and more specifically, according to “if the prediction mode is an intra prediction mode, if the predicted pixel of the prediction mode exceeds a set number of When the pixel coding unit is on the upper right boundary, the horizontally long square transform is selected as the corresponding transform type of the prediction mode; if the predicted pixel of the prediction mode exceeds the left and lower left boundaries of the set number of pixel coding units, the vertical length is selected.
- a block transform is used as a corresponding transform type of the prediction mode; otherwise, a correspondence between a positive block transform and a transform mode of a corresponding transform type of the prediction mode is selected, for example, a horizontal prediction mode selects a vertical direction.
- the long block transform is used as the corresponding transform type of the prediction mode, and the vertical prediction mode selects the horizontal long block transform as the corresponding transform type of the prediction mode, and the specific correspondence is not specifically limited under the principle; More than the number of pixels in the set number , can be all, or half, or two-thirds, without specific limitation;
- the embodiment of the present invention further provides a transformation mode selection link performed at the decoding end, as shown in the figure.
- the coding device of the transform mode includes:
- a first acquiring unit 301 configured to acquire a prediction mode of the prediction data block corresponding to the residual data block of the to-be-encoded video image
- the first selecting unit 302 is configured to select, according to the set of candidate transform modes, a transform mode corresponding to the prediction mode;
- a first processing unit 303 configured to perform a transform operation on the residual data block of the video image to be encoded by using the transform mode
- a decoding mode decoding device as shown in FIG. 5, includes:
- a fourth acquiring unit 401 configured to acquire a prediction data block corresponding to a transform coefficient block of an image to be decoded Prediction mode
- the fourth selecting unit 402 is configured to select, from the candidate transform mode set, a transform mode corresponding to the prediction mode;
- a fourth processing unit 403, configured to perform an inverse transform operation on the transform coefficient block of the image to be decoded using the transform mode
- the method includes:
- the candidate transformation mode is a horizontal long square transform and a square block transform; if the predicted pixels of the prediction mode exceed a set number of pixel coding unit left and lower left boundaries, then The candidate transform mode is a vertical long block transform and a square block transform; otherwise, the candidate transform mode is a square block transform" principle, and a set of candidate candidate transform patterns is determined, for example, a horizontal prediction mode selects a vertical long square transform as the a corresponding transform type of the prediction mode and a positive block transform, the vertical prediction mode selects a horizontal long square transform as a corresponding transform type and a positive square transform of the prediction mode, and the specific correspondence is not specifically limited under the principle; the prediction pixel In the number of pixels in the set number of pixels, Can be all,
- the index of the optimal transform mode is encoded into a code stream, and more specifically, when the candidate transform mode is a horizontal long block and a positive square, the flag is represented by 1 flag, and when the candidate transform mode is a vertical long block and a positive square, It is represented by 1 flag bit, when the candidate transform mode is a positive square, it is not necessary to use a flag bit; Step 504 and step 505 have no sequential relationship;
- the embodiment of the present invention further provides a transformation mode selection step performed at the decoding end, as shown in FIG. 7, which includes:
- 601 Obtain a prediction mode of the prediction data block corresponding to the transform coefficient block of the image to be decoded, and more specifically, obtain an intra prediction mode of the prediction data block corresponding to the transform coefficient block of the image to be decoded;
- 602 According to the same rule as 502, determining, according to the prediction mode, a candidate set of candidate transform modes according to a correspondence between the candidate transform mode set and the prediction mode;
- parsing the code stream to obtain an index of the optimal transform mode, and more specifically, corresponding to 503.
- the candidate transform mode is a horizontal long block and a positive square
- the parsing 1 flag is obtained, and when the candidate transform mode is a vertical long square and a positive square
- parsing the 1 flag bit in particular, when the candidate transform mode is a positive square, there is no need to parse the flag bit;
- the encoding device of the transform mode includes:
- a second acquiring unit 701 configured to acquire a prediction mode of the prediction data block corresponding to the residual data block of the to-be-encoded video image
- a second determining unit 702 configured to determine, according to the prediction mode, a candidate set of candidate transform modes according to a correspondence between the candidate transform mode set and the prediction mode;
- a second selecting unit 703 preferentially selecting an optimal transform mode from the binned candidate transform mode set, where the optimal transform mode is used to minimize distortion of the reconstructed video image obtained by the video image to be encoded and the decoding end
- the number of coded bits required for the video image to be encoded is the smallest
- a second coding unit 704 configured to encode an index of the optimal transform mode into a code stream
- a second processing unit 705, configured to perform a transform operation on the residual data block of the to-be-encoded video image by using the optimal transform mode
- a decoding mode decoding device as shown in FIG. 9, includes:
- a fifth acquiring unit 801 configured to acquire a prediction mode of the prediction data block corresponding to the transform coefficient block of the image to be decoded
- a fifth determining unit 802 configured to determine, according to the prediction mode, a candidate set of candidate transform modes according to a correspondence between the candidate transform mode set and the prediction mode;
- a fifth decoding unit 803, configured to parse the code stream to obtain an index of an optimal transform mode
- a fifth processing unit 804 configured to use a transform coefficient block of the image to be decoded using the transform mode Inverse conversion operation;
- Example 3 The following describes the transformation mode selection link performed at the encoding end, as shown in FIG. 10, including:
- the candidate transformation mode is a horizontal long square transform and a square block transform; if the predicted pixels of the prediction mode exceed a set number of pixel coding unit left and lower left boundaries, then The candidate transform mode is a vertical long block transform and a square block transform; otherwise, the candidate transform mode is a horizontal long square transform, a vertical long square transform, a square block transform, and the determined candidate transform mode set, for example, horizontal
- the prediction mode selects a vertical long square transform as a corresponding transform type and a positive square transform of the prediction mode, and the vertical prediction mode selects a horizontal long square transform as a corresponding transform type and a positive square transform of the prediction mode, and the specific correspondence relationship is under the principle , not specifically defined; the prediction image The number exceeds the number
- step 905 Encoding the index of the optimal transform mode into a code stream, and more specifically, when the candidate transform mode is a horizontal long block and a positive square, represented by a flag, when the candidate transform mode is a vertical long square and a positive square, When the candidate transformation mode is a horizontal long square, a vertical long square, or a positive square, it is necessary to use 1 flag to indicate whether it is a positive square. If it is not a positive square, then use 1 flag to represent a horizontal long square. Still vertical long squares; step 904 and step 905 have no sequential relationship; Correspondingly, the embodiment of the present invention further provides a transformation mode selection link performed at the decoding end, as shown in the figure.
- 1001 Obtain a prediction mode of the prediction data block corresponding to the transform coefficient block of the image to be decoded, and more specifically, obtain an intra prediction mode of the prediction data block corresponding to the transform coefficient block of the image to be decoded;
- 1002 According to the same rule as 902, determining, according to the prediction mode, a candidate set of candidate transform modes according to a correspondence between a candidate transform mode set and the prediction mode;
- parsing the code stream to obtain an index of an optimal transform mode, and more specifically, corresponding to 903.
- the candidate transform mode is a horizontal long block and a positive square
- the parsing 1 flag bit is obtained, when the candidate transform mode is a vertical long block and a positive square.
- the parsing 1 flag bit is obtained as a positive square. If it is not a positive square, the parsing 1 flag bit is obtained as a lateral length. The square is still a vertical long square;
- a coding mode conversion device as shown in FIG. 12, includes:
- a second acquiring unit 1101 configured to acquire a prediction mode of the prediction data block corresponding to the residual data block of the to-be-encoded video image
- a second determining unit 1102 configured to determine, according to the prediction mode, a candidate set of candidate transform modes according to a correspondence between the candidate transform mode set and the prediction mode;
- a second selecting unit 1103 preferentially selecting an optimal transform mode from the binned candidate transform mode set, where the optimal transform mode is used to minimize distortion of the reconstructed video image obtained by the video image to be encoded and the decoding end
- the number of coded bits required for the video image to be encoded is the smallest
- a second coding unit 1104 configured to encode an index of the optimal transform mode into a code stream
- a second processing unit 1105 configured to perform a transform operation on the residual data block of the to-be-encoded video image by using the optimal transform mode
- a decoding mode decoding device as shown in FIG. 13, includes:
- a fifth acquiring unit 1201 configured to acquire a prediction mode of the prediction data block corresponding to the transform coefficient block of the image to be decoded
- the fifth determining unit 1202 is configured to determine, according to the prediction mode, a candidate set of candidate transform modes according to a correspondence between the candidate transform mode set and the prediction mode;
- a fifth decoding unit 1203 configured to parse the code stream to obtain an index of an optimal transform mode
- the fifth processing unit 1204 is configured to perform an inverse transform operation on the transform coefficient block of the image to be decoded by using the transform mode.
- the transform mode selection link performed at the encoding end as shown in FIG. include:
- the optimal transform mode is used to minimize distortion of the reconstructed video image to be obtained by the video image to be encoded and the decoding end, and to obtain the video image to be encoded.
- the number of coded bits is the smallest, and the method of rate-distortion optimization can be used. The specific method is not limited;
- the candidate transformation mode selects a horizontal long square transform as a corresponding transformation type of the prediction mode;
- the candidate transform mode selects a vertical long block transform as a corresponding transform type of the prediction mode; otherwise, the candidate transform mode corresponds to
- the principle of square block transformation is to determine whether the optimal transformation mode is a mode corresponding to the prediction mode, for example, the horizontal prediction mode selects a vertical long block transformation as a corresponding transformation type of the prediction mode, and the vertical prediction mode selection
- the horizontally long square transform is used as the corresponding transform type of the prediction mode, and the specific correspondence is not specifically defined under the principle; the number of the predicted pixels exceeding a set number of pixels may be all, or half , or two-thirds, without specific limitations;
- the index of the optimal transform mode is encoded into a code stream, and more specifically, represented by a 1 flag bit;
- the transformation mode selection link includes: And obtaining a prediction mode of the prediction data block corresponding to the transform coefficient block of the image to be decoded, and more specifically, acquiring an intra prediction mode of the prediction data block corresponding to the transform coefficient block of the image to be decoded;
- 1402 Determine a transformation mode corresponding to the prediction mode according to the same rule as 1303. 1403: Corresponding to 1304, parsing the code stream 1 flag bit, and determining whether the optimal transformation mode is a mode corresponding to the prediction mode Result
- a coding mode coding apparatus as shown in FIG. 16, includes:
- the third obtaining unit 1501 is configured to acquire a prediction mode of the prediction data block corresponding to the residual data block of the video image to be encoded.
- the third selecting unit 1502 is configured to preferentially select an optimal transform mode from the candidate transform mode set, where the optimal transform mode is used to minimize distortion of the reconstructed video image of the video image to be encoded and the decoding end, and to enable the video to be encoded.
- the third determining unit 1503 is configured to determine whether the optimal transform mode is a mode that has a corresponding relationship with the prediction mode;
- a third coding unit 1504 configured to encode the judgment result and an index of the optimal transformation mode into a code stream
- a third processing unit 1505 configured to perform a transform operation on the residual data block of the video image to be encoded by using the optimal transform mode
- a decoding mode decoding device as shown in FIG. 17, includes:
- a sixth obtaining unit 1601 configured to acquire a prediction mode of the prediction data block corresponding to the transform coefficient block of the image to be decoded
- the sixth determining unit 1602 is configured to determine, in the candidate transform mode set, a transform mode corresponding to the prediction mode
- a sixth decoding unit 160 configured to parse the code stream to obtain whether the optimal transform mode is a judgment result of a mode that has a correspondence relationship with the prediction mode, and an index of the optimal transform mode;
- a sixth processing unit 1604 configured to perform an inverse transform operation on the transform coefficient block of the image to be decoded using the transform mode; For example, the following describes the transformation mode selection link performed on the encoding end, as shown in FIG. 18, including:
- the candidate transformation mode selects a horizontal long square transform as a corresponding transformation type of the prediction mode;
- the candidate transform mode selects a vertical long block transform as a corresponding transform type of the prediction mode; otherwise, the optimal candidate transform
- the principle of the mode is a square block transform, determining whether the optimal transform mode is a mode corresponding to the prediction mode, for example, the horizontal prediction mode selects a vertical long block transform as a corresponding transform type of the prediction mode, and vertical prediction The mode selects the horizontally long square transform as the corresponding transform type of the prediction mode, and the specific correspondence is not specifically limited under the principle; the number of the predicted pixels exceeding the set number of pixels may be all, Or half, or two-thirds, without specific limitations;
- the index of the optimal transformation mode is encoded into a code stream, and more specifically, represented by a 1 flag bit;
- the embodiment of the present invention further provides a transformation mode selection step performed at the decoding end, as shown in FIG. 19, including:
- 1801 Obtain a prediction mode of the prediction data block corresponding to the transform coefficient block of the image to be decoded, and more specifically, obtain an intra prediction mode of the prediction data block corresponding to the transform coefficient block of the image to be decoded;
- 1802 Determine a transformation mode corresponding to the prediction mode according to the same rule as 1703.
- 1803 Corresponding to 1704, parsing the code stream 1 flag, and determining whether the optimal transformation mode is a mode corresponding to the prediction mode As a result, in particular, when the correspondence relationship is only corresponding to a positive square, there is no need to parse the flag bit;
- a coding mode coding apparatus as shown in FIG. 20, includes:
- the third obtaining unit 1901 is configured to acquire a prediction mode of the prediction data block corresponding to the residual data block of the video image to be encoded.
- the third selecting unit 1902 preferentially selects an optimal transform mode from the candidate transform mode set, where the optimal transform mode is used to minimize distortion of the reconstructed video image of the video image to be encoded and the decoding end, and to enable the video to be encoded The minimum number of coded bits required for the image;
- a third determining unit 1903 configured to determine whether the optimal transform mode is a mode that has a corresponding relationship with the prediction mode
- a third coding unit 1904 configured to encode the judgment result and the index of the optimal transformation mode into a code stream
- a third processing unit 1905 configured to perform a transform operation on the residual data block of the to-be-encoded video image by using the optimal transform mode
- a decoding mode decoding device as shown in FIG. 21, includes:
- a sixth acquiring unit 2001 configured to acquire a prediction mode of the prediction data block corresponding to the transform coefficient block of the image to be decoded
- a sixth determining unit 2002 configured to determine, in the candidate transform mode set, a transform mode corresponding to the prediction mode
- a sixth decoding unit 2003 configured to parse the code stream to obtain whether the optimal transform mode is a judgment result of a mode corresponding to the prediction mode, and an index of the optimal transform mode;
- a sixth processing unit 2004, configured to perform an inverse transform operation on the transform coefficient block of the image to be decoded using the transform mode;
- the correlation between the prediction information and the transformation mode information is utilized. Due to the existence of the correlation, redundant candidates in some transformation mode candidate sets can be eliminated, and the embodiments are from different angles.
- the transform mode candidate set is improved, the coding efficiency is improved at the encoding end, coding time and resource overhead are saved, and the candidate mode selection information can be represented by fewer coding bits due to the reduction of the number of candidate modes, and the header information is reduced. , improved coding performance.
- the method provided by the embodiment of the present invention can be applied to the field of digital signal processing, and is implemented by a video encoder and a decoder.
- Video encoders, decoders are widely used in a variety of communication devices or electronic devices, such as: media gateways, mobile phones, wireless devices, personal data assistants (PDAs), handheld or portable computers, GPS receivers / navigators, cameras , video players, camcorders, video recorders, surveillance equipment, and more.
- Such devices include processors, memory, and interfaces for transmitting data.
- the video codec can be implemented directly by a digital circuit or chip such as a DSP (digital signal processor); or by software code driving a processor to execute the flow in the software code.
- DSP digital signal processor
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Physics & Mathematics (AREA)
- Discrete Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Compression Or Coding Systems Of Tv Signals (AREA)
Abstract
本发明实施例公开了一种变换模式的编解码方法和装置,其中方法的实现包括:获取视频图象的残差数据块所对应的预测数据块的预测模式,所述预测模式可以为但不限于帧内预测模式;从候选变换模式中择优选择最优变换模式,所述最优变换模式用于使所述待编码视频图像和解码端得到重建视频图像的失真最小和使所述待编码视频图像所需要的编码比特数最小;如果优选变换模式与预测模式相关,则传递信息或者编解码端达成协议,使解码端获知所选变换模式;如果优选变换模式与预测模式无关,则传递信息,使解码端获知所选变换模式;上述传递信息编入码流;上述方案可以节省资源,效率也更高。
Description
一种变换模式的编解码方法和装置 本申请要求于 2011 年 11 月 4 日提交中国专利局、 申请号为 201110346062.4, 发明名称为 "一种变换模式的编解码方法和装置" 的中国专 利申请优先权, 上述专利的全部内容通过引用结合在本申请中。 技术领域
本发明涉及通信技术领域, 特别涉及一种变换模式的编解码方法和装置。 背景技术
变换编码是视频编解码技术的一个组成部分。变换编码是指对信号进行某 种函数变换,从一种信号空间的信号变换到另一种信号空间的信号, 然后对变 换后的信号进行量化和编码。 变换编码系统中压缩数据有三个步骤: 变换、 量 化以及熵编码。 一般而言, 变换过程是可逆的, 即存在反变换, 以恢复原来的 数据。 编码端通过预测编码, 得到视频图像的残差数据, 对残差数据进行量化 操作, 然后通过熵编码环节,编入码流, 完成编码过程。解码端通过解析码流, 获得数据, 通过反量化、 反变换操作后, 重建残差数据, 再通过和预测编码部 分所得到的预测值相结合后, 重建解码图像, 完成解码过程。
在当前的变换编码技术中, 依据变换矩阵的不同, 存在不同的变换类型, 其中一种分类方式按照变换矩阵的形状, 可分为正方块变换,横向长方块变换 和纵向长方块变换这三种变换模式, 来分别处理正方块,横向长方块和纵向长 方块三种残差数据块类型, 如图 1所示。
目前在视频编码端,在进行变换模式的选择时,从上述三种变换模式中通 过率失真优化准则选择最优的变换模式;然后使用选择的变换模式对残差数据 进行变换, 将变换模式的选择信息编入码流, 传递给解码端。
由于在视频的编码端, 需要在三种扫描模式中进行模式的选择,使编码端 复杂度高;另夕卜,需要将变换模式的选择信息编入码流,影响了压缩编码效率。 发明内容
本发明实施例提供一种变换模式的编解码方法和装置,以降低编码端复杂 度, 提高压缩编码效率。
本发明实施例提供一种变换模式的编码方法, 包括:
获取所述待编码视频图像的残差数据块所对应预测数据块的预测模式; 从候选变换模式集中选择与所述预测模式对应的变换模式;
使用所述变换模式对所述待编码视频图像的残差数据块进行变换操作; 本发明实施例提供一种变换模式的解码方法, 包括:
获取待解码图像的变换系数块所对应预测数据块的预测模式;
从候选变换模式集中选择与所述预测模式对应的变换模式;
使用所述变换模式对待解码图像的变换系数块进行反变换操作;
本发明实施例提供一种变换模式的编码装置, 包括:
第一获取单元,用于获取所述待编码视频图像的残差数据块所对应预测数 据块的预测模式;
第一选择单元,用于从候选变换模式集中选择与所述预测模式对应的变换 模式;
第一处理单元,用于使用所述变换模式对所述待编码视频图像的残差数据 块进行变换操作;
本发明实施例提供一种变换模式的解码装置, 包括:
第四获取单元,用于获取待解码图像的变换系数块所对应预测数据块的预 测模式;
第四选择单元,用于从候选变换模式集中选择与所述预测模式对应的变换 模式;
第四处理单元,用于使用所述变换模式对待解码图像的变换系数块进行反 变换操作;
本发明实施例提供一种变换模式的编码方法, 包括:
获取所述待编码视频图像的残差数据块所对应预测数据块的预测模式; 根据所述预测模式,根据候选变换模式集与所述预测模式的对应关系, 确 定筒化的候选变换模式集;
从所述筒化的候选变换模式集中择优选择最优变换模式,所述最优变换模 式用于使所述待编码视频图像和解码端得到重建视频图像的失真最小和使所
述待编码视频图像所需要的编码比特数最小;
使用所述最优变换模式对所述待编码视频图像的残差数据块进行变换操 作;
将所述最优变换模式的索引编入码流;
本发明实施例提供一种变换模式的解码方法, 包括:
获取待解码图像的变换系数块所对应预测数据块的预测模式;
根据所述预测模式,根据候选变换模式集与所述预测模式的对应关系, 确 定筒化的候选变换模式集;
解析码流获得最优变换模式的索引;
使用所述最优变换模式对待解码图像的变换系数块进行反变换操作; 本发明实施例提供一种变换模式的编码装置, 包括:
第二获取单元,用于获取所述待编码视频图像的残差数据块所对应预测数 据块的预测模式;
第二判断单元, 用于根据所述预测模式,根据候选变换模式集与所述预测 模式的对应关系, 确定筒化的候选变换模式集;
第二选择单元, 从所述筒化的候选变换模式集中择优选择最优变换模式, 所述最优变换模式用于使所述待编码视频图像和解码端得到重建视频图像的 失真最小和使所述待编码视频图像所需要的编码比特数最小;
第二编码单元, 用于将所述最优变换模式的索引编入码流;
第二处理单元,用于使用所述最优变换模式对所述待编码视频图像的残差 数据块进行变换操作;
本发明实施例提供一种变换模式的解码装置, 包括:
第五获取单元,用于获取待解码图像的变换系数块所对应预测数据块的预 测模式;
第五判断单元, 用于根据所述预测模式,根据候选变换模式集与所述预测 模式的对应关系, 确定筒化的候选变换模式集;
第五解码单元, 用于解析码流获得最优变换模式的索引;
第五处理单元,用于使用所述变换模式对待解码图像的变换系数块进行反 变换操作;
本发明实施例提供一种变换模式的编码方法, 包括:
获取所述待编码视频图像的残差数据块所对应预测数据块的预测模式; 从候选变换模式集中择优选择最优变换模式,所述最优变换模式用于使所 述待编码视频图像和解码端得到重建视频图像的失真最小和使所述待编码视 频图像所需要的编码比特数最小;
判断所述最优变换模式是否为与预测模式存在对应关系的模式; 将所述判断结果写入码流;
如果所述判断为否, 则将所述最优变换模式的索引编入码流;
使用所述最优变换模式对所述待编码视频图像的残差数据块进行变换操 作;
本发明实施例提供一种变换模式的解码方法, 包括:
获取待解码图像的变换系数块所对应预测数据块的预测模式;
解析码流获得最优变换模式是否为与预测模式存在对应关系的模式的判 断结果;
如果所述判断结果为否, 则解析码流获得最优变换模式的索引; 使用所述最优变换模式对待解码图像的变换系数块进行反变换操作; 本发明实施例提供一种变换模式的编码装置, 包括:
第三获取单元,用于获取所述待编码视频图像的残差数据块所对应预测数 据块的预测模式;
第三选择单元,从候选变换模式集中择优选择最优变换模式, 所述最优变 换模式用于使所述待编码视频图像和解码端得到重建视频图像的失真最小和 使所述待编码视频图像所需要的编码比特数最小;
第三判断单元,用于判断所述最优变换模式是否为与预测模式存在对应关 系的模式;
第三编码单元, 用于将所述判断结果及所述最优变换模式的索引编入码 流;
第三处理单元,用于使用所述最优变换模式对所述待编码视频图像的残差 数据块进行变换操作;
本发明实施例提供一种变换模式的解码装置, 包括:
第六获取单元,用于获取待解码图像的变换系数块所对应预测数据块的预 测模式;
第六判断单元,用于确定候选变换模式集中与所述预测模式对应的变换模 式;
第六解码单元,用于解析码流获得最优变换模式是否为与预测模式存在对 应关系的模式的判断结果以及最优变换模式的索引;
第六处理单元,用于使用所述变换模式对待解码图像的变换系数块进行反 变换操作; 本发明实施例通过上述技术方案,利用所述预测模式与所述变化模式之间 的相关性, 通过对最优变换模式候选集的筒化, 在将其编入编码头信息时, 会 节省资源; 另外, 在编码端进行选择的时候, 编码效率也更高。
附图说明
为了更清楚地说明本发明实施例的技术方案,下面将对实施例描述中所需 要使用的附图作筒单地介绍,显而易见地, 下面描述中的附图仅仅是本发明的 一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下, 还可以根据这些附图获得其他的附图。
图 1A为本发明实施例正方块变换所对应的所述待编码视频图像的残差数 据块、 待解码图像的变换系数块形状示意图;
图 1B为本发明实施例横向长方块变换所对应的所述待编码视频图像的残 差数据块、 待解码图像的变换系数块形状示意图;
图 1C为本发明实施例纵向长方块变换所对应的所述待编码视频图像的残 差数据块、 待解码图像的变换系数块形状示意图;
图 2为本发明实施例方法流程示意图;
图 3为本发明实施例方法流程示意图;
图 4为本发明实施例装置结构示意图;
图 5为本发明实施例装置结构示意图;
图 6为本发明实施例方法流程示意图;
图 7为本发明实施例方法流程示意图;
图 8为本发明实施例装置结构示意图;
图 9为本发明实施例装置结构示意图;
图 10为本发明实施例方法流程示意图;
图 11为本发明实施例方法流程示意图;
图 12为本发明实施例装置结构示意图;
图 13为本发明实施例装置结构示意图;
图 14为本发明实施例方法流程示意图;
图 15为本发明实施例方法流程示意图;
图 16为本发明实施例装置结构示意图;
图 17为本发明实施例装置结构示意图;
图 18为本发明实施例方法流程示意图;
图 19为本发明实施例方法流程示意图;
图 20为本发明实施例装置结构示意图;
图 21为本发明实施例装置结构示意图;
具体实施方式
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清 楚、 完整地描述, 显然, 所描述的实施例仅仅是本发明一部分实施例, 而不是 全部的实施例。基于本发明中的实施例, 本领域普通技术人员在没有作出创造 性劳动前提下所获得的所有其他实施例, 都属于本发明保护的范围。
本发明实施例的编码端在编码过程中,对于每一待编码块,从各种编码类 型中根据率失真准则选择最优的编码类型, 同时得到预测信息, 由预测信息及 已编码的重构帧信息,得到待编码块的预测值,对预测值和待编码块的像素值 做差, 得到残差值, 对残差值依次进行变换、 量化、 扫描、 熵编码操作, 编入 码流, 同时将预测信息编入码流, 完成编码过程。 以下对编码和解码过程中的 扫描进行具体说明。本发明实施例提到的变换可以是离散余弦变换,也可以是 多变换技术, 对此本发明实施例不予限定。 举例方案一、 以下对在编码端执行的变换模式选择环节进行具体说明,如 图 2所示, 包括:
101: 获取所述待编码视频图像的残差数据块所对应预测数据块的预测模 式, 更具体的, 获取所述待编码视频图像的残差数据块所对应预测数据块的帧
内预测模式;
102: 从候选变换模式集中选择与所述预测模式对应的变换模式, 更具体 的, 按照 "如果所述预测模式为帧内预测模式, 则如果所述预测模式的预测像 素中超过设定数量的像素编码单元上、右上边界时, 选择横向长方块变换作为 所述预测模式的对应变换类型;如果所述预测模式的预测像素中超过设定数量 的像素编码单元左、左下边界时, 选择纵向长方块变换作为所述预测模式的对 应变换类型; 否则, 选择正方块变换作为所述预测模式的对应变换类型" 的原 贝 确定预测模式与变换模式之间的对应关系, 比如, 水平预测模式选择纵向 长方块变换作为所述预测模式的对应变换类型,竖直预测模式选择横向长方块 变换作为所述预测模式的对应变换类型, 具体对应关系在所述原则下, 不做具 体限定; 所述预测像素中超过设定数量的像素中所述数量, 可以为全部, 或者 一半, 或者三分之二, 不做具体限定;
103: 使用所述变换模式对所述待编码视频图像的残差数据块进行变换操 作;
对应的, 本发明实施例还提供了在解码端执行的变换模式选择环节,如图
3所示, 包括:
201 : 获取待解码图像的变换系数块所对应预测数据块的预测模式, 更具 体的, 获取待解码图像的变换系数块所对应预测数据块的帧内预测模式;
202: 按照与 102相同的规则,从候选变换模式集中选择与所述预测模式对 应的变换模式;
203: 使用所述变换模式对待解码图像的变换系数块进行反变换操作; 一种变换模式的编码装置, 如图 4所示, 包括:
第一获取单元 301 , 用于获取所述待编码视频图像的残差数据块所对应预 测数据块的预测模式;
第一选择单元 302, 用于从候选变换模式集中选择与所述预测模式对应的 变换模式;
第一处理单元 303 , 用于使用所述变换模式对所述待编码视频图像的残差 数据块进行变换操作;
一种变换模式的解码装置, 如图 5所示, 包括:
第四获取单元 401 , 用于获取待解码图像的变换系数块所对应预测数据块
的预测模式;
第四选择单元 402, 用于从候选变换模式集中选择与所述预测模式对应的 变换模式;
第四处理单元 403 , 用于使用所述变换模式对待解码图像的变换系数块进 行反变换操作;
举例方案二、 以下对在编码端执行的变换模式选择环节进行具体说明,如 图 6所示, 包括:
501 : 获取所述待编码视频图像的残差数据块所对应预测数据块的预测模 式, 更具体的, 获取所述待编码视频图像的残差数据块所对应预测数据块的帧 内预测模式;
502: 根据所述预测模式, 根据候选变换模式集与所述预测模式的对应关 系, 确定筒化的候选变换模式集, 更具体的, 按照 "如果所述预测模式的预测 像素中超过设定数量的像素编码单元上、右上边界时, 则所述候选变换模式为 横向长方块变换和正方形块变换;如果所述预测模式的预测像素中超过设定数 量的像素编码单元左、左下边界时, 则所述候选变换模式为纵向长方块变换和 正方形块变换; 否则, 述候选变换模式为正方形块变换" 的原则, 确定筒化候 选变换模式集, 比如, 水平预测模式选择纵向长方块变换作为所述预测模式的 对应变换类型和正方块变换,竖直预测模式选择横向长方块变换作为所述预测 模式的对应变换类型和正方块变换, 具体对应关系在所述原则下, 不做具体限 定;所述预测像素中超过设定数量的像素中所述数量,可以为全部,或者一半, 或者三分之二, 不做具体限定;
503: 从所述筒化的候选变换模式集中择优选择最优变换模式, 所述最优 变换模式用于使所述待编码视频图像和解码端得到重建视频图像的失真最小 和使所述待编码视频图像所需要的编码比特数最小,可以使用率失真优化的方 法等, 具体方法不做限定;
504: 使用所述变换模式对所述待编码视频图像的残差数据块进行变换操 作;
505: 将所述最优变换模式的索引编入码流, 更具体的, 当候选变换模式 为横向长方块和正方块时, 用 1标志位表示, 当候选变换模式为纵向长方块和 正方块时, 用 1标志位表示, 当候选变换模式为正方块时, 无需用标志位表示;
步骤 504和步骤 505没有顺序关系;
对应的, 本发明实施例还提供了在解码端执行的变换模式选择环节,如图 7所示, 包括:
601 : 获取待解码图像的变换系数块所对应预测数据块的预测模式, 更具 体的, 获取待解码图像的变换系数块所对应预测数据块的帧内预测模式;
602: 按照与 502相同的规则, 根据所述预测模式, 根据候选变换模式集与 所述预测模式的对应关系, 确定筒化的候选变换模式集;
603: 解析码流获得最优变换模式的索引, 更具体的, 与 503相对应, 当候 选变换模式为横向长方块和正方块时, 解析 1标志位获得, 当候选变换模式为 纵向长方块和正方块时, 解析 1标志位获得, 特别的, 当候选变换模式为正方 块时, 无需解析标志位;
604:使用所述最优变换模式对待解码图像的变换系数块进行反变换操作; 一种变换模式的编码装置, 如图 8所示, 包括:
第二获取单元 701 , 用于获取所述待编码视频图像的残差数据块所对应预 测数据块的预测模式;
第二判断单元 702, 用于根据所述预测模式, 根据候选变换模式集与所述 预测模式的对应关系, 确定筒化的候选变换模式集;
第二选择单元 703 , 从所述筒化的候选变换模式集中择优选择最优变换模 式,所述最优变换模式用于使所述待编码视频图像和解码端得到重建视频图像 的失真最小和使所述待编码视频图像所需要的编码比特数最小;
第二编码单元 704, 用于将所述最优变换模式的索引编入码流;
第二处理单元 705 , 用于使用所述最优变换模式对所述待编码视频图像的 残差数据块进行变换操作;
一种变换模式的解码装置, 如图 9所示, 包括:
第五获取单元 801 , 用于获取待解码图像的变换系数块所对应预测数据块 的预测模式;
第五判断单元 802, 用于根据所述预测模式, 根据候选变换模式集与所述 预测模式的对应关系, 确定筒化的候选变换模式集;
第五解码单元 803 , 用于解析码流获得最优变换模式的索引;
第五处理单元 804, 用于使用所述变换模式对待解码图像的变换系数块进
行反变换操作; 举例方案三、以下对在编码端执行的变换模式选择环节进行具体说明,如 图 10所示, 包括:
901 : 获取所述待编码视频图像的残差数据块所对应预测数据块的预测模 式, 更具体的, 获取所述待编码视频图像的残差数据块所对应预测数据块的帧 内预测模式;
902: 根据所述预测模式, 根据候选变换模式集与所述预测模式的对应关 系, 确定筒化的候选变换模式集, 更具体的, 按照 "如果所述预测模式的预测 像素中超过设定数量的像素编码单元上、右上边界时, 则所述候选变换模式为 横向长方块变换和正方形块变换;如果所述预测模式的预测像素中超过设定数 量的像素编码单元左、左下边界时, 则所述候选变换模式为纵向长方块变换和 正方形块变换; 否则, 述候选变换模式为横向长方块变换、 纵向长方块变换、 正方形块变换" 的原则, 确定筒化候选变换模式集, 比如, 水平预测模式选择 纵向长方块变换作为所述预测模式的对应变换类型和正方块变换,竖直预测模 式选择横向长方块变换作为所述预测模式的对应变换类型和正方块变换,具体 对应关系在所述原则下, 不做具体限定; 所述预测像素中超过设定数量的像素 中所述数量, 可以为全部, 或者一半, 或者三分之二, 不做具体限定;
903: 从所述筒化的候选变换模式集中择优选择最优变换模式, 所述最优 变换模式用于使所述待编码视频图像和解码端得到重建视频图像的失真最小 和使所述待编码视频图像所需要的编码比特数最小,可以使用率失真优化的方 法等, 具体方法不做限定;
904: 使用所述变换模式对所述待编码视频图像的残差数据块进行变换操 作;
905: 将所述最优变换模式的索引编入码流, 更具体的, 当候选变换模式 为横向长方块和正方块时, 用 1标志位表示, 当候选变换模式为纵向长方块和 正方块时, 用 1标志位表示, 当候选变换模式为横向长方块、 纵向长方块、 正 方块时, 需用 1标志位表示是否为正方块, 如果不是正方块, 则再用 1标志位表 示为横向长方块还是纵向长方块; 步骤 904和步骤 905没有顺序关系;
对应的, 本发明实施例还提供了在解码端执行的变换模式选择环节,如图
11所示, 包括:
1001: 获取待解码图像的变换系数块所对应预测数据块的预测模式, 更具 体的, 获取待解码图像的变换系数块所对应预测数据块的帧内预测模式;
1002: 按照与 902相同的规则, 根据所述预测模式, 根据候选变换模式集 与所述预测模式的对应关系, 确定筒化的候选变换模式集;
1003: 解析码流获得最优变换模式的索引, 更具体的, 与 903相对应, 当 候选变换模式为横向长方块和正方块时, 解析 1标志位获得, 当候选变换模式 为纵向长方块和正方块时,解析 1标志位获得, 当候选变换模式为横向长方块、 纵向长方块、 正方块时, 解析 1标志位获得是否为正方块, 如果不是正方块, 则再解析 1标志位获得为横向长方块还是纵向长方块;
1004: 使用所述最优变换模式对待解码图像的变换系数块进行反变换操 作;
一种变换模式的编码装置, 如图 12所示, 包括:
第二获取单元 1101 ,用于获取所述待编码视频图像的残差数据块所对应预 测数据块的预测模式;
第二判断单元 1102, 用于根据所述预测模式,根据候选变换模式集与所述 预测模式的对应关系, 确定筒化的候选变换模式集;
第二选择单元 1103 ,从所述筒化的候选变换模式集中择优选择最优变换模 式,所述最优变换模式用于使所述待编码视频图像和解码端得到重建视频图像 的失真最小和使所述待编码视频图像所需要的编码比特数最小;
第二编码单元 1104, 用于将所述最优变换模式的索引编入码流;
第二处理单元 1105 ,用于使用所述最优变换模式对所述待编码视频图像的 残差数据块进行变换操作;
一种变换模式的解码装置, 如图 13所示, 包括:
第五获取单元 1201 ,用于获取待解码图像的变换系数块所对应预测数据块 的预测模式;
第五判断单元 1202, 用于根据所述预测模式,根据候选变换模式集与所述 预测模式的对应关系, 确定筒化的候选变换模式集;
第五解码单元 1203, 用于解析码流获得最优变换模式的索引;
第五处理单元 1204,用于使用所述变换模式对待解码图像的变换系数块进 行反变换操作; 举例方案四、以下对在编码端执行的变换模式选择环节进行具体说明,如 图 14所示, 包括:
1301 :获取所述待编码视频图像的残差数据块所对应预测数据块的预测模 式, 更具体的, 获取所述待编码视频图像的残差数据块所对应预测数据块的帧 内预测模式;
1302: 从候选变换模式集中择优选择最优变换模式, 所述最优变换模式用 于使所述待编码视频图像和解码端得到重建视频图像的失真最小和使所述待 编码视频图像所需要的编码比特数最小, 可以使用率失真优化的方法等, 具体 方法不做限定;
1303: 按照 "如果所述预测模式的预测像素中超过设定数量的像素编码单 元上、右上边界时, 则所述候选变换模式选择横向长方块变换作为所述预测模 式的对应变换类型;如果所述预测模式的预测像素中超过设定数量的像素编码 单元左、左下边界时, 则所述候选变换模式选择纵向长方块变换作为所述预测 模式的对应变换类型; 否则, 所述候选变换模式对应正方形块变换" 的原则, 判断所述最优变换模式是否为与预测模式存在对应关系的模式, 比如, 水平预 测模式选择纵向长方块变换作为所述预测模式的对应变换类型,竖直预测模式 选择横向长方块变换作为所述预测模式的对应变换类型,具体对应关系在所述 原则下, 不做具体限定; 所述预测像素中超过设定数量的像素中所述数量, 可 以为全部, 或者一半, 或者三分之二, 不做具体限定;
1304: 将判断结果用 1标志位编入码流;
1305: 如果所述判断为否, 则将所述最优变换模式的索引编入码流, 更具 体的, 用 1标志位表示;
1306:使用所述变换模式对所述待编码视频图像的残差数据块进行变换操 作; 步骤 1304、 1305和步骤 1306之间没有顺序关系; 对应的, 本发明实施例还提供了在解码端执行的变换模式选择环节,如图 15所示, 包括:
1401 : 获取待解码图像的变换系数块所对应预测数据块的预测模式, 更具 体的, 获取待解码图像的变换系数块所对应预测数据块的帧内预测模式;
1402:按照与 1303相同的规则,确定与预测模式存在对应关系的变换模式; 1403: 与 1304对应, 解析码流 1标志位, 获得最优变换模式是否为与预测 模式存在对应关系的模式的判断结果;
1404: 与 1305对应, 如果所述判断结果为否, 则解析码流 1标志位, 获得 最优变换模式的索引;
1405: 使用所述最优变换模式对待解码图像的变换系数块进行反变换操 作;
一种变换模式的编码装置, 如图 16所示, 包括:
第三获取单元 1501 ,用于获取所述待编码视频图像的残差数据块所对应预 测数据块的预测模式;
第三选择单元 1502,从候选变换模式集中择优选择最优变换模式, 所述最 优变换模式用于使所述待编码视频图像和解码端得到重建视频图像的失真最 小和使所述待编码视频图像所需要的编码比特数最小;
第三判断单元 1503 ,用于判断所述最优变换模式是否为与预测模式存在对 应关系的模式;
第三编码单元 1504,用于将所述判断结果及所述最优变换模式的索引编入 码流;
第三处理单元 1505 ,用于使用所述最优变换模式对所述待编码视频图像的 残差数据块进行变换操作;
一种变换模式的解码装置, 如图 17所示, 包括:
第六获取单元 1601 ,用于获取待解码图像的变换系数块所对应预测数据块 的预测模式;
第六判断单元 1602,用于确定候选变换模式集中与所述预测模式对应的变 换模式;
第六解码单元 1603 ,用于解析码流获得最优变换模式是否为与预测模式存 在对应关系的模式的判断结果以及最优变换模式的索引;
第六处理单元 1604 ,用于使用所述变换模式对待解码图像的变换系数块进 行反变换操作;
举例方案五、以下对在编码端执行的变换模式选择环节进行具体说明,如 图 18所示, 包括:
1701 :获取所述待编码视频图像的残差数据块所对应预测数据块的预测模 式, 更具体的, 获取所述待编码视频图像的残差数据块所对应预测数据块的帧 内预测模式;
1702: 从候选变换模式集中择优选择最优变换模式, 所述最优变换模式用 于使所述待编码视频图像和解码端得到重建视频图像的失真最小和使所述待 编码视频图像所需要的编码比特数最小, 可以使用率失真优化的方法等, 具体 方法不做限定;
1703: 按照 "如果所述预测模式的预测像素中超过设定数量的像素编码单 元上、右上边界时, 则所述候选变换模式选择横向长方块变换作为所述预测模 式的对应变换类型;如果所述预测模式的预测像素中超过设定数量的像素编码 单元左、左下边界时, 则所述候选变换模式选择纵向长方块变换作为所述预测 模式的对应变换类型;否则,所述最优候选变换模式为正方形块变换"的原则, 判断所述最优变换模式是否为与预测模式存在对应关系的模式, 比如, 水平预 测模式选择纵向长方块变换作为所述预测模式的对应变换类型,竖直预测模式 选择横向长方块变换作为所述预测模式的对应变换类型,具体对应关系在所述 原则下, 不做具体限定; 所述预测像素中超过设定数量的像素中所述数量, 可 以为全部, 或者一半, 或者三分之二, 不做具体限定;
1704: 将判断结果用 1标志位编入码流, 特别的, 当所述对应关系为仅对 应正方块时, 无需编码标志位;
1705: 如果所述判断为否, 则将所述最优变换模式的索引编入码流, 更具 体的, 用 1标志位表示;
1706:使用所述变换模式对所述待编码视频图像的残差数据块进行变换操 作; 步骤 1704、 1705和步骤 1706之间没有顺序关系;
对应的, 本发明实施例还提供了在解码端执行的变换模式选择环节,如图 19所示, 包括:
1801 : 获取待解码图像的变换系数块所对应预测数据块的预测模式, 更具 体的, 获取待解码图像的变换系数块所对应预测数据块的帧内预测模式;
1802:按照与 1703相同的规则,确定与预测模式存在对应关系的变换模式; 1803: 与 1704对应, 解析码流 1标志位, 获得最优变换模式是否为与预测 模式存在对应关系的模式的判断结果, 特别的, 当所述对应关系为仅对应正方 块时, 无需解析标志位;
1804: 与 1705对应, 如果所述判断结果为否, 则解析码流 1标志位, 获得 最优变换模式的索引;
1805: 使用所述最优变换模式对待解码图像的变换系数块进行反变换操 作;
一种变换模式的编码装置, 如图 20所示, 包括:
第三获取单元 1901 ,用于获取所述待编码视频图像的残差数据块所对应预 测数据块的预测模式;
第三选择单元 1902,从候选变换模式集中择优选择最优变换模式, 所述最 优变换模式用于使所述待编码视频图像和解码端得到重建视频图像的失真最 小和使所述待编码视频图像所需要的编码比特数最小;
第三判断单元 1903 ,用于判断所述最优变换模式是否为与预测模式存在对 应关系的模式;
第三编码单元 1904,用于将所述判断结果及所述最优变换模式的索引编入 码流;
第三处理单元 1905 ,用于使用所述最优变换模式对所述待编码视频图像的 残差数据块进行变换操作;
一种变换模式的解码装置, 如图 21所示, 包括:
第六获取单元 2001 ,用于获取待解码图像的变换系数块所对应预测数据块 的预测模式;
第六判断单元 2002 ,用于确定候选变换模式集中与所述预测模式对应的变 换模式;
第六解码单元 2003 ,用于解析码流获得最优变换模式是否为与预测模式存 在对应关系的模式的判断结果以及最优变换模式的索引;
第六处理单元 2004 ,用于使用所述变换模式对待解码图像的变换系数块进 行反变换操作;
在上述各不同实施例中均利用了预测信息与变换模式信息的相关性,由于 该相关性的存在, 一些变换模式候选集中的冗余候选可以被剔出,各实施例从 不同的角度, 筒化了变换模式候选集, 在编码端提高了编码效率, 节省了编码 时间和资源开销, 同时由于候选模式数量的减少, 可以用更少的编码比特来表 示候选模式的选择信息, 减少了头信息, 提高了编码性能。 本发明实施例提供的方法可以应用在数字信号处理领域中,通过视频编码 器,解码器实现。视频编码器,解码器广泛应用于各种通讯设备或电子设备中, 例如: 媒体网关, 移动电话, 无线装置, 个人数据助理(PDA ), 手持式或便 携式计算机, GPS接收机 /导航器, 照相机, 视频播放器, 摄像机, 录像机, 监 控设备等等。 这类设备中包括处理器, 存储器, 以及传输数据的接口。 视频编 解码器可以直接由数字电路或芯片例如 DSP ( digital signal processor )实现; 或 者由软件代码驱动一处理器执行软件代码中的流程而实现。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分步骤 是可以通过程序来指令相关的硬件完成,上述的程序可以存储于一种计算机可 读存储介质中, 上述提到的存储介质可以是只读存储器, 磁盘或光盘等。
以上对本发明实施例所提供的一种待解码图像的变换系数块的扫描方 法、装置和系统进行了详细介绍, 本文中应用了具体个例对本发明的原理及实 施方式进行了阐述,以上实施例的说明只是用于帮助理解本发明的方法及其核 心思想; 同时, 对于本领域的一般技术人员, 依据本发明的思想, 在具体实施 方式及应用范围上均会有改变之处, 综上, 本说明书内容不应理解为对本发明 的限制。
Claims
1、 一种变换模式的编码方法, 其特征在于, 包括:
获取所述待编码视频图像的残差数据块所对应预测数据块的预测模式; 从候选变换模式集中选择与所述预测模式对应的变换模式;
使用所述变换模式对所述待编码视频图像的残差数据块进行变换操作;
2、 一种变换模式的编码方法, 其特征在于, 包括:
获取所述待编码视频图像的残差数据块所对应预测数据块的预测模式; 根据所述预测模式,根据候选变换模式集与所述预测模式的对应关系, 确 定筒化的候选变换模式集;
从所述筒化的候选变换模式集中择优选择最优变换模式,所述最优变换模 式用于使所述待编码视频图像和解码端得到重建视频图像的失真最小和使所 述待编码视频图像所需要的编码比特数最小;
使用所述最优变换模式对所述待编码视频图像的残差数据块进行变换操 作;
将所述最优变换模式的索引编入码流;
3、 一种变换模式的编码方法, 其特征在于, 包括:
获取所述待编码视频图像的残差数据块所对应预测数据块的预测模式; 从候选变换模式集中择优选择最优变换模式,所述最优变换模式用于使所 述待编码视频图像和解码端得到重建视频图像的失真最小和使所述待编码视 频图像所需要的编码比特数最小;
判断所述最优变换模式是否为与预测模式存在对应关系的模式; 将所述判断结果写入码流;
如果所述判断为否, 则将所述最优变换模式的索引编入码流;
使用所述最优变换模式对所述待编码视频图像的残差数据块进行变换操 作;
4、 根据权利要求 1、 2、 3所述方法, 其特征在于, 所述待编码视频图像的 残差数据块所对应预测数据块的预测模式, 包括:
帧内预测中的帧内预测模式; 或者,
帧间预测中的帧间预测单元分割模式; 或者,
帧内预测中的帧内预测单元分割模式; 或者, 所述待编码视频图像的残差数据块时域或空域的待解码图像的变换系数 块的变换模式;
5、 根据权利要求 1、 2、 3所述方法, 其特征在于, 所述候选变换模式集, 包括:
方块形变换, 横向长方形变换, 纵向长方形变换; 或者,
反映无纹理及不规则纹理的变换,反映横向纹理的变换,反映纵向纹理的 变换; 或者,
反映无纹理的变换, 反映不规则纹理的变换, 反映横向纹理的变换, 反映 纵向纹理的变换;
6、 根据权利要求 1、 2、 3所述方法, 其特征在于, 所述候选变换模式集与 所述预测模式的对应关系, 包括:
如果所述预测模式为帧内预测模式,则如果所述预测模式的预测像素中超 过设定数量的像素编码单元上、右上边界时, 选择横向长方块变换作为所述预 测模式的对应变换类型;如果所述预测模式的预测像素中超过设定数量的像素 编码单元左、左下边界时, 选择纵向长方块变换作为所述预测模式的对应变换 类型; 否则, 选择正方块变换作为所述预测模式的对应变换类型; 或者, 如果所述预测模式为帧内预测模式,则如果所述预测模式的预测像素中超 过设定数量的像素编码单元上、右上边界时, 选择非纵向长方块变换作为所述 预测模式的对应变换类型;如果所述预测模式的预测像素中超过设定数量的像 素编码单元左、左下边界时,选择非横向长方块变换作为所述预测模式的对应 变换类型; 否则,选择所有变换类型中预置的变换类型作为所述预测模式的对 应变换类型; 或者,
如果预测信息表征竖直纹理,选择横向长方块变换作为所述预测模式的对 应变换类型; 如果预测信息表征水平纹理,选择纵向长方块变换作为所述预测 模式的对应变换类型; 如果预测信息表征无纹理或者不规则纹理, 则, 选择正 方块变换作为所述预测模式的对应变换类型; 或者,
如果预测信息表征竖直纹理,选择非纵向长方块变换作为所述预测模式的 对应变换类型; 如果预测信息表征水平纹理,选择非横向长方块变换作为所述 预测模式的对应变换类型; 如果预测信息表征无纹理或者不规则纹理, 则, 对 应所有类型变换; 或者, 如如果果预预测测信信息息表表征征横横向向或或非非纵纵向向长长方方块块变变换换,,选选择择横横向向长长方方块块变变换换作作为为所所 述述预预测测模模式式的的对对应应变变换换类类型型;; 如如果果预预测测信信息息表表征征纵纵向向或或非非横横向向长长方方块块变变换换,,选选 择择纵纵向向长长方方块块变变换换作作为为所所述述预预测测模模式式的的对对应应变变换换类类型型;;如如果果预预测测信信息息表表征征正正方方 块块变变换换,, 则则,, 选选择择正正方方块块变变换换作作为为所所述述预预测测模模式式的的对对应应变变换换类类型型;; 或或者者,,
55 如如果果预预测测信信息息表表征征横横向向或或非非纵纵向向长长方方块块变变换换,,选选择择非非纵纵向向长长方方块块变变换换作作为为 所所述述预预测测模模式式的的对对应应变变换换类类型型;; 如如果果预预测测信信息息表表征征纵纵向向或或非非横横向向长长方方块块变变换换,, 选选择择非非横横向向长长方方块块变变换换作作为为所所述述预预测测模模式式的的对对应应变变换换类类型型;;如如果果预预测测信信息息表表征征 正正方方块块变变换换,, 则则,, 对对应应所所有有类类型型变变换换;;
77、、 根根据据权权利利要要求求 22所所述述方方法法,, 其其特特征征在在于于,, 所所述述根根据据所所述述预预测测模模式式,, 根根据据 1100 候候选选变变换换模模式式集集与与所所述述预预测测模模式式的的对对应应关关系系,,确确定定筒筒化化的的候候选选变变换换模模式式集集,, 包包 括括::
所所述述筒筒化化的的候候选选变变换换模模式式集集为为与与所所述述预预测测模模式式存存在在所所述述对对应应关关系系的的候候选选 变变换换模模式式的的集集合合;;
88、、根根据据所所述述权权利利要要求求 77所所述述方方法法,, 其其特特征征在在于于,, 所所述述候候选选变变换换模模式式集集的的筒筒 1155 化化方方法法,, 包包括括::
如如果果所所述述预预测测模模式式的的预预测测像像素素中中超超过过设设定定数数量量的的像像素素编编码码单单元元上上、、右右上上边边 界界时时,, 则则所所述述候候选选变变换换模模式式为为横横向向长长方方块块变变换换和和正正方方形形块块变变换换;; 如如果果所所述述预预测测 模模式式的的预预测测像像素素中中超超过过设设定定数数量量的的像像素素编编码码单单元元左左、、左左下下边边界界时时,, 则则所所述述候候选选 变变换换模模式式为为纵纵向向长长方方块块变变换换和和正正方方形形块块变变换换;; 否否则则,, 述述候候选选变变换换模模式式为为正正方方形形
2200 块块变变换换;; 或或者者,,
如如果果所所述述预预测测模模式式的的预预测测像像素素中中超超过过设设定定数数量量的的像像素素编编码码单单元元上上、、右右上上边边 界界时时,, 则则所所述述候候选选变变换换模模式式为为横横向向长长方方块块变变换换和和正正方方形形块块变变换换;; 如如果果所所述述预预测测 模模式式的的预预测测像像素素中中超超过过设设定定数数量量的的像像素素编编码码单单元元左左、、左左下下边边界界时时,, 则则所所述述候候选选 变变换换模模式式为为纵纵向向长长方方块块变变换换和和正正方方形形块块变变换换;; 否否则则,, 述述候候选选变变换换模模式式为为横横向向长长
2255 方方块块变变换换、、 纵纵向向长长方方块块变变换换、、 正正方方形形块块变变换换;;
99、、 根根据据所所述述权权利利要要求求 22、、 33所所述述方方法法,, 其其特特征征在在于于,, 所所述述从从所所述述筒筒化化的的候候 选选变变换换模模式式集集;; 或或者者,, 所所述述候候选选变变换换模模式式集集中中择择优优选选择择最最优优变变换换模模式式,, 所所述述最最 优优变变换换模模式式用用于于使使所所述述待待编编码码视视频频图图像像和和解解码码端端得得到到重重建建视视频频图图像像的的失失真真最最 小小和和使使所所述述待待编编码码视视频频图图像像所所需需要要的的编编码码比比特特数数最最小小的的方方法法,, 包包括括::
3300 * 使用筒化的编码代价比较方法, 仅计算编码比特或仅计算失真; 或者, 使用编解码端的协议;
10、 根据所述权利要求 2所述方法, 其特征在于, 将所述最优变换模式的 索引编入码流, 包括:
当所述候选变换模式集合包括横向长方块和正方块时,在所述码流中, 用 第一标志位表示所述最优变换模式是横向长方块还是纵向长方块;
当所述候选变换模式集合包括纵向长方块和正方块时,在所述码流中, 用 第一标志位表示所述最优变换模式是横向长方块还是纵向长方块;
当所述候选变换模式集合包括横向长方块、纵向长方块和正方块时,在所 述码流中, 用第一标志位表示是否所述最优变换模式是正方块变换,如果第一 标志位为否, 则在所述码流中, 用第二标志位表示所述最优变换模式是横向长 方块还是纵向长方块;
11、 根据所述权利要求 3所述的方法, 其特征在于, 将所述最优变换模式 的判断结果及索引编入码流, 包括:
在所述码流中,用第三标志位表示所述最优变换模式是否为与所述预测模 式具有所述对应关系的变换模式, 如果第三标志位为否, 则在所述码流中, 用 第四标志位表示所述最优变换模式是所述候选变换集合中剩余两个变换模式 之一;
12、 一种变换模式的解码方法, 其特征在于, 包括:
获取待解码图像的变换系数块所对应预测数据块的预测模式;
从候选变换模式集中选择与所述预测模式对应的变换模式;
使用所述变换模式对待解码图像的变换系数块进行反变换操作;
13、 一种变换模式的解码方法, 其特征在于, 包括:
获取待解码图像的变换系数块所对应预测数据块的预测模式;
根据所述预测模式,根据候选变换模式集与所述预测模式的对应关系, 确 定筒化的候选变换模式集;
解析码流获得最优变换模式的索引;
使用所述索引对应的最优变换模式对待解码图像的变换系数块进行反变 换操作;
14、 一种变换模式的解码方法, 其特征在于, 包括: 获取待解码图像的变换系数块所对应预测数据块的预测模式; 解析码流获得最优变换模式是否为与预测模式存在对应关系的模式的判 断结果;
如果所述判断结果为否, 则解析码流获得最优变换模式的索引; 使用所述索引对应的最优变换模式对待解码图像的变换系数块进行反变 换操作;
15、 根据权利要求 12、 13、 14所述方法, 其特征在于, 所述待解码图像的 变换系数块所对应预测数据块的预测模式, 包括:
帧内预测中的帧内预测模式; 或者,
帧间预测中的帧间预测单元分割模式; 或者,
帧内预测中的帧内预测单元分割模式; 或者,
所述待解码图像的变换系数块时域或空域的待解码图像的变换系数块的 变换模式;
16、 根据权利要求 12、 13、 14所述方法, 其特征在于, 所述候选变换模式 集, 包括:
方块形变换, 横向长方形变换, 纵向长方形变换; 或者,
反映无纹理及不规则纹理的变换,反映横向纹理的变换,反映纵向纹理的 变换; 或者,
反映无纹理的变换, 反映不规则纹理的变换, 反映横向纹理的变换, 反映 纵向纹理的变换;
17、 根据权利要求 12、 13、 14所述方法, 其特征在于, 所述候选变换模式 集与所述预测模式的对应关系, 包括:
如果所述预测模式为帧内预测模式,则如果所述预测模式的预测像素中超 过设定数量的像素编码单元上、右上边界时, 选择横向长方块变换作为所述预 测模式的对应变换类型;如果所述预测模式的预测像素中超过设定数量的像素 编码单元左、左下边界时, 选择纵向长方块变换作为所述预测模式的对应变换 类型; 否则, 选择正方块变换作为所述预测模式的对应变换类型; 或者, 如果所述预测模式为帧内预测模式,则如果所述预测模式的预测像素中超 过设定数量的像素编码单元上、右上边界时, 选择非纵向长方块变换作为所述 预测模式的对应变换类型;如果所述预测模式的预测像素中超过设定数量的像 素编码单元左、左下边界时,选择非横向长方块变换作为所述预测模式的对应 变换类型; 否则,选择所有变换类型中预置的变换类型作为所述预测模式的对 应变换类型; 或者,
如果预测信息表征竖直纹理,选择横向长方块变换作为所述预测模式的对 应变换类型; 如果预测信息表征水平纹理,选择纵向长方块变换作为所述预测 模式的对应变换类型; 如果预测信息表征无纹理或者不规则纹理, 则, 选择正 方块变换作为所述预测模式的对应变换类型; 或者,
如果预测信息表征竖直纹理,选择非纵向长方块变换作为所述预测模式的 对应变换类型; 如果预测信息表征水平纹理,选择非横向长方块变换作为所述 预测模式的对应变换类型; 如果预测信息表征无纹理或者不规则纹理, 则, 对 应所有类型变换; 或者,
如果预测信息表征横向或非纵向长方块变换,选择横向长方块变换作为所 述预测模式的对应变换类型; 如果预测信息表征纵向或非横向长方块变换,选 择纵向长方块变换作为所述预测模式的对应变换类型;如果预测信息表征正方 块变换, 则, 选择正方块变换作为所述预测模式的对应变换类型; 或者, 如果预测信息表征横向或非纵向长方块变换,选择非纵向长方块变换作为 所述预测模式的对应变换类型; 如果预测信息表征纵向或非横向长方块变换, 选择非横向长方块变换作为所述预测模式的对应变换类型;如果预测信息表征 正方块变换, 则, 对应所有类型变换;
18、 根据权利要求 13所述方法, 其特征在于, 所述根据所述预测模式, 根 据候选变换模式集与所述预测模式的对应关系, 确定筒化的候选变换模式集, 包括:
所述筒化的候选变换模式集为与所述预测模式存在所述对应关系的候选 变换模式的集合;
19、根据所述权利要求 18所述方法, 其特征在于, 所述候选变换模式集的 筒化方法, 包括:
如果所述预测模式的预测像素中超过设定数量的像素编码单元上、右上边 界时, 则所述候选变换模式为横向长方块变换和正方形块变换; 如果所述预测 模式的预测像素中超过设定数量的像素编码单元左、左下边界时, 则所述候选 变换模式为纵向长方块变换和正方形块变换; 否则, 述候选变换模式为正方形 块变换; 或者,
如果所述预测模式的预测像素中超过设定数量的像素编码单元上、右上边 界时, 则所述候选变换模式为横向长方块变换和正方形块变换; 如果所述预测 模式的预测像素中超过设定数量的像素编码单元左、左下边界时, 则所述候选 变换模式为纵向长方块变换和正方形块变换; 否则, 述候选变换模式为横向长 方块变换、 纵向长方块变换、 正方形块变换;
20、根据所述权利要求 13所述方法, 其特征在于, 解析码流获得所述最优 变换模式的索引, 包括:
当所述候选变换模式集合包括横向长方块和正方块时,解析所述码流, 用 第五标志位表示所述最优变换模式是横向长方块还是纵向长方块;
当所述候选变换模式集合包括纵向长方块和正方块时,解析所述码流, 用 第五标志位表示所述最优变换模式是横向长方块还是纵向长方块;
当所述候选变换模式集合包括横向长方块、纵向长方块和正方块时,解析 所述码流, 用第五标志位表示是否所述最优变换模式是正方块变换,如果第五 标志位为否, 则解析所述码流, 用第六标志位表示所述最优变换模式是横向长 方块还是纵向长方块;
21、根据所述权利要求 14所述的方法, 其特征在于, 解析码流获得所述最 优变换模式的判断结果及索引, 包括:
解析所述码流,用第七标志位表示所述最优变换模式是否为与所述预测模 式具有所述对应关系的变换模式, 如果第七标志位为否, 则解析所述码流, 用 第八标志位表示所述最优变换模式是所述候选变换集合中剩余两个变换模式 之一;
22、 一种变换模式的编码装置, 其特征在于, 包括:
第一获取单元,用于获取所述待编码视频图像的残差数据块所对应预测数 据块的预测模式;
第一选择单元,用于从候选变换模式集中选择与所述预测模式对应的变换 模式;
第一处理单元,用于使用所述变换模式对所述待编码视频图像的残差数据 块进行变换操作;
23、 一种变换模式的编码装置, 其特征在于, 包括:
第二获取单元,用于获取所述待编码视频图像的残差数据块所对应预测数 据块的预测模式;
第二判断单元, 用于根据所述预测模式,根据候选变换模式集与所述预测 模式的对应关系, 确定筒化的候选变换模式集;
第二选择单元, 从所述筒化的候选变换模式集中择优选择最优变换模式, 所述最优变换模式用于使所述待编码视频图像和解码端得到重建视频图像的 失真最小和使所述待编码视频图像所需要的编码比特数最小;
第二编码单元, 用于将所述最优变换模式的索引编入码流;
第二处理单元,用于使用所述最优变换模式对所述待编码视频图像的残差 数据块进行变换操作;
24、 一种变换模式的编码装置, 其特征在于, 包括:
第三获取单元,用于获取所述待编码视频图像的残差数据块所对应预测数 据块的预测模式;
第三选择单元,从候选变换模式集中择优选择最优变换模式, 所述最优变 换模式用于使所述待编码视频图像和解码端得到重建视频图像的失真最小和 使所述待编码视频图像所需要的编码比特数最小;
第三判断单元,用于判断所述最优变换模式是否为与预测模式存在对应关 系的模式;
第三编码单元, 用于将所述判断结果及所述最优变换模式的索引编入码 流;
第三处理单元,用于使用所述最优变换模式对所述待编码视频图像的残差 数据块进行变换操作;
25、 一种变换模式的解码装置, 其特征在于, 包括:
第四获取单元,用于获取待解码图像的变换系数块所对应预测数据块的预 测模式;
第四选择单元,用于从候选变换模式集中选择与所述预测模式对应的变换 模式;
第四处理单元,用于使用所述变换模式对待解码图像的变换系数块进行反 变换操作;
26、 一种变换模式的解码装置, 其特征在于, 包括:
第五获取单元,用于获取待解码图像的变换系数块所对应预测数据块的预 测模式;
第五判断单元, 用于根据所述预测模式,根据候选变换模式集与所述预测 模式的对应关系, 确定筒化的候选变换模式集;
第五解码单元, 用于解析码流获得最优变换模式的索引;
第五处理单元,用于使用所述变换模式对待解码图像的变换系数块进行反 变换操作;
27、 一种变换模式的解码装置, 其特征在于, 包括:
第六获取单元,用于获取待解码图像的变换系数块所对应预测数据块的预 测模式;
第六判断单元,用于确定候选变换模式集中与所述预测模式对应的变换模 式;
第六解码单元,用于解析码流获得最优变换模式是否为与预测模式存在对 应关系的模式的判断结果以及最优变换模式的索引;
第六处理单元,用于使用所述变换模式对待解码图像的变换系数块进行反 变换操作。
Priority Applications (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| EP12844690.3A EP2768220A4 (en) | 2011-11-04 | 2012-11-05 | METHOD AND DEVICE FOR ENCODING AND DECODING BASED ON TRANSFORMATION MODE |
| US14/266,149 US9462274B2 (en) | 2011-11-04 | 2014-04-30 | Transformation mode encoding and decoding method and apparatus |
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201110346062.4A CN103096053B (zh) | 2011-11-04 | 2011-11-04 | 一种变换模式的编解码方法和装置 |
| CN201110346062.4 | 2011-11-04 |
Related Child Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| US14/266,149 Continuation US9462274B2 (en) | 2011-11-04 | 2014-04-30 | Transformation mode encoding and decoding method and apparatus |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2013064120A1 true WO2013064120A1 (zh) | 2013-05-10 |
Family
ID=48191379
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2012/084082 Ceased WO2013064120A1 (zh) | 2011-11-04 | 2012-11-05 | 一种变换模式的编解码方法和装置 |
Country Status (4)
| Country | Link |
|---|---|
| US (1) | US9462274B2 (zh) |
| EP (1) | EP2768220A4 (zh) |
| CN (1) | CN103096053B (zh) |
| WO (1) | WO2013064120A1 (zh) |
Families Citing this family (14)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| FR3012004A1 (fr) * | 2013-10-15 | 2015-04-17 | Orange | Procede de codage et de decodage d'images, dispositif de codage et de decodage d'images et programmes d'ordinateur correspondants |
| EP3085089B1 (en) | 2013-12-22 | 2019-11-20 | LG Electronics Inc. | Optimised video coding involving transform and spatial domain weighting |
| US9877048B2 (en) * | 2014-06-09 | 2018-01-23 | Qualcomm Incorporated | Entropy coding techniques for display stream compression (DSC) |
| FR3038196A1 (fr) * | 2015-06-29 | 2016-12-30 | B<>Com | Procede de codage d'une image numerique, procede de decodage, dispositifs et programmes d'ordinateurs associes |
| FR3040578A1 (fr) * | 2015-08-31 | 2017-03-03 | Orange | Procede de codage et de decodage d'images, dispositif de codage et de decodage d'images et programmes d'ordinateur correspondants |
| US10200719B2 (en) * | 2015-11-25 | 2019-02-05 | Qualcomm Incorporated | Modification of transform coefficients for non-square transform units in video coding |
| US10390048B2 (en) * | 2016-02-15 | 2019-08-20 | Qualcomm Incorporated | Efficient transform coding using optimized compact multi-pass transforms |
| CN110546952A (zh) * | 2017-03-21 | 2019-12-06 | Lg电子株式会社 | 图像编码系统中的变换方法和用于该变换方法的设备 |
| CN109922348B (zh) * | 2017-12-13 | 2020-09-18 | 华为技术有限公司 | 图像编解码方法和装置 |
| PL4216554T3 (pl) | 2018-06-03 | 2025-05-26 | Lg Electronics Inc. | Sposób i urządzenie do przetwarzania sygnału wideo za pomocą przekształcenia skróconego |
| CN109819250B (zh) * | 2019-01-15 | 2020-09-25 | 北京大学 | 一种多核全组合方式的变换方法和系统 |
| CN112543322B (zh) * | 2019-09-20 | 2022-04-15 | 杭州海康威视数字技术股份有限公司 | 一种解码、编码方法、装置及其设备 |
| CN112969067B (zh) * | 2021-05-18 | 2021-08-03 | 浙江华创视讯科技有限公司 | 一种视频编码方法、装置、设备和可读存储介质 |
| WO2024254776A1 (zh) * | 2023-06-14 | 2024-12-19 | 华为技术有限公司 | 一种通信方法及装置 |
Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101415121A (zh) * | 2007-10-15 | 2009-04-22 | 华为技术有限公司 | 一种自适应的帧预测的方法及装置 |
| CN101658043A (zh) * | 2007-04-17 | 2010-02-24 | 高通股份有限公司 | 用于帧内译码的定向变换 |
| CN102045560A (zh) * | 2009-10-23 | 2011-05-04 | 华为技术有限公司 | 一种视频编解码方法及设备 |
Family Cites Families (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20070171978A1 (en) * | 2004-12-28 | 2007-07-26 | Keiichi Chono | Image encoding apparatus, image encoding method and program thereof |
| US9357219B2 (en) * | 2009-04-08 | 2016-05-31 | Sharp Kabushiki Kaisha | Video encoding apparatus and video decoding apparatus |
| US8855203B2 (en) * | 2009-04-08 | 2014-10-07 | Sharp Kabushiki Kaisha | Video encoding apparatus and video decoding apparatus |
| KR101675116B1 (ko) | 2009-08-06 | 2016-11-10 | 삼성전자 주식회사 | 영상의 부호화 방법 및 장치, 그 복호화 방법 및 장치 |
| WO2011031332A1 (en) * | 2009-09-14 | 2011-03-17 | Thomson Licensing | Methods and apparatus for efficient video encoding and decoding of intra prediction mode |
| BR112012025206B1 (pt) * | 2010-04-09 | 2022-04-12 | Mitsubishi Electric Corporation | Dispositivo de decodificação de imagem em movimento |
-
2011
- 2011-11-04 CN CN201110346062.4A patent/CN103096053B/zh active Active
-
2012
- 2012-11-05 EP EP12844690.3A patent/EP2768220A4/en not_active Withdrawn
- 2012-11-05 WO PCT/CN2012/084082 patent/WO2013064120A1/zh not_active Ceased
-
2014
- 2014-04-30 US US14/266,149 patent/US9462274B2/en active Active
Patent Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101658043A (zh) * | 2007-04-17 | 2010-02-24 | 高通股份有限公司 | 用于帧内译码的定向变换 |
| CN101415121A (zh) * | 2007-10-15 | 2009-04-22 | 华为技术有限公司 | 一种自适应的帧预测的方法及装置 |
| CN102045560A (zh) * | 2009-10-23 | 2011-05-04 | 华为技术有限公司 | 一种视频编解码方法及设备 |
Also Published As
| Publication number | Publication date |
|---|---|
| US20140233643A1 (en) | 2014-08-21 |
| EP2768220A1 (en) | 2014-08-20 |
| EP2768220A4 (en) | 2014-10-29 |
| CN103096053B (zh) | 2015-10-07 |
| US9462274B2 (en) | 2016-10-04 |
| CN103096053A (zh) | 2013-05-08 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN103096053B (zh) | 一种变换模式的编解码方法和装置 | |
| JP4763422B2 (ja) | イントラ予測装置 | |
| TWI536811B (zh) | 影像處理方法與系統、解碼方法、編碼器與解碼器 | |
| CN101884219B (zh) | 处理视频信号的方法和装置 | |
| CN101540926B (zh) | 基于h.264的立体视频编解码方法 | |
| CN103548356B (zh) | 使用跳跃模式的图像解码方法及使用该方法的装置 | |
| CN101518089B (zh) | 编/解码方法、编/解码器及寻找最佳匹配块的方法及装置 | |
| US20260082082A1 (en) | Picture prediction method, encoder, decoder, and storage medium | |
| CN105072452A (zh) | 编码方法 | |
| US10091531B2 (en) | Image coding and decoding methods and apparatuses | |
| WO2013067949A1 (zh) | 矩阵编码方法与装置及解码方法与装置 | |
| CN108353175A (zh) | 使用系数引起的预测处理视频信号的方法和装置 | |
| WO2012119463A1 (zh) | 变换系数的编码方法、变换系数的解码方法,和装置 | |
| CN101707716B (zh) | 视频编码器和编码方法 | |
| CN110650349A (zh) | 一种图像编码方法、解码方法、编码器、解码器及存储介质 | |
| WO2011150805A1 (zh) | 图像残差块的处理方法、装置和系统 | |
| CN1615026A (zh) | 数据处理装置及其方法和编码设备 | |
| KR20080033813A (ko) | 데이터 인코딩/디코딩 방법 및 장치 | |
| KR101611408B1 (ko) | 점유 대역폭의 감소를 위한 영상 부호화 방법 및 장치, 그리고 영상 복호화 방법 및 장치 | |
| CN103533351B (zh) | 一种多量化表的图像压缩方法 | |
| WO2011124163A1 (zh) | 视频数据编码、解码方法及装置、变换处理方法及装置 | |
| CN111279699A (zh) | 视频编解码的方法和装置 | |
| JP2025501402A (ja) | ビデオ処理の方法、装置、及び媒体 | |
| CN113132734B (zh) | 一种编码、解码方法、装置及其设备 | |
| CN116980609A (zh) | 视频数据处理方法、装置、存储介质及设备 |
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: 12844690 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| REEP | Request for entry into the european phase |
Ref document number: 2012844690 Country of ref document: EP |
|
| WWE | Wipo information: entry into national phase |
Ref document number: 2012844690 Country of ref document: EP |