WO2011124163A1 - 视频数据编码、解码方法及装置、变换处理方法及装置 - Google Patents

视频数据编码、解码方法及装置、变换处理方法及装置 Download PDF

Info

Publication number
WO2011124163A1
WO2011124163A1 PCT/CN2011/072621 CN2011072621W WO2011124163A1 WO 2011124163 A1 WO2011124163 A1 WO 2011124163A1 CN 2011072621 W CN2011072621 W CN 2011072621W WO 2011124163 A1 WO2011124163 A1 WO 2011124163A1
Authority
WO
WIPO (PCT)
Prior art keywords
block
prediction
information
transform base
current block
Prior art date
Application number
PCT/CN2011/072621
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 WO2011124163A1 publication Critical patent/WO2011124163A1/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/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods 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/12Selection 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/122Selection of transform size, e.g. 8x8 or 2x4x8 DCT; Selection of sub-band transforms of varying structure or type

Definitions

  • Video data encoding and decoding method and device, conversion processing method and device The present application claims to be submitted to the Chinese Patent Office on April 9, 2010, and the application number is 201010147588.5, and the invention name is "video data encoding, decoding method and device, and conversion processing method". 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 a video data encoding and decoding method and apparatus, a transform processing method and apparatus. Background technique
  • the transform coding technique is a technique of mapping spatial domain-related pixel points to another orthogonal vector space (transform domain or frequency domain), and reducing the correlation between the transformed coefficients, which eliminates image data by signal transformation. Spatial correlation.
  • transforms are often used to transform highly correlated data into correlation, data, and compress energy into fewer low frequency coefficients, which will facilitate subsequent quantization, ZigZag. Scanning and entropy coding.
  • the prior art 1 proposes a directional transform technique applied to intra prediction coding, that is, based on Mode Dependent Directional Transform (MDDT) technology.
  • each prediction mode represents one prediction direction (a total of nine prediction directions), and a corresponding set of transform bases is trained for each prediction mode, using the selected one in the intra prediction process.
  • the prediction mode i.e., the selected prediction direction
  • the transform base is selected according to the selected prediction mode, and only the intra prediction mode can correspond to the prediction direction, and the inter prediction cannot provide the direction information. Therefore, the MDDT technology can only be used in the intra prediction coding domain, and cannot be extended. In the field of interframe predictive coding.
  • a directional transform technique applied to interframe predictive coding uses a Rate-Distortion Optimization (RDO) method to select a transform base, and selects information (specifically, a transform base).
  • RDO Rate-Distortion Optimization
  • the indexed write data is passed to the decoder for guiding the selection of the transform base during the decoding process.
  • some bits are wasted in the encoding process to transmit part of the known information, which reduces the coding efficiency.
  • Embodiments of the present invention provide a video data encoding and decoding method and apparatus, and a transform processing method and apparatus for improving coding efficiency.
  • An embodiment of the present invention provides a video data encoding method, including:
  • the difference information is obtained according to the transform base corresponding to the prediction direction and the optimal transform base, The difference information is written into the encoded data;
  • Transform processing is performed according to the optimal transform base.
  • An embodiment of the present invention provides a video data decoding method, including:
  • the prediction direction of the current block is obtained according to the directivity information of the prediction block and/or the directivity information of the peripheral reconstructed block
  • the difference information obtained by decoding from the encoded data and the transform base corresponding to the prediction direction are obtained.
  • An embodiment of the present invention provides a transform processing method in an inter prediction technique, including: when obtaining a prediction direction of a current block according to directional information of a prediction block and/or directional information of a peripheral reconstructed block, The transform base corresponding to the prediction direction is subjected to transform processing or inverse transform processing.
  • An embodiment of the present invention provides a video data encoding apparatus, including:
  • a selection module configured to select an optimal transform base from one or more candidate transform bases
  • an obtaining module configured to: when obtaining a prediction direction of the current block according to the directionality information of the prediction block and/or the directionality information of the peripheral reconstruction block, according to the transform base corresponding to the prediction direction and the optimal transform base Difference information, the difference information is written into the encoded data;
  • a transform module configured to perform transform processing according to the optimal transform base.
  • An embodiment of the present invention provides a video data decoding apparatus, including:
  • an obtaining module configured to: when obtaining a prediction direction of the current block according to the directionality information of the prediction block and/or the directionality information of the peripheral reconstruction block, according to the difference information decoded from the encoded data, and the prediction direction The transform base, to obtain the optimal transform base;
  • the first inverse transform module is configured to perform inverse transform processing according to the optimal transform base.
  • the embodiment of the present invention provides a transform processing apparatus in an inter prediction technique, including: an obtaining module, configured to obtain a prediction of a current block according to directionality information of a prediction block and/or directionality information of a peripheral reconstruction block. In the direction, obtaining a transform base corresponding to the prediction direction;
  • the first processing module is configured to perform transform processing or inverse transform processing according to the transform base corresponding to the prediction direction.
  • the corresponding processing is performed according to the transform base corresponding to the prediction direction.
  • the directionality information of the prediction block and/or the directional information of the peripheral reconstruction block include prediction information, which is available at the codec end, and does not need to be written into the coded data, thereby reducing the amount of information that needs to be transmitted. , thereby saving coding bits and improving coding efficiency.
  • FIG. 1 is a flowchart of a video data encoding method according to an embodiment of the present invention
  • FIG. 2 is a flowchart of a video data encoding method according to Embodiment 2 of the present invention.
  • FIG. 3 is a flowchart of a method for encoding video data according to Embodiment 3 of the present invention.
  • FIG. 4 is a flowchart of a method for decoding video data according to Embodiment 4 of the present invention.
  • FIG. 5 is a flowchart of a video data decoding method according to Embodiment 5 of the present invention.
  • FIG. 6 is a flowchart of a method for decoding video data according to Embodiment 6 of the present invention.
  • FIG. 7 is a flow chart of a transform processing method in an inter prediction technique according to Embodiment 7 of the present invention.
  • FIG. 8 is a flow chart of a transform processing method in an inter prediction technique according to Embodiment 8 of the present invention.
  • FIG. 9 is a flow chart of a transform processing method in an inter prediction technique according to Embodiment 9 of the present invention.
  • FIG. 10 is a schematic structural diagram of a video data encoding apparatus according to Embodiment 10 of the present invention
  • FIG. 11 is a schematic structural diagram of a video data encoding apparatus according to Embodiment 11 of the present invention
  • FIG. 12 is a video data according to Embodiment 12 of the present invention
  • FIG. 13 is a schematic structural diagram of a video data decoding apparatus according to Embodiment 13 of the present invention
  • FIG. 14 is a schematic structural diagram of a video data decoding apparatus according to Embodiment 14 of the present invention
  • FIG. 16 is a schematic structural diagram of a video data decoding apparatus according to Embodiment 15
  • FIG. 16 is a schematic structural diagram of a transform processing apparatus in an inter prediction method according to Embodiment 16 of the present invention
  • Figure 18 is a block diagram showing the structure of a transform processing apparatus in the interframe prediction technique according to the eighteenth embodiment of the present invention. detailed description
  • the directional transform base refers to a transform base having a directional characteristic
  • the non-directional transform base refers to a transform base having no directional feature.
  • the transform bases specified in the existing standards are non-directional transforms.
  • Base for example: DCT transform base in H.264/AVC.
  • FIG. 1 is a flowchart of a video data encoding method according to an embodiment of the present invention. As shown in FIG. 1, the embodiment specifically includes the following steps:
  • Step 101 Select an optimal transform base from one or more candidate transform bases.
  • more than one transform base is pre-trained, and these transform bases are all directional transform bases.
  • the one or more directional transform bases can be used as the candidate transform base.
  • the one or more directional transform bases may be used together with the non-directional transform base as the candidate transform base.
  • the optimal transform base is selected from these candidate transform bases.
  • Step 102 When the prediction direction of the current block is obtained according to the directivity information of the predicted block and/or the directivity information of the peripheral reconstructed block, the difference information is obtained according to the transform base corresponding to the prediction direction and the optimal transform base. The difference information is written into the encoded data.
  • the directionality information of the prediction block is the time domain correlation information of the current block
  • the directionality information of the peripheral reconstruction block is the spatial correlation information.
  • the directionality information of the prediction block and/or the direction of the surrounding reconstruction block may be used. The information is obtained, and the prediction direction of the current block is obtained, and the difference information written in the encoded data is referenced to the transform base corresponding to the prediction direction.
  • Step 103 Perform transform processing according to an optimal transform base.
  • This embodiment can be applied to an interframe predictive coding technique.
  • motion estimation is first performed to obtain motion information, and motion information is obtained.
  • write the encoded data construct a prediction value, obtain a residual according to the predicted value and the original value; then perform transform processing on the residual according to the optimal transform base obtained in this embodiment; finally perform quantization processing and entropy encoding to complete the encoding process,
  • the encoded data including the motion information, the difference information, and the residual is delivered to the decoding end.
  • FIG. 2 is a flowchart of a video data encoding method according to Embodiment 2 of the present invention. As shown in FIG. 2, the embodiment specifically includes the following steps:
  • Step 201 Select an optimal transform base from one or more candidate transform bases, and further, select a transform coefficient scan mode from one or more candidate transform coefficient scan modes.
  • a plurality of sequences are pre-selected for encoding, and more than one transform base is trained as a candidate transform base, and the candidate transform bases are all directional transform bases, and a training base is trained.
  • the above transform coefficient scanning mode is used as the scanning mode of the candidate transform coefficient, and specifically the following method can be adopted:
  • the texture directivity detection is performed according to the residual value of the predicted value and the original value, and the detected directivity information is classified, and a set of residuals corresponding to each direction is trained to obtain one or more transforms corresponding to the direction.
  • a base separable transform base or non-separable transform base
  • one or more transform coefficient scan modes corresponding thereto, thereby obtaining one or more transform bases and one or more transform coefficient scan modes.
  • the transform base with the best rate distortion is obtained as the optimal transform base according to the RDO principle, and the embodiment may select the corresponding transform base corresponding to the optimal transform base.
  • Transform coefficient scanning method the transform base and the non-directional transform base trained in the offline state can also be used as the candidate transform base, and the optimal transform base and the corresponding transform coefficient scan mode are selected from the RDO principle, wherein the non-directional transform
  • the base may be some known transform bases provided in existing standards, such as the DCT transform base provided by H.264/AVC.
  • the specific method may be: traversing the above-mentioned candidate transform bases, respectively performing a transform operation on the residuals of the current block to be encoded, obtaining a code rate and a distortion degree, and substituting the code rate (R) and the distortion degree (D) into the cost function.
  • the transform base with the smallest cost function value is selected as the rate distortion optimal transform base.
  • Step 202 Obtain the prediction directivity information of the current block according to the directionality information of the neighboring reconstructed block, where the prediction directivity information of the current block includes a prediction direction of the current block or a direction indicating that the prediction direction of the current block does not exist. Second indication information.
  • the so-called peripheral reconstruction block refers to a known image block adjacent to the current block, such as a left adjacent block of the current block (referred to as a left block), an upper right adjacent block (referred to as an upper right block), and an upper left adjacent block (called
  • the directionality information of the neighboring reconstructed block is the spatial correlation information of the current block, and the spatial correlation information is used to obtain the prediction directionality of the current block. information.
  • the directivity information of the peripheral reconstructed block includes index information of the peripheral reconstructed block transform base, that is, an index of the transform base used when the peripheral reconstructed block performs transform processing.
  • the second indication information is obtained; when the peripheral reconstructed block of the current block exists, and the index information of the peripheral reconstructed block transform base indicates that the peripheral reconstructed block transform base is a non-directional transform Base time, obtaining second indication information; when the peripheral reconstructed block of the current block exists, and the index information of the peripheral reconstructed block transform base indicates that the peripheral reconstructed block transform base is a directional transform base, according to the peripheral reconstructed block transform base
  • the corresponding direction gets the prediction direction of the current block.
  • the following takes the peripheral reconstruction block including the left block and the upper block as an example to illustrate the process of extracting the prediction directivity information of the current block.
  • the second indication information is obtained; the upper block and the left block of the current block do not exist, indicating that the current block is at the left edge and the upper edge, and for the current block at this position, it
  • the predicted directional information is the second indication information, that is, its prediction direction does not exist.
  • the index information of the block transform base indicates that the block transform base is a non-directional transform base, indicating that the block has no direction
  • the second indication information is obtained.
  • the index information of the upper block transform base indicates that the upper block transform base is a non-directional transform base
  • the index information of the left block transform base indicates that the left block transform base is a non-directional transform base.
  • the index information of the block transform base indicates that the block transform base is a directional transform base
  • the direction in which the prediction direction of the current block is one of the directions is obtained;
  • the direction is the upper block direction.
  • the index information of the left block transform base indicates that the left block transform base is a directional transform base. That is, the direction of the upper block and the left block exist. If the left block direction is the horizontal direction or the upper block direction is not the vertical direction, the current block prediction direction is the left block direction; if the left block direction is not the horizontal direction and the upper block If the direction is vertical, the prediction direction of the current block is the upper block direction; the upper block and the left block of the current block exist, indicating that the current block is not at the upper edge nor at the left edge.
  • the method for obtaining the prediction directivity information of the current block according to the directivity information of the left block and the upper block is only a specific example.
  • the embodiment is not limited thereto.
  • the right upper block and the upper left block may also be referred to.
  • the directional information of the other peripheral reconstructed blocks acquires the prediction directivity information of the current block.
  • Step 203 When the prediction directivity information of the current block is the prediction direction of the current block, the prediction direction of the current block is obtained according to the directivity information of the surrounding reconstructed block, and the index and the most of the transform base corresponding to the prediction direction are obtained.
  • the difference value of the index of the excellent transform base is used as the difference information, and the difference information is written into the encoded data.
  • the difference between the index of the transform base corresponding to the prediction direction and the index of the optimal transform base may be obtained as the difference information, and the difference information is written into the encoded data.
  • the index of the transform base corresponding to the prediction direction and the direction difference of the index of the optimal transform base may be obtained as difference information, and the difference information is written into the encoded data.
  • the direction difference between the index of the transform base corresponding to the prediction direction and the index of the optimal transform base may be obtained by checking the direction difference table.
  • the index of the transform base corresponding to the prediction direction and the index of the index of the optimal transform base have less information amount, and the coded bits can be saved.
  • Step 204 When the prediction directivity information of the current block is the second indication information, that is, there is no prediction direction of the current block, the index of the optimal transform base is written into the encoded data.
  • Step 205 Perform transform processing by using an optimal transform base and a transform coefficient scan manner.
  • the embodiment may further include: setting the flag bit according to whether the optimal transform base is a non-directional transform base, and writing the flag bit into the encoded data. If the transform base and the non-directional transform base obtained by training in the offline state are taken as the candidate transform base, and the selected optimal transform base may be a non-directional transform base, the flag position may be set to "1". ", the flag bit is written into the encoded data, in this case, steps 202, 203, and 204 are not performed, and step 205 is performed; if the selected optimal transform base is not a non-directional transform base, the flag bit can be set. Writing a value of "0" to the encoded data, and then performing steps 202-205
  • This embodiment can be applied to an interframe predictive coding technique.
  • motion estimation is first performed to obtain motion information, and motion information is obtained.
  • write the encoded data construct a prediction value, obtain a residual according to the predicted value and the original value; then perform transform processing on the residual according to the optimal transform base obtained in this embodiment; finally perform quantization processing and entropy encoding to complete the encoding process,
  • the encoded data including the motion information, the difference information, and the residual is delivered to the decoding end.
  • the video data encoding method provided in this embodiment obtains a prediction direction of the current block according to the directional information of the peripheral reconstructed block, and obtains a difference between an index of the transform base corresponding to the prediction direction and an index of the optimal transform base, and the difference is
  • this embodiment considers the spatial phase of the current block.
  • the visibility information is obtained by the prediction direction, and the difference between the index of the transform base corresponding to the prediction direction and the index of the index of the optimal transform base is written into the encoded data, and the difference is smaller than that of the index of the transform base in the prior art.
  • the coding bits are saved and the coding efficiency is improved.
  • FIG. 3 is a flowchart of a method for encoding video data according to Embodiment 3 of the present invention. As shown in FIG. 3, the embodiment specifically includes the following steps:
  • Step 301 Select an optimal transform base from one or more candidate transform bases, and further, select a transform coefficient scan mode from one or more candidate transform coefficient scan modes.
  • a plurality of sequences are pre-selected for encoding, and more than one transform base is trained as a candidate transform base, and the candidate transform bases are all directional transform bases, and a training base is trained.
  • the above-mentioned transform coefficient scanning mode is used as the scanning mode of the candidate transform coefficient.
  • the transform base with the best rate distortion is obtained as the optimal transform base according to the RDO principle, and the embodiment may select the corresponding transform base corresponding to the optimal transform base.
  • Transform coefficient scanning method In this embodiment, the transform base and the non-directional transform base trained in the offline state can also be used as the candidate transform base, and the optimal transform base and the corresponding transform coefficient scan mode are selected from the RDO principle. For the specific method, refer to the description of the second embodiment.
  • Step 302 Perform texture direction detection on the prediction block to obtain directionality information of the prediction block, where the directionality information of the prediction block includes a direction of the prediction block or first indication information indicating that the direction of the prediction block does not exist.
  • the texture direction detection may be performed on the prediction block by using any one of the following two methods: (1) Using a Directional Gradient Operator (DGO) method: First, a plurality of direction modes are preset. For each direction mode, calculate the difference between each point on each "direction line", calculate the absolute error sum, and get the gradient (Gdir) on each "direction line". The direction with the strongest gradient (i.e., having the largest gradient value) is selected as the direction of the prediction block, and the direction of the prediction block is the directionality information of the prediction block.
  • DGO Directional Gradient Operator
  • the maximum gradient value is greater than K times the minimum gradient value, where K>l, such as ⁇ 0.1; ii.
  • the direction of the maximum gradient value is perpendicular or nearly perpendicular to the direction of the minimum gradient value; Iii.
  • the maximum gradient value is greater than the set threshold.
  • the directionality information of the prediction block is obtained as first indication information, where the first indication information is used to indicate that the direction of the prediction block does not exist.
  • the SAD in each prediction mode is calculated according to the nine prediction modes selected in the intra 4x4 mode, and specifically, the block edge value may be used as a difference between each point on the "direction line” or the "direction line” may be used.
  • the mean value of the point is compared with each point on the "direction line", and the SAD is normalized to take the direction in which the SAD value is the smallest. If the direction in which the SAD value is the smallest is the direction corresponding to the DC prediction mode, the direction of the prediction block is indicated. If no, the directional information of the predicted block is obtained as the first indication information; otherwise, the direction in which the SAD value is the smallest is the direction of the prediction block, and the direction of the prediction block is the directional information of the prediction block.
  • Step 303 Obtain prediction direction information of the current block according to the directivity information of the prediction block, where the prediction directivity information of the current block includes a prediction direction of the current block or a second direction indicating that the prediction direction of the current block does not exist. Instructions.
  • the prediction directivity information of the current block is obtained as the second indication information; when the directivity information of the prediction block is the direction of the prediction block, the prediction direction of the current block is obtained as a prediction.
  • the direction of the block that is, the prediction directivity information of the current block is the direction of the prediction block.
  • the directionality information of the prediction block is the time domain correlation information of the current block. In this embodiment, the time domain correlation information can be considered to obtain the prediction directionality information of the current block.
  • the step may be: obtaining prediction directivity information of the current block according to the directivity information of the prediction block and the directivity information of the peripheral reconstructed block.
  • the directionality information of the prediction block is the time domain correlation information of the current block
  • the directionality information of the peripheral reconstruction block is the spatial correlation information of the current block.
  • the time domain correlation information and spatial correlation may also be considered in this embodiment.
  • the information gets the predicted directional information of the current block.
  • the directivity information of the peripheral reconstructed block includes index information of the peripheral reconstructed block transform base, that is, an index of the transform base used when the peripheral reconstructed block performs transform processing.
  • the second indication information is obtained;
  • the index information of the peripheral reconstructed block transform base Indicate the periphery
  • the reconstructed block transform base is a non-directional transform base, and when the directivity information of the prediction block is the first indication information, the second indication information is obtained; when the peripheral reconstructed block of the current block does not exist, and the directivity information of the prediction block is When predicting the direction of the block, the prediction direction of the current block is obtained as the direction of the prediction block; when the peripheral reconstructed block of the current block exists, the index information of the peripheral reconstructed block transform base indicates that the peripheral reconstructed block transform base is a directional transform base.
  • the prediction direction of the current block is obtained according to the direction corresponding to the peripheral reconstruction block transformation base; when the peripheral reconstruction block of the current block exists, the index of the peripheral reconstruction block transformation base.
  • the information indicates that the peripheral reconstructed block transform base is a directional transform base, and when the directivity information of the prediction block is the direction of the prediction block, the prediction direction of the current block is obtained according to the direction corresponding to the peripheral reconstructed block transform base and the direction of the prediction block.
  • the following takes the peripheral reconstruction block including the left block and the upper block as an example to illustrate the process of extracting the prediction directivity information of the current block.
  • the second indication information is obtained.
  • the upper block and the left block of the current block do not exist, indicating that the current block is at the left edge and the upper edge, and the direction of the prediction block does not exist.
  • the prediction directivity information of the current block is obtained as the second indication information, that is, The prediction direction of the current block does not exist.
  • the index information of the existing block transform base indicates that the transform base is a non-directional transform base, and when the directivity information of the prediction block is the first indication information, The second indication information is obtained.
  • the index information of the existing block transform base indicates that the transform base is a directional transform base, and when the directivity information of the prediction block is the first indication information, the current block is obtained.
  • the direction of prediction is the direction of one of them.
  • the upper block of the current block exists and the left block does not exist, indicating that the current block is at the left edge, and the prediction direction of the current block is the upper block direction, and the left block of the current block exists and the upper block exists. Does not exist, indicating that the current block is at the top edge, and the prediction direction of the current block is the direction of the left block.
  • the prediction direction of the current block is obtained as the direction of the predicted block.
  • the upper block and the left block of the current block do not exist, indicating that the current block is at the left edge and the upper edge. In this case, if the direction of the prediction block exists, the prediction direction of the current block is the direction of the prediction block.
  • the index information of the existing block transform base indicates that it is changed.
  • the base change is a directional transform base
  • the directivity information of the prediction block is the first indication information
  • the prediction direction of the current block is the left block direction
  • the prediction direction of the current block is the upper block direction.
  • the upper block and the left block of the current block exist, indicating that the current block is not at the upper edge or at the left edge.
  • the direction of the prediction block In the case where the direction of the prediction block does not exist, first check whether the direction of the left block is horizontal, and if so, The prediction direction is the direction of the left block (ie, the horizontal direction); otherwise, it is examined whether the direction of the upper block is vertical, and if so, its prediction direction is the direction of the upper block (ie, the vertical direction), otherwise its prediction direction is left. Block direction.
  • the index information of the existing block transform base indicates that the transform base is a directional transform base, and if the directionality information of the prediction block is the direction of the prediction block, if the left block exists And the direction of the left block is the horizontal direction, and the prediction direction of the current block is the direction of the left block; if the upper block exists and the direction of the upper block is the vertical direction, the prediction direction of the current block is the direction of the upper block; otherwise, the prediction direction of the current block To predict the direction of the block. If the left block of the current block exists and the upper block does not exist, the current block is at the upper edge.
  • the prediction direction of the current block is the left block direction (ie, the horizontal direction); if the upper block of the current block Exist and the left block does not exist, indicating that the current block is at the left edge. If the upper block direction is vertical, the prediction direction of the current block is the upper block direction (ie, the vertical direction); otherwise, the current situation The prediction direction of the block is the direction of the prediction block.
  • the index information of the existing block transform base indicates that the transform base is a directional transform base, and the direction information of the prediction block is the direction of the prediction block, if the block direction, left If the block direction is the same as any two of the directions of the prediction block, the prediction direction of the current block is the direction; otherwise, if the left block direction is the horizontal direction, the prediction direction of the current block is the left block direction, and if the left block direction is not
  • the horizontal direction and the upper block direction are vertical directions, and the prediction direction of the current block is the upper block direction. If the left block direction is not the horizontal direction and the upper block direction is not the vertical direction, the prediction direction of the current block is the prediction block. direction.
  • the upper block and the left block of the current block exist, indicating that the current block is not at the upper edge or at the left edge. If the direction of the predicted block also exists, then: first, the direction of the upper block, the direction of the left block, and the direction of the predicted block are examined. Whether any two directions are the same, if any, the prediction direction of the current block is the direction; otherwise, whether the direction of the left block is horizontal, and if so, the prediction direction of the current block is the direction of the left block; otherwise, Whether the upper block direction is vertical, and if so, the prediction direction of the current block is the upper block direction; otherwise, otherwise The prediction direction of the current block is the direction in which the 'j block is predicted.
  • the method for obtaining the prediction directivity information of the current block according to the directivity information of the left block and the upper block and the directivity information of the prediction block is only a specific example.
  • the embodiment is not limited thereto, and in practical applications, reference may also be made.
  • the directivity information of other peripheral reconstructed blocks such as the upper right block and the upper left block and the directivity information of the predicted block acquire the predicted directivity information of the current block.
  • Step 304 When the prediction directivity information of the current block is the prediction direction of the current block, the current directivity information of the predicted block (or the directivity information of the prediction block and the directivity information of the peripheral reconstructed block) is obtained.
  • the prediction direction of the block is obtained by using the difference between the index of the transform base corresponding to the prediction direction and the index of the optimal transform base as the difference information, and the difference information is written into the encoded data.
  • the difference between the index of the transform base corresponding to the prediction direction and the index of the optimal transform base may be obtained as the difference information, and the difference information is written into the encoded data.
  • the index of the transform base corresponding to the prediction direction and the direction difference of the index of the optimal transform base may be obtained as difference information, and the difference information is written into the encoded data.
  • the direction difference between the index of the transform base corresponding to the prediction direction and the index of the optimal transform base can be obtained by looking up the direction difference table. See Example 2 for a corresponding example.
  • the index of the transform base corresponding to the prediction direction and the index of the index of the optimal transform base have less information amount, and the coded bits can be saved.
  • Step 305 When the prediction directivity information of the current block is the second indication information, that is, there is no prediction direction of the current block, and the index of the optimal transform base is written into the encoded data.
  • Step 306 Perform transform processing by using an optimal transform base and a transform coefficient scan manner.
  • the embodiment may further include: setting the flag bit according to whether the optimal transform base is a non-directional transform base, and writing the flag bit into the encoded data. If the transform base and the non-directional transform base obtained by training in the offline state are taken as the candidate transform base, and the selected optimal transform base may be a non-directional transform base, the flag position may be set to "1". ", the flag is written into the encoded data, in this case, steps 302, 303, 304, and 305 are not performed, and step 306 is directly performed; if the selected optimal transform base is not a non-directional transform base, then The flag bit is set to "0", the flag bit is written into the encoded data, and then steps 302-306 are performed.
  • This embodiment can be applied to an interframe predictive coding technique.
  • motion estimation is first performed to obtain motion information, and motion information is obtained.
  • write the encoded data construct a prediction value, obtain a residual according to the predicted value and the original value; then perform transform processing on the residual according to the optimal transform base obtained in this embodiment; finally perform quantization processing and entropy encoding to complete the encoding process,
  • the encoded data including the motion information, the difference information, and the residual is delivered to the decoding end.
  • the video data encoding method provided by this embodiment may obtain the prediction direction of the current block according to the directional information of the prediction block, consider the time domain correlation information of the current block, and index and the optimal transform base of the transform base corresponding to the prediction direction.
  • the difference of the index is written into the encoded data, and the difference is smaller than that of the index of the transform base in the prior art, the coded bits are saved, and the coding efficiency is improved.
  • the prediction direction of the current block is obtained according to the directivity information of the prediction block and the directivity information of the peripheral reconstructed block, and the time domain correlation information and the spatial correlation information of the current block are considered, and the spatiotemporal correlation information includes Predictive information, which is available at the same time as the codec end, does not need to be written into the encoded data, thus reducing the amount of information that needs to be transmitted, thereby saving coding bits and improving coding efficiency.
  • FIG. 4 is a flowchart of a method for decoding video data according to Embodiment 4 of the present invention. As shown in FIG. 4, the embodiment specifically includes the following steps:
  • Step 401 When obtaining a prediction direction of the current block according to the directivity information of the prediction block and/or the directivity information of the peripheral reconstructed block, according to the difference information decoded from the encoded data and the transform base corresponding to the prediction direction, The optimal transform base is obtained.
  • the directionality information of the prediction block is the time domain correlation information of the current block
  • the directionality information of the peripheral reconstruction block is the spatial correlation information.
  • the directionality information of the prediction block and/or the direction of the surrounding reconstruction block may be used. Sex information, get the prediction direction of the current block. Then, the difference information is decoded from the encoded data, and the optimal transform base is obtained according to the difference information and the transform base corresponding to the prediction direction.
  • Step 402 Perform inverse transform processing according to an optimal transform base.
  • This embodiment can be applied to the inter-prediction decoding technology.
  • the encoded data is first decoded to obtain motion information and difference. Value information and residuals, performing inverse quantization processing on the residuals; then performing inverse transform processing on the residuals according to the optimal transform base obtained in the embodiment; according to the processed residuals, The motion information and the difference information reconstruct the current block to complete the decoding process.
  • the video data decoding method provided in this embodiment when obtaining the prediction direction of the current block according to the directionality information of the prediction block and/or the directionality information of the peripheral reconstruction block, according to the difference information decoded from the encoded data
  • the transform base corresponding to the prediction direction is obtained, and the optimal transform base is obtained, and the inverse transform process is performed according to the optimal transform base.
  • the time domain correlation information or the spatial correlation information of the current block or both are considered to obtain the prediction direction.
  • the difference information and the prediction direction are used to obtain an optimal transform base, and the inverse transform process is completed.
  • the difference information has less information, saves coding bits, and improves. effectiveness.
  • FIG. 5 is a flowchart of a method for decoding video data according to Embodiment 5 of the present invention. As shown in FIG. 5, the embodiment specifically includes the following steps:
  • Step 501 Obtain the prediction directivity information of the current block according to the directionality information of the neighboring reconstructed block, where the prediction directivity information of the current block includes a prediction direction of the current block or a direction indicating that the prediction direction of the current block does not exist. Second indication information.
  • the so-called peripheral reconstruction block refers to a known image block adjacent to the current block, such as the left block, the upper right block, the upper left block, and the upper block of the current block, and the directional information of the peripheral reconstructed block is the spatial correlation of the current block.
  • this embodiment considers the time domain correlation information to obtain the prediction directivity information of the current block.
  • the directivity information of the peripheral reconstructed block includes index information of the peripheral reconstructed block transform base, that is, an index of the transform base used when the peripheral reconstructed block performs transform processing.
  • the second indication information is obtained; when the peripheral reconstructed block of the current block exists, and the index information of the peripheral reconstructed block transform base indicates that the peripheral reconstructed block transform base is a non-directional transform Base time, obtaining second indication information; when the peripheral reconstructed block of the current block exists, and the index information of the peripheral reconstructed block transform base indicates that the peripheral reconstructed block transform base is a directional transform base, according to the peripheral reconstructed block transform base
  • the corresponding direction gets the prediction direction of the current block.
  • the following takes the peripheral reconstruction block including the left block and the upper block as an example to illustrate the process of extracting the prediction directivity information of the current block.
  • the second indication information is obtained; the upper block and the left block of the current block do not exist, indicating that the current block is at the left edge and the upper edge, and for the current block at this position, it
  • the predicted directional information is the second indication information, that is, its prediction direction does not exist.
  • the block transform base is a non-directional transform base, indicating that the block does not have a direction, and the second indication information is obtained.
  • the index information of the upper block transform base indicates that the upper block transform base is a non-directional transform base
  • the index information of the left block transform base indicates that the left block transform base is a non-directional transform base.
  • the index information of the block transform base indicates that the block transform base is a directional transform base
  • the direction in which the prediction direction of the current block is one of the directions is obtained;
  • the index information of the left block transform base indicates that the left block transform base is a directional transform base. That is, the direction of the upper block and the left block exist. If the left block direction is the horizontal direction or the upper block direction is not the vertical direction, the current block prediction direction is the left block direction; if the left block direction is not the horizontal direction and the upper block If the direction is vertical, the prediction direction of the current block is the upper block direction; the upper block and the left block of the current block exist, indicating that the current block is not at the upper edge nor at the left edge.
  • the method for obtaining the prediction directivity information of the current block according to the directivity information of the left block and the upper block is only a specific example.
  • the embodiment is not limited thereto.
  • the right upper block and the upper left block may also be referred to.
  • the directional information of the other peripheral reconstructed blocks acquires the prediction directivity information of the current block.
  • Step 502 When the prediction directivity information of the current block is the prediction direction of the current block, the prediction direction of the current block is obtained according to the directivity information of the peripheral reconstructed block, according to the difference obtained by decoding from the encoded data or The index of the transform base corresponding to the direction difference and the prediction direction obtains an index of the optimal transform base, and the optimal transform base is obtained according to the index of the optimal transform base.
  • the sum of the above-mentioned difference and the index of the transform base corresponding to the prediction direction is the optimal transform base.
  • the direction difference table is checked to obtain an index of the optimal transform base.
  • Step 503 When the prediction directivity information of the current block is the second indication information, that is, there is no prediction direction of the current block, and the index of the optimal transform base is decoded from the encoded data, thereby obtaining an optimal transform base.
  • Step 504 Perform inverse transform processing by using an optimal transform base and a transform coefficient scan method corresponding thereto.
  • the embodiment may further include: decoding the flag bit from the encoded data, if the flag bit is "0", performing steps 501-504; if the flag bit is "1",
  • the transform base used for the encoding is a non-directional transform base. Then, in this embodiment, steps 501-504 are not performed, and the non-directional transform base is directly used for inverse transform processing.
  • This embodiment can be applied to the inter-prediction decoding technology.
  • the encoded data is first decoded to obtain motion information and difference. Value information and residuals, performing inverse quantization processing on the residuals; then performing inverse transform processing on the residuals according to the optimal transform base obtained in this embodiment; reconstructing the current block according to the processed residual, motion information, and difference information, Complete the decoding process.
  • the video data decoding method provided in this embodiment obtains the prediction direction corresponding to the prediction direction according to the difference information decoded from the encoded data when the prediction direction of the current block is obtained according to the directionality information of the peripheral reconstructed block.
  • the optimal transform base performs inverse transform processing according to the optimal transform base.
  • the spatial correlation information of the current block is considered, and the optimal transform base can be obtained by using the difference information and the prediction direction, and the inverse transform processing is completed.
  • the value information has less information, saves coding bits, and improves efficiency.
  • FIG. 6 is a flowchart of a method for decoding video data according to Embodiment 6 of the present invention. As shown in FIG. 6, the embodiment specifically includes the following steps:
  • Step 601 Perform texture direction detection on the prediction block to obtain directionality information of the prediction block, where the directionality information of the prediction block includes a direction of the prediction block or a first indication information indicating that the direction of the prediction block does not exist.
  • the texture direction detection may be performed on the prediction block by using any of the following two methods: (1) Directional Gradient Operator (DGO) is adopted.
  • DGO Directional Gradient Operator
  • DGO Directional Gradient Operator
  • the maximum gradient value is greater than K times the minimum gradient value, where K>l, such as ⁇ 1; ii.
  • K>l such as ⁇ 1; ii.
  • the direction of the maximum gradient value is perpendicular or nearly perpendicular to the direction of the minimum gradient value;
  • the maximum gradient value is greater than the set threshold.
  • the directionality information of the prediction block is obtained as first indication information, where the first indication information is used to indicate that the direction of the prediction block does not exist.
  • the SAD in each prediction mode is calculated according to the nine prediction modes selected in the intra 4x4 mode, and specifically, the block edge value may be used as a difference between each point on the "direction line” or the "direction line” may be used.
  • the mean value of the point is compared with each point on the "direction line", and the SAD is normalized to take the direction in which the SAD value is the smallest. If the direction in which the SAD value is the smallest is the direction corresponding to the DC prediction mode, the direction of the prediction block is indicated. If no, the directional information of the predicted block is obtained as the first indication information; otherwise, the direction in which the SAD value is the smallest is the direction of the prediction block, and the direction of the prediction block is the directional information of the prediction block.
  • Step 602 Obtain prediction direction information of the current block according to the directivity information of the prediction block, where the prediction directivity information of the current block includes a prediction direction of the current block or a second direction indicating that the prediction direction of the current block does not exist. Instructions.
  • the prediction directivity information of the current block is obtained as the second indication information; when the directivity information of the prediction block is the direction of the prediction block, the prediction direction of the current block is obtained as a prediction.
  • the direction of the block that is, the prediction directivity information of the current block is the direction of the prediction block.
  • the directionality information of the prediction block is the time domain correlation information of the current block. In this embodiment, the time domain correlation information can be considered to obtain the prediction directionality information of the current block.
  • the step may be: obtaining prediction directivity information of the current block according to the directivity information of the prediction block and the directivity information of the peripheral reconstructed block.
  • the directionality information of the prediction block is the time domain correlation information of the current block
  • the directionality information of the peripheral reconstruction block is the spatial correlation information of the current block.
  • the time domain correlation information and spatial correlation may also be considered in this embodiment.
  • the information gets the predicted directional information of the current block.
  • the directivity information of the peripheral reconstructed block includes index information of the peripheral reconstructed block transform base, that is, an index of the transform base used when the peripheral reconstructed block performs transform processing.
  • the second indication information is obtained;
  • the index information of the peripheral reconstructed block transform base Indicates that the neighboring reconstructed block transform base is a non-directional transform base, and when the directivity information of the prediction block is the first indication information, the second indication information is obtained; when the peripheral reconstructed block of the current block does not exist, and the direction of the prediction block is predicted
  • the sex information is the direction of the prediction block, the prediction direction of the current block is the direction of the prediction block.
  • the index information of the peripheral reconstruction block transformation base indicates that the peripheral reconstruction block transformation base is directional. a transform base, and when the directivity information of the prediction block is the first indication information, the prediction direction of the current block is obtained according to the direction corresponding to the peripheral reconstructed block transform base; when the peripheral reconstructed block of the current block exists, the peripheral reconstructed block transform base
  • the index information indicates that the peripheral reconstructed block transform base is a directional transform base, and when the directionality information of the prediction block is the direction of the prediction block, Direction and the prediction block based transform the prediction direction corresponding to the current block is obtained.
  • the following takes the peripheral reconstruction block including the left block and the upper block as an example to illustrate the process of extracting the prediction directivity information of the current block.
  • the second indication information is obtained.
  • the upper block and the left block of the current block do not exist, indicating that the current block is at the left edge and the upper edge, and the direction of the prediction block does not exist.
  • the prediction directivity information of the current block is obtained as the second indication information, that is, The prediction direction of the current block does not exist.
  • the index information of the existing block transform base indicates that the transform base is a non-directional transform base, and when the directivity information of the prediction block is the first indication information, The second indication information is obtained.
  • the index information of the existing block transform base indicates that the transform base is a directional transform base, and when the directivity information of the prediction block is the first indication information, the current block is obtained.
  • the direction of prediction is the direction of one of them.
  • the upper block of the current block exists and the left block does not exist, indicating that the current block is at the left edge, and the current block
  • the prediction direction is the upper block direction.
  • the left block of the current block exists and the upper block does not exist, indicating that the current block is at the upper edge, and the prediction direction of the current block is the left block direction.
  • the prediction direction of the current block is obtained as the direction of the predicted block.
  • the upper block and the left block of the current block do not exist, indicating that the current block is at the left edge and the upper edge. In this case, if the direction of the prediction block exists, the prediction direction of the current block is the direction of the prediction block.
  • the index information of the existing block transform base indicates that the transform base is a directional transform base, and if the directivity information of the predictive block is the first indication information, if the left block direction is horizontal If the direction or the upper block direction is not the vertical direction, the prediction direction of the current block is the left block direction; if the left block direction is not the horizontal direction and the upper block direction is the vertical direction, the prediction direction of the current block is the upper block direction.
  • the upper block and the left block of the current block exist, indicating that the current block is not at the upper edge or at the left edge.
  • the direction of the prediction block In the case where the direction of the prediction block does not exist, first check whether the direction of the left block is horizontal, and if so, The prediction direction is the direction of the left block (ie, the horizontal direction); otherwise, it is examined whether the direction of the upper block is vertical, and if so, its prediction direction is the direction of the upper block (ie, the vertical direction), otherwise its prediction direction is left. Block direction.
  • the index information of the existing block transform base indicates that the transform base is a directional transform base, and if the directionality information of the prediction block is the direction of the prediction block, if the left block exists And the direction of the left block is the horizontal direction, and the prediction direction of the current block is the direction of the left block; if the upper block exists and the direction of the upper block is the vertical direction, the prediction direction of the current block is the direction of the upper block; otherwise, the prediction direction of the current block To predict the direction of the block. If the left block of the current block exists and the upper block does not exist, the current block is at the upper edge.
  • the prediction direction of the current block is the left block direction (ie, the horizontal direction); if the upper block of the current block Exist and the left block does not exist, indicating that the current block is at the left edge. If the upper block direction is vertical, the prediction direction of the current block is the upper block direction (ie, the vertical direction); otherwise, the current situation The prediction direction of the block is the direction of the prediction block.
  • the index information of the existing block transform base indicates that the transform base is a directional transform base, and the direction information of the prediction block is the direction of the prediction block, if the block direction, left If the block direction is the same as any two of the directions of the prediction block, the prediction direction of the current block is the direction; otherwise, if the left block direction is the horizontal direction, the prediction direction of the current block is the left block direction, and if the left block direction is not For the horizontal direction and the upper block direction is the vertical direction, the prediction of the current block The direction is the upper block direction. If the left block direction is not the horizontal direction and the upper block direction is not the vertical direction, the prediction direction of the current block is the direction of the prediction block.
  • the upper block and the left block of the current block exist, indicating that the current block is not at the upper edge or at the left edge. If the direction of the predicted block also exists, then: first, the direction of the upper block, the direction of the left block, and the direction of the predicted block are examined. Whether any two directions are the same, if any, the prediction direction of the current block is the direction; otherwise, whether the direction of the left block is horizontal, and if so, the prediction direction of the current block is the direction of the left block; otherwise, Whether the upper block direction is a vertical direction, and if so, the prediction direction of the current block is the upper block direction; otherwise, the prediction direction of the current block is the direction of the preview block.
  • the method for obtaining the prediction directivity information of the current block according to the directivity information of the left block and the upper block and the directivity information of the prediction block is only a specific example.
  • the embodiment is not limited thereto, and in practical applications, reference may also be made.
  • the directivity information of other peripheral reconstructed blocks such as the upper right block and the upper left block and the directivity information of the predicted block acquire the predicted directivity information of the current block.
  • Step 603 When the prediction directivity information of the current block is the prediction direction of the current block, the current directivity information of the predicted block (or the directivity information of the prediction block and the directivity information of the peripheral reconstructed block) is obtained.
  • the prediction direction of the block is decoded from the encoded data to obtain the difference information, and the sum of the index of the transform base corresponding to the prediction direction and the difference information is obtained to obtain an index of the optimal transform base, thereby obtaining an optimal transform base.
  • Step 604 When the prediction directivity information of the current block is the second indication information, that is, there is no prediction direction of the current block, and the index of the optimal transform base is decoded from the encoded data, thereby obtaining an optimal transform base.
  • Step 605 Perform inverse transform processing by using an optimal transform base and a transform coefficient scan method corresponding thereto.
  • the embodiment may further include: decoding the flag bit from the encoded data, and if the flag bit is "0", performing steps 601-605; if the flag bit is "1",
  • the transform base used for the encoding is a non-directional transform base. Then, in this embodiment, steps 601-605 are not performed, and the non-directional transform base is directly used for inverse transform processing.
  • This embodiment can be applied to the inter-prediction decoding technology.
  • the encoded data is first decoded to obtain motion information and difference. Value information and residuals, inverse quantizing the residuals;
  • the optimal transform base obtained in this embodiment performs inverse transform processing on the residual; reconstructs the current block according to the processed residual, motion information, and difference information, and completes the decoding process.
  • the video data decoding method provided in this embodiment may obtain the prediction direction of the current block according to the directional information of the prediction block, consider the time domain correlation information of the current block, and calculate the difference information and the prediction direction according to the decoding from the encoded data.
  • the corresponding transform base obtains an optimal transform base, and performs inverse transform processing according to the optimal transform base. Compared with the selection information of the transform base in the prior art, the difference information has less information, saves coding bits, and improves effectiveness.
  • the prediction direction of the current block is obtained according to the directivity information of the prediction block and the directivity information of the peripheral reconstructed block, and the time domain correlation information and the spatial correlation information of the current block are considered, and the spatiotemporal correlation information includes
  • the prediction information which is available at the same time as the codec end, does not need to be written into the encoded data, thus reducing the amount of information that needs to be transmitted, thereby saving coding bits and improving efficiency.
  • FIG. 7 is a flow chart of a transform processing method in an inter prediction technique according to Embodiment 7 of the present invention. As shown in FIG. 7, the embodiment specifically includes the following steps:
  • Step 701 When the prediction direction of the current block is obtained according to the directionality information of the prediction block and/or the directionality information of the neighboring reconstruction block, the transform base corresponding to the prediction direction is obtained.
  • the texture directivity detection is performed according to the residual value of the predicted value and the original value, and the detected directivity information is classified, for each group of the corresponding group
  • the difference is trained to obtain one or more transform bases (separable transform bases or inseparable transform bases) corresponding to the direction and one or more transform coefficient scan modes corresponding thereto.
  • the transform base corresponding to the prediction direction is searched from the training base obtained by the training.
  • Step 702 Perform transform processing or inverse transform processing according to a transform base corresponding to the prediction direction.
  • the present embodiment can be applied to the inter-prediction coding and decoding technology, and specifically performs the transform processing or the inverse transform processing on the residual by using the transform processing method provided in this embodiment. In this way, both the encoding end and the decoding end can obtain the transform base of the transform operation, without writing the selection information of the transform base in the encoded data, saving the coding bits and improving the coding efficiency.
  • FIG. 8 is a flowchart of a transform processing method in an inter prediction technique according to Embodiment 8 of the present invention; Figure. As shown in FIG. 8, the embodiment specifically includes the following steps:
  • Step 801 Obtain the prediction directivity information of the current block according to the directionality information of the neighboring reconstructed block, where the prediction directivity information of the current block includes a prediction direction of the current block or a direction indicating that the prediction direction of the current block does not exist. Second indication information.
  • step 202 For the specific implementation process of this step, refer to the related description in step 202 of the foregoing embodiment, and details are not described herein again.
  • Step 802 When the prediction directivity information of the current block is the prediction direction of the current block, the prediction direction of the current block is obtained according to the directivity information of the peripheral reconstructed block, and the transform base corresponding to the prediction direction is obtained, according to the prediction direction.
  • the corresponding transform base performs transform processing or inverse transform processing.
  • the texture directivity detection is performed according to the residual value of the predicted value and the original value, and the detected directivity information is classified, for each group of the corresponding group
  • the difference is trained to obtain one or more transform bases (separable transform bases or inseparable transform bases) corresponding to the direction and one or more transform coefficient scan modes corresponding thereto.
  • the transform base corresponding to the prediction direction is searched from the transform base obtained by the training.
  • Step 803 When the prediction directivity information of the current block is the second indication information, that is, there is no prediction direction of the current block, and transform processing or inverse transform processing is performed according to the non-directional transform base.
  • the present embodiment can be applied to the inter-prediction coding and decoding technology, and specifically performs the transform processing or the inverse transform processing on the residual by using the transform processing method provided in this embodiment.
  • the spatial correlation information of the current block is considered to obtain a prediction direction, and both the encoding end and the decoding end can obtain the transform base of the transform operation, and the selection information of the transform base is not required to be written in the encoded data, thereby saving coding bits and improving. Coding efficiency.
  • FIG. 9 is a flow chart of a transform processing method in an inter prediction technique according to Embodiment 9 of the present invention. As shown in FIG. 9, the embodiment specifically includes the following steps:
  • Step 901 Perform texture direction detection on the prediction block to obtain directionality information of the prediction block, where the directionality information of the prediction block includes a direction of the prediction block or first indication information indicating that the direction of the prediction block does not exist.
  • Step 902 Obtain prediction direction information of the current block according to the directivity information of the prediction block, where the prediction directivity information of the current block includes a prediction direction of the current block or a second direction indicating that the prediction direction of the current block does not exist. Instructions.
  • the step may be: obtaining prediction directivity information of the current block according to the directivity information of the prediction block and the directivity information of the peripheral reconstructed block.
  • Step 903 When the prediction directivity information of the current block is the prediction direction of the current block, the current direction information of the predicted block (or the directivity information of the prediction block and the directivity information of the peripheral reconstructed block) is obtained.
  • the prediction direction of the block is obtained by acquiring a transform base corresponding to the prediction direction, and performing transform processing or inverse transform processing according to the transform base corresponding to the prediction direction.
  • the texture directivity detection is performed according to the residual value of the predicted value and the original value, and the detected directivity information is classified, for each group of the corresponding group
  • the difference is trained to obtain one or more transform bases (separable transform bases or inseparable transform bases) corresponding to the direction and one or more transform coefficient scan modes corresponding thereto.
  • the transform base corresponding to the prediction direction is searched from the training base obtained by the training.
  • Step 904 When the prediction directivity information of the current block is the second indication information, that is, there is no prediction direction of the current block, and transform processing or inverse transform processing is performed according to the non-directional transform base.
  • the present embodiment can be applied to the inter-prediction coding and decoding technology, and specifically performs the transform processing or the inverse transform processing on the residual by using the transform processing method provided in this embodiment.
  • the time domain correlation information (or spatial correlation information and time domain correlation information) of the current block is considered to obtain a prediction direction, and both the encoding end and the decoding end can obtain a transform base of the transform operation, without writing in the encoded data.
  • the selection information of the transform base is saved, the coded bits are saved, and the coding efficiency is improved.
  • FIG. 10 is a schematic structural diagram of a video data encoding apparatus according to Embodiment 10 of the present invention. As shown in FIG. 10, the embodiment includes: a selection module 11, an obtaining module 12, and a transform module 13; wherein: the selecting module 11 is configured to select an optimal transform base from one or more candidate transform bases;
  • the obtaining module 12 is configured to reconstruct the direction of the block according to the directional information of the predicted block and/or the surrounding Sex information, when the prediction direction of the current block is obtained, the difference information is obtained according to the transform base and the optimal transform base corresponding to the prediction direction, and the difference information is written into the encoded data;
  • the transform module 13 is operative to perform transform processing based on the optimal transform base.
  • the selection module 11 selects an optimal transform base from the selected transform bases obtained by training in the offline state, and the difference information written in the encoded data by the obtaining module 12 refers to the transform base corresponding to the prediction direction, and the transform module 13
  • the optimal transform base performs transform processing.
  • the time domain correlation information or the spatial correlation information of the current block or both are considered, and the prediction information corresponding to the prediction direction and the difference information of the optimal transform base are written into the encoded data, and the difference is Compared with the selection information of the transform base in the prior art, the value information has less information, saves coding bits, and improves coding efficiency.
  • FIG. 11 is a schematic structural diagram of a video data encoding apparatus according to Embodiment 11 of the present invention.
  • the obtaining module 12 is specifically configured to: when obtaining the prediction direction of the current block according to the directionality information of the surrounding reconstructed block, obtain an index and an optimal transform of the transform base corresponding to the prediction direction.
  • the difference or direction difference of the index of the base is used as difference information, and the difference information is written into the encoded data.
  • the embodiment may further include: a first prediction module 21, configured to obtain, according to the directionality information of the neighboring reconstructed block, prediction direction information of the current block, and prediction direction information of the current block.
  • the directivity information of the peripheral reconstructed block includes index information of the peripheral reconstructed block transform base, that is, an index of the transform base used when the peripheral reconstructed block performs transform processing.
  • the first prediction module 21 learns that when the peripheral reconstructed block of the current block does not exist, the second indication information is obtained; when the peripheral reconstructed block of the current block exists, and the index information of the peripheral reconstructed block transform base indicates the peripheral reconstructed block transform
  • the base is a non-directional transform base
  • the second indication information is obtained; when the peripheral reconstructed block of the current block exists, and the index information of the peripheral reconstructed block transform base indicates that the peripheral reconstructed block transform base is a directional transform base
  • the prediction direction of the current block is obtained according to the direction corresponding to the surrounding reconstructed block transform base.
  • the embodiment may further include: a setting module 22, configured to set a flag bit according to whether the optimal transform base is a non-directional transform base, and write the flag bit into the encoded data.
  • a setting module 22 configured to set a flag bit according to whether the optimal transform base is a non-directional transform base, and write the flag bit into the encoded data.
  • the embodiment may further include: a writing module, configured to be used by the first prediction module 21 When the obtained prediction directivity information is the second indication information, the index of the optimal transform base is written into the encoded data.
  • the selection module 11 can also be used to select a transform coefficient scan mode from one or more candidate transform coefficient scan modes, and the transform module 13 can be specifically configured to perform transform processing according to the optimal transform base and the transform coefficient scan mode.
  • the spatial correlation information of the current block is used to obtain a prediction direction, and the difference between the index of the transform base corresponding to the prediction direction and the index of the optimal transform base is written into the encoded data, and the difference is compared with the transform base in the prior art. Compared with the index, the amount of information is reduced, the coding bits are saved, and the coding efficiency is improved.
  • FIG. 12 is a schematic structural diagram of a video data encoding apparatus according to Embodiment 12 of the present invention.
  • the obtaining module 12 is specifically configured to obtain the prediction direction of the current block according to the directionality information of the prediction block, or the directionality information of the prediction block and the directionality information of the surrounding reconstructed block.
  • the difference information is written into the encoded data.
  • the embodiment may further include: a detecting module 31 and a second predicting module 32, where:
  • the detecting module 31 is configured to perform texture direction detection on the prediction block to obtain directional information of the prediction block, where the directionality information of the prediction block includes a direction of the prediction block or first indication information indicating that the direction of the prediction block does not exist;
  • the second prediction module 32 is configured to obtain, according to the directionality information of the prediction block, or the directionality information of the prediction block and the directionality information of the neighboring reconstruction block, the prediction directionality information of the current block, where the prediction directionality information of the current block includes the current The prediction direction of the block or the second indication information indicating that the prediction direction of the current block does not exist.
  • the detecting module 31 may perform a texture direction detection on the prediction block by using a gradient direction detection method to obtain directionality information of the prediction block, wherein the gradient direction detection method satisfies at least one of the following constraints: The maximum gradient value is greater than the minimum gradient value K times; the direction of the maximum gradient value is perpendicular or nearly perpendicular to the direction of the minimum gradient value; the maximum gradient value is greater than the set threshold; or, check
  • the measurement module 31 performs texture direction detection on the prediction block according to the directional absolute error sum of the prediction block, and obtains directionality information of the prediction block.
  • the second prediction module 32 determines that the directivity information of the prediction block is the first indication information
  • the second indication information is obtained.
  • the second prediction module 32 determines that the directivity information of the prediction block is the direction of the prediction block.
  • the prediction direction of the current block is obtained as the direction of the prediction block.
  • the directivity information of the peripheral reconstructed block includes index information of the peripheral reconstructed block transform base, that is, an index of the transform base used when the peripheral reconstructed block performs transform processing.
  • the second prediction module 32 learns that when the peripheral reconstructed block of the current block does not exist, and the directivity information of the predicted block is the first indication information, the second indication information is obtained; when the peripheral reconstructed block of the current block exists, the peripheral reconstruction
  • the index information of the block transform base indicates that the peripheral reconstructed block transform base is a non-directional transform base, and when the directivity information of the prediction block is the first indication information, the second indication information is obtained; when the peripheral reconstructed block of the current block does not exist
  • the index information of the peripheral reconstruction block transformation base indicates the peripheral reconstruction
  • the block transform base is a directional transform base, and when the directivity information of the predicted block is the first indication information, the second indication information is obtained; when the peripheral reconstructed block of the current block exists, the peripheral reconstruction
  • the index information of the block transform base
  • the embodiment may further include: a setting module 33, configured to set a flag bit according to whether the optimal transform base is a non-directional transform base, and write the flag bit into the encoded data.
  • a setting module 33 configured to set a flag bit according to whether the optimal transform base is a non-directional transform base, and write the flag bit into the encoded data.
  • the embodiment may further include: a writing module, configured to: when the prediction directivity information obtained by the second prediction module 32 is the second indication information, write an index of the optimal transform base into the encoded data.
  • a writing module configured to: when the prediction directivity information obtained by the second prediction module 32 is the second indication information, write an index of the optimal transform base into the encoded data.
  • the selection module 11 can also be used to select a transform coefficient scan mode from one or more candidate transform coefficient scan modes, and the transform module 13 can be specifically configured to perform transform processing according to the optimal transform base and the transform coefficient scan mode.
  • the video data encoding apparatus may obtain the prediction direction of the current block according to the directivity information of the prediction block, consider the time domain correlation information of the current block, and convert the index of the transform base corresponding to the prediction direction and the optimal transform base.
  • the difference of the index is written into the encoded data, and the difference is smaller than that of the index of the transform base in the prior art, the coded bits are saved, and the coding efficiency is improved.
  • the prediction direction of the current block is obtained according to the directivity information of the prediction block and the directivity information of the peripheral reconstructed block, and the time domain correlation information and the spatial correlation information of the current block are considered, and the spatiotemporal correlation information includes Predictive information, which is available at the same time as the codec end, does not need to be written into the encoded data, thus reducing the amount of information that needs to be transmitted, thereby saving coding bits and improving coding efficiency.
  • FIG. 13 is a schematic structural diagram of a video data decoding apparatus according to Embodiment 13 of the present invention.
  • the embodiment includes: an obtaining module 41 and a first inverse transform module 42, wherein: the obtaining module 41 is configured to obtain, according to the directionality information of the prediction block and/or the directionality information of the peripheral reconstructed block, When the prediction direction of the current block is obtained, an optimal transform base is obtained according to the difference information decoded from the encoded data and the transform base corresponding to the prediction direction;
  • the first inverse transform module 42 is operative to perform an inverse transform process based on the optimal transform base.
  • the time domain correlation information or the spatial correlation information of the current block or both are considered to obtain the prediction direction, and the difference information and the prediction direction are used to obtain an optimal transform base, and the inverse transform processing is completed.
  • the value information has less information, saves coding bits, and improves efficiency.
  • FIG. 14 is a schematic structural diagram of a video data decoding apparatus according to Embodiment 14 of the present invention.
  • the obtaining module 41 may be specifically configured to: when obtaining the prediction direction of the current block according to the directionality information of the peripheral reconstructed block, according to the difference obtained by decoding from the encoded data or The index of the transform base corresponding to the direction difference and the prediction direction obtains an index of the optimal transform base, and the optimal transform base is obtained according to the index of the optimal transform base.
  • the embodiment may further include: the first prediction module 51 is configured to obtain, according to the directionality information of the neighboring reconstructed block, the predicted directivity information of the current block, where the predicted directivity information of the current block includes The prediction direction of the current block or the second indication information indicating that the prediction direction of the current block does not exist.
  • the directivity information of the peripheral reconstructed block includes an index information of the peripheral reconstructed block transform base.
  • Information that is, the index of the transform base used when the peripheral reconstructed block performs transform processing.
  • the second indication information when the peripheral reconstructed block of the current block does not exist, obtaining the second indication information; when the peripheral reconstructed block of the current block exists, and the index information of the peripheral reconstructed block transform base indicates that the peripheral reconstructed block transform base is non-directional
  • the second indication information is obtained; when the peripheral reconstructed block of the current block exists, and the index information of the peripheral reconstructed block transform base indicates that the peripheral reconstructed block transform base is a directional transform base, The direction corresponding to the block transform base obtains the prediction direction of the current block.
  • the embodiment may further include: a decoding module 52 and a second inverse transform module 53, wherein: the decoding module 52 is configured to decode the flag bit from the encoded data;
  • the second inverse transform module 53 is configured to perform a inverse transform process based on the non-directional transform base when the transform base used for parsing according to the flag bit is a non-directional transform base.
  • the decoding module 52 may be further configured to: when the prediction directivity information of the current block is the second indication information, the index of the optimal transform base decoded from the encoded data, thereby obtaining an optimal transform base.
  • the first inverse transform module 42 in this embodiment may be specifically configured to perform inverse transform processing according to an optimal transform base and a transform coefficient scan manner corresponding to the optimal transform base.
  • the spatial correlation information of the current block is considered, and the optimal transform base is obtained by using the difference information and the prediction direction, and the inverse transform processing is completed, and the difference information is compared with the selection information of the transform base in the prior art.
  • the amount of information is small, saving coded bits and improving efficiency.
  • FIG. 15 is a schematic structural diagram of a video data decoding apparatus according to Embodiment 15 of the present invention.
  • the obtaining module 41 may be specifically configured to obtain the current block according to the directionality information of the prediction block, or the directionality information of the prediction block and the directionality information of the surrounding reconstructed block.
  • an index of the optimal transform base is obtained according to the difference value or the direction difference value decoded from the encoded data and the index of the transform base corresponding to the prediction direction, and the optimal transform base is obtained according to the index of the optimal transform base.
  • the embodiment may further include: a detecting module 61 and a second predicting module 62, where:
  • the detecting module 61 is configured to perform texture direction detection on the prediction block to obtain directionality information of the prediction block, where the directionality information of the prediction block includes a direction of the prediction block or indicates that the direction of the prediction block does not exist.
  • the second prediction module 62 is configured to obtain, according to the directionality information of the prediction block, or the directionality information of the prediction block and the directionality information of the neighboring reconstruction block, the prediction directionality information of the current block, where the prediction directionality information of the current block includes the current The prediction direction of the block or the second indication information indicating that the prediction direction of the current block does not exist.
  • the detecting module 61 may perform a texture direction detection on the prediction block by using a gradient direction detection method to obtain directionality information of the prediction block, wherein the gradient direction detection method satisfies at least one of the following restrictions: The maximum gradient value is greater than the minimum gradient value K times; the maximum gradient value direction is perpendicular or nearly perpendicular to the direction of the minimum gradient value; the maximum gradient value is greater than the set threshold; or, the detecting module 61 performs texture direction detection on the prediction block according to the directional direct error sum of the prediction block, Obtain the directional information of the prediction block.
  • the second prediction module 62 determines that the directivity information of the prediction block is the first indication information
  • the second indication information is obtained.
  • the second prediction module 62 determines that the directivity information of the prediction block is the direction of the prediction block.
  • the prediction direction of the current block is obtained as the direction of the prediction block.
  • the second prediction module 62 learns that when the peripheral reconstructed block of the current block does not exist, and the directivity information of the predicted block is the first indication information, the second indication information is obtained; when the perimeter of the current block is heavy
  • the index information of the peripheral reconstructed block transform base indicates that the peripheral reconstructed block transform base is a non-directional transform base, and when the directivity information of the predictive block is the first indication information, the second indication information is obtained;
  • the neighboring reconstructed block does not exist, and when the directionality information of the predicted block is the direction of the predicted block, the prediction direction of the current block is obtained as the direction of the prediction block; when the peripheral reconstructed block of the current block exists, the peripheral reconstructed block transform base
  • the index information indicates that the peripheral reconstructed block transform base is a directional transform base, and when the directivity information of the predictive block is the first indication information, the prediction direction of the current block is obtained according to the direction corresponding to the peripheral reconstructed block transform base;
  • the embodiment may further include: a decoding module 63 and a second inverse transform module 64, where: the decoding module 63 is configured to decode the flag bit from the encoded data;
  • the second inverse transform module 64 is configured to use the transform base used for parsing according to the flag bit to the code
  • the directional transform base performs inverse transform processing based on the non-directional transform base.
  • the decoding module 63 may be further configured to: when the prediction directivity information of the current block is the second indication information, the index of the optimal transform base decoded from the encoded data, thereby obtaining an optimal transform base.
  • the first inverse transform module 42 in this embodiment may be specifically configured to perform inverse transform processing according to an optimal transform base and a transform coefficient scan manner corresponding to the optimal transform base.
  • the video data decoding apparatus may obtain the prediction direction of the current block according to the directivity information of the prediction block, consider the time domain correlation information of the current block, and calculate the difference information and the prediction direction according to the decoding from the encoded data.
  • the corresponding transform base obtains an optimal transform base, and performs inverse transform processing according to the optimal transform base. Compared with the selection information of the transform base in the prior art, the difference information has less information, saves coding bits, and improves effectiveness.
  • the prediction direction of the current block is obtained according to the directivity information of the prediction block and the directivity information of the peripheral reconstructed block, and the time domain correlation information and the spatial correlation information of the current block are considered, and the spatiotemporal correlation information includes
  • the prediction information which is available at the same time as the codec end, does not need to be written into the encoded data, thus reducing the amount of information that needs to be transmitted, thereby saving coding bits and improving efficiency.
  • Figure 16 is a block diagram showing the structure of a transform processing apparatus in an inter prediction technique according to a sixteenth embodiment of the present invention. As shown in FIG. 16, the embodiment includes: an acquisition module 71 and a first processing module 72, wherein:
  • the first processing module 72 is configured to perform transform processing or inverse transform processing according to the transform base corresponding to the prediction direction.
  • the embodiment can be applied to the inter-prediction encoding and decoding technology, so that both the encoding end and the decoding end can obtain the transforming base of the transform operation, without writing the selection information of the transform base in the encoded data, saving coding bits and improving The coding efficiency.
  • the obtaining module 71 is specifically used when When the prediction direction of the current block is obtained according to the directionality information of the neighboring reconstructed block, the transform base corresponding to the prediction direction is obtained.
  • the embodiment may further include: a prediction module 81, configured to obtain, according to the directionality information of the neighboring reconstructed block, the predicted directionality information of the current block, where the predicted directionality information of the current block includes the current The prediction direction of the block or the second indication information indicating that the prediction direction of the current block does not exist.
  • a prediction module 81 configured to obtain, according to the directionality information of the neighboring reconstructed block, the predicted directionality information of the current block, where the predicted directionality information of the current block includes the current The prediction direction of the block or the second indication information indicating that the prediction direction of the current block does not exist.
  • the directivity information of the peripheral reconstructed block includes index information of the peripheral reconstructed block transform base, that is, an index of the transform base used when the peripheral reconstructed block performs transform processing.
  • the prediction module 81 learns that when the peripheral reconstructed block of the current block does not exist, the second indication information is obtained; when the peripheral reconstructed block of the current block exists, and the index information of the peripheral reconstructed block transform base indicates that the peripheral reconstructed block transform base is When the non-directional transform base is used, the second indication information is obtained; when the peripheral reconstructed block of the current block exists, and the index information of the peripheral reconstructed block transform base indicates that the peripheral reconstructed block transform base is a directional transform base, The direction corresponding to the block transform base obtains the prediction direction of the current block.
  • the embodiment may further include: a second processing module 82, configured to perform transform processing or inverse transform processing according to the non-directional transform base when the predicted directivity information of the current block is the second indication information.
  • a second processing module 82 configured to perform transform processing or inverse transform processing according to the non-directional transform base when the predicted directivity information of the current block is the second indication information.
  • the present embodiment can be applied to the inter-prediction coding and decoding technology, and specifically uses the transform processing apparatus provided in this embodiment to perform transform processing or inverse transform processing on the residual.
  • the spatial correlation information of the current block is considered to obtain a prediction direction, and both the encoding end and the decoding end can obtain the transform base of the transform operation, and the selection information of the transform base is not required to be written in the encoded data, thereby saving coding bits and improving. Coding efficiency.
  • Figure 18 is a block diagram showing the structure of a transform processing apparatus in the interframe prediction technique according to the eighteenth embodiment of the present invention.
  • the obtaining module 71 is specifically configured to obtain a prediction of the current block according to the directionality information of the prediction block, or the directionality information of the prediction block and the directionality information of the surrounding reconstructed block. In the direction, the transform base corresponding to the prediction direction is obtained.
  • the embodiment may further include: a detecting module 91 and a prediction module 92, where: The detecting module 91 is configured to perform texture direction detection on the prediction block to obtain directionality information of the prediction block, where the directionality information of the prediction block includes a direction of the prediction block or first indication information indicating that the direction of the prediction block does not exist;
  • the prediction module 92 is configured to obtain, according to the directionality information of the prediction block, or the directionality information of the prediction block and the directionality information of the neighboring reconstruction block, the prediction directionality information of the current block, where the prediction directionality information of the current block includes the current block.
  • the prediction direction or the second indication information indicating that the prediction direction of the current block does not exist.
  • the detecting module 91 may perform a texture direction detection on the prediction block by using a gradient direction detection method to obtain directionality information of the prediction block, wherein the gradient direction detection method satisfies at least one of the following constraints: The maximum gradient value is greater than the minimum gradient value K times; the maximum gradient value direction is perpendicular or nearly perpendicular to the direction of the minimum gradient value; the maximum gradient value is greater than the set threshold; or, the detecting module 91 performs texture direction detection on the prediction block according to the directional direct error sum of the prediction block, Obtain the directional information of the prediction block.
  • the prediction module 92 determines that the directivity information of the prediction block is the first indication information
  • the second indication information is obtained; and the prediction module 92 determines that the directivity information of the prediction block is the direction of the preview block. , get the prediction direction of the current block as the direction of the pre-j block.
  • the directivity information of the peripheral reconstructed block includes index information of the peripheral reconstructed block transform base, that is, an index of the transform base used when the peripheral reconstructed block performs transform processing.
  • the prediction module 92 learns that when the peripheral reconstructed block of the current block does not exist, and the directivity information of the predicted block is the first indication information, the second indication information is obtained; when the peripheral reconstructed block of the current block exists, the peripheral reconstructed block transform
  • the index information of the base indicates that the peripheral reconstructed block transform base is a non-directional transform base, and when the directivity information of the prediction block is the first indication information, the second indication information is obtained; when the peripheral reconstructed block of the current block does not exist, and When the direction information of the prediction block is the direction of the prediction block, the prediction direction of the current block is obtained as the direction of the prediction block; when the peripheral reconstruction block of the current block exists, the index information of the peripheral reconstruction block transformation base indicates the peripheral reconstruction block transformation.
  • the base is a directional transform base, and when the directivity information of the prediction block is the first indication information, the prediction direction of the current block is obtained according to the direction corresponding to the peripheral reconstruction block transform base; when the peripheral reconstructed block of the current block exists, the perimeter is heavy
  • the index information of the block transform base indicates that the peripheral reconstructed block transform base is a directional transform base, and when the directionality information of the prediction block is the direction of the prediction block, according to the week
  • the direction corresponding to the block reconstruction base and the direction of the prediction block are obtained by the current block. Forecast direction.
  • the embodiment may further include: a second processing module 93, configured to perform transform processing or inverse transform processing according to the non-directional transform base when the prediction directivity information of the current block is the second indication information.
  • a second processing module 93 configured to perform transform processing or inverse transform processing according to the non-directional transform base when the prediction directivity information of the current block is the second indication information.
  • the present embodiment can be applied to the inter-prediction coding and decoding technology, and specifically uses the transform processing apparatus provided in this embodiment to perform transform processing or inverse transform processing on the residual.
  • the time domain correlation information (or spatial correlation information and time domain correlation information) of the current block is considered to obtain a prediction direction, and both the encoding end and the decoding end can obtain a transform base of the transform operation, without writing in the encoded data.
  • the selection information of the transform base is saved, the coded bits are saved, and the coding efficiency is improved.

Description

视频数据编码、 解码方法及装置、 变换处理方法及装置 本申请要求于 2010 年 4 月 9 日提交中国专利局、 申请号为 201010147588.5 , 发明名称为"视频数据编码、 解码方法及装置、 变换处理 方法及装置器 "的中国专利申请的优先权, 在先申请文件的内容通过引用结 合在本申请中。 技术领域
本发明涉及通信领域, 尤其涉及一种视频数据编码、 解码方法及装置、 变换处理方法及装置。 背景技术
变换编码技术是将空间域相关的像素点映射到另一个正交的矢量空间 (变换域或频域), 使变换后的系数之间的相关性降低的技术, 其通过信号 变换来消除图像数据空间相关性。 在图像和视频变换编码技术中, 变换通 常用于将相关性大的数据变换成相关性 、的数据, 并将能量压缩到较少的 几个低频系数中, 这样将有利于后续的量化、 ZigZag扫描和熵编码环节。
但是, 由于现有主流视频编解码技术, 例如 H.264等, 均采用基于图 像块的时域运动补偿与空域变换编码相结合的混合编码框架。 当视频图像 序列中存在旋转或缩放的情况时, 无法进行完全匹配的运动补偿。 此时, 在图像中对象边缘位置会产生较大的残差信号, 即伪边缘现象。 此外, 采 样误差、 低精度的运动矢量以及性能较差的插值滤波器均会产生伪边缘。 在实际的编码工作中采用二维可分离离散余弦变换 ( Discrete Cosine Transform, 简称: DCT )对残差信息图像块进行变换编码, 即使用相同的 DCT变换基依次在水平与竖直两个方向对图像块信号进行变换。 这种变换 处理能够去除图像块信号在水平与竖直方向的相关性。 而当图像块信号存 在其它方向性纹理时, 却无法将信号能量有效地集中于少数几个变换系数 中。
现有技术一提出一种应用于帧内预测编码的方向性变换技术, 即基于 模式选择的方向性变换(Mode Dependent Directional Transform, 简称: MDDT )技术。 在帧内预测编码过程中, 每一种预测模式代表一个预测方 向 (共九种预测方向), 针对每一种预测模式训练出相应的一组变换基, 使 用帧内预测过程中所选定的预测模式(即选定的预测方向)来指导变换基 的选择, 预测编码部分选择了哪个方向的预测模式, 则变换编码部分就选 择该方向的变换基。 现有技术一需要根据已选定的预测模式选择变换基, 且只有帧内预测模式才能对应预测方向, 帧间预测无法提供方向信息, 因 此 MDDT技术只能用于帧内预测编码领域, 无法扩展到帧间预测编码领域 中。
现有技术二提出一种应用于帧间预测编码的方向性变换技术, 该技术 采用率失真优化(Rate-Distortion Optimization, 简称: RDO )方法来选择变 换基, 并将选择信息(具体为变换基的索引)写入编码数据传递给解码端, 用于指导解码过程中变换基的选择。 现有技术二在编码过程中浪费了一些 比特来传输部分已知信息, 降低了编码效率。
发明内容
本发明实施例提供了一种视频数据编码、 解码方法及装置、 变换处理 方法及装置, 用以提高编码效率。
本发明实施例提供了一种视频数据编码方法, 包括:
从一个以上待选变换基中选择最优变换基;
当根据预测块的方向性信息和 /或周边重构块的方向性信息, 得到当前 块的预测方向时, 根据所述预测方向对应的变换基和所述最优变换基得到 差值信息, 将所述差值信息写入编码数据中;
根据所述最优变换基进行变换处理。
本发明实施例提供了一种视频数据解码方法, 包括:
当根据预测块的方向性信息和 /或周边重构块的方向性信息, 得到当前 块的预测方向时, 根据从编码数据中解码得到的差值信息和所述预测方向 对应的变换基, 得到最优变换基;
根据所述最优变换基进行反变换处理。 本发明实施例提供了一种帧间预测技术中的变换处理方法, 包括: 当根据预测块的方向性信息和 /或周边重构块的方向性信息, 得到当前 块的预测方向时, 根据所述预测方向对应的变换基进行变换处理或反变换 处理。
本发明实施例提供了一种视频数据编码装置, 包括:
选择模块, 用于从一个以上待选变换基中选择最优变换基;
获取模块, 用于当根据预测块的方向性信息和 /或周边重构块的方向性 信息, 得到当前块的预测方向时, 根据所述预测方向对应的变换基和所述 最优变换基得到差值信息, 将所述差值信息写入编码数据中;
变换模块, 用于根据所述最优变换基进行变换处理。
本发明实施例提供了一种视频数据解码装置, 包括:
获取模块, 用于当根据预测块的方向性信息和 /或周边重构块的方向性 信息, 得到当前块的预测方向时, 根据从编码数据中解码得到的差值信息 和所述预测方向对应的变换基, 得到最优变换基;
第一反变换模块, 用于根据所述最优变换基进行反变换处理。
本发明实施例提供了一种帧间预测技术中的变换处理装置, 包括: 获取模块, 用于当根据预测块的方向性信息和 /或周边重构块的方向性 信息, 得到当前块的预测方向时, 获取所述预测方向对应的变换基;
第一处理模块, 用于根据所述预测方向对应的变换基进行变换处理或 反变换处理。
本发明实施例中, 当才艮据预测块的方向性信息和 /或周边重构块的方向 性信息, 得到当前块的预测方向时, 根据预测方向对应的变换基进行相应 处理。 其中预测块的方向性信息和 /或周边重构块的方向性信息包含着预测 信息, 这部分信息是编解码端都可以获得的, 不需要写入编码数据中, 减 少了需要传递的信息量, 从而节省了编码比特, 提高了编码效率。 附图说明
为了更清楚地说明本发明实施例中的技术方案, 下面将对实施例中所 需要使用的附图作简单地介绍, 显而易见地, 下面描述中的附图仅仅是本 发明的一些实施例, 对于本领域普通技术人员来讲, 在不付出创造性劳动 的前提下, 还可以根据这些附图获得其他的附图。
图 1为本发明实施例一视频数据编码方法的流程图;
图 2为本发明实施例二视频数据编码方法的流程图;
图 3为本发明实施例三视频数据编码方法的流程图;
图 4为本发明实施例四视频数据解码方法的流程图;
图 5为本发明实施例五视频数据解码方法的流程图;
图 6为本发明实施例六视频数据解码方法的流程图;
图 7为本发明实施例七提供的帧间预测技术中的变换处理方法的流程 图;
图 8为本发明实施例八提供的帧间预测技术中的变换处理方法的流程 图;
图 9为本发明实施例九提供的帧间预测技术中的变换处理方法的流程 图;
图 10为本发明实施例十提供的视频数据编码装置的结构示意图; 图 11为本发明实施例十一提供的视频数据编码装置的结构示意图; 图 12为本发明实施例十二提供的视频数据编码装置的结构示意图; 图 13为本发明实施例十三提供的视频数据解码装置的结构示意图; 图 14为本发明实施例十四提供的视频数据解码装置的结构示意图; 图 15为本发明实施例十五提供的视频数据解码装置的结构示意图; 图 16为本发明实施例十六提供的帧间预测技术中的变换处理装置的结 构示意图; 构示意图;
图 18为本发明实施例十八提供的帧间预测技术中的变换处理装置的结 构示意图。 具体实施方式
下面将结合本发明实施例中的附图, 对本发明实施例中的技术方案进 行清楚、 完整地描述, 显然, 所描述的实施例仅仅是本发明一部分实施例, 而不是全部的实施例。 基于本发明中的实施例, 本领域普通技术人员在没 有作出创造性劳动前提下所获得的所有其他实施例, 都属于本发明保护的 范围。
本发明实施例中, 所谓方向性变换基是指具有方向特征的变换基, 所 谓非方向性变换基是指不具有方向特征的变换基, 目前现有标准中规定的 变换基都是非方向性变换基, 例如: H.264/AVC中的 DCT变换基。
图 1为本发明实施例一视频数据编码方法的流程图。 如图 1所示, 本 实施例具体包括如下步骤:
步骤 101、 从一个以上待选变换基中选择最优变换基。
在执行本实施例各步骤之前的离线状态下, 预先训练出一个以上变换 基, 这些变换基都是方向性变换基, 本实施例可以将该一个以上方向性变 换基作为待选变换基, 也可以将该一个以上方向性变换基与非方向性变换 基一起作为待选变换基。 从这些待选变换基中选择出最优变换基。
步骤 102、 当才艮据预测块的方向性信息和 /或周边重构块的方向性信息, 得到当前块的预测方向时, 根据预测方向对应的变换基和最优变换基得到 差值信息, 将差值信息写入编码数据中。
预测块的方向性信息是当前块的时域相关性信息, 周边重构块的方向 性信息是空间相关性信息, 本实施例可根据预测块的方向性信息和 /或周边 重构块的方向性信息, 得到当前块的预测方向, 写入编码数据中的差值信 息参考了预测方向对应的变换基。
步骤 103、 根据最优变换基进行变换处理。
本实施例可以应用于帧间预测编码技术中, 例如当应用于 H.264/AVC 帧间预测编码技术中时, 对于每一待编码的当前块, 首先进行运动估计得 到运动信息, 将运动信息写入编码数据中; 构建预测值, 根据预测值和原 始值得到残差; 然后根据本实施例获得的最优变换基对残差进行变换处理; 最后进行量化处理和熵编码, 完成编码过程, 向解码端传递包括运动信息、 差值信息和残差的编码数据。
本实施例提供的视频数据编码方法, 当根据预测块的方向性信息和 /或 周边重构块的方向性信息, 得到当前块的预测方向时, 根据预测方向对应 的变换基和最优变换基得到差值信息, 将差值信息写入编码数据中, 本实 施例考虑了当前块的时域相关性信息或空间相关性信息或两者皆考虑得到 预测方向, 将预测方向对应的变换基和最优变换基的差值信息写入编码数 据, 该差值信息与现有技术中变换基的选择信息相比, 信息量较少, 节省 了编码比特, 提高了编码效率。
图 2为本发明实施例二视频数据编码方法的流程图。 如图 2所示, 本 实施例具体包括如下步骤:
步骤 201、从一个以上待选变换基中选择最优变换基,进一步的还包括, 从一个以上待选变换系数扫描方式中选择变换系数扫描方式。
在执行本实施例的各步骤之前的离线状态下, 预先选取若干个序列进 行编码, 训练出一个以上变换基作为待选变换基, 这些待选变换基都是方 向性变换基, 以及训练出一个以上变换系数扫描方式作为待选变换系数扫 描方式, 具体地可采取如下方法:
根据预测值和原始值的残差进行纹理方向性检测, 对检测得到的方向 性信息进行归类, 对于每一个方向所对应的一组残差进行训练, 得到对应 该方向的一个或多个变换基(可分离的变换基或者不可分离的变换基)和 与其对应的一个或多个变换系数扫描方式, 由此, 得出一个以上变换基以 及一个以上变换系数扫描方式。
根据上述离线状态下训练得到的待选变换基和待选变换系数扫描方 式, 以 RDO原则, 得到率失真最优的变换基作为最优变换基, 本实施例可 选择该最优变换基对应的变换系数扫描方式。 本实施例也可以将离线状态 下训练得到的变换基和非方向性变换基一起作为待选变换基, 以 RDO原则 从中选择最优变换基以及与其对应的变换系数扫描方式, 其中非方向性变 换基可以为现有标准中提供的一些已知的变换基, 如 H.264/AVC 提供的 DCT变换基。 具体方法可以为: 遍历上述待选变换基, 分别使用它们对待 编码当前块的残差进行变换操作, 得到码率和失真度, 将码率(R )和失真 度(D )代入代价函数中, 选择代价函数值最小的变换基作为率失真最优变 换基。 其中, 代价函数可以为: cost=D+A *R, cost为代价函数值, λ 为一 权值, 其取值为经验值。
步骤 202、才艮据周边重构块的方向性信息,得到当前块的预测方向性信 息, 该当前块的预测方向性信息包括当前块的预测方向或用于指示当前块 的预测方向不存在的第二指示信息。
所谓周边重构块是指与当前块相邻的已知图像块, 如当前块的左相邻 块(称为左块)、 右上相邻块(称为右上块)、 左上相邻块(称为左上块) 及上相邻块(称为上块)等, 周边重构块的方向性信息是当前块的空间相 关性信息, 本实施例考虑该空间相关性信息得到当前块的预测方向性信息。
具体地, 周边重构块的方向性信息包括周边重构块变换基的索引信息, 即周边重构块进行变换处理时所采用的变换基的索引。 当当前块的周边重 构块不存在时, 得到第二指示信息; 当当前块的周边重构块存在, 且周边 重构块变换基的索引信息表明周边重构块变换基为非方向性变换基时, 得 到第二指示信息; 当当前块的周边重构块存在, 且周边重构块变换基的索 引信息表明周边重构块变换基为方向性变换基时, 根据周边重构块变换基 对应的方向得到当前块的预测方向。
下面以周边重构块包括左块和上块为例, 说明当前块的预测方向性信 息的菝取过程。
当当前块的上块和左块都不存在时, 得到第二指示信息; 当前块的上 块和左块都不存在, 说明当前块处于左边缘和上边缘, 对于这个位置的当 前块, 它的预测方向性信息为第二指示信息, 也即它的预测方向不存在。
当当前块的上块和左块的其中一个存在, 但该块变换基的索引信息表 明该块变换基为非方向性变换基, 说明该块不存在方向, 则得到第二指示 信息。
当当前块的上块和左块都存在, 但上块变换基的索引信息表明上块变 换基为非方向性变换基, 左块变换基的索引信息表明左块变换基为非方向 性变换基, 说明上块和左块都不存在方向, 则得到第二指示信息。
当当前块的上块和左块的其中一个存在时, 且该块变换基的索引信息 表明该块变换基为方向性变换基, 得到当前块的预测方向为其中一个的方 向; 当前块的上块存在而左块不存在, 说明当前块处于左边缘, 它的预测 方向就是上块方向, 当前块的左块存在而上块不存在, 说明当前块处于上 边缘, 它的预测方向就是左块方向。
当当前块的上块和左块都存在时, 且上块变换基的索引信息表明上块 变换基为方向性变换基, 左块变换基的索引信息表明左块变换基为方向性 变换基, 即上块和左块的方向都存在, 若左块方向为水平方向或上块方向 不为竖直方向, 则当前块的预测方向为左块方向; 若左块方向不为水平方 向且上块方向为竖直方向, 则当前块的预测方向为上块方向; 当前块的上 块和左块都存在, 说明当前块即不处于上边缘也不处于左边缘, 对于这种 位置的当前块, 首先考察其左块方向是否为水平方向, 若是, 它的预测方 向就是左块方向(即水平方向);否则接着考察其上块方向是否为竖直方向, 若是, 它的预测方向就是上块方向 (即竖直方向), 否则它的预测方向就是 左块方向。
上述根据左块和上块的方向性信息, 得到当前块的预测方向性信息的 方法仅为一个具体的例子, 本实施例不仅限于此, 在实际应用中, 还可以 参考右上块和左上块等其他周边重构块的方向性信息获取当前块的预测方 向性信息。
步骤 203、 当当前块的预测方向性信息为当前块的预测方向时, 即才艮据 周边重构块的方向性信息得到了当前块的预测方向, 获取预测方向对应的 变换基的索引和最优变换基的索引的差值作为差值信息, 将差值信息写入 编码数据中。
当当前块的预测方向性信息为当前块的预测方向时, 可以获取预测方 向对应的变换基的索引和最优变换基的索引的差值作为差值信息, 将差值 信息写入编码数据中。
作为另外一种实施方式, 也可以获取预测方向对应的变换基的索引和 最优变换基的索引的方向差值作为差值信息, 将该差值信息写入编码数据 中。 具体地, 可以通过查方向差值表的方式得出预测方向对应的变换基的 索引与最优变换基的索引的方向差值。 以帧内 4*4为例, 方向差值表可表 示为:方向差值 [预测方向对应的变换基的索引] [最优变换基的索引 ] ={ { 0, 1 2, -! },{-!, 0, 1, 2},{ 2, -1, 0, 1 },{1, 2, -1, 0} } , 即 预测方向对应的变换基的索引
方向差值
0 1 2 3
0 0 1 2 -1 最优
1 -1 0 1 2 变换基的
2 2 -1 0 1 索引
3 1 2 -1 0 与最优变换基的索引相比, 预测方向对应的变换基的索引和最优变换 基的索引的差值或方向差值的信息量较少, 可以节省编码比特。
步骤 204、 当当前块的预测方向性信息为第二指示信息时, 即不存在当 前块的预测方向, 将最优变换基的索引写入编码数据中。
步骤 205、 采用最优变换基及变换系数扫描方式进行变换处理。
进一步的, 本实施例在步骤 202之前还可以包括: 根据最优变换基是 否为非方向性变换基, 对标志位进行置位, 将标志位写入编码数据中。 若 本实施例将离线状态下训练得到的变换基和非方向性变换基一起作为待选 变换基, 选择得到的最优变换基有可能是非方向性变换基, 那么可将标志 位置位为 " 1", 将该标志位写入编码数据中, 这种情况下不执行步骤 202、 203和 204,执行步骤 205; 若选择得到的最优变换基不是非方向性变换基, 那么可将标志位置位为 "0", 将该标志位写入编码数据中, 然后执行步骤 202-205
本实施例可以应用于帧间预测编码技术中, 例如当应用于 H.264/AVC 帧间预测编码技术中时, 对于每一待编码的当前块, 首先进行运动估计得 到运动信息, 将运动信息写入编码数据中; 构建预测值, 根据预测值和原 始值得到残差; 然后根据本实施例获得的最优变换基对残差进行变换处理; 最后进行量化处理和熵编码, 完成编码过程, 向解码端传递包括运动信息、 差值信息和残差的编码数据。
本实施例提供的视频数据编码方法, 根据周边重构块的方向性信息得 到当前块的预测方向, 获取预测方向对应的变换基的索引和最优变换基的 索引的差值, 将该差值写入编码数据中, 本实施例考虑了当前块的空间相 关性信息得到预测方向, 将预测方向对应的变换基的索引和最优变换基的 索引的差值写入编码数据, 该差值与现有技术中变换基的索引相比, 信息 量减少, 节省了编码比特, 提高了编码效率。
图 3为本发明实施例三视频数据编码方法的流程图。 如图 3所示, 本 实施例具体包括如下步骤:
步骤 301、从一个以上待选变换基中选择最优变换基,进一步的还包括, 从一个以上待选变换系数扫描方式中选择变换系数扫描方式。
在执行本实施例的各步骤之前的离线状态下, 预先选取若干个序列进 行编码, 训练出一个以上变换基作为待选变换基, 这些待选变换基都是方 向性变换基, 以及训练出一个以上变换系数扫描方式作为待选变换系数扫 描方式, 具体采用的方法可参见实施例二的描述。
根据上述离线状态下训练得到的待选变换基和待选变换系数扫描方 式, 以 RDO原则, 得到率失真最优的变换基作为最优变换基, 本实施例可 选择该最优变换基对应的变换系数扫描方式。 本实施例也可以将离线状态 下训练得到的变换基和非方向性变换基一起作为待选变换基, 以 RDO原则 从中选择最优变换基以及与其对应的变换系数扫描方式。 具体采用的方法 可参见实施例二的描述。
步骤 302、 对预测块进行纹理方向检测, 得到预测块的方向性信息, 该 预测块的方向性信息包括预测块的方向或用于指示预测块的方向不存在的 第一指示信息。
本实施例可采用以下两种方法的任一种对预测块进行纹理方向检测: ( 1 )采用梯度方向检测 (Directional Gradient Operator, 简称: DGO ) 方法: 首先预先设定了多种方向模式, 对于每一种方向模式, 计算每一条 "方向线" 上各点间的差值, 计算绝对误差和, 得到每一条 "方向线" 上 的梯度(Gdir )。 从中选出具有最强梯度(即具有最大梯度值) 的方向作为 预测块的方向, 该预测块的方向即为预测块的方向性信息。
在梯度的计算过程中需要至少考虑以下三个限制条件之一:
i .最大梯度值大于最小梯度值的 K倍, 其中 K〉l, 如 Κ可取 1.1 ; ii .最大梯度值方向与最小梯度值方向垂直或接近垂直; iii.最大梯度值大于设定阔值。
如果没有满足上述三个限制条件中的任一个, 则表明预测块的方向不 存在, 得到预测块的方向性信息为第一指示信息, 该第一指示信息用于指 示预测块的方向不存在。
( 2 )根据预测块的方向性绝对误差和进行检测的方法:
分别按照帧内 4x4模式选择的九种预测模式, 计算每种预测模式下的 SAD, 具体地可以采用块边缘值与 "方向线" 上的每一点做差值, 也可以 采用 "方向线"上点的均值与 "方向线"上的每一点做差值,归一化该 SAD, 取 SAD值最小的方向,若该 SAD值最小的方向为 DC预测模式对应的方向, 则表明预测块的方向不存在, 得到预测块的方向性信息为第一指示信息; 否则 SAD值最小的方向为预测块的方向, 该预测块的方向即为预测块的方 向性信息。
步骤 303、 才艮据预测块的方向性信息, 得到当前块的预测方向性信息, 该当前块的预测方向性信息包括当前块的预测方向或用于指示当前块的预 测方向不存在的第二指示信息。
当预测块的方向性信息为第一指示信息时, 得到当前块的预测方向性 信息为第二指示信息; 当预测块的方向性信息为预测块的方向时, 得到当 前块的预测方向为预测块的方向, 即当前块的预测方向性信息为预测块的 方向。 预测块的方向性信息是当前块的时域相关性信息, 本实施例可以考 虑该时域相关性信息得到当前块的预测方向性信息。
作为另外一种实施方式, 本步骤也可以为: 根据预测块的方向性信息 和周边重构块的方向性信息, 得到当前块的预测方向性信息。
上述预测块的方向性信息是当前块的时域相关性信息, 周边重构块的 方向性信息是当前块的空间相关性信息, 本实施例也可以考虑该时域相关 性信息和空间相关性信息得到当前块的预测方向性信息。
具体地, 周边重构块的方向性信息包括周边重构块变换基的索引信息, 即周边重构块进行变换处理时所采用的变换基的索引。 当当前块的周边重 构块不存在, 且预测块的方向性信息为第一指示信息时, 得到第二指示信 息; 当当前块的周边重构块存在, 周边重构块变换基的索引信息表明周边 重构块变换基为非方向性变换基, 且预测块的方向性信息为第一指示信息 时, 得到第二指示信息; 当当前块的周边重构块不存在, 且预测块的方向 性信息为预测块的方向时, 得到当前块的预测方向为预测块的方向; 当当 前块的周边重构块存在, 周边重构块变换基的索引信息表明周边重构块变 换基为方向性变换基, 且预测块的方向性信息为第一指示信息时, 根据周 边重构块变换基对应的方向得到当前块的预测方向; 当当前块的周边重构 块存在, 周边重构块变换基的索引信息表明周边重构块变换基为方向性变 换基, 且预测块的方向性信息为预测块的方向时, 根据周边重构块变换基 对应的方向和预测块的方向得到当前块的预测方向。
下面以周边重构块包括左块和上块为例, 说明当前块的预测方向性信 息的菝取过程。
当当前块的上块和左块都不存在, 且预测块的方向性信息为第一指示 信息时, 得到第二指示信息。 当前块的上块和左块都不存在, 说明当前块 处于左边缘和上边缘, 且预测块的方向也不存在, 这种情况下得到当前块 的预测方向性信息为第二指示信息, 即当前块的预测方向不存在。
当当前块的上块和左块的其中一个存在或都存在, 存在的块变换基的 索引信息表明其变换基为非方向性变换基, 且预测块的方向性信息为第一 指示信息时, 得到第二指示信息。
当当前块的上块和左块的其中一个存在, 存在的块变换基的索引信息 表明其变换基为方向性变换基, 且预测块的方向性信息为第一指示信息时, 得到当前块的预测方向为其中一个的方向。 在预测块的方向不存在的情况 下, 当前块的上块存在而左块不存在, 说明当前块处于左边缘, 则当前块 的预测方向为上块方向, 当前块的左块存在而上块不存在, 说明当前块处 于上边缘, 当前块的预测方向为左块方向。
当当前块的上块和左块不存在, 且预测块的方向性信息为预测块的方 向时, 得到当前块的预测方向为预测块的方向。 当前块的上块和左块都不 存在, 说明当前块处于左边缘和上边缘, 在这种情况下若预测块的方向存 在, 则当前块的预测方向就是预测块的方向。
当当前块的上块和左块都存在, 存在的块变换基的索引信息表明其变 换基为方向性变换基, 且预测块的方向性信息为第一指示信息时, 若左块 方向为水平方向或上块方向不为竖直方向, 则当前块的预测方向为左块方 向; 若左块方向不为水平方向且上块方向为竖直方向, 则当前块的预测方 向为上块方向。 当前块的上块和左块都存在, 说明当前块即不处于上边缘 也不处于左边缘, 在预测块的方向不存在的情况下, 首先考察其左块方向 是否为水平方向, 若是, 它的预测方向就是左块方向 (即水平方向); 否则 接着考察其上块方向是否为竖直方向, 若是, 它的预测方向就是上块方向 (即竖直方向), 否则它的预测方向就是左块方向。
当当前块的上块和左块的其中一个存在, 存在的块变换基的索引信息 表明其变换基为方向性变换基, 且预测块的方向性信息为预测块的方向时, 若左块存在且左块方向为水平方向, 则当前块的预测方向为左块方向; 若 上块存在且上块方向为竖直方向, 则当前块的预测方向为上块方向; 否则, 当前块的预测方向为预测块的方向。 若当前块的左块存在而上块不存在, 说明当前块处于上边缘, 若左块方向为水平方向, 则当前块的预测方向为 左块方向 (即水平方向); 若当前块的上块存在而左块不存在, 说明当前块 处于左边缘,若上块方向为竖直方向, 则当前块的预测方向为上块方向(即 竖直方向); 除此之外的其他情况下, 当前块的预测方向为预测块的方向。
当当前块的上块和左块都存在, 存在的块变换基的索引信息表明其变 换基为方向性变换基, 且预测块的方向性信息为预测块的方向时, 若上块 方向、 左块方向和预测块的方向中任意两个方向相同, 则当前块的预测方 向为该方向; 否则, 若左块方向为水平方向, 则当前块的预测方向为左块 方向, 若左块方向不为水平方向且上块方向为竖直方向, 则当前块的预测 方向为上块方向, 若左块方向不为水平方向且上块方向不为竖直方向, 当 前块的预测方向为预测块的方向。 当前块的上块和左块都存在, 说明当前 块即不处于上边缘也不处于左边缘, 若预测块的方向也存在, 那么: 首先 考察上块方向、 左块方向和预测块的方向中是否有任意两个方向相同, 若 有, 则当前块的预测方向就是该方向; 否则, 考察其左块方向是否为水平 方向, 若是, 则当前块的预测方向为左块方向; 否则接着考察其上块方向 是否为竖直方向, 若是, 当前块的预测方向为上块方向; 否则其他情况下 当前块的预测方向为预观 ' j块的方向。
上述根据左块和上块的方向性信息以及预测块的方向性信息得到当前 块的预测方向性信息的方法仅为一个具体的例子, 本实施例不仅限于此, 在实际应用中, 还可以参考右上块和左上块等其他周边重构块的方向性信 息以及预测块的方向性信息获取当前块的预测方向性信息。
步骤 304、 当当前块的预测方向性信息为当前块的预测方向时, 即才艮据 预测块的方向性信息 (或者预测块的方向性信息和周边重构块的方向性信 息)得到了当前块的预测方向, 获取预测方向对应的变换基的索引和最优 变换基的索引的差值作为差值信息, 将差值信息写入编码数据中。
当当前块的预测方向性信息为当前块的预测方向时, 可以获取预测方 向对应的变换基的索引和最优变换基的索引的差值作为差值信息, 将差值 信息写入编码数据中。
作为另外一种实施方式, 也可以获取预测方向对应的变换基的索引和 最优变换基的索引的方向差值作为差值信息, 将该差值信息写入编码数据 中。 具体地, 可以通过查方向差值表的方式得出预测方向对应的变换基的 索引与最优变换基的索引的方向差值。 相应的例子可参见实施例二。
与最优变换基的索引相比, 预测方向对应的变换基的索引和最优变换 基的索引的差值或方向差值的信息量较少, 可以节省编码比特。
步骤 305、 当当前块的预测方向性信息为第二指示信息时, 即不存在当 前块的预测方向, 将最优变换基的索引写入编码数据中。
步骤 306、 采用最优变换基及变换系数扫描方式进行变换处理。
进一步的, 本实施例在步骤 302之前还可以包括: 根据最优变换基是 否为非方向性变换基, 对标志位进行置位, 将标志位写入编码数据中。 若 本实施例将离线状态下训练得到的变换基和非方向性变换基一起作为待选 变换基, 选择得到的最优变换基有可能是非方向性变换基, 那么可将标志 位置位为 " 1 ", 将该标志位写入编码数据中, 这种情况下不执行步骤 302、 303、 304和 305, 直接执行步骤 306; 若选择得到的最优变换基不是非方向 性变换基, 那么可将标志位置位为 "0", 将该标志位写入编码数据中, 然 后执行步骤 302-306。 本实施例可以应用于帧间预测编码技术中, 例如当应用于 H.264/AVC 帧间预测编码技术中时, 对于每一待编码的当前块, 首先进行运动估计得 到运动信息, 将运动信息写入编码数据中; 构建预测值, 根据预测值和原 始值得到残差; 然后根据本实施例获得的最优变换基对残差进行变换处理; 最后进行量化处理和熵编码, 完成编码过程, 向解码端传递包括运动信息、 差值信息和残差的编码数据。
本实施例提供的视频数据编码方法, 可以根据预测块的方向性信息得 到当前块的预测方向, 考虑了当前块的时域相关性信息, 将预测方向对应 的变换基的索引和最优变换基的索引的差值写入编码数据, 该差值与现有 技术中变换基的索引相比, 信息量减少, 节省了编码比特, 提高了编码效 率。 本实施例也可以根据预测块的方向性信息和周边重构块的方向性信息 得到当前块的预测方向, 同时考虑了当前块的时域相关性信息和空间相关 性信息, 时空相关性信息包含着预测信息, 而这部分信息是编解码端同时 可以获得的, 不需要写入编码数据中, 这样就减少了需要传递的信息量, 从而可节省了编码比特, 提高了编码效率。
图 4为本发明实施例四视频数据解码方法的流程图。 如图 4所示, 本 实施例具体包括如下步骤:
步骤 401、 当根据预测块的方向性信息和 /或周边重构块的方向性信息, 得到当前块的预测方向时, 根据从编码数据中解码得到的差值信息和预测 方向对应的变换基, 得到最优变换基。
预测块的方向性信息是当前块的时域相关性信息, 周边重构块的方向 性信息是空间相关性信息, 本实施例可根据预测块的方向性信息和 /或周边 重构块的方向性信息, 得到当前块的预测方向。 然后, 从编码数据中解码 得到差值信息, 才艮据差值信息和预测方向对应的变换基, 得到最优变换基。
步骤 402、 根据最优变换基进行反变换处理。
本实施例可以应用于帧间预测解码技术中, 例如当应用于 H.264/AVC 帧间预测解码技术中时, 对于每一待解码的当前块, 首先将编码数据进行 解码得到运动信息、 差值信息和残差, 对残差进行反量化处理; 然后根据 本实施例获得的最优变换基对残差进行反变换处理; 根据处理后的残差、 运动信息和差值信息重建当前块, 完成解码过程。
本实施例提供的视频数据解码方法, 当根据预测块的方向性信息和 /或 周边重构块的方向性信息, 得到当前块的预测方向时, 根据从编码数据中 解码得到的差值信息和预测方向对应的变换基, 得到最优变换基, 根据最 优变换基进行反变换处理, 本实施例考虑了当前块的时域相关性信息或空 间相关性信息或两者皆考虑得到预测方向, 利用差值信息和该预测方向即 可得到最优变换基, 完成反变换处理, 该差值信息与现有技术中变换基的 选择信息相比, 信息量较少, 节省了编码比特, 提高了效率。
图 5为本发明实施例五视频数据解码方法的流程图。 如图 5所示, 本 实施例具体包括如下步骤:
步骤 501、才艮据周边重构块的方向性信息,得到当前块的预测方向性信 息, 该当前块的预测方向性信息包括当前块的预测方向或用于指示当前块 的预测方向不存在的第二指示信息。
所谓周边重构块是指与当前块相邻的已知图像块, 如当前块的左块、 右上块、 左上块及上块等, 周边重构块的方向性信息是当前块的空间相关 性信息, 本实施例考虑该时域相关性信息得到当前块的预测方向性信息。
具体地, 周边重构块的方向性信息包括周边重构块变换基的索引信息, 即周边重构块进行变换处理时所采用的变换基的索引。 当当前块的周边重 构块不存在时, 得到第二指示信息; 当当前块的周边重构块存在, 且周边 重构块变换基的索引信息表明周边重构块变换基为非方向性变换基时, 得 到第二指示信息; 当当前块的周边重构块存在, 且周边重构块变换基的索 引信息表明周边重构块变换基为方向性变换基时, 根据周边重构块变换基 对应的方向得到当前块的预测方向。
下面以周边重构块包括左块和上块为例, 说明当前块的预测方向性信 息的菝取过程。
当当前块的上块和左块都不存在时, 得到第二指示信息; 当前块的上 块和左块都不存在, 说明当前块处于左边缘和上边缘, 对于这个位置的当 前块, 它的预测方向性信息为第二指示信息, 也即它的预测方向不存在。
当当前块的上块和左块的其中一个存在, 但该块变换基的索引信息表 明该块变换基为非方向性变换基, 说明该块不存在方向, 则得到第二指示 信息。
当当前块的上块和左块都存在, 但上块变换基的索引信息表明上块变 换基为非方向性变换基, 左块变换基的索引信息表明左块变换基为非方向 性变换基, 说明上块和左块都不存在方向, 则得到第二指示信息。
当当前块的上块和左块的其中一个存在时, 且该块变换基的索引信息 表明该块变换基为方向性变换基, 得到当前块的预测方向为其中一个的方 向; 当前块的上块存在而左块不存在, 说明当前块处于左边缘, 它的预测 方向就是上块方向, 当前块的左块存在而上块不存在, 说明当前块处于上 边缘, 它的预测方向就是左块方向。
当当前块的上块和左块都存在时, 且上块变换基的索引信息表明上块 变换基为方向性变换基, 左块变换基的索引信息表明左块变换基为方向性 变换基, 即上块和左块的方向都存在, 若左块方向为水平方向或上块方向 不为竖直方向, 则当前块的预测方向为左块方向; 若左块方向不为水平方 向且上块方向为竖直方向, 则当前块的预测方向为上块方向; 当前块的上 块和左块都存在, 说明当前块即不处于上边缘也不处于左边缘, 对于这种 位置的当前块, 首先考察其左块方向是否为水平方向, 若是, 它的预测方 向就是左块方向(即水平方向);否则接着考察其上块方向是否为竖直方向, 若是, 它的预测方向就是上块方向 (即竖直方向), 否则它的预测方向就是 左块方向。
上述根据左块和上块的方向性信息, 得到当前块的预测方向性信息的 方法仅为一个具体的例子, 本实施例不仅限于此, 在实际应用中, 还可以 参考右上块和左上块等其他周边重构块的方向性信息获取当前块的预测方 向性信息。
步骤 502、 当当前块的预测方向性信息为当前块的预测方向时, 即才艮据 周边重构块的方向性信息得到了当前块的预测方向, 根据从编码数据中解 码得到的差值或方向差值和预测方向对应的变换基的索引, 得到最优变换 基的索引, 根据最优变换基的索引, 得到最优变换基。
上述差值和预测方向对应的变换基的索引之和即为最优变换基的索 引。 或者, 根据方向差值和预测方向对应的变换基的索引, 查方向差值表 得到最优变换基的索引。
步骤 503、 当当前块的预测方向性信息为第二指示信息时, 即不存在当 前块的预测方向, 从编码数据中解码得到最优变换基的索引, 进而得到最 优变换基。
步骤 504、采用最优变换基及与其对应的变换系数扫描方式进行反变换 处理。
进一步的, 本实施例在步骤 501之前还可以包括: 从编码数据中解码 得到标志位, 若该标志位置位为 "0", 则执行步骤 501-504; 若该标志位置 位为 " 1 ", 解析到编码所采用的变换基为非方向性变换基, 那么本实施例 不执行步骤 501-504, 直接采用非方向性变换基进行反变换处理。
本实施例可以应用于帧间预测解码技术中, 例如当应用于 H.264/AVC 帧间预测解码技术中时, 对于每一待解码的当前块, 首先将编码数据进行 解码得到运动信息、 差值信息和残差, 对残差进行反量化处理; 然后根据 本实施例获得的最优变换基对残差进行反变换处理; 根据处理后的残差、 运动信息和差值信息重建当前块, 完成解码过程。
本实施例提供的视频数据解码方法, 当根据周边重构块的方向性信息, 得到当前块的预测方向时, 根据从编码数据中解码得到的差值信息和预测 方向对应的变换基, 得到最优变换基, 根据最优变换基进行反变换处理, 本实施例考虑了当前块的空间相关性信息, 利用差值信息和该预测方向即 可得到最优变换基, 完成反变换处理, 该差值信息与现有技术中变换基的 选择信息相比, 信息量较少, 节省了编码比特, 提高了效率。
图 6为本发明实施例六视频数据解码方法的流程图。 如图 6所示, 本 实施例具体包括如下步骤:
步骤 601、 对预测块进行纹理方向检测, 得到预测块的方向性信息, 该 预测块的方向性信息包括预测块的方向或用于指示预测块的方向不存在的 第一指示信息。
本实施例可采用以下两种方法的任一种对预测块进行纹理方向检测: ( 1 )采用梯度方向检测 (Directional Gradient Operator, 简称: DGO ) 方法: 首先预先设定了多种方向模式, 对于每一种方向模式, 计算每一条 "方向线" 上各点间的差值, 计算绝对误差和, 得到每一条 "方向线" 上 的梯度(Gdir )。 从中选出具有最强梯度(即具有最大梯度值) 的方向作为 预测块的方向, 该预测块的方向即为预测块的方向性信息。
在梯度的计算过程中需要至少考虑以下三个限制条件之一:
i .最大梯度值大于最小梯度值的 K倍, 其中 K〉l, 如 Κ可取 1.1 ; ii .最大梯度值方向与最小梯度值方向垂直或接近垂直;
iii.最大梯度值大于设定阔值。
如果没有满足上述三个限制条件中的任一个, 则表明预测块的方向不 存在, 得到预测块的方向性信息为第一指示信息, 该第一指示信息用于指 示预测块的方向不存在。
( 2 )根据预测块的方向性绝对误差和进行检测的方法:
分别按照帧内 4x4模式选择的九种预测模式, 计算每种预测模式下的 SAD, 具体地可以采用块边缘值与 "方向线" 上的每一点做差值, 也可以 采用 "方向线"上点的均值与 "方向线"上的每一点做差值,归一化该 SAD, 取 SAD值最小的方向,若该 SAD值最小的方向为 DC预测模式对应的方向, 则表明预测块的方向不存在, 得到预测块的方向性信息为第一指示信息; 否则 SAD值最小的方向为预测块的方向, 该预测块的方向即为预测块的方 向性信息。
步骤 602、 才艮据预测块的方向性信息, 得到当前块的预测方向性信息, 该当前块的预测方向性信息包括当前块的预测方向或用于指示当前块的预 测方向不存在的第二指示信息。
当预测块的方向性信息为第一指示信息时, 得到当前块的预测方向性 信息为第二指示信息; 当预测块的方向性信息为预测块的方向时, 得到当 前块的预测方向为预测块的方向, 即当前块的预测方向性信息为预测块的 方向。 预测块的方向性信息是当前块的时域相关性信息, 本实施例可以考 虑该时域相关性信息得到当前块的预测方向性信息。
作为另外一种实施方式, 本步骤也可以为: 根据预测块的方向性信息 和周边重构块的方向性信息, 得到当前块的预测方向性信息。 上述预测块的方向性信息是当前块的时域相关性信息, 周边重构块的 方向性信息是当前块的空间相关性信息, 本实施例也可以考虑该时域相关 性信息和空间相关性信息得到当前块的预测方向性信息。
具体地, 周边重构块的方向性信息包括周边重构块变换基的索引信息, 即周边重构块进行变换处理时所采用的变换基的索引。 当当前块的周边重 构块不存在, 且预测块的方向性信息为第一指示信息时, 得到第二指示信 息; 当当前块的周边重构块存在, 周边重构块变换基的索引信息表明周边 重构块变换基为非方向性变换基, 且预测块的方向性信息为第一指示信息 时, 得到第二指示信息; 当当前块的周边重构块不存在, 且预测块的方向 性信息为预测块的方向时, 得到当前块的预测方向为预测块的方向; 当当 前块的周边重构块存在, 周边重构块变换基的索引信息表明周边重构块变 换基为方向性变换基, 且预测块的方向性信息为第一指示信息时, 根据周 边重构块变换基对应的方向得到当前块的预测方向; 当当前块的周边重构 块存在, 周边重构块变换基的索引信息表明周边重构块变换基为方向性变 换基, 且预测块的方向性信息为预测块的方向时, 根据周边重构块变换基 对应的方向和预测块的方向得到当前块的预测方向。
下面以周边重构块包括左块和上块为例, 说明当前块的预测方向性信 息的菝取过程。
当当前块的上块和左块都不存在, 且预测块的方向性信息为第一指示 信息时, 得到第二指示信息。 当前块的上块和左块都不存在, 说明当前块 处于左边缘和上边缘, 且预测块的方向也不存在, 这种情况下得到当前块 的预测方向性信息为第二指示信息, 即当前块的预测方向不存在。
当当前块的上块和左块的其中一个存在或都存在, 存在的块变换基的 索引信息表明其变换基为非方向性变换基, 且预测块的方向性信息为第一 指示信息时, 得到第二指示信息。
当当前块的上块和左块的其中一个存在, 存在的块变换基的索引信息 表明其变换基为方向性变换基, 且预测块的方向性信息为第一指示信息时, 得到当前块的预测方向为其中一个的方向。 在预测块的方向不存在的情况 下, 当前块的上块存在而左块不存在, 说明当前块处于左边缘, 则当前块 的预测方向为上块方向, 当前块的左块存在而上块不存在, 说明当前块处 于上边缘, 当前块的预测方向为左块方向。
当当前块的上块和左块不存在, 且预测块的方向性信息为预测块的方 向时, 得到当前块的预测方向为预测块的方向。 当前块的上块和左块都不 存在, 说明当前块处于左边缘和上边缘, 在这种情况下若预测块的方向存 在, 则当前块的预测方向就是预测块的方向。
当当前块的上块和左块都存在, 存在的块变换基的索引信息表明其变 换基为方向性变换基, 且预测块的方向性信息为第一指示信息时, 若左块 方向为水平方向或上块方向不为竖直方向, 则当前块的预测方向为左块方 向; 若左块方向不为水平方向且上块方向为竖直方向, 则当前块的预测方 向为上块方向。 当前块的上块和左块都存在, 说明当前块即不处于上边缘 也不处于左边缘, 在预测块的方向不存在的情况下, 首先考察其左块方向 是否为水平方向, 若是, 它的预测方向就是左块方向 (即水平方向); 否则 接着考察其上块方向是否为竖直方向, 若是, 它的预测方向就是上块方向 (即竖直方向), 否则它的预测方向就是左块方向。
当当前块的上块和左块的其中一个存在, 存在的块变换基的索引信息 表明其变换基为方向性变换基, 且预测块的方向性信息为预测块的方向时, 若左块存在且左块方向为水平方向, 则当前块的预测方向为左块方向; 若 上块存在且上块方向为竖直方向, 则当前块的预测方向为上块方向; 否则, 当前块的预测方向为预测块的方向。 若当前块的左块存在而上块不存在, 说明当前块处于上边缘, 若左块方向为水平方向, 则当前块的预测方向为 左块方向 (即水平方向); 若当前块的上块存在而左块不存在, 说明当前块 处于左边缘,若上块方向为竖直方向, 则当前块的预测方向为上块方向(即 竖直方向); 除此之外的其他情况下, 当前块的预测方向为预测块的方向。
当当前块的上块和左块都存在, 存在的块变换基的索引信息表明其变 换基为方向性变换基, 且预测块的方向性信息为预测块的方向时, 若上块 方向、 左块方向和预测块的方向中任意两个方向相同, 则当前块的预测方 向为该方向; 否则, 若左块方向为水平方向, 则当前块的预测方向为左块 方向, 若左块方向不为水平方向且上块方向为竖直方向, 则当前块的预测 方向为上块方向, 若左块方向不为水平方向且上块方向不为竖直方向, 当 前块的预测方向为预测块的方向。 当前块的上块和左块都存在, 说明当前 块即不处于上边缘也不处于左边缘, 若预测块的方向也存在, 那么: 首先 考察上块方向、 左块方向和预测块的方向中是否有任意两个方向相同, 若 有, 则当前块的预测方向就是该方向; 否则, 考察其左块方向是否为水平 方向, 若是, 则当前块的预测方向为左块方向; 否则接着考察其上块方向 是否为竖直方向, 若是, 当前块的预测方向为上块方向; 否则其他情况下 当前块的预测方向为预观 ' j块的方向。
上述根据左块和上块的方向性信息以及预测块的方向性信息得到当前 块的预测方向性信息的方法仅为一个具体的例子, 本实施例不仅限于此, 在实际应用中, 还可以参考右上块和左上块等其他周边重构块的方向性信 息以及预测块的方向性信息获取当前块的预测方向性信息。
步骤 603、 当当前块的预测方向性信息为当前块的预测方向时, 即才艮据 预测块的方向性信息 (或者预测块的方向性信息和周边重构块的方向性信 息)得到了当前块的预测方向, 从编码数据中解码得到差值信息, 获取预 测方向对应的变换基的索引与差值信息之和得到最优变换基的索引, 进而 得到最优变换基。
步骤 604、 当当前块的预测方向性信息为第二指示信息时, 即不存在当 前块的预测方向, 从编码数据中解码得到最优变换基的索引, 进而得到最 优变换基。
步骤 605、采用最优变换基及与其对应的变换系数扫描方式进行反变换 处理。
进一步的, 本实施例在步骤 601之前还可以包括: 从编码数据中解码 得到标志位, 若该标志位置位为 "0", 则执行步骤 601-605; 若该标志位置 位为 " 1 ", 解析到编码所采用的变换基为非方向性变换基, 那么本实施例 不执行步骤 601-605, 直接采用非方向性变换基进行反变换处理。
本实施例可以应用于帧间预测解码技术中, 例如当应用于 H.264/AVC 帧间预测解码技术中时, 对于每一待解码的当前块, 首先将编码数据进行 解码得到运动信息、 差值信息和残差, 对残差进行反量化处理; 然后根据 本实施例获得的最优变换基对残差进行反变换处理; 根据处理后的残差、 运动信息和差值信息重建当前块, 完成解码过程。
本实施例提供的视频数据解码方法, 可以根据预测块的方向性信息得 到当前块的预测方向, 考虑了当前块的时域相关性信息, 根据从编码数据 中解码得到的差值信息和预测方向对应的变换基, 得到最优变换基, 根据 最优变换基进行反变换处理, 该差值信息与现有技术中变换基的选择信息 相比, 信息量较少, 节省了编码比特, 提高了效率。 本实施例也可以根据 预测块的方向性信息和周边重构块的方向性信息得到当前块的预测方向, 同时考虑了当前块的时域相关性信息和空间相关性信息, 时空相关性信息 包含着预测信息, 而这部分信息是编解码端同时可以获得的, 不需要写入 编码数据中, 这样就减少了需要传递的信息量, 从而可节省了编码比特, 提高了效率。
图 7为本发明实施例七提供的帧间预测技术中的变换处理方法的流程 图。 如图 7所示, 本实施例具体包括如下步骤:
步骤 701、 当才艮据预测块的方向性信息和 /或周边重构块的方向性信息, 得到当前块的预测方向时, 获取该预测方向对应的变换基。
在执行本实施例的各步骤之前的离线状态下, 根据预测值和原始值的 残差进行纹理方向性检测, 对检测得到的方向性信息进行归类, 对于每一 个方向所对应的一组残差进行训练, 得到对应该方向的一个或多个变换基 (可分离的变换基或者不可分离的变换基)和与其对应的一个或多个变换 系数扫描方式。当根据预测块的方向性信息和 /或周边重构块的方向性信息, 得到当前块的预测方向时, 从训练得到的变换基中查找预测方向对应的变 换基。
步骤 702、 根据预测方向对应的变换基进行变换处理或反变换处理。 本实施例可以应用于帧间预测编码和解码技术中, 具体地采用本实施 例提供的变换处理方法对残差进行变换处理或反变换处理。 这样, 编码端 和解码端都可以获取变换操作的变换基, 无需在编码数据中写入变换基的 选择信息, 节省了编码比特, 提高了编码效率。
图 8为本发明实施例八提供的帧间预测技术中的变换处理方法的流程 图。 如图 8所示, 本实施例具体包括如下步骤:
步骤 801、才艮据周边重构块的方向性信息,得到当前块的预测方向性信 息, 该当前块的预测方向性信息包括当前块的预测方向或用于指示当前块 的预测方向不存在的第二指示信息。
本步骤的具体实现过程可以参见上述实施例二步骤 202中的相关描述, 在此不再赘述。
步骤 802、 当当前块的预测方向性信息为当前块的预测方向时, 即才艮据 周边重构块的方向性信息得到了当前块的预测方向, 获取预测方向对应的 变换基, 根据预测方向对应的变换基进行变换处理或反变换处理。
在执行本实施例的各步骤之前的离线状态下, 根据预测值和原始值的 残差进行纹理方向性检测, 对检测得到的方向性信息进行归类, 对于每一 个方向所对应的一组残差进行训练, 得到对应该方向的一个或多个变换基 (可分离的变换基或者不可分离的变换基)和与其对应的一个或多个变换 系数扫描方式。 当根据周边重构块的方向性信息, 得到当前块的预测方向 时, 从训练得到的变换基中查找预测方向对应的变换基。
步骤 803、 当当前块的预测方向性信息为第二指示信息时, 即不存在当 前块的预测方向, 根据非方向性变换基进行变换处理或反变换处理。
本实施例可以应用于帧间预测编码和解码技术中, 具体地采用本实施 例提供的变换处理方法对残差进行变换处理或反变换处理。 本实施例考虑 了当前块的空间相关性信息得到预测方向, 编码端和解码端都可以获取变 换操作的变换基, 无需在编码数据中写入变换基的选择信息, 节省了编码 比特, 提高了编码效率。
图 9为本发明实施例九提供的帧间预测技术中的变换处理方法的流程 图。 如图 9所示, 本实施例具体包括如下步骤:
步骤 901、 对预测块进行纹理方向检测, 得到预测块的方向性信息, 该 预测块的方向性信息包括预测块的方向或用于指示预测块的方向不存在的 第一指示信息。
本步骤的具体实现过程可以参见上述实施例三步骤 302中的相关描述, 在此不再赘述。 步骤 902、 才艮据预测块的方向性信息, 得到当前块的预测方向性信息, 该当前块的预测方向性信息包括当前块的预测方向或用于指示当前块的预 测方向不存在的第二指示信息。
作为另外一种实施方式, 本步骤也可以为: 根据预测块的方向性信息 和周边重构块的方向性信息, 得到当前块的预测方向性信息。
本步骤的具体实现过程可以参见上述实施例三步骤 303中的相关描述, 在此不再赘述。
步骤 903、 当当前块的预测方向性信息为当前块的预测方向时, 即才艮据 预测块的方向性信息 (或者预测块的方向性信息和周边重构块的方向性信 息)得到了当前块的预测方向, 获取预测方向对应的变换基, 根据预测方 向对应的变换基进行变换处理或反变换处理。
在执行本实施例的各步骤之前的离线状态下, 根据预测值和原始值的 残差进行纹理方向性检测, 对检测得到的方向性信息进行归类, 对于每一 个方向所对应的一组残差进行训练, 得到对应该方向的一个或多个变换基 (可分离的变换基或者不可分离的变换基)和与其对应的一个或多个变换 系数扫描方式。 当根据预测块的方向性信息 (或者预测块的方向性信息和 周边重构块的方向性信息), 得到当前块的预测方向时, 从训练得到的变换 基中查找预测方向对应的变换基。
步骤 904、 当当前块的预测方向性信息为第二指示信息时, 即不存在当 前块的预测方向, 根据非方向性变换基进行变换处理或反变换处理。
本实施例可以应用于帧间预测编码和解码技术中, 具体地采用本实施 例提供的变换处理方法对残差进行变换处理或反变换处理。 本实施例考虑 了当前块的时域相关性信息 (或空间相关性信息和时域相关性信息)得到 预测方向, 编码端和解码端都可以获取变换操作的变换基, 无需在编码数 据中写入变换基的选择信息, 节省了编码比特, 提高了编码效率。
图 10为本发明实施例十提供的视频数据编码装置的结构示意图。 如图 10所示, 本实施例包括: 选择模块 11、 获取模块 12和变换模块 13 ; 其中: 选择模块 11用于从一个以上待选变换基中选择最优变换基;
获取模块 12 用于当根据预测块的方向性信息和 /或周边重构块的方向 性信息, 得到当前块的预测方向时, 根据预测方向对应的变换基和最优变 换基得到差值信息, 将差值信息写入编码数据中;
变换模块 13用于根据最优变换基进行变换处理。
具体地, 上述选择模块 11从离线状态下训练得到的选变换基中选择出 最优变换基, 获取模块 12写入编码数据中的差值信息参考了预测方向对应 的变换基, 变换模块 13根据最优变换基进行变换处理。
本实施例考虑了当前块的时域相关性信息或空间相关性信息或两者皆 考虑得到预测方向, 将预测方向对应的变换基和最优变换基的差值信息写 入编码数据, 该差值信息与现有技术中变换基的选择信息相比, 信息量较 少, 节省了编码比特, 提高了编码效率。
图 11为本发明实施例十一提供的视频数据编码装置的结构示意图。 本 实施例在上述实施例十的基础上, 获取模块 12具体用于当根据周边重构块 的方向性信息, 得到当前块的预测方向时, 获取预测方向对应的变换基的 索引和最优变换基的索引的差值或方向差值作为差值信息, 将差值信息写 入编码数据中。
如图 11所示, 进一步的, 本实施例还可以包括: 第一预测模块 21, 用 于根据周边重构块的方向性信息, 得到当前块的预测方向性信息, 当前块 的预测方向性信息包括当前块的预测方向或用于指示当前块的预测方向不 存在的第二指示信息。
具体地说, 周边重构块的方向性信息包括周边重构块变换基的索引信 息, 即周边重构块进行变换处理时所采用的变换基的索引。 第一预测模块 21获知当当前块的周边重构块不存在时, 得到第二指示信息; 当当前块的 周边重构块存在, 且周边重构块变换基的索引信息表明周边重构块变换基 为非方向性变换基时, 得到第二指示信息; 当当前块的周边重构块存在, 且周边重构块变换基的索引信息表明周边重构块变换基为方向性变换基 时, 才艮据周边重构块变换基对应的方向得到当前块的预测方向。
本实施例还可以包括: 置位模块 22, 用于根据最优变换基是否为非方 向性变换基, 对标志位进行置位, 将标志位写入编码数据中。
进一步的, 本实施例还可以包括: 写入模块, 用于当第一预测模块 21 得到的预测方向性信息为第二指示信息时, 将最优变换基的索引写入编码 数据中。
本实施例中选择模块 11还可以用于从一个以上待选变换系数扫描方式 中选择变换系数扫描方式, 变换模块 13可以具体用于根据最优变换基和变 换系数扫描方式进行变换处理。
本实施例各功能模块具体功能的实现过程可参见方法实施例二的相关 描述。
本实施例考虑了当前块的空间相关性信息得到预测方向, 将预测方向 对应的变换基的索引和最优变换基的索引的差值写入编码数据, 该差值与 现有技术中变换基的索引相比, 信息量减少, 节省了编码比特, 提高了编 码效率。
图 12为本发明实施例十二提供的视频数据编码装置的结构示意图。 本 实施例在上述实施例十的基础上, 获取模块 12具体用于当根据预测块的方 向性信息, 或预测块的方向性信息和周边重构块的方向性信息, 得到当前 块的预测方向时, 获取预测方向对应的变换基的索引和最优变换基的索引 的差值或方向差值作为差值信息, 将差值信息写入编码数据中。
如图 12所示, 进一步的, 本实施例还可以包括: 检测模块 31和第二 预测模块 32, 其中:
检测模块 31用于对预测块进行纹理方向检测, 得到预测块的方向性信 息, 预测块的方向性信息包括预测块的方向或用于指示预测块的方向不存 在的第一指示信息;
第二预测模块 32用于根据预测块的方向性信息, 或预测块的方向性信 息和周边重构块的方向性信息, 得到当前块的预测方向性信息, 当前块的 预测方向性信息包括当前块的预测方向或用于指示当前块的预测方向不存 在的第二指示信息。
具体地说, 检测模块 31可以采用梯度方向检测方法, 对预测块进行纹 理方向检测, 得到预测块的方向性信息, 其中梯度方向检测方法至少满足 如下限制条件之一: 最大梯度值大于最小梯度值的 K倍; 最大梯度值方向 与最小梯度值方向垂直或接近垂直; 最大梯度值大于设定阔值; 或者, 检 测模块 31根据预测块的方向性绝对误差和, 对预测块进行纹理方向检测, 得到预测块的方向性信息。
作为一种实施方式, 第二预测模块 32判断出预测块的方向性信息为第 一指示信息时, 得到第二指示信息; 第二预测模块 32判断出预测块的方向 性信息为预测块的方向时, 得到当前块的预测方向为预测块的方向。
作为另一种实施方式, 周边重构块的方向性信息包括周边重构块变换 基的索引信息, 即周边重构块进行变换处理时所采用的变换基的索引。 第 二预测模块 32获知当当前块的周边重构块不存在, 且预测块的方向性信息 为第一指示信息时, 得到第二指示信息; 当当前块的周边重构块存在, 周 边重构块变换基的索引信息表明周边重构块变换基为非方向性变换基, 且 预测块的方向性信息为第一指示信息时, 得到第二指示信息; 当当前块的 周边重构块不存在, 且预测块的方向性信息为预测块的方向时, 得到当前 块的预测方向为预测块的方向; 当当前块的周边重构块存在, 周边重构块 变换基的索引信息表明周边重构块变换基为方向性变换基, 且预测块的方 向性信息为第一指示信息时, 根据周边重构块变换基对应的方向得到当前 块的预测方向; 当当前块的周边重构块存在, 周边重构块变换基的索引信 息表明周边重构块变换基为方向性变换基, 且预测块的方向性信息为预测 块的方向时, 根据周边重构块变换基对应的方向和预测块的方向得到当前 块的预测方向。
本实施例还可以包括: 置位模块 33, 用于根据最优变换基是否为非方 向性变换基, 对标志位进行置位, 将标志位写入编码数据中。
进一步的, 本实施例还可以包括: 写入模块, 用于当第二预测模块 32 得到的预测方向性信息为第二指示信息时, 将最优变换基的索引写入编码 数据中。
本实施例中选择模块 11还可以用于从一个以上待选变换系数扫描方式 中选择变换系数扫描方式, 变换模块 13可以具体用于根据最优变换基和变 换系数扫描方式进行变换处理。
本实施例各功能模块具体功能的实现过程可参见方法实施例三的相关 描述。 本实施例提供的视频数据编码装置, 可以根据预测块的方向性信息得 到当前块的预测方向, 考虑了当前块的时域相关性信息, 将预测方向对应 的变换基的索引和最优变换基的索引的差值写入编码数据, 该差值与现有 技术中变换基的索引相比, 信息量减少, 节省了编码比特, 提高了编码效 率。 本实施例也可以根据预测块的方向性信息和周边重构块的方向性信息 得到当前块的预测方向, 同时考虑了当前块的时域相关性信息和空间相关 性信息, 时空相关性信息包含着预测信息, 而这部分信息是编解码端同时 可以获得的, 不需要写入编码数据中, 这样就减少了需要传递的信息量, 从而可节省了编码比特, 提高了编码效率。
图 13为本发明实施例十三提供的视频数据解码装置的结构示意图。 如 图 13所示, 本实施例包括: 获取模块 41和第一反变换模块 42, 其中: 获取模块 41 用于当根据预测块的方向性信息和 /或周边重构块的方向 性信息, 得到当前块的预测方向时, 根据从编码数据中解码得到的差值信 息和预测方向对应的变换基, 得到最优变换基;
第一反变换模块 42用于根据最优变换基进行反变换处理。
本实施例考虑了当前块的时域相关性信息或空间相关性信息或两者皆 考虑得到预测方向, 利用差值信息和该预测方向即可得到最优变换基, 完 成反变换处理, 该差值信息与现有技术中变换基的选择信息相比, 信息量 较少, 节省了编码比特, 提高了效率。
图 14为本发明实施例十四提供的视频数据解码装置的结构示意图。 本 实施例在上述实施例十三的基础上, 获取模块 41可以具体用于当根据周边 重构块的方向性信息, 得到当前块的预测方向时, 根据从编码数据中解码 得到的差值或方向差值和预测方向对应的变换基的索引, 得到最优变换基 的索引, 根据最优变换基的索引, 得到最优变换基。
如图 14所示, 进一步的, 本实施例还可以包括: 第一预测模块 51用 于根据周边重构块的方向性信息, 得到当前块的预测方向性信息, 当前块 的预测方向性信息包括当前块的预测方向或用于指示当前块的预测方向不 存在的第二指示信息。
具体地说, 周边重构块的方向性信息包括周边重构块变换基的索引信 息, 即周边重构块进行变换处理时所采用的变换基的索引。 第一预测模块
51获知当当前块的周边重构块不存在时, 得到第二指示信息; 当当前块的 周边重构块存在, 且周边重构块变换基的索引信息表明周边重构块变换基 为非方向性变换基时, 得到第二指示信息; 当当前块的周边重构块存在, 且周边重构块变换基的索引信息表明周边重构块变换基为方向性变换基 时, 才艮据周边重构块变换基对应的方向得到当前块的预测方向。
本实施例还可以包括: 解码模块 52和第二反变换模块 53, 其中: 解码模块 52用于从编码数据中解码得到标志位;
第二反变换模块 53用于当根据标志位解析到编码所采用的变换基为非 方向性变换基, 根据非方向性变换基进行反变换处理。
上述解码模块 52还可以用于当当前块的预测方向性信息为第二指示信 息时, 从编码数据中解码得到的最优变换基的索引, 进而得到最优变换基。
本实施例中第一反变换模块 42可以具体用于根据最优变换基以及与最 优变换基对应的变换系数扫描方式进行反变换处理。
本实施例各功能模块具体功能的实现过程可参见方法实施例五的相关 描述。
本实施例考虑了当前块的空间相关性信息, 利用差值信息和该预测方 向即可得到最优变换基, 完成反变换处理, 该差值信息与现有技术中变换 基的选择信息相比, 信息量较少, 节省了编码比特, 提高了效率。
图 15为本发明实施例十五提供的视频数据解码装置的结构示意图。 本 实施例在上述实施例十三的基础上, 获取模块 41可以具体用于当根据预测 块的方向性信息, 或预测块的方向性信息和周边重构块的方向性信息, 得 到当前块的预测方向时, 根据从编码数据中解码得到的差值或方向差值和 预测方向对应的变换基的索引, 得到最优变换基的索引, 根据最优变换基 的索引, 得到最优变换基。
如图 15所示, 进一步的, 本实施例还可以包括: 检测模块 61和第二 预测模块 62, 其中:
检测模块 61用于对预测块进行纹理方向检测, 得到预测块的方向性信 息, 预测块的方向性信息包括预测块的方向或用于指示预测块的方向不存 在的第一指示信息;
第二预测模块 62用于根据预测块的方向性信息, 或预测块的方向性信 息和周边重构块的方向性信息, 得到当前块的预测方向性信息, 当前块的 预测方向性信息包括当前块的预测方向或用于指示当前块的预测方向不存 在的第二指示信息。
具体地说, 检测模块 61可以采用梯度方向检测方法, 对预测块进行纹 理方向检测, 得到预测块的方向性信息, 其中梯度方向检测方法至少满足 如下限制条件之一: 最大梯度值大于最小梯度值的 K倍; 最大梯度值方向 与最小梯度值方向垂直或接近垂直; 最大梯度值大于设定阔值; 或者, 检 测模块 61根据预测块的方向性绝对误差和, 对预测块进行纹理方向检测, 得到预测块的方向性信息。
作为一种实施方式, 第二预测模块 62判断出预测块的方向性信息为第 一指示信息时, 得到第二指示信息; 第二预测模块 62判断出预测块的方向 性信息为预测块的方向时, 得到当前块的预测方向为预测块的方向。
作为另一种实施方式, 第二预测模块 62获知当当前块的周边重构块不 存在, 且预测块的方向性信息为第一指示信息时, 得到第二指示信息; 当 当前块的周边重构块存在, 周边重构块变换基的索引信息表明周边重构块 变换基为非方向性变换基, 且预测块的方向性信息为第一指示信息时, 得 到第二指示信息; 当当前块的周边重构块不存在, 且预测块的方向性信息 为预测块的方向时, 得到当前块的预测方向为预测块的方向; 当当前块的 周边重构块存在, 周边重构块变换基的索引信息表明周边重构块变换基为 方向性变换基, 且预测块的方向性信息为第一指示信息时, 根据周边重构 块变换基对应的方向得到当前块的预测方向; 当当前块的周边重构块存在, 周边重构块变换基的索引信息表明周边重构块变换基为方向性变换基, 且 预测块的方向性信息为预测块的方向时, 根据周边重构块变换基对应的方 向和预 'j块的方向得到当前块的预测方向。
本实施例还可以包括: 解码模块 63和第二反变换模块 64, 其中: 解码模块 63用于从编码数据中解码得到标志位;
第二反变换模块 64用于当根据标志位解析到编码所采用的变换基为非 方向性变换基, 根据非方向性变换基进行反变换处理。
上述解码模块 63还可以用于当当前块的预测方向性信息为第二指示信 息时, 从编码数据中解码得到的最优变换基的索引, 进而得到最优变换基。
本实施例中第一反变换模块 42可以具体用于根据最优变换基以及与最 优变换基对应的变换系数扫描方式进行反变换处理。
本实施例各功能模块具体功能的实现过程可参见方法实施例六的相关 描述。
本实施例提供的视频数据解码装置, 可以根据预测块的方向性信息得 到当前块的预测方向, 考虑了当前块的时域相关性信息, 根据从编码数据 中解码得到的差值信息和预测方向对应的变换基, 得到最优变换基, 根据 最优变换基进行反变换处理, 该差值信息与现有技术中变换基的选择信息 相比, 信息量较少, 节省了编码比特, 提高了效率。 本实施例也可以根据 预测块的方向性信息和周边重构块的方向性信息得到当前块的预测方向, 同时考虑了当前块的时域相关性信息和空间相关性信息, 时空相关性信息 包含着预测信息, 而这部分信息是编解码端同时可以获得的, 不需要写入 编码数据中, 这样就减少了需要传递的信息量, 从而可节省了编码比特, 提高了效率。
图 16为本发明实施例十六提供的帧间预测技术中的变换处理装置的结 构示意图。 如图 16所示, 本实施例包括: 获耳^莫块 71和第一处理模块 72, 其中:
获取模块 71 用于当根据预测块的方向性信息和 /或周边重构块的方向 性信息, 得到当前块的预测方向时, 获取预测方向对应的变换基;
第一处理模块 72用于根据预测方向对应的变换基进行变换处理或反变 换处理。
本实施例可以应用于帧间预测编码和解码技术中, 这样, 编码端和解 码端都可以获取变换操作的变换基, 无需在编码数据中写入变换基的选择 信息, 节省了编码比特, 提高了编码效率。 构示意图。 本实施例在上述实施例十六的基础上, 获取模块 71具体用于当 根据周边重构块的方向性信息, 得到当前块的预测方向时, 获取预测方向 对应的变换基。
如图 17所示, 进一步的, 本实施例还可以包括: 预测模块 81, 用于根 据周边重构块的方向性信息, 得到当前块的预测方向性信息, 当前块的预 测方向性信息包括当前块的预测方向或用于指示当前块的预测方向不存在 的第二指示信息。
具体地说, 周边重构块的方向性信息包括周边重构块变换基的索引信 息, 即周边重构块进行变换处理时所采用的变换基的索引。 预测模块 81获 知当当前块的周边重构块不存在时, 得到第二指示信息; 当当前块的周边 重构块存在, 且周边重构块变换基的索引信息表明周边重构块变换基为非 方向性变换基时, 得到第二指示信息; 当当前块的周边重构块存在, 且周 边重构块变换基的索引信息表明周边重构块变换基为方向性变换基时, 根 据周边重构块变换基对应的方向得到当前块的预测方向。
进一步的, 本实施例还可以包括: 第二处理模块 82, 用于当当前块的 预测方向性信息为第二指示信息时, 根据非方向性变换基进行变换处理或 反变换处理。
本实施例各功能模块具体功能的实现过程可参见方法实施例八的相关 描述。
本实施例可以应用于帧间预测编码和解码技术中, 具体地采用本实施 例提供的变换处理装置对残差进行变换处理或反变换处理。 本实施例考虑 了当前块的空间相关性信息得到预测方向, 编码端和解码端都可以获取变 换操作的变换基, 无需在编码数据中写入变换基的选择信息, 节省了编码 比特, 提高了编码效率。
图 18为本发明实施例十八提供的帧间预测技术中的变换处理装置的结 构示意图。 本实施例在上述实施例十六的基础上, 获取模块 71具体用于当 根据预测块的方向性信息, 或预测块的方向性信息和周边重构块的方向性 信息, 得到当前块的预测方向时, 获取预测方向对应的变换基。
如图 18所示, 进一步的, 本实施例还可以包括: 检测模块 91和预测 模块 92, 其中: 检测模块 91用于对预测块进行纹理方向检测, 得到预测块的方向性信 息, 预测块的方向性信息包括预测块的方向或用于指示预测块的方向不存 在的第一指示信息;
预测模块 92用于根据预测块的方向性信息, 或预测块的方向性信息和 周边重构块的方向性信息, 得到当前块的预测方向性信息, 当前块的预测 方向性信息包括当前块的预测方向或用于指示当前块的预测方向不存在的 第二指示信息。
具体地说, 检测模块 91可以采用梯度方向检测方法, 对预测块进行纹 理方向检测, 得到预测块的方向性信息, 其中梯度方向检测方法至少满足 如下限制条件之一: 最大梯度值大于最小梯度值的 K倍; 最大梯度值方向 与最小梯度值方向垂直或接近垂直; 最大梯度值大于设定阔值; 或者, 检 测模块 91根据预测块的方向性绝对误差和, 对预测块进行纹理方向检测, 得到预测块的方向性信息。
作为一种实施方式, 预测模块 92判断出预测块的方向性信息为第一指 示信息时, 得到第二指示信息; 预测模块 92判断出预测块的方向性信息为 预观 'j块的方向时, 得到当前块的预测方向为预 ' j块的方向。
作为另一种实施方式, 周边重构块的方向性信息包括周边重构块变换 基的索引信息, 即周边重构块进行变换处理时所采用的变换基的索引。 预 测模块 92获知当当前块的周边重构块不存在, 且预测块的方向性信息为第 一指示信息时, 得到第二指示信息; 当当前块的周边重构块存在, 周边重 构块变换基的索引信息表明周边重构块变换基为非方向性变换基, 且预测 块的方向性信息为第一指示信息时, 得到第二指示信息; 当当前块的周边 重构块不存在, 且预测块的方向性信息为预测块的方向时, 得到当前块的 预测方向为预测块的方向; 当当前块的周边重构块存在, 周边重构块变换 基的索引信息表明周边重构块变换基为方向性变换基, 且预测块的方向性 信息为第一指示信息时, 根据周边重构块变换基对应的方向得到当前块的 预测方向; 当当前块的周边重构块存在, 周边重构块变换基的索引信息表 明周边重构块变换基为方向性变换基, 且预测块的方向性信息为预测块的 方向时, 根据周边重构块变换基对应的方向和预测块的方向得到当前块的 预测方向。
进一步的, 本实施例还可以包括: 第二处理模块 93, 用于当当前块的 预测方向性信息为第二指示信息时, 根据非方向性变换基进行变换处理或 反变换处理。
本实施例各功能模块具体功能的实现过程可参见方法实施例九的相关 描述。
本实施例可以应用于帧间预测编码和解码技术中, 具体地采用本实施 例提供的变换处理装置对残差进行变换处理或反变换处理。 本实施例考虑 了当前块的时域相关性信息 (或空间相关性信息和时域相关性信息)得到 预测方向, 编码端和解码端都可以获取变换操作的变换基, 无需在编码数 据中写入变换基的选择信息, 节省了编码比特, 提高了编码效率。
本领域普通技术人员可以理解: 实现上述方法实施例的全部或部分步 骤可以通过程序指令相关的硬件来完成, 前述的程序可以存储于一计算机 可读取存储介质中, 该程序在执行时, 执行包括上述方法实施例的步骤, 而前述的存储介质包括: ROM、 RAM, 磁碟或者光盘等各种可以存储程序 代码的介质。 而非对其限制; 尽管参照前述实施例对本发明实施例进行了详细的说明, 本领域的普通技术人员应当理解: 其依然可以对前述各实施例所记载的技 术方案进行修改, 或者对其中部分技术特征进行等同替换; 而这些修改或 者替换, 并不使相应技术方案的本质脱离本发明实施例各实施例技术方案 的精神和范围。

Claims

权利要求
1、 一种视频数据编码方法, 其特征在于包括:
从一个以上待选变换基中选择最优变换基;
当根据预测块的方向性信息和 /或周边重构块的方向性信息, 得到当前 块的预测方向时, 根据所述预测方向对应的变换基和所述最优变换基得到 差值信息, 将所述差值信息写入编码数据中;
根据所述最优变换基进行变换处理。
2、 根据权利要求 1所述的视频数据编码方法, 其特征在于, 所述根据 所述预测方向对应的变换基和所述最优变换基得到差值信息包括:
获取所述预测方向对应的变换基的索引和所述最优变换基的索引的差 值或方向差值作为所述差值信息。
3、 根据权利要求 1所述的视频数据编码方法, 其特征在于, 还包括: 才艮据所述周边重构块的方向性信息, 得到所述当前块的预测方向性信息, 所述当前块的预测方向性信息包括所述当前块的预测方向或用于指示所述 当前块的预测方向不存在的第二指示信息。
4、 根据权利要求 3所述的视频数据编码方法, 其特征在于, 所述周边 重构块的方向性信息包括周边重构块变换基的索引信息, 所述根据所述周 边重构块的方向性信息, 得到所述当前块的预测方向性信息还包括:
当所述当前块的周边重构块不存在时, 得到所述第二指示信息; 当所述当前块的周边重构块存在, 且所述周边重构块变换基的索引信 息表明周边重构块变换基为非方向性变换基时, 得到所述第二指示信息; 当所述当前块的周边重构块存在, 且所述周边重构块变换基的索引信 息表明周边重构块变换基为方向性变换基时, 根据周边重构块变换基对应 的方向得到所述当前块的预测方向。
5、 根据权利要求 1所述的视频数据编码方法, 其特征在于, 还包括: 对所述预测块进行紋理方向检测, 得到所述预测块的方向性信息, 所 述预测块的方向性信息包括所述预测块的方向或用于指示所述预测块的方 向不存在的第一指示信息;
根据所述预测块的方向性信息, 或所述预测块的方向性信息和所述周 边重构块的方向性信息, 得到所述当前块的预测方向性信息, 所述当前块 的预测方向性信息包括所述当前块的预测方向或用于指示所述当前块的预 测方向不存在的第二指示信息。
6、 根据权利要求 5所述的视频数据编码方法, 其特征在于, 所述对所 述预测块进行紋理方向检测, 得到所述预测块的方向性信息包括:
采用梯度方向检测方法, 对所述预测块进行紋理方向检测, 得到所述 预测块的方向性信息;
或者, 根据所述预测块的方向性绝对误差和, 对所述预测块进行紋理 方向检测, 得到所述预测块的方向性信息。
7、 根据权利要求 6所述的视频数据编码方法, 其特征在于, 所述梯度 方向检测方法至少满足如下限制条件之一:
最大梯度值大于最小梯度值的 K倍; 最大梯度值方向与最小梯度值方 向垂直或接近垂直; 最大梯度值大于设定阔值。
8、 根据权利要求 5所述的视频数据编码方法, 其特征在于: 所述根据所述预测块的方向性信息, 得到所述当前块的预测方向性信 息包括:
当所述预测块的方向性信息为所述第一指示信息时, 得到所述第二指 示信息;
当所述预测块的方向性信息为所述预测块的方向时, 得到所述当前块 的预测方向为所述预测块的方向;
所述周边重构块的方向性信息包括周边重构块变换基的索引信息, 所 述艮据所述预测块的方向性信息和所述周边重构块的方向性信息, 得到所 述当前块的预测方向性信息包括:
当所述当前块的周边重构块不存在, 且所述预测块的方向性信息为所 述第一指示信息时, 得到所述第二指示信息;
当所述当前块的周边重构块存在, 所述周边重构块变换基的索引信息 表明周边重构块变换基为非方向性变换基, 且所述预测块的方向性信息为 所述第一指示信息时, 得到所述第二指示信息;
当所述当前块的周边重构块不存在, 且所述预测块的方向性信息为所 述预测块的方向时, 得到所述当前块的预测方向为所述预测块的方向; 当所述当前块的周边重构块存在, 所述周边重构块变换基的索引信息 表明周边重构块变换基为方向性变换基, 且所述预测块的方向性信息为所 述第一指示信息时, 根据周边重构块变换基对应的方向得到所述当前块的 预测方向;
当所述当前块的周边重构块存在, 所述周边重构块变换基的索引信息 表明周边重构块变换基为方向性变换基, 且所述预测块的方向性信息为所 述预测块的方向时, 根据周边重构块变换基对应的方向和所述预测块的方 向得到所述当前块的预测方向。
9、 根据权利要求 1所述的视频数据编码方法, 其特征在于, 还包括: 根据所述最优变换基是否为非方向性变换基, 对标志位进行置位, 将 所述标志位写入所述编码数据中。
10、根据权利要求 3-8任一所述的视频数据编码方法, 其特征在于,还 包括:
当所述当前块的预测方向性信息为所述第二指示信息时, 将所述最优 变换基的索引写入所述编码数据中。
11、 根据权利要求 1所述的视频数据编码方法, 其特征在于, 还包括: 从一个以上待选变换系数扫描方式中选择变换系数扫描方式;
所述根据所述最优变换基进行变换处理包括: 根据所述最优变换基和 所述变换系数扫描方式进行变换处理。
12、 一种视频数据解码方法, 其特征在于, 包括:
当根据预测块的方向性信息和 /或周边重构块的方向性信息, 得到当前 块的预测方向时, 根据从编码数据中解码得到的差值信息和所述预测方向 对应的变换基, 得到最优变换基;
根据所述最优变换基进行反变换处理。
13、 根据权利要求 12所述的视频数据解码方法, 其特征在于, 所述根 据从编码数据中解码得到的差值信息和所述预测方向对应的变换基, 得到 最优变换基包括:
根据从编码数据中解码得到的差值或方向差值和所述预测方向对应的 变换基的索引, 得到最优变换基的索引;
根据所述最优变换基的索引, 得到所述最优变换基。
14、根据权利要求 12所述的视频数据解码方法, 其特征在于,还包括: 才艮据所述周边重构块的方向性信息, 得到所述当前块的预测方向性信息, 所述当前块的预测方向性信息包括所述当前块的预测方向或用于指示所述 当前块的预测方向不存在的第二指示信息。
15、 根据权利要求 14所述的视频数据解码方法, 其特征在于, 所述周 边重构块的方向性信息包括周边重构块变换基的索引信息, 所述根据所述 周边重构块的方向性信息, 得到所述当前块的预测方向性信息包括:
当所述当前块的周边重构块不存在时, 得到所述第二指示信息; 当所述当前块的周边重构块存在, 且所述周边重构块变换基的索引信 息表明周边重构块变换基为非方向性变换基时, 得到所述第二指示信息; 当所述当前块的周边重构块存在, 且所述周边重构块变换基的索引信 息表明周边重构块变换基为方向性变换基时, 根据周边重构块变换基对应 的方向得到所述当前块的预测方向。
16、根据权利要求 12所述的视频数据解码方法, 其特征在于,还包括: 对所述预测块进行紋理方向检测, 得到所述预测块的方向性信息, 所 述预测块的方向性信息包括所述预测块的方向或用于指示所述预测块的方 向不存在的第一指示信息;
根据所述预测块的方向性信息, 或所述预测块的方向性信息和所述周 边重构块的方向性信息, 得到所述当前块的预测方向性信息, 所述当前块 的预测方向性信息包括所述当前块的预测方向或用于指示所述当前块的预 测方向不存在的第二指示信息。
17、 根据权利要求 16所述的视频数据解码方法, 其特征在于, 所述对 所述预测块进行紋理方向检测, 得到所述预测块的方向性信息包括:
采用梯度方向检测方法, 对所述预测块进行紋理方向检测, 得到所述 预测块的方向性信息;
或者, 根据所述预测块的方向性绝对误差和, 对所述预测块进行紋理 方向检测, 得到所述预测块的方向性信息。
18、 根据权利要求 17所述的视频数据解码方法, 其特征在于, 所述梯 度方向检测方法至少满足如下限制条件之一:
最大梯度值大于最小梯度值的 K倍; 最大梯度值方向与最小梯度值方 向垂直或接近垂直; 最大梯度值大于设定阔值。
19、 根据权利要求 16所述的视频数据解码方法, 其特征在于: 所述根据所述预测块的方向性信息, 得到所述当前块的预测方向性信 息包括:
当所述预测块的方向性信息为所述第一指示信息时, 得到所述第二指 示信息;
当所述预测块的方向性信息为所述预测块的方向时, 得到所述当前块 的预测方向为所述预测块的方向;
所述周边重构块的方向性信息包括周边重构块变换基的索引信息, 所 述艮据所述预测块的方向性信息和所述周边重构块的方向性信息, 得到所 述当前块的预测方向性信息包括:
当所述当前块的周边重构块不存在, 且所述预测块的方向性信息为所 述第一指示信息时, 得到所述第二指示信息;
当所述当前块的周边重构块存在, 所述周边重构块变换基的索引信息 表明周边重构块变换基为非方向性变换基, 且所述预测块的方向性信息为 所述第一指示信息时, 得到所述第二指示信息;
当所述当前块的周边重构块不存在, 且所述预测块的方向性信息为所 述预测块的方向时, 得到所述当前块的预测方向为所述预测块的方向; 当所述当前块的周边重构块存在, 所述周边重构块变换基的索引信息 表明周边重构块变换基为方向性变换基, 且所述预测块的方向性信息为所 述第一指示信息时, 根据周边重构块变换基对应的方向得到所述当前块的 预测方向;
当所述当前块的周边重构块存在, 所述周边重构块变换基的索引信息 表明周边重构块变换基为方向性变换基, 且所述预测块的方向性信息为所 述预测块的方向时, 根据周边重构块变换基对应的方向和所述预测块的方 向得到所述当前块的预测方向。
20、根据权利要求 12所述的视频数据解码方法, 其特征在于,还包括: 从编码数据中解码得到标志位;
当根据所述标志位解析到编码所采用的变换基为非方向性变换基, 根 据所述非方向性变换基进行反变换处理。
21、 根据权利要求 14-19任一所述的视频数据解码方法, 其特征在于, 还包括:
当所述当前块的预测方向性信息为所述第二指示信息时, 根据从编码 数据中解码得到的最优变换基的索引, 得到所述最优变换基。
22、 根据权利要求 12所述的视频数据解码方法, 其特征在于, 所述根 据所述最优变换基进行反变换处理包括: 根据所述最优变换基以及与所述 最优变换基对应的变换系数扫描方式进行反变换处理。
23、 一种帧间预测技术中的变换处理方法, 其特征在于, 包括: 当根据预测块的方向性信息和 /或周边重构块的方向性信息, 得到当前 块的预测方向时, 根据所述预测方向对应的变换基进行变换处理或反变换 处理。
24、 根据权利要求 23所述的帧间预测技术中的变换处理方法, 其特征 在于, 还包括:
对所述预测块进行紋理方向检测, 得到所述预测块的方向性信息, 所 述预测块的方向性信息包括所述预测块的方向或用于指示所述预测块的方 向不存在的第一指示信息;
根据所述预测块的方向性信息, 或所述预测块的方向性信息和所述周 边重构块的方向性信息, 得到所述当前块的预测方向性信息, 所述当前块 的预测方向性信息包括所述当前块的预测方向或用于指示所述当前块的预 测方向不存在的第二指示信息。
25、 根据权利要求 24所述的帧间预测技术中的变换处理方法, 其特征 在于, 还包括:
当所述当前块的预测方向性信息为所述第二指示信息时, 根据非方向 性变换基进行变换处理或反变换处理。
26、 一种视频数据编码装置, 其特征在于, 包括:
选择模块, 用于从一个以上待选变换基中选择最优变换基;
获取模块, 用于当才艮据预测块的方向性信息和 /或周边重构块的方向性 信息, 得到当前块的预测方向时, 根据所述预测方向对应的变换基和所述 最优变换基得到差值信息, 将所述差值信息写入编码数据中;
变换模块, 用于根据所述最优变换基进行变换处理。
27、 根据权利要求 26所述的视频数据编码装置, 其特征在于, 所述获 取模块具体用于当根据预测块的方向性信息和 /或周边重构块的方向性信 息, 得到当前块的预测方向时, 获取所述预测方向对应的变换基的索引和 所述最优变换基的索引的差值或方向差值作为所述差值信息, 将所述差值 信息写入编码数据中。
28、 根据权利要求 26或 27所述的视频数据编码装置, 其特征在于, 还包括:
第一预测模块, 用于根据所述周边重构块的方向性信息, 得到所述当 前块的预测方向性信息, 所述当前块的预测方向性信息包括所述当前块的 预测方向或用于指示所述当前块的预测方向不存在的第二指示信息。
29、 根据权利要求 26或 27所述的视频数据编码装置, 其特征在于, 还包括:
检测模块, 用于对所述预测块进行紋理方向检测, 得到所述预测块的 方向性信息, 所述预测块的方向性信息包括所述预测块的方向或用于指示 所述预测块的方向不存在的第一指示信息;
第二预测模块, 用于根据所述预测块的方向性信息, 或所述预测块的 方向性信息和所述周边重构块的方向性信息, 得到所述当前块的预测方向 性信息, 所述当前块的预测方向性信息包括所述当前块的预测方向或用于 指示所述当前块的预测方向不存在的第二指示信息。
30、 根据权利要求 26或 27所述的视频数据编码装置, 其特征在于, 还包括:
置位模块, 用于根据所述最优变换基是否为非方向性变换基, 对标志 位进行置位, 将所述标志位写入所述编码数据中。
31、 一种视频数据解码装置, 其特征在于, 包括:
获取模块, 用于当才艮据预测块的方向性信息和 /或周边重构块的方向性 信息, 得到当前块的预测方向时, 根据从编码数据中解码得到的差值信息 和所述预测方向对应的变换基, 得到最优变换基;
第一反变换模块, 用于根据所述最优变换基进行反变换处理。
32、 根据权利要求 31所述的视频数据解码装置, 其特征在于, 所述获 取模块具体用于当根据预测块的方向性信息和 /或周边重构块的方向性信 息, 得到当前块的预测方向时, 根据从编码数据中解码得到的差值或方向 差值和所述预测方向对应的变换基的索引, 得到最优变换基的索引, 根据 所述最优变换基的索引, 得到所述最优变换基。
33、 根据权利要求 31或 32所述的视频数据解码装置, 其特征在于, 还包括:
第一预测模块, 用于根据所述周边重构块的方向性信息, 得到所述当 前块的预测方向性信息, 所述当前块的预测方向性信息包括所述当前块的 预测方向或用于指示所述当前块的预测方向不存在的第二指示信息。
34、 根据权利要求 31或 32所述的视频数据解码装置, 其特征在于, 还包括:
检测模块, 用于对所述预测块进行紋理方向检测, 得到所述预测块的 方向性信息, 所述预测块的方向性信息包括所述预测块的方向或用于指示 所述预测块的方向不存在的第一指示信息;
第二预测模块, 用于根据所述预测块的方向性信息, 或所述预测块的 方向性信息和所述周边重构块的方向性信息, 得到所述当前块的预测方向 性信息, 所述当前块的预测方向性信息包括所述当前块的预测方向或用于 指示所述当前块的预测方向不存在的第二指示信息。
35、 根据权利要求 31或 32所述的视频数据解码装置, 其特征在于, 还包括:
解码模块, 用于从编码数据中解码得到标志位;
第二反变换模块, 用于当根据所述标志位解析到编码所采用的变换基 为非方向性变换基, 根据所述非方向性变换基进行反变换处理。
36、 一种帧间预测技术中的变换处理装置, 其特征在于, 包括: 获取模块, 用于当才艮据预测块的方向性信息和 /或周边重构块的方向性 信息, 得到当前块的预测方向时, 获取所述预测方向对应的变换基; 第一处理模块, 用于根据所述预测方向对应的变换基进行变换处理或 反变换处理。
37、 根据权利要求 36所述的帧间预测技术中的变换处理装置, 其特征 在于, 还包括:
检测模块, 用于对所述预测块进行紋理方向检测, 得到所述预测块的 方向性信息, 所述预测块的方向性信息包括所述预测块的方向或用于指示 所述预测块的方向不存在的第一指示信息;
预测模块, 用于根据所述预测块的方向性信息, 或所述预测块的方向 性信息和所述周边重构块的方向性信息, 得到所述当前块的预测方向性信 息, 所述当前块的预测方向性信息包括所述当前块的预测方向或用于指示 所述当前块的预测方向不存在的第二指示信息。
38、 根据权利要求 36所述的帧间预测技术中的变换处理装置, 其特征 在于, 还包括:
第二处理模块, 用于当所述当前块的预测方向性信息为所述第二指示 信息时, 根据非方向性变换基进行变换处理或反变换处理。
PCT/CN2011/072621 2010-04-09 2011-04-11 视频数据编码、解码方法及装置、变换处理方法及装置 WO2011124163A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN 201010147588 CN102215391B (zh) 2010-04-09 2010-04-09 视频数据编码、解码方法及装置、变换处理方法及装置
CN201010147588.5 2010-04-09

Publications (1)

Publication Number Publication Date
WO2011124163A1 true WO2011124163A1 (zh) 2011-10-13

Family

ID=44746488

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2011/072621 WO2011124163A1 (zh) 2010-04-09 2011-04-11 视频数据编码、解码方法及装置、变换处理方法及装置

Country Status (2)

Country Link
CN (1) CN102215391B (zh)
WO (1) WO2011124163A1 (zh)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104284171B (zh) * 2013-07-03 2017-11-03 乐金电子(中国)研究开发中心有限公司 深度图像帧内预测方法及装置
US20200177889A1 (en) * 2017-03-21 2020-06-04 Lg Electronics Inc. Transform method in image coding system and apparatus for same
CN108882020B (zh) * 2017-05-15 2021-01-01 北京大学 一种视频信息处理方法、装置及系统
CN109788286B (zh) * 2019-02-01 2021-06-18 北京大学深圳研究生院 一种编码、解码变换方法、系统、设备及计算机可读介质

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1564602A (zh) * 2004-03-18 2005-01-12 华中科技大学 视频编码的整数变换矩阵选择方法及相关的整数变换方法
CN1589017A (zh) * 2004-08-06 2005-03-02 联合信源数字音视频技术(北京)有限公司 一种低复杂度整数4×4离散余弦变换量化装置及其实现方法
CN101141647A (zh) * 2007-08-24 2008-03-12 上海广电(集团)有限公司中央研究院 基于avs视频编码的快速帧间预测模式选择方法
CN101198059A (zh) * 2007-12-27 2008-06-11 武汉大学 一种视频编码标准中的整数变换基优选方法
WO2008132890A1 (ja) * 2007-04-16 2008-11-06 Kabushiki Kaisha Toshiba 画像符号化と画像復号化の方法及び装置
CN101682770A (zh) * 2007-06-15 2010-03-24 高通股份有限公司 视频块预测模式的自适应译码

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1564602A (zh) * 2004-03-18 2005-01-12 华中科技大学 视频编码的整数变换矩阵选择方法及相关的整数变换方法
CN1589017A (zh) * 2004-08-06 2005-03-02 联合信源数字音视频技术(北京)有限公司 一种低复杂度整数4×4离散余弦变换量化装置及其实现方法
WO2008132890A1 (ja) * 2007-04-16 2008-11-06 Kabushiki Kaisha Toshiba 画像符号化と画像復号化の方法及び装置
CN101682770A (zh) * 2007-06-15 2010-03-24 高通股份有限公司 视频块预测模式的自适应译码
CN101141647A (zh) * 2007-08-24 2008-03-12 上海广电(集团)有限公司中央研究院 基于avs视频编码的快速帧间预测模式选择方法
CN101198059A (zh) * 2007-12-27 2008-06-11 武汉大学 一种视频编码标准中的整数变换基优选方法

Also Published As

Publication number Publication date
CN102215391A (zh) 2011-10-12
CN102215391B (zh) 2013-08-28

Similar Documents

Publication Publication Date Title
US9781481B2 (en) Apparatus and method for generating/recovering motion information based on predictive motion vector index encoding, and apparatus and method for image encoding/decoding using same
JP4763422B2 (ja) イントラ予測装置
US10123014B2 (en) Method and apparatus for coding/decoding image
WO2016050051A1 (zh) 图像预测方法及相关装置
JP5639619B2 (ja) 複数経路ビデオ符号化及び復号化のための方法及び装置
RU2555236C2 (ru) Способ и устройство кодирования и декодирования изображения с использованием внутрикадрового предсказания
US20170208329A1 (en) Video encoder and video encoding method
TW201808011A (zh) 基於幾何轉換之自適應迴路濾波
US20150063452A1 (en) High efficiency video coding (hevc) intra prediction encoding apparatus and method
US20090097557A1 (en) Image Encoding Apparatus, Image Encoding Method, Image Decoding Apparatus, and Image Decoding Method
JP5897218B2 (ja) 映像符号化方法、およびこの方法を用いる映像符号化装置
KR20110017302A (ko) 움직임 벡터의 정확도 조절을 이용한 영상 부호화, 복호화 방법 및 장치
WO2013064120A1 (zh) 一种变换模式的编解码方法和装置
WO2009097809A1 (zh) 基于自适应块变换的帧内预测方法及装置
TW200952499A (en) Apparatus and method for computationally efficient intra prediction in a video coder
JP6390875B2 (ja) 画像符号化/復号化方法、装置およびシステム
JP2020523818A (ja) 低減されたメモリアクセスを用いてfrucモードでビデオデータを符号化又は復号する方法及び装置
EP4037320A1 (en) Boundary extension for video coding
WO2012113328A1 (zh) 一种变换系数块的扫描方法和装置
TW202304202A (zh) 解碼方法、編碼方法、裝置、設備及存儲介質
WO2011124163A1 (zh) 视频数据编码、解码方法及装置、变换处理方法及装置
WO2022227622A1 (zh) 一种权值可配置的帧间帧内联合预测编解码的方法及装置
US8848798B2 (en) Information processing apparatus and inter-prediction mode determination method
JP5938424B2 (ja) 画像ブロックを再構成および符号化する方法
JP2014230031A (ja) 画像符号化装置、及び画像符号化プログラム

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 11765081

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

Country of ref document: EP

Kind code of ref document: A1