WO2011153888A1 - 编码方法、解码方法、编码装置、解码装置及编解码系统 - Google Patents

编码方法、解码方法、编码装置、解码装置及编解码系统 Download PDF

Info

Publication number
WO2011153888A1
WO2011153888A1 PCT/CN2011/073973 CN2011073973W WO2011153888A1 WO 2011153888 A1 WO2011153888 A1 WO 2011153888A1 CN 2011073973 W CN2011073973 W CN 2011073973W WO 2011153888 A1 WO2011153888 A1 WO 2011153888A1
Authority
WO
WIPO (PCT)
Prior art keywords
decoding
coding
transform
transformation matrix
matrix
Prior art date
Application number
PCT/CN2011/073973
Other languages
English (en)
French (fr)
Inventor
宋锦
王栋
杨名远
于浩平
Original Assignee
华为技术有限公司
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2011153888A1 publication Critical patent/WO2011153888A1/zh

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/60Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding
    • H04N19/61Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding in combination with predictive coding

Definitions

  • Encoding method, decoding method, encoding device, decoding device and codec system The present application claims to be submitted to the Chinese Patent Office on June 11, 2010, the application number is 201010205093.3, and the invention name is "encoding method, decoding method, encoding device, decoding device" The priority of the Chinese Patent Application, the entire disclosure of which is incorporated herein by reference.
  • the present invention relates to the field of communications, and in particular, to an encoding method, a decoding method, an encoding device, a decoding device, and a codec system.
  • Video technology has been widely used in modern life. Generally, in order to improve video quality or reduce video volume, it is often necessary to encode and decode video.
  • the video signal first passes through a prediction module, and the encoder selects the best one from several prediction modes according to certain optimization criteria, and then generates a residual signal; the residual signal is transformed and quantized into the entropy coding module. And finally form an output code stream;
  • the prediction mode information is first parsed from the code stream to generate a prediction signal that is completely consistent with the encoding end; then the transformed coefficient values in the code stream are parsed, and inverse quantization and inverse transformation are performed to generate a reconstructed residual. The difference signal; finally, the reconstructed video signal is synthesized by using the prediction signal and the reconstructed residual signal.
  • the transformation process is introduced.
  • the function of the transformation is to transform the residual into another expression by performing some linear operation on the residual block, and in this expression, the energy of the data Focusing on a few transform coefficients, most of the other coefficients have low or zero energy, which improves the performance of entropy coding.
  • each prediction direction it is required to obtain the best transformation matrix, and Each prediction direction has a binding relationship with a transformation matrix. Only when the prediction direction is consistent with the direction of the transformation matrix, the transformation matrix is the optimal transformation matrix of the prediction direction, but in practical applications, the prediction direction And the direction of the transformation matrix is often inconsistent, so when the prediction direction and the direction of the transformation matrix are inconsistent, the optimal transformation matrix cannot be obtained in some prediction directions. Therefore, this scheme cannot be applied to this case, thus affecting the coding performance.
  • the embodiment of the invention provides an encoding method, a decoding method, an encoding device, a decoding device and a coding and decoding system, which can improve coding performance.
  • the encoding method provided by the embodiment of the present invention includes: processing the input video data to obtain a residual signal; acquiring a residual texture prediction direction of the residual signal; and selecting a candidate transformation matrix corresponding to the video data according to a preset criterion. Selecting a coding transformation matrix; if the residual texture prediction direction is inconsistent with the direction of the coding transformation matrix, transforming the residual signal by using the coding transformation matrix to obtain a transformation result, and performing the transformation result on the coding transformation matrix
  • the index is encoded to obtain an encoded result; the transformed result and the encoded result are encoded to obtain an encoded stream.
  • the decoding method provided by the embodiment of the present invention includes: parsing the received encoded stream to obtain a transform result; and if the encoded stream is parsed to obtain an index of the encoded transform matrix, according to the index of the encoded transform matrix A decoding transformation matrix is selected from the candidate transformation matrix; the transformation result is inversely transformed by the decoding transformation matrix to obtain a residual signal, and the video data is reconstructed according to the residual signal.
  • the encoding apparatus includes: a residual processing unit, configured to process the input video data to obtain a residual signal; and an acquiring unit, configured to acquire a residual texture prediction direction of the residual signal; a unit, configured to select, from a candidate transformation matrix corresponding to the video data, a coding transformation matrix according to a preset criterion, where the direction comparison unit is configured to determine whether the prediction direction of the residual texture is consistent with a direction of the coding transformation matrix, Inconsistent, the index coding unit and the transformation unit are triggered to perform corresponding operations; an index coding unit, configured to encode an index of the coding transformation matrix to obtain an encoding result; and a transform unit, configured to use the coding transformation matrix to perform the residual
  • the signal is transformed to obtain a transform result; the data encoding unit is configured to encode the transform result and the encoded result to obtain an encoded stream.
  • the decoding apparatus includes: a parsing unit, configured to parse the received encoded stream to obtain a transform result; and an index decoding unit, configured to: when the parsing unit pairs the encoded stream When the index of the coding transformation matrix is obtained by parsing, the decoding transformation matrix is selected from the candidate transformation matrix according to the index of the coding transformation matrix; and the inverse transformation unit is configured to inversely transform the transformation result by using the decoding transformation matrix.
  • a codec system includes: an encoding device and a decoding device.
  • the embodiments of the present invention have the following advantages:
  • the coding transformation matrix may be selected from the candidate transformation matrix corresponding to the video data according to the preset criterion, and the residual signal is transformed by using the coding transformation matrix, and the coding transformation is performed.
  • the index of the matrix is encoded, so that the relationship between the prediction direction of the residual texture and the direction of the transformation matrix need not be considered, and the solutions of the embodiments of the present invention can be effectively applied, thereby improving the coding performance.
  • FIG. 1 is a schematic diagram of an embodiment of an encoding method according to an embodiment of the present invention.
  • FIG. 2 is a schematic diagram of another embodiment of an encoding method according to an embodiment of the present invention.
  • FIG. 3 is a schematic diagram of an embodiment of a decoding method according to an embodiment of the present invention.
  • FIG. 4 is a schematic diagram of another embodiment of a decoding method according to an embodiment of the present invention.
  • FIG. 5 is a flowchart of a coding process in an embodiment of the present invention.
  • FIG. 6 is a flowchart of a decoding process in an embodiment of the present invention.
  • FIG. 7 is a schematic diagram of an embodiment of an encoding apparatus according to an embodiment of the present invention.
  • FIG. 8 is a schematic diagram of an embodiment of a decoding apparatus according to an embodiment of the present invention.
  • FIG. 9 is a schematic diagram of an embodiment of a codec system according to an embodiment of the present invention.
  • the embodiment of the invention provides an encoding method, a decoding method, an encoding device, a decoding device and a coding and decoding system, which can improve coding performance.
  • an embodiment of an encoding method in an embodiment of the present invention includes:
  • the input video data is first processed to obtain a residual signal.
  • the specific process is common knowledge of those skilled in the art, and is not limited herein.
  • the residual texture prediction direction of the residual signal can be obtained.
  • the candidate transformation matrix may be preset before the execution of the scheme, specifically, in the training process of the video data, according to the overhead.
  • the principle of equalization determines the use of a candidate transformation matrix, or determines the use of several candidate transformation matrices.
  • step 102 may be performed first, or step 103 may be performed first, and step 102 and step 103 may be performed at the same time, which is not limited herein. .
  • the residual transformation signal is transformed by using the coding transformation matrix to obtain a transformation result, and the index of the coding transformation matrix is encoded to obtain a coding result;
  • the residual signal may be transformed by using the coding transformation matrix to obtain a transformation result, and the index of the coding transformation matrix needs to be encoded to obtain a coding result.
  • the obtained transform result and the encoded result are encoded to obtain an encoded stream, and the encoding process of the video data is completed.
  • the coding transformation matrix may be selected from the candidate transformation matrix corresponding to the video data according to the preset criterion, and the residual signal is performed by using the coding transformation matrix.
  • the transform and the index of the coded transform matrix are encoded, so that the relationship between the direction of the residual texture prediction and the direction of the transform matrix need not be considered, and the solutions of the embodiments of the present invention can be effectively applied, thereby improving the coding performance.
  • another embodiment of the coding method in the embodiment of the present invention includes:
  • This step is the same as step 101 in the foregoing embodiment shown in FIG. 1, and details are not described herein again.
  • the residual texture prediction direction of the residual signal can be obtained.
  • the specific manner of obtaining may include a multiplexed intra prediction mode and a spatial domain prediction mode.
  • the multiplexed intra prediction may be: using a macroblock of the video data or an intra prediction direction of each subblock in the macroblock as a residual texture. The direction of prediction.
  • the spatial prediction may be: in the upper block, the left block, the upper left block, and the upper right block of the macroblock or subblock to be encoded in the video data, if no intra prediction direction of the block is in the direction corresponding to the transform matrix
  • the intra prediction direction is used as the residual texture prediction direction. If the intra prediction direction of only one block is consistent with the direction corresponding to the transform matrix, the intra prediction direction of the block is used as the residual texture prediction direction.
  • the process of obtaining the residual texture prediction direction of the residual signal in the embodiment is described by using only two examples. It can be understood that, in practical applications, other methods may be used to acquire the residual.
  • the residual texture prediction direction of the difference signal is not limited herein.
  • step 203 Select a coding transformation matrix from the candidate transformation matrix corresponding to the video data according to the preset criterion. This step is the same as step 103 in the foregoing embodiment shown in FIG. 1, and details are not described herein again.
  • the preset criterion in this embodiment may be a rate discordance (RDO) criterion in practical applications. It can be understood that other optimization criteria may also be used, which are not limited herein.
  • RDO rate discordance
  • step 202 may be performed first, or step 203 may be performed first, and step 202 and step 203 may be performed at the same time, which is not limited herein. .
  • Step 208 Determine whether the prediction direction of the residual texture is consistent with the direction of the coding transformation matrix, and if so, Step 208, if no, step 205 is performed;
  • the direction of the coding transformation matrix is consistent with the residual texture prediction direction obtained in step 202.
  • variable length coding calculateate the difference between the index of the coding transform matrix and the index of the residual texture prediction direction in the space domain; use the variable length code to encode the difference to obtain the coding result.
  • the process of encoding the index of the coding transformation matrix may be determined according to the transformation selection of the peripheral reconstruction block or the selection of the intra prediction direction, so that better coding performance can be achieved, for example,
  • the coding index establishes a context coding model, it selects the same transformation type as the surrounding reconstructed block with a greater probability.
  • the process is described. It can be understood that, in an actual application, the index of the coding transformation matrix may be encoded in other manners, which is not limited herein.
  • steps 205 and 206 in this embodiment have no sequence, and step 205 may be performed first, or step 206 may be performed first, and steps 205 and 206 may be performed simultaneously.
  • the residual signal when it is determined that the residual texture prediction direction is consistent with the direction of the coding transformation matrix, the residual signal may be transformed by using the coding transformation matrix to obtain a transformation result.
  • the transformation result can be encoded to obtain an encoded stream, thereby completing the encoding process of the video data.
  • the coding transformation matrix may be selected from the candidate transformation matrix corresponding to the video data according to the RDO criterion.
  • the coding transformation may still be adopted.
  • the matrix transforms the residual signal and encodes the index of the coding transformation matrix, so the residual texture prediction direction and the direction of the transformation matrix need not be consistent, so whether the direction of the residual texture prediction is consistent with the direction of the transformation matrix,
  • the solutions of the embodiments can be effectively applied, thereby improving the coding performance;
  • the decoding method in the embodiment of the present invention includes:
  • the encoded stream is parsed to obtain a transformed result.
  • the index of the coding transformation matrix is not included in the encoded stream
  • the encoded stream will contain an index of the coding transformation matrix.
  • the decoding transformation matrix may be selected from the candidate transformation matrix according to the index of the coding transformation matrix.
  • the candidate transformation matrix described in this embodiment is consistent with the meanings of the candidate transformation matrix described in the foregoing embodiments shown in FIG. 1 and FIG. 2, and details are not described herein again.
  • 303. Perform a inverse transform on the transform result by using a decoding transform matrix to obtain a residual signal. After the decoding transform matrix is selected, the transform transform matrix may be inverse-transformed to obtain a residual signal.
  • the decoding method in this embodiment can cooperate with the encoding method in the foregoing embodiment shown in FIG. 1 and FIG. 2, and can complete the encoding and decoding process of the video data, and improve the encoding performance in the encoding process.
  • another embodiment of the decoding method in the embodiment of the present invention includes:
  • the encoded stream is parsed to obtain a transformed result.
  • the index of the coding transformation matrix is not included in the encoded stream
  • the encoded stream will contain an index of the coding transformation matrix.
  • step 402 determining whether the residual texture prediction direction is consistent with the direction of the transformation matrix, if yes, executing step 404, if not, performing step 403;
  • the encoded stream if the encoded stream does not include an index of the coding transform matrix, it indicates that the residual texture prediction direction is consistent with the direction of the transform matrix when encoding, and if the encoded stream includes an index of the coding transformation matrix, When the residual texture prediction direction is inconsistent with the direction of the transformation matrix.
  • the decoding transformation matrix may be selected from the candidate transformation matrix according to the index of the coding transformation matrix.
  • Fixed length decoding decoding the index of the coding transformation matrix by using a fixed length code to obtain a decoding result, and selecting a decoding transformation matrix corresponding to the decoding result from the candidate transformation matrix.
  • variable length decoding using the variable length code to index the code transformation matrix and preset residual texture
  • the prediction direction is decoded in the spatial domain to obtain a decoding result, and the decoding transformation matrix corresponding to the decoding result is selected from the candidate transformation matrix.
  • the process of selecting the decoding transformation matrix in this embodiment is described by only two examples. It can be understood that, in practical applications, the decoding transformation matrix may be selected in other manners, specifically Not limited.
  • the decoding transform matrix may be selected from the candidate transform matrix according to the residual texture prediction direction, that is, the decoding transform matrix corresponding to the residual texture prediction direction is selected.
  • the residual texture prediction direction in this embodiment may be obtained when parsing the encoded stream, or may be preset locally in the decoding device.
  • the decoding transformation result is used to inversely transform the transformation result obtained in step 401 to obtain a residual signal.
  • the decoding method in this embodiment can cooperate with the encoding method in the foregoing embodiment shown in FIG. 1 and FIG. 2, and can complete the encoding and decoding process of the video data, and improve the encoding performance in the encoding process.
  • the encoding process and the decoding process in the embodiment of the present invention are described in detail in a specific application scenario.
  • the specific encoding process includes:
  • the first flag is used to indicate whether the candidate transform matrix used by the macroblock (116x16) to be coded or each subblock (18x8, 14x4) in the macroblock is one or more, and the specific candidate transform matrix The number is the same as that of the transform candidate matrix described in the foregoing FIG. 1 and FIG. 2, and details are not described herein again.
  • the intra prediction direction may be obtained by using multiplexed intra prediction or spatial domain prediction as the residual texture prediction direction, specifically the foregoing figure.
  • the content described in the embodiment shown in 2 is the same and will not be described here.
  • the RDO criterion is taken as an example. In an actual application, other optimization criteria may be used, which is not limited herein.
  • the second flag is used to indicate whether the residual texture prediction direction is consistent with the direction of the coding transformation matrix.
  • step 507 determining whether the residual texture prediction direction is consistent with the direction of the coding transformation matrix, if yes, step 508 is performed, if not, step 509 is performed;
  • the coding transformation matrix may be directly transformed, and after the transformation is completed, the subsequent coding process may be performed, that is, the transformation result is encoded to obtain a coded stream.
  • the index of the coding transformation matrix may be encoded to obtain an encoding result, and transformed by the coding transformation matrix, and after the transformation is completed, the subsequent encoding process may be performed, that is, The result of the transformation and the coding result obtained by index coding are encoded to obtain an encoded stream.
  • the encoding of the index may be fixed length coding or variable length coding, and may be specifically described in the foregoing embodiment shown in FIG. 2, and is not mentioned here.
  • the transform matrix corresponding to the residual texture prediction direction is selected for each sub-block in the macroblock or the macroblock, and the transform operation is performed, and the subsequent encoding process is completed, that is, the transform result is encoded and encoded. flow.
  • the corresponding decoding process includes: 601. Parse the macroblock header information specified by H.264.
  • the first flag bit is used to indicate whether the candidate transform matrix used by the macroblock (116x16) to be decoded or each sub-block (18x8, 14x4) in the macroblock is one or more, and the specific candidate transform matrix
  • the number has the same meaning as the transform candidate matrix described in the foregoing FIG. 3 and FIG. 4, and details are not described herein again.
  • step 603 determining whether the number of candidate matrices is 1, if yes, proceed to step 610, and if not, proceed to step 604;
  • the transform result can be obtained, and the residual texture prediction direction may also be obtained. It should be noted that the residual texture prediction direction can be locally preset, in addition to the parsing of the encoded stream. Obtained in the information.
  • the multiplexed intra prediction or the spatial domain prediction may be specifically used, which is the same as that described in the foregoing embodiment shown in FIG. 2 . , will not repeat them here.
  • the second flag is used to indicate whether the residual texture prediction direction is consistent with the direction of the coding transformation matrix.
  • step 606 determining whether the residual texture prediction direction is consistent with the direction of the coding transformation matrix, if yes, executing step 607, if not, executing step 608;
  • the index of the coded transform matrix is obtained when parsing the coded stream, it indicates that the direction of the residual texture prediction is inconsistent with the direction of the coded transform matrix, and if the coded stream is parsed, the coded transform matrix is not obtained.
  • the index indicates that the residual texture prediction direction is consistent with the direction of the coding transformation matrix.
  • the corresponding decoding transformation matrix may be directly searched from the candidate transformation matrix according to the residual texture prediction direction, and the transformed transformation result is inversely transformed by the decoding transformation matrix. Obtaining a residual signal and reconstructing the video from the residual signal Data.
  • the index of the coding transformation matrix needs to be decoded to obtain a decoding result, and the index of the coding transformation matrix may be decoded by using fixed length decoding or variable length decoding.
  • the content is the same as that described in the foregoing embodiment shown in FIG. 4, and details are not described herein again.
  • the corresponding decoding transformation matrix may be searched from the candidate transformation matrix according to the decoding result, and the decoding transformation matrix inversely transforms the parsed transformation result to obtain a residual signal, and reconstructs the video data by using the residual signal.
  • a transformation matrix corresponding to the residual texture prediction direction is selected for each sub-block in the macroblock or the macroblock, and an inverse transform operation is performed to obtain a residual signal, and the video data is reconstructed by the residual signal.
  • the syntax structure of the H.264 video coding standard can be modified (only Take I8x8MB as an example), the modified syntax structure is shown in Table 1 below: Table 1
  • Coded macroblock type should be arithmetically encoded or unsigned
  • the scheme of the present invention achieves better coding performance in each sequence than the MDDT scheme.
  • the coding scheme in the embodiment of the present invention is closely related to the texture characteristics of the sequence, better performance can be achieved in high resolution, medium and high code rate, for example, in the video data encoding process of 1080P, the experimental conditions are the same as above.
  • the QP points are 22, 25, 28, 31 respectively.
  • the coding performance gains that can be further brought by the coding method in the embodiment of the present invention are as shown in Table 4 below:
  • the coding method in the embodiment of the present invention can improve coding under various conditions.
  • the encoding process and the decoding process in the embodiment of the present invention are described in detail. The following describes the related device in the embodiment of the present invention. Referring to FIG. 7, the encoding device in the embodiment of the present invention includes:
  • the residual processing unit 701 is configured to process the input video data to obtain a residual signal, and the acquiring unit 702 is configured to obtain a residual texture prediction direction of the residual signal.
  • the matrix selection unit 703 is configured to select a coding transformation matrix from the candidate transformation matrix corresponding to the video data according to a preset criterion.
  • the preset criterion in this embodiment may be an RDO criterion in an actual application, and it may be understood that other optimization criteria may also be used, which are not limited herein.
  • the direction comparing unit 704 is configured to determine whether the residual texture prediction direction is consistent with the direction of the coding transformation matrix, if not, triggering the index coding unit and the transformation unit to perform a corresponding operation; the index coding unit 705 is configured to The index of the coding transformation matrix is encoded to obtain a coding result;
  • a transform unit 706, configured to transform the residual signal by using the coding transform matrix to obtain a transform result
  • the data encoding unit 707 is configured to encode the transform result and the encoding result to obtain an encoded stream.
  • the process of acquiring the residual texture prediction direction of the residual signal may be performed by using a method of multiplexing intra prediction or spatial prediction, and the specific process is consistent with the content described in the foregoing embodiment shown in FIG. 2 . , no longer mentioned here.
  • the process of encoding the index of the coding transformation matrix by the index coding unit 705 to obtain the coding result may adopt a fixed length coding or a variable length coding, and the specific process is consistent with the content described in the foregoing embodiment shown in FIG. 2, where No longer.
  • the transform unit 706 when the direction comparing unit 704 determines that the residual texture prediction direction is consistent with the direction of the coding transformation matrix, the transform unit 706 also transforms the residual signal by using the coding transformation matrix to obtain a transformation result, and further, the data.
  • the encoding unit 707 directly encodes the transform result to obtain an encoded stream.
  • the matrix selecting unit 703 may select the coding transformation matrix from the candidate transformation matrix corresponding to the video data according to the preset criterion.
  • the transform unit 706 may still transform the residual signal by using the coding transformation matrix, and the index coding unit 705 encodes the index of the coding transformation matrix, so that the residual texture prediction direction and The direction of the transformation matrix is consistent. Therefore, the scheme of the embodiment can be effectively applied regardless of whether the direction of the residual texture prediction is consistent with the direction of the transformation matrix, thereby improving coding performance.
  • the data encoding unit 707 only needs to encode the transformation result to obtain the encoded stream without encoding the index of the coding transformation matrix, thereby reducing the coding amount and further improving The coding performance.
  • the decoding apparatus in the embodiment of the present invention includes:
  • the parsing unit 801 is configured to parse the received encoded stream to obtain a transform result
  • the index decoding unit 802 is configured to: when the parsing unit parses the encoded stream to obtain an index of the encoded transform matrix, according to the encoding The index of the transformation matrix selects a decoding transformation matrix from the candidate transformation matrix;
  • An inverse transform unit 803, configured to inverse transform the transform result by using the decoding transform matrix to obtain a residual signal
  • the reconstruction unit 804 is configured to reconstruct video data according to the residual signal.
  • the direction decoding unit 805 is configured to: when the parsing unit parses the encoded stream without obtaining an index of the coded transform matrix, select a decoding transform matrix from the candidate transform matrix according to the preset residual texture prediction direction.
  • the residual texture prediction direction may be obtained. If the parsing unit 801 does not parse the residual texture prediction direction, the residual is obtained.
  • the texture prediction direction may be obtained locally, and the manner of obtaining may include the multiplexed intra prediction mode or the spatial domain prediction mode. The specific process is the same as that described in the foregoing embodiment shown in FIG. 2, and is not described here.
  • the index decoding unit 802 can use fixed length decoding or variable length decoding when decoding the index of the coding transformation matrix.
  • the specific process is the same as the decoding process described in the foregoing embodiment shown in FIG. 4, and details are not described herein again.
  • the decoding device in this embodiment can cooperate with the encoding device in the foregoing embodiment shown in FIG. In order to complete the encoding and decoding process of the video data, the encoding performance in the encoding process is improved.
  • the embodiment of the present invention further provides a codec system.
  • the codec system in the embodiment of the present invention includes: an encoding device 901 and a decoding device 902;
  • the encoding device 901 can be an encoding device as shown in FIG.
  • the decoding device 902 may be a decoding device as shown in FIG.
  • the medium can be a read only memory, a magnetic disk or a compact disk or the like.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

一种编码方法、解码方法、编码装置、解码装置及编解码系统,用于提高编码性能。编码方法包括:对输入的视频数据进行处理得到残差信号;获取所述残差信号的残差纹理预测方向;根据预置准则从所述视频数据对应的候选变换矩阵中选择编码变换矩阵;若所述残差纹理预测方向与所述编码变换矩阵的方向不一致,则采用所述编码变换矩阵对所述残差信号进行变换得到变换结果;对所述变换结果以及所述编码变换矩阵的索引进行编码得到编码流。还提供一种解码方法、解码装置以及编解码系统。

Description

编码方法、 解码方法、 编码装置、 解码装置及编解码系统 本申请要求于 2010 年 6 月 11 日提交中国专利局、 申请号为 201010205093.3、 发明名称为 "编码方法、 解码方法、 编码装置、 解码装置及 编解码系统"的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本发明涉及通信领域, 尤其涉及一种编码方法、 解码方法、 编码装置、 解 码装置及编解码系统。
背景技术
视频技术在现代生活中得到了广泛的应用, 一般来说, 为了提高视频质量 或减少视频体积, 常常需要对视频进行编解码。
现有的混合编码框架下的编解码流程大致为:
在编码端,视频信号首先会经过预测模块, 编码器依照一定的最优化准则 从若干种预测模式中选择最佳的一种, 然后生成残差信号; 残差信号经过变换 量化后进入熵编码模块, 并最终形成输出码流;
在解码端, 首先从码流中解析出预测模式信息, 生成与编码端完全一致的 预测信号;接着解析出码流中已经量化过的变换系数值,进行反量化与反变换, 生成重构残差信号; 最后用预测信号与重建残差信号合成出重构视频信号。
在混合编码框架下, 引入了变换这一过程, 变换的作用是通过对残差块进 行某种线性运算, 将残差变换为另外一种表达形式, 并且在这种表达形式下, 数据的能量集中在少数的几个变换系数上,其余大部分的系数的能量很低或者 为零, 从而提高熵编码的性能。
现有技术中基于变换的一种视频编码方式的大致思想为:
1 )通过帧内预测后, 在预测方向上依然存在最强的残差, 变换应该才艮据 预测方向的不同, 针对性地进行设计;
2 )对每个预测方向, 为了求得其最佳的变换矩阵, 首先编码一些标准视 频序列, 记录每个预测方向的残差数据, 然后再根据最优变换的准则, 利用这 些残差数据训练得到一组最佳的变换矩阵;
3 )按照获取得到的最佳的变换矩阵进行编码。
上述技术方案中, 对于每个预测方向, 都需要求得其最佳的变换矩阵, 而 每个预测方向都与一个变换矩阵存在绑定的关系,只有当预测方向与变换矩阵 的方向一致时, 该变换矩阵才是该预测方向的最佳变换矩阵, 但是, 在实际应 用中,预测方向和变换矩阵方向却常常不一致, 所以当预测方向和变换矩阵方 向不一致时,在某些预测方向无法求得最佳变换矩阵, 因此该方案并不能适用 于这种情况, 从而影响了编码性能。
发明内容
本发明实施例提供了一种编码方法、 解码方法、 编码装置、 解码装置及编 解码系统, 能够提高编码性能。
本发明实施例提供的编码方法, 包括: 对输入的视频数据进行处理得到残 差信号; 获取所述残差信号的残差纹理预测方向;根据预置准则从所述视频数 据对应的候选变换矩阵中选择编码变换矩阵;若所述残差纹理预测方向与所述 编码变换矩阵的方向不一致,则采用所述编码变换矩阵对所述残差信号进行变 换得到变换结果,对所述编码变换矩阵的索引进行编码得到编码结果; 对所述 变换结果以及所述编码结果进行编码得到编码流。
本发明实施例提供的解码方法, 包括: 对接收到的编码流进行解析, 得到 变换结果; 若对所述编码流进行解析还得到编码变换矩阵的索引, 则根据所述 编码变换矩阵的索引从候选变换矩阵中选取解码变换矩阵;采用所述解码变换 矩阵对所述变换结果进行反变换得到残差信号 ,根据所述残差信号重建视频数 据。
本发明实施例提供的编码装置, 包括: 残差处理单元, 用于对输入的视频 数据进行处理得到残差信号; 获取单元, 用于获取所述残差信号的残差纹理预 测方向; 矩阵选取单元, 用于根据预置准则从所述视频数据对应的候选变换矩 阵中选择编码变换矩阵; 方向比较单元, 用于判断所述残差纹理预测方向与所 述编码变换矩阵的方向是否一致, 若不一致, 则触发索引编码单元以及变换单 元执行相应操作; 索引编码单元, 用于对所述编码变换矩阵的索引进行编码得 到编码结果; 变换单元, 用于采用所述编码变换矩阵对所述残差信号进行变换 得到变换结果; 数据编码单元, 用于对所述变换结果以及所述编码结果进行编 码得到编码流。
本发明实施例提供的解码装置, 包括: 解析单元, 用于对接收到的编码流 进行解析, 得到变换结果; 索引解码单元, 用于当所述解析单元对所述编码流 进行解析得到编码变换矩阵的索引时,才艮据所述编码变换矩阵的索引从候选变 换矩阵中选取解码变换矩阵;反变换单元, 用于采用所述解码变换矩阵对所述 变换结果进行反变换得到残差信号; 重建单元, 用于根据所述残差信号重建视 频数据。
本发明实施例提供的编解码系统, 包括: 编码装置以及解码装置。
从以上技术方案可以看出, 本发明实施例具有以下优点:
本发明实施例中,在获得残差信号之后,可以^ ^据预置准则从视频数据对 应的候选变换矩阵中选择编码变换矩阵,并采用编码变换矩阵对残差信号进行 变换, 并对编码变换矩阵的索引进行编码, 所以无需考虑残差纹理预测方向和 变换矩阵的方向之间的关系,本发明实施例的方案均能有效适用,从而提高了 编码性能。
附图说明
为了更清楚地说明本发明实施例中的技术方案,下面将对实施例或现有技 术描述中所需要使用的附图作简单地介绍,显而易见地, 下面描述中的附图仅 仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳 动的前提下, 还可以根据这些附图获得其他的附图。
图 1为本发明实施例中编码方法一个实施例示意图;
图 2为本发明实施例中编码方法另一实施例示意图;
图 3为本发明实施例中解码方法一个实施例示意图;
图 4为本发明实施例中解码方法另一实施例示意图;
图 5为本发明实施例中编码过程流程图;
图 6为本发明实施例中解码过程流程图;
图 7为本发明实施例中的编码装置实施例示意图;
图 8为本发明实施例中的解码装置实施例示意图;
图 9为本发明实施例中的编解码系统实施例示意图。
具体实施方式
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清 楚、 完整地描述, 显然, 所描述的实施例是本发明一部分实施例, 而不是全部 的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳 动前提下所获得的所有其他实施例, 都属于本发明保护的范围。
本发明实施例提供了一种编码方法、 解码方法、 编码装置、 解码装置及编 解码系统, 能够提高编码性能。
请参阅图 1 , 本发明实施例中编码方法一个实施例包括:
101、 对输入的视频数据进行处理得到残差信号;
当需要对视频数据进行编码时,首先会对输入的视频数据进行处理得到残 差信号, 具体的过程为本领域技术人员的公知常识, 此处不作限定。
102、 获取残差信号的残差纹理预测方向;
得到残差信号之后, 可以获取该残差信号的残差纹理预测方向。
103、根据预置准则从视频数据对应的候选变换矩阵中选择编码变换矩阵; 本实施例中,候选变换矩阵可以在方案执行前就预先设置,具体可以是在 视频数据的训练过程中,根据开销均衡的原则确定使用一个候选变换矩阵,或 者确定使用若干个候选变换矩阵。
一般来说, 候选变换矩阵越多, 则编解码开销越大, 候选变换矩阵越少, 则编解码开销越小。
需要说明的是, 本实施例中, 步骤 102与步骤 103之间并没有顺序关系, 可以先执行步骤 102, 也可以先执行步骤 103, 还可以同时执行步骤 102以及 步骤 103, 具体此处不作限定。
104、 若残差纹理预测方向与编码变换矩阵的方向不一致, 则采用编码变 换矩阵对残差信号进行变换得到变换结果,对编码变换矩阵的索引进行编码得 到编码结果;
当残差纹理预测方向与编码变换矩阵的方向不一致的时候,可以采用编码 变换矩阵对残差信号进行变换得到变换结果,并且需要对编码变换矩阵的索引 进行编码得到编码结果。
105、 对变换结果以及编码结果进行编码得到编码流。
当完成变换以及编码的操作后 ,即可对前述得到的变换结果以及编码结果 进行编码得到编码流, 至此完成视频数据的编码过程。
本发明实施例中,在获得残差信号之后,可以根据预置准则从视频数据对 应的候选变换矩阵中选择编码变换矩阵,并采用编码变换矩阵对残差信号进行 变换, 并对编码变换矩阵的索引进行编码, 所以无需考虑残差纹理预测方向和 变换矩阵的方向之间的关系,本发明实施例的方案均能有效适用,从而提高了 编码性能。
为便于理解,下面以一具体实例对本发明实施例中的编码方法进行伴细描 述, 请参阅图 2, 本发明实施例中的编码方法另一实施例包括:
201、 对输入的视频数据进行处理得到残差信号;
本步骤与前述图 1所示的实施例中的步骤 101相同, 此处不再赘述。
202、 获取残差信号的残差纹理预测方向;
得到残差信号之后, 可以获取该残差信号的残差纹理预测方向。
具体的获取方式可以包括复用帧内预测方式以及空域预测方式: 复用帧内预测具体可以为:将视频数据的宏块或者宏块内的每一个子块的 帧内预测方向作为残差纹理的预测方向。
空域预测具体可以为: 在视频数据中的待编码宏块或子块的上块、 左块、 左上块与右上块中,若没有哪个块的帧内预测方向与其变换矩阵所对应的方向 将帧内预测方向作为残差纹理预测方向;若只有一个块的帧内预测方向与其变 换矩阵所对应的方向一致, 则以该块的帧内预测方向作为残差纹理预测方向。
需要说明的是,上述仅以两个例子对本实施例中的获取残差信号的残差纹 理预测方向的过程进行了描述, 可以理解的是, 在实际应用中, 还可以采用其 他的方式获取残差信号的残差纹理预测方向, 具体此处不作限定。
203、根据预置准则从视频数据对应的候选变换矩阵中选择编码变换矩阵; 本步骤与前述图 1所示的实施例中的步骤 103相同, 此处不再赘述。
本实施例中的预置准则在实际应用中可以为率失真(RDO, Rate Distortion Optimization ) 准则, 可以理解的是, 同样可以为其他的最优化准则, 具体此 处不作限定。
需要说明的是, 本实施例中, 步骤 202与步骤 203之间并没有顺序关系, 可以先执行步骤 202, 也可以先执行步骤 203 , 还可以同时执行步骤 202以及 步骤 203, 具体此处不作限定。
204、 判断残差纹理预测方向与编码变换矩阵方向是否一致, 若是, 则执 行步骤 208, 若否, 则执行步骤 205;
当选择到编码变换矩阵之后, 可以判断该编码变换矩阵的方向与步骤 202 中获取到的残差纹理预测方向是否一致。
205、 对编码变换矩阵的索引进行编码得到编码结果;
本实施例中, 当确定残差纹理预测方向与编码变换矩阵方向不一致, 则需 要在最终的编码流中携带对编码变换矩阵的索引编码后的信息。 一、定长编码:使用定长码对编码变换矩阵的索引进行编码得到编码结果。 二、变长编码: 计算编码变换矩阵的索引与残差纹理预测方向的索引在空 间域的差值; 使用变长码对该差值进行编码得到编码结果。
需要说明的是,本实施例中对编码变换矩阵的索引进行编码的过程可以根 据周边重构块的变换选择或帧内预测方向的选择来确定,这样可以达到更好的 编码性能, 例如在为编码索引建立上下文编码模型的时候,使其以更大的概率 选择与周边重构块相同的变换类型。 程进行了描述, 可以理解的是, 在实际应用中, 还可以采用其他的方式对编码 变换矩阵的索引进行编码, 具体此处不作限定。
206、 采用编码变换矩阵对残差信号进行变换得到变换结果;
本实施例中, 具体的变换过程为本领域技术人员的公知常识,此处不作限 定。
需要说明的是,本实施例中的步骤 205以及 206没有先后顺序,可以先执 行步骤 205, 也可以先执行步骤 206, 还可以同时执行步骤 205以及 206。
207、 对变换结果以及编码结果进行编码得到编码流, 并结束流程; 当得到变换结果以及编码结果之后 ,可以对该变换结果以及编码结果进行 编码得到编码流, 从而完成视频数据的编码过程。
208、 采用编码变换矩阵对残差信号进行变换得到变换结果;
本实施例中, 当确定残差纹理预测方向与编码变换矩阵方向一致, 则可以 采用编码变换矩阵对残差信号进行变换得到变换结果。
本实施例中,具体的变换过程为本领域技术人员的公知常识,此处不作限 定。
209、 对变换结果进行编码得到编码流。
当得到变换结果之后,可以对该变换结果进行编码得到编码流,从而完成 视频数据的编码过程。
本实施例中, 在获得残差信号之后, 可以根据 RDO准则从视频数据对应 的候选变换矩阵中选择编码变换矩阵,当残差纹理预测方向与编码变换矩阵的 方向不一致时, 仍然可以采用编码变换矩阵对残差信号进行变换, 并对编码变 换矩阵的索引进行编码,所以无需残差纹理预测方向和变换矩阵的方向保持一 致, 因此, 无论残差纹理预测方向与变换矩阵的方向是否一致, 本实施例的方 案均能有效适用, 从而提高了编码性能;
其次, 当残差纹理预测方向与变换矩阵的方向一致时, 只需要对变换结果 进行编码得到编码流, 而无需对编码变换矩阵的索引进行编码, 所以减少了编 码量, 进一步提高了编码性能。
上面对本发明实施例中的编码方法实施例进行了描述,相应的, 下面对本 发明实施例中的解码方法进行描述, 请参阅图 3 , 本发明实施例中的解码方法 包括:
301、 对接收到的编码流进行解析;
本实施例中, 当解码装置接收到编码流之后,会对该编码流进行解析得到 变换结果。
如果在编码时, 残差纹理预测方向与变换矩阵的方向一致, 则该编码流中 不会包含编码变换矩阵的索引;
如果在编码时, 残差纹理预测方向与变换矩阵的方向不一致, 则该编码流 中会包含编码变换矩阵的索引。
302、 根据编码变换矩阵的索引从候选变换矩阵中选取解码变换矩阵; 若在对编码流进行解析时得到了编码变换矩阵的索引 , 则说明在编码时, 残差纹理预测方向与变换矩阵的方向不一致,则可以 据该编码变换矩阵的索 引从候选变换矩阵中选取解码变换矩阵。
本实施例中所描述的候选变换矩阵与前述图 1以及图 2所示的实施例中描 述的候选变换矩阵的含义一致, 此处不再赘述。 303、 采用解码变换矩阵对变换结果进行反变换得到残差信号; 当选取了解码变换矩阵之后,即可采用该解码变换矩阵对步骤 301中解析 得到的变换结果进行反变换得到残差信号。
304、 根据残差信号重建视频数据。
本实施例中 , 步骤 303以及 304均为本领域技术人员的公知常识,具体过 程此处不作限定。
本实施例中的解码方法能够配合前述图 1以及图 2所示的实施例中的编码 方法, 可以完成视频数据的编解码过程, 提高在编码过程中的编码性能。
为便于理解,下面以一具体实例对本发明实施例中的解码方法进行伴细描 述, 请参阅图 4, 本发明实施例中的解码方法另一实施例包括:
401、 对接收到的编码流进行解析;
本实施例中, 当解码装置接收到编码流之后,会对该编码流进行解析得到 变换结果。
如果在编码时, 残差纹理预测方向与变换矩阵的方向一致, 则该编码流中 不会包含编码变换矩阵的索引;
如果在编码时, 残差纹理预测方向与变换矩阵的方向不一致, 则该编码流 中会包含编码变换矩阵的索引。
402、 判断残差纹理预测方向与变换矩阵的方向是否一致, 若一致, 则执 行步骤 404, 若不一致, 则执行步骤 403;
本实施例中, 若编码流中不包含编码变换矩阵的索引, 则说明在编码时, 残差纹理预测方向与变换矩阵的方向一致,若编码流中包含编码变换矩阵的索 引, 则说明在编码时, 残差纹理预测方向与变换矩阵的方向不一致。
403、 根据编码变换矩阵的索引选择解码变换矩阵, 之后执行步骤 405; 当编码流中包含编码变换矩阵的索引时,可以根据该编码变换矩阵的索引 从候选变换矩阵中选取解码变换矩阵。
具体的方式可以包括以下几种情况:
一、定长解码:使用定长码对所述编码变换矩阵的索引进行解码得到解码 结果, 从候选变换矩阵中选取解码结果对应的解码变换矩阵。
二、变长解码: 使用变长码对所述编码变换矩阵的索引与预置的残差纹理 预测方向在空间域的差值进行解码得到解码结果,从候选变换矩阵中选取解码 结果对应的解码变换矩阵。
需要说明的是,上述仅以两个例子对本实施例中的选择解码变换矩阵的过 程进行了描述, 可以理解的是, 在实际应用中, 还可以采用其他的方式选择解 码变换矩阵, 具体此处不作限定。
404、 根据残差纹理预测方向选择解码变换矩阵;
当编码流中不包含编码变换矩阵的索引时,可以根据残差纹理预测方向从 候选变换矩阵中选取解码变换矩阵,即选择该残差纹理预测方向对应的解码变 换矩阵。
需要说明的是,本实施例中的残差纹理预测方向可以在对编码流进行解析 时得到, 也可以预置在解码装置本地。
405、 采用解码变换矩阵对变换结果进行反变换得到残差信号;
当步骤 403或 404选取了解码变换矩阵之后 ,即可采用该解码变换矩阵对 步骤 401中解析得到的变换结果进行反变换得到残差信号。
406、 根据残差信号重建视频数据。
本实施例中, 步骤 405以及 406均为本领域技术人员的公知常识,具体过 程此处不作限定。
本实施例中的解码方法能够配合前述图 1以及图 2所示的实施例中的编码 方法, 可以完成视频数据的编解码过程, 提高在编码过程中的编码性能。
为便于理解,下面以一具体应用场景对本发明实施例中的编码过程以及解 码过程进行伴细描述, 请参阅图 5, 具体的编码过程包括:
501、 编码 H.264规定的宏块头信息;
502、 编码用于表示候选变换矩阵数目的第一标志位;
本实施例中, 该第一标志位用于表明待编码宏块(116x16 )或宏块内各子 块(18x8、 14x4 )所使用的候选变换矩阵是一个还是多个, 具体的候选变换矩 阵的数目与前述图 1以及图 2中所描述的变换候选矩阵的含义相同,此处不再 赘述。
503、 判断候选矩阵数目是否为 1 , 若是, 则执行步骤 511 , 若否, 则执行 步骤 504; 504、 获取帧内预测方向作为残差纹理预测方向;
本实施例中, 如果该第一标志位表明使用的候选变换矩阵为多个, 则可以 通过复用帧内预测或空域预测的方式获取帧内预测方向作为残差纹理预测方 向, 具体与前述图 2所示的实施例中描述的内容相同, 此处不再赞述。
505、 按照 RDO准则从候选变换矩阵中选择编码变换矩阵;
本实施例中以 RDO准则为例进行说明, 在实际应用中, 还可以使用其他 的最优化准则, 具体此处不作限定。
506、 编码用于表示方向是否一致的第二标志位;
该第二标志位用于表明残差纹理预测方向与编码变换矩阵的方向是否一 致。
507、 判断残差纹理预测方向与编码变换矩阵的方向是否一致, 若一致, 则执行步骤 508, 若不一致, 则执行步骤 509;
508、 以编码变换矩阵进行变换, 并执行后续编码过程;
若残差纹理预测方向与编码变换矩阵的方向一致,则可以直接以编码变换 矩阵进行变换,在变换完成后即可执行后续的编码过程, 即对变换结果进行编 码得到编码流。
509、 对编码变换矩阵的索引进行编码得到编码结果;
510、 以编码变换矩阵进行变换, 并执行后续编码过程;
若残差纹理预测方向与编码变换矩阵的方向不一致,则可以对编码变换矩 阵的索引进行编码得到编码结果, 并以编码变换矩阵进行变换,在变换完成后 即可执行后续的编码过程,即对变换结果以及索引编码后得到的编码结果进行 编码得到编码流。
对索引的编码可以采用定长编码或变长编码,具体可以如前述图 2所示的 实施例中描述的编码方式, 此处不再赞述。
511、 以唯一的变换矩阵进行变换, 并执行后续编码流程。
若候选变换矩阵为一个,则对于宏块或者宏块内每一个子块选择与残差纹 理预测方向相对应的变换矩阵, 进行变换操作, 并完成后续编码流程, 即对变 换结果进行编码得到编码流。
请参阅图 6, 对应的解码过程包括: 601、 解析 H.264规定的宏块头信息;
602、 解析用于表示候选变换矩阵数目的第一标志位;
本实施例中, 该第一标志位用于表明待解码宏块(116x16 )或宏块内各子 块(18x8、 14x4 )所使用的候选变换矩阵是一个还是多个, 具体的候选变换矩 阵的数目与前述图 3以及图 4中所描述的变换候选矩阵的含义相同,此处不再 赘述。
603、 判断候选矩阵数目是否为 1 , 若是, 则执行步骤 610, 若否, 则执行 步骤 604;
604、 获取残差纹理预测方向;
当对编码流进行解析后可以得到变换结果,同时还可能得到残差纹理预测 方向, 需要说明的是, 残差纹理预测方向除了通过对编码流的解析得到之外, 还可以从本地预置的信息中得到。
需要说明的是, 当从本地预置的信息中得到残差纹理预测方向时,具体可 以采用复用帧内预测或空域预测的方式获得,与前述图 2所示的实施例中描述 的内容相同, 此处不再赘述。
605、 解析用于表示方向是否一致的第二标志位;
该第二标志位用于表明残差纹理预测方向与编码变换矩阵的方向是否一 致。
606、 判断残差纹理预测方向与编码变换矩阵的方向是否一致, 若是, 则 执行步骤 607, 若否, 则执行步骤 608;
需要说明的是, 若在对编码流进行解析时获得了编码变换矩阵的索引, 则 说明残差纹理预测方向与编码变换矩阵的方向不一致,若在对编码流进行解析 时未获得编码变换矩阵的索引 ,则说明残差纹理预测方向与编码变换矩阵的方 向一致。
607、 以残差纹理预测方向对应的解码变换矩阵进行反变换, 并执行后续 解码流程;
若残差纹理预测方向与编码变换矩阵的方向一致,则可以直接才 据残差纹 理预测方向从候选变换矩阵中查找对应的解码变换矩阵,并用该解码变换矩阵 对解析得到的变换结果进行反变换得到残差信号 ,并通过该残差信号重建视频 数据。
608、 对编码变换矩阵的索引进行解码得到解码结果;
若残差纹理预测方向与编码变换矩阵的方向不一致,则需要对编码变换矩 阵的索引进行解码得到解码结果,可以采用定长解码或变长解码的方式对编码 变换矩阵的索引进行解码,具体过程与前述图 4所示的实施例中描述的内容相 同, 此处不再赘述。
609、 使用该解码结果对应的解码变换矩阵进行反变换, 并执行后续解码 流程;
确定了解码结果后,可以根据该解码结果从候选变换矩阵中查找对应的解 码变换矩阵, 该解码变换矩阵对解析得到的变换结果进行反变换得到残差信 号, 并通过该残差信号重建视频数据。
610、 以唯一的变换矩阵进行反变换, 并执行后续解码流程。
若候选变换矩阵为一个,则对于宏块或者宏块内每一个子块选择与残差纹 理预测方向相对应的变换矩阵,进行反变换操作得到残差信号, 并通过该残差 信号重建视频数据。
当编码端采用复用帧内预测的方式获取残差纹理预测方向,且通过定长编 码的方式对编码变换矩阵的索引进行编码时,可以对 H.264视频编码标准的语 法结构进行修改(仅以 I8x8MB为例), 修改后的语法结构如下表 1所示: 表 1
Figure imgf000014_0001
{
If( MbPartPredMode( mb_type,0 )== Intra— 8x8 )
For(luma8x8BlkIdx=0;luma8x8BlkIdx<4;luma8
x8BlokIdx++)
{
transform— mode8x8—is_pred[luma8x8BlkIdx] 2 f(l) 1 ae(v)
If (!
transform— mode8x8—is_pred[luma8x8BlkIdx])
rem transform mode8x8 [luma8x8BlkIdx] 2 u(3) 1 ae(v)
}
…… }
residual(0,0,15) 3 | 4
}
}
}
上述表 1中程序的含义如下表 2所示:
表 2
使用上下文自适 属于 2类语
编码宏块类型 应算数编码或者无符 法元素
号哥伦布码编码 如果宏块类型为 16x16帧内编码块,
或者 NxN帧内编码块
使用 1 比特定长 属于 2类
编码是否使用多变换基标志 码或上下文自适应算 语法元素
数编码编码
其它类型帧内编码模式的编码过程
(省略)
如果需要编码残差信号或者为 16x16 帧内编码块 {
使用上下文自适 编码宏块间量化参数差值 应算数编码或者有符 号哥伦布码编码 如果使用多个变换基
{
如果编码 8x8帧内编码块
{
遍历 4个 8x8子块
{
使用 1比特定长 编码纹理预测方向与变换方向是否一 属于 2类
码或上下文自适应算 致标志位 语法元素
数编码编码 如果编码纹理预测方向与变换方向不
一致
{
使用 3比特无符 属于 2类
编码变换索引 号定长码或上下文自 语法元素
适应算数编码编码
}
…… }
属于 3或 4
编码残差信号
类语法元素
}
}
} 实验中使用 KTA2.6rl为平台, 并采用以下设置: 全 I帧编码, CABAC, 每个序列都测试了 4个 QP点, 分别为 22, 27, 32, 37。 最后比较采用本方法 的变换方案与采用依赖于预测模式的方向性变换 ( MDDT, Mode-Dependent Directional Transform )的变换方案的编码性能, 计算相同峰值信噪比下的码率 节省 (BD-rate ), 具体的比较结果如下表 3所示:
表 3
Figure imgf000017_0001
从表 3中可以看出, 本发明的方案在各序列中, 均比 MDDT方案取得更 好的编码性能。
同时, 由于本发明实施例中的编码方案与序列的纹理特性密切相关, 所以 在高分辨率、 中高码率时可以取得更好的性能,例如在 1080P的视频数据编码 过程中, 实验条件同上, QP点分别为 22, 25 , 28, 31, 与 MDDT相比, 本 发明实施例中的编码方法所能进一步带来的编码性能增益如下表 4所示:
表 4
Figure imgf000017_0002
由上可知, 本发明实施例中的编码方法可以在各种条件下均提高编码性 上面对本发明实施例中的编码过程以及解码过程进行了详细的描述,下面 对本发明实施例中的相关装置进行描述, 请参阅图 7, 本发明实施例中的编码 装置包括:
残差处理单元 701 , 用于对输入的视频数据进行处理得到残差信号; 获取单元 702, 用于获取所述残差信号的残差纹理预测方向;
矩阵选取单元 703, 用于根据预置准则从所述视频数据对应的候选变换矩 阵中选择编码变换矩阵;
本实施例中的预置准则在实际应用中可以为 RDO准则, 可以理解的是, 同样可以为其他的最优化准则, 具体此处不作限定。
方向比较单元 704, 用于判断所述残差纹理预测方向与所述编码变换矩阵 的方向是否一致,若不一致,则触发索引编码单元以及变换单元执行相应操作; 索引编码单元 705 , 用于对所述编码变换矩阵的索引进行编码得到编码结 果;
变换单元 706, 用于采用所述编码变换矩阵对所述残差信号进行变换得到 变换结果;
数据编码单元 707, 用于对所述变换结果以及所述编码结果进行编码得到 编码流。
其中 ,获取单元 702获取残差信号的残差纹理预测方向的过程可以采用复 用帧内预测的方式或空域预测的方式进行获取,具体过程与前述图 2所示的实 施例中描述的内容一致, 此处不再赞述。
其中,索引编码单元 705对编码变换矩阵的索引进行编码得到编码结果的 过程可以采用定长编码或变长编码的方式,具体过程与前述图 2所示的实施例 中描述的内容一致, 此处不再赘述。
其中, 某些实施方式中, 当方向比较单元 704确定残差纹理预测方向与编 码变换矩阵的方向一致时,变换单元 706同样会采用编码变换矩阵对残差信号 进行变换得到变换结果,此外,数据编码单元 707会直接对该变换结果进行编 码得到编码流。
本实施例中, 在残差处理单元 701获得残差信号之后, 矩阵选取单元 703 可以根据预置准则从视频数据对应的候选变换矩阵中选择编码变换矩阵,当残 差纹理预测方向与编码变换矩阵的方向不一致时,变换单元 706仍然可以采用 编码变换矩阵对残差信号进行变换,索引编码单元 705对编码变换矩阵的索引 进行编码, 所以无需残差纹理预测方向和变换矩阵的方向保持一致, 因此, 无 论残差纹理预测方向与变换矩阵的方向是否一致,本实施例的方案均能有效适 用, 从而提高了编码性能;
其次, 当残差纹理预测方向与变换矩阵的方向一致时, 数据编码单元 707 只需要对变换结果进行编码得到编码流,而无需对编码变换矩阵的索引进行编 码, 所以减少了编码量, 进一步提高了编码性能。
请参阅图 8, 本发明实施例中的解码装置包括:
解析单元 801 , 用于对接收到的编码流进行解析, 得到变换结果; 索引解码单元 802, 用于当所述解析单元对所述编码流进行解析得到编码 变换矩阵的索引时,根据所述编码变换矩阵的索引从候选变换矩阵中选取解码 变换矩阵;
反变换单元 803 , 用于采用所述解码变换矩阵对所述变换结果进行反变换 得到残差信号;
重建单元 804, 用于根据所述残差信号重建视频数据。
本实施例中的解码装置还可以进一步包括:
方向解码单元 805, 用于当所述解析单元对所述编码流进行解析未得到编 码变换矩阵的索引时,根据预置的残差纹理预测方向从候选变换矩阵中选取解 码变换矩阵。
其中,解析单元 801在对接收到的编码流进行解析时, 除了可以得到变换 结果之外,还可能得到残差纹理预测方向, 若解析单元 801未解析得到残差纹 理预测方向, 则该残差纹理预测方向可以从本地获取得到,获取方式可以包括 复用帧内预测方式或空域预测方式,具体过程与前述图 2所示的实施例中描述 的预测方式相同, 此处不再赞述。
索引解码单元 802对编码变换矩阵的索引进行解码时可以采用定长解码 或变长解码,具体过程与前述图 4所示的实施例中描述的解码过程相同,此处 不再赘述。
本实施例中的解码装置能够配合前述图 7所示的实施例中的编码装置,可 以完成视频数据的编解码过程, 提高在编码过程中的编码性能。
本发明实施例还提供一种编解码系统, 请参阅图 9, 本发明实施例中的编 解码系统包括: 编码装置 901以及解码装置 902;
其中 , 编码装置 901可以是如图 Ί所示的编码装置;
解码装置 902可以是如图 8所示的解码装置。
具体的各装置的内部结构以及功能此处不再赘述。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分步骤 是可以通过程序来指令相关的硬件完成,所述的程序可以存储于一种计算机可 读存储介质中, 上述提到的存储介质可以是只读存储器, 磁盘或光盘等。
以上对本发明所提供的一种编码方法、 解码方法、 编码装置、 解码装置及 编解码系统进行了详细介绍,对于本领域的一般技术人员,依据本发明实施例 的思想, 在具体实施方式及应用范围上均会有改变之处, 综上所述, 本说明书 内容不应理解为对本发明的限制。

Claims

权 利 要 求
1、 一种编码方法, 其特征在于, 包括:
对输入的视频数据进行处理得到残差信号;
获取所述残差信号的残差纹理预测方向;
根据预置准则从所述视频数据对应的候选变换矩阵中选择编码变换矩阵; 若所述残差纹理预测方向与所述编码变换矩阵的方向不一致,则采用所述 编码变换矩阵对所述残差信号进行变换得到变换结果,对所述编码变换矩阵的 索引进行编码得到编码结果;
对所述变换结果以及所述编码结果进行编码得到编码流。
2、 根据权利要求 1所述的方法, 其特征在于, 所述获取残差信号的残差 纹理预测方向包括:
将所述视频数据的宏块的帧内预测方向作为所述残差纹理的预测方向; 或者,
将所述视频数据的宏块内的每一个子块的帧内预测方向作为所述残差纹 理的预测方向。
3、 根据权利要求 1所述的方法, 其特征在于, 所述获取残差信号的残差 纹理预测方向包括:
在所述视频数据中的待编码宏块或子块的上块、左块、左上块与右上块中, 若没有哪个块的帧内预测方向与其变换矩阵所对应的方向一致,或有两个 以上的块的帧内预测方向与其变换矩阵所对应的方向一致,则将帧内预测方向 作为残差纹理预测方向;
若只有一个块的帧内预测方向与其变换矩阵所对应的方向一致,则以该块 的帧内预测方向作为残差纹理预测方向。
4、 根据权利要求 1至 3中任一项所述的方法, 其特征在于, 所述对编码 变换矩阵的索引进行编码得到编码结果包括:
使用定长码对所述编码变换矩阵的索引进行编码得到编码结果。
5、 根据权利要求 1至 3中任一项所述的方法, 其特征在于, 所述对编码 变换矩阵的索引进行编码得到编码结果包括:
计算所述编码变换矩阵的索引与所述残差纹理预测方向的索引在空间域 的差值;
使用变长码对所述差值进行编码得到编码结果。
6、 根据权利要求 1所述的方法, 其特征在于, 所述方法还包括: 若所述残差纹理预测方向与所述编码变换矩阵的方向一致,则采用所述编 码变换矩阵对所述残差信号进行变换得到变换结果;
对所述变换结果进行编码得到编码流。
7、 一种解码方法, 其特征在于, 包括:
对接收到的编码流进行解析, 得到变换结果;
若对所述编码流进行解析还得到编码变换矩阵的索引 ,则根据所述编码变 换矩阵的索引从候选变换矩阵中选取解码变换矩阵;
采用所述解码变换矩阵对所述变换结果进行反变换得到残差信号,根据所 述残差信号重建视频数据。
8、 根据权利要求 7所述的方法, 其特征在于, 所述根据编码变换矩阵的 索引从候选变换矩阵中选取解码变换矩阵包括:
对所述编码变换矩阵的索引进行解码得到解码结果;
从候选变换矩阵中选取所述解码结果对应的解码变换矩阵。
9、 根据权利要求 8所述的方法, 其特征在于, 所述对编码变换矩阵的索 引进行解码得到解码结果包括:
使用定长码对所述编码变换矩阵的索引进行解码得到解码结果。
10、根据权利要求 8所述的方法, 其特征在于, 所述对编码变换矩阵的索 引进行解码得到解码结果包括:
使用变长码对所述编码变换矩阵的索引与预置的残差纹理预测方向在空 间域的差值进行解码得到解码结果。
11、 根据权利要求 7至 10中任一项所述的方法, 其特征在于,
若对所述编码流进行解析未得到编码变换矩阵的索引 ,则根据预置的残差 纹理预测方向从候选变换矩阵中选取解码变换矩阵;
采用所述解码变换矩阵对所述变换结果进行反变换得到残差信号 ,根据所 述残差信号重建视频数据。
12、 一种编码装置, 其特征在于, 包括:
残差处理单元, 用于对输入的视频数据进行处理得到残差信号; 获取单元, 用于获取所述残差信号的残差纹理预测方向;
矩阵选取单元,用于根据预置准则从所述视频数据对应的候选变换矩阵中 选择编码变换矩阵; 方向比较单元,用于判断所述残差纹理预测方向与所述编码变换矩阵的方 向是否一致, 若不一致, 则触发索引编码单元以及变换单元执行相应操作; 索引编码单元, 用于对所述编码变换矩阵的索引进行编码得到编码结果; 变换单元,用于采用所述编码变换矩阵对所述残差信号进行变换得到变换 结果;
数据编码单元,用于对所述变换结果以及所述编码结果进行编码得到编码 流。
13、 根据权利要求 12所述的编码装置, 其特征在于,
所述方向比较单元还用于当所述残差纹理预测方向与所述编码变换矩阵 的方向一致时, 触发变换单元执行相应操作;
所述数据编码单元还用于对所述变换结果进行编码得到编码流。
14、 一种解码装置, 其特征在于, 包括:
解析单元, 用于对接收到的编码流进行解析, 得到变换结果;
索引解码单元,用于当所述解析单元对所述编码流进行解析得到编码变换 矩阵的索引时,根据所述编码变换矩阵的索引从候选变换矩阵中选取解码变换 矩阵;
反变换单元,用于采用所述解码变换矩阵对所述变换结果进行反变换得到 残差信号;
重建单元, 用于根据所述残差信号重建视频数据。
15、 根据权利要求 14所述的解码装置, 其特征在于, 所述解码装置还包 括:
方向解码单元,用于当所述解析单元对所述编码流进行解析未得到编码变 换矩阵的索引时,根据预置的残差纹理预测方向从候选变换矩阵中选取解码变 换矩阵。
16、 一种编解码系统, 其特征在于, 包括:
如权利要求 12或 13所述的编码装置以及如权利要求 14或 15所述的解码 装置。
PCT/CN2011/073973 2010-06-11 2011-05-12 编码方法、解码方法、编码装置、解码装置及编解码系统 WO2011153888A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN 201010205093 CN102281435B (zh) 2010-06-11 2010-06-11 编码方法、解码方法、编码装置、解码装置及编解码系统
CN201010205093.3 2010-06-11

Publications (1)

Publication Number Publication Date
WO2011153888A1 true WO2011153888A1 (zh) 2011-12-15

Family

ID=45097520

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2011/073973 WO2011153888A1 (zh) 2010-06-11 2011-05-12 编码方法、解码方法、编码装置、解码装置及编解码系统

Country Status (2)

Country Link
CN (1) CN102281435B (zh)
WO (1) WO2011153888A1 (zh)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110731081B (zh) * 2017-12-26 2022-03-15 富士通株式会社 图像编码方法、装置以及电子设备
CN109788286B (zh) 2019-02-01 2021-06-18 北京大学深圳研究生院 一种编码、解码变换方法、系统、设备及计算机可读介质
JP7302037B2 (ja) * 2019-06-19 2023-07-03 エルジー エレクトロニクス インコーポレイティド 画像コーディングにおいて変換カーネルセットを表す情報のシグナリング

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1662066A (zh) * 2004-02-26 2005-08-31 中国科学院计算技术研究所 一种帧内预测模式选取方法
CN101222635A (zh) * 2008-01-24 2008-07-16 北京工业大学 帧内预测方法
WO2008132890A1 (ja) * 2007-04-16 2008-11-06 Kabushiki Kaisha Toshiba 画像符号化と画像復号化の方法及び装置
EP2046053A1 (en) * 2007-10-05 2009-04-08 Thomson Licensing Method and device for adaptively quantizing parameters for image coding
US20110090952A1 (en) * 2009-10-21 2011-04-21 Cohen Robert A Directional Transforms for Video and Image Coding
CN102045560A (zh) * 2009-10-23 2011-05-04 华为技术有限公司 一种视频编解码方法及设备

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8488668B2 (en) * 2007-06-15 2013-07-16 Qualcomm Incorporated Adaptive coefficient scanning for video coding
KR101328958B1 (ko) * 2007-10-19 2013-11-13 엘지전자 주식회사 이동 단말기 및 이동 단말기의 데이터 업로드 방법

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1662066A (zh) * 2004-02-26 2005-08-31 中国科学院计算技术研究所 一种帧内预测模式选取方法
WO2008132890A1 (ja) * 2007-04-16 2008-11-06 Kabushiki Kaisha Toshiba 画像符号化と画像復号化の方法及び装置
EP2046053A1 (en) * 2007-10-05 2009-04-08 Thomson Licensing Method and device for adaptively quantizing parameters for image coding
CN101222635A (zh) * 2008-01-24 2008-07-16 北京工业大学 帧内预测方法
US20110090952A1 (en) * 2009-10-21 2011-04-21 Cohen Robert A Directional Transforms for Video and Image Coding
CN102045560A (zh) * 2009-10-23 2011-05-04 华为技术有限公司 一种视频编解码方法及设备

Also Published As

Publication number Publication date
CN102281435A (zh) 2011-12-14
CN102281435B (zh) 2013-10-02

Similar Documents

Publication Publication Date Title
AU2010310286B2 (en) Method and device for encoding and decoding video
JP4927207B2 (ja) 符号化方法、復号化方法及び装置
JP5832646B2 (ja) ビデオ復号化方法及びビデオ復号化装置
US20060233250A1 (en) Method and apparatus for encoding and decoding video signals in intra-base-layer prediction mode by selectively applying intra-coding
KR101356207B1 (ko) 데이터 인코딩/디코딩 방법 및 장치
KR20110083366A (ko) 스킵 및 분할 순서를 고려한 비디오 부호화 방법과 그 장치, 및 비디오 복호화 방법과 그 장치
US10368086B2 (en) Image coding/decoding method, device, and system
US20140233643A1 (en) Transformation mode encoding and decoding method and apparatus
KR20110010324A (ko) 영상의 부호화 방법 및 장치, 영상 복호화 방법 및 장치
CN108353175B (zh) 使用系数引起的预测处理视频信号的方法和装置
KR101462637B1 (ko) 영상 부호화/복호화 방법 및 장치
CN108471531B (zh) 一种基于压缩感知的质量可分级快速编码方法
CN114786019A (zh) 图像预测方法、编码器、解码器以及存储介质
US20170223381A1 (en) Image coding and decoding methods and apparatuses
KR20080064008A (ko) 잔차 블록의 계수들에 대한 부호화 결정 방법, 장치,인코더 및 디코더
CN116055726A (zh) 一种低延迟分层视频编码方法、计算机设备及介质
CN110351552B (zh) 视频编码中一种快速编码方法
WO2011153888A1 (zh) 编码方法、解码方法、编码装置、解码装置及编解码系统
CN111669580A (zh) 进行编码和解码的方法、解码端、编码端和系统
KR20130006578A (ko) 비표준 벡터 양자화 코더를 이용한 비디오 표준을 따르는 레지듀얼 코딩
WO2021244586A1 (zh) 编解码方法及装置
CN109495745B (zh) 一种基于逆量化/逆变换的无损压缩解码方法
RU2795462C2 (ru) Способы кодирования и декодирования, кодер и декодер, и носитель данных
RU2777923C1 (ru) Способы кодирования и декодирования, кодер и декодер, и носитель данных
KR101436949B1 (ko) 영상 인코딩 방법 및 장치, 그리고 영상 처리 장치

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: 11791879

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: 11791879

Country of ref document: EP

Kind code of ref document: A1