WO2013067949A1 - 矩阵编码方法与装置及解码方法与装置 - Google Patents

矩阵编码方法与装置及解码方法与装置 Download PDF

Info

Publication number
WO2013067949A1
WO2013067949A1 PCT/CN2012/084307 CN2012084307W WO2013067949A1 WO 2013067949 A1 WO2013067949 A1 WO 2013067949A1 CN 2012084307 W CN2012084307 W CN 2012084307W WO 2013067949 A1 WO2013067949 A1 WO 2013067949A1
Authority
WO
WIPO (PCT)
Prior art keywords
matrix
layers
layer
current
coding
Prior art date
Application number
PCT/CN2012/084307
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 华为技术有限公司
Priority to EP12848646.1A priority Critical patent/EP2765770B1/en
Priority to EP19173526.5A priority patent/EP3585055A1/en
Publication of WO2013067949A1 publication Critical patent/WO2013067949A1/zh
Priority to US14/273,149 priority patent/US9565429B2/en
Priority to US15/387,305 priority patent/US10123016B2/en
Priority to US16/157,739 priority patent/US10742982B2/en
Priority to US16/928,632 priority patent/US11265547B2/en

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/124Quantisation
    • H04N19/126Details of normalisation or weighting functions, e.g. normalisation matrices or variable uniform quantisers
    • 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/132Sampling, masking or truncation of coding units, e.g. adaptive resampling, frame skipping, frame interpolation or high-frequency transform coefficient masking
    • 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/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/167Position within a video image, e.g. region of interest [ROI]
    • 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/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/184Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being bits, e.g. of the compressed video stream
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/46Embedding additional information in the video signal during the compression process
    • H04N19/463Embedding additional information in the video signal during the compression process by compressing encoding parameters before transmission
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/593Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving spatial prediction techniques
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/90Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using coding techniques not provided for in groups H04N19/10-H04N19/85, e.g. fractals
    • H04N19/91Entropy coding, e.g. variable length coding [VLC] or arithmetic coding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/90Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using coding techniques not provided for in groups H04N19/10-H04N19/85, e.g. fractals
    • H04N19/93Run-length coding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/30Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using hierarchical techniques, e.g. scalability
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/70Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by syntax aspects related to video coding, e.g. related to compression standards

Definitions

  • the present invention relates to video coding techniques, and in particular, to a matrix coding method and apparatus, and a decoding method and apparatus.
  • the quantization weight of the position is the quantization matrix (Quantization matrix; simply: QM).
  • QM quantization matrix
  • the size of the QM is the same as the size of the DCT transform block. For example, a 32x32 DCT transform block needs to correspond to a 32x32 QM.
  • different signal components and different prediction modes (intra/inter) of image blocks also require different QMs.
  • the elements of QM are integers from 0 to 255.
  • the quantization weight in QM is small for low-frequency coefficients, and the quantization weight is larger in QM for high-frequency coefficients. Using QM can improve the subjective quality of the image of the encoded video.
  • the quantization matrix is used to improve the subjective quality of the coded image, wherein, in the JPEG image
  • QM is placed in the picture header
  • the image coding standards such as MPEG1, MPEG2, and MPEG4
  • the QM is placed in the sequence header; therefore, for the sequence picture, the MPEG picture coding standard
  • the QM is one for each sequence, that is, for the same sequence, the same fixed QM implementation is used for the quantization of the image.
  • the quantization matrix size is also 8x8, there are 64 quantized coefficients, and different quantization matrices are used for the luminance and chrominance components of the image, JPEG All coefficient values of the quantization matrix are placed in the image header, and each image has only one luminance quantization matrix and color quantization matrix.
  • the default pre-defined quantization matrix in the standard is used at the codec, the quantization matrix does not need to be transmitted in the code stream.
  • the quantization matrix size is also 8x8, which has a total of 64 quantized coefficients.
  • An intra quantization matrix and an interframe quantization matrix are used for the coded picture, respectively.
  • MPEG2 only allows all pictures in each sequence to have only one intra quantization matrix and one inter quantization matrix, and all the coefficient values of the quantization matrix are placed in the sequence header.
  • MPEG2 also allows users to customize the quantization matrix, and the custom quantization matrix is in the sequence extension header. Since the quantization matrix of each sequence cannot be changed, the quantization matrix is directly encoded in the code stream with little load.
  • the following method is used in H.264/AVC to encode and transmit QM in the code stream: First, the QM is scanned into one dimension, and then differential pulse code modulation (referred to as: DPCM) is used for QM. Lossless compression, but its compression efficiency is low, and the bit rate occupied by QM coded bits is still high. Especially for stream sequences of smaller image sizes. Therefore, in order to limit the load of the quantization matrix in each frame of the encoded image code stream, the quantization matrix is limited to be used in the image header only in H.264/AVC.
  • DPCM differential pulse code modulation
  • HEVC High Efficiency Video Coding
  • the transform size of the image block is increased to various transform sizes such as 4x4, 8x8, 16x16, 32x32, and the like. Since a larger transform block is used, the corresponding QM is also larger. If the QM is not compressed or encoded by the H.264/AVC method, the QM will occupy a larger code rate, and the QM code itself can account for more than half or even several times the code rate.
  • the present invention provides a matrix coding method and apparatus, and a decoding method and apparatus for improving a compression ratio of a quantization matrix and reducing a code rate occupied when a quantization matrix is transmitted.
  • An aspect of the present invention provides a matrix coding method, including:
  • the matrix is layered according to the preset number of layers, and the matrix elements are grouped into different layers; according to the determined number of layers to be coded, the matrix elements in each layer to be coded are sequentially encoded in a hierarchical order;
  • the residual data is calculated as the encoded data of the current layer according to the original matrix element value corresponding to the current layer and the predicted value of the matrix element corresponding to the current layer.
  • the encoded data of the current layer is not written in the code stream
  • the matrix element prediction value corresponding to the current layer is calculated by interpolating the matrix element reconstruction value or the matrix element prediction value of the encoded matrix element in the coded layer before the current layer of the matrix and in the current layer;
  • the number of layers to be encoded is encoded and written into the code stream.
  • An aspect of the present invention provides a matrix decoding method, including:
  • Calculating a matrix element reconstruction value corresponding to each layer whose number of layers is greater than the number of coding layers is calculated by a matrix element reconstruction value corresponding to a layer whose number of layers is less than or equal to the number of coding layers.
  • Another aspect of the present invention provides a matrix coding method, including:
  • the moments in the matrix set are sequentially sequenced according to the coding order Performing coding prediction, obtaining a reconstruction matrix of the matrix, and performing corresponding sampling processing on the reconstruction matrix of the matrix to obtain a sample matrix;
  • the reconstruction matrix of the current matrix is used as a code reconstruction matrix corresponding to the current matrix, and the coding result corresponding to the current matrix is written into the code stream; if the first error is greater than The second error is used as a coded reconstruction matrix corresponding to the current matrix according to the coding matrix, and the sample matrix obtained by the reconstruction matrix of the coded matrix before the current matrix is used as the coding matrix, and the coding result corresponding to the current matrix is written.
  • the code stream is used as a coded reconstruction matrix corresponding to the current matrix according to the coding matrix, and the sample matrix obtained by the reconstruction matrix of the coded matrix before the current matrix is used as the coding matrix, and the coding result corresponding to the current matrix is written.
  • Another aspect of the present invention provides a matrix decoding method, including:
  • the identification bit identifies that the current matrix uses the sample matrix
  • the sample matrix obtained by performing the sample processing on the decoded reconstruction matrix of the decoded matrix before the current matrix according to the decoding order is used as the decoding reconstruction matrix of the current matrix
  • the decoding reconstruction matrix of the current matrix is directly decoded from the code stream;
  • the decoding reconstruction matrices of all the matrices in the matrix set are sequentially decoded.
  • One aspect of the present invention provides a matrix encoding apparatus, including:
  • a layering module which is used to layer the matrix according to a preset number of layers, and group the matrix elements into different layers
  • An encoding processing module configured to perform, according to the determined number of layers to be encoded, a matrix element in each layer to be encoded in a hierarchical order; if the number of layers in the current layer is less than or equal to the number of layers to be encoded, according to the current The original matrix element value corresponding to the layer and the matrix element prediction value corresponding to the current layer are calculated, and the residual data is written as the encoded data of the current layer into the code stream; if the number of layers of the current layer is greater than the number of layers to be encoded, the code is The encoded data of the current layer is not written in the stream;
  • the prediction value of the matrix element corresponding to the current layer is inserted by the matrix element reconstruction value or the matrix element prediction value of the encoded matrix element in the coded layer before the current layer of the matrix and in the current layer. Calculated by value;
  • the first code writing module is configured to encode the number of layers to be encoded and write the code stream.
  • One aspect of the present invention provides a matrix decoding apparatus, including:
  • a layer number decoding module configured to decode a coded layer number of the matrix from the code stream
  • a first reconstruction module configured to sequentially obtain layers according to the number of coding layers and coded data of layers in the matrix that are decoded from the code stream and whose number of layers is less than or equal to the number of coding layers a matrix element reconstruction value corresponding to each layer of the number of coding layers;
  • a second reconstruction module configured to calculate a matrix element reconstruction value corresponding to each layer whose number of layers is greater than the number of coding layers, by a matrix element reconstruction value corresponding to a layer whose layer number is less than or equal to the number of coding layers.
  • Another aspect of the present invention provides a matrix encoding apparatus, including:
  • a prediction coding module configured to perform coding prediction on a matrix in the matrix set according to a coding sequence according to a size of a matrix, obtain a reconstruction matrix of the matrix, and perform a corresponding reconstruction matrix of the matrix.
  • An error obtaining module configured to obtain a first error from a reconstruction matrix of the current matrix and a current matrix, and obtain a first matrix obtained by sampling the reconstruction matrix of the encoded matrix before the current matrix according to the coding order Two errors
  • a first coding reconstruction module configured to: use the reconstruction matrix of the current matrix as the coding reconstruction matrix corresponding to the current matrix, and write the coding result corresponding to the current matrix into the code stream, where the first error is less than or equal to the second error; ;
  • a second code reconstruction module configured to use, as the current matrix, a sample matrix obtained by performing a sample processing on a reconstruction matrix of the coded matrix before the current matrix according to the coding order, where the first error is greater than the second error
  • the code reconstructs the matrix, and writes the coded result corresponding to the current matrix to the code stream.
  • Another aspect of the present invention provides a matrix decoding apparatus, including:
  • a determining module configured to determine a decoding order corresponding to the matrix set and a corresponding sampling method
  • an identifier decoding module configured to decode, from the code stream, an identification bit that identifies whether the current matrix uses the sampling matrix
  • a first decoding reconstruction module configured to: when the identification bit identifies a current matrix using a sampling matrix, perform a sampling matrix obtained by processing a decoding reconstruction matrix of a decoded matrix before the current matrix according to the decoding order, as a decoding reconstruction matrix of the current matrix;
  • a second decoding reconstruction module configured to: in the identifier bit, identify that the current matrix does not use the sample matrix, and directly decode the decoding reconstruction matrix of the current matrix from the code stream;
  • the triggering module is configured to trigger the identifier decoding module, the first decoding reconstruction module, and the second decoding reconstruction module, and sequentially decode the decoding reconstruction matrix of all the matrices in the matrix set according to the decoding sequence.
  • a matrix coding method and apparatus provided by an aspect of the present invention, by using a hierarchical structure to group matrix elements into different layers, and then coding each layer according to the determined number of layers to be coded, or into a code stream, or not in a code
  • the coded data corresponding to the layer is written in the stream, which improves the compression ratio of the matrix and reduces the code rate occupied by the transmission matrix.
  • the matrix decoding method and apparatus provided by an aspect of the present invention are compatible with the matrix coding method and apparatus provided by an aspect of the present invention, and decoding coded data of a layer having a coding layer number and a layer number less than or equal to a coding layer number from a code stream. Then, the matrix is reconstructed based on the decoded data, so that the encoding end can encode and transmit the matrix using the layered architecture, which improves the compression ratio of the matrix and reduces the code rate occupied by the transmission matrix.
  • a matrix encoding method and apparatus provided by another aspect of the present invention, by sequentially encoding a plurality of matrices in a matrix set according to an encoding sequence, and reconstructing a reconstructed matrix predicted from each matrix and a reconstructed matrix of a previously encoded matrix.
  • a matrix with a relatively small error is selected as the code reconstruction matrix, and the coding result is written into the code stream. Since the sample matrix is used, only the identification bit is written in the code stream, and Writing the entire matrix improves the compression ratio of the matrix and reduces the bit rate occupied by the transmission matrix.
  • the matrix decoding method and apparatus provided by another aspect of the present invention are adapted to the matrix coding method and apparatus provided by another aspect of the present invention, and decoding, from the code stream, an identifier corresponding to each matrix that identifies whether the matrix uses the sample matrix Bits, and according to the identification bits or the decoded reconstruction matrix of the matrix that has been decoded before, the decoding reconstruction matrix of the current matrix is obtained, or the decoding reconstruction matrix of the current matrix is directly decoded from the code stream, and all decoding is decoded according to the decoding order.
  • the decoding reconstruction matrix of the matrix improves the compression ratio of the matrix and reduces the code rate occupied by the transmission matrix.
  • FIG. 1A is a flowchart of a matrix coding method according to an embodiment of the present invention.
  • FIG. 1B is a schematic diagram of a hierarchical structure of an 8 ⁇ 8 matrix according to an embodiment of the present invention
  • 1C is a schematic diagram of a 4x4 matrix hierarchical structure according to an embodiment of the present invention.
  • FIG. 2 is a flowchart of a matrix decoding method according to an embodiment of the present invention.
  • FIG. 3 is a flowchart of a matrix coding method according to an embodiment of the present invention.
  • FIG. 4 is a flowchart of a matrix decoding method according to an embodiment of the present invention.
  • FIG. 5 is a schematic structural diagram of a matrix coding apparatus according to an embodiment of the present invention.
  • FIG. 5B is a schematic structural diagram of a matrix coding apparatus according to another embodiment of the present invention.
  • FIG. 6 is a schematic structural diagram of a matrix decoding apparatus according to an embodiment of the present invention.
  • FIG. 6B is a schematic structural diagram of a matrix decoding apparatus according to another embodiment of the present invention
  • FIG. 7B is a schematic structural diagram of a matrix encoding apparatus according to another embodiment of the present invention
  • FIG. 7B is a matrix encoding apparatus according to still another embodiment of the present invention
  • FIG. 8 is a schematic structural diagram of a matrix decoding apparatus according to another embodiment of the present invention.
  • FIG. 1A is a flowchart of a matrix coding method according to an embodiment of the present invention. As shown in FIG. 1A, the method in this embodiment includes:
  • Step 101 Layer the matrix according to a preset number of layers, and group the matrix elements into different layers.
  • the matrix refers to a matrix that needs to be encoded and compressed at the encoding end, and then transmitted to the decoding end.
  • it may be a QM, a scaling matrix, a coefficient weighting matrix, a QM transformed transform domain matrix,
  • the transformed transform domain matrix of the scaling matrix, the transformed transform domain matrix of the coefficient weighting matrix, the prediction residual matrix after QM encoding prediction, the prediction residual matrix of the scaling matrix after coding prediction, or the system weighting matrix are subjected to predictive coding. Any one of the following prediction residual matrices or a combination thereof.
  • the transform may be a Z transform, a DCT transform, a DFT (Fourier Transform) transform, or the like.
  • the coding prediction refers to encoding a QM, a scaling matrix, a coefficient weighting matrix, and the like, and then performing a residual on the encoded matrix and the pre-encoding matrix (ie, the uncoded original matrix).
  • the encoding method used for encoding prediction is not limited, such as DPCM.
  • the coding architecture is hierarchical coding, that is, all elements of the matrix are divided into several layers, and each layer includes different matrix elements.
  • different stratification numbers are pre-specified. For example, for a matrix of size 4x4, it can be pre-defined to be divided into 4 layers. The number of layers is 0 to 3; the matrix with size 8x8 can be defined as 5 layers in advance, and the number of layers is divided.
  • the range is 0 ⁇ 4; the size is 16x16 matrix, which can be pre-defined to be divided into 6 layers, the number of layers is 0 ⁇ 5; the size is 32x32, which can be pre-defined to be divided into 7 layers, the number of layers
  • the value ranges from 0 to 6.
  • the specific number of pre-defined partitions is not fixed and can be adjusted and pre-defined according to the matrix size. If the number of matrix elements included in the layer is increased, the number of layers used to divide the matrix can be reduced.
  • the 4x4 matrix is divided into 4 layers
  • the 8x8 matrix is divided into 5 layers.
  • the dividing method used for layering the matrix may be any method, which is not limited in this embodiment. The following is an example of dividing the 8x8 matrix into 5 layers and dividing the 4x4 matrix into 4 layers.
  • the upper left and lower right corners of the 8x8 matrix can be the 0th layer, and the lower left and upper right corners are the first layer.
  • the center of the 8x8 matrix and the midpoint of the 4 sides are the second layer, and then divide.
  • the third layer, the rest is the fourth layer.
  • the division result of the division method is as shown in Fig. 1B, in which the numbers 0, 1, 2, 3, and 4 represent the position of the matrix elements corresponding to the 0th layer, the 1st layer, the 2nd layer, the 3rd layer, and the 4th layer, respectively.
  • the number of partitions ranges from 0 to 4, and is divided into five layers.
  • the upper left and lower right corners of the 4x4 matrix can be the 0th layer, the lower left corner and the upper right corner are the first layer, and the center of the 4x4 matrix and the midpoint of the 4 sides are the second layer, and the rest It is the third floor.
  • the division result of the division method is as shown in FIG. 1C, wherein the numbers 0, 1, 2, and 3 represent the matrix element positions corresponding to the 0th layer, the 1st layer, the 2nd layer, and the 3rd layer, respectively.
  • the value of the number of layers is 0 ⁇ 3, which is divided into 4 layers.
  • the encoding end can eliminate the division layer number and/or the division method and transmit the code stream to the decoding end, which is beneficial to reduce the codec burden and complexity of the encoding end and the decoding end, and reduces the transmitted code. flow. For example, if the coding end and the decoding end only pre-arrange the number of division layers, the coding end needs to encode the coding method and write the code stream to the decoding end, so that the decoding end performs correct decoding. If the decoding end and the encoding end only pre-arrange the dividing method, but the number of dividing layers is not agreed, the encoding end needs to encode the divided layer number and write the code stream to the decoding end, so that the decoding end performs correct decoding. If the coding end and the decoding end pre-arrange the division layer number and the division method, the coding end does not need to encode the division layer number and the division method, and does not need to write into the code stream.
  • the decoding end and the encoding end may not pre-arrange the number of dividing layers and the dividing method used, so that the encoding end encodes the dividing layer number and the dividing method at the same time and writes the code stream to the decoding end to provide decoding to the decoding end.
  • the required information this way is conducive to changing the number of layers and the method of division, with a certain flexibility.
  • Step 102 Perform coding processing on the matrix elements in each layer to be coded in order according to the determined number of layers to be encoded.
  • the encoding end After layering the matrices, the encoding end begins to encode each layer in a hierarchical order.
  • the hierarchical order is coded according to the order of the lower level and the higher level, that is, starting from the 0th layer and sequentially increasing the number of layers.
  • the encoding end may determine the number of coding layers used for matrix coding, that is, determine the number of layers to be coded, and perform coding processing according to the determined number of layers to be coded.
  • the value of the number of layers to be encoded is greater than or equal to 0, and is less than a preset number of division layers.
  • the encoding end performs encoding processing on each layer based on the determined number of layers to be encoded as follows:
  • the residual data is calculated as the encoded data of the current layer according to the original matrix element value corresponding to the current layer and the predicted value of the matrix element corresponding to the current layer.
  • Code stream the encoded data of the current layer is decoded from the code stream, and the encoded data of the current layer is added to the predicted value of the matrix element corresponding to the current layer, and the reconstructed value of the matrix element corresponding to the current layer is obtained.
  • the current layer pair obtained by the decoding end The reconstructed value of the matrix element should be the same as the value of the original matrix element corresponding to the current layer, which implements lossless encoding for the current layer.
  • the encoded data of the current layer is not written in the code stream.
  • the matrix element reconstruction value corresponding to the layer that has been decoded before the current layer or the reconstructed matrix element reconstruction value in the current layer is used for interpolation calculation to obtain the matrix element reconstruction value corresponding to the current layer, so that the matrix corresponding to the current layer There may be a residual between the element reconstruction value and the original matrix element value corresponding to the current layer, which is a lossy coding.
  • the current layer refers to a layer that is currently to be encoded. For example: Assume that the determined number of layers to be encoded is 2, that is, the 0 ⁇ 2 layer matrix elements in the layer divided by the matrix are encoded. If the current layer is layer 0, the number of layers is 0, the number of layers in the current layer is smaller than the number of layers to be encoded; if the current layer is layer 2, the number of layers is 2, and the number of layers in the current layer is equal to the layer to be encoded. Number; If the current layer is layer 3, its number of layers is 3, and the number of layers in the current layer is greater than the number of layers to be encoded.
  • the matrix element prediction value corresponding to the current layer is calculated by interpolating the matrix element reconstruction value or the matrix element prediction value of the encoded matrix element in the coded layer before the current layer of the matrix and in the current layer. That is to say, in this embodiment, the predicted values of the corresponding matrix elements of each layer are obtained by interpolation.
  • the interpolation mode may be a matrix element reconstruction value or a matrix element prediction value of the matrix element before the matrix element of the current matrix to be interpolated (or called to be coded), and the matrix element prediction value of the matrix element to be interpolated is obtained by interpolation.
  • the matrix element prediction value corresponding to the layer 0 or the matrix element reconstruction value is interpolated to predict the matrix element corresponding to the first layer, and the matrix element prediction value or the matrix element reconstruction value interpolation corresponding to the layer 0 and the layer 1 is obtained.
  • the matrix element prediction values corresponding to the other layers are interpolated according to the matrix element values corresponding to the layer 0.
  • the reconstructed value is interpolated to obtain the predicted values of the matrix elements corresponding to the other layers.
  • interpolating the predicted value of the partial matrix element in the first layer according to the value of the matrix element corresponding to the 0th layer and interpolating the predicted values of the matrix elements interpolated in the 0th layer and the first layer to obtain other matrix elements of the first layer Predictive value.
  • the corresponding matrix element reconstruction value is equal to the corresponding original matrix element value.
  • the corresponding matrix element reconstruction value may be obtained by interpolating the matrix element reconstruction values corresponding to the layer with the lower layer number.
  • the predicted value of the matrix element corresponding to the lowest layer may be the original matrix element corresponding to the lowest layer, or is a preset default value of one or a group, and is interpolated as an initial value to obtain a predicted value of the matrix element corresponding to the other layers.
  • the process of predicting the matrix element corresponding to the current layer by interpolating the encoded matrix element reconstruction value or the matrix element prediction value in the encoded layer of the current layer of the current layer and the current layer may be performed by the current layer of the matrix before
  • the matrix element reconstruction value or the matrix element prediction value in the coding layer and the current layer are subjected to the check interpolation calculation or the weighted interpolation calculation to obtain the matrix element prediction value corresponding to the current layer.
  • the hierarchical matrix shown in Fig. 1B will be taken as an example, and the uniform interpolation calculation is taken as an example to illustrate the process of layered coding processing on the matrix.
  • the layer 0 is encoded. Since the 0th layer is the lowest layer, the predicted value of the A (0, 0) element of the matrix element pre-layer of the 0th layer, for example, the predicted value of the matrix element corresponding to the A (0, 0) element is 6, and the prediction is made. The value is written to the code stream as encoded data of A (0,0).
  • the A (7,7) element of layer 0 is not predicted, that is, it is directly encoded with the original value of the A (7, 7) element in the matrix and written into the code stream.
  • the first layer is encoded.
  • the predicted value of the matrix element corresponding to the first layer is obtained according to the predicted value of the matrix element corresponding to the layer 0 (in the case of the matrix element prediction value). ⁇
  • the A ( 0,7) element and the A ( 7,0) element of the first layer are both (A(0,0)+A(7,7) +1 ) /2 Predictive value.
  • "/" means integer division.
  • the encoded data of each matrix layer of the first layer is written into the code stream.
  • the corresponding matrix element reconstruction value obtained at the decoding end is the same as its corresponding original matrix element value, so it is lossless coding for the layer 1.
  • the second layer is encoded.
  • the prediction value of the matrix element of the second layer is obtained by the calculation method of the matrix element based on the predicted value of the matrix element corresponding to the 0th to 1st layer encoded before the second layer.
  • the order of interpolating the matrix elements in each layer may be performed by performing vertical interpolation and then performing horizontal interpolation, or performing horizontal interpolation first and then performing vertical interpolation.
  • the horizontal interpolation refers to interpolating the matrix elements to be interpolated in the row according to a certain interpolation method, based on the row angle of the matrix element and using the predicted values of other interpolated matrix elements with the same row angle.
  • Longitudinal interpolation means The column angle of the matrix element is marked as the basis, and the matrix element values of the other interpolated matrix elements with the same column angle are interpolated, and the matrix elements to be interpolated in the column are interpolated according to a certain interpolation method.
  • the second layer is interpolated in the order of horizontal interpolation and vertical interpolation, and the predicted value of the A (0,3) element is (A(0,0)+A(0,7)+ 1)/2, the predicted value of the A(7,3) element is (A(7,0)+A(7,7)+l)/2, and the predicted value of the A(3,0) element is ( ⁇ ( 0,0)+ ⁇ (7,0)+1)/2 , the predicted value of the A(3,3) element is (A(0,3)+A(7,3)+l)/2, A( The predicted value of the 3,7) element is (A(0,7)+A(7,7)+l)/2.
  • the encoded data of each matrix layer of the second layer is written into the code stream.
  • the corresponding matrix element reconstruction value obtained at the decoding end is the same as its corresponding original matrix element value, so it is lossless coding for Layer 2.
  • the third layer is encoded.
  • the predicted value of the matrix element of the third layer is obtained by using the mean-check interpolation method according to the predicted values of the matrix elements corresponding to the already-encoded matrix elements in the 0th to 2nd layers and the 3rd layer which are encoded before the third layer.
  • the specific interpolation order may be first performing vertical interpolation and then performing horizontal interpolation, or performing horizontal interpolation first and then performing vertical interpolation. This embodiment assumes that the interpolation is performed in the order of vertical interpolation and horizontal interpolation, and the predicted value of the A ( 0, 1 ) element is ( ⁇ (0,0)+ ⁇ (0,3)+1)/2 .
  • the predicted value of the A(0,5) element is ( ⁇ (0,3)+ ⁇ (0,7)+1)/2
  • the predicted value of the A(3,l) element is ( ⁇ (3,0)+ ⁇ (3,3)+1)/2
  • the predicted value of the ⁇ (1,0) element is ( ⁇ (0,0)+ ⁇ (0,3)+1)/2
  • A(l,3) element The predicted value is ( ⁇ (0,3)+ ⁇ (3,3)+1)/2
  • the predicted value of the A(l,l) element is (A(0,l)+A(3,l)+ l)/2
  • the predicted value of the ⁇ ( 0,5 ) element is (A(0,3)+A(0,7)+l)/2
  • the predicted value of the A ( 3,5 ) element is (A( 3,3)+A(3,7)+l)/2
  • the predicted value of the A ( 1,7 ) element is (A(0,7)+A(3,7)+l)/2
  • a ( The predicted value of the 1,5) element is (A(0,
  • the encoded data of the third layer is not written in the code stream.
  • the corresponding matrix element reconstruction value obtained at the decoding end may not be the same as its corresponding original matrix element value, so it is lossy coding for Layer 3.
  • the fourth layer is encoded.
  • the predicted value of the matrix element of the fourth layer is obtained from the 0th to 3rd layers which have been encoded before the fourth layer.
  • the corresponding matrix element reconstruction value obtained at the decoding end may not be the same as its corresponding original matrix element value, so it belongs to lossy coding for layer 4.
  • the encoding end may encode the encoded data of the layer after acquiring the encoded data of one layer, and write the encoded data, but is not limited to this manner.
  • the encoding end may perform unified encoding after acquiring the encoded data corresponding to all the layers, and then write the encoded result into the code stream.
  • the present embodiment does not limit the encoding method used when encoding the encoded data of each layer.
  • the encoded data may be large, and generally a normal distribution with 0 is a mean value, so it is preferable to perform variable length code encoding on the encoded data.
  • the encoded data After writing the code stream.
  • the encoded data may be mostly 0. Therefore, it is preferable to perform run-length encoding on the encoded data and write the code stream.
  • a layer width is set at the encoding end, and the size of the coding layer can be distinguished according to the set layer number threshold.
  • the coded data of the layer is coded by the variable length code and written into the code stream; if the number of layers of the layer is greater than 4, The coded data of the layer is run-length encoded and written into the code stream.
  • the coding end needs to encode and divide the 8x8 matrix division layer and the used division method into the code stream, it specifically refers to dividing the number of layers and the matrix elements included in each layer in the matrix.
  • the position in is encoded and written to the code stream.
  • Step 103 Encode the determined number of layers to be encoded, and write the code stream.
  • the number of layers to be coded is determined by the coding end, indicating that for a matrix element divided into preset layers, only matrix elements in which the number of layers is less than or equal to the layer to be coded are encoded, and the coding result is written into the code stream.
  • the number of coding layers is also encoded and written into the decoding end, so that the decoding end can decode correspondingly according to the number of layers to be encoded. operating.
  • the embodiment may implement lossless coding on the layer; if the number of layers in the current layer is greater than the number of layers to be encoded,
  • the encoding of this layer in this embodiment is lossy. That is to say, the control of lossy or lossless coding of the matrix can be realized by adjusting the number of layers to be coded.
  • the data to be encoded that is, the encoded data of the layer
  • the amount of data is relatively small, and even more, there is no need to encode a layer, and the matrix is implemented.
  • the coding compression improves the compression efficiency of the matrix and reduces the code rate occupied by the transmission matrix.
  • the matrix coding method of the present embodiment is used in the small sequence coding process, and in particular, the compression ratio can be greatly improved.
  • the compression ratio can be changed by changing the number of division layers.
  • the compression ratio can be increased by increasing the number of division layers and reducing the number of layers to be encoded, which has certain flexibility.
  • FIG. 2 is a flowchart of a matrix decoding method according to an embodiment of the present invention. As shown in FIG. 2, the method of this embodiment includes:
  • Step 201 Decode the number of coding layers of the matrix from the received code stream.
  • the matrix decoding method of this embodiment is adapted to the matrix coding method shown in Fig. 1A, which decodes a code stream encoded using a layered architecture, and reconstructs a matrix encoded by the coding end.
  • the decoding end receives the code stream transmitted by the encoding end, first decodes the coding layer number of the matrix from the code stream, and lays a foundation for subsequent decoding.
  • the number of coding layers is the number of layers to be encoded determined by the coding end and written into the code stream after coding, and is used to indicate which layers correspond to the coded data in the code stream. In other words, by decoding the number of coding layers, it is possible to determine which layers can be directly decoded from the code stream.
  • Step 202 According to the coded layer number and the coded data of each layer in the matrix decoded from the received code stream that is less than or equal to the number of coding layers, sequentially obtain the number of layers less than or equal to the coding layer according to the hierarchical order. The matrix elements of each layer are reconstructed.
  • the code stream received by the decoding end includes coded data of layers whose layer number is less than or equal to the number of coding layers.
  • the decoding end decodes the number of layers less than or equal to the number of coding layers from the received matrix coded code stream according to the decoded number of coding layers, the number of division layers of the matrix (ie, the number of layers of the matrix), and the division method. Encoded data for each layer.
  • the decoder also uses the corresponding method to decode the code stream.
  • the encoding end encodes the encoded data by using variable length code encoding; correspondingly, the decoding end needs to perform variable length code decoding on the code stream corresponding to the current layer, The encoded data of the current layer. If the number of layers in the current layer is greater than the threshold of the layer, the encoding end encodes the encoded data by using run length coding; correspondingly, the decoding end needs to perform run length decoding on the code stream corresponding to the current layer, and obtain the current The encoded data of the layer.
  • the dividing layer number and/or the dividing method for dividing the matrix may be pre-agreed by the encoding end and the decoding end. For example, when the encoding end and the decoding end only pre-agreed the number of dividing layers used, the encoding end may encode and write the used dividing method to the decoding end.
  • the decoding method decodes the used partitioning method from the code stream, and divides the number of layers according to the agreement. And the division method decodes the encoded data of each layer from the code stream.
  • the encoding end may encode the set dividing layer number and write the code stream to the decoding end.
  • the decoding end decodes the number of division layers from the code stream before decoding the coded data of the layers in the matrix that is less than or equal to the number of the coding layers in the code stream, and according to the decoded number of division layers
  • the agreed division method decodes the encoded data of each layer from the code stream.
  • the decoding end can directly decode the coding data of each layer from the code stream according to the agreed division layer number and the agreed division method.
  • the coding end When the coding end and the decoding end do not pre-agreed the division layer number and the division method, the coding end simultaneously encodes the division layer number and the division method and then writes the code stream to the decoding end.
  • the decoding end decodes the number of division layers and the division method from the received code stream before decoding the coded data of each layer in the matrix from which the number of layers in the matrix is less than or equal to the number of coding layers.
  • the coded data of each layer whose number of layers is less than or equal to the number of coding layers is that the coding end calculates the residual value of the original matrix element value corresponding to each layer whose layer number is less than or equal to the number of layers to be coded and the corresponding matrix element prediction value. data.
  • the predicted value of the corresponding matrix element of each layer is calculated by interpolating the matrix element reconstruction value or the matrix element prediction value of the encoded matrix element in the previously coded layer of the current layer and in the current layer.
  • the decoding end when acquiring the coded data of each layer whose number of layers is less than or equal to the number of coding layers, the decoding end respectively corresponds the coded data of each layer whose layer number is less than or equal to the number of coding layers to each layer whose layer number is less than or equal to the number of coding layers.
  • the predicted value of the matrix element is subjected to addition processing to obtain a matrix element reconstruction value corresponding to each layer whose number of layers is less than or equal to the number of coding layers.
  • the reconstructed values of the matrix elements corresponding to the layers whose number of layers is less than or equal to the number of coding layers in this step are the same as the values of the original matrix elements corresponding to the respective layers, which belong to lossless coding, but directly transmit the original matrix elements.
  • the amount of data transferred is much smaller than the value itself.
  • the same interpolation method as the encoding end can also be used to obtain a small number of layers.
  • the method may also be a weighted interpolation calculation method.
  • the predicted value of the matrix element corresponding to the first layer may be interpolated according to the predicted value of the matrix element corresponding to the 0th layer, and the predicted value of the matrix element of the second layer may be obtained by interpolating the predicted value of the matrix element corresponding to the 0th layer and the 1st layer.
  • the matrix element prediction values corresponding to the other layers are interpolated according to the matrix element values corresponding to the layer 0. For example: interpolating the predicted values of the matrix elements corresponding to the layer 0 to obtain the predicted values of the matrix elements corresponding to the first layer and the second layer, and then interpolating the predicted values of the matrix elements corresponding to the first layer and/or the second layer to obtain other The predicted value of the matrix element corresponding to the layer.
  • the decoding end performs an interpolation operation according to a pre-known interpolation order, which may be a horizontal interpolation first and then a vertical interpolation, or a vertical interpolation and a horizontal interpolation.
  • a pre-known interpolation order which may be a horizontal interpolation first and then a vertical interpolation, or a vertical interpolation and a horizontal interpolation.
  • the predicted value of the matrix element corresponding to the lowest layer may be the original matrix element value corresponding to the lowest layer, or one or a set of preset default values, and the initial value is interpolated to obtain the predicted matrix element value of the other layers. . And, for the decoding end, the predicted value of the matrix element corresponding to the lowest layer is known.
  • the process of obtaining the matrix element reconstruction value corresponding to each layer of the number of layers of the coding layer by the decoding end may be that the matrix element reconstruction value corresponding to the layer is obtained every time the coded data of one layer is decoded.
  • the process of obtaining, by the decoding end, the matrix element reconstruction value corresponding to each layer of the number of layers of the coding layer may be after all the coded data of each layer whose number of layers is less than or equal to the number of coding layers is decoded. And acquiring matrix element reconstruction values corresponding to the layers whose number of layers is less than or equal to the number of coding layers.
  • Step 203 Calculate, by a matrix element reconstruction value of a layer whose layer number is less than or equal to the number of coding layers, a matrix element reconstruction value corresponding to each layer whose number of layers is greater than the number of coding layers.
  • the decoding end After obtaining the reconstructed value of the matrix element corresponding to each layer whose number of layers is less than or equal to the number of coding layers, the decoding end performs interpolation calculation on the reconstructed value of the matrix element corresponding to the layer whose layer number is less than or equal to the number of layers to be encoded, and obtains the number of layers greater than
  • the matrix element reconstruction values corresponding to the layers of the coding layer are described.
  • the interpolation method is adapted to the coding end, and may be, for example, a uniform hook interpolation calculation or a weighted interpolation calculation.
  • the specific interpolation method is also adapted to the decoding end.
  • the matrix element reconstruction value corresponding to a layer in each layer of the layer having the number of layers less than or equal to the number of coding layers may be used for interpolation calculation to obtain a number of layers larger than the number of coding layers.
  • the layer element corresponding to the layer reconstruction value you can also use several layers corresponding to
  • the matrix element reconstruction value is subjected to interpolation calculation to obtain a matrix element reconstruction value corresponding to each layer whose number of layers is larger than the number of coding layers.
  • the interpolation order used is also adapted to the coding end, for example, it may be horizontal interpolation first and then vertical interpolation, or vertical interpolation and horizontal interpolation.
  • the number of layers acquired by the decoding end is greater than the matrix element reconstruction value corresponding to each layer of the coding layer, and the matrix element prediction corresponding to each layer of the coding layer obtained by the coding end is greater than the number of layers of the coding layer.
  • the value is the same, and may have some error with the original matrix element value, so it belongs to lossy coding.
  • the operation of this step may not be performed, that is, the coding end performs lossless coding on the matrix.
  • the reconstructed matrix may be a QM, a scaling matrix, a coefficient weighting matrix, a transformed transform domain matrix of the QM, a transformed transform domain matrix of the scaling matrix, and a transformed transform domain matrix of the coefficient weighting matrix.
  • the QM is subjected to any one or a combination of the prediction residual matrix after the coding prediction, the prediction residual matrix after the coding matrix is subjected to the coding prediction, or the prediction residual matrix after the prediction and coding of the system weight matrix.
  • the transform may be a Z transform, a DCT transform, a DFT transform, or the like.
  • the coding prediction means that a QM, a scaling matrix, a coefficient weighting matrix, and the like are encoded, and then the coded matrix and the pre-encoding matrix (i.e., the uncoded original matrix) are subjected to residual.
  • the encoding method used for encoding prediction is not limited, such as DPCM.
  • the matrix decoding method of the embodiment is adapted to the matrix coding method provided by the foregoing embodiment, and the coding end uses a layered architecture for coding, which realizes large compression of the matrix, improves the compression ratio, and reduces the code occupied by the transmission matrix. Rate, at the decoding end, adaptive layered decoding to achieve matrix reconstruction.
  • FIG. 3 is a flowchart of a matrix coding method according to an embodiment of the present invention. As shown in FIG. 3, the method of this embodiment includes:
  • Step 301 Perform coding prediction on the matrix in the matrix set according to the size of the matrix in the matrix set, obtain the reconstruction matrix of the matrix, and perform corresponding processing on the reconstruction matrix of the matrix. matrix.
  • the matrix set includes a plurality of matrices of different sizes, for example, a matrix of size 4 ⁇ 4, a matrix of 8 ⁇ 8, a matrix of 16 ⁇ 16, a matrix of 32 ⁇ 32, and the like.
  • the matrix in the matrix set it can be QM, scaling matrix, coefficient weighting matrix, QM transformed transform domain
  • the transformed transform domain matrix of the matrix, the scaling matrix, the transformed transform domain matrix of the coefficient weighting matrix, the prediction residual matrix after QM encoding prediction, the prediction residual matrix after the coding prediction by the scaling matrix, or the system weighting matrix Predict the encoded prediction residual matrix.
  • each matrix in the matrix set is coded and sorted according to the matrix size, which may be in the order of small to large, or may be in descending order.
  • each matrix is coded and predicted according to the coding order, the reconstruction matrix of each matrix is obtained, and the reconstruction matrix of each matrix is processed to obtain a sample matrix.
  • the sample method used in the sample processing is related to the coding order. If the order is from small to large, the sample processing refers to the upper sample, and the obtained sample matrix is a matrix larger than the current matrix size. If the order is from large to small, the sample processing refers to the lower sample, and the obtained sample matrix is a matrix smaller than the current matrix size. For example: A 16 x16 matrix reconstruction matrix is sampled to obtain a 32 x32 sample matrix; a 16 xl6 matrix reconstruction matrix is sampled to obtain an 8 x8 sample matrix.
  • the manner in which the matrix is coded and predicted is not limited.
  • Step 302 Obtain a first error from the reconstructed matrix of the current matrix and the current matrix, and obtain a second error by using the reconstructed matrix of the encoded matrix before the current matrix in the encoding order and the current matrix.
  • the reconstructed matrix of the current matrix is compared with the current matrix itself to obtain the first The error, and the sample matrix is compared with the current matrix itself to obtain a second error.
  • the process of obtaining errors by comparing two matrices mainly refers to comparing the element values of the corresponding positions of the two matrices, obtaining the difference of the element values at all positions, and averaging the difference values of the element values at all positions, and obtaining The error between the two matrices.
  • Step 303 Compare the first error with the second error, determine whether the first error is less than or equal to the second error, and if the determination result is yes, perform step 304; if the determination result is no, perform step 305.
  • This step is mainly to find a matrix with less error from the current matrix itself.
  • the 8x8 matrix is the current matrix
  • the 4x4 matrix is 8x8 matrix.
  • the sample matrix corresponding to the 8x8 matrix can be obtained from the reconstruction matrix of the 4x4 matrix.
  • 4 ⁇ Reconstruction matrix A with 4x4 matrix For [0,1,2,3,4,5,6,7], the 8x8 sample matrix B obtained by the upper sample is [0,0,2,2,4,4,5,5, 6,6,7,7]. This is illustrated in a one-dimensional example, but in reality both the reconstruction matrix and the sample matrix are 2 dimensions.
  • Step 304 The reconstruction matrix of the current matrix is used as a code reconstruction matrix corresponding to the current matrix, and the coding result corresponding to the current matrix is written into the code stream.
  • the reconstruction matrix of the current matrix is used as its code reconstruction matrix, and the coded data corresponding to the current matrix is encoded. Then write the code stream.
  • Step 305 The sample matrix obtained by processing the reconstruction matrix of the coded matrix before the current matrix according to the coding order is used as the code reconstruction matrix corresponding to the current matrix, and the coding result corresponding to the current matrix is written into the code stream.
  • the error between the sample matrix obtained by the sample processing of the matrix before the current matrix in the coding order is smaller than that of the current matrix, so that it is preceded by the current matrix according to the coding order.
  • the reconstructed matrix of the encoded matrix is processed as a coded reconstruction matrix by the sampled matrix, and the encoded data corresponding to the current matrix is encoded and then written into the code stream.
  • the current matrix refers to a matrix encoded according to the coding order. When all the matrices in the matrix set are encoded, the entire matrix set is encoded.
  • the code reconstruction matrix of each matrix can be encoded first, and then the coded data of each matrix is encoded and written into the code stream.
  • the reconstruction matrix is obtained and compared with the sample matrix obtained by the reconstruction matrix of the previously encoded matrix, and a matrix with relatively small error is obtained.
  • the code reconstruction matrix of the current matrix and encoding the coded data of the current matrix on the one hand, the coding compression ratio can be improved, and on the other hand, the coding accuracy can be ensured.
  • a specific implementation manner of step 301 includes: encoding each matrix in the matrix set according to a matrix from small to large. When encoded into a matrix, the matrix is the current matrix.
  • the encoding process for each matrix in the matrix set includes: encoding prediction of the matrix in the matrix set, The reconstruction matrix of the matrix is obtained, and the reconstruction matrix of the matrix is sampled to obtain a sample matrix, wherein the code reconstruction matrix of the minimum matrix is the reconstruction matrix of the minimum matrix.
  • encoding a matrix group including 4x4 matrix, 8x8 matrix, 16x16 matrix, and 32x32 matrix respectively, encodes 4x4 matrix, 8x8 matrix, 16x16 matrix, and 32x32 matrix in order from small to large.
  • the minimum matrix is a 4x4 matrix.
  • the minimum matrix does not have a corresponding matrix, its reconstruction matrix is directly used as its code reconstruction matrix.
  • the size is 8x8.
  • the size is 16x16.
  • the size is 32x32.
  • step 301 includes: encoding each matrix in the matrix set in descending order of the matrix.
  • the matrix is the current matrix.
  • the encoding process for each matrix in the matrix set includes: encoding and predicting the matrix in the matrix set, obtaining the reconstructed matrix of the matrix, and performing the sampling matrix on the reconstructed matrix of the matrix.
  • the code reconstruction matrix of the largest matrix is the reconstruction matrix of the largest matrix.
  • encoding a matrix group that includes both a 4x4 matrix, an 8x8 matrix, a 16x16 matrix, and a 32x32 matrix refers to encoding 32x32 matrices, 16x16 matrices, 8x8 matrices, and 4x4 matrices in order of largest to smallest.
  • the maximum matrix is a 32x32 matrix. Since the largest matrix does not have a corresponding matrix, its reconstruction matrix is directly used as its code reconstruction matrix.
  • the size is 16x16.
  • the size is 8x8.
  • the size is 4x4.
  • 8x8 reconstruction matrix A is [0,1,2,3,4,5,6,7]
  • the next sample is 4x4 ⁇
  • the sample matrix B is [0, 2, 4, 6].
  • a one-dimensional example is taken as an example, but in reality, both the reconstruction matrix and the sample matrix are two-dimensional.
  • this embodiment provides an implementation manner of performing coding prediction on a matrix to obtain a reconstruction matrix, including: layering a matrix according to a preset number of layers, and grouping matrix elements in the matrix into different layers. Then, according to the determined number of layers to be coded, the matrix elements in each layer to be coded are sequentially encoded in a hierarchical order to form a reconstruction matrix.
  • the process of forming the reconstruction matrix is the process of obtaining the reconstructed value of the corresponding matrix element of each layer, and specifically includes: if the number of layers of the current layer is less than or equal to the number of layers to be encoded, according to the current The original matrix element value corresponding to the layer is used as the matrix element reconstruction value corresponding to the current layer. If the number of layers of the current layer is greater than the number of layers to be encoded, the predicted value of the matrix element corresponding to the current layer is used as the matrix element reconstruction value corresponding to the current layer.
  • the predicted value of the matrix element corresponding to the current layer is calculated by interpolating the reconstructed value or the predicted value of the encoded matrix element in the encoded layer before the current layer of the matrix and in the current layer.
  • the reconstruction matrix is the code reconstruction matrix of the current matrix, that is, by the error between the reconstruction matrix and the current matrix.
  • the reconstructed matrix of the coding matrix is compared with the error of the current matrix.
  • the process of writing the coding result corresponding to the current matrix into the code stream includes: writing an identifier in the code stream Whether the current matrix uses the identification bit of the sample matrix, and the identification bit identifies that the current matrix does not use the sample matrix, and reconstructs the value and layer of the matrix element corresponding to each layer in the current matrix that is less than or equal to the number of layers to be coded.
  • the residual data calculated by the predicted value of the matrix element corresponding to each layer whose number is less than or equal to the number of layers to be encoded is written as a code stream whose layer number is less than or equal to 0 coded data of each layer, and is not written into the current matrix in the code stream.
  • the number of layers is larger than the encoded data of each layer of the layer to be encoded, and the number of layers to be encoded is written into the code stream.
  • the coded data of the layer with a smaller number of layers may be larger, generally a normal distribution with a mean value of 0, so that the coded data of the layer with a smaller number of layers can be coded by the variable length code. Then, the code stream is written; and for the layer with a larger number of layers, the coded data may be mostly 0. Therefore, the coded data of the layer with a larger number of layers is run-length coded and written into the code stream.
  • the layer threshold is preset, and it is used to determine whether each layer whose layer number is less than or equal to the number of layers to be encoded belongs to a layer with a small number of layers.
  • a layer of the layer whose number of layers is less than or equal to the number of layers to be encoded is less than or equal to the set number of layers, then the layer belongs to a layer with a smaller number of layers, and the coded data of the layer is variable length code.
  • the code stream after encoding if a layer of layers less than or equal to the number of layers to be encoded is greater than a set number of layers, Then, the layer belongs to a layer with a large number of layers, and the coded data of the layer is run-length encoded and then written into the code stream.
  • the process of writing the coding result corresponding to the current matrix into the code stream it may first determine whether the matrix is a symmetric mode, and if yes, determining to transmit only the coding result corresponding to the half matrix, and in the code stream. Writes an identification bit identifying whether the current matrix is a symmetric matrix, and the identification bit identifies that the current matrix is a symmetric matrix. At this time, when encoding each layer, only half of the matrix elements can be encoded, further improving the compression ratio of the matrix, reducing the transmitted code traffic, and reducing the code rate occupied by the transmission matrix.
  • the process of writing the coded result corresponding to the current matrix into the code stream includes: The stream is written to identify whether the current matrix uses the identification bit of the sample matrix, and the identification bit identifies the current matrix using the sample matrix, and does not write the coded data corresponding to the current matrix in the code stream.
  • the identification bit is only 1 bit, and the amount of data is small, which improves the compression ratio of the matrix, and also reduces the code rate occupied by the transmission matrix.
  • the QM corresponding to each frame of data is 24, forming a quantization matrix set ( QM Set).
  • the number of QMs in the quantization matrix set may be more.
  • the encoding process for each small matrix set is the same as the encoding method provided by the above embodiment.
  • the encoding process is first performed according to the size of each matrix.
  • the encoding process is performed according to the order between the first frame and the last frame, and the matrix is the first brightness for the same frame or between frames.
  • the order of the chrominance is encoded. That is to say, a plurality of matrices in the quantization matrix set are processed in order according to the matrix size, the first intra-frame, and the first luma.
  • the intra-frame 32x32 luminance matrix is first encoded. Specifically, by performing coding prediction on the intra-frame 32x32 luminance matrix, a reconstruction matrix of the intra-frame 32x32 luminance matrix is obtained, and the reconstruction matrix is used as the coding reconstruction matrix of the intra-frame 32x32 luminance matrix, and the intra-frame 32x32 luminance matrix is used. The reconstruction matrix is sampled to obtain an intra-frame 16x16 luminance sample matrix. Then, edit the 32x32 chrominance U matrix in the frame. Code processing.
  • a reconstruction matrix of a 32 ⁇ 32 chrominance U matrix is obtained, and the reconstruction matrix is used as an encoding reconstruction matrix of a 32 ⁇ 32 chrominance U matrix in the frame, and The reconstructed matrix of the 32x32 chrominance U matrix in the frame is sampled to obtain an intra-frame 16x16 chrominance U-like matrix.
  • the intra-frame 32x32 chrominance V matrix is encoded. Then, the luminance matrix of 32x32 between frames, the chrominance U matrix of 32x32, and the chrominance V matrix of 32x32 are sequentially processed.
  • the luminance matrix of 16 x 16 in the frame is encoded. Specifically, by performing coding prediction on the 16 ⁇ l6 luminance matrix in the frame, a reconstruction matrix of the 16 ⁇ l6 luminance matrix in the frame is obtained, and the reconstructed matrix is compared with the reconstructed matrix of the 32 ⁇ 32 luminance matrix in the frame.
  • the 16x16 brightness sample matrix is compared with the 16 xl6 brightness matrix in the frame to obtain two errors, and the two errors are compared, and a matrix with less error is taken as the 16 x16 brightness matrix in the frame.
  • the code reconstruction matrix, and the reconstruction matrix of the 16 xl6 luminance matrix in the frame is sampled to obtain an intra-frame 8x8 luminance sample matrix.
  • Each of the quantization matrices is sequentially encoded in the manner described above until all matrices are encoded.
  • the intra-frame 4x4 luminance matrix is first encoded. Then, the intra-frame 4x4 chrominance U matrix, the intra-frame 4x4 chrominance V matrix, the inter-frame 4x4 luminance matrix, the inter-frame 4x4 chrominance U matrix, and the inter-frame 4x4 chrominance V matrix are encoded.
  • the intra-frame 8x8 luminance matrix, the intra-frame 8x8 chrominance U matrix, the intra-frame 8x8 chrominance V matrix, the inter-frame 8x8 luminance matrix, the inter-frame 8x8 chrominance U matrix, and the inter-frame 8x8 color is encoded.
  • the matrix corresponding to the 8x8 luminance matrix in the frame is obtained by the reconstruction matrix of the 4x4 luminance matrix in the frame;
  • the corresponding matrix of the 8x8 chrominance U matrix in the frame is the color of the frame 4x4
  • the reconstruction matrix of the degree U matrix is obtained by the upper sample;
  • the corresponding matrix of the 8x8 chrominance V matrix is obtained by the reconstruction matrix of the 4x4 chrominance V matrix in the frame;
  • the 8x8 brightness matrix of the frame The corresponding sample matrix is obtained by uploading the reconstruction matrix of the brightness matrix of 4x4 between frames;
  • the sample matrix corresponding to the chrominance U matrix of 8x8 between frames is performed by the reconstruction matrix of the chromaticity U matrix of 4x4 between frames.
  • the corresponding sample matrix is obtained by uploading a reconstruction matrix of chrominance V matrices of 4x4 between frames.
  • the degree V matrix is encoded.
  • the intra-frame 32x32 luminance matrix, the intra-frame 32x32 chrominance U matrix, the intra-frame 32x32 chrominance V matrix, the inter-frame 32x32 luminance matrix, the inter-frame 32x32 chrominance U matrix, and the inter-frame 32x32 color is encoded.
  • FIG. 4 is a flowchart of a matrix decoding method according to an embodiment of the present invention. As shown in FIG. 4, the method of this embodiment includes:
  • Step 401 Determine a decoding order corresponding to the matrix set and a corresponding sampling method.
  • the decoding end when decoding a matrix set including multiple matrices, the decoding end first determines in which order to decode multiple matrices in the matrix set, for example, according to a matrix from small to large, or according to a matrix To a small order. Moreover, the decoding end also needs to determine a sampling method that is compatible with the decoding order. For example, if the decoding is performed in order of small to large matrix, the sampling method is the same; if the order is in descending order of the matrix Decoding, then the sample method is the next.
  • the encoding and decoding sequence and the corresponding sampling method when encoding and decoding the matrix set can be agreed with the encoding end in advance.
  • the decoding end can decode the identification decoding order and the corresponding ⁇ from the code stream.
  • Step 402 Decode, from the code stream, an identifier bit that identifies whether the current matrix uses a sample matrix.
  • Step 403 Determine whether the identification bit identifies the current matrix using the sample matrix; if the determination result is yes, execute step 404; if the determination result is no, perform step 405.
  • the decoding end may determine, according to the value of the decoded identification bit, whether the current matrix uses the sampling matrix. For example: If the identification bit is 1, the current matrix is identified using the sample matrix as its decoding reconstruction matrix; if the identification bit is 0, then the identification current matrix does not use the sample matrix as its decoding reconstruction matrix.
  • Step 404 Perform a sample matrix obtained by performing a sample processing on the decoded reconstruction matrix of the decoded matrix in the decoding order before the current matrix, as the decoding reconstruction matrix of the current matrix, and perform step 406.
  • the decoding end When the current matrix uses the sample matrix, the decoding end performs the sample processing on the decoding reconstruction matrix of the decoded matrix before the current matrix according to the decoding order, and obtains the sample matrix, and then uses the obtained sample matrix as the decoding reconstruction matrix of the current matrix.
  • the decoding end can perform decoding on the decoded reconstruction matrix of the decoded 4x4 matrix to obtain a sample matrix, and use the obtained sample matrix as the decoding reconstruction matrix of the 8x8 matrix. , but is not limited to using a matrix that has been decoded before the current matrix and is adjacent to the current matrix.
  • Step 405 Decode the decoding matrix of the current matrix directly from the code stream, and perform steps.
  • the decoding end decodes the encoded data of the current matrix from the code stream according to the decoding order, and acquires the decoding reconstruction matrix of the current matrix according to the decoded encoded data.
  • the decoding end decodes the decoding matrix of the current matrix from the code stream: the decoding end decodes the coding layer of the current matrix from the code stream, and Decoding, from the code stream data corresponding to the current matrix, the coded data of each layer in the current matrix whose layer number is less than or equal to the number of coding layers, and then according to the decoded number of coding layers and the number of layers less than or equal to the number of layers of the coding layer Encoding data, according to the hierarchical order (first low-level solution and high-level solution), the matrix element reconstruction values corresponding to the layers of the current matrix whose layer number is less than or equal to the coding layer number are sequentially obtained; then, the decoding end is smaller than the number of layers in the current matrix.
  • the matrix element reconstruction value corresponding to the layer corresponding to the number of coding layers is subjected to interpolation calculation to obtain a matrix element reconstruction value corresponding to each layer of the current matrix whose layer number is larger than the coding layer number.
  • the interpolation method and the interpolation order used are all compatible with the coding end.
  • the interpolation method may be a uniform interpolation method or a weighted interpolation method; the interpolation order may be first horizontally and then longitudinally, or may be vertical and horizontal.
  • the decoding reconstruction matrix of the current matrix is obtained.
  • the process in which the decoding end decodes the encoded data of each layer in the current matrix that is less than or equal to the number of coding layers in the current matrix includes: for each layer whose layer number is less than or equal to the number of coding layers, if the layer If the number is less than or equal to the set number of layers, the variable length code is decoded for the code stream corresponding to each layer whose number of layers is less than or equal to the number of coding layers, and the number of codes of each layer whose number of layers is less than or equal to the number of coding layers is obtained.
  • the run length code is decoded for the code stream corresponding to each layer whose layer number is less than or equal to the number of coding layers, and the coded data of each layer whose layer number is less than or equal to the number of coding layers is obtained.
  • the decoding process is adapted to the encoding side.
  • Step 406 Continue decoding the code stream according to the decoding sequence, and then go to step 402 to sequentially decode the decoding reconstruction matrix of all the matrices in the matrix set from the code stream.
  • the matrix decoding method of this embodiment is adapted to the matrix coding method shown in FIG. 3, first determining the decoding order and the corresponding sampling method, and determining each matrix in the acquisition matrix set according to the identification bits decoded from the code stream.
  • the method of decoding the reconstruction matrix wherein when the identification bit identifies that the current matrix uses the sample matrix, the coded data of the current matrix does not exist in the code stream, which improves the compression ratio of the coding end to the matrix, and reduces the occupation of the transmission matrix.
  • the code rate is adapted to the matrix coding method shown in FIG. 3, first determining the decoding order and the corresponding sampling method, and determining each matrix in the acquisition matrix set according to the identification bits decoded from the code stream.
  • FIG. 5 is a schematic structural diagram of a matrix encoding apparatus according to an embodiment of the present invention. As shown in FIG. 5A, the apparatus of this embodiment includes: a layering module 51, an encoding processing module 52, and a first code writing module 53.
  • the layering module 51 is configured to layer the matrix according to a preset number of layers, and group the matrix elements into different layers.
  • the encoding processing module 52 is connected to the layering module 51, and is configured to perform encoding processing on the matrix elements in each layer to be encoded in order according to the determined number of layers to be encoded.
  • the encoded layer is referred to as the current layer. If the number of layers in the current layer is less than or equal to the number of layers to be encoded, the encoding processing module 52 calculates the original matrix element value corresponding to the current layer and the predicted value of the matrix element corresponding to the current layer.
  • the residual data is obtained as the encoded data of the current layer and written into the code stream; if the number of layers of the current layer is greater than the number of layers to be encoded, the encoding processing module 52 does not write the encoded data of the current layer in the code stream.
  • the predicted value of the matrix element corresponding to the current layer is calculated by interpolating the matrix element reconstruction value or the matrix element prediction value of the encoded matrix element in the coded layer before the current layer of the matrix and in the current layer.
  • the first code writing module 53 is configured to encode the number of layers to be encoded and write the code stream.
  • the functional modules of the matrix coding apparatus of this embodiment can be used to perform the process of the matrix coding method shown in FIG. 1A.
  • the specific working principle is not described here. For details, refer to the description of the method embodiments.
  • the matrix encoded by the matrix coding apparatus may be a QM, a scaling matrix, a coefficient weighting matrix, a transformed transform domain matrix of the QM, a transformed transform domain matrix of the scaling matrix, and a coefficient weighting matrix transformed.
  • the transform domain matrix, the QM predictive residual data matrix after encoding prediction, the prediction residual residual matrix or the systematic weighting matrix of the scaling matrix after prediction and coding Any one or combination of prediction residual matrices after the code.
  • the transform may be a Z transform, a DCT transform, a DFT transform, or the like.
  • the coding prediction refers to encoding a QM, a scaling matrix, a coefficient weighting matrix, and the like, and then performing a residual on the encoded matrix and the pre-encoding matrix (ie, the uncoded original matrix).
  • the encoding method used for encoding prediction is not limited, such as DPCM.
  • the matrix coding apparatus of this embodiment performs layering on the matrix to be encoded, and obtains residual data as the encoded data into the code stream according to the determined number of layers to be coded, or writes the code in the code stream.
  • the data realizes hierarchical coding and transmission of the matrix, improves the compression ratio of the matrix, and reduces the code rate occupied by the transmission matrix.
  • FIG. 5B is a schematic structural diagram of a matrix coding apparatus according to another embodiment of the present invention. The embodiment is implemented based on the embodiment shown in FIG. 5A. As shown in FIG. 5B, the matrix encoding apparatus of this embodiment further includes: a second code writing module 54.
  • the second code writing module 54 is configured to encode the preset division layer number and the division method of layering the matrix, and write the code stream. Alternatively, the second code writing module 54 is configured to encode and write the partitioning method for layering the matrix.
  • the dividing method is a grouping method of grouping matrix elements of a matrix into different layers.
  • the encoding processing module 52 is specifically configured to hierarchically encode the matrix elements according to the determined number of layers to be encoded according to the manner of encoding the lower layer encoding upper layer first.
  • the encoding processing module 52 is specifically configured to perform a parity check value calculation or a weighted interpolation calculation on the matrix element reconstruction value or the matrix element prediction value of the encoded matrix element in the coded layer before the current layer of the matrix and the current layer, or obtain the current layer corresponding Matrix element prediction value.
  • the encoding processing module 52 is further configured to perform a matrix of the encoded matrix elements in the encoded layer and the current layer in the current layer of the current layer according to the interpolation order of the horizontal and vertical vertical direction, or the interpolation order of the vertical and horizontal directions.
  • the element reconstruction value or the matrix element prediction value is interpolated to obtain a matrix element prediction value corresponding to the current layer.
  • the encoding processing module 52 is specifically configured to: when the number of layers of the current layer is less than or equal to the set number of layers, the coded data of the current layer is coded by the variable length code and then written into the code stream, and the number of layers in the current layer is When the value is greater than the number of layers, the coded data of the current layer is run-length encoded and then written into the code stream.
  • FIG. 6 is a schematic structural diagram of a matrix decoding apparatus according to an embodiment of the present invention. As shown in FIG. 6A, the apparatus of this embodiment includes: a layer number decoding module 61, a first reconstruction module 62, and a second reconstruction module 63.
  • the layer number decoding module 61 is configured to decode the number of coding layers of the matrix from the code stream.
  • the number of coding layers is the number of layers to be encoded that the coding end determines and writes to the code stream.
  • the first reconstruction module 62 is connected to the layer number decoding module 61, and is configured to sequentially obtain the coded data of each layer whose number of layers in the matrix decoded from the code stream is less than or equal to the number of coding layers according to the number of coding layers.
  • the second reconstruction module 63 is connected to the first reconstruction module 62, and is configured to calculate, according to the matrix element reconstruction value corresponding to the layer whose layer number is less than or equal to the number of coding layers, the matrix element reconstruction value corresponding to each layer whose number of layers is greater than the coding layer number. .
  • the function modules of the matrix decoding apparatus of this embodiment can be used to execute the process of the matrix decoding method shown in FIG. 2.
  • the specific working principle is not described here. For details, refer to the description of the method embodiments.
  • the matrix decoded by the matrix decoding device may be a QM, a scaling matrix, a coefficient weighting matrix, a transformed transform domain matrix of the QM, a transformed transform domain matrix of the scaling matrix, and a coefficient weighting matrix after being transformed.
  • the transform domain matrix, the prediction residual matrix of the QM after coding prediction, the prediction residual matrix after the coding matrix is subjected to the coding prediction, or the prediction residual matrix after the prediction of the system weighting matrix, or a combination thereof.
  • the transform may be a Z transform, a DCT transform, a DFT transform, or the like.
  • the coding prediction refers to encoding a QM, a scaling matrix, a coefficient weighting matrix, etc., and then performing a residual on the encoded matrix and the pre-encoding matrix (i.e., the uncoded original matrix).
  • the encoding method used for encoding prediction is not limited, such as DPCM.
  • the matrix decoding apparatus of this embodiment cooperates with the matrix coding apparatus shown in FIG. 5A to obtain the number of coding layers from the code stream, and the number of layers decoded from the code stream is less than or equal to the number of coding layers.
  • the coded data of each layer sequentially decodes the reconstructed values of the matrix elements corresponding to each layer, thereby realizing the reconstruction of the matrix, allowing the matrix coding apparatus to encode the matrix using the layered architecture, improving the compression ratio of the matrix, and reducing the transmission matrix. Occupied code rate.
  • FIG. 6B is a schematic structural diagram of a matrix decoding apparatus according to another embodiment of the present invention. The embodiment is implemented based on the embodiment shown in FIG. 6A. As shown in FIG. 6B, the apparatus in this embodiment further includes: a split information decoding module 64.
  • the split information decoding module 64 is configured to decode the partition layer number of the matrix and the corresponding partitioning method from the code stream, and provide the first reconstruction module 62 and the second reconstruction module 63.
  • the split information decoding module 64 is configured to decode the partitioning method from the code stream and provide the first reconstruction module 62 and the second reconstruction module 63.
  • the split information decoding module 64 is configured to decode the split layer number from the code stream and provide the first layer reconstruction module 62 and the second reconstruction module 63.
  • the dividing method is a grouping method of grouping matrix elements of a matrix into different layers.
  • the second reconstruction module 63 of the embodiment is specifically configured to perform a parity interpolation calculation or a weighted interpolation calculation on a matrix element reconstruction value corresponding to a layer whose layer number is less than or equal to the number of coding layers, to obtain each layer having a layer number greater than a coding layer number.
  • the matrix element corresponding to the layer reconstructs the value.
  • the second reconstruction module 63 of the embodiment is further configured to perform the interpolation order according to the first horizontal and vertical vertical interpolation order, or the matrix element reconstruction value corresponding to the layer with the number of layers less than or equal to the number of coding layers according to the interpolation order of the vertical and horizontal directions. Interpolation calculation results in a matrix element reconstruction value corresponding to each layer whose number of layers is larger than the number of coding layers.
  • the first reconstruction module 62 is configured to: when the number of layers of the decoded current layer is less than or equal to the set number of layers, perform variable length code decoding on the code stream corresponding to the current layer, and obtain coded data of the current layer.
  • the number of layers of the current layer decoded is greater than the threshold of the layer number, and the code stream corresponding to the current layer is decoded by the run length code to obtain the encoded data of the current layer; and then the number of layers in the matrix decoded from the code stream is smaller than the number of layers in the matrix decoded from the code stream.
  • the coded data of each layer equal to the number of coding layers, and the matrix element reconstruction values corresponding to the layers whose number of layers is less than or equal to the number of coding layers are sequentially obtained in a hierarchical order.
  • the matrix decoding apparatus of this embodiment cooperates with the matrix coding apparatus shown in FIG. 5A or FIG. 5B to obtain the number of coding layers from the code stream, and the number of layers decoded from the code stream is less than or equal to
  • the coded data of each layer of the coding layer sequentially decodes the reconstructed values of the matrix elements corresponding to the layers, thereby realizing the reconstruction of the matrix, allowing the matrix coding apparatus to encode the matrix using the layered architecture, thereby improving the compression ratio to the matrix and reducing the compression ratio.
  • the code rate occupied by the transmission matrix is not limited to obtain the number of coding layers from the code stream, and the number of layers decoded from the code stream is less than or equal to
  • the coded data of each layer of the coding layer sequentially decodes the reconstructed values of the matrix elements corresponding to the layers, thereby realizing the reconstruction of the matrix, allowing the matrix coding apparatus to encode the matrix using the layered architecture, thereby improving the compression ratio to the matrix and reducing the
  • FIG. 7A is a schematic structural diagram of a matrix coding apparatus according to another embodiment of the present invention.
  • the apparatus of this embodiment includes: a prediction encoding module 71, an error obtaining module 72, a first encoding reconstruction module 73, and a second encoding reconstruction module 74.
  • the prediction encoding module 71 is configured to follow the code according to the size of the matrix in the matrix set.
  • the sequence is used to encode and predict the matrix in the matrix set, obtain the reconstruction matrix of the matrix, and perform the corresponding processing on the reconstruction matrix of the matrix to obtain the sample matrix.
  • the error obtaining module 72 is connected to the predictive encoding module 71, and is configured to obtain a first error from the reconstructed matrix of the current matrix and the current matrix, and obtain a sample by the reconstruction matrix of the encoded matrix before the current matrix according to the encoding order. The matrix and the current matrix get the second error.
  • the first code reconstruction module 73 is connected to the error acquisition module 72, and is configured to use the reconstruction matrix of the current matrix as the code reconstruction matrix corresponding to the current matrix when the first error acquired by the error acquisition module 72 is less than or equal to the second error.
  • the coding result corresponding to the current matrix is written into the code stream.
  • the second code reconstruction module 74 is connected to the error acquisition module 72, and the first error obtained by the error acquisition module 72 is greater than the second error, and the reconstruction matrix of the coded matrix before the current matrix is processed according to the coding order.
  • the obtained sample matrix is used as the code reconstruction matrix corresponding to the current matrix, and the coding result corresponding to the current matrix is written into the code stream.
  • the function modules of the matrix coding apparatus of this embodiment can be used to execute the process of the matrix coding method shown in FIG. 3.
  • the specific working principle is not described here. For details, refer to the description of the method embodiments.
  • the matrix coding apparatus of this embodiment sequentially encodes and predicts each matrix in the matrix set according to the size of the matrix, obtains a reconstruction matrix, and performs a sample processing on the reconstruction matrix to obtain a sample matrix, from the current coding.
  • a matrix of the matrix and a matrix of the matrix of the previously coded matrix are selected as a coded reconstruction matrix of the current matrix, and the coded result of the current matrix is written into the code stream to implement the matrix.
  • the coding of each matrix in the set improves the compression ratio for each matrix and reduces the code rate occupied by the transmission matrix.
  • FIG. 7B is a schematic structural diagram of a matrix encoding apparatus according to still another embodiment of the present invention. The embodiment is implemented based on the embodiment shown in FIG. 7A. As shown in FIG. 7B, the device in this embodiment further includes: an identifier encoding module 75.
  • the identification coding module 75 is configured to write an identification bit identifying the coding order and the used method in the code stream, and provide the prediction bit to the prediction coding module 71.
  • the identification bit is used to identify whether the coding order is in order of the matrix from large to small, or from small to large, and also to identify the coding in the order of the matrix.
  • the sampling method used is the lower sampling method, and when the encoding is performed in the order of the matrix from small to large, the sampling method used is the upper sampling method.
  • the predictive coding module 71 of this embodiment is specifically configured to follow the order of the matrix from small to large.
  • the matrix in the matrix set is coded and predicted, the reconstructed matrix of the matrix is obtained, and the reconstructed matrix of the matrix is sampled to obtain a sample matrix, wherein the coding matrix of the smallest matrix is the reconstruction matrix of the minimum matrix. or,
  • the prediction encoding module 71 is specifically configured to perform coding prediction on the matrix in the matrix set according to the order of the matrix, obtain the reconstruction matrix of the matrix, and perform a sample matrix on the reconstruction matrix of the matrix, where the maximum matrix is obtained.
  • the coding matrix is the reconstruction matrix of the largest matrix.
  • the predictive coding module 71 of the embodiment is specifically configured to layer the matrix according to the preset number of layers, and group the matrix elements in the matrix into different layers, according to the determined number of layers to be coded, according to the hierarchical order
  • the matrix elements in each layer to be encoded are encoded in sequence; if the number of layers in the current layer is less than or equal to the number of layers to be encoded, the original matrix element value corresponding to the current layer is used as the matrix element reconstruction value corresponding to the current layer;
  • the number of layers of the layer is greater than the number of layers to be coded, and the predicted value of the matrix element corresponding to the current layer is used as the reconstructed value of the matrix element corresponding to the current layer, and the coding prediction of the matrix is implemented, and the reconstruction matrix of the matrix is obtained.
  • the predicted value of the matrix element corresponding to the current layer is obtained by interpolation calculation from the predicted value of the matrix element corresponding to the previously coded layer of the current layer.
  • the first code reconstruction module 73 of the present embodiment is specifically configured to write, in the code stream, an identifier bit that identifies whether the current matrix uses the sample matrix, and the identifier bit identifies that the current matrix does not use the sample matrix, and
  • the residual data of the matrix element corresponding to each layer of the current matrix in which the number of layers is less than or equal to the number of layers to be encoded and the layer element whose layer number is less than or equal to the number of layers to be encoded is calculated as the number of layers is smaller than the number of layers.
  • the coded data of each layer equal to the number of layers to be coded is written into the code stream, and the coded data of each layer in the current matrix whose layer number is larger than the number of layers to be coded is not written in the code stream, and the number of layers to be coded is written into the code. flow.
  • the first code reconstruction module 73 is more specifically configured to: when the number of layers of the layer whose number of layers is less than or equal to the number of layers to be encoded is less than or equal to the set number of layers, the number of layers is less than or equal to The coded data of each layer of the coding layer is coded by the variable length code and written into the code stream. When the number of layers whose layers is less than or equal to the number of layers to be coded is greater than the number of layers, the number of layers is less than or equal to The coded data of each layer of the coding layer is run-length encoded and written into the code stream.
  • the second code reconstruction module 74 is specifically configured to write, in the code stream, an identifier that identifies whether the current matrix uses the sample matrix, and the identifier bit identifies the current matrix using the sample matrix, and does not write in the code stream.
  • the encoded data corresponding to the current matrix is specifically configured to write, in the code stream, an identifier that identifies whether the current matrix uses the sample matrix, and the identifier bit identifies the current matrix using the sample matrix, and does not write in the code stream.

Abstract

本发明提供一种矩阵编码方法及装置与解码方法及装置。其中,一种编码方法包括:按照预设划分层数将矩阵进行分层,并将矩阵元素分组到不同分层中;根据确定的待编码层数,按照层次顺序依次对待编码的每层中的矩阵元素进行编码处理;对于层数小于或等于待编码层数的层,将该层对应的原始矩阵元素值和对应的矩阵元素预测值的残差数据作写入码流;对于层数大于待编码层数的层,在码流中不写入该层的编码数据;将待编码层数进行编码,并写入码流。本发明技术方案提高了对矩阵的压缩比,减少了传输矩阵所占用的码率。

Description

矩阵编码方法与装置及解码方法与装置
技术领域
本发明涉及视频编码技术, 尤其涉及一种矩阵编码方法与装置及解码方 法与装置。
背景技术 在视频编码中, 需要将图像块经过预测后的残差变换系数如离散余弦 变换( Discrete Cosine Transform; 简称为: DCT ) 系数进行量化后再编码, 其中每个变换块的每个频率系数位置的量化权重即为量化矩阵 ( Quantization matrix; 简称为: QM ) 。 QM的尺寸与 DCT变换块大小相 等, 例如 32x32大小的 DCT变换块需要对应 32x32的 QM。 同时, 不同的 信号分量及图像块的不同的预测方式(帧内 /帧间)也需要不同的 QM。 QM 的元素为 0~255的整数, 一般对于低频的系数 QM中的量化权重较小, 对 于高频系数, QM中量化权重较大。 使用 QM可以提升编码视频的图像主 观质量。
目前, 在 JPEG (联合图象专家组) , MPEG1 ( MPEG, 运动图象专家 组) , MPEG2 , MPEG4 等图象编码标准中, 均釆用量化矩阵实现提升编 码图像主观质量, 其中, 在 JPEG图象编码标准中是将 QM放在图象头, 而在 MPEG1、 MPEG2、 MPEG4等图象编码标准中则是将 QM放在序列头 中; 因此, 对于序列图象而言, MPEG图象编码标准的 QM是每个序列拥 有一个,即针对同一序列釆用同一个固定的 QM实现针对图象的量化处理。
图像序列中的图象内容并不是完全相同, 即在同一个图象序列中各图 象的细节各不相同,因此,如果对于整个序列的所有图象均釆用同一个 QM 实现量化处理, 显然无法达到最佳的量化编码后的图象主观质量。 为此, 在 H.264/高级视频编码 ( Advanced Video Coding; 简称为: AVC ) 中, 在 序列头和图象头都提供用户自定义的 QM, 以便于可以在图象级改变 QM, 以更好地符合视频序列图象之间的内容变化比较大的特点。 描述:
( 1 ) JPEG中的量化矩阵
在 JPEG标准中, 只有 8x8—种 DCT (离散余弦变换) 的变换尺寸, 因此量化矩阵大小也是 8x8, 共有 64个量化系数, 对于图象的亮度分量和 色度分量釆用不同的量化矩阵, JPEG的量化矩阵的所有系数值均放在图象 头中, 每幅图象只有一个亮度量化矩阵和色度量化矩阵。 当在编解码端使 用标准中默认预定义的量化矩阵, 则量化矩阵就不需要在码流中传输。
( 2 ) MPEG2
在 MPEG2标准中, 只有 8x8—种 DCT变换尺寸, 因此量化矩阵大小 也是 8x8, 共有 64个量化系数。 对于编码图象分别釆用帧内量化矩阵与帧 间量化矩阵。 MPEG2只允许每个序列中的所有图象只拥有一个帧内量化矩 阵和一个帧间量化矩阵, 所有的量化矩阵的 64个系数值都是放在序列头。 MPEG2也允许用户自定义量化矩阵, 自定义的量化矩阵在序列扩展头中。 由于是每个序列的量化矩阵不能更改, 量化矩阵直接编码在码流中的负载 不大。
( 3 ) H.264/AVC标准
在 H.264/AVC 标准中, 有 8x8和 4x4两种 DCT变换尺寸, 因此也 有与之对应的 8x8和 4x4两组量化矩阵。对 8x8的量化矩阵,共 64个系数 对不同的频率分量进行量化的缩放; 对 4x4的矩阵,共 16个系数对不同的 频率分量进行量化的缩放。 对于 4x4的块和 8x8的块都有与之对应的量化 矩阵。 因为在图象头语法中使用量化矩阵。 目前, 在 H.264/AVC使用以下 方法编码和在码流中传输 QM: 首先将 QM扫描为一维, 然后使用差分脉 冲编码调制 (Differential Pulse Code Modulation; 简称为: DPCM )进行调 对 QM进行无损压缩, 但其压缩效率较低, QM编码比特所占用的码率仍 较高。 尤其是对较小图像尺寸的码流序列。 因此为了限制量化矩阵在每帧 编码图像码流中的负载, 限制量化矩阵在图像头中使用只在 H.264/AVC
High Profile标准中, 用于高清图像编码。
在高效视频编码 ( High Efficiency Video Coding; 简称为: HEVC )中, 图像块的变换尺寸增加到 4x4, 8x8, 16x16, 32x32等多种变换尺寸, 并且 由于使用了较大的变换块, 所以对应的 QM也较大。 如果不压缩或者釆用 H.264/AVC方法对 QM编码, QM将占据较大码率, QM本身编码比特可 占到码率的一半以上, 甚至几倍。
发明内容 本发明提供一种矩阵编码方法及装置与解码方法及装置, 用以提高量化 矩阵的压缩率, 降低传输量化矩阵时所占用的码率。
本发明一个方面提供一种矩阵编码方法, 包括:
按照预设划分层数将矩阵进行分层, 并将矩阵元素分组到不同分层中; 根据确定的待编码层数, 按照层次顺序依次对待编码的每层中的矩阵元 素进行编码处理;
如果当前层的层数小于或等于所述待编码层数, 则根据当前层对应的原 始矩阵元素值和当前层对应的矩阵元素预测值计算得到残差数据作为当前层 的编码数据写入码流;
如果当前层的层数大于所述待编码层数, 在所述码流中不写入当前层的 编码数据;
其中, 当前层对应的矩阵元素预测值是由所述矩阵当前层之前已编码层 中和当前层中已编码矩阵元素的矩阵元素重建值或者矩阵元素预测值进行插 值计算得到的;
将所述待编码层数进行编码, 并写入所述码流。
本发明一个方面提供一种矩阵解码方法, 包括:
从码流中解码出矩阵的编码层数;
根据所述编码层数和从所述码流中解码出的所述矩阵中层数小于或等于 所述编码层数的各层的编码数据, 按照层次顺序依次得到层数小于或等于所 述编码层数的各层对应的矩阵元素重建值;
由层数小于或等于所述编码层数的层对应的矩阵元素重建值计算得到层 数大于所述编码层数的各层对应的矩阵元素重建值。
本发明另一个方面提供一种矩阵编码方法, 包括:
根据矩阵集合中矩阵的大小, 按照编码顺序依次对所述矩阵集合中的矩 阵进行编码预测, 获取所述矩阵的重建矩阵, 并将所述矩阵的重建矩阵进行 相应的釆样处理得到釆样矩阵;
由当前矩阵的重建矩阵和当前矩阵得到第一误差, 由按照所述编码顺序 在当前矩阵之前已编码矩阵的重建矩阵进行釆样处理得到的釆样矩阵和当前 矩阵得到第二误差;
如果所述第一误差小于或等于所述第二误差, 将当前矩阵的重建矩阵作 为当前矩阵对应的编码重建矩阵, 并将当前矩阵对应的编码结果写入码流; 如果所述第一误差大于所述第二误差, 将按照所述编码顺序在当前矩阵 之前已编码矩阵的重建矩阵进行釆样处理得到的釆样矩阵作为当前矩阵对应 的编码重建矩阵, 并将当前矩阵对应的编码结果写入所述码流。
本发明另一个方面提供一种矩阵解码方法, 包括:
确定矩阵集合对应的解码顺序和相应的釆样方法;
从码流中解码出标识当前矩阵是否使用釆样矩阵的标识比特;
如果所述标识比特标识当前矩阵使用釆样矩阵, 将由按照所述解码顺序 在当前矩阵之前已解码矩阵的解码重建矩阵进行釆样处理得到的釆样矩阵, 作为当前矩阵的解码重建矩阵;
如果所述标识比特标识当前矩阵不使用釆样矩阵, 直接从所述码流中解 码出当前矩阵的解码重建矩阵;
按照所述解码顺序, 依次解码出所述矩阵集合中所有矩阵的解码重建矩 阵。
本发明一个方面提供一种矩阵编码装置, 包括:
分层模块, 用于按照预设划分层数将矩阵进行分层, 并将矩阵元素分组 到不同的分层中;
编码处理模块, 用于根据确定的待编码层数, 按照层次顺序依次对待编 码的每层中的矩阵元素进行编码处理; 如果当前层的层数小于或等于所述待 编码层数, 则根据当前层对应的原始矩阵元素值和当前层对应的矩阵元素预 测值计算得到残差数据作为当前层的编码数据写入码流; 如果当前层的层数 大于所述待编码层数, 在所述码流中不写入当前层的编码数据;
其中, 当前层对应的矩阵元素预测值是由所述矩阵当前层之前已编码层 中和当前层中已编码矩阵元素的矩阵元素重建值或者矩阵元素预测值进行插 值计算得到的;
第一编码写入模块, 用于将所述待编码层数进行编码, 并写入所述码流。 本发明一个方面提供一种矩阵解码装置, 包括:
层数解码模块, 用于从码流中解码出矩阵的编码层数;
第一重建模块, 用于根据所述编码层数和从所述码流中解码出的所述矩 阵中层数小于或等于所述编码层数的各层的编码数据, 按照层次顺序依次得 到层数小于或等于所述编码层数的各层对应的矩阵元素重建值;
第二重建模块, 用于由层数小于或等于所述编码层数的层对应的矩阵元 素重建值计算得到层数大于所述编码层数的各层对应的矩阵元素重建值。
本发明另一个方面提供一种矩阵编码装置, 包括:
预测编码模块, 用于根据矩阵集合中矩阵的大小, 按照编码顺序依次对 所述矩阵集合中的矩阵进行编码预测, 获取所述矩阵的重建矩阵, 并将所述 矩阵的重建矩阵进行相应的釆样处理得到釆样矩阵;
误差获取模块, 用于由当前矩阵的重建矩阵和当前矩阵得到第一误差, 由按照所述编码顺序在当前矩阵之前已编码矩阵的重建矩阵进行釆样处理得 到的釆样矩阵和当前矩阵得到第二误差;
第一编码重建模块,用于在所述第一误差小于或等于所述第二误差,将当前 矩阵的重建矩阵作为当前矩阵对应的编码重建矩阵, 并将当前矩阵对应的编 码结果写入码流;
第二编码重建模块, 用于在所述第一误差大于所述第二误差, 将按照所 述编码顺序在当前矩阵之前已编码矩阵的重建矩阵进行釆样处理得到的釆样 矩阵作为当前矩阵对应的编码重建矩阵, 并将当前矩阵对应的编码结果写入 所述码流。
本发明另一个方面提供一种矩阵解码装置, 包括:
确定模块, 用于确定矩阵集合对应的解码顺序和相应的釆样方法; 标识解码模块, 用于从码流中解码出标识当前矩阵是否使用釆样矩阵的 标识比特;
第一解码重建模块, 用于在所述标识比特标识当前矩阵使用釆样矩阵时, 将由按照所述解码顺序在当前矩阵之前已解码矩阵的解码重建矩阵进行釆样 处理得到的釆样矩阵, 作为当前矩阵的解码重建矩阵; 第二解码重建模块, 用于在所述标识比特标识当前矩阵不使用釆样矩阵, 直接从所述码流中解码出当前矩阵的解码重建矩阵;
触发模块, 用于触发所述标识解码模块、 所述第一解码重建模块和所述 第二解码重建模块, 按照所述解码顺序, 依次解码出所述矩阵集合中所有矩 阵的解码重建矩阵。
本发明一个方面提供的矩阵编码方法及装置, 通过釆用分层结构将矩阵 元素分组到不同分层中, 然后根据确定的待编码层数对各层进行编码, 或者 入码流, 或者不在码流中写入该层对应的编码数据, 提高了对矩阵的压缩比, 降低了传输矩阵所占用的码率。
本发明一个方面提供的矩阵解码方法及装置, 与本发明一个方面提供的 矩阵编码方法及装置相适应, 从码流中解码出编码层数和层数小于或等于编 码层数的层的编码数据, 进而基于解码出的数据实现对矩阵的重构, 使编码 端可以使用分层架构对矩阵编码并传输, 提高了对矩阵的压缩比, 降低了传 输矩阵所占用的码率。
本发明另一个方面提供的矩阵编码方法及装置, 通过按照编码顺序依次 对矩阵集合中的多个矩阵进行编码处理, 并从每个矩阵编码预测出的重建矩 阵与之前已编码矩阵的重建矩阵釆样得到的釆样矩阵中, 选择误差相对较小 的矩阵作为编码重建矩阵, 同时将编码结果写入码流, 由于使用釆样矩阵时, 只需在码流中写入标识比特, 而不需要写入整个矩阵, 提高了对矩阵的压缩 率, 降低了传输矩阵所占用的码率。
本发明另一个方面提供的矩阵解码方法及装置, 与本发明另一个方面 提供的矩阵编码方法及装置相适应, 从码流中解码出每个矩阵对应的标识 该矩阵是否使用釆样矩阵的标识比特, 并根据标识比特或者从之前已经解 码出的矩阵的解码重建矩阵釆样得到当前矩阵的解码重建矩阵, 或者直接 从码流中解码出当前矩阵的解码重建矩阵, 并按照解码顺序解码出所有矩 阵的解码重建矩阵, 提高了对矩阵的压缩率, 降低了传输矩阵所占用的码 率。 附图说明 为了更清楚地说明本发明实施例或现有技术中的技术方案, 下面将对实 施例或现有技术描述中所需要使用的附图作一简单地介绍, 显而易见地, 下 面描述中的附图是本发明的一些实施例, 对于本领域普通技术人员来讲, 在 不付出创造性劳动的前提下, 还可以根据这些附图获得其他的附图。
图 1A为本发明一实施例提供的矩阵编码方法的流程图;
图 1B为本发明一实施例提供的 8x8矩阵分层结构示意图;
图 1C为本发明一实施例提供的 4x4矩阵分层结构示意图;
图 2为本发明一实施例提供的矩阵解码方法的流程图;
图 3为本发明一实施例提供的矩阵编码方法的流程图;
图 4为本发明一实施例提供的矩阵解码方法的流程图;
图 5 A为本发明一实施例提供的矩阵编码装置的结构示意图;
图 5B为本发明另一实施例提供的矩阵编码装置的结构示意图; 图 6A为本发明一实施例提供的矩阵解码装置的结构示意图;
图 6B为本发明另一实施例提供的矩阵解码装置的结构示意图; 图 7A为本发明又一实施例提供的矩阵编码装置的结构示意图; 图 7B为本发明再一实施例提供的矩阵编码装置的结构示意图; 图 8为本发明又一实施例提供的矩阵解码装置的结构示意图。
具体实施方式 为使本发明实施例的目的、 技术方案和优点更加清楚, 下面将结合本发 明实施例中的附图, 对本发明实施例中的技术方案进行清楚、 完整地描述, 显然, 所描述的实施例是本发明一部分实施例, 而不是全部的实施例。 基于 本发明中的实施例, 本领域普通技术人员在没有作出创造性劳动前提下所获 得的所有其他实施例, 都属于本发明保护的范围。
图 1A为本发明一实施例提供的矩阵编码方法的流程图。 如图 1A所示, 本实施例的方法包括:
步骤 101、按照预设划分层数将矩阵进行分层, 并将矩阵元素分组到不同 分层中。 在本发明各实施例中, 所述矩阵是指在编码端需要进行编码压缩, 然后 传输到解码端的矩阵, 例如, 可以是 QM、 缩放矩阵、 系数加权矩阵、 QM经 过变换后的变换域矩阵、 缩放矩阵经过变换后的变换域矩阵、 系数加权矩阵 经过变换后的变换域矩阵、 QM经过编码预测后的预测残差矩阵、缩放矩阵经 过编码预测后的预测残差矩阵或系统加权矩阵经过预测编码后的预测残差矩 阵中任意一种或其组合。 其中, 所述变换可以是 Z变换、 DCT变换、 DFT (傅 里叶变换)变换等。 所述编码预测是指将 QM、 缩放矩阵、 系数加权矩阵等进 行编码, 然后将编码后的矩阵和编码前的矩阵(即未编码的原始矩阵)进行 求残差。 其中, 编码预测所使用的编码方法不做限制, 例如 DPCM。
在本实施例中, 编码架构为分层编码, 即将矩阵所有元素分为若干层, 每层包括不同的矩阵元素。 其中, 对于不同尺寸的矩阵, 预先规定不同的划 分层数。 例如: 对于大小为 4x4的矩阵, 可以预先定义其划分为 4层, 划分 层数的取值范围为 0 ~ 3; 大小为 8x8的矩阵, 可以预先定义其划分为 5层, 划分层数取值范围为 0 ~ 4; 大小为 16x16的矩阵, 可以预先定义其划分为 6 层, 划分层数取值范围为 0 ~ 5; 大小为 32x32的矩阵, 可以预先定义其划分 为 7层, 划分层数取值范围为 0 ~ 6。 预先定义的划分层数具体数值不是固定 的, 可以根据矩阵大小进行调整和预先定义。 如果将层中包含的矩阵元素个 数增加, 则划分矩阵所用的层数可以减少。
在本实施例中, 编码端根据预先设定的划分层数, 将矩阵进行分层, 例 如, 例如将 4x4矩阵划分为 4层, 将 8x8矩阵划分为 5层等。 其中, 将矩阵 进行分层所使用的划分方法可以是任意一种方法, 在本实施例中不做限定。 下面以将 8x8矩阵划分为 5层和将 4x4矩阵划分为 4层为例, 举例说明所使 用的划分方法。
例如, 对于 8x8矩阵, 可以以 8x8矩阵的左上角和右下角为第 0层, 左 下角和右上角为第 1层, 取 8x8矩阵的中心和 4个边的中点为第 2层, 接着 划分出第 3层, 其余为第 4层。 该划分方法的划分结果如图 1B所示, 其中数 字 0、 1、 2、 3、 4分别表示第 0层、 第 1层、 第 2层、 第 3层和第 4层对应 的矩阵元素位置。 其中, 划分层数的取值范围为 0~4, 共划分为 5层。
例如, 对于 4x4矩阵, 可以以 4x4矩阵的左上角和右下角为第 0层, 左 下角和右上角为第 1层, 取 4x4矩阵的中心和 4个边的中点为第 2层, 其余 为第 3层。 该划分方法的划分结果如图 1C所示, 其中数字 0、 1、 2、 3分别 表示第 0层、 第 1层、 第 2层和第 3层对应的矩阵元素位置。 其中, 划分层 数的取值范围为 0~3 , 共划分为 4层。 法, 这样编码端可以不用再对划分层数和 /或划分方法进行编码并通过码流传 输到解码端, 有利于减轻编码端和解码端的编解码负担、 复杂度等, 并会降 低传输的码流。 例如, 如果编码端和解码端仅预先约定了划分层数, 则编码 端需要将划分方法进行编码并写入码流传输给解码端, 以使解码端进行正确 解码。 如果解码端和编码端仅预先约定了划分方法, 但没有约定划分层数, 则编码端需要将划分层数进行编码并写入码流传输到解码端, 以使解码端进 行正确解码。 如果编码端和解码端预先约定了划分层数和划分方法, 则编码 端不需要再对划分层数和划分方法进行编码, 且不需要写入码流中。
另外, 解码端和编码端也可以不预先约定所使用的划分层数和划分方法, 这样编码端同时对划分层数和划分方法进行编码并写入码流传输到解码端, 向解码端提供解码所需的信息, 这种方式有利于改变划分层数和划分方法, 具有一定的灵活性。
步骤 102、根据确定的待编码层数,按照层次顺序依次对待编码的每层中 的矩阵元素进行编码处理。
在将矩阵进行分层后, 编码端按照层次顺序开始对每层进行编码处理。 其中, 所述层次顺序是按照先编低层次的, 再编高层次的, 即从第 0层开始、 按照层数依次增大的顺序对各层进行编码。
在本实施例中, 对于不同尺寸的矩阵, 编码端可以确定对矩阵编码所使 用的编码层数, 即确定待编码层数, 并根据所确定的待编码层数进行编码处 理。 其中, 待编码层数的取值范围为大于或等于 0, 且小于预设的划分层数。 编码端基于所确定的待编码层数对各层进行编码处理的方式如下:
如果当前层的层数小于或等于所述确定的待编码层数, 则根据当前层对 应的原始矩阵元素值和当前层对应的矩阵元素预测值计算得到残差数据作为 当前层的编码数据写入码流。 相应地, 在解码端, 从码流中解码出该当前层 的编码数据, 并将当前层的编码数据与当前层对应的矩阵元素预测值进行相 加处理, 获取当前层对应的矩阵元素重建值。 其中, 解码端得到的当前层对 应的矩阵元素重建值与当前层对应的原始矩阵元素值相同, 这对该当前层来 说, 实现了无损编码。
如果当前层的层数大于所述确定的待编码层数, 则在码流中不写入当前 层的编码数据。 在解码端, 将会使用当前层之前已经解码的层对应的矩阵元 素重建值或者当前层中已重建的矩阵元素重建值进行插值计算得到当前层对 应的矩阵元素重建值, 这样当前层对应的矩阵元素重建值与当前层对应的原 始矩阵元素值之间可能存在残差, 属于有损编码。
其中, 在本实施例中, 当前层是指当前要进行编码的一层。 例如: 假设 确定的待编码层数为 2, 即将矩阵划分出的层中的第 0 ~ 2层矩阵元素进行编 码。 如果当前层为第 0层, 则其层数为 0, 当前层的层数小于待编码层数; 如 果当前层为第 2层, 则其层数为 2, 当前层的层数等于待编码层数; 如果当前 层为第 3层, 则其层数为 3 , 当前层的层数大于待编码层数。
其中, 当前层对应的矩阵元素预测值是由所述矩阵当前层之前已编码层 中和当前层中已编码矩阵元素的矩阵元素重建值或者矩阵元素预测值进行插 值计算得到的。 也就是说, 在本实施例中, 是通过插值的方式获取每层对应 的矩阵元素预测值的。 其中, 插值方式可以是根据当前待插值(或称为待编 码) 的矩阵元素之前已编码矩阵元素的矩阵元素重建值或矩阵元素预测值, 插值得到当前待插值的矩阵元素的矩阵元素预测值。 例如, 根据第 0层对应 的矩阵元素预测值或矩阵元素重建值插值出第 1 层对应的矩阵元素预测值, 根据第 0层和第 1层对应的矩阵元素预测值或矩阵元素重建值插值得到第 2 层的矩阵元素预测值。 又例如: 根据第 0层对应的矩阵元素值插值出其他各 层对应的矩阵元素预测值。 再例如: 根据第 0层对应的矩阵元素预测值插值 得到第 1层和第 2层对应的矩阵元素预测值, 然后根第 1层和 /或据第 2层对 应的矩阵元素预测值或矩阵元素重建值插值得到其他各层对应的矩阵元素预 测值。 还例如: 根据第 0层对应的矩阵元素值插值出第 1层中部分矩阵元素 预测值, 并根据第 0层和第 1层中已插值出的矩阵元素预测值插值得到第 1 层其他矩阵元素预测值。
其中, 对于层数小于或等于待编码层数的层来说, 其对应的矩阵元素重 建值等于所对应的原始矩阵元素值。 对于层数大于待编码层数的层来说, 其 对应的矩阵元素重建值可由层数较低的层对应的矩阵元素重建值插值得到。 其中, 最低层对应的矩阵元素预测值可以为最低层对应的原始矩阵元素 之, 或者为一个或一组预设默认值, 并作为初始值插值得到其他各层对应的 矩阵元素预测值。
其中, 由所述矩阵当前层之前已编码层中和当前层中已编码矩阵元素重 建值或者矩阵元素预测值插值得到当前层对应的矩阵元素预测值过程可以是 由当所述矩阵当前层之前已编码层中和当前层中已编码矩阵元素重建值或者 矩阵元素预测值进行均勾插值计算或者加权插值计算得到当前层对应的矩阵 元素预测值。 下面将以图 1B所示分层矩阵为例, 并以均匀插值计算为例, 举 例说明对矩阵进行分层编码处理的过程。
首先, 假设编码端确定的待编码层数为 2。
对第 0层进行编码处理。 由于第 0层是最低层, 故第 0层的矩阵元素预 层的 A (0,0)元素的预测值, 例如取 A (0,0)元素对应的矩阵元素预测值为 6, 将该预测值作为 A (0,0) 的编码数据写入码流。 对第 0层的 A (7,7)元 素不做预测, 即直接以该矩阵中的 A (7,7)元素的原始值进行编码并写入码 流。
对第 1层进行编码处理。 首先, 根据第 0层对应的矩阵元素预测值(以 矩阵元素预测值为例)得到第 1 层对应的矩阵元素预测值。 殳釆用均匀插 值计算方法,则第 1层的 A( 0,7)元素和 A( 7,0)元素均以(A(0,0)+A(7,7) +1 ) /2为预测值。 其中, "/" 表示整数除法。
由于第 1层的层数小于确定的待编码层数 (即 1<2), 故将第 1层各矩阵 层的编码数据写入码流。 对于第 1 层来说, 在解码端得到的其对应的矩阵元 素重建值与其对应的原始矩阵元素值相同, 故对 1层来说属于无损编码。
对第 2层进行编码处理。 例如, 假设根据第 2层之前已编码的第 0~1层 对应的矩阵元素预测值使用均勾插值计算方式得到第 2层的矩阵元素预测值。 其中, 对每层中矩阵元素进行插值的顺序可以是先进行纵向插值再进行横向 插值, 也可以是先进行横向插值再进行纵向插值。 其中, 横向插值是指以矩 阵元素的行角标为依据, 用行角标相同的其他已插值出的矩阵元素预测值, 按照一定的插值方法对该行中待插值的矩阵元素进行插值。 纵向插值是指以 矩阵元素的列角标为依据, 用列角标相同的其他已插值出的矩阵元素预测值, 按照一定的插值方法对该列中待插值的矩阵元素进行插值。 例如, 本实施例 中以先横向插值再纵向插值的顺序对第 2层进行插值计算, 得到 A ( 0,3 )元 素的预测值为 (A(0,0)+A(0,7)+1)/2, A(7,3)元素的预测值为 (A(7,0)+A(7,7)+l)/2, A(3,0)元素的预测值为(Α(0,0)+Α(7,0)+1)/2 , A(3,3)元素的预测值为 (A(0,3)+A(7,3)+l)/2, A(3,7)元素的预测值为 (A(0,7)+A(7,7)+l)/2。
由于第 2层的层数等于确定的待编码层数 (即 2=2 ) , 故将第 2层各矩阵 层的编码数据写入码流。 对于第 2层来说, 在解码端得到的其对应的矩阵元 素重建值与其对应的原始矩阵元素值相同, 故对 2层来说属于无损编码。
对第 3层进行编码处理。 例如, 假设根据第 3层之前已编码的第 0~2层 以及第 3 层中已经编码矩阵元素对应的矩阵元素预测值使用均勾插值计算方 法得到第 3 层的矩阵元素预测值。 其中, 具体插值顺序可以是先进行纵向插 值再进行横向插值, 或者是先进行横向插值再进行纵向插值。 本实施例假设 釆用先纵向插值再横向插值的顺序进行插值计算, 得到 A ( 0,1 )元素的预测 值为(Α(0,0)+Α(0,3)+1)/2 , A(0,5)元素的预测值为(Α(0,3)+Α(0,7)+1)/2 , A(3,l) 元素 的 预 测 值 为 (Α(3,0)+Α(3,3)+1)/2 , Α(1,0)元素 的 预 测 值 为 (Α(0,0)+Α(0,3)+1)/2 , A(l,3)元素的预测值为(Α(0,3)+Α(3,3)+1)/2 , A(l,l)元素 的预测值为 (A(0,l)+A(3,l)+l)/2, Α( 0,5 )元素的预测值为 (A(0,3)+A(0,7)+l)/2, A ( 3,5 ) 元素的预测值为(A(3,3)+A(3,7)+l)/2 , A ( 1,7 ) 元素的预测值为 (A(0,7)+A(3,7)+l)/2, A ( 1,5 )元素的预测值为 (A(0,5)+A(3,5)+l)/2 等, 在此 不再——列举。
由于第 3层的层数大于确定的待编码层数(即 3>2 ), 故在码流中不写入 第 3层的编码数据。 对于第 3层来说, 在解码端得到的其对应的矩阵元素重 建值与其对应的原始矩阵元素值可能不相同, 故对 3层来说属于有损编码。
对第 4层进行编码处理。 首先, 假设根据第 4层之前已编码的第 0~3层 得到第 4层的矩阵元素预测值。 在第 4层中, 同样可以先进行纵向插值再进 行横向插值, 或者先进行横向插值再进行纵向插值, 得到第 4层中各矩阵元 素的预测值。 由于第 4层的层数大于确定的待编码层数(即 4>2 ), 故在码流中不写入 第 4层的编码数据。 对于第 4层来说, 在解码端得到的其对应的矩阵元素重 建值与其对应的原始矩阵元素值可能不相同, 故对 4层来说属于有损编码。
其中, 在上述过程中, 编码端可以每获取一层的编码数据后就对该层的 编码数据进行编码, 并写入码流, 但不限于这种方式。 例如, 编码端还可以 在获取到所有层对应的编码数据后, 进行统一编码, 然后将编码结果写入码 流。
进一步, 本实施例并不限制对每层的编码数据进行编码时所使用的编码 方法。 但是, 在本实施例中, 对于层数较小的层来说, 其编码数据可能较大, 一般是以 0 为均值的正态分布, 故较为优选地是对其编码数据进行变长码编 码后写入码流。 而对于层数较的层来说, 其编码数据可能以 0居多, 故较为 优选地对其编码数据进行游程编码后写入码流。 其中, 在编码端设定一个层 数阔值, 编码层数的大小可以根据设定的层数阔值来区分。 例如, 设定层数 阔值为 4, 如果该层的层数小于或等于 4 , 则对该层的编码数据进行变长码编 码后写入码流; 如果该层的层数大于 4, 则对该层的编码数据进行游程编码后 写入码流。
进一步, 在上述举例中, 如果编码端需要将 8x8矩阵的划分层数和所使 用的划分方法进行编码并写入码流, 则具体是指将划分层数和每层所包含的 矩阵元素在矩阵中的位置进行编码并写入码流。
步骤 103、 将所述确定的待编码层数进行编码, 并写入码流。
其中, 待编码层数是由编码端确定的, 表明对于划分为预设层数的矩阵 元素, 只对其中层数小于或等于待编码层的矩阵元素进行编码, 并将编码结 果写入码流, 对其中层数大于待编码层的矩阵元素只预测, 用矩阵元素预测 值做重建值, 不需将编码结果写入码流。 故除了在码流中写入矩阵中各层的 编码数据之外, 还要对待编码层数进行编码并写入码流传输到解码端, 以使 解码端能够根据待编码层数进行相应地解码操作。
另外, 由上述编码方式可以看出, 如果当前层的层数小于或等于待编码 层数, 则本实施例可以实现对该层的无损编码; 如果当前层的层数大于待编 码层数, 则本实施例对该层的编码是有损的。 也就是说, 可以通过调整待编 码层数来实现对矩阵的有损或无损编码的控制。 要对其中某层进行编码时, 所要编码的数据(即该层的编码数据)仅为残差 数据, 其数据量相对较小, 更有甚者不需要对某层编码, 实现了对矩阵的编 码压缩, 与现有技术相比, 提高了对矩阵的压缩效率, 减少了传输矩阵时所 占用的码率。 其中, 在小序列编码过程中釆用本实施例的矩阵编码方法, 尤 其能够大幅提高压缩比。
进一步, 对于同一矩阵可以通过改变其划分层数来改变其压缩比, 例如 可以通过增大划分层数并减少待编码层数来提高压缩比, 具有一定的灵活性。
图 2为本发明一实施例提供的矩阵解码方法的流程图。 如图 2所示, 本 实施例的方法包括:
步骤 201、 从接收到的码流中解码出矩阵的编码层数。
本实施例的矩阵解码方法与图 1A所示矩阵编码方法相适应,是对使用分 层架构进行编码的码流进行解码, 并对编码端所编码的矩阵进行重建。 解码 端接收编码端传输的码流, 首先从码流中解码出矩阵的编码层数, 为后续进 行解码打下基础。 其中, 编码层数即为由编码端确定并在编码后写入码流中 的待编码层数, 用以表示码流中存在哪些层对应的编码数据。 或者说, 通过 解码出编码层数可以确定从码流中可以直接解码出哪些层。
步骤 202、根据所述编码层数和从接收到的码流中解码出的矩阵中层数小 于或等于编码层数的各层的编码数据, 按照层次顺序依次得到层数小于或等 于编码层数的各层的矩阵元素重建值。
在本实施例中, 解码端接收到的码流中包含有层数小于或等于所述编码 层数的各层的编码数据。解码端根据解码出的编码层数、矩阵的划分层数(即 将矩阵划分出的层数信息) 以及划分方法等信息, 从接收到的矩阵编码码流 中解码出层数小于或等于编码层数的各层的编码数据。 式时, 解码端也要釆用相应的方法对码流进行解码。 如果当前层的层数小于 或等于设定的层数阔值, 编码端使用变长码编码对编码数据进行编码; 相应 地, 解码端需要对当前层对应的码流进行变长码解码, 获取当前层的编码数 据。 如果当前层的层数大于层数阈值, 编码端使用游程编码对编码数据进行 编码; 相应地, 解码端需要对当前层对应的码流进行游程码解码, 获取当前 层的编码数据。
其中, 对矩阵进行划分的划分层数和 /或划分方法可以由编码端与解码端 预先约定。 例如, 当编码端与解码端仅预先约定所使用的划分层数时, 编码 端可以将所使用的划分方法进行编码并写入码流传输给解码端。 相应地, 解 码端在从码流中解码出矩阵中层数小于或等于所述编码层数的各层的编码数 据之前, 从码流中解码出所使用的划分方法, 并根据约定的划分层数和划分 方法从码流中解码出各层的编码数据。 又例如: 当编码端与解码端仅预先约 定所使用的划分方法时, 编码端可以将设定的划分层数进行编码并写入码流 传输给解码端。 相应地, 解码端在从码流中解码出矩阵中层数小于或等于所 述编码层数的各层的编码数据之前, 从码流中解码出划分层数, 并根据解码 出的划分层数和约定的划分方法从码流中解码出各层的编码数据。 再例如: 当编码端与解码端同时预先约定所使用的划分层数和划分方法时, 解码端可 以直接根据约定的划分层数和约定的划分方法从码流中解码出各层的编码数 据。
当编码端与解码端未预先约定划分层数和划分方法时, 编码端将划分层 数和划分方法同时进行编码后写入码流传输给解码端。 相应地, 解码端在从 码流中解码出矩阵中层数小于或等于所述编码层数的各层的编码数据之前, 从接收到的码流中解码出划分层数和划分方法。
其中, 层数小于或等于编码层数的各层的编码数据是编码端将层数小于 或等于待编码层数的各层对应的原始矩阵元素值与各自对应的矩阵元素预测 值计算得到残差数据。 并且每层对应的矩阵元素预测值是由当前层之前已编 码层中和当前层中已编码矩阵元素的矩阵元素重建值或者矩阵元素预测值进 行插值计算得到的。 故在获取层数小于或等于编码层数的各层的编码数据时, 解码端将层数小于或等于编码层数的各层的编码数据分别与层数小于或等于 编码层数的各层对应的矩阵元素预测值进行相加处理, 从而获取层数小于或 等于编码层数的各层对应的矩阵元素重建值。 由此可见, 在本步骤中解码出 的层数小于或等于编码层数的各层对应的矩阵元素重建值与各自对应的原始 矩阵元素值相同, 属于无损编码, 但其与直接传输原始矩阵元素值本身相比, 所传输的数据量要小的多。
其中, 对解码端来说, 也可以釆用与编码端相同的插值方式得到层数小 于或等于编码层数的各层对应的矩阵元素预测值, 即使用较低层中已经插值 得到的矩阵元素预测值, 插值得到高层中的矩阵元素预测值, 具体插值方法 可以是均勾插值计算方法, 也可以是加权插值计算方法。 例如, 可以根据第 0 层对应的矩阵元素预测值插值出第 1层对应的矩阵元素预测值, 根据第 0层 和第 1层对应的矩阵元素预测值插值得到第 2层的矩阵元素预测值。 又例如: 根据第 0层对应的矩阵元素值插值出其他各层对应的矩阵元素预测值。 再例 如: 根据第 0层对应的矩阵元素预测值插值得到第 1层和第 2层对应的矩阵 元素预测值, 然后根据第 1层和 /或第 2层对应的矩阵元素预测值插值得到其 他各层对应的矩阵元素预测值。
其中, 在进行插值计算时, 解码端根据预先获知的插值顺序进行插值操 作, 该插值顺序可以是先横向插值再纵向插值, 或者先纵向插值再横向插值。
在上述方式中, 最低层对应的矩阵元素预测值可以为最低层对应的原始 矩阵元素值, 或者为一个或一组预设默认值, 并作为初始值插值得到其他各 层对应的矩阵元素预测值。 并且, 对于解码端来说, 最低层对应的矩阵元素 预测值是已知的。
在此说明, 解码端获取层数小于或等于所述编码层数的各层对应的矩阵 元素重建值的过程可以是每解码出一层的编码数据, 就获取该层对应的矩阵 元素重建值。 另外, 解码端获取层数小于或等于所述编码层数的各层对应的 矩阵元素重建值的过程还可以是在全部解码出层数小于或等于所述编码层数 的各层的编码数据后, 在一起获取层数小于或等于所述编码层数的各层对应 的矩阵元素重建值。
步骤 203、由层数小于或等于所述编码层数的层的矩阵元素重建值计算得 到层数大于所述编码层数的各层对应的矩阵元素重建值。
在获取层数小于或等于编码层数的各层对应的矩阵元素重建值后, 解码 端由层数小于或等于待编码层数的层对应的矩阵元素重建值进行插值计算, 获取层数大于所述编码层数的各层对应的矩阵元素重建值。
其中, 插值方法与编码端相适应, 例如可以是均勾插值计算或者加权插 值计算。 而且具体的插值方式也与解码端相适应, 例如可以使用层数小于或 等于编码层数的各层中某一层对应的矩阵元素重建值进行插值计算得到层数 大于所述编码层数的各层对应的矩阵元素重建值; 也可以使用其中几层对应 的矩阵元素重建值进行插值计算得到层数大于所述编码层数的各层对应的矩 阵元素重建值。 并且所使用的插值顺序也与编码端相适应, 例如可以是先横 向插值再纵向插值, 还可以是先纵向插值再横向插值。
其中, 在该步骤中, 解码端获取的层数大于所述编码层数的各层对应的 矩阵元素重建值, 与编码端获取的层数大于所述编码层数的各层对应的矩阵 元素预测值相同, 可能与原始矩阵元素值有一定误差, 故属于有损编码。
另外, 如果没有层数大于编码层数的层, 则该步骤的操作可以不执行, 也就是说, 编码端对该矩阵进行了无损编码。
当由矩阵划分出的各层对应的矩阵元素重建值都获取到后, 就实现了对 该矩阵的重建。
在本实施例中, 重建出的矩阵可以是 QM、 缩放矩阵、 系数加权矩阵、 QM经过变换后的变换域矩阵、缩放矩阵经过变换后的变换域矩阵、 系数加权 矩阵经过变换后的变换域矩阵、 QM经过编码预测后的预测残差矩阵、缩放矩 阵经过编码预测后的预测残差矩阵或系统加权矩阵经过预测编码后的预测残 差矩阵中任意一种或其组合。其中, 所述变换可以是 Z变换、 DCT变换、 DFT 变换等。 所述编码预测是指将 QM、 缩放矩阵、 系数加权矩阵等进行编码, 然 后将编码后的矩阵和编码前的矩阵(即未编码的原始矩阵)进行求残差。 其 中, 编码预测所使用的编码方法不做限制, 例如 DPCM。
本实施例的矩阵解码方法, 与上述实施例提供的矩阵编码方法相适应, 编码端使用分层架构进行编码, 实现了对矩阵的大幅压缩, 提高了压缩比, 降低了传输矩阵所占用的码率, 在解码端, 相适应的进行分层解码实现矩阵 的重建。
图 3为本发明一实施例提供的矩阵编码方法的流程图。 如图 3所示, 本 实施例的方法包括:
步骤 301、根据矩阵集合中矩阵的大小, 按照编码顺序依次对矩阵集合中 的矩阵进行编码预测, 获取所述矩阵的重建矩阵, 并对所述矩阵的重建矩阵 进行相应的釆样处理得到釆样矩阵。
在本实施例中, 矩阵集合中包括多个大小不同的矩阵, 例如同时包括大 小为 4x4的矩阵、 8x8的矩阵、 16x16的矩阵、 32x32的矩阵等。 对于矩阵集 合中的矩阵可以是 QM、 缩放矩阵、 系数加权矩阵、 QM经过变换后的变换域 矩阵、 缩放矩阵经过变换后的变换域矩阵、 系数加权矩阵经过变换后的变换 域矩阵、 QM经过编码预测后的预测残差矩阵、缩放矩阵经过编码预测后的预 测残差矩阵或系统加权矩阵经过预测编码后的预测残差矩阵。
在本实施例中, 按照矩阵大小对矩阵集合中的各矩阵进行编码排序, 可 以是从小到大的顺序, 也可以是从大到小的顺序。 并按照编码顺序对各矩阵 进行编码预测, 获取各矩阵的重建矩阵, 并对各矩阵的重建矩阵进行釆样处 理得到釆样矩阵。 其中, 釆样处理的所使用的釆样方法与编码顺序有关系, 如果是按照从小到大的顺序, 则釆样处理是指上釆样, 得到的釆样矩阵是比 当前矩阵尺寸大的矩阵; 如果是按照从大到小的顺序, 则釆样处理是指下釆 样, 得到的釆样矩阵是比当前矩阵尺寸小的矩阵。 例如: 对 16 x16矩阵的重 建矩阵进行上釆样得到 32 x32的釆样矩阵; 对 16 xl6矩阵的重建矩阵进行下 釆样得到 8 x8的釆样矩阵。
在本实施例中, 不限制对矩阵进行编码预测所使用的方式。
步骤 302、 由当前矩阵的重建矩阵和当前矩阵得到第一误差, 由按照编码 顺序在当前矩阵之前已编码矩阵的重建矩阵进行釆样处理得到的釆样矩阵和 当前矩阵得到第二误差。
在获取当前矩阵的重建矩阵和由根据编码顺序在当前矩阵之前的已编码 矩阵的重建矩阵进行釆样处理得到的釆样矩阵后, 将当前矩阵的重建矩阵与 当前矩阵本身进行比较, 得到第一误差, 并将釆样矩阵与当前矩阵本身进行 比较, 得到第二误差。
其中, 两个矩阵进行比较获取误差的过程主要是指将两个矩阵对应位置 的元素值进行比较, 获取所有位置上元素值的差值, 再对所有位置上元素值 的差值进行平均, 获取两个矩阵之间的误差。
步骤 303、将第一误差和第二误差进行比较, 判断第一误差是否小于或等 于第二误差, 如果判断结果为是, 执行步骤 304; 如果判断结果为否, 执行步 骤 305。 本步骤主要是找出与当前矩阵本身的误差较小的一个矩阵。
以按照由小到大的顺序,依次对 4x4矩阵、 8x8矩阵、 16x16矩阵和 32x32 矩阵进行编码为例, 当对 8x8矩阵进行编码时, 该 8x8矩阵即为当前矩阵, 而 4x4矩阵是 8x8矩阵的之前的一个已编码矩阵, 8x8矩阵对应的釆样矩阵可 由 4x4矩阵的重建矩阵进行上釆样得到的。例如: 4艮设 4x4矩阵的重建矩阵 A 为 [0,1,2,3,4,5,6,7] , 则经上釆样得到的 8x8 的釆样矩阵 B 为 [0,0,2,2,4,4,5 , 5,6,6,7,7]。 在此以一维实例进行说明, 但实际上重建矩阵和釆样矩阵均为 2 维。
步骤 304、将当前矩阵的重建矩阵作为当前矩阵对应的编码重建矩阵, 并 将当前矩阵对应的编码结果写入码流。
如果第一误差小于或等于第二误差, 说明当前矩阵的重建矩阵与当前矩 阵相比误差更小, 故将当前矩阵的重建矩阵作为其编码重建矩阵, 并对当前 矩阵对应的编码数据进行编码, 然后写入码流。
步骤 305、将由按照编码顺序在当前矩阵之前已编码矩阵的重建矩阵进行 釆样处理得到的釆样矩阵作为当前矩阵对应的编码重建矩阵, 并将当前矩阵 对应的编码结果写入码流。
如果第一误差大于第二误差, 说明由按照编码顺序在当前矩阵之前已编 码矩阵的重建矩阵经过釆样处理得到的釆样矩阵与当前矩阵的误差更小, 故 将由按照编码顺序在当前矩阵之前已编码矩阵的重建矩阵经过釆样处理得到 的釆样矩阵作为其编码重建矩阵, 并对当前矩阵对应的编码数据进行编码, 然后写入码流。
其中, 当前矩阵是指按照编码顺序编码到的某个矩阵, 当对矩阵集合中 所有矩阵都编码结束后, 就对整个矩阵集合编码结束。
在对各个矩阵进行编码时, 可以在获取到各个矩阵的编码重建矩阵后, 接着对其对应的编码数据进行编码并写入码流。 另外, 还可以先编码得到每 个矩阵的编码重建矩阵, 然后在一起对每个矩阵的编码数据进行编码并写入 码流。
在本实施例中, 通过对矩阵集合中每个待编码矩阵进行编码预测, 获取 重建矩阵并和之前已编码矩阵的重建矩阵进行釆样处理得到的釆样矩阵进行 比较, 获取误差相对小的矩阵作为当前矩阵的编码重建矩阵并对当前矩阵的 编码数据进行编码, 一方面可以提高编码压缩率, 另一方面还可以保证编码 精确度。
一种步骤 301 的具体实施方式包括: 按照矩阵由小到大的顺序对矩阵集 合中的各矩阵进行编码处理。 当编码到某个矩阵时, 该矩阵即为当前矩阵。 对矩阵集合中每个矩阵的编码处理包括: 对矩阵集合中的矩阵进行编码预测, 获取矩阵的重建矩阵, 并对矩阵的重建矩阵进行上釆样得到釆样矩阵, 其中, 最小矩阵的编码重建矩阵为最小矩阵的重建矩阵。 例如, 对同时包括 4x4矩 阵、 8x8矩阵、 16x16矩阵和 32x32矩阵的矩阵组进行编码, 是指按照由小到 大的顺序, 依次对 4x4矩阵、 8x8矩阵、 16x16矩阵和 32x32矩阵进行编码。 其中, 最小矩阵为 4x4 矩阵, 由于最小矩阵没有对应的釆样矩阵, 故直接将 其重建矩阵作为其编码重建矩阵。 对于 8x8矩阵对应的釆样矩阵为 4x4矩阵 的重建矩阵上釆样得到, 其大小为 8x8。 对于 16x16矩阵对应的釆样矩阵为 8x8矩阵的重建矩阵上釆样得到, 其大小为 16x16。 对于 32x32矩阵对应的釆 样矩阵为 16x16矩阵的重建矩阵上釆样得到, 其大小为 32x32。
另一种步骤 301 的具体实施方式包括: 按照矩阵由大到小的顺序对矩阵 集合中的各矩阵进行编码处理。 当编码到某个矩阵时, 该矩阵即为当前矩阵。 对矩阵集合中每个矩阵的编码处理包括: 对矩阵集合中的矩阵进行编码预测, 获取矩阵的重建矩阵, 并对矩阵的重建矩阵进行下釆样得到釆样矩阵。 其中 最大矩阵的编码重建矩阵为最大矩阵的重建矩阵。 例如, 对同时包括 4x4矩 阵、 8x8矩阵、 16x16矩阵和 32x32矩阵的矩阵组进行编码, 是指按照由大到 小的顺序, 依次对 32x32矩阵、 16x16矩阵、 8x8矩阵和 4x4矩阵进行编码。 其中, 最大矩阵为 32x32矩阵, 由于最大矩阵没有对应的釆样矩阵, 故直接 将其重建矩阵作为其编码重建矩阵。对于 16x16矩阵对应的釆样矩阵为 32x32 矩阵的重建矩阵下釆样得到, 其大小为 16x16。对于 8x8矩阵对应的釆样矩阵 为 16x16矩阵的重建矩阵下釆样得到, 其大小为 8x8。对于 4x4矩阵对应的釆 样矩阵为 8x8矩阵的重建矩阵下釆样得到, 其大小为 4x4。 以 8x8重建矩阵下 釆样到 4x4 釆样矩阵为例说明下釆样过程, 假设 8x8 重建矩阵 A 为 [0,1,2,3,4,5,6,7] , 下釆样得到 4x4釆样矩阵 B为 [0, 2, 4, 6]。在此以一维为例进 行说明, 但实际上重建矩阵和釆样矩阵均为 2维。
进一步, 本实施例提供一种对矩阵进行编码预测, 获取重建矩阵的实施 方式, 包括: 按照预设划分层数将矩阵进行分层, 并将矩阵中的矩阵元素分 组到不同分层中。 然后, 根据确定的待编码层数, 按照层次顺序依次对待编 码的每层中的矩阵元素进行编码处理, 形成重建矩阵。
其中, 形成重建矩阵的过程也就是获取每层对应的矩阵元素重建值的过 程, 具体包括: 如果当前层的层数小于或等于所述待编码层数, 则根据当前 层对应的原始矩阵元素值作为当前层对应的矩阵元素重建值。 如果当前层的 层数大于所述待编码层数, 将当前层对应的矩阵元素预测值作为当前层对应 的矩阵元素重建值。
其中, 当前层对应的矩阵元素预测值是由该矩阵当前层之前已编码层中 和当前层中已编码矩阵元素的重建值或者预测值进行插值计算得到的。
上述形成重建矩阵的实施方式使用分层架构实现重建, 具体实现方式可 参见图 1A所示矩阵编码方法的描述。 其区别在于, 在该实施方式中是得到每 层对应的矩阵元素重建值, 而不是直接进行编码处理。
基于上述, 当获取到当前编码到的矩阵 (即当前) 的重建矩阵后, 继续 判断该重建矩阵是否就是当前矩阵的编码重建矩阵, 即通过将重建矩阵与当 前矩阵的误差, 与当前矩阵之前已编码矩阵的重建矩阵釆样得到的釆样矩阵 与当前矩阵的误差进行比较。
如果确定当前矩阵的重建矩阵为其对应的编码重建矩阵, 即第一误差小 于或等于第二误差时, 则将当前矩阵对应的编码结果写入码流的过程包括: 在码流中写入标识当前矩阵是否使用釆样矩阵的标识比特, 且所述标识比特 标识当前矩阵不使用釆样矩阵, 并将当前矩阵中层数小于或等于待编码层数 的各层对应的矩阵元素重建值与层数小于或等于待编码层数的各层对应的矩 阵元素预测值计算得到的残差数据作为层数小于或等于各层的 0编码数据写 入码流, 且不在码流中写入当前矩阵中层数大于待编码层数的各层的编码数 据, 同时将待编码层数写入码流。 通过对残差数据进行编码并写入码流或者 不在码流中写入编码数据的方式, 极大地提高了对矩阵的压缩比, 可以降低 传输矩阵时所占用的码率。
进一步, 在上述过程中, 对于层数较小的层的编码数据可能较大, 一般 是以 0 为均值的正态分布, 故可以对层数较小的层的编码数据进行变长码编 码, 然后写入码流; 而对于层数较大的层的编码数据可能以 0居多, 故对层 数较大的层的编码数据进行游程编码, 并写入码流。 本实施例预先设定了层 数阔值, 用于判断层数小于或等于待编码层数的各层是否属于层数较小的层。 如果层数小于或等于待编码层数的各层中的某层小于或等于设定的层数阔 值, 则该层属于层数较小的层, 则对该层的编码数据进行变长码编码后写入 码流; 如果层数小于或等于待编码层数的各层中的某层大于设定的层数阔值, 则该层属于层数较大的层, 则对该层的编码数据进行游程编码后写入码流。 更进一步, 在上述将当前矩阵对应的编码结果写入码流的过程中, 可以 首先判断该矩阵是否为对称模式, 如果是, 则确定只传输半个矩阵对应的编 码结果, 并在码流中写入标识当前矩阵是否为对称矩阵的标识比特, 且该标 识比特标识当前矩阵是对称矩阵。 此时, 在对各层进行编码时可以只对其中 一半矩阵元素进行编码, 进一步提高了对矩阵的压缩比, 减少了所传输的码 流量, 降低了传输矩阵所占用的码率。
如果确定由按照编码顺序在当前矩阵之前已编码矩阵的重建矩阵釆样得 到的釆样矩阵为当前矩阵对应的编码重建矩阵, 则将当前矩阵对应的编码结 果写入码流的过程包括: 在码流中写入标识当前矩阵是否使用釆样矩阵的标 识比特, 且所述标识比特标识当前矩阵使用釆样矩阵, 且不在码流中写入当 前矩阵对应的编码数据。 通常该标识比特仅为 1 比特, 数据量较小, 提高了 对矩阵的压缩比, 也可以降低传输矩阵所占用的码率。
进一步, 考虑到 HEVC块尺寸为 4x4, 8x8 , 16x16、 32x32, 帧内 /帧间, 亮度 /色度 U/色度 V分量时, 每帧数据对应的 QM为 24个, 组成一个量化矩 阵集合(QM Set )。 当块尺寸更多时, 量化矩阵集合中的 QM数量可能更多。 以帧内、 帧间、 亮度、 色度 U、 色度 V分别进行组合, 可以得到 6个均包括 4x4 , 8x8 , 16x16、 32x32的小矩阵集合, 即该量化矩阵集合中包括 6个小矩 阵集合, 每个小矩阵集合包括 4种大小的矩阵。
其中, 对每个小矩阵集合的编码处理均釆样上述实施例提供的编码方法。 对于不同矩阵集合之间来说, 首先根据各矩阵的大小进行编码处理, 对于大 小相同的矩阵, 按照先帧内后帧间的顺序进行编码处理, 对于同一帧内或帧 间的矩阵按照先亮度后色度的顺序进行编码处理。 也就是说, 依次根据矩阵 大小、 先帧内后帧间、 先亮度后色度的顺序对量化矩阵集合中的多个矩阵进 行处理。
例如, 当按照由大到小的顺序进行编码处理时, 先对帧内 32x32 的亮度 矩阵进行编码处理。 具体的, 通过对帧内 32x32 的亮度矩阵进行编码预测, 得到帧内 32x32的亮度矩阵的重建矩阵, 将该重建矩阵作为帧内 32x32的亮 度矩阵的编码重建矩阵, 并对帧内 32x32 的亮度矩阵的重建矩阵进行下釆样 得到帧内 16x16的亮度釆样矩阵。 然后, 对帧内 32x32的色度 U矩阵进行编 码处理。 具体的, 通过对帧内 32x32的色度 U矩阵进行编码预测, 得到帧内 32x32的色度 U矩阵的重建矩阵, 将该重建矩阵作为帧内 32x32的色度 U矩 阵的编码重建矩阵, 并对帧内 32x32的色度 U矩阵的重建矩阵进行下釆样得 到帧内 16x16的色度 U釆样矩阵。 同理, 对帧内 32x32的色度 V矩阵进行编 码处理。 然后, 依次对帧间 32x32的亮度矩阵、 32x32的色度 U矩阵、 32x32 的色度 V矩阵进行编码处理。
接下来, 对帧内 16 xl6的亮度矩阵进行编码处理。 具体的, 通过对帧内 16 xl6的亮度矩阵进行编码预测, 得到帧内 16 xl6的亮度矩阵的重建矩阵, 将该重建矩阵与由帧内 32x32 的亮度矩阵的重建矩阵进行下釆样得到的帧内 16x16的亮度釆样矩阵, 分别与帧内 16 xl6的亮度矩阵进行比较, 获取两个 误差,并将这两个误差进行比较,取其中误差较小的一个矩阵作为帧内 16 x16 的亮度矩阵的编码重建矩阵, 并对帧内 16 xl6的亮度矩阵的重建矩阵进行下 釆样得到帧内 8x8的亮度釆样矩阵。然后,依次对帧内 16 x16的色度 U矩阵、 帧内 16 xl6的色度 V矩阵、 帧间 16 xl6的亮度矩阵、 帧间 16 xl6的色度 U 矩阵、 帧间 16 xl6的色度 V矩阵进行编码处理。
按照上述方式依次对量化矩阵中的每个矩阵进行编码, 直到将所有矩阵 都编码结束为止。
对于按照由小到大的顺序进行编码处理时, 先对帧内 4x4 的亮度矩阵进 行编码处理。 然后依次对帧内 4x4的色度 U矩阵、 帧内 4x4的色度 V矩阵、 帧间 4x4的亮度矩阵、 帧间 4x4的色度 U矩阵、 帧间 4x4的色度 V矩阵进行 编码处理。
接着, 依次对帧内 8x8的亮度矩阵、 帧内 8x8的色度 U矩阵、 帧内 8x8 的色度 V矩阵、 帧间 8x8的亮度矩阵、 帧间 8x8的色度 U矩阵、 帧间 8x8的 色度 V矩阵进行编码处理。 其中, 帧内 8x8的亮度矩阵对应的釆样矩阵是由 帧内 4x4的亮度矩阵的重建矩阵进行上釆样得到; 帧内 8x8的色度 U矩阵对 应的釆样矩阵是由帧内 4x4的色度 U矩阵的重建矩阵进行上釆样得到; 帧内 8x8的色度 V矩阵对应的釆样矩阵是由帧内 4x4的色度 V矩阵的重建矩阵进 行上釆样得到; 帧间 8x8的亮度矩阵对应的釆样矩阵是由帧间 4x4的亮度矩 阵的重建矩阵进行上釆样得到; 帧间 8x8的色度 U矩阵对应的釆样矩阵是由 帧间 4x4的色度 U矩阵的重建矩阵进行上釆样得到; 帧间 8x8的色度 V矩阵 对应的釆样矩阵是由帧间 4x4的色度 V矩阵的重建矩阵进行上釆样得到。 接着, 依次对帧内 16x16的亮度矩阵、 帧内 16x16的色度 U矩阵、 帧内 16x16的色度 V矩阵、 帧间 16x16的亮度矩阵、 帧间 16x16的色度 U矩阵、 帧间 16x16的色度 V矩阵进行编码处理。
最后, 依次对帧内 32x32的亮度矩阵、 帧内 32x32的色度 U矩阵、 帧内 32x32的色度 V矩阵、 帧间 32x32的亮度矩阵、 帧间 32x32的色度 U矩阵、 帧间 32x32的色度 V矩阵进行编码处理。
图 4为本发明一实施例提供的矩阵解码方法的流程图。 如图 4所示, 本 实施例的方法包括:
步骤 401、 确定矩阵集合对应的解码顺序和相应的釆样方法。
其中, 对于包括多个矩阵的矩阵集合进行解码时, 解码端要先确定按照 什么样的顺序对矩阵集合中的多个矩阵进行解码, 例如按照矩阵由小到大的 顺序, 或按照矩阵由大到小的顺序。 并且, 解码端还需要确定与解码顺序相 适应的釆样方法, 例如, 如果按照矩阵由小到大的顺序进行解码, 则釆样方 法为上釆样; 如果按照矩阵由大到小的顺序进行解码, 则釆样方法为下釆样。
对于解码端来说, 可以预先与编码端约定对矩阵集合进行编解码时的编 解码顺序和相应的釆样方法。
另外, 如果编码端使用标识比特标识所使用的编码顺序和相应的釆样方 法, 并将标识比特写入码流发送解码端, 则解码端可以从码流中解码出标识 解码顺序和相应的釆样方法的标识比特, 从而确定应该使用的解码顺序和相 应的釆样方法。 例如: 当解码到标识比特为 1 时, 表示按照矩阵由小到大的 顺序进行解码, 并使用上釆样方法; 当解码到标识比特为 0 时, 表示按照矩 阵由大到小的顺序进行解码, 并使用下釆样方法。
步骤 402、 从码流中解码出标识当前矩阵是否使用釆样矩阵的标识比特。 步骤 403、判断所述标识比特是否标识当前矩阵使用釆样矩阵; 如果判断 结果为是, 执行步骤 404; 如果判断结果为否, 执行步骤 405。
其中, 解码端可以根据解码出的标识比特的取值来判断当前矩阵是否使 用釆样矩阵。 例如: 如果标识比特为 1 , 则标识当前矩阵使用釆样矩阵作为其 解码重建矩阵; 如果标识比特为 0 , 则标识当前矩阵不使用釆样矩阵作为其解 码重建矩阵。 步骤 404、将由按照解码顺序在当前矩阵之前已解码矩阵的解码重建矩阵 进行釆样处理得到的釆样矩阵, 作为当前矩阵的解码重建矩阵, 并执行步骤 406。
当当前矩阵使用釆样矩阵时, 解码端对按照解码顺序在当前矩阵之前已 解码矩阵的解码重建矩阵进行釆样处理, 得到釆样矩阵, 然后将得到的釆样 矩阵作为当前矩阵的解码重建矩阵。 例如: 当按照矩阵由小到大的顺序解码 时, 解码端可以对已解码的 4x4矩阵的解码重建矩阵进行上釆样得到釆样矩 阵, 并将得到的釆样矩阵作为 8x8矩阵的解码重建矩阵, 但并不限于使用在 当前矩阵之前已解码且与当前矩阵相邻的矩阵。
步骤 405、 直接从码流中解码出当前矩阵的解码重建矩阵, 并执行步骤
406。
当当前矩阵不使用釆样矩阵时, 解码端根据解码顺序, 从码流中解码当 前矩阵的编码数据, 并根据解码出的编码数据获取当前矩阵的解码重建矩阵。
其中, 当编码端使用分层架构对当前矩阵进行编码时, 解码端从码流中 解码出当前矩阵的解码重建矩阵的过程为: 解码端从码流中解码出当前矩阵 的编码层数, 并从当前矩阵对应的码流数据中解码出当前矩阵中层数小于或 等于编码层数的各层的编码数据, 然后根据解码出的编码层数和层数小于或 等于编码层数的各层的编码数据, 按照层次顺序 (先解低层次再解高层次) 依次得到当前矩阵中层数小于或等于编码层数的各层对应的矩阵元素重建 值; 接着, 解码端由当前矩阵中层数小于或等于编码层数的层对应的矩阵元 素重建值进行插值计算得到当前矩阵中层数大于编码层数的各层对应的矩阵 元素重建值。 其中, 所使用的插值方法及插值顺序等均与编码端相适应。 例 如: 插值方法可以是均勾插值方法或加权插值方法; 插值顺序可以是先横向 再纵向, 也可以是先纵向再横向。
当得到当前矩阵中各层对应的矩阵元素重建值后, 就得到了当前矩阵的 解码重建矩阵。
在上述过程中, 解码端从码流中解码出的当前矩阵中层数小于或等于编 码层数的各层的编码数据的过程包括: 对于层数小于或等于编码层数的各层, 如果层数小于或等于设定的层数阔值, 则对层数小于或等于编码层数的各层 对应的码流进行变长码解码, 获取层数小于或等于编码层数的各层的编码数 据; 如果层数大于层数阔值, 则对层数小于或等于编码层数的各层对应的码 流进行游程码解码, 获取层数小于或等于编码层数的各层的编码数据。 该解 码过程与编码端相适应。
步骤 406、 按照解码顺序, 继续对码流进行解码处理, 并转去执行步骤 402, 从而从码流中依次解码出矩阵集合中所有矩阵的解码重建矩阵。
本实施例的矩阵解码方法, 与图 3 所示矩阵编码方法相适应, 首先确定 解码顺序和相应的釆样方法, 并根据从码流中解码出的标识比特, 确定获取 矩阵集合中每个矩阵的解码重建矩阵的方式, 其中, 当标识比特标识当前矩 阵使用釆样矩阵时, 在码流中不存在该当前矩阵的编码数据, 提高了编码端 对矩阵的压缩比, 降低了传输矩阵所占用的码率。
图 5A为本发明一实施例提供的矩阵编码装置的结构示意图。 如图 5A所 示, 本实施例的装置包括: 分层模块 51、 编码处理模块 52和第一编码写入模 块 53。
其中, 分层模块 51 , 用于按照预设划分层数将矩阵进行分层, 并将矩 阵元素分组到不同的分层中。
编码处理模块 52, 与分层模块 51连接, 用于根据确定的待编码层数, 按 照层次顺序依次对待编码的每层中的矩阵元素进行编码处理。 其中, 编码到 的层被称为当前层, 如果当前层的层数小于或等于待编码层数, 则编码处理 模块 52根据当前层对应的原始矩阵元素值和当前层对应的矩阵元素预测值计 算得到残差数据作为当前层的编码数据写入码流; 如果当前层的层数大于待 编码层数, 编码处理模块 52在码流中不写入当前层的编码数据。 其中, 当前 层对应的矩阵元素预测值是由所述矩阵当前层之前已编码层中和当前层中已 编码矩阵元素的矩阵元素重建值或者矩阵元素预测值进行插值计算得到的。
第一编码写入模块 53 , 用于将待编码层数进行编码, 并写入码流。
本实施例的矩阵编码装置的各功能模块可用于执行图 1A 所示矩阵编码 方法的流程, 其具体工作原理不再赘述, 详见方法实施例的描述。
在本实施例中, 由矩阵编码装置编码的矩阵可以是 QM、 缩放矩阵、 系数 加权矩阵、 QM经过变换后的变换域矩阵、缩放矩阵经过变换后的变换域矩阵、 系数加权矩阵经过变换后的变换域矩阵、 QM经过编码预测后的预测残差数据 矩阵、 缩放矩阵经过编码预测后的预测残差矩阵或系统加权矩阵经过预测编 码后的预测残差矩阵中任意一种或其组合。 其中, 所述变换可以是 Z变换、 DCT变换、 DFT变换等。 所述编码预测是指将 QM、 缩放矩阵、 系数加权矩 阵等进行编码, 然后将编码后的矩阵和编码前的矩阵(即未编码的原始矩阵) 进行求残差。 其中, 编码预测所使用的编码方法不做限制, 例如 DPCM。
本实施例的矩阵编码装置, 通过将待编码的矩阵进行分层, 并根据确定 的待编码层数对各层要么获取残差数据作为编码数据写入码流, 要么不在码 流中写入编码数据, 实现对矩阵的分层编码并传输, 提高了对矩阵的压缩比, 减少了传输矩阵所占用的码率。
图 5B为本发明另一实施例提供的矩阵编码装置的结构示意图。本实施例 基于图 5A所示实施例实现,如图 5B所示,本实施例的矩阵编码装置还包括: 第二编码写入模块 54。
第二编码写入模块 54, 用于对预设划分层数和将矩阵进行分层的划分方 法进行编码, 并写入码流。 或者, 第二编码写入模块 54 , 用于对将矩阵进行 分层的划分方法进行编码并写入码流。 其中, 所述划分方法为将矩阵的矩阵 元素分组到不同分层中的分组方法。
在本实施例中, 编码处理模块 52具体用于根据确定的待编码层数, 按照 先编码低层后编码高层的方式对矩阵元素进行分层编码。
编码处理模块 52具体用于由所述矩阵当前层之前已编码层中和当前层中 已编码矩阵元素的矩阵元素重建值或者矩阵元素预测值进行均勾插值计算或 者加权插值计算得到当前层对应的矩阵元素预测值。
另外, 编码处理模块 52还具体用于按照先横向再纵向的插值顺序, 或者 按照先纵向再横向的插值顺序, 由所述矩阵当前层之前已编码层中和当前层 中已编码矩阵元素的矩阵元素重建值或者矩阵元素预测值进行插值计算得到 当前层对应的矩阵元素预测值。
进一步, 编码处理模块 52具体用于在当前层的层数小于或等于设定的层 数阔值时, 对当前层的编码数据进行变长码编码后写入码流, 在当前层的层 数大于层数阔值时, 对当前层的编码数据进行游程编码后写入码流。
上述编码处理模块 52的具体工作流程可参见图 1A所示方法实施例中的 相应描述, 在此不再赘述。
本实施例的矩阵编码装置, 通过第二编码写入模块将划分层数和 /或划分 方法写入码流, 向解码端提供解码所需的信息, 提高了划分矩阵时的灵活性。 图 6A为本发明一实施例提供的矩阵解码装置的结构示意图。 如图 6A所 示, 本实施例的装置包括: 层数解码模块 61、 第一重建模块 62和第二重建模 块 63。
其中, 层数解码模块 61 , 用于从码流中解码出矩阵的编码层数。 其中, 编码层数即为编码端确定并写入码流的待编码层数。
第一重建模块 62, 与层数解码模块 61连接, 用于根据编码层数和从码流 中解码出的矩阵中层数小于或等于编码层数的各层的编码数据, 按照层次顺 序依次得到层数小于或等于编码层数的各层对应的矩阵元素重建值。
第二重建模块 63 , 与第一重建模块 62连接, 用于由层数小于或等于编码 层数的层对应的矩阵元素重建值计算得到层数大于编码层数的各层对应的矩 阵元素重建值。
本实施例的矩阵解码装置的各功能模块可用于执行图 2 所示矩阵解码方 法的流程, 其具体工作原理不再赘述, 详见方法实施例的描述。
在本实施例中, 由矩阵解码装置解码出的矩阵可以是 QM、 缩放矩阵、 系 数加权矩阵、 QM经过变换后的变换域矩阵、缩放矩阵经过变换后的变换域矩 阵、 系数加权矩阵经过变换后的变换域矩阵、 QM经过编码预测后的预测残差 矩阵、 缩放矩阵经过编码预测后的预测残差矩阵或系统加权矩阵经过预测编 码后的预测残差矩阵中任意一种或其组合。 其中, 所述变换可以是 Z变换、 DCT变换、 DFT变换等。 所述编码预测是指将 QM、 缩放矩阵、 系数加权矩 阵等进行编码, 然后将编码后的矩阵和编码前的矩阵(即未编码的原始矩阵) 进行求残差。 其中, 编码预测所使用的编码方法不做限制, 例如 DPCM。
本实施例的矩阵解码装置, 与图 5A所示的矩阵编码装置相配合, 从码流 中获取编码层数后, 根据编码层数和从码流中解码出的层数小于或等于编码 层数的各层的编码数据依次解码出各层对应的矩阵元素重建值, 实现对矩阵 的重建, 允许矩阵编码装置使用分层架构对矩阵进行编码, 提高了对矩阵的 压缩比, 减少了传输矩阵所占用的码率。
图 6B为本发明另一实施例提供的矩阵解码装置的结构示意图。本实施例 基于图 6A所示实施例实现, 如图 6B所示, 本实施例的装置还包括: 划分信 息解码模块 64。 划分信息解码模块 64, 用于从码流中解码出矩阵的划分层数和相应的划 分方法, 并提供给第一重建模块 62和第二重建模块 63。 或者, 划分信息解码 模块 64, 用于从码流中解码出划分方法, 并提供给第一重建模块 62和第二重 建模块 63。 或者, 划分信息解码模块 64 , 用于从码流中解码出划分层数, 并 提供给第一重建模块 62和第二重建模块 63。 其中, 所述划分方法为将矩阵的 矩阵元素分组到不同分层中的分组方法。
进一步, 本实施例的第二重建模块 63具体用于由层数小于或等于编码层 数的层对应的矩阵元素重建值进行均勾插值计算或加权插值计算, 得到层数 大于编码层数的各层对应的矩阵元素重建值。
本实施例的第二重建模块 63还具体用于按照先横向再纵向的插值顺序, 或者按照先纵向再横向的插值顺序, 由层数小于或等于编码层数的层对应的 矩阵元素重建值进行插值计算, 得到层数大于编码层数的各层对应的矩阵元 素重建值。
第一重建模块 62具体用于在解码到的当前层的层数小于或等于设定的层 数阔值时, 对当前层对应的码流进行变长码解码, 获取当前层的编码数据, 在解码到的当前层的层数大于层数阈值, 对当前层对应的码流进行游程码解 码, 获取当前层的编码数据; 然后根据编码层数和从码流中解码出的矩阵中 层数小于或等于编码层数的各层的编码数据, 按照层次顺序依次得到层数小 于或等于编码层数的各层对应的矩阵元素重建值。
上述各功能模块的具体工作原理可参见图 2 所示方法中的相应流程, 在 此不再赘述。
本实施例的矩阵解码装置,与图 5A或图 5B所示的矩阵编码装置相配合, 从码流中获取编码层数后, 根据编码层数和从码流中解码出的层数小于或等 于编码层数的各层的编码数据依次解码出各层对应的矩阵元素重建值, 实现 对矩阵的重建, 允许矩阵编码装置使用分层架构对矩阵进行编码, 提高了对 矩阵的压缩比, 减少了传输矩阵所占用的码率。
图 7A为本发明又一实施例提供的矩阵编码装置的结构示意图。 如图 7A 所示, 本实施例的装置包括: 预测编码模块 71、 误差获取模块 72、 第一编码 重建模块 73和第二编码重建模块 74。
其中, 预测编码模块 71 , 用于根据矩阵集合中矩阵的大小, 按照编码顺 序依次对矩阵集合中的矩阵进行编码预测, 获取矩阵的重建矩阵, 并将矩阵 的重建矩阵进行相应的釆样处理得到釆样矩阵。
误差获取模块 72, 与预测编码模块 71连接, 用于由当前矩阵的重建矩阵 和当前矩阵得到第一误差, 由按照编码顺序在当前矩阵之前已编码矩阵的重 建矩阵进行釆样处理得到的釆样矩阵和当前矩阵得到第二误差。
第一编码重建模块 73, 与误差获取模块 72连接, 用于在误差获取模块 72获取 到的第一误差小于或等于第二误差时,将当前矩阵的重建矩阵作为当前矩阵对 应的编码重建矩阵, 并将当前矩阵对应的编码结果写入码流。
第二编码重建模块 74 , 与误差获取模块 72连接, 用于在误差获取模块 72获取到的第一误差大于第二误差, 将按照编码顺序在当前矩阵之前已编码 矩阵的重建矩阵进行釆样处理得到的釆样矩阵作为当前矩阵对应的编码重建 矩阵, 并将当前矩阵对应的编码结果写入码流。
本实施例的矩阵编码装置的各功能模块可用于执行图 3 所示矩阵编码方 法的流程, 其具体工作原理不再赘述, 详见方法实施例的描述。
本实施例的矩阵编码装置, 以矩阵的大小为依据按照编码顺序依次对矩 阵集合中各矩阵进行编码预测, 得到重建矩阵, 并对重建矩阵进行釆样处理 得到釆样矩阵, 从当前编码到的矩阵的重建矩阵和由之前已编码矩阵的重建 矩阵釆样得到的釆样矩阵中选择一个误差小的矩阵作为当前矩阵的编码重建 矩阵, 并将当前矩阵的编码结果写入码流, 实现对矩阵集合中每个矩阵的编 码, 提高了对每个矩阵的压缩比, 减少了传输矩阵所占用的码率。
图 7B为本发明再一实施例提供的矩阵编码装置的结构示意图。本实施例 基于图 7A所示实施例实现, 如图 7B所示, 本实施例的装置还包括: 标识编 码模块 75。
标识编码模块 75 , 用于在码流中写入标识编码顺序和所使用的釆样方法 的标识比特, 并提供给预测编码模块 71。 该标识比特用于标识编码顺序是按 照矩阵由大到小的顺序, 还是由小到大的顺序依次对多个矩阵进行编码, 并 且还会标识在按照矩阵由大到小的顺序进行编码时, 所使用的釆样方法为下 釆样方法, 在按照矩阵由小到大的顺序进行编码时, 所使用的釆样方法为上 釆样方法。
进一步,本实施例的预测编码模块 71具体用于按照矩阵由小到大的顺序, 对矩阵集合中的矩阵进行编码预测, 获取矩阵的重建矩阵, 并对矩阵的重建 矩阵进行上釆样得到釆样矩阵, 其中最小矩阵的编码矩阵为最小矩阵的重建 矩阵。 或者,
预测编码模块 71具体用于按照矩阵由大到小的顺序, 对矩阵集合中的矩 阵进行编码预测, 获取矩阵的重建矩阵, 并对矩阵的重建矩阵进行下釆样得 到釆样矩阵, 其中最大矩阵的编码矩阵为最大矩阵的重建矩阵。
进一步, 本实施例的预测编码模块 71具体用于按照预设划分层数将矩阵 进行分层, 并将矩阵中的矩阵元素分组到不同分层中, 根据确定的待编码层 数, 按照层次顺序依次对待编码的每层中的矩阵元素进行编码处理; 如果当 前层的层数小于或等于待编码层数, 则将当前层对应的原始矩阵元素值作为 当前层对应的矩阵元素重建值; 如果当前层的层数大于待编码层数, 将当前 层对应的矩阵元素预测值作为当前层对应的矩阵元素重建值, 实现对矩阵的 编码预测, 获取矩阵的重建矩阵。
其中, 当前层对应的矩阵元素预测值是由当前层之前已编码层对应的矩 阵元素预测值进行插值计算得到的。
基于上述, 本实施例的第一编码重建模块 73具体用于在码流中写入标识 当前矩阵是否使用釆样矩阵的标识比特, 且所述标识比特标识当前矩阵不使 用釆样矩阵, 并将当前矩阵中层数小于或等于待编码层数的各层对应的矩阵 元素重建值和层数小于或等于待编码层数的各层对应的矩阵元素预测值计算 得到的残差数据作为层数小于或等于待编码层数的各层的编码数据写入码 流, 且不在码流中写入当前矩阵中层数大于待编码层数的各层的编码数据, 同时将待编码层数写入码流。
更进一步, 第一编码重建模块 73更为具体的用于在层数小于或等于待编 码层数的各层的层数小于或等于设定的层数阔值时, 对层数小于或等于待编 码层数的各层的编码数据进行变长码编码后写入码流, 在层数小于或等于待 编码层数的各层的层数大于层数阔值时, 对层数小于或等于待编码层数的各 层的编码数据进行游程编码后写入码流。
进一步, 第二编码重建模块 74具体用于在码流中写入标识将当前矩阵是 否使用釆样矩阵的标识比特, 且所述标识比特标识当前矩阵使用釆样矩阵, 且不在码流中写入当前矩阵对应的编码数据。

Claims

其中, 上述各功能模块的具体工作原理可参见图 3 所示实施例中的相应 描述, 在此不再赘述。
本实施例的矩阵编码装置, 在使用釆样矩阵时, 在码流中仅写入标识比 特而不写入编码数据, 在不使用釆样矩阵时, 在码流中写入原始矩阵元素和 矩阵元素预测值的残差数据, 提高了对矩阵的压缩比, 降低了传输矩阵时所 占用的码率, 进一步降低了传输整个矩阵集合所占用的码率。
图 8为本发明又一实施例提供的矩阵解码装置的结构示意图。 如图 8所 示, 本实施例的矩阵解码装置包括: 确定模块 81、 标识解码模块 82、 第一解 码重建模块 83、 第二解码重建模块 84和触发模块 85。
其中, 确定模块 81 , 用于确定矩阵集合对应的解码顺序和相应的釆样方 法。
标识解码模块 82 , 用于从码流中解码出标识当前矩阵是否使用釆样矩阵 的标识比特。
第一解码重建模块 83 , 与确定模块 81和标识解码模块 82连接, 用于在 标识比特标识当前矩阵使用釆样矩阵时, 将由按照解码顺序在当前矩阵之前 已解码矩阵的解码重建矩阵进行釆样处理得到的釆样矩阵, 作为当前矩阵的 解码重建矩阵。
第二解码重建模块 84 , 与标识解码模块 82连接, 用于在标识比特标识当 前矩阵不使用釆样矩阵, 直接从码流中解码出当前矩阵的解码重建矩阵。
触发模块 85 , 与标识解码模块 82、 第一解码重建模块 83和第二解码重 建模块 84连接, 用于触发标识解码模块 82、 第一解码重建模块 83和第二解 码重建模块 84 , 按照解码顺序, 依次解码出矩阵集合中所有矩阵的解码重建 矩阵。
本实施例的矩阵解码装置的各功能模块可用于执行图 4 所示矩阵解码方 法的流程, 其具体工作原理不再赘述, 详见方法实施例的描述。
进一步, 本实施例的确定模块 81具体用于预先约定解码顺序和相应的釆 样方法, 或者具体用于从码流中解码出标识解码顺序和相应的釆样方法的标 识比特, 从而确定出解码矩阵集合所使用的解码顺序和相应的釆样方法。
本实施例的第二解码重建模块 84具体用于根据解码顺序, 从码流中解码 出当前矩阵的编码层数, 根据编码层数和从码流中解码出的当前矩阵中层数 小于或等于编码层数的各层的编码数据, 按照层次顺序依次得到当前矩阵中 层数小于或等于编码数据的各层对应的矩阵元素重建值; 然后, 由当前矩阵 中层数小于或等于编码层数的层对应的矩阵元素重建值计算得到当前矩阵中 层数大于所述编码层数的各层对应的矩阵元素重建值。
更为具体的, 第二解码重建模块 84用于对于层数小于或等于编码层数的 各层, 如果层数小于或等于设定的层数阔值, 对层数小于或等于编码层数的 各层对应的码流进行变长码解码, 获取层数小于或等于编码层数的各层的编 码数据; 如果层数大于层数阔值, 对层数小于或等于编码层数的各层对应的 码流进行游程码解码, 获取层数小于或等于编码层数的各层的编码数据。
上述功能模块具体可用于执行图 4 所示矩阵解码方法中的相应流程, 其 具体工作原理在此不再赘述。
本实施例的矩阵解码装置, 与图 7A所示矩阵编码装置相配合, 首先确定 解码顺序和相应的釆样方法, 并根据从码流中解码出的标识比特, 确定获取 矩阵集合中每个矩阵的解码重建矩阵的方式, 其中, 当标识比特标识当前矩 阵使用釆样矩阵时, 在码流中不存在该当前矩阵的编码数据, 提高了矩阵编 码装置对矩阵的压缩比 , 降低了传输矩阵所占用的码率。
本领域普通技术人员可以理解: 实现上述方法实施例的全部或部分步骤 可以通过程序指令相关的硬件来完成, 前述的程序可以存储于一计算机可读 取存储介质中, 该程序在执行时, 执行包括上述方法实施例的步骤; 而前述 的存储介质包括: ROM、 RAM, 磁碟或者光盘等各种可以存储程序代码的介
、 最后应说明的是: 以上实施例仅用以说明本发明的技术方案, 而非对 其限制; 尽管参照前述实施例对本发明进行了详细的说明, 本领域的普通 技术人员应当理解: 其依然可以对前述各实施例所记载的技术方案进行修 改, 或者对其中部分技术特征进行等同替换; 而这些修改或者替换, 并不 使相应技术方案的本质脱离本发明各实施例技术方案的范围。 1、 一种矩阵编码方法, 其特征在于, 包括:
按照预设划分层数将矩阵进行分层, 并将矩阵元素分组到不同分层中; 根据确定的待编码层数, 按照层次顺序依次对待编码的每层中的矩阵元素 进行编码处理;
如果当前层的层数小于或等于所述待编码层数, 则根据当前层对应的原始 矩阵元素值和当前层对应的矩阵元素预测值计算得到的残差数据作为当前层的 编码数据写入码流;
如果当前层的层数大于所述待编码层数, 在所述码流中不写入当前层的编 码数据;
其中, 当前层对应的矩阵元素预测值是由所述矩阵当前层之前已编码层中 和当前层中已编码矩阵元素的矩阵元素重建值或者矩阵元素预测值进行插值计 算得到的;
将所述待编码层数进行编码, 并写入所述码流。
2、 根据权利要求 1所述的矩阵编码方法, 其特征在于, 所述根据确定的待 编码层数, 按照层次顺序依次对待编码的每层中的矩阵元素进行编码处理包括: 根据所述确定的待编码层数,按照先编码^ ^后编码高层的方式对矩阵元素进行分 层编码。
3、根据权利要求 1所述的矩阵编码方法,其特征在于,所述矩阵为量化矩阵、 缩放矩阵、 系 :加 ^又矩阵、量化矩阵经过变换后的变换域矩阵、缩放矩阵经过变换后的 变换域矩阵、 系数加权矩阵经过变 的变换域矩阵、量化矩阵经过编码预测后的预测 残差矩阵、缩放矩阵经过编码预测后的预测残差矩阵或系数加权矩阵经过编码预测后的 预测残差矩阵。
4、 根据权利要求 1所述的矩阵编码方法, 其特征在于, 所述由所述矩阵当 前层之前已编码层中和当前层中已编码矩阵元素的矩阵元素重建值或者矩阵元 素预测值进行插值计算得到当前层对应的矩阵元素预测值包括:
由所述矩阵当前层之前已编码层中和当前层中已编码矩阵元素的矩阵元素 重建值或者矩阵元素预测值进行均勾插值计算或者加权插值计算得到当前层对 应的矩阵元素预测值。
5、 根据权利要求 1所述的矩阵编码方法, 其特征在于, 所述由所述矩阵当 前层之前已编码层中和当前层中已编码矩阵元素的矩阵元素重建值或者矩阵元 素预测值进行插值计算得到当前层对应的矩阵元素预测值包括:
按照先横向再纵向的插值顺序, 由所述矩阵当前层之前已编码层中和当前 层中已编码矩阵元素的矩阵元素重建值或者矩阵元素预测值进行插值计算得到 当前层对应的矩阵元素预测值; 或者
按照先纵向再横向的插值顺序, 由所述矩阵当前层之前已编码层中和当前 层中已编码矩阵元素的矩阵元素重建值或者矩阵元素预测值进行插值计算得到 当前层对应的矩阵元素预测值。
6、 根据权利要求 1所述的矩阵编码方法, 其特征在于, 最低层对应的矩阵元 素预测值为最低层对应的原始矩阵元素值, 或者为一个或者一组预设默 i 直。
7、 根据权利要求 1所述的矩阵编码方法, 其特征在于, 所述待编码层数小 于所述预设划分层数。
8、 根据权利要求 1 - 7任一项所述的矩阵编码方法, 其特征在于, 还包括: 对所述预设划分层数和将所述矩阵进行分层的划分方法进行编码, 并写入 所述码流; 或者
将所述预设划分层数在编码端预先约定, 对将所述矩阵进行分层的划分方 法进行编码并写入所述码流; 或者
将所述预设划分层数和将所述矩阵进行分层的划分方法均在编码端预先预 定;
所述划分方法为将所述矩阵的矩阵元素分组到不同分层中的分组方法。
9、 根据权利要求 1-7任一项所述矩阵编码方法, 其特征在于, 所述根据当 前层对应的原始矩阵元素值和当前层对应的矩阵元素预测值计算得到残差数据 作为当前层的编码数据写入码流包括:
如果当前层的层数小于或等于设定的层数阔值, 对所述当前层的编码数据 进行变长码编码后写入所述码流;
如果当前层的层数大于所述层数阈值, 对所述当前层的编码数据进行游程 编码后写入所述码流。
10、 一种矩阵解码方法, 其特征在于, 包括:
从码流中解码出矩阵的编码层数;
根据所述编码层数和从所述码流中解码出的所述矩阵中层数小于或等于所 述编码层数的各层的编码数据, 按照层次顺序依次得到层数小于或等于所述编 码层数的各层对应的矩阵元素重建值;
由层数小于或等于所述编码层数的层对应的矩阵元素重建值计算得到层数 大于所述编码层数的各层对应的矩阵元素重建值。
11、 根据权利要求 10所述的矩阵解码方法, 其特征在于, 所述矩阵为量化 矩阵、 缩放矩阵、 系 :加又矩阵、量化矩阵经过变换后的变换域矩阵、 缩^矩阵经过变 换后的变 4奂域 ^矩阵、 系数加权矩阵经过变换后的变换域矩阵、量化矩阵经过编码预测后 的预测残差矩阵、缩放矩阵经过编码预测后的预测残差矩阵或系数加权矩阵经过编码预 测后的预测残差矩阵。
12、 根据权利要求 10所述的矩阵解码方法, 其特征在于, 由层数小于或等于所 述编码层数的层对应的矩阵元素重建值计算得到层数大于所述编码层数的各层 对应的矩阵元素重建值包括:
由层数小于或等于所述编码层数的层对应的矩阵元素重建值进行均勾插值 计算或加权插值计算, 得到层数大于所述编码层数的各层对应的矩阵元素重建 值。
13、 根据权利要求 10所述的矩阵解码方法, 其特征在于, 由层数小于或等于所 述编码层数的层对应的矩阵元素重建值计算得到层数大于所述编码层数的各层 对应的矩阵元素重建值包括:
按照先横向再纵向的插值顺序, 由层数小于或等于所述编码层数的层对应 的矩阵元素重建值计算得到层数大于所述编码层数的各层对应的矩阵元素重建 值; 或者
按照先纵向再横向的插值顺序, 由层数小于或等于所述编码层数的层对应 的矩阵元素重建值计算得到层数大于所述编码层数的各层对应的矩阵元素重建 值。
14、根据权利要求 10-13任一项所述的矩阵解码方法,其特征在于,还包括: 从所述码流中解码出所述矩阵的划分层数和相应的划分方法; 或者 从所述码流中解码出所述划分方法; 或者
从所述码流中解码出所述划分层数; 所述划分方法为将所述矩阵的矩阵元 素分组到不同分层中的分组方法。
15、根据权利要求 10-13任一项所述的矩阵解码方法, 其特征在于, 所述根 据所述待编码层数, 从所述码流中解码出所述矩阵中层数小于或等于所述编码 层数的各层的编码数据包括:
如果解码到的当前层的层数小于或等于设定的层数阔值, 对所述当前层对 应的码流进行变长码解码, 获取所述当前层的编码数据;
如果解码到的当前层的层数大于所述层数阈值, 对所述当前层对应的码流 进行游程码解码, 获取所述当前层的编码数据。
16、 一种矩阵编码方法, 其特征在于, 包括:
根据矩阵集合中矩阵的大小, 按照编码顺序依次对所述矩阵集合中的矩阵 进行编码预测, 获取所述矩阵的重建矩阵, 并将所述矩阵的重建矩阵进行相应 的釆样处理得到釆样矩阵;
由当前矩阵的重建矩阵和当前矩阵得到第一误差, 由按照所述编码顺序在 当前矩阵之前已编码矩阵的重建矩阵进行釆样处理得到的釆样矩阵和当前矩阵 得到第二误差;
如果所述第一误差小于或等于所述第二误差, 将当前矩阵的重建矩阵作为 当前矩阵对应的编码重建矩阵, 并将当前矩阵对应的编码结果写入码流;
如果所述第一误差大于所述第二误差, 将按照所述编码顺序在当前矩阵之 前已编码矩阵的重建矩阵进行釆样处理得到的釆样矩阵作为当前矩阵对应的编 码重建矩阵, 并将当前矩阵对应的编码结果写入所述码流。
17、 根据权利要求 16所述的矩阵编码方法, 其特征在于, 所述根据矩阵集 合中待编码矩阵的大小, 按照编码顺序依次对矩阵集合中的矩阵进行编码预测 , 获取待编码矩阵的重建矩阵, 并将所述待编码矩阵的重建矩阵进行相应的釆样 处理得到釆样矩阵包括:
按照矩阵由小到大的顺序, 对所述矩阵集合中的矩阵进行编码预测, 获取 所述矩阵的重建矩阵, 并对所述矩阵的重建矩阵进行上釆样得到釆样矩阵, 其 中最小矩阵的编码重建矩阵为最小矩阵的重建矩阵; 或者
按照矩阵由大到小的顺序, 对所述矩阵集合中的矩阵进行编码预测, 获取 所述矩阵的重建矩阵, 并对所述矩阵的重建矩阵进行下釆样得到釆样矩阵, 其 中最大矩阵的编码重建矩阵为最大矩阵的重建矩阵。
18、 根据权利要求 16或 17所述的矩阵编码方法, 其特征在于, 所述对矩 阵集合中的矩阵进行编码预测, 获取所述矩阵的重建矩阵包括: 按照预设划分层数将所述矩阵进行分层, 并将所述矩阵中的矩阵元素分组 到不同分层中;
根据确定的待编码层数, 按照层次顺序依次对待编码的每层中的矩阵元素 进行编码处理;
如果当前层的层数小于或等于所述待编码层数, 则将当前层对应的原始矩 阵元素值作为当前层对应的矩阵元素重建值;
如果当前层的层数大于所述待编码层数, 将当前层对应的矩阵元素预测值 作为当前层对应的矩阵元素重建值;
其中, 当前层对应的矩阵元素预测值是由所述矩阵当前层之前已编码层中 和当前层中已编码矩阵元素的矩阵元素重建值或者矩阵元素预测值进行插值计 算得到的。
19、 根据权利要求 18所述的矩阵编码方法, 其特征在于,
如果所述第一误差大于或等于所述第二误差, 所述将当前矩阵对应的编码 结果写入码流包括:
在所述码流中写入标识当前矩阵是否使用釆样矩阵的标识比特, 所述标识 比特标识当前矩阵不使用釆样矩阵, 并将当前矩阵中层数小于或等于所述待编 码层数的各层对应的矩阵元素重建值和层数小于或等于所述待编码层数的各层 对应的矩阵元素预测值计算得到的残差数据作为层数小于或等于所述待编码层 数的各层的编码数据写入所述码流, 且不在所述码流中写入当前矩阵中层数大 于所述待编码层数的各层的编码数据, 同时将所述待编码层数写入所述码流; 如果所述第一误差大于所述第二误差, 所述将当前矩阵对应的编码结果写 入所述码流包括:
在所述码流中写入标识将当前矩阵是否使用釆样矩阵的标识比特, 所述标 识比特标识当前矩阵使用釆样矩阵, 且不在所述码流中写入当前矩阵对应的编 码数据。
20、 根据权利要求 19所述的矩阵编码方法, 其特征在于, 所述将当前矩阵 中层数小于或等于所述待编码层数的各层对应的矩阵元素重建值和所述各层对 应的矩阵元素预测值计算得到的残差数据作为层数小于或等于所述待编码层数 的各层的编码数据写入所述码流包括:
对于层数小于或等于所述待编码层数的各层, 如果层数小于或等于设定的 层数阔值, 对层数小于或等于所述待编码层数的各层的编码数据进行变长码编 码后写入所述码流;
对于层数小于或等于所述待编码层数的各层, 如果层数大于所述层数阔值, 对层数小于或等于所述待编码层数的各层的编码数据进行游程编码后写入所述 码流。
21、 根据权利要求 16或 17所述的矩阵编码方法, 其特征在于, 还包括: 在同时存在由帧内 /帧间、 亮度 /色度组合出的多个矩阵集合时, 在矩阵的大 小相同时, 按照先帧内后帧间、 先亮度后色度的顺序, 依次对多个矩阵集合中 的矩阵进行编码处理。
22、 根据权利要求 16或 17所述的矩阵编码方法, 其特征在于, 还包括: 预先约定所述编码顺序和所使用的釆样方法; 或者,
在所述码流中写入标识所述编码顺序和所使用的釆样方法的标识比特。
23、 一种矩阵解码方法, 其特征在于, 包括:
确定矩阵集合对应的解码顺序和相应的釆样方法;
从码流中解码出标识当前矩阵是否使用釆样矩阵的标识比特;
如果所述标识比特标识当前矩阵使用釆样矩阵, 将由按照所述解码顺序在 当前矩阵之前已解码矩阵的解码重建矩阵进行釆样处理得到的釆样矩阵, 作为 当前矩阵的解码重建矩阵;
如果所述标识比特标识当前矩阵不使用釆样矩阵, 直接从所述码流中解码 出当前矩阵的解码重建矩阵;
按照所述解码顺序, 依次解码出所述矩阵集合中所有矩阵的解码重建矩阵。
24、 根据权利要求 23所述的矩阵解码方法, 其特征在于, 所述确定矩阵集 合对应的解码顺序和相应的釆样方法包括:
预先约定所述解码顺序和相应的釆样方法; 或者
从所述码流中解码出标识所述解码顺序和相应的釆样方法的标识比特。
25、 根据权利要求 23或 24所述的矩阵解码方法, 其特征在于, 确定出的 解码顺序和相应的釆样方法包括:
所述解码顺序为按照矩阵由小到大的顺序, 相应的釆样方法为上釆样方法; 或者
所述解码顺序为按照矩阵由大到小的顺序, 相应的釆样方法为下釆样方法。
26、 根据权利要求 23或 24所述的矩阵解码方法, 其特征在于, 所述直接 从所述码流中解码出当前矩阵的解码重建矩阵包括:
根据所述解码顺序, 从所述码流中解码出当前矩阵的编码层数, 根据所述 编码层数和从所述码流中解码出的当前矩阵中层数小于或等于所述编码层数的 各层的编码数据, 按照层次顺序依次得到当前矩阵中层数小于或等于所述编码 数据的各层对应的矩阵元素重建值;
由当前矩阵中层数小于或等于所述编码层数的层对应的矩阵元素重建值计 算得到当前矩阵中层数大于所述编码层数的各层对应的矩阵元素重建值。
27、 根据权利要求 26所述的矩阵解码方法, 其特征在于, 从所述码流中解 码出的当前矩阵中层数小于或等于所述编码层数的各层的编码数据包括:
对于层数小于或等于所述编码层数的各层, 如果层数小于或等于设定的层 数阔值, 对层数小于或等于所述编码层数的各层对应的码流进行变长码解码, 获取层数小于或等于所述编码层数的各层的编码数据;
对于层数小于或等于所述编码层数的各层, 如果层数大于所述层数阔值, 对层数小于或等于所述编码层数的各层对应的码流进行游程码解码, 获取层数 小于或等于所述编码层数的各层的编码数据。
28、 一种矩阵编码装置, 其特征在于, 包括:
分层模块, 用于按照预设划分层数将矩阵进行分层, 并将矩阵元素分组到 不同的分层中;
编码处理模块, 用于根据确定的待编码层数, 按照层次顺序依次对待编码 的每层中的矩阵元素进行编码处理; 如果当前层的层数小于或等于所述待编码 层数, 则根据当前层对应的原始矩阵元素值和当前层对应的矩阵元素预测值计 算得到残差数据作为当前层的编码数据写入码流; 如果当前层的层数大于所述 待编码层数, 在所述码流中不写入当前层的编码数据;
其中, 当前层对应的矩阵元素预测值是由所述矩阵当前层之前已编码层中 和当前层中已编码矩阵元素的矩阵元素重建值或者矩阵元素预测值进行插值计 算得到的;
第一编码写入模块, 用于将所述待编码层数进行编码, 并写入所述码流。
29、 根据权利要求 28所述的矩阵编码装置, 其特征在于, 所述编码处理模 块具体用于根据所述确定的待编码层数, 按照先编码低层后编码高层的方式对矩阵元 素进行分层编码。
30、 根据权利要求 28所述的矩阵编码装置, 其特^ ^于, 所述编码处理 具体 用于由所述矩阵当前层之前已编码层中和当前层中已编码矩阵元素的矩阵元素 重建值或者矩阵元素预测值进行均勾插值计算或者加权插值计算得到当前层对 应的矩阵元素预测值。
31、 根据权利要求 28所述的矩阵编码装置, 其特^ ^于, 所述编码处理 j^^ 用于按照先横向再纵向的插值顺序, 或者按照先纵向再横向的插值顺序, 由所述 矩阵当前层之前已编码层中和当前层中已编码矩阵元素的矩阵元素重建值或者 矩阵元素预测值进行插值计算得到当前层对应的矩阵元素预测值。
32、根据权利要求 28-31任一项所述的矩阵编码装置,其特征在于,还包括: 第二编码写入模块, 用于对所述预设划分层数和将所述矩阵进行分层的划 分方法进行编码, 并写入所述码流, 或者用于对将所述矩阵进行分层的划分方 法进行编码并写入所述码流; 所述划分方法为将所述矩阵的矩阵元素分组到不 同分层中的分组方法。
33、根据权利要求 28-31任一项所述的矩阵编码装置, 其特征在于, 所述编码 处理模块具体用于在当前层的层数小于或等于设定的层数阔值时, 对所述当前 层的编码数据进行变长码编码后写入所述码流, 在当前层的层数大于所述层数 阔值时, 对所述当前层的编码数据进行游程编码后写入所述码流。
34、 一种矩阵解码装置, 其特征在于, 包括:
层数解码模块, 用于从码流中解码出矩阵的编码层数;
第一重建模块, 用于根据所述编码层数和从所述码流中解码出的所述矩阵 中层数小于或等于所述编码层数的各层的编码数据, 按照层次顺序依次得到层 数小于或等于所述编码层数的各层对应的矩阵元素重建值;
第二重建模块, 用于由层数小于或等于所述编码层数的层对应的矩阵元素 重建值计算得到层数大于所述编码层数的各层对应的矩阵元素重建值。
35、 根据权利要求 34所述的矩阵解码装置, 其特征在于, 所述第二重建模 块具体用于由层数小于或等于所述编码层数的层对应的矩阵元素重建值进行均 匀插值计算或加权插值计算, 得到层数大于所述编码层数的各层对应的矩阵元 素重建值。
36、 根据权利要求 34所述的矩阵解码装置, 其特征在于, 所述第二重建模 块具体用于按照先横向再纵向的插值顺序, 或者按照先纵向再横向的插值顺序, 由层数小于或等于所述编码层数的层对应的矩阵元素重建值计算得到层数大于 所述编码层数的各层对应的矩阵元素重建值。
37、根据权利要求 34-36任一项所述的矩阵解码装置,其特征在于,还包括: 划分信息解码模块, 用于从所述码流中解码出所述矩阵的划分层数和相应 的划分方法, 或者用于从所述码流中解码出所述划分方法, 或者用于从所述码 流中解码出所述划分层数; 所述划分方法为将所述矩阵的矩阵元素分组到不同 分层中的分组方法。
38、根据权利要求 34-36任一项所述的矩阵解码装置, 其特征在于, 所述第 一重建模块具体用于在解码到的当前层的层数小于或等于设定的层数阔值时, 对所述当前层对应的码流进行变长码解码, 获取所述当前层的编码数据, 在解 码到的当前层的层数大于所述层数阔值, 对所述当前层对应的码流进行游程码 解码, 获取所述当前层的编码数据。
39、 一种矩阵编码装置, 其特征在于, 包括:
预测编码模块, 用于根据矩阵集合中矩阵的大小, 按照编码顺序依次对所 述矩阵集合中的矩阵进行编码预测, 获取所述矩阵的重建矩阵, 并将所述矩阵 的重建矩阵进行相应的釆样处理得到釆样矩阵;
误差获取模块, 用于由当前矩阵的重建矩阵和当前矩阵得到第一误差, 由 按照所述编码顺序在当前矩阵之前已编码矩阵的重建矩阵进行釆样处理得到的 釆样矩阵和当前矩阵得到第二误差;
第一编码重建模块,用于在所述第一误差小于或等于所述第二误差,将当前矩 阵的重建矩阵作为当前矩阵对应的编码重建矩阵, 并将当前矩阵对应的编码结 果写入码流;
第二编码重建模块, 用于在所述第一误差大于所述第二误差, 将按照所述 编码顺序在当前矩阵之前已编码矩阵的重建矩阵进行釆样处理得到的釆样矩阵 作为当前矩阵对应的编码重建矩阵, 并将当前矩阵对应的编码结果写入所述码 流。
40、 根据权利要求 39所述的矩阵编码装置, 其特征在于, 所述预测编码模 块具体用于按照矩阵由小到大的顺序, 对所述矩阵集合中的矩阵进行编码预测, 获取所述矩阵的重建矩阵, 并对所述矩阵的重建矩阵进行上釆样得到釆样矩阵 , 其中最小矩阵的编码重建矩阵为最小矩阵的重建矩阵; 或者具体用于按照矩阵 由大到小的顺序, 对所述矩阵集合中的矩阵进行编码预测, 获取所述矩阵的重 建矩阵, 并对所述矩阵的重建矩阵进行下釆样得到釆样矩阵, 其中最大矩阵的 编码重建矩阵为最大矩阵的重建矩阵。
41、 根据权利要求 39或 40所述的矩阵编码装置, 其特征在于, 所述预测 编码模块具体用于按照预设划分层数将所述矩阵进行分层, 并将所述矩阵中的 矩阵元素分组到不同分层中, 根据确定的待编码层数, 按照层次顺序依次对待 编码的每层中的矩阵元素进行编码处理; 如果当前层的层数小于或等于所述待 编码层数, 则将当前层对应的原始矩阵元素值作为当前层对应的矩阵元素重建 值; 如果当前层的层数大于所述待编码层数, 将当前层对应的矩阵元素预测值 作为当前层对应的矩阵元素重建值;
其中, 当前层对应的矩阵元素预测值是由所述矩阵当前层之前已编码层中 和当前层中已编码矩阵元素的矩阵元素重建值或者矩阵元素预测值进行插值计 算得到的。
42、 根据权利要求 41所述的矩阵编码装置, 其特征在于, 所述第一编码重 建模块具体用于在所述码流中写入标识当前矩阵是否使用釆样矩阵的标识比 特, 所述标识比特标识当前矩阵不使用釆样矩阵, 并将当前矩阵中层数小于或 等于所述待编码层数的各层对应的矩阵元素重建值和层数小于或等于所述待编 码层数的各层对应的矩阵元素预测值计算得到的残差数据作为层数小于或等于 所述待编码层数的各层的编码数据写入所述码流, 且不在所述码流中写入当前 矩阵中层数大于所述待编码层数的各层的编码数据, 同时将所述待编码层数写 入所述码流;
所述第二编码重建模块具体用于在所述码流中写入标识将当前矩阵是否使 用釆样矩阵的标识比特, 所述标识比特标识当前矩阵使用釆样矩阵, 且不在所 述码流中写入当前矩阵对应的编码数据。
43、 根据权利要求 42所述的矩阵编码装置, 其特征在于, 所述第一编码重 建模块更为具体的用于对于层数小于或等于所述待编码层数的各层, 如果层数 小于或等于设定的层数阔值时, 对层数小于或等于所述待编码层数的各层的编 码数据进行变长码编码后写入所述码流, 如果层数大于所述层数阈值时, 对层 数小于或等于所述待编码层数的各层的编码数据进行游程编码后写入所述码 Ί。
44、 根据权利要求 39或 40所述的矩阵编码装置, 其特征在于, 还包括: 标识编码模块, 用于在所述码流中写入标识所述编码顺序和所使用的釆样 方法的标识比特。
45、 一种矩阵解码装置, 其特征在于, 包括:
确定模块, 用于确定矩阵集合对应的解码顺序和相应的釆样方法; 标识解码模块, 用于从码流中解码出标识当前矩阵是否使用釆样矩阵的标 识比特;
第一解码重建模块, 用于在所述标识比特标识当前矩阵使用釆样矩阵时, 将由按照所述解码顺序在当前矩阵之前已解码矩阵的解码重建矩阵进行釆样处 理得到的釆样矩阵, 作为当前矩阵的解码重建矩阵;
第二解码重建模块, 用于在所述标识比特标识当前矩阵不使用釆样矩阵, 直接从所述码流中解码出当前矩阵的解码重建矩阵;
触发模块, 用于触发所述标识解码模块、 所述第一解码重建模块和所述第 二解码重建模块, 按照所述解码顺序, 依次解码出所述矩阵集合中所有矩阵的 解码重建矩阵。
46、 根据权利要求 45所述的矩阵解码装置, 其特^ ^于, 所述确定 j ^ 用于 预先约定所述解码顺序和相应的釆样方法, 或者具体用于从所述码流中解码出 标识所述解码顺序和相应的釆样方法的标识比特。
47、 根据权利要求 45或 46所述的矩阵解码装置, 其特征在于, 所述第二 解码重建模块具体用于根据所述解码顺序, 从所述码流中解码出当前矩阵的编 码层数, 根据所述编码层数和从所述码流中解码出的当前矩阵中层数小于或等 于所述编码层数的各层的编码数据, 按照层次顺序依次得到当前矩阵中层数小 于或等于所述编码数据的各层对应的矩阵元素重建值; 然后, 由当前矩阵中层 数小于或等于所述编码层数的层对应的矩阵元素重建值计算得到当前矩阵中层 数大于所述编码层数的各层对应的矩阵元素重建值。
48、 根据权利要求 47所述的矩阵解码装置, 其特^ ^于, 所述第二解码重建 具体的用于对于层数小于或等于所述编码层数的各层, 如果层数小于或等 于设定的层数阔值, 对层数小于或等于所述编码层数的各层对应的码流进行 变长码解码, 获取层数小于或等于所述编码层数的各层的编码数据; 如果层 数大于所述层数阔值, 对层数小于或等于所述编码层数的各层对应的码流进 行游程码解码, 获取层数小于或等于所述编码层数的各层的编码数据。
PCT/CN2012/084307 2011-11-08 2012-11-08 矩阵编码方法与装置及解码方法与装置 WO2013067949A1 (zh)

Priority Applications (6)

Application Number Priority Date Filing Date Title
EP12848646.1A EP2765770B1 (en) 2011-11-08 2012-11-08 Matrix encoding method and device thereof, and matrix decoding method and device thereof
EP19173526.5A EP3585055A1 (en) 2011-11-08 2012-11-08 Method and apparatus for coding matrix and method and apparatus for decoding matrix
US14/273,149 US9565429B2 (en) 2011-11-08 2014-05-08 Method and apparatus for coding matrix and method and apparatus for decoding matrix
US15/387,305 US10123016B2 (en) 2011-11-08 2016-12-21 Method and apparatus for coding matrix and method and apparatus for decoding matrix
US16/157,739 US10742982B2 (en) 2011-11-08 2018-10-11 Method and apparatus for coding matrix and method and apparatus for decoding matrix
US16/928,632 US11265547B2 (en) 2011-11-08 2020-07-14 Method and apparatus for coding matrix and method and apparatus for decoding matrix

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201110350455.2A CN103096056B (zh) 2011-11-08 2011-11-08 矩阵编码方法与装置及解码方法与装置
CN201110350455.2 2011-11-08

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US14/273,149 Continuation US9565429B2 (en) 2011-11-08 2014-05-08 Method and apparatus for coding matrix and method and apparatus for decoding matrix

Publications (1)

Publication Number Publication Date
WO2013067949A1 true WO2013067949A1 (zh) 2013-05-16

Family

ID=48208131

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2012/084307 WO2013067949A1 (zh) 2011-11-08 2012-11-08 矩阵编码方法与装置及解码方法与装置

Country Status (4)

Country Link
US (4) US9565429B2 (zh)
EP (2) EP2765770B1 (zh)
CN (1) CN103096056B (zh)
WO (1) WO2013067949A1 (zh)

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109661820A (zh) * 2016-09-13 2019-04-19 联发科技股份有限公司 用于视频编解码的多个量化矩阵集合的方法
CN106775717B (zh) * 2016-12-15 2020-04-17 盛科网络(苏州)有限公司 基于矩阵编码自动插入Feed-through路径的方法
FR3083042A1 (fr) * 2018-06-25 2019-12-27 B<>Com Procede de decodage d'une image, procede de codage, dispositifs, equipement terminal et programmes d'ordinateurs associes
JP2020098986A (ja) * 2018-12-17 2020-06-25 キヤノン株式会社 画像符号化装置及び画像復号装置及びそれらの制御方法及びプログラム
WO2020192633A1 (en) * 2019-03-25 2020-10-01 Mediatek Inc. Method and apparatus of the quantization matrix computation and representation for video coding
TW202106017A (zh) * 2019-06-21 2021-02-01 法商內數位Vc控股法國公司 用於視訊編碼及解碼的單一索引量化矩陣設計
CN112616057A (zh) * 2019-10-04 2021-04-06 Oppo广东移动通信有限公司 图像预测方法、编码器、解码器以及存储介质
CN111556319B (zh) * 2020-05-14 2021-12-17 电子科技大学 一种基于矩阵分解的视频编码方法
CN112511824B (zh) * 2020-11-27 2022-12-02 苏州浪潮智能科技有限公司 一种图像压缩采样方法及组件
CN113422960A (zh) * 2021-06-15 2021-09-21 上海辰珅信息科技有限公司 图像的传输方法及装置
WO2023009608A1 (en) * 2021-07-27 2023-02-02 Beijing Dajia Internet Information Technology Co., Ltd. Coding enhancement in cross-component sample adaptive offset

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101039421A (zh) * 2006-03-16 2007-09-19 华为技术有限公司 在编解码中的实现量化的方法和装置
CN101287119A (zh) * 2008-04-28 2008-10-15 北京大学深圳研究生院 基于频谱的图像分层编解码方法及系统
CN101494784A (zh) * 2007-10-19 2009-07-29 捷讯研究有限公司 在离散余弦变换域中以任意比率对图像大小进行调整
US20090226106A1 (en) * 2008-03-10 2009-09-10 Samsung Electronics Co., Ltd. Apparatus for encoding image and apparatus for decoding image

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6944222B2 (en) 2002-03-04 2005-09-13 Koninklijke Philips Electronics N.V. Efficiency FGST framework employing higher quality reference frames
CN1843039B (zh) 2003-08-29 2011-02-23 皇家飞利浦电子股份有限公司 用于使用描述性模型参数来编码并解码增强层数据的系统和方法
US20090252217A1 (en) 2004-12-10 2009-10-08 Wittig Karl R System and method for layered digital video coding in a digital video recorder
EP1995971B1 (en) * 2006-03-16 2016-11-16 Huawei Technologies Co., Ltd. A method and device for realizing quantization in coding-decoding
US8199812B2 (en) 2007-01-09 2012-06-12 Qualcomm Incorporated Adaptive upsampling for scalable video coding
US8233727B2 (en) * 2007-10-19 2012-07-31 Research In Motion Limited Arbitrary ratio image resizing in the DCT domain
CN101848069B (zh) * 2009-12-22 2013-06-19 北京邮电大学 一种基于分级业务的多天线数据传输方法、系统及装置
BR122014031521B1 (pt) * 2011-02-10 2022-08-23 Velos Media International Limited Dispositivo e método de processamento de imagem
CN102227133B (zh) * 2011-06-23 2013-01-09 天津大学 一种立体视频传输方法

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101039421A (zh) * 2006-03-16 2007-09-19 华为技术有限公司 在编解码中的实现量化的方法和装置
CN101494784A (zh) * 2007-10-19 2009-07-29 捷讯研究有限公司 在离散余弦变换域中以任意比率对图像大小进行调整
US20090226106A1 (en) * 2008-03-10 2009-09-10 Samsung Electronics Co., Ltd. Apparatus for encoding image and apparatus for decoding image
CN101287119A (zh) * 2008-04-28 2008-10-15 北京大学深圳研究生院 基于频谱的图像分层编解码方法及系统

Also Published As

Publication number Publication date
US11265547B2 (en) 2022-03-01
US20200344478A1 (en) 2020-10-29
EP2765770A1 (en) 2014-08-13
US10123016B2 (en) 2018-11-06
US20140241427A1 (en) 2014-08-28
EP2765770A4 (en) 2015-08-05
US20170104998A1 (en) 2017-04-13
US9565429B2 (en) 2017-02-07
EP3585055A1 (en) 2019-12-25
CN103096056B (zh) 2015-11-25
US10742982B2 (en) 2020-08-11
EP2765770B1 (en) 2019-07-03
CN103096056A (zh) 2013-05-08
US20190082180A1 (en) 2019-03-14

Similar Documents

Publication Publication Date Title
US11265547B2 (en) Method and apparatus for coding matrix and method and apparatus for decoding matrix
KR101483750B1 (ko) 영상의 부호화 방법 및 장치, 영상 복호화 방법 및 장치
CN1893666B (zh) 视频编码和解码方法及设备
JP4610195B2 (ja) スキップマクロブロックコード化
KR101675116B1 (ko) 영상의 부호화 방법 및 장치, 그 복호화 방법 및 장치
US20130113880A1 (en) High Efficiency Video Coding (HEVC) Adaptive Loop Filter
KR20110047697A (ko) 픽처 경계의 부호화 단위를 부호화, 복호화 하는 방법 및 장치
JP2001054119A (ja) 画像予測符号化方法
WO2013064120A1 (zh) 一种变换模式的编解码方法和装置
KR20110000438A (ko) 다차원 정수 변환을 이용한 영상 부호화/복호화 장치 및 방법
JP5717886B2 (ja) デジタル画像のシーケンスを符号化する方法
CN110933430A (zh) 二次编码优化方法
CN111741299A (zh) 帧内预测模式的选择方法、装置、设备及存储介质
CN115118976A (zh) 一种图像编码方法、可读介质及其电子设备
TW202406335A (zh) 一種編解碼方法、裝置及其設備
CN116527909A (zh) 编码参数的传输方法、装置、设备、存储介质及程序产品
CN112243123B (zh) 一种基于无损编码的hevc码率优化方法
CN112543324A (zh) 视频解码方法、编码方法、编解码器及存储装置
KR101618766B1 (ko) 영상 복호화 방법 및 장치
KR101662741B1 (ko) 영상 복호화 방법
TWI780742B (zh) 編解碼方法及裝置
KR101618214B1 (ko) 영상 복호화 방법
KR101489222B1 (ko) 영상의 부호화 방법 및 장치, 영상 복호화 방법 및 장치
KR101307469B1 (ko) 비디오 인코더, 비디오 디코더, 비디오 인코딩 방법 및 비디오 디코딩 방법
KR101525015B1 (ko) 영상의 부호화 방법 및 장치, 영상 복호화 방법 및 장치

Legal Events

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

Ref document number: 12848646

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 2012848646

Country of ref document: EP

NENP Non-entry into the national phase

Ref country code: DE