WO2009015600A1 - The transform method and device applying for video and image process - Google Patents

The transform method and device applying for video and image process Download PDF

Info

Publication number
WO2009015600A1
WO2009015600A1 PCT/CN2008/071798 CN2008071798W WO2009015600A1 WO 2009015600 A1 WO2009015600 A1 WO 2009015600A1 CN 2008071798 W CN2008071798 W CN 2008071798W WO 2009015600 A1 WO2009015600 A1 WO 2009015600A1
Authority
WO
WIPO (PCT)
Prior art keywords
matrix
transform
dimensional
video
vectors
Prior art date
Application number
PCT/CN2008/071798
Other languages
French (fr)
Chinese (zh)
Inventor
Lu Yu
Cixun Zhang
Zhibo Ni
Original Assignee
Huawei Technologies Co., Ltd.
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 Huawei Technologies Co., Ltd. filed Critical Huawei Technologies Co., Ltd.
Publication of WO2009015600A1 publication Critical patent/WO2009015600A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions
    • G06F17/10Complex mathematical operations
    • G06F17/14Fourier, Walsh or analogous domain transformations, e.g. Laplace, Hilbert, Karhunen-Loeve, transforms
    • G06F17/147Discrete orthonormal transforms, e.g. discrete cosine transform, discrete sine transform, and variations therefrom, e.g. modified discrete cosine transform, integer transforms approximating the discrete cosine transform
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/42Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by implementation details or hardware specially adapted for video compression or decompression, e.g. dedicated software implementation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/44Decoders specially adapted therefor, e.g. video decoders which are asymmetric with respect to the encoder
    • H04N19/45Decoders specially adapted therefor, e.g. video decoders which are asymmetric with respect to the encoder performing compensation of the inverse transform mismatch, e.g. Inverse Discrete Cosine Transform [IDCT] mismatch
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/60Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding

Definitions

  • the present invention relates to the field of electrical digital data processing technologies, and in particular, to a method and apparatus for transforming video and image processing. Background technique
  • Discrete Cosine Transform removes the information redundancy of the spatial domain to achieve the purpose of compression.
  • DCT Discrete Cosine Transform
  • y(k, 1) c(k)c(l) J- _ ⁇ ⁇ x(m, ) cos - cos -,
  • the transformation matrix multiplication coefficients are irrational numbers, and in practical implementations, these multiplication coefficient bit widths are unlikely to reach infinite length, so they are all implemented using fixed points. The method fits these irrational numbers to implement a discrete cosine transform.
  • the ideal 8x8 Inversed Discrete Cosine Transform (IDCT) uses the transposed matrix of the ideal 8x8 discrete cosine transform matrix, the transform matrix coefficients are also irrational, and also need Fixed point implementations to fit these irrational numbers.
  • IDCT Inversed Discrete Cosine Transform
  • the adder and the shifter are usually used instead of the multiplier function;
  • the method of fixed-point inverse discrete cosine transform has a series of requirements on accuracy.
  • the existing entire test is divided into random number generation, random number input test, all zero input test and adjacent DC inversion test and corresponding indicators.
  • 8x8 DCT matrix operation / z enter the random number test, and then rounding to give 8x8 integer transform coefficient matrix F z must preclude the floating-point precision with at least 64 bits.
  • the IDCT operation is performed on the 8x8 transform coefficient matrix F'z, and then rounded to obtain an 8x8 matrix. At least 64 bits of floating point precision must be used.
  • a measured IDCT is performed on the 8 ⁇ 8 transform coefficient matrix F[V] [M], and then rounded off.
  • the corresponding 8 ⁇ 8 matrix, the ID CT of the 8 ⁇ 8 transform coefficient matrix F z "tested once, and then rounded to get the corresponding 8x8 matrix 2' Z. It can be seen that the existing fixed point conversion method for video and image processing is complicated and the precision is not high.
  • Embodiments of the present invention provide a transform method and apparatus applied to video and image processing, which can easily implement 8x8 discrete cosine transform/inverse discrete cosine transform (DCT/IDCT), reduce processing complexity of video or image, and have comparison High precision.
  • DCT/IDCT 8x8 discrete cosine transform/inverse discrete cosine transform
  • a transform method applied to video and image processing provided by an embodiment of the present invention includes an 8x8 inverse discrete cosine transform method:
  • the matrix X is generated into eight sets of first vectors in a row, and the eight sets of vectors are sequentially subjected to one-dimensional inverse transformation to obtain a matrix ⁇ ';
  • the matrix x' is generated into eight sets of second vectors in rows, and the eight sets of vectors are sequentially inversely transformed in one dimension to obtain a matrix X";
  • transform method applied to video and image processing includes an 8x8 discrete cosine transform:
  • the matrix y' is generated into eight sets of first vectors in a row, and the eight sets of vectors are sequentially subjected to one-dimensional forward transform to obtain a matrix y";
  • the matrix y" is generated into eight sets of second vectors in rows, and the eight sets of vectors are sequentially subjected to one-dimensional forward transform to obtain a matrix y";
  • a transform processing apparatus for video and image processing for implementing an 8x8 inverse discrete cosine transform, and the apparatus includes:
  • the preprocessing unit multiplies an 8x8 integer matrix M by a predetermined 8x8 input data block to obtain an 8x8 matrix X;
  • a first inverse transform unit generating, by the matrix X, eight sets of first vectors, and sequentially performing one-dimensional inverse transform on the eight sets of vectors to obtain a matrix x;
  • a second inverse transform unit which generates eight sets of second vectors by rows, and sequentially performs one-dimensional inverse transform on the eight sets of vectors to obtain a matrix X";
  • the post-processing unit performs the right shift w bit shifting of the elements in the matrix X", where w is a positive integer.
  • transform processing apparatus applied to video and image processing according to an embodiment of the present invention is used to implement an 8x8 discrete cosine transform, including:
  • the preprocessing unit shifts the elements in the 8x8 input data block y to the left by r bits to obtain a matrix Y, and r is a positive integer;
  • the positive transform unit uses the matrix Y obtained by the pre-processing to be arranged into eight sets of vectors in columns, and uses at least six different multiplication coefficients ⁇ , b, c, respectively, when performing multiplication in each set of vector processing.
  • d, h, ⁇ perform operations;
  • the post-processing unit performs a right shifting operation of the elements in the output matrix obtained by the one-dimensional forward transform, where ⁇ is a positive integer.
  • the invention is applied to the inverse transform and forward transform method of video and image processing, and can well approximate the ideal 8 x 8 inverse discrete cosine transform and the ideal 8 x 8 discrete cosine transform, and the precision far exceeds the existing DCT/
  • the requirements of IDCT at the same time, the complexity of hardware implementation is greatly reduced, and can be applied to a variety of existing popular international video codec standards.
  • the inverse transform preprocessing process can be combined with the inverse quantization of video compression decoding to further reduce the complexity.
  • FIG. 1 is a flowchart of an inverse transform method applied to video and image processing according to an embodiment of the present invention
  • FIG. 2 is a flowchart of a forward transform method applied to video and image processing according to an embodiment of the present invention
  • FIG. 3 is an 8x8 inverse discrete embodiment of the present invention.
  • Figure 4 is a flow chart of one-dimensional forward transform of an 8x8 discrete cosine transform according to an embodiment of the present invention.
  • a transform method applied to video and image processing provided by this embodiment includes an 8x8 matrix M in the inverse transform preprocessing step of the 8x8 inverse discrete cosine transform:
  • Ax2 n 5432.3763787064400000
  • bx2 12 1080.5668459858300000
  • cx2 12 4605.3463196628800000
  • ⁇ 2 12 3077.1940310190000000
  • 2 2 12 2127.2189396844700000, 5135.5608143231700000.
  • Input data 8x8 data block X do operation I to get the inverse transform preprocessed output number Where ⁇ ⁇ ][/ ⁇ represents the (zj)th element in the matrix M;
  • Arrange X by row into 8 sets of vectors, and take the first set of vectors ( ⁇ '[0][0], ⁇ '[0][1], ⁇ , ⁇ '[0][7]) as input , do the following:
  • ⁇ 30 ⁇ 20+ ⁇ 26
  • ⁇ 34 ⁇ 24+ ⁇ 22
  • ⁇ 32 ⁇ 24- ⁇ 22
  • ⁇ 36 ⁇ 20- ⁇ 26
  • step 4 to set ( ⁇ '[1][0], ⁇ '[1][1], ⁇ , ⁇ '[1][7]),( ⁇ '[2][0], ⁇ '[2][1], ⁇ , ⁇ '[2][7]), ( ⁇ '[3][0], ⁇ '[3][1], ⁇ , ⁇ '[3 ][7]) , ( ⁇ '[4][0], ⁇ '[4][1], ⁇ , ⁇ '[4][7]),
  • a transform method applied to video and image processing which includes an 8x8 matrix M in an inverse transform preprocessing step of an 8x8 inverse discrete cosine transform:
  • Arrange X by row into 8 sets of vectors, and take the first row vector ( ⁇ '[0][0], ⁇ '[0][1], ⁇ , ⁇ '[0][7]) as input , do the following:
  • step 4 to set ( ⁇ '[1][0], ⁇ '[1][1], ⁇ , ⁇ '[1][7]),( ⁇ '[2][0], ⁇ '[2][1] ⁇ , ⁇ '[2][7]), ( ⁇ '[3][0], ⁇ '[3][1], ⁇ , ⁇ '[3][ 7]) , ( ⁇ '[4][0], ⁇ '[4][1], ⁇ , ⁇ '[4][7]),
  • a transform method applied to video and image processing which includes an 8x8 matrix M in an inverse transform preprocessing step in an 8x8 inverse discrete cosine transform: ABCDADCB
  • X0c (((x»9)-x)»2)- ((x»9)-x);
  • step 4 to set ( ⁇ '[1][0], ⁇ '[1][1], ⁇ , ⁇ '[1][7]),( ⁇ '[2][0], ⁇ '[2][1] ⁇ , ⁇ '[2][7]), ( ⁇ '[3][0], ⁇ '[3][1], ⁇ , ⁇ '[3][ 7]) , ( ⁇ '[4][0], ⁇ '[4][1], ⁇ , ⁇ '[4][7]),
  • the obtained output of the second one-dimensional transformed X" is post-processed and shifted right by w bits.
  • a transform method applied to video and image processing which includes an 8x8 matrix M in a post-transformation processing step in an 8x8 discrete cosine transform:
  • Arrange y arranged into 8 groups of vectors by column, and take the first column vector Cy'[0][0], _y'[l][0], .i'[7][0]f as input, and perform the following operations :
  • a transform method applied to video and image processing which includes an 8x8 matrix M in a post-transformation processing step in an 8x8 discrete cosine transform:
  • the ⁇ operation is defined as follows:
  • X0c (((x»9)-x)»2)- ((x»9)-x); 3. Repeat step 2 to ([0][l], [l][l],.i'[7][l]f, ([0][2], [1][2], ⁇ ⁇ [7][2]) ⁇ , ( [0][3], [1][3], ⁇ [7][3]) ⁇ , ( [0][4], [1][4 ], ⁇ [7][4]) ⁇ ,
  • a transform method applied to video and image processing which includes an 8x8 matrix M in an inverse transform preprocessing step of an 8x8 inverse discrete cosine transform:
  • ⁇ 2 12 3615.8493569450400000
  • bx2 12 719.2371556781520000
  • cx2 12 3065.3690701062000000
  • ⁇ 2 12 2048.2141299835100000
  • hx2 l2 1312.0493699271300000
  • ⁇ 2 12 3167.5673833811500000.
  • Input data 8x8 data block X dynamic range is [-2 8+3 , 2 8+3 - 1], that is 12 bits wide, X, input, inverse transform preprocessing:
  • Each set of vectors is subjected to one-dimensional inverse transform, in which each set of vectors is inversely transformed as ⁇ ⁇ ' in Fig. 3, and ⁇ 7 in Fig. 3 is the result of one-dimensional inverse transform of each group:
  • x' 0 (x'[0][0],x'[0][l],-,x'[0][7])
  • x' 1 (x'[l][0],x '[l][l],-, '[l][7])
  • ⁇ ' 2 ( ⁇ '[2][0], ⁇ '[2][1] ⁇ , ⁇ '[2][7])
  • x' 3 (x'[3][0], ⁇ '[3][1], ⁇ , ⁇ '[3][7])
  • ⁇ ' 4 ( ⁇ '[4][0], ⁇ '[4][1] ⁇ , ⁇ '[4][7])
  • x' 5 ( ⁇ '[5][0], ⁇ '[5][1] ⁇ , ⁇ '[5][7])
  • ⁇ ' 6 ( ⁇ '[6][0], ⁇ '[6][1], ⁇ , ⁇ '[ 6][7])
  • x' 7 ( ⁇ '[7][0], ⁇ '[7][1], ⁇ , ⁇ '[7][7]).
  • the stored Xs are arranged into 8 groups of vectors according to the columns, and each set of vectors is respectively subjected to the second one-dimensional inverse transformation as Xo ⁇ X 7 in Fig. 3, x in Fig. 3.
  • ⁇ x 7 is the result of the second one-dimensional inverse transformation of each set of vectors, and the second one-dimensional inverse transform output X" is obtained; the input of the second one-dimensional inverse transform x, the output X" and the dynamics of the intermediate variables
  • the range does not exceed [-2 8+17 , 2 8+17 - 1];
  • a transform method applied to video and image processing which includes an arrangement of 8x8 matrices M in a forward transform post-processing step in an 8x8 discrete cosine transform:
  • Each set of vectors is used as a one-dimensional forward transform by the input ⁇ 7 input one-dimensional forward transform device in Fig. 4, and the result of each set of one-dimensional forward transform is ⁇ ) & in Fig. 4:
  • x ⁇ 3 ⁇ 4h ((x+(x»5))»2) +(x»4);
  • x ⁇ 8)c (((x»9)-x)»2)- ((x»9)-x);
  • the 8x8 inverse discrete cosine transform method corresponding to ⁇ 4, B, C, D, E, F, G, H, I, J, a, b, c, d, h, t ⁇ in the embodiment of the present invention conforms to ISO /IEC 23002-1-2006 and the accuracy requirements defined below:
  • the invention is an inverse transform and forward transform method applied to video and image processing, and can well approximate an ideal 8x8 inverse discrete cosine transform and an ideal 8x8 discrete cosine transform, and the precision far exceeds ISO/IEC 23002-1-2006.
  • the requirements, while the hardware implementation is greatly reduced in complexity, and can be applied to a variety of international video codec standards.
  • the inverse transform preprocessing process can be combined with the inverse quantization of video compression decoding to further reduce the complexity.

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Pure & Applied Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Mathematical Optimization (AREA)
  • Computational Mathematics (AREA)
  • Discrete Mathematics (AREA)
  • Mathematical Analysis (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Algebra (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)
  • Complex Calculations (AREA)

Abstract

A transform method which is applied for video and image processing includes inverse discrete cosine transform method: a inversed transform preprocess step, one-dimensional inversed transform step, a inversed transform post-process step; another transform method which is applied for video and image processing includes discrete cosine transform method: positive transform preprocess step, one-dimensional positive transform step and positive transform post-process step; and this invention provides a corresponding transform process device. The simpler structure could be used to achieve the discrete cosine transform and inverse discrete cosine transform (DCT/IDCT) according to this invention and lessens the process complexity of video or image and makes higher fidelity. It approximates the ideal IDCT and DCT with much higher fidelity than the demand of associated standards and hence reduces the complication degree of the hardware. The method can be applied to various existing popular international video codec standard.

Description

应用于视频和图像处理的变换方法及装置 本申请要求分别于 2007年 07月 29日, 2007年 12月 07日提交中国 专利局、 申请号为 200710070256.X、 200710300902.7 , 发明名称均为 "应 用于视频和图像处理的变换方法"的中国专利申请的优先权, 其全部内容 通过引用结合在本申请中。 技术领域  Conversion method and device applied to video and image processing The application claims are filed on July 29, 2007, and December 07, 2007, respectively, and the application numbers are 200710070256.X, 200710300902.7, and the invention names are all applied. Priority of the Chinese Patent Application for "Transformation of Video and Image Processing", the entire contents of which are incorporated herein by reference. Technical field
本发明涉及电数字数据处理技术领域, 特别是涉及一种应用于视频 和图像处理的变换方法及装置。 背景技术  The present invention relates to the field of electrical digital data processing technologies, and in particular, to a method and apparatus for transforming video and image processing. Background technique
在部分视频编码标准中 , 如 ITU制定的 H.261 , H.263 , 以及 ISO的 MPEG组织制定的 MPEG-1、 MPEG-2、 MPEG-4标准, 都是釆用离散余 弦变换( Discrete Cosine Transform, DCT )去除空间域的信息冗余度来达 到压缩的目的。 理想的 8x8离散余弦变换和反离散余弦变换分别如下:  In some video coding standards, such as H.261, H.263, and MPEG-1, MPEG-2, and MPEG-4 standards developed by the ISO MPEG organization, Discrete Cosine Transform is used. , DCT) removes the information redundancy of the spatial domain to achieve the purpose of compression. The ideal 8x8 discrete cosine transform and inverse discrete cosine transform are as follows:
(2m + \)k (2n + ΐ)1π  (2m + \)k (2n + ΐ)1π
y(k, 1) = c(k)c(l) J- _ ^ ^ x(m, ) cos - cos -、 y(k, 1) = c(k)c(l) J- _ ^ ^ x(m, ) cos - cos -,
8 X 8 m=0 n=0 16 16
Figure imgf000003_0001
8 X 8 m =0 n=0 16 16
Figure imgf000003_0001
1 k = 0 「 i 1 = 0 1 k = 0 "i 1 = 0
其中 c(A) = r- c(/) =  Where c(A) = r- c(/) =
V2 A =其他 1 2 / =其他 由于在理想的 8x8 离散余弦变换中, 变换矩阵乘法系数是无理数, 而在实际的实现上这些乘法系数位宽不可能达到无限长, 因此都是利用 定点的实现方法拟合这些无理数来实现离散余弦变换。 同样的, 在解码 部分,由于理想的 8x8反离散余弦变换( Inversed Discrete Cosine Transform, IDCT )釆用的是理想的 8x 8离散余弦变换矩阵的转置矩阵, 所以其变换 矩阵系数也是无理数, 同样需要定点的实现来拟合这些无理数。  V2 A = other 1 2 / = Others In the ideal 8x8 discrete cosine transform, the transformation matrix multiplication coefficients are irrational numbers, and in practical implementations, these multiplication coefficient bit widths are unlikely to reach infinite length, so they are all implemented using fixed points. The method fits these irrational numbers to implement a discrete cosine transform. Similarly, in the decoding part, since the ideal 8x8 Inversed Discrete Cosine Transform (IDCT) uses the transposed matrix of the ideal 8x8 discrete cosine transform matrix, the transform matrix coefficients are also irrational, and also need Fixed point implementations to fit these irrational numbers.
此外, 在软件硬件的具体实现中, 为了进一步降低资源的开销和提 升处理速度, 通常釆用加法器和移位器来取代乘法器的功能; 而对于不 同的定点数, 所需要的加法器和移位次数都是不一样的, 这就要求如何 用最优或者接近最优的方法来获得理想的 8x8 DCT/IDCT 中这些无理数 的定点表示, 使之既能达到足够高的精度, 又能使得所需要的加法器和 移位次数最少。 In addition, in the specific implementation of the software hardware, in order to further reduce the resource overhead and improve the processing speed, the adder and the shifter are usually used instead of the multiplier function; The same fixed point number, the required adder and the number of shifts are different, which requires how to use the optimal or near optimal method to obtain the fixed point representation of these irrational numbers in the ideal 8x8 DCT/IDCT. It achieves high enough accuracy while minimizing the number of adders and shifts required.
釆用定点反离散余弦变换的方法对精度有一系列的要求。 现有的整 个测试分为随机数生成、随机数输入测试、全零输入测试和临近 DC倒置 测试以及相应的指标。 例如, 在随机数输入测试中对 8x8 矩阵/ z 进行 DCT操作, 然后四舍五入得到整数的 8x8 变换系数矩阵 Fz 必须釆用至 少 64比特的浮点精度。 对 8x8 变换系数矩阵 F'z 进行 IDCT操作, 然 后四舍五入得到 8x8矩阵 。 必须釆用至少 64比特的浮点精度。 全零输 入测试 ( All Zero Test ) 中, 置 F[v][¾] = 0 , M = 0..7和 v = 0..7。 对 8χ8 变换系数矩阵 F[V] [M]进行一次被测的 IDCT, 然后四舍五入得到。在临近 DC倒置测试 ( Near-DC Inversion Test ) 中 , 对应的 8 χ 8矩阵 , 对 8 χ 8 变换系数矩阵 Fz "进行一次需要测试的 IDCT, 然后四舍五入得到对应的 8x8矩阵 2'Z。 由此可知, 现有的用于视频和图像处理的定点变换方法较 为复杂而且精度不高。 发明内容 The method of fixed-point inverse discrete cosine transform has a series of requirements on accuracy. The existing entire test is divided into random number generation, random number input test, all zero input test and adjacent DC inversion test and corresponding indicators. For example, 8x8 DCT matrix operation / z enter the random number test, and then rounding to give 8x8 integer transform coefficient matrix F z must preclude the floating-point precision with at least 64 bits. The IDCT operation is performed on the 8x8 transform coefficient matrix F'z, and then rounded to obtain an 8x8 matrix. At least 64 bits of floating point precision must be used. In the All Zero Test, set F[v][3⁄4] = 0, M = 0..7 and v = 0..7. A measured IDCT is performed on the 8χ8 transform coefficient matrix F[V] [M], and then rounded off. In the Near-DC Inversion Test, the corresponding 8 χ 8 matrix, the ID CT of the 8 χ 8 transform coefficient matrix F z "tested once, and then rounded to get the corresponding 8x8 matrix 2' Z. It can be seen that the existing fixed point conversion method for video and image processing is complicated and the precision is not high.
本发明实施例提供了一种应用于视频和图像处理的变换方法及装 置, 能够简单实现 8x8离散余弦变换 /反离散余弦变换(DCT/IDCT ), 降 低视频或图像的处理复杂度, 并且具有较高精度。  Embodiments of the present invention provide a transform method and apparatus applied to video and image processing, which can easily implement 8x8 discrete cosine transform/inverse discrete cosine transform (DCT/IDCT), reduce processing complexity of video or image, and have comparison High precision.
本发明实施例提供的一种应用于视频和图像处理的变换方法, 包括 8x8反离散余弦变换方法:  A transform method applied to video and image processing provided by an embodiment of the present invention includes an 8x8 inverse discrete cosine transform method:
使用一个预先设定的 8x8的整数矩阵 M与 8x8的输入数据块相乘得 到 8x8的矩阵 X;  Multiply a predetermined 8x8 integer matrix M with an 8x8 input data block to obtain a matrix X of 8x8;
将所述矩阵 X按行生成 8组第一向量, 对所述 8组向量依次进行一 维反变换, 得到矩阵 χ' ;  The matrix X is generated into eight sets of first vectors in a row, and the eight sets of vectors are sequentially subjected to one-dimensional inverse transformation to obtain a matrix χ';
将所述矩阵 x' 按行生成 8组第二向量, 对所述 8组向量依次进行一 维反变换, 得到矩阵 X";  The matrix x' is generated into eight sets of second vectors in rows, and the eight sets of vectors are sequentially inversely transformed in one dimension to obtain a matrix X";
将所述矩阵 X"中的元素进行右移 w位移位处理, 其中 w为正整数。 本发明实施例提供的另一种应用于视频和图像处理的变换方法,包括 8x8 离散余弦变换: The elements in the matrix X" are shifted right by w bit shifting, where w is a positive integer. Another transform method applied to video and image processing provided by an embodiment of the present invention includes an 8x8 discrete cosine transform:
将 8x8的输入数据块 y中的元素进行左移 r位的移位操作,得到矩阵 y' , r为正整数;  Shifting the elements in the 8x8 input data block y to the left by r bits to obtain the matrix y', where r is a positive integer;
将所述矩阵 y' 按行生成 8组第一向量, 对所述 8组向量依次进行一 维正变换, 得到矩阵 y";  The matrix y' is generated into eight sets of first vectors in a row, and the eight sets of vectors are sequentially subjected to one-dimensional forward transform to obtain a matrix y";
将所述矩阵 y"按行生成 8组第二向量, 对所述 8组向量依次进行一 维正变换, 得到矩阵 y",;  The matrix y" is generated into eight sets of second vectors in rows, and the eight sets of vectors are sequentially subjected to one-dimensional forward transform to obtain a matrix y";
将经所述一维正变换后得到的输出矩阵中元素进行右移 z位的移位 操作得到矩阵 Y, 其中 z为正整数。  The shifting operation of the elements in the output matrix obtained by the one-dimensional forward transform to the right by z bits yields a matrix Y, where z is a positive integer.
本发明实施例提供的一种应用于视频和图像处理的变换处理装置, 用于实现 8x8反离散余弦变换, 该装置包括:  A transform processing apparatus for video and image processing is provided for implementing an 8x8 inverse discrete cosine transform, and the apparatus includes:
预处理单元, 使用一个预先设定的 8x8的整数矩阵 M与 8x8的输入 数据块相乘得到 8x8的矩阵 X;  The preprocessing unit multiplies an 8x8 integer matrix M by a predetermined 8x8 input data block to obtain an 8x8 matrix X;
第一反变换单元, 将所述矩阵 X按行生成 8组第一向量, 对所述 8 组向量依次进行一维反变换, 得到矩阵 x,;  a first inverse transform unit, generating, by the matrix X, eight sets of first vectors, and sequentially performing one-dimensional inverse transform on the eight sets of vectors to obtain a matrix x;
第二反变换单元, 将所述矩阵 x, 按行生成 8组第二向量, 对所述 8 组向量依次进行一维反变换, 得到矩阵 X" ;  a second inverse transform unit, which generates eight sets of second vectors by rows, and sequentially performs one-dimensional inverse transform on the eight sets of vectors to obtain a matrix X";
后处理单元, 将所述矩阵 X"中的元素进行右移 w位移位处理, 其中 w为正整数。  The post-processing unit performs the right shift w bit shifting of the elements in the matrix X", where w is a positive integer.
本发明实施例提供的另一种应用于视频和图像处理的变换处理装 置, 用于实现 8x8离散余弦变换, 包括;  Another transform processing apparatus applied to video and image processing according to an embodiment of the present invention is used to implement an 8x8 discrete cosine transform, including:
预处理单元,将 8x8的输入数据块 y中的元素进行左移 r位的移位操 作, 得到矩阵 Y,, r为正整数;  The preprocessing unit shifts the elements in the 8x8 input data block y to the left by r bits to obtain a matrix Y, and r is a positive integer;
正变换单元, 将经预处理后得到的矩阵 Y, 按列排成 8组向量, 在 分别对每一组向量处理过程中进行乘法运算时使用至少 6 个不同的乘法 系数 β、 b、 c、 d、 h、 ί进行运算;  The positive transform unit uses the matrix Y obtained by the pre-processing to be arranged into eight sets of vectors in columns, and uses at least six different multiplication coefficients β, b, c, respectively, when performing multiplication in each set of vector processing. d, h, ί perform operations;
后处理单元, 将经所述一维正变换后得到的输出矩阵中元素进行右 移 ζ位的移位操作, 其中 ζ为正整数。 本发明为应用于视频和图像处理的反变换及正变换方法, 能很好地 逼近理想的 8 x 8反离散余弦变换及理想的 8 x 8 离散余弦变换, 精度上 远远超过现有 DCT/IDCT 的要求, 同时在硬件实现上复杂度大大降低, 并能应用在多种现有流行的国际视频编解码标准。 其反变换预处理过程 可以结合视频压缩解码的反量化, 进一步降低复杂度。 The post-processing unit performs a right shifting operation of the elements in the output matrix obtained by the one-dimensional forward transform, where ζ is a positive integer. The invention is applied to the inverse transform and forward transform method of video and image processing, and can well approximate the ideal 8 x 8 inverse discrete cosine transform and the ideal 8 x 8 discrete cosine transform, and the precision far exceeds the existing DCT/ The requirements of IDCT, at the same time, the complexity of hardware implementation is greatly reduced, and can be applied to a variety of existing popular international video codec standards. The inverse transform preprocessing process can be combined with the inverse quantization of video compression decoding to further reduce the complexity.
附图说明 DRAWINGS
为了更清楚地说明本发明实施例或现有技术中的技术方案, 下面将 对实施例或现有技术描述中所需要使用的附图作简单地介绍, 显而易见 地, 下述附图是本发明的一些实施例, 本领域普通技术人员在不付出创 造性劳动性的前提下, 可根据这些附图获得其他的附图。  In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the embodiments or the description of the prior art will be briefly described below. Obviously, the following drawings are the present invention. Some of the embodiments may be obtained by those of ordinary skill in the art without departing from the drawings.
图 1为本发明实施例应用于视频和图像处理的反变换方法流程图; 图 2为本发明实施例应用于视频和图像处理的正变换方法流程图; 图 3为 本发明实施例 8x8反离散余弦变换的一维反变换的流程图; 图 4为本发明实施例 8x8离散余弦变换的一维正变换的流程图。 具体实施方式  1 is a flowchart of an inverse transform method applied to video and image processing according to an embodiment of the present invention; FIG. 2 is a flowchart of a forward transform method applied to video and image processing according to an embodiment of the present invention; FIG. 3 is an 8x8 inverse discrete embodiment of the present invention. Flowchart of one-dimensional inverse transformation of cosine transform; Figure 4 is a flow chart of one-dimensional forward transform of an 8x8 discrete cosine transform according to an embodiment of the present invention. detailed description
下面将结合本发明实施例中的附图, 对本发明实施例中的技术方案 进行清楚、 完整地描述, 显然, 所描述的实施例仅是本发明一部分实施 例, 而不是全部的实施例。 基于实施例, 本领域普通技术人员在未做出 创造性劳动前提下所获得的所有其他实施例 , 都属于本发明保护的范围。  The technical solutions in the embodiments of the present invention are clearly and completely described in the following with reference to the accompanying drawings in the embodiments of the present invention. It is obvious that the described embodiments are only a part of the embodiments of the present invention, but not all of the embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments without departing from the inventive scope are the scope of the invention.
实施例一  Embodiment 1
本实施例提供的一种应用于视频和图像处理的变换方法, 其包括的 8x8反离散余弦变换中的反变换预处理步骤中的 8x8矩阵 M是:  A transform method applied to video and image processing provided by this embodiment includes an 8x8 matrix M in the inverse transform preprocessing step of the 8x8 inverse discrete cosine transform:
A B C D A D C B A B C D A D C B
B E F G B G F EB E F G B G F E
C F H I C I H FC F H I C I H F
D G I J D J I GD G I J D J I G
A B C D A D C BA B C D A D C B
D G I J D J I GD G I J D J I G
C F H I C I H FC F H I C I H F
B E F G B G F E 取联系参数 =10, k=\2, Ψ = 1.3522468075656300,BEFGBGFE Take the contact parameter =10, k=\2, Ψ = 1.3522468075656300,
^ =0.9596162302465070可以得到: ^ =0.9596162302465070 can get:
^4=1024.0000000000000000, 5=757.2582122367510000,  ^4=1024.0000000000000000, 5=757.2582122367510000,
C=1067.0932480341200000,, =1070.9248339636200000 , C=1067.0932480341200000,, =1070.9248339636200000,
=560.0000000000000000 , =789.1260989220920000 ,  =560.0000000000000000 , =789.1260989220920000 ,
G=791.9595949289330000, H=\ 112.0000000000000000 ,  G=791.9595949289330000, H=\ 112.0000000000000000,
7=1115.9928315182000000 , J=l 120.0000000000000000;  7=1115.9928315182000000, J=l 120.0000000000000000;
ax2n = 5432.3763787064400000 , bx212 = 1080.5668459858300000 , cx212 = 4605.3463196628800000, ίχ212 = 3077.1940310190000000, 2 212 = 2127.2189396844700000,
Figure imgf000007_0001
5135.5608143231700000. 取^ =1024, Β=Ί5Ί, C=1067, =1071, =560, =789, G=792, 77=1112,
Figure imgf000007_0002
Ax2 n = 5432.3763787064400000 , bx2 12 = 1080.5668459858300000 , cx2 12 = 4605.3463196628800000, χ 2 12 = 3077.1940310190000000, 2 2 12 = 2127.2189396844700000,
Figure imgf000007_0001
5135.5608143231700000. Take ^ = 1024, Β=Ί5Ί, C=1067, =1071, =560, =789, G=792, 77=1112,
Figure imgf000007_0002
2=2128/4096, i=5136/4096。  2=2128/4096, i=5136/4096.
本实施例中所述的应用于视频和图像处理的反离散余弦变换方法, 其详细步骤如下:  The inverse discrete cosine transform method applied to video and image processing described in this embodiment has the following detailed steps:
1、 将输入数据 8x8数据块 X,做操作 I得到反变换预处理的输出数
Figure imgf000007_0003
其中 Λ ·][/Ί表示矩阵 M中第(zj) 个元素;
1. Input data 8x8 data block X, do operation I to get the inverse transform preprocessed output number
Figure imgf000007_0003
Where Λ ·][/Ί represents the (zj)th element in the matrix M;
2、 进行第一次一维反变换, 步骤如下:  2. Perform the first one-dimensional inverse transformation. The steps are as follows:
将 X按行排成 8组向量,将第一组向量( [0][0], [0][1],···, [0][7])作为 输入, 进行如下运算:  Arrange X into 8 groups of vectors, and take the first set of vectors ([0][0], [0][1], ···, [0][7]) as input, and perform the following operations:
ρ10= [0][0], ρ14= [0][4], ρ\2=Χ[0][2], ρ\6=Χ[0][6],  Ρ10= [0][0], ρ14= [0][4], ρ\2=Χ[0][2], ρ\6=Χ[0][6],
ρ17= [0][1]- [0][7], ρ13= [0][3], ρ\5=Χ[0][5], pll= [0][l]+ [0][7]; ρ20=ρ10+ρ14, ρ24=ρ10-ρ14, p22=pl2*h-pl6*t, p26=pl6*h+pl2*t, ρ27=ρ15+ρ17, p23=pll-pl3, ρ25=ρ17-ρ15, p21=pll+pl3;  Ρ17= [0][1]- [0][7], ρ13= [0][3], ρ\5=Χ[0][5], pll= [0][l]+ [0][ 7]; ρ20=ρ10+ρ14, ρ24=ρ10-ρ14, p22=pl2*h-pl6*t, p26=pl6*h+pl2*t, ρ27=ρ15+ρ17, p23=pll-pl3, ρ25=ρ17 -ρ15, p21=pll+pl3;
ρ30=ρ20+ρ26, ρ34=ρ24+ρ22, ρ32=ρ24-ρ22, ρ36=ρ20-ρ26, p37=p27*c-p21*d, p33=p23*a-p25*b, ρ35=ρ23 *b+p25 *a , p31=p21*c+p27*d;Ρ30=ρ20+ρ26, ρ34=ρ24+ρ22, ρ32=ρ24-ρ22, ρ36=ρ20-ρ26, p37=p27*c-p21*d, p33=p23*a-p25*b, ρ35=ρ23 *b+ P25 *a , P31=p21*c+p27*d;
'[0][0]=p30+p31, '[l][0]=p34+p35, '[2][0]=p32+p33, '[3][0]=p36+p37, '[4][0]=p36-p37, '[5][0]=p32-p33, '[6][0]=p34-p35, '[7][0]=p30-p31; 其中 *表示乘法操作;  '[0][0]=p30+p31, '[l][0]=p34+p35, '[2][0]=p32+p33, '[3][0]=p36+p37, '[ 4][0]=p36-p37, '[5][0]=p32-p33, '[6][0]=p34-p35, '[7][0]=p30-p31; where * means multiplication Operation
3、重复步骤 2, ( [1][0], [1][1],···, [1][7]), ( [2][0], [2][1],···, [2][7]), 3. Repeat step 2, ( [1][0], [1][1],···, [1][7]), ( [2][0], [2][1],·· ·, [2][7]),
( [3][0], [3][1],···, [3][7]) , ( [4][0], [4][1],···, [4][7]) , ([3][0], [3][1],···, [3][7]) , ( [4][0], [4][1],···, [4][ 7]),
( [5][0], [5][1],···, [5][7]) , ( [6][0], [6][1],···, [6][7]) , ([5][0], [5][1],···, [5][7]) , ( [6][0], [6][1],···, [6][ 7]),
( [η[ο], [7][ι],···, [7][η)依次进行相同的一维反变换,得到第一次一维反 变换输出 X'; ([η[ο], [ 7 ][ι],···, [ 7 ][η) sequentially perform the same one-dimensional inverse transformation to obtain the first one-dimensional inverse transform output X';
4、 进行第二次一维反变换, 步骤如下:  4. Perform the second one-dimensional inverse transformation. The steps are as follows:
将 X,按行排成 8组向量, 将第一组向量 (χ'[0][0],χ'[0][1],···,χ'[0][7])作为 输入, 进行如下运算:  Arrange X, by row into 8 sets of vectors, and take the first set of vectors (χ'[0][0], χ'[0][1], ···, χ'[0][7]) as input , do the following:
ρ10= '[0][0], ρ14= '[0][4], ρ12= '[0][2], ρ16= '[0][6], Ρ10= '[0][0], ρ14= '[0][4], ρ12= '[0][2], ρ16= '[0][6],
ρ17= '[0][1]- '[0][7], ρ13= '[0][3], ρ15= '[0][5], pll= '[0][1]+ '[0][7]; ρ20=ρ10+ρ14, ρ24=ρ10-ρ14, p22=pl2*h-pl6*t, p26=pl6*h+pl2*t, ρ27=ρ15+ρ17, p23=pll-pl3, ρ25=ρ17-ρ15, p21=pll+pl3; 1717= '[0][1]- '[0][7], ρ13= '[0][3], ρ15= '[0][5], pll= '[0][1]+ '[ 0][7]; ρ20=ρ10+ρ14, ρ24=ρ10-ρ14, p22=pl2*h-pl6*t, p26=pl6*h+pl2*t, ρ27=ρ15+ρ17, p23=pll-pl3, 2525=ρ17-ρ15, p21=pll+pl3;
ρ30=ρ20+ρ26, ρ34=ρ24+ρ22, ρ32=ρ24-ρ22, ρ36=ρ20-ρ26, Ρ30=ρ20+ρ26, ρ34=ρ24+ρ22, ρ32=ρ24-ρ22, ρ36=ρ20-ρ26,
p37=p27*c-p21*d, p33=p23*a-p25*b, ρ35=ρ23 *b+p25 *a , P37=p27*c-p21*d, p33=p23*a-p25*b, ρ35=ρ23 *b+p25 *a ,
p31=p21*c+p27*d; P31=p21*c+p27*d;
χ"[0][0]=ρ30+ρ31, χ"[1][0]=ρ34+ρ35,
Figure imgf000008_0001
χ"[0][0]=ρ30+ρ31, χ"[1][0]=ρ34+ρ35,
Figure imgf000008_0001
χ"[3][0]=ρ36+ρ37, χ"[4][0]=ρ36-ρ37, χ"[5][0]=ρ32-ρ33, χ"[6][0]=ρ34-ρ35,
Figure imgf000008_0002
χ"[3][0]=ρ36+ρ37, χ"[4][0]=ρ36-ρ37, χ"[5][0]=ρ32-ρ33, χ"[6][0]=ρ34- Ρ35,
Figure imgf000008_0002
5、重复步骤 4,将(Χ'[1][0],Χ'[1][1],···,Χ'[1][7]),(Χ'[2][0],Χ'[2][1],···,Χ'[2][7]), (χ'[3][0],χ'[3][1],···,χ'[3][7]) , (Χ'[4][0],Χ'[4][1],···,Χ'[4][7]) ,  5. Repeat step 4 to set (Χ'[1][0],Χ'[1][1],···,Χ'[1][7]),(Χ'[2][0], Χ'[2][1],···,Χ'[2][7]), (χ'[3][0],χ'[3][1],···,χ'[3 ][7]) , (Χ'[4][0],Χ'[4][1],···,Χ'[4][7]),
(Χ'[5][0],Χ'[5][1],···,Χ'[5][7]) , (χ'[6][0],χ'剛,… ,χ'[6][7]) , (Χ'[5][0],Χ'[5][1],···,Χ'[5][7]) , (χ'[6][0],χ' just,...,χ '[6][7]) ,
(χ'[η[ο],χ'[7][ι] ··,χ'[7][η)进行相同的一维反变换, 得到第二次一维反变换 输出 X"; (χ'[η[ο],χ'[ 7 ][ι] ··,χ'[ 7 ][η) performs the same one-dimensional inverse transformation to obtain the second one-dimensional inverse transformation output X";
6、将所得的第二次一维反变换后的输出 X"进行后处理右移 w位得到 8x8 反离散余弦变换的输出 X , 其中 w=13 , 操作如下: x[v][w] = x"[v][w]»13 v, we [0,63], >>表示右移位操作, 反之, 《表示左移 位操作。 实施例二 6. The obtained output of the second one-dimensional inverse transform X" is post-processed and shifted by w bits to obtain the output X of the 8x8 inverse discrete cosine transform, where w=13, the operation is as follows: x[v][w] = x"[v][w]»13 v, we [0,63], >> denotes a right shift operation, and conversely, "represents a left shift operation."
一种应用于视频和图像处理的变换方法, 其包括的 8x8反离散余弦 变换中的反变换预处理步骤中的 8x8矩阵 M是:  A transform method applied to video and image processing, which includes an 8x8 matrix M in an inverse transform preprocessing step of an 8x8 inverse discrete cosine transform:
A B C D A D C BA B C D A D C B
B E F G B G F EB E F G B G F E
C F H I C I H FC F H I C I H F
D G I J D J I GD G I J D J I G
A B C D A D C BA B C D A D C B
D G I J D J I GD G I J D J I G
C F H I C I H FC F H I C I H F
B E F G B G F E 取联系参数 =10, k=U, ^ =0.9000703207408190, = B E F G B G F E Take contact parameters =10, k=U, ^ =0.9000703207408190, =
0.5918825969335950可以得到:  0.5918825969335950 can get:
^4=1024.0000000000000000, 5=1137.6888854164000000,  ^4=1024.0000000000000000, 5=1137.6888854164000000,
C=1730.0728308369000000, =1608.9350515170000000, C=1730.0728308369000000, =1608.9350515170000000,
£=1264.0000000000000000 , =1922.1529595742400000, £=1264.0000000000000000 , =1922.1529595742400000,
G=1787.5659428395900000, 77=2923.0000000000000000, G=1787.5659428395900000, 77=2923.0000000000000000,
7=2718.3347843854700000, J=2528.0000000000000000;7=2718.3347843854700000, J=2528.0000000000000000;
Figure imgf000009_0001
719.2371556781520000, cx212 = 3065.3690701062000000, ί 212 =2048.2141299835100000, hx2l2= 1312.0493699271300000, ί 212 = 3167.5673833811500000, 取^ =1024, β=1138, C=1730, =1609, £=1264, =1922, G=l 788, 77=2923,
Figure imgf000009_0002
Figure imgf000009_0001
719.2371556781520000, cx2 12 = 3065.3690701062000000, ί 2 12 =2048.2141299835100000, hx2 l2 = 1312.0493699271300000, ί 2 12 = 3167.5673833811500000, take ^ =1024, β=1138, C=1730, =1609, £=1264, =1922, G=l 788, 77=2923,
Figure imgf000009_0002
2=1312/4096, i=3168/4096 所述的应用于视频和图像处理的反离散余弦变换方法, 其详细步骤 下: 1、 将待变换的 8x8数据 X,做反变换预处理得到反变换预处理的输
Figure imgf000010_0001
2、 进行第一次一维反变换, 步骤如下:
2=1312/4096, i=3168/4096 The inverse discrete cosine transform method applied to video and image processing, with detailed steps: 1. The 8x8 data X to be transformed is subjected to inverse transform preprocessing to obtain the inverse transform preprocessed input.
Figure imgf000010_0001
2. Perform the first one-dimensional inverse transformation. The steps are as follows:
将 X按行排成 8组向量,将第一行向量 ( [ο][ο], [ο][ι],···, [ο][η)作为输入, 进行^口下运算: Arrange the X rows into 8 groups of vectors, and take the first row vector ( [ο][ο], [ο][ι],···, [ο][η) as input, and perform the ^ mouth operation:
ρ10= [0][0], ρ14= [0][4], ρ\2=Χ[0][2], ρ\6=Χ[0][6],  Ρ10= [0][0], ρ14= [0][4], ρ\2=Χ[0][2], ρ\6=Χ[0][6],
ρ17= [0][1]- [0][7], ρ13= [0][3], ρ\5=Χ[0][5], pll= [0][l]+ [0][7]; ρ20=ρ10+ρ14, ρ24=ρ10-ρ14, p22=pl2〇h-pl6〇t,  Ρ17= [0][1]- [0][7], ρ13= [0][3], ρ\5=Χ[0][5], pll= [0][l]+ [0][ 7]; ρ20=ρ10+ρ14, ρ24=ρ10-ρ14, p22=pl2〇h-pl6〇t,
p26=pl60h+pl20t, ρ27=ρ15+ρ17, p23=pll-pl3, ρ25=ρ17-ρ15, p21=pll+pl3;  P26=pl60h+pl20t, ρ27=ρ15+ρ17, p23=pll-pl3, ρ25=ρ17-ρ15, p21=pll+pl3;
ρ30=ρ20+ρ26, ρ34=ρ24+ρ22, ρ32=ρ24-ρ22, ρ36=ρ20-ρ26, p37=p27〇c-p21〇d, p33=p23〇a-p25〇b, p35=p23〇b+p25〇a, p31=p21〇c+p27〇d; 3030=ρ20+ρ26, ρ34=ρ24+ρ22, ρ32=ρ24-ρ22, ρ36=ρ20-ρ26, p37=p27〇c-p21〇d, p33=p23〇a-p25〇b, p35=p23〇b+ P25〇a, p31=p21〇c+p27〇d;
'[0][0]=p30+p31, '[l][0]=p34+p35, '[2][0]=p32+p33, '[3][0]=p36+p37, '[4][0]=p36-p37, '[5][0]=p32-p33, '[6][0]=p34-p35, '[7][0]=p30-p31 其中的〇表示用加(减) 法、 移位实现乘法操作, 定义如下:  '[0][0]=p30+p31, '[l][0]=p34+p35, '[2][0]=p32+p33, '[3][0]=p36+p37, '[ 4][0]=p36-p37, '[5][0]=p32-p33, '[6][0]=p34-p35, '[7][0]=p30-p31 where 〇 indicates Add (subtract) method, shift to achieve multiplication operation, defined as follows:
x0a=l-(x»3) + (x»7);  X0a=l-(x»3) + (x»7);
x0b=(x»3) - (x»7) + (((x»3) - (x»7)-(x»ll))»l)  X0b=(x»3) - (x»7) + (((x»3) - (x»7)-(x»ll))»l)
x0h= ((x+(x»5))»2) +(x»4)  X0h= ((x+(x»5))»2) +(x»4)
x0t= x+(x»5) - ((x+(x»5))»2)  X0t= x+(x»5) - ((x+(x»5))»2)
x0d=x»2  X0d=x»2
x0c=(((x»9)-x)»2)- ((x»9)-x) 3、重复步骤 2, ( [1][0], [1][1],···, [1][7]) , ( [2][0], [2][1] ,-,Χ[2][7]), X0c=(((x»9)-x)»2)- ((x»9)-x) 3. Repeat step 2, ( [1][0], [1][1],···, [1][7]) , ( [2][0], [2][1] ,-,Χ[2][7]),
( [3][0], [3][1],···, [3][7]) , ( [4][0], [4][1],···, [4][7]) , ([3][0], [3][1],···, [3][7]) , ( [4][0], [4][1],···, [4][ 7]),
( [5][0], [5][1],···, [5][7]) , ( [6][0], [6][1],···, [6][7]) , ([5][0], [5][1],···, [5][7]) , ( [6][0], [6][1],···, [6][ 7]),
( [7][ο], [7][ι],···, [7][η)进行相同的一维反变换,得到第一次一维反变换 输出 Χ'; ([ 7 ][ο], [ 7 ][ι],···, [ 7 ][η) perform the same one-dimensional inverse transformation to get the first one-dimensional inverse transformation Output Χ';
4、 进行第二次一维反变换, 步骤如下: 4. Perform the second one-dimensional inverse transformation. The steps are as follows:
将 X,按行排成 8组向量, 将第一行向量 (χ'[0][0],χ'[0][1],···,χ'[0][7])作为 输入, 进行如下运算:  Arrange X, by row into 8 sets of vectors, and take the first row vector (χ'[0][0], χ'[0][1],···,χ'[0][7]) as input , do the following:
ρ10= '[0][0], ρ14= '[0][4], ρ12= '[0][2], ρ16= '[0][6],  Ρ10= '[0][0], ρ14= '[0][4], ρ12= '[0][2], ρ16= '[0][6],
ρ17= '[0][1]- '[0][7], ρ13= '[0][3], ρ15= '[0][5],  Ρ17= '[0][1]- '[0][7], ρ13= '[0][3], ρ15= '[0][5],
pll= '[0][l]+ '[0][7];  Pll= '[0][l]+ '[0][7];
ρ20=ρ10+ρ14, ρ24=ρ10-ρ14, p22=pl2〇h-pl6〇t,  2020=ρ10+ρ14, ρ24=ρ10-ρ14, p22=pl2〇h-pl6〇t,
p26=pl60h+pl20t, ρ27=ρ15+ρ17, p23=pll-pl3, ρ25=ρ17-ρ15, p21=pll+pl3;  P26=pl60h+pl20t, ρ27=ρ15+ρ17, p23=pll-pl3, ρ25=ρ17-ρ15, p21=pll+pl3;
ρ30=ρ20+ρ26, ρ34=ρ24+ρ22, ρ32=ρ24-ρ22, ρ36=ρ20-ρ26, p37=p27〇c-p21〇d, p33=p23〇a-p25〇b, p35=p23〇b+p25〇a, p31=p21〇c+p27〇d;  3030=ρ20+ρ26, ρ34=ρ24+ρ22, ρ32=ρ24-ρ22, ρ36=ρ20-ρ26, p37=p27〇c-p21〇d, p33=p23〇a-p25〇b, p35=p23〇b+ P25〇a, p31=p21〇c+p27〇d;
x"[0][0]=p30+p31, x"[l][0]=p34+p35, x"[2][0]=p32+p33,  x"[0][0]=p30+p31, x"[l][0]=p34+p35, x"[2][0]=p32+p33,
x"[3][0]=p36+p37, x"[4][0]=p36-p37, x"[5][0]=p32-p33,  x"[3][0]=p36+p37, x"[4][0]=p36-p37, x"[5][0]=p32-p33,
x"[6][0]=p34-p35, x"[7][0]=p30-p31  x"[6][0]=p34-p35, x"[7][0]=p30-p31
其中的〇操作定义与步骤 2中的定义相同;  The definition of the operation is the same as the definition in step 2;
5、重复步骤 4,将(Χ'[1][0],Χ'[1][1],···,Χ'[1][7]),(Χ'[2][0],Χ'[2][1] ··,Χ'[2][7]), (χ'[3][0],χ'[3][1],···,χ'[3][7]) , (Χ'[4][0],Χ'[4][1],···,Χ'[4][7]) , 5. Repeat step 4 to set (Χ'[1][0],Χ'[1][1],···,Χ'[1][7]),(Χ'[2][0], Χ'[2][1] ··,Χ'[2][7]), (χ'[3][0],χ'[3][1],···,χ'[3][ 7]) , (Χ'[4][0],Χ'[4][1],···,Χ'[4][7]),
(Χ'[5][0],Χ'[5][1],···,Χ'[5][7]) , (Χ'[6][0],Χ'剛,… ,χ'[6][7]) , (Χ'[5][0],Χ'[5][1],···,Χ'[5][7]) , (Χ'[6][0],Χ' just,...,χ '[6][7]) ,
(χ'[η[ο],χ'[7][ι] ··,χ'[7][η)进行相同的一维反变换, 得到第二次一维反变换 输出 X"; (χ'[η[ο],χ'[ 7 ][ι] ··,χ'[ 7 ][η) performs the same one-dimensional inverse transformation to obtain the second one-dimensional inverse transformation output X";
6、 将所得的第二次一维变换后的输出 X"进行后处理右移 w位得到 8x8反离散余弦变换的输出 X, 其中 w=13, 步骤如下:  6. The output of the second one-dimensional transformed output X" is post-processed to the right by w bits to obtain the output X of the 8x8 inverse discrete cosine transform, where w=13, the steps are as follows:
x[v][w] = x"[v][w]»13 v,we[0,63]。 实施例三  x[v][w] = x"[v][w]»13 v,we[0,63].
一种应用于视频和图像处理的变换方法, 其包括的 8x8反离散余弦 变换中的反变换预处理步骤中的 8x8矩阵 M是: A B C D A D C B A transform method applied to video and image processing, which includes an 8x8 matrix M in an inverse transform preprocessing step in an 8x8 inverse discrete cosine transform: ABCDADCB
B E F G B G F E B E F G B G F E
C F H I C I H FC F H I C I H F
D G I J D J I GD G I J D J I G
A B C D A D C BA B C D A D C B
D G I J D J I GD G I J D J I G
C F H I C I H FC F H I C I H F
B E F G B G F E 取联系参数 =10, k=\2, B E F G B G F E take contact parameters =10, k=\2,
Ψ = 0.9000703207408190, = 0.5918825969335950可以得到: Ψ = 0.9000703207408190, = 0.5918825969335950 can get:
^4=1024.0000000000000000, 5=1137.6888854164000000, ^4=1024.0000000000000000, 5=1137.6888854164000000,
C=1730.0728308369000000, =1608.9350515170000000,  C=1730.0728308369000000, =1608.9350515170000000,
£=1264.0000000000000000 , =1922.1529595742400000,  £=1264.0000000000000000 , =1922.1529595742400000,
G=1787.5659428395900000, 77=2923.0000000000000000,  G=1787.5659428395900000, 77=2923.0000000000000000,
7=2718.3347843854700000, J=2528.0000000000000000; 7=2718.3347843854700000, J=2528.0000000000000000;
Figure imgf000012_0001
719.2371556781520000, cx212 = 3065.3690701062000000, ί 212 =2048.2141299835100000, hx2l2= 1312.0493699271300000, ί 212 = 3167.5673833811500000. 取^ =1024, β=1138, C=1730, =1609, =1264, =1922, G=1788, 77=2923, 7=2718, J=2528, a=3616/4096, b=719/4096, c=3066/4096,
Figure imgf000012_0002
Figure imgf000012_0001
719.2371556781520000, cx2 12 = 3065.3690701062000000, ί 2 12 =2048.2141299835100000, hx2 l2 = 1312.0493699271300000, ί 2 12 = 3167.5673833811500000. Take ^ =1024, β=1138, C=1730, =1609, =1264, =1922, G=1788, 77=2923, 7=2718, J=2528, a=3616/4096, b=719/4096, c=3066/4096,
Figure imgf000012_0002
可以马全证, 由以上 { 、 B、 C、 D、 E、 F、 G、 H、 I、 J、 a、 b、 c、 d、 2、i }所构成的对应的 8x8反离散余弦变换方法符合 ISO/IEC 23002-1-2006 和以下 2条定义的精度要求:  The corresponding 8x8 inverse discrete cosine transform method consisting of the above { , B, C, D, E, F, G, H, I, J, a, b, c, d, 2, i } Accuracy requirements in accordance with ISO/IEC 23002-1-2006 and the following two definitions:
(a)对于 e [0,63], e [1,255], 产生 64个输入数据  (a) for e [0,63], e [1,255], yielding 64 input data
Ni ;[x/S][x%S] = N i ; [x/S][x%S] =
0, 其他  0, other
令8 8输入数据矩阵^,.;.=-^;.;将 Νί;^οΝ'ί;.分别进行由 { B、 C、 D、 E、 F、 G、 H、 I、 J、 a、 b、 c、 d、 h、 ί }所构成的 8x8反离散余弦变 换,得到两个输出块,将其相加得到 对 z, 取值范围内所有的组合, 所得到的 ^ 为全零; Let 8 8 input the data matrix ^, . ; .=-^ ; .; will Ν ί; ^οΝ'ί; . respectively by { B, C, D, E, F, G, H, I, J, a 8x8 inverse discrete cosine transform composed of b, c, d, h, ί } Change, get two output blocks, add them to get z, all combinations in the range of values, the resulting ^ is all zero;
(b)根据 ISO/IEC 23002-1-2006标准定义的随机数生成方法, 对 1000000组 [-1, +1]范围内的随机数,将这些随机数作为输入,对由 {^ 、 B、 C、 D、 E、 F、 G、 H、 I、 J、 a、 b、 c、 d、 h、 ί }所构成的 8x8反离散余 弦变换进行测试得到 omse = 0.000204, 小于 0.01。  (b) A random number generation method defined in accordance with the ISO/IEC 23002-1-2006 standard, for random numbers in the range 1,000,000 [-1, +1], these random numbers are taken as inputs, and {^, B, The 8x8 inverse discrete cosine transform composed of C, D, E, F, G, H, I, J, a, b, c, d, h, ί } is tested to obtain omse = 0.000204, less than 0.01.
所述的应用于视频和图像处理的反离散余弦变换方法,其详细步骤 下:  The inverse discrete cosine transform method applied to video and image processing has detailed steps:
1、 将待变换的 8x8数据 X,做反变换预处理得到反变换预处理的输 出: ΜΜ = ί '刚 XM[V][W] + 2121V = U = ° 1. The 8x8 data X to be transformed is inversely preprocessed to obtain the output of the inverse transform preprocessing: ΜΜ = ί 'just XM[V][W] + 2 121 , V = U = °
~ {X v][u]xM[v][u] ,其他  ~ {X v][u]xM[v][u] ,Other
2、 进行第一次一维反变换, 步骤如下: 将 X按行排成 8组向量, 将 第一行向量 ( [0][0], [0][1],···, [0][7])作为输入, 进行如下运算:  2. Perform the first one-dimensional inverse transformation. The steps are as follows: Arrange the X rows into 8 groups of vectors, and set the first row vector ([0][0], [0][1],···, [0 ][7]) As input, perform the following operations:
ρ10= [0][0], ρ14= [0][4], ρ12= [0][2], ρ16= [0][6],  Ρ10= [0][0], ρ14= [0][4], ρ12= [0][2], ρ16= [0][6],
ρ17= [0][1]- [0][7], ρ13= [0][3], ρ15= [0][5], pll= [0][l]+ [0][7]; ρ20=ρ10+ρ14, ρ24=ρ10-ρ14, p22=pl2〇h-pl6〇t,  Ρ17= [0][1]- [0][7], ρ13= [0][3], ρ15= [0][5], pll= [0][l]+ [0][7]; 2020=ρ10+ρ14, ρ24=ρ10-ρ14, p22=pl2〇h-pl6〇t,
p26=pl60h+pl20t, ρ27=ρ15+ρ17, p23=pll-pl3, ρ25=ρ17-ρ15, p21=pll+pl3;  P26=pl60h+pl20t, ρ27=ρ15+ρ17, p23=pll-pl3, ρ25=ρ17-ρ15, p21=pll+pl3;
ρ30=ρ20+ρ26, ρ34=ρ24+ρ22, ρ32=ρ24-ρ22, ρ36=ρ20-ρ26, p37=p27〇c-p21〇d, p33=p23〇a-p25〇b, p35=p23〇b+p25〇a, p31=p21〇c+p27〇d; 3030=ρ20+ρ26, ρ34=ρ24+ρ22, ρ32=ρ24-ρ22, ρ36=ρ20-ρ26, p37=p27〇c-p21〇d, p33=p23〇a-p25〇b, p35=p23〇b+ P25〇a, p31=p21〇c+p27〇d;
'[0][0]=p30+p31, '[l][0]=p34+p35, '[2][0]=p32+p33, '[3][0]=p36+p37, '[4][0]=p36-p37, '[5][0]=p32-p33, '[6][0]=p34-p35, '[7][0]=p30-p31 其中的〇操作定义如下:  '[0][0]=p30+p31, '[l][0]=p34+p35, '[2][0]=p32+p33, '[3][0]=p36+p37, '[ 4][0]=p36-p37, '[5][0]=p32-p33, '[6][0]=p34-p35, '[7][0]=p30-p31 where 〇 operation definition as follows:
x0a=l-(x»3) + (x»7);  X0a=l-(x»3) + (x»7);
x0b=(x»3) - (x»7) + (((x»3) - (x»7)-(x»ll))»l)  X0b=(x»3) - (x»7) + (((x»3) - (x»7)-(x»ll))»l)
x0h= ((x+(x»5))»2) +(x»4)  X0h= ((x+(x»5))»2) +(x»4)
x0t= x+(x»5) - ((x+(x»5))»2)
Figure imgf000014_0001
X0t= x+(x»5) - ((x+(x»5))»2)
Figure imgf000014_0001
x0c=(((x»9)-x)»2)- ((x»9)-x);  X0c=(((x»9)-x)»2)- ((x»9)-x);
3、重复步骤 2, ( [1][0], [1][1],···, [1][7]), ( [2][0], [2][1],···, [2][7]), ( [3][0], [3][1],···, [3][7]) , ( [4][0], [4][1],···, [4][7]) ,  3. Repeat step 2, ( [1][0], [1][1],···, [1][7]), ( [2][0], [2][1],·· ·, [2][7]), ( [3][0], [3][1],···, [3][7]) , ( [4][0], [4][1 ],···, [4][7]) ,
( [5][0], [5][1],···, [5][7]) , ( [6][0], [6][1],···, [6][7]) , ([5][0], [5][1],···, [5][7]) , ( [6][0], [6][1],···, [6][ 7]),
( [η[ο], [7][ι],···, [7][η)进行相同的一维反变换,得到第一次一维反变换 输出 χ'; ([η[ο], [ 7 ][ι],···, [ 7 ][η) performs the same one-dimensional inverse transformation to obtain the first one-dimensional inverse transformation output χ';
4、 进行第二次一维反变换, 步骤如下:  4. Perform the second one-dimensional inverse transformation. The steps are as follows:
将 X,按行排成 8组向量,将第一行向量 ( X '[0] [0], X '[0] [1], ···, X '[0] [7])作为输入, 进行如下运算: Arrange X, by row into 8 sets of vectors, and take the first row vector (X '[0] [0], X '[0] [1], ···, X '[0] [7]) as input , do the following:
ρ10= '[0][0], ρ14= '[0][4], ρ12= '[0][2], ρ16= '[0][6],  Ρ10= '[0][0], ρ14= '[0][4], ρ12= '[0][2], ρ16= '[0][6],
ρ17= '[0][1]- '[0][7], ρ13= '[0][3], ρ15= '[0][5],  Ρ17= '[0][1]- '[0][7], ρ13= '[0][3], ρ15= '[0][5],
pll= '[0][l]+ '[0][7];  Pll= '[0][l]+ '[0][7];
ρ20=ρ10+ρ14, ρ24=ρ10-ρ14, p22=pl2〇h-pl6〇t,  2020=ρ10+ρ14, ρ24=ρ10-ρ14, p22=pl2〇h-pl6〇t,
p26=pl60h+pl20t, ρ27=ρ15+ρ17, p23=pll-pl3, ρ25=ρ17-ρ15, p21=pll+pl3;  P26=pl60h+pl20t, ρ27=ρ15+ρ17, p23=pll-pl3, ρ25=ρ17-ρ15, p21=pll+pl3;
ρ30=ρ20+ρ26, ρ34=ρ24+ρ22, ρ32=ρ24-ρ22, ρ36=ρ20-ρ26, p37=p27〇c-p21〇d, p33=p23〇a-p25〇b, p35=p23〇b+p25〇a, p31=p21〇c+p27〇d;  3030=ρ20+ρ26, ρ34=ρ24+ρ22, ρ32=ρ24-ρ22, ρ36=ρ20-ρ26, p37=p27〇c-p21〇d, p33=p23〇a-p25〇b, p35=p23〇b+ P25〇a, p31=p21〇c+p27〇d;
x"[0][0]=p30+p31, x"[l][0]=p34+p35, x"[2][0]=p32+p33, x"[0][0]=p30+p31, x"[l][0]=p34+p35, x"[2][0]=p32+p33,
x"[3][0]=p36+p37, x"[4][0]=p36-p37, x"[5][0]=p32-p33, x"[6][0]=p34-p35, x"[7][0]=p30-p31 x"[3][0]=p36+p37, x"[4][0]=p36-p37, x"[5][0]=p32-p33, x"[6][0]=p34- P35, x"[7][0]=p30-p31
其中的〇操作与 2中的相同;  The operation of 〇 is the same as in 2;
5、重复步骤 4,将(Χ'[1][0],Χ'[1][1],···,Χ'[1][7]),(Χ'[2][0],Χ'[2][1] ··,Χ'[2][7]), (Χ'[3][0],Χ'[3][1],···,Χ'[3][7]) , (Χ'[4][0],Χ'[4][1],···,Χ'[4][7]) ,  5. Repeat step 4 to set (Χ'[1][0],Χ'[1][1],···,Χ'[1][7]),(Χ'[2][0], Χ'[2][1] ··,Χ'[2][7]), (Χ'[3][0],Χ'[3][1],···,Χ'[3][ 7]) , (Χ'[4][0],Χ'[4][1],···,Χ'[4][7]),
(χ'[5][0],χ'[5][1],···,χ'[5][7]) , (Χ'[6][0],Χ'剛,… ,χ'[6][7]) ,  (χ'[5][0],χ'[5][1],···,χ'[5][7]) , (Χ'[6][0],Χ' just,...,χ '[6][7]) ,
(χ'[7][0],χ'[7][1] ··,χ'[7][η)进行相同的一维反变换, 得到第二次一维反变换 输出 X"; (χ'[ 7 ][0],χ'[ 7 ][1] ··,χ'[ 7 ][η) performs the same one-dimensional inverse transformation to obtain the second one-dimensional inverse transformation output X";
6、 将所得的第二次一维变换后的输出 X"进行后处理右移 w位得到 8x8反离散余弦变换的输出 x, 其中 w=13, 步骤如下: 6. The obtained output of the second one-dimensional transformed X" is post-processed and shifted right by w bits. The output x of the 8x8 inverse discrete cosine transform, where w=13, is as follows:
x[v][u] = x"[v][u]»\3 v,we [0,63]。 实施例四  x[v][u] = x"[v][u]»\3 v,we [0,63].
一种应用于视频和图像处理的变换方法, 其包括的 8x8离散余弦变 换中的变换后处理步骤中的 8x8矩阵 M是:  A transform method applied to video and image processing, which includes an 8x8 matrix M in a post-transformation processing step in an 8x8 discrete cosine transform:
A B C D A D C B A B C D A D C B
B E F G B G F EB E F G B G F E
C F H I C I H FC F H I C I H F
D G I J D J I GD G I J D J I G
A B C D A D C BA B C D A D C B
D G I J D J I GD G I J D J I G
C F H I C I H FC F H I C I H F
B E F G B G F E 取联系参数 =10, k=U, B E F G B G F E take contact parameters =10, k=U,
Ψ = 1.1812048201875100, ^=0.8012529373378150, 可以得到: Ψ = 1.1812048201875100, ^=0.8012529373378150, you can get:
^4=1024.0000000000000000, 5=866.9114640401220000, ^4=1024.0000000000000000, 5=866.9114640401220000,
C=1277.9984350538200000, =1225.9979498222600000,  C=1277.9984350538200000, =1225.9979498222600000,
£=733.9213735197150000, =1081.9448187241100000,  £=733.9213735197150000, =1081.9448187241100000,
G=1037.9215601470700000, 77=1595.0000000000000000,  G=1037.9215601470700000, 77=1595.0000000000000000,
7=1530.1010363789400000, J=1467.8427470394300000;  7=1530.1010363789400000, J=1467.8427470394300000;
ax2l4= 18981.0000000000000000, bx214 =3775.5556452332900000, cx214=16091.3148131935000000, ίχ214=10751.8728142102000000, 2 214 =7104.6752652150500000, t>2l4= 17152.2033815388000000. 取^ =1024, β=867, C=1278, =1226, £=734, =1082, G=1038, 77=1595, 7=1530, J=1468, «=18981/16384, b=3776/16384, c=16091/16384,
Figure imgf000015_0001
Ax2 l4 = 18981.0000000000000000, bx2 14 =3775.5556452332900000, cx2 14 =16091.3148131935000000, ίχ2 14 =10751.8728142102000000, 2 2 14 =7104.6752652150500000, t>2 l4 = 17152.2033815388000000. Take ^ =1024, β=867, C=1278, =1226, £ =734, =1082, G=1038, 77=1595, 7=1530, J=1468, «=18981/16384, b=3776/16384, c=16091/16384,
Figure imgf000015_0001
所述的应用于视频和图像处理的离散余弦变换方法, 其详细步骤如 下:  The discrete cosine transform method applied to video and image processing has the following detailed steps:
1、将待变换的 8x8数据 y做正变换预处理得到正变换预处理的输出: ''[V][M] = '[M][V] « 7, v,we[0,7]; 1. The 8x8 data y to be transformed is subjected to positive transform preprocessing to obtain the output of the forward transform preprocessing: ''[V][M] = '[M][V] « 7, v,we[0,7];
2、 进行第一次一维正变换, 步骤如下:  2. Perform the first one-dimensional positive transformation. The steps are as follows:
将 y,按列排成 8组向量,将第一列向量 Cy'[0][0],_y'[l][0],.i'[7][0]f作为 输入, 进行如下运算:  Arrange y, arranged into 8 groups of vectors by column, and take the first column vector Cy'[0][0], _y'[l][0], .i'[7][0]f as input, and perform the following operations :
ql0=y,[0][0]+y,[l][0], ql4=y,[l][0]+y,[6][0], ql2=y'[2][0]+y'[5][0], ql6=y'[3][0]+y'[4][0], ql7=y'[3][0]-y'[4][0] , ql3=y'[2][0]-y'[5][0] , ql 5=y, [ 1 ] [0]-y, [6] [0] , qll =y, [0] [0] -y, [7] [0];  Ql0=y,[0][0]+y,[l][0], ql4=y,[l][0]+y,[6][0], ql2=y'[2][0] +y'[5][0], ql6=y'[3][0]+y'[4][0], ql7=y'[3][0]-y'[4][0] , Ql3=y'[2][0]-y'[5][0] , ql 5=y, [ 1 ] [0]-y, [6] [0] , qll =y, [0] [0 ] -y, [7] [0];
q20=ql0+ql6 , q24=ql4+ql2 , q22=ql4-ql2 , q26=ql0-ql6 , q27=ql7*c+qll*d , q23=ql3*a+ql5*b , q25=ql5*a-ql3*b , q21=qll*c-ql7*d;  Q20=ql0+ql6 , q24=ql4+ql2 , q22=ql4-ql2 , q26=ql0-ql6 , q27=ql7*c+qll*d , q23=ql3*a+ql5*b , q25=ql5*a- Ql3*b , q21=qll*c-ql7*d;
q30=q20+q24, q34=q20-q24, q32=q22*h+q26*t, q36=q26*h-q22*t, q37=q27+q25, q33=q21-q23, q35=q27-q25, q31=q21+q23;  Q30=q20+q24, q34=q20-q24, q32=q22*h+q26*t, q36=q26*h-q22*t, q37=q27+q25, q33=q21-q23, q35=q27-q25, Q31=q21+q23;
y"[0][0]=q30, y"[0][l]=q31+q31, y"[0][2]=q32, y"[0][3]=q33, y"[0][4]=q34, y"[0][5]=q35, y"[0][6]=q36, y"[0][7]=q31-q37;  y"[0][0]=q30, y"[0][l]=q31+q31, y"[0][2]=q32, y"[0][3]=q33, y"[0 ][4]=q34, y"[0][5]=q35, y"[0][6]=q36, y"[0][7]=q31-q37;
3、重复步骤 2,将 ( [0][l], [l][l],.i'[7][l]f、( [0][2], [1][2],··· [7][2])Τ3. Repeat step 2 to ([0][l], [l][l],.i'[7][l]f, ([0][2], [1][2],·· · [7][2]) Τ ,
( [0][3], [1][3],··· [7][3])Τ 、 ( [0][4], [1][4],··· [7][4])Τ([0][3], [1][3],··· [7][3]) Τ , ( [0][4], [1][4],··· [7][4 ]) Τ ,
( [0][5], [1][5],··· [7][5])Τ 、 ( [0][6], [1][6],··· [7][6])Τ([0][5], [1][5],··· [7][5]) Τ , ( [0][6], [1][6],··· [7][6 ]) Τ ,
( [0][7], [1][7],··· [7][7])Τ、 进行相同的一维正变换, 得到第一次一维 正变换输出 y"; ([0][7], [1][7],··· [7][7]) Τ , perform the same one-dimensional forward transformation, and obtain the first one-dimensional forward transform output y";
4、 进行第二次一维正变换, 步骤如下:  4. Perform the second one-dimensional positive transformation. The steps are as follows:
将 y"按列排成 8组向量, 将第一列向量 Cy"[0][0],_y"[l][0],..._y"[7][0]f作 为输入, 进行如下运算:  Arrange y" into 8 groups of vectors, and take the first column vector Cy"[0][0], _y"[l][0],..._y"[7][0]f as input, The following operations:
ql0=y"[0][0]+y"[l][0], ql4=y"[l][0]+y"[6][0],  Ql0=y"[0][0]+y"[l][0], ql4=y"[l][0]+y"[6][0],
ql2=y"[2][0]+y"[5][0], ql6=y"[3][0]+y"[4][0], ql7=y"[3][0]-y"[4][0], ql3=y"[2][0]-y"[5][0], ql5=y"[l][0]-y"[6][0] , qll=y"[0][0]-y"[7][0]; q20=ql0+ql6 , q24=ql4+ql2 , q22=ql4-ql2 , q26=ql0-ql6 , q27=ql7*c+qll*d , q23=ql3*a+ql5*b , q25=ql5*a-ql3*b , q21=qll*c-ql7*d;  Ql2=y"[2][0]+y"[5][0], ql6=y"[3][0]+y"[4][0], ql7=y"[3][0] -y"[4][0], ql3=y"[2][0]-y"[5][0], ql5=y"[l][0]-y"[6][0] , Qll=y"[0][0]-y"[7][0]; q20=ql0+ql6 , q24=ql4+ql2 , q22=ql4-ql2 , q26=ql0-ql6 , q27=ql7*c+ Qll*d , q23=ql3*a+ql5*b , q25=ql5*a-ql3*b , q21=qll*c-ql7*d;
q30=q20+q24, q34=q20-q24, q32=q22*h+q26*t, q36=q26*h-q22*t, q37=q27+q25, q33=q21-q23, q35=q27-q25, q31=q21+q23; Q30=q20+q24, q34=q20-q24, q32=q22*h+q26*t, q36=q26*h-q22*t, Q37=q27+q25, q33=q21-q23, q35=q27-q25, q31=q21+q23;
y"'[0][0]=q30, y"'[0][l]=q31+q31 , y"'[0][2]=q32 , y"'[0][3]=q33 , y"'[0][4]=q34, y"'[0][5]=q35, y"'[0][6]=q36, y"'[0][7]=q31-q37; y"'[0][0]=q30, y"'[0][l]=q31+q31 , y"'[0][2]=q32 , y"'[0][3]=q33 , y"'[0][4]=q34, y"'[0][5]=q35, y"'[0][6]=q36, y"'[0][7]=q31-q37;
5、 重复步骤 4, 将 ( '[0][1], '[1][1],… '[7][1])Γ5. Repeat step 4 to set ( '[0][1], '[1][1],... '[7][1]) Γ ,
( '[0][2], '[1][2],··· '[7][2])Γ、 ( '[0][3], '[1][3],··· '[7][3])Γ( '[0][2], '[1][2],··· '[7][2]) Γ , ( '[0][3], '[1][3],··· '[7][3]) Γ ,
( '[0][4],_y"[l][4],.i"[7][4])r、 ( '[0][5], [1][5],·ι"[7][5])Γ( '[0][4], _y"[l][4],.i"[7][4]) r , ( '[0][5], [1][5],·ι"[ 7][5]) Γ ,
Cy"[0][6],_y"[l][6],'i"[7][6]f、 Cy"[0][7],_y"[l][7],'i"[7][7]f  Cy"[0][6],_y"[l][6],'i"[7][6]f, Cy"[0][7],_y"[l][7],'i" [7][7]f
进行相同的一维正变换, 得到第二次一维正变换输出 y",;  Perform the same one-dimensional forward transformation to obtain a second one-dimensional forward transform output y",;
6、 将所得的第二次一维正变换后的输出 y",进行后处理右移 z位得 到 8x8离散余弦变换的输出 Y, 取 z=20, 步骤如下:  6. The obtained second-dimensional one-dimensionally transformed output y" is post-processed and shifted to the right by the z-bit to obtain the output Y of the 8x8 discrete cosine transform, taking z=20, as follows:
Y[v][u] = [y" v][u]xM[v][u] + (l « 19)- /(,[ ])] » 20。 实施例五  Y[v][u] = [y" v][u]xM[v][u] + (l « 19)- /(,[ ])] » 20. Example 5
一种应用于视频和图像处理的变换方法, 其包括的 8x8离散余弦变 换中的变换后处理步骤中的 8x8矩阵 M是:  A transform method applied to video and image processing, which includes an 8x8 matrix M in a post-transformation processing step in an 8x8 discrete cosine transform:
A B C D A D C BA B C D A D C B
B E F G B G F EB E F G B G F E
C F H I C I H FC F H I C I H F
D G I J D J I GD G I J D J I G
A B C D A D C BA B C D A D C B
D G I J D J I GD G I J D J I G
C F H I C I H FC F H I C I H F
B E F G B G F E B E F G B G F E
取联系参数 =10, k=U,  Take the contact parameter =10, k=U,
Ψ = 0.9000703207408190, = 0.5918825969335950可以得到: ^4=1024.0000000000000000, 5=1137.6888854164000000,  Ψ = 0.9000703207408190, = 0.5918825969335950 can get: ^4=1024.0000000000000000, 5=1137.6888854164000000,
C=1730.0728308369000000, =1608.9350515170000000,  C=1730.0728308369000000, =1608.9350515170000000,
£=1264.0000000000000000 , =1922.1529595742400000,  £=1264.0000000000000000 , =1922.1529595742400000,
G=1787.5659428395900000, 77=2923.0000000000000000,  G=1787.5659428395900000, 77=2923.0000000000000000,
7=2718.3347843854700000, J=2528.0000000000000000; 7=2718.3347843854700000, J=2528.0000000000000000;
Figure imgf000017_0001
719.2371556781520000, cx212 = 3065.3690701062000000, ί 212 =2048.2141299835100000, hx2l2= 1312.0493699271300000, ί 212 = 3167.5673833811500000. 取^ =1024, β=1138, C=1730, =1609, =1264, =1922, G=1788, 77=2923, 7=2718, J=2528, a=3616/4096, b=719/4096, c=3066/4096,
Figure imgf000018_0001
Figure imgf000017_0001
719.2371556781520000, Cx2 12 = 3065.3690701062000000, ί 2 12 =2048.2141299835100000, hx2 l2 = 1312.0493699271300000, ί 2 12 = 3167.5673833811500000. Take ^ =1024, β=1138, C=1730, =1609, =1264, =1922, G=1788, 77= 2923, 7=2718, J=2528, a=3616/4096, b=719/4096, c=3066/4096,
Figure imgf000018_0001
所述的应用于视频和图像处理的离散余弦变换方法, 其详细步骤如 下:  The discrete cosine transform method applied to video and image processing has the following detailed steps:
1、将待变换的 8x8数据 y做正变换预处理得到正变换预处理的输出: ''[V][M] = '[M][V] « 7, v,we[0,7];  1. The 8x8 data y to be transformed is pre-processed to obtain the output of the positive transform preprocessing: ''[V][M] = '[M][V] « 7, v, we[0,7];
2、将 y'按列排成 8组向量,将第一列向量 ( '[0] [0], y '[1][0],… '[7][0]f作 为输入, 进行如下运算:  2. Arrange y' into 8 groups of vectors by column, and take the first column vector ( '[0] [0], y '[1][0],... '[7][0]f as input, and proceed as follows Operation:
ql0=y,[0][0]+y,[l][0], ql4=y,[l][0]+y,[6][0] , ql2=y'[2][0]+y'[5][0], ql6=y'[3][0]+y'[4][0], ql7=y'[3][0]-y'[4][0] , ql3=y'[2][0]-y'[5][0] , ql 5=y, [ 1 ] [0]-y, [6] [0] , qll =y, [0] [0] -y, [7] [0];  Ql0=y,[0][0]+y,[l][0], ql4=y,[l][0]+y,[6][0] , ql2=y'[2][0] +y'[5][0], ql6=y'[3][0]+y'[4][0], ql7=y'[3][0]-y'[4][0] , Ql3=y'[2][0]-y'[5][0] , ql 5=y, [ 1 ] [0]-y, [6] [0] , qll =y, [0] [0 ] -y, [7] [0];
q20=ql0+ql6 , q24=ql4+ql2 , q22=ql4-ql2 , q26=ql0-ql6 , q27=ql7〇c+qll〇d, q23=ql3〇a+ql5〇b , q25=ql5〇a-ql3〇b , q21=qll〇c-ql7〇d;  Q20=ql0+ql6 , q24=ql4+ql2 , q22=ql4-ql2 , q26=ql0-ql6 , q27=ql7〇c+qll〇d, q23=ql3〇a+ql5〇b , q25=ql5〇a- Ql3〇b , q21=qll〇c-ql7〇d;
q30=q20+q24, q34=q20-q24, q32=q22〇h+q26〇t,  Q30=q20+q24, q34=q20-q24, q32=q22〇h+q26〇t,
q36=q26〇h-q22〇t, q37=q27+q25, q33=q21-q23, q35=q27-q25, q31=q q37=q27+q25, q33=q21-q23, q35=q27-q25, q31=q21+q23;  Q36=q26〇h-q22〇t, q37=q27+q25, q33=q21-q23, q35=q27-q25, q31=q q37=q27+q25, q33=q21-q23, q35=q27-q25, q31 =q21+q23;
y"[0][0]=q30, y"[0][l]=q31+q31, y"[0][2]=q32, y"[0][3]=q33, y"[0][4]=q34, y"[0][5]=q35, y"[0][6]=q36, y"[0][7]=q31-q37;  y"[0][0]=q30, y"[0][l]=q31+q31, y"[0][2]=q32, y"[0][3]=q33, y"[0 ][4]=q34, y"[0][5]=q35, y"[0][6]=q36, y"[0][7]=q31-q37;
其中的〇操作定义如下:  The 〇 operation is defined as follows:
x0a=l-(x»3) + (x»7);  X0a=l-(x»3) + (x»7);
x0b=(x»3) - (x»7) + (((x»3) - (x»7)-(x»ll))»l)  X0b=(x»3) - (x»7) + (((x»3) - (x»7)-(x»ll))»l)
x0h= ((x+(x»5))»2) +(x»4)  X0h= ((x+(x»5))»2) +(x»4)
x0t= x+(x»5) - ((x+(x»5))»2)  X0t= x+(x»5) - ((x+(x»5))»2)
x0d=x»2  X0d=x»2
x0c=(((x»9)-x)»2)- ((x»9)-x); 3、重复步骤 2,将 ( [0][l], [l][l],.i'[7][l]f 、( [0][2], [1][2],··· [7][2])Τ、 ( [0][3], [1][3],··· [7][3])Τ、 ( [0][4], [1][4],··· [7][4])ΤX0c=(((x»9)-x)»2)- ((x»9)-x); 3. Repeat step 2 to ([0][l], [l][l],.i'[7][l]f, ([0][2], [1][2],·· · [7][2]) Τ , ( [0][3], [1][3],··· [7][3]) Τ , ( [0][4], [1][4 ],··· [7][4]) Τ ,
( [0][5], [1][5],··· [7][5])Τ、 ( [0][6], [1][6],··· [7][6])Τ([0][5], [1][5],··· [7][5]) Τ , ( [0][6], [1][6],··· [7][6 ]) Τ ,
( [0][7], [1][7],··· [7][7])Τ进行相同的一维正变换,得到第一次一维正变换 输出 y"; ([0][7], [1][7],··· [7][7]) Τ Perform the same one-dimensional forward transformation to obtain the first one-dimensional forward transform output y";
4、 进行第二次一维正变换, 步骤如下:  4. Perform the second one-dimensional positive transformation. The steps are as follows:
将 y"按列排成 8组向量, 将第一列向量 Cy"[0][0],_y"[l][0],..._y"[7][0]f作 为输入, 进行如下运算:  Arrange y" into 8 groups of vectors, and take the first column vector Cy"[0][0], _y"[l][0],..._y"[7][0]f as input, The following operations:
ql0=y"[0][0]+y"[l][0], ql4=y"[l][0]+y"[6][0], ql2=y"[2][0]+y"[5][0] , ql6=y"[3][0]+y"[4][0], ql7=y"[3][0]-y"[4][0], ql3=y"[2][0]-y"[5][0] , ql5=y"[l][0]-y"[6][0], qll=y"[0][0]-y"[7][0];  Ql0=y"[0][0]+y"[l][0], ql4=y"[l][0]+y"[6][0], ql2=y"[2][0] +y"[5][0] , ql6=y"[3][0]+y"[4][0], ql7=y"[3][0]-y"[4][0], Ql3=y"[2][0]-y"[5][0] , ql5=y"[l][0]-y"[6][0], qll=y"[0][0] -y"[7][0];
q20=ql0+ql6, q24=ql4+ql2, q22=ql4-ql2, q26=ql0-ql6, q27=ql7〇c+qll〇d, q23=ql3〇a+ql5〇b, q25=ql5〇a-ql3〇b, q21=qll〇c-ql7〇d;  Q20=ql0+ql6, q24=ql4+ql2, q22=ql4-ql2, q26=ql0-ql6, q27=ql7〇c+qll〇d, q23=ql3〇a+ql5〇b, q25=ql5〇a- Ql3〇b, q21=qll〇c-ql7〇d;
q30=q20+q24, q34=q20-q24, q32=q22〇h+q26〇t,  Q30=q20+q24, q34=q20-q24, q32=q22〇h+q26〇t,
q36=q26〇h-q22〇t, q37=q27+q25 , q33=q21-q23 , q35=q27-q25 , q31=q21+q23;  Q36=q26〇h-q22〇t, q37=q27+q25, q33=q21-q23, q35=q27-q25, q31=q21+q23;
y"'[0][0]=q30, y"'[0][l]=q31+q31 , y"'[0][2]=q32 , y"'[0][3]=q33 , y"'[0][4]=q34, y"'[0][5]=q35, y"'[0][6]=q36, y"'[0][7]=q31-q37 其中的〇和步骤 2中的相同;  y"'[0][0]=q30, y"'[0][l]=q31+q31 , y"'[0][2]=q32 , y"'[0][3]=q33 , y"'[0][4]=q34, y"'[0][5]=q35, y"'[0][6]=q36, y"'[0][7]=q31-q37 The same as in step 2;
5、 重复步骤 4, 将 ( '[0][1], '[1][1],… '[7][1])Γ5. Repeat step 4 to set ( '[0][1], '[1][1],... '[7][1]) Γ ,
( '[0][2],_y"[l][2],.i"[7][2]f 、 ( '[0][3], '[1][3],··· '[7][3])Γ( '[0][2], _y"[l][2],.i"[7][2]f , ( '[0][3], '[1][3],··· ' [7][3]) Γ ,
( '[0][4],_y"[l][4],.i"[7][4])r、 ( '[0][5], [1][5],·ι"[7][5])Γ( '[0][4], _y"[l][4],.i"[7][4]) r , ( '[0][5], [1][5],·ι"[ 7][5]) Γ ,
Cy"[0][6],_y"[l][6],'i"[7][6]f、 ( '[0][7],_y"[l][7],.i"[7][7]f进行相同的一维正 变换, 得到第二次一维正变换输出 y",; Cy"[0][6],_y"[l][6],'i"[7][6]f, ( '[0][7],_y"[l][7],.i" [7][7]f performs the same one-dimensional forward transformation to obtain a second one-dimensional forward transform output y",;
6、 将所得的第二次一维正变换后的输出 y",进行后处理右移 z位得 到 8x8反离散余弦变换的输出 Y, 取 z=20, 步骤如下: 6. The obtained second-dimensional one-dimensionally transformed output y" is post-processed and shifted to the right by the z-bit to obtain the output Y of the 8x8 inverse discrete cosine transform, taking z=20, as follows:
Y[v] [u] = [y m[v] [u]xM[v] [u] + (1 «19)- f(y m[v] [u])] » 20。 实施例六 Y[v] [u] = [y m [v] [u]xM[v] [u] + (1 «19)- f(y m [v] [u])] » 20. Embodiment 6
一种应用于视频和图像处理的变换方法, 其包括的 8x8反离散余弦 变换中的反变换预处理步骤中的 8x8矩阵 M是:  A transform method applied to video and image processing, which includes an 8x8 matrix M in an inverse transform preprocessing step of an 8x8 inverse discrete cosine transform:
A B C D A D C B A B C D A D C B
B E F G B G F EB E F G B G F E
C F H I C I H FC F H I C I H F
D G I J D J I GD G I J D J I G
A B C D A D C BA B C D A D C B
D G I J D J I GD G I J D J I G
C F H I C I H FC F H I C I H F
B E F G B G F E B E F G B G F E
取联系参数 =10, k=\2,  Take the contact parameter =10, k=\2,
Ψ = 0.9000703207408190, = 0.5918825969335950可以得到: ^4=1024.0000000000000000, 5=1137.6888854164000000,  Ψ = 0.9000703207408190, = 0.5918825969335950 can get: ^4=1024.0000000000000000, 5=1137.6888854164000000,
C=1730.0728308369000000, =1608.9350515170000000,  C=1730.0728308369000000, =1608.9350515170000000,
£=1264.0000000000000000 , =1922.1529595742400000,  £=1264.0000000000000000 , =1922.1529595742400000,
G=1787.5659428395900000, 77=2923.0000000000000000,  G=1787.5659428395900000, 77=2923.0000000000000000,
7=2718.3347843854700000, J=2528.0000000000000000;  7=2718.3347843854700000, J=2528.0000000000000000;
αχ212= 3615.8493569450400000, bx212= 719.2371556781520000, cx212 = 3065.3690701062000000, ί 212 =2048.2141299835100000 , hx2l2= 1312.0493699271300000, ί 212 = 3167.5673833811500000. 取^ =1024, β=1138, C=1730, =1609, =1264, =1922, G=1788, 77=2923, 7=2718, J=2528, a=3616/4096, b=719/4096, c=3066/4096,
Figure imgf000020_0001
Αχ2 12 = 3615.8493569450400000, bx2 12 = 719.2371556781520000, cx2 12 = 3065.3690701062000000, ί 2 12 =2048.2141299835100000 , hx2 l2 = 1312.0493699271300000, ί 2 12 = 3167.5673833811500000. Take ^ =1024, β=1138, C=1730, =1609, =1264 , =1922, G=1788, 77=2923, 7=2718, J=2528, a=3616/4096, b=719/4096, c=3066/4096,
Figure imgf000020_0001
参见图 1所示, 所述的应用于视频和图像处理的反离散余弦变换方 法的详细步骤如下:  Referring to Figure 1, the detailed steps of the inverse discrete cosine transform method applied to video and image processing are as follows:
1、 输入数据 8x8数据块 X, 动态范围为 [-28+3,28+3 - 1], 即 12位宽, 将 X,输入, 进行反变换预处理: 1. Input data 8x8 data block X, dynamic range is [-2 8+3 , 2 8+3 - 1], that is 12 bits wide, X, input, inverse transform preprocessing:
Υ[\v 1\Γ\u π [v][M]xM刚 + 212- 1 , v = u = 0 Υ[ \v 1 \ Γ \u π [v][ M ]xM just + 2 12 - 1 , v = u = 0
X \ = <  X \ = <
\X v][u]xM[v][u] ,其他 得到反变换预处理的输出数据 X, X的动态范围为 [-2β+14,2β+14_1] , 即 23位宽; \X v][u]xM[v][u] ,Other Obtaining the inverse transform preprocessed output data X, X has a dynamic range of [-2 β + 14 , 2 β + 14 _1 ] , that is, 23 bits wide;
2、 将 X按行排成 8组向量:  2. Arrange X by row into 8 sets of vectors:
( [0][0], [0][1],···, [0][7]) , ( [1][0], [1][1],···, [1][7]) ,  ([0][0], [0][1],···, [0][7]) , ( [1][0], [1][1],···, [1][ 7]),
( [2][0], [2][1],···, [2][7]) , ( [3][0], [3][1],···, [3][7]) ,  ([2][0], [2][1],···, [2][7]) , ( [3][0], [3][1],···, [3][ 7]),
( [4][0], [4][1],···, [4][7]) , ( [5][0], [5][1],···, [5][7]) ,  ([4][0], [4][1],···, [4][7]) , ( [5][0], [5][1],···, [5][ 7]),
( [6][0], [6][1],···, [6][7]) , ( [7][0], [7][1],···, [7][7]);  ([6][0], [6][1],···, [6][7]) , ( [7][0], [7][1],···, [7][ 7]);
每组向量分别进行一维反变换,其中每组向量均作为图 3中的 Χ Χ' 进行一维反变换, 图 3中的 Χο~χ7即为每组一维反变换的结果 ,: Each set of vectors is subjected to one-dimensional inverse transform, in which each set of vectors is inversely transformed as Χ Χ ' in Fig. 3, and Χο~χ 7 in Fig. 3 is the result of one-dimensional inverse transform of each group:
x'0=(x'[0][0],x'[0][l],-,x'[0][7]),x'1 =(x'[l][0],x'[l][l],-, '[l][7]), x' 0 =(x'[0][0],x'[0][l],-,x'[0][7]),x' 1 =(x'[l][0],x '[l][l],-, '[l][7]),
χ'2=(χ'[2][0],χ'[2][1] ··,χ'[2][7]), x'3 = (x'[3][0], χ'[3][1],···, χ'[3][7]), χ' 2 =(χ'[2][0],χ'[2][1] ··,χ'[2][7]), x' 3 = (x'[3][0], χ '[3][1],···, χ'[3][7]),
χ'4=(χ'[4][0],χ'[4][1] ··,χ'[4][7]), x'5 = (Χ'[5][0],Χ'[5][1] ··,Χ'[5][7]) , χ'6=(χ'[6][0],χ'[6][1],···,χ'[6][7]), x'7 =(Χ'[7][0],Χ'[7][1],···,Χ'[7][7])。 χ' 4 =(χ'[4][0],χ'[4][1] ··,χ'[4][7]), x' 5 = (Χ'[5][0],Χ '[5][1] ··,Χ'[5][7]) , χ' 6 =(χ'[6][0],χ'[6][1],···,χ'[ 6][7]), x' 7 =(Χ'[7][0],Χ'[7][1],···,Χ'[7][7]).
图 3中的 ®操作分别用如下的加法、 减法、 移位操作的组合实现: x<8>a=l-(x»3) + (x»7);  The ® operations in Figure 3 are implemented using the following combination of addition, subtraction, and shift operations: x<8>a=l-(x»3) + (x»7);
x<Sb=(x»3) - (x»7) + (((x»3) - (x»7)-(x»ll))»l)  x<Sb=(x»3) - (x»7) + (((x»3) - (x»7)-(x»ll))»l)
x®h= ((x+(x»5))»2) +(x»4)  X®h= ((x+(x»5))»2) +(x»4)
x<¾t= x+(x»5) - ((x+(x»5))»2)  x<3⁄4t= x+(x»5) - ((x+(x»5))»2)
x®d=x»2  X®d=x»2
x®c=(((x»9)-x)»2)- ((x»9)-x)  X®c=(((x»9)-x)»2)- ((x»9)-x)
一维反变换的输出 x,,  The output of the one-dimensional inverse transform x,,
Figure imgf000021_0001
X,和中间变量的动态范围不超过 [-28+17, 28+17 - 1];
Figure imgf000021_0001
The dynamic range of X, and intermediate variables does not exceed [-2 8+17 , 2 8+17 - 1];
3、将存储的 X,按列排成 8组向量,每组向量分别作为图 3中的 Xo~X7 进行第二次一维反变换, 图 3中的 x。~x7即为每组向量第二次一维反变换 的结果, 得到第二次一维反变换输出 X"; 第二次一维反变换的输入 x,、 输出 X"和中间变量的动态范围不超过 [-28+17, 28+17 - 1]; 3. The stored Xs are arranged into 8 groups of vectors according to the columns, and each set of vectors is respectively subjected to the second one-dimensional inverse transformation as Xo~X 7 in Fig. 3, x in Fig. 3. ~x 7 is the result of the second one-dimensional inverse transformation of each set of vectors, and the second one-dimensional inverse transform output X" is obtained; the input of the second one-dimensional inverse transform x, the output X" and the dynamics of the intermediate variables The range does not exceed [-2 8+17 , 2 8+17 - 1];
4、 将 X"进行反变换后处理, 即右移 w位, 其中 w=13:  4. After X is inverse transformed, it is shifted to the right by w, where w=13:
x[v][u] = x"[v][u]»\3 v,we [0,63]; x[v][u] = x"[v][u]»\3 v,we [0,63];
得到 8x8反离散余弦变换的输出 X, X的动态范围为 [-28,28 -1]。 实施例七 The output X of the 8x8 inverse discrete cosine transform is obtained, and the dynamic range of X is [-2 8 , 2 8 -1]. Example 7
一种应用于视频和图像处理的变换方法, 其包括的 8x8离散余弦变 换中的正变换后处理步骤中的 8x8矩阵 M的排列方式是:  A transform method applied to video and image processing, which includes an arrangement of 8x8 matrices M in a forward transform post-processing step in an 8x8 discrete cosine transform:
A B C D A D C BA B C D A D C B
B E F G B G F EB E F G B G F E
C F H I C I H FC F H I C I H F
D G I J D J I GD G I J D J I G
A B C D A D C BA B C D A D C B
D G I J D J I GD G I J D J I G
C F H I C I H FC F H I C I H F
B E F G B G F E 取联系参数 =10, k=\2, B E F G B G F E take contact parameters =10, k=\2,
Ψ = 0.9000703207408190, = 0.5918825969335950可以得到: ^4=1024.0000000000000000, 5=1137.6888854164000000,  Ψ = 0.9000703207408190, = 0.5918825969335950 can get: ^4=1024.0000000000000000, 5=1137.6888854164000000,
C=1730.0728308369000000, =1608.9350515170000000,  C=1730.0728308369000000, =1608.9350515170000000,
£=1264.0000000000000000 , =1922.1529595742400000,  £=1264.0000000000000000 , =1922.1529595742400000,
G=1787.5659428395900000, 77=2923.0000000000000000,  G=1787.5659428395900000, 77=2923.0000000000000000,
7=2718.3347843854700000, J=2528.0000000000000000; 7=2718.3347843854700000, J=2528.0000000000000000;
Figure imgf000022_0001
719.2371556781520000, cx212 = 3065.3690701062000000, ί 212 =2048.2141299835100000, hx2l2= 1312.0493699271300000, ί 212 = 3167.5673833811500000. 取^ =1024, β=1138, C=1730, =1609, £=1264, =1922, G=1788, 77=2923, 7=2718, J=2528, a=3616/4096, b=719/4096, c=3066/4096,
Figure imgf000023_0001
Figure imgf000022_0001
719.2371556781520000, cx2 12 = 3065.3690701062000000, ί 2 12 =2048.2141299835100000, Hx2 l2 = 1312.0493699271300000, ί 2 12 = 3167.5673833811500000. Take ^ = 1024, β=1138, C=1730, =1609, £=1264, =1922, G=1788, 77=2923, 7=2718, J=2528, a=3616/4096, b=719/4096, c=3066/4096,
Figure imgf000023_0001
参见图 2所示, 所述的应用于视频和图像处理的离散余弦变换方 法的详细步骤如下:  Referring to Figure 2, the detailed steps of the discrete cosine transform method applied to video and image processing are as follows:
1、输入数据 8x8数据块 y 动态范围为 [-28,28 -1], 即 9位位宽, 将 y 输入, 进行正变换预处理: M[M] = M][V]<<7, V,UG[0,7], 得到正变换预 处理的输出 y,, y,的动态范围为 [-28+7,28+7 -1], 即 16位位宽; 1. Input data 8x8 data block y The dynamic range is [-2 8 , 2 8 -1], that is, 9 bits wide, input y, and perform positive transform preprocessing: M[M] = M][V]<< 7, V, UG [0, 7], the dynamic range of the output y, y, obtained by the positive transform preprocessing is [-2 8+7 , 2 8+7 -1], that is, the 16-bit width;
2、 将 y'按列排成 8组向量, ( [0][0], [1][0],… [7][0]f ,  2. Arrange y' by column into 8 groups of vectors, ( [0][0], [1][0],... [7][0]f ,
( [0][l], [l][l],'1'[7][l]f , ( [0][2], [1][2],··· [7][2])Τ , ([0][l], [l][l],'1'[7][l]f , ( [0][2], [1][2],··· [7][2] ) Τ ,
( [0][3], [1][3],··· [7][3])Τ , ( [0][4], [1][4],··· [7][4])Τ , ([0][3], [1][3],··· [7][3]) Τ , ( [0][4], [1][4],··· [7][4 ]) Τ ,
( [0][5], [1][5],··· [7][5])Τ , ( [0][6], [1][6],··· [7][6])Τ , ([0][5], [1][5],··· [7][5]) Τ , ( [0][6], [1][6],··· [7][6 ]) Τ ,
( [0][7], [1][7],··· [7][7])Τ([0][7], [1][7],··· [7][7]) Τ ,
每组向量分别作为图 4中的 Χο~χ7 输入一维正变换装置进行一维正 变换, 每组一维正变换的结果均为图 4中的^) &: Each set of vectors is used as a one-dimensional forward transform by the input 一ο~χ 7 input one-dimensional forward transform device in Fig. 4, and the result of each set of one-dimensional forward transform is ^) & in Fig. 4:
( '[0][0], '[1][0],··· '[7][0])Γ , ( '[0][1], '[1][1],·ι"[7][1])Γ( '[0][0], '[1][0],··· '[7][0]) Γ , ( '[0][1], '[1][1],·ι" [7][1]) Γ ,
( '[0][2],_y"[l][2],.i"[7][2]f、 ( '[0][3], '[1][3],··· '[7][3])Γ( '[0][2], _y"[l][2],.i"[7][2]f, ( '[0][3], '[1][3],··· ' [7][3]) Γ ,
( '[0][4],_y"[l][4],.i"[7][4])r、 ( '[0][5], [1][5],·ι"[7][5])Γ( '[0][4], _y"[l][4],.i"[7][4]) r , ( '[0][5], [1][5],·ι"[ 7][5]) Γ ,
Cy"[0][6],_y"[l][6],.i"[7][6]f、 Cy"[0][7],_y"[l][7],'i"[7][7]f ;  Cy"[0][6],_y"[l][6],.i"[7][6]f, Cy"[0][7],_y"[l][7],'i" [7][7]f ;
图 4中的 0操作分别用如下的加法、 减法、 移位操作的组合实现: x®a=l-(x»3) + (x»7);  The 0 operations in Figure 4 are implemented using the following combination of addition, subtraction, and shift operations: x®a=l-(x»3) + (x»7);
x®b=(x»3) - (x»7) + (((x»3) - (x»7)-(x»ll))»l);  X®b=(x»3) - (x»7) + (((x»3) - (x»7)-(x»ll))»l);
x<¾h= ((x+(x»5))»2) +(x»4);  x<3⁄4h= ((x+(x»5))»2) +(x»4);
x®t= x+(x»5) - ((x+(x»5))»2);  X®t= x+(x»5) - ((x+(x»5))»2);
x<8>d=x»2;  x<8>d=x»2;
x<8)c=(((x»9)-x)»2)- ((x»9)-x);  x<8)c=(((x»9)-x)»2)- ((x»9)-x);
3、将存储的 y"按行排成 8组向量,每组向量分别作为图 4中的 x0~x7 再次进行第二次一维正变换,图 4中的 。 &即为每组向量第二次一维正 变换的结果, 得到第二次一维正变换的输出 y",; 第二次一维正变换的输 出 y"、 y",和中间变量的动态范围不超过 [-28+13,28+13 - 1]; 3. Arrange the stored y" into 8 groups of vectors, and each group of vectors is again subjected to the second one-dimensional forward transformation as x 0 ~ x 7 in Fig. 4, in Fig. 4. & is the vector of each group The second one-dimensional positive The result of the transformation yields the output y" of the second one-dimensional forward transform; the output of the second one-dimensional forward transform y", y", and the dynamic range of the intermediate variable does not exceed [-2 8+13 , 2 8 +13 - 1];
4、 将所得的第二次一维正变换后的输出 y",进行正变换后处理, 即 右移 z 位, 得到 8x8 反离散余弦变换的输出数据 Y, 取 z=20: 即 Y[v][u] = [ -"'[v][w]x [v][w] + (1 « 19) -/( -'"[v][w])] » 20 ; Y 动 态 范 围 为 4. The output y" obtained by the second one-dimensional forward transformation is subjected to positive transformation and post-processing, that is, the z-bit is shifted right, and the output data Y of the 8x8 inverse discrete cosine transform is obtained, and z=20: that is, Y[v ][u] = [ -"'[v][w]x [v][w] + (1 « 19) -/( -'"[v][w])] » 20 ; Y Dynamic range is
[― , ]。 本发明实施例中 {^4、 B、 C、 D、 E、 F、 G、 H、 I、 J、 a、 b、 c、 d、 h、 t }所对应的 8x8反离散余弦变换方法符合 ISO/IEC 23002-1-2006和以 下定义的精度要求: [― , ]. The 8x8 inverse discrete cosine transform method corresponding to {^4, B, C, D, E, F, G, H, I, J, a, b, c, d, h, t } in the embodiment of the present invention conforms to ISO /IEC 23002-1-2006 and the accuracy requirements defined below:
(a)线性测试: 对于 e [0,63], _/· e [1,255], 产生 64个输入数据  (a) Linear test: For e [0,63], _/· e [1,255], generate 64 input data
N, [x/8][x%8] = |^' ^ xe[0,63], 令8 8输入数据矩阵^,.;.=-^;.; 将 Νί ;^οΝ'ί ;.分别进行由 { A B、 C、 D、 E、 F、 G、 H、 I、 J、 a、 b、 c、 d、 h、 ί }所构成的 8x8反离散余弦变 换,得到两个输出块,将其相加得到 对 ζ, 取值范围内所有的组合, 所得到的 均应为全零; N, [x/8][x%8] = |^' ^ xe[0,63], let 8 8 input data matrix ^,. ; .=-^ ; .; will Ν ί ; ^οΝ'ί; Performing an 8x8 inverse discrete cosine transform consisting of { AB, C, D, E, F, G, H, I, J, a, b, c, d, h, ί }, respectively, to obtain two output blocks, Add them to each other, and all combinations within the range of values should be all zeros;
(b)根据 ISO/IEC 23002-1-2006标准定义的随机数生成方法, 产生 Q组 [-L,+H]范围内的随机数, 将这些随机数作为输入, 对由 {^ 、 B、 C、 D、 E、 F、 G、 H、 I、 J、 a、 b、 c、 d、 h、 ί }所构成的 8x8反离散余弦变 换进行测试得到均方误差 omse; 其中的 L<10 , H<10, Q>=10000 , 所得 到的均方误差 omse必须小于 0.01。  (b) A random number generation method defined according to the ISO/IEC 23002-1-2006 standard, which generates random numbers in the range of Q groups [-L, +H], and takes these random numbers as inputs, for {^, B, The 8x8 inverse discrete cosine transform composed of C, D, E, F, G, H, I, J, a, b, c, d, h, ί } is tested to obtain the mean square error omse; where L<10, H<10, Q>=10000, and the resulting mean square error omse must be less than 0.01.
本发明为应用于视频和图像处理的反变换及正变换方法, 能很好地 逼近理想的 8x8反离散余弦变换及理想的 8x8离散余弦变换, 精度上远 远超过 ISO/IEC 23002-1-2006的要求, 同时在硬件实现上复杂度大大降 低, 并能应用在多种国际视频编解码标准。 其反变换预处理过程可以结 合视频压缩解码的反量化, 进一步降低复杂度。  The invention is an inverse transform and forward transform method applied to video and image processing, and can well approximate an ideal 8x8 inverse discrete cosine transform and an ideal 8x8 discrete cosine transform, and the precision far exceeds ISO/IEC 23002-1-2006. The requirements, while the hardware implementation is greatly reduced in complexity, and can be applied to a variety of international video codec standards. The inverse transform preprocessing process can be combined with the inverse quantization of video compression decoding to further reduce the complexity.
显然, 本领域的技术人员应该明白, 上述的本发明的各步骤可以用 通用的计算装置来实现, 它们可以集中在单个的计算装置上, 或者分布 在多个计算装置所组成的网络上, 可选地, 它们可以用计算装置可执行 的程序代码来实现, 从而, 可以将它们存储在存储装置中由计算装置来 执行, 或者将它们分别制作成各个集成电路模块, 或者将它们中的步骤 制作成单个集成电路模块来实现。 这样, 本发明不限制于任何特定的硬 件和软件结合。 Obviously, those skilled in the art should understand that the above steps of the present invention can be implemented by a general-purpose computing device, which can be concentrated on a single computing device or distributed over a network of multiple computing devices. Alternatively, they can be executed by a computing device The program code is implemented so that they can be stored in a storage device by a computing device, or they can be fabricated into individual integrated circuit modules, or the steps can be made into a single integrated circuit module. Thus, the invention is not limited to any specific combination of hardware and software.
上述实施例是用于说明和解释本发明的原理的。 可以理解, 本发明 的具体实施方式不限于此。 对于本领域技术人员而言, 在不脱离本发明 的实质和范围的前提下进行的各种变更和修改均涵盖在本发明的保护范 围之内。 因此, 本发明的保护范围由权利要求确定。  The above embodiments are intended to illustrate and explain the principles of the invention. It is to be understood that the specific embodiments of the present invention are not limited thereto. Various changes and modifications may be made without departing from the spirit and scope of the invention. Accordingly, the scope of the invention is defined by the claims.

Claims

权 利 要 求 Rights request
1、 一种应用于视频和图像处理的变换方法, 其特征在于, 包括 8x8 反离散余弦变换方法: A transform method applied to video and image processing, characterized in that it comprises an 8x8 inverse discrete cosine transform method:
使用一个预先设定的 8x8的整数矩阵 M与 8x8的输入数据块相乘得 到 8x8的矩阵 X;  Multiply a predetermined 8x8 integer matrix M with an 8x8 input data block to obtain a matrix X of 8x8;
将所述矩阵 X按行生成 8组第一向量, 对所述 8组向量依次进行一 维反变换, 得到矩阵 χ' ;  The matrix X is generated into eight sets of first vectors in a row, and the eight sets of vectors are sequentially subjected to one-dimensional inverse transformation to obtain a matrix χ';
将所述矩阵 x' 按行生成 8组第二向量, 对所述 8组向量依次进行一 维反变换, 得到矩阵 X" ;  The matrix x' is generated into eight sets of second vectors in a row, and the eight sets of vectors are sequentially subjected to one-dimensional inverse transformation to obtain a matrix X";
将所述矩阵 X"中的元素进行右移 w位移位处理, 其中 w为正整数。 The elements in the matrix X" are shifted right by w bit shifting, where w is a positive integer.
2、 根据权利要求 1所述的应用于视频和图像处理的变换方法, 其特 征在于, 所述 8x8矩阵 M为: The transform method applied to video and image processing according to claim 1, wherein said 8x8 matrix M is:
A B C D A D C B A B C D A D C B
B E F G B G F EB E F G B G F E
C F H I C I H FC F H I C I H F
D G I J D J I GD G I J D J I G
A B C D A D C BA B C D A D C B
D G I J D J I GD G I J D J I G
C F H I C I H FC F H I C I H F
B E F G B G F E B E F G B G F E
其中 A,B,C,D,E,F,G,H,I,J为预定的整数元素。  Wherein A, B, C, D, E, F, G, H, I, J are predetermined integer elements.
3、 根据权利要求 1所述的应用于视频和图像处理的变换方法, 其特 征在于, 所述 8x8反离散余弦变换方法中的一维反变换具体包括:  The method for transforming video and image processing according to claim 1, wherein the one-dimensional inverse transform in the 8x8 inverse discrete cosine transform method specifically includes:
pl0= 0, pl4= 4, p\2=X2, ρ16= 6, ρ\Ί=Χ\-ΧΊ, ρ13= 3, ρ15= 5, ρ20=ρ10+ 14, ρ24=ρ10- 14, p22=pl2*h-pl6*t, p26=pl6*h+pl2*t, ρ27=ρ15+ 17, p23=pll-pl3, ρ25=ρ17-ρ15, p21=pll+pl3;  Pl0= 0, pl4= 4, p\2=X2, ρ16= 6, ρ\Ί=Χ\-ΧΊ, ρ13= 3, ρ15= 5, ρ20=ρ10+ 14, ρ24=ρ10- 14, p22=pl2* H-pl6*t, p26=pl6*h+pl2*t, ρ27=ρ15+ 17, p23=pll-pl3, ρ25=ρ17-ρ15, p21=pll+pl3;
ρ30=ρ20+ρ26, ρ34=ρ24+ρ22, ρ32=ρ24-ρ22, ρ36=ρ20-ρ26,  Ρ30=ρ20+ρ26, ρ34=ρ24+ρ22, ρ32=ρ24-ρ22, ρ36=ρ20-ρ26,
p37=p27*c-p21 *d, p33=p23*a-p25*b, p35=p23*b+p25*a,  P37=p27*c-p21 *d, p33=p23*a-p25*b, p35=p23*b+p25*a,
p31=p21 *c+p27*d;  P31=p21 *c+p27*d;
x0=p30+p31, xl=p34+p35, x2=p32+p33, x3=p36+p37, x4=p36-p37, x5=p32-p33, x6=p34-p35, x7=p30-p31; X0=p30+p31, xl=p34+p35, x2=p32+p33, x3=p36+p37, x4=p36-p37, X5=p32-p33, x6=p34-p35, x7=p30-p31;
其中 XO, XI, X2, X3, X4, X5, X6, X7为一维反变换步骤的输入数据, xO, xl, x2, x3, x4, x5, x6, x7为一维反变换步骤的输出数据, plO ~pl7、 p20 ~ p27、 p30~p37是一维反变换步骤的中间变量, a、 b、 c、 d, h、 ί为常数。 XO, XI, X2, X3, X4, X5, X6, X7 are the input data of the one-dimensional inverse transformation step, xO, xl, x2, x3, x4, x5, x6, x7 are the output data of the one-dimensional inverse transformation step , plO ~pl7, p20 ~ p27, p30~p37 are intermediate variables of the one-dimensional inverse transformation step, and a, b, c, d, h, ί are constants.
4、 根据权利要求 3所述的应用于视频和图像处理的变换方法, 其特 征在于, 所述 *运算为乘法操作, 乘法操作釆用加法、 减法、 右移中的一 个或多个的组合实现。  4. The transform method applied to video and image processing according to claim 3, wherein the * operation is a multiplication operation, and the multiplication operation is implemented by a combination of one or more of addition, subtraction, and right shift. .
5、 根据权利要求 2或 3所述的应用于视频和图像处理的变换方法, 其特征在于, 当所述 8x8的输入数据块的动态范围为 [-2β+3,2β+3_ΐ]时, 所 述矩阵 X的动态范围是 [-2β+14,2β+14- 1]; 所述矩阵 X、 矩阵 X' 和矩阵 X" 的动态范围不超过 [-2β+17,2β+17-1]; 所述 w=13, 移位处理后的输出数据动 态范围为 [-2β,2β_1], 为正整数。 The method for transforming video and image processing according to claim 2 or 3, wherein when the dynamic range of the 8x8 input data block is [-2 β+3 , 2 β+3 _ΐ] The dynamic range of the matrix X is [-2 β+14 , 2 β+14 - 1]; the dynamic range of the matrix X, the matrix X′ and the matrix X′ does not exceed [-2 β+17 , 2 β+17 -1]; The w=13, the dynamic range of the output data after the shift processing is [-2 β , 2 β _1], which is a positive integer.
6、 根据权利要求 2所述的应用于视频和图像处理的变换方法, 其特 征在于, 所述乘法系数 σ、 b、 c、 d、 h、 ί和参数 、 B、 C、 D、 E、 F、 G、 H、 I、 J的相互关系如下:  6. The transform method applied to video and image processing according to claim 2, wherein said multiplication coefficients σ, b, c, d, h, ί and parameters, B, C, D, E, F The relationship between G, H, I, and J is as follows:
A =A =
Figure imgf000027_0001
, ' t― 2;—— , ― υ
Figure imgf000027_0001
, ' t― 2;—— , ― υ
2 c a  2 c a
^ 2
Figure imgf000027_0002
^ 2
Figure imgf000027_0002
f = cos(3^-/16) , f = sin(3^-/16) , k、 S、 ψ、 ø是联系因子。 f = cos(3^-/16) , f = sin(3^-/16) , k, S, ψ, ø are the contact factors.
7、 一种应用于视频和图像处理的变换方法, 其特征在于, 包括 8x8 离散余弦变换: 7. A transform method applied to video and image processing, characterized in that it comprises an 8x8 discrete cosine transform:
将 8x8的输入数据块 y中的元素进行左移 r位的移位操作,得到矩阵 y' , r为正整数;  Shifting the elements in the 8x8 input data block y to the left by r bits to obtain the matrix y', where r is a positive integer;
将所述矩阵 y' 按行生成 8组第一向量, 对所述 8组向量依次进行一 维正变换, 得到矩阵 y"; 将所述矩阵 y"按行生成 8组第二向量, 对所述 8组向量依次进行一 维正变换, 得到矩阵 y",; The matrix y' is generated into eight sets of first vectors in rows, and the eight sets of vectors are sequentially subjected to one-dimensional forward transform to obtain a matrix y"; The matrix y" generates 8 sets of second vectors in rows, and sequentially performs one-dimensional forward transformation on the 8 sets of vectors to obtain a matrix y";
将经所述一维正变换后得到的输出矩阵 y",中元素进行右移 z位的移 位操作得到矩阵 Y, 其中 z为正整数。  The shifting operation of the output matrix y" obtained by the one-dimensional forward transform, the right element is shifted by z bits to obtain a matrix Y, where z is a positive integer.
8、 根据权利要求 7所述的应用于视频和图像处理的变换方法, 其特 征在于, 所述 8x8离散余弦变换方法中的一维正变换具体包括:  The method for transforming video and image processing according to claim 7, wherein the one-dimensional forward transform in the 8x8 discrete cosine transform method specifically comprises:
ql0=y0+yl, ql4=yl+y6, ql2=y2+yx5, ql6=y3+y4, ql7=y3-y4, ql3=y2-y5, ql5=yl-y6, ql l=y0-y7;  Ql0=y0+yl, ql4=yl+y6, ql2=y2+yx5, ql6=y3+y4, ql7=y3-y4, ql3=y2-y5, ql5=yl-y6, ql l=y0-y7;
q20=ql0+ql6, q24=ql4+ql2, q22=ql4-ql2, q26=ql0-ql6,  Q20=ql0+ql6, q24=ql4+ql2, q22=ql4-ql2, q26=ql0-ql6,
q27=ql7*c+ql l *d, q23=ql3*a+ql5*b, q25=ql5*a-ql3 *b,  Q27=ql7*c+ql l *d, q23=ql3*a+ql5*b, q25=ql5*a-ql3 *b,
q21=ql l *c-ql7*d;  Q21=ql l *c-ql7*d;
q30=q20+q24, q34=q20-q24, q32=q22*h+q26*t, q36=q26*h-q22*t, q37=q27+q25, q33=q21-q23, q35=q27-q25, q31=q21+q23;  Q30=q20+q24, q34=q20-q24, q32=q22*h+q26*t, q36=q26*h-q22*t, q37=q27+q25, q33=q21-q23, q35=q27-q25, Q31=q21+q23;
Y0=q30, Yl=q31+q31, Y2=q32, Y3=q33, Y4=q34, Y5=q35, Y6=q36, Y7=q31-q37,  Y0=q30, Yl=q31+q31, Y2=q32, Y3=q33, Y4=q34, Y5=q35, Y6=q36, Y7=q31-q37,
其中 yO, yl, y2, y3, y4, y5, y6, yl为一维正变换的输入数据, YO, Yl, Y2, Y3, Υ4, Υ5, Υ6, Υ7为一维正变换的输出数据, qlO ~ ql7、 q20 ~ q27、 q30 ~ q37为一维正变换的中间变量, a、 b、 c、 d, h、 ί为常数。 Where yO, yl, y2, y3, y4, y5, y6, yl are the input data of one-dimensional forward transformation, YO, Yl, Y2, Y3, Υ4, Υ5, Υ6, Υ7 are the output data of one-dimensional forward transformation, qlO ~ ql7, q20 ~ q27, q30 ~ q37 are intermediate variables of one-dimensional positive transformation, and a, b, c, d, h, ί are constants.
9、 根据权利要求 7所述的应用于视频和图像处理的变换方法, 其特 征在于, 所述将经所述一维正变换后得到的输出矩阵 y",中元素进行右移 z位的移位操作得到矩阵 Y具体包括:  The method for transforming video and image processing according to claim 7, wherein the output matrix y" obtained by the one-dimensional forward transform is shifted to the right by z bits. The bit operation to get the matrix Y specifically includes:
输入经正变换处理得到的数据 8x8数据块 y",与 8x8矩阵 M做操作 II得到矩阵 Y , 所述操作 II为:  Input the data obtained by the forward transform processing 8x8 data block y", and 8x8 matrix M do operation II to obtain the matrix Y, the operation II is:
Y[ym = [Yf[yWxM[y][x] + (l « \9) - f(Y y][x])] » z xe [0, 7] ; 其中函 数 m)为:Y[ym = [Y f [yWxM[y][x] + (l « \9) - f(Y y][x])] » z xe [0, 7] ; where the function m) is:
Figure imgf000028_0001
Figure imgf000028_0001
其中《表示左移, 》表示右移 。  Where "represents left shift," means right shift.
10、 根据权利要求 8或 9所述的应用于视频和图像处理的变换方法, 其特征在于, 当所述 8x8的输入数据块 y的动态范围为 [-2β, 2β - 1]时, 所 述矩阵 y' 的动态范围是 [-2β+7, 2β+7 _1] , 所述矩阵 y'、 矩阵 y"和矩阵 y", 不超过 [-2β+13, 2β+13 - 1] ; 所述移位参数 所述移位参数 z=20, 为正整 数。 The transform method applied to video and image processing according to claim 8 or 9, wherein when the dynamic range of the 8x8 input data block y is [-2 β , 2 β - 1], Place The dynamic range of the matrix y' is [-2 β+7 , 2 β+7 _1] , and the matrix y', the matrix y" and the matrix y" do not exceed [-2 β+13 , 2 β+13 - 1]; the shift parameter, the shift parameter z=20, is a positive integer.
11、 根据权利要求 7所述的应用于视频和图像处理的变换方法, 其 特征在于, 所述一维正变换步骤中的 *运算为乘法操作, 乘法操作釆用加 法、 减法、 右移中的一个或多个的组合实现。  11. The method for transforming video and image processing according to claim 7, wherein the * operation in the one-dimensional forward transform step is a multiplication operation, and the multiplication operation is performed in addition, subtraction, and right shift. One or more combinations are implemented.
12、 一种应用于视频和图像处理的变换处理装置, 用于实现 8x8反 离散余弦变换, 其特征在于, 该装置包括:  12. A transform processing apparatus for video and image processing, for implementing an 8x8 inverse discrete cosine transform, characterized in that the apparatus comprises:
预处理单元, 使用一个预先设定的 8x8的整数矩阵 M与 8x8的输入 数据块相乘得到 8x8的矩阵 X;  The preprocessing unit multiplies an 8x8 integer matrix M by a predetermined 8x8 input data block to obtain an 8x8 matrix X;
第一反变换单元, 将所述矩阵 X按行生成 8组第一向量, 对所述 8 组向量依次进行一维反变换, 得到矩阵 x,;  a first inverse transform unit, generating, by the matrix X, eight sets of first vectors, and sequentially performing one-dimensional inverse transform on the eight sets of vectors to obtain a matrix x;
第二反变换单元, 将所述矩阵 x, 按行生成 8组第二向量, 对所述 8 组向量依次进行一维反变换, 得到矩阵 X" ;  a second inverse transform unit, which generates eight sets of second vectors by rows, and sequentially performs one-dimensional inverse transform on the eight sets of vectors to obtain a matrix X";
后处理单元, 将所述矩阵 X"中的元素进行右移 w位移位处理, 其中 w 为正整数。  The post-processing unit performs the right shift of the elements in the matrix X" by w bit shifting, where w is a positive integer.
13、 根据权利要求 12所述的变换处理装置, 其特征在于, 所述 8x8矩 阵 M为:  The transform processing device according to claim 12, wherein the 8x8 matrix M is:
A B C D A D C B A B C D A D C B
B E F G B G F EB E F G B G F E
C F H I C I H FC F H I C I H F
D G I J D J I GD G I J D J I G
A B C D A D C BA B C D A D C B
D G I J D J I GD G I J D J I G
C F H I C I H FC F H I C I H F
B E F G B G F E 其中 A,B,C,D,E,F,G,H,I, J为预定的整数元素。 B E F G B G F E where A, B, C, D, E, F, G, H, I, J are predetermined integer elements.
14、 根据权利要求 12所述的变换处理装置, 其特征在于, 所述反变 换单元按照下述步骤进行一维反变换:  The transform processing apparatus according to claim 12, wherein the inverse transform unit performs one-dimensional inverse transform according to the following steps:
pl0= 0, pl4= 4, p\2=X2, ρ16= 6, ρ\Ί=Χ\-ΧΊ, ρ13= 3, ρ15= 5, p\\=X\+X7; Pl0= 0, pl4= 4, p\2=X2, ρ16= 6, ρ\Ί=Χ\-ΧΊ, ρ13= 3, ρ15= 5, p\\=X\+X7;
p20=pl0+ l4, p24=pl0- l4, p22=pl2*h-pl6*t, p26=pl6*h+pl2*t, p27=pl5+ l7, p23=pll-pl3, p25=pl7-pl5, p21=pll+pl3;  P20=pl0+ l4, p24=pl0- l4, p22=pl2*h-pl6*t, p26=pl6*h+pl2*t, p27=pl5+ l7, p23=pll-pl3, p25=pl7-pl5, p21= Pll+pl3;
p30=p20+p26, p34=p24+p22, p32=p24-p22, p36=p20-p26,  P30=p20+p26, p34=p24+p22, p32=p24-p22, p36=p20-p26,
p37=p27*c-p21*d, p33=p23*a-p25*b, p35=p23*b+p25*a,  P37=p27*c-p21*d, p33=p23*a-p25*b, p35=p23*b+p25*a,
p31=p21*c+p27*d;  P31=p21*c+p27*d;
x0=p30+p31, xl=p34+p35, x2=p32+p33, x3=p36+p37, x4=p36-p37, x5=p32-p33, x6=p34-p35, x7=p30-p31;  X0=p30+p31, xl=p34+p35, x2=p32+p33, x3=p36+p37, x4=p36-p37, x5=p32-p33, x6=p34-p35, x7=p30-p31;
其中 X0, XI, X2, X3, X4, X5, X6, X7为一维反变换步骤的输入数据, χθ, xl, x2, x3, x4, x5, x6, x7为一维反变换步骤的输出数据, plO ~pl7、 p20 ~p27、 p30 ~p37是一维反变换步骤的中间变量, a、 b、 c、 d、 h、 t 为常数。  Where X0, XI, X2, X3, X4, X5, X6, X7 are the input data of the one-dimensional inverse transformation step, χθ, xl, x2, x3, x4, x5, x6, x7 are the output data of the one-dimensional inverse transformation step , plO ~pl7, p20 ~p27, p30 ~p37 are intermediate variables of the one-dimensional inverse transformation step, and a, b, c, d, h, t are constants.
15、 一种应用于视频和图像处理的变换处理装置, 用于实现 8x8 离 散余弦变换, 其特征在于, 包括;  15. A transform processing apparatus for video and image processing, for implementing an 8x8 discrete cosine transform, characterized in that:
预处理单元,将 8x8的输入数据块 y中的元素进行左移 r位的移位操 作, 得到矩阵 Y,, r为正整数;  The preprocessing unit shifts the elements in the 8x8 input data block y to the left by r bits to obtain a matrix Y, and r is a positive integer;
正变换单元, 将经预处理后得到的矩阵 Y, 按列排成 8组向量, 在 分别对每一组向量处理过程中进行乘法运算时使用至少 6 个不同的乘法 系数 β、 b、 c、 d、 h、 ί进行运算;  The positive transform unit uses the matrix Y obtained by the pre-processing to be arranged into eight sets of vectors in columns, and uses at least six different multiplication coefficients β, b, c, respectively, when performing multiplication in each set of vector processing. d, h, ί perform operations;
后处理单元, 将经所述一维正变换后得到的输出矩阵中元素进行右 移 ζ位的移位操作, 其中 ζ为正整数。  The post-processing unit performs a right-shifting shift operation on the elements in the output matrix obtained by the one-dimensional forward transform, where ζ is a positive integer.
16、 根据权利要求 15所述的变换处理装置, 其特征在于, 所述正变 换单元按照下述步骤进行一维正变换:  The conversion processing device according to claim 15, wherein the positive conversion unit performs a one-dimensional forward transformation in accordance with the following steps:
ql0=y0+yl, ql4=yl+y6, ql2=y2+yx5, ql6=y3+y4, ql7=y3-y4, ql3=y2-y5, ql5=yl-y6, qll=y0-y7;  Ql0=y0+yl, ql4=yl+y6, ql2=y2+yx5, ql6=y3+y4, ql7=y3-y4, ql3=y2-y5, ql5=yl-y6, qll=y0-y7;
q20=ql0+ql6, q24=ql4+ql2, q22=ql4-ql2, q26=ql0-ql6,  Q20=ql0+ql6, q24=ql4+ql2, q22=ql4-ql2, q26=ql0-ql6,
q27=ql7*c+qll*d, q23=ql3*a+ql5*b, q25=ql5*a-ql3*b,  Q27=ql7*c+qll*d, q23=ql3*a+ql5*b, q25=ql5*a-ql3*b,
q21=qll*c-ql7*d;  Q21=qll*c-ql7*d;
q30=q20+q24, q34=q20-q24, q32=q22*h+q26*t, q36=q26*h-q22*t, q37=q27+q25, q33=q21-q23, q35=q27-q25, q31=q21+q23; Q30=q20+q24, q34=q20-q24, q32=q22*h+q26*t, q36=q26*h-q22*t, Q37=q27+q25, q33=q21-q23, q35=q27-q25, q31=q21+q23;
Y0=q30, Yl=q31+q31, Y2=q32, Y3=q33, Y4=q34, Y5=q35, Y6=q36, Y0=q30, Yl=q31+q31, Y2=q32, Y3=q33, Y4=q34, Y5=q35, Y6=q36,
Y7=q31-q37, Y7=q31-q37,
其中 yO, yl, y2, y3, y4, y5, y6, yl为一维正变换的输入数据, YO, Yl, Y2, Y3, Υ4, Υ5, Υ6, Υ7为一维正变换的输出数据, qlO ~ ql7、 q20 ~ q27、 q30 ~ q37为一维正变换的中间变量, a、 b、 c、 d, h、 ί为常数。 Where yO, yl, y2, y3, y4, y5, y6, yl are the input data of one-dimensional forward transformation, YO, Yl, Y2, Y3, Υ4, Υ5, Υ6, Υ7 are the output data of one-dimensional forward transformation, qlO ~ ql7, q20 ~ q27, q30 ~ q37 are intermediate variables of one-dimensional positive transformation, and a, b, c, d, h, ί are constants.
17、 根据权利要求 15所述的变换处理装置, 其特征在于, 所述后处 理单元按照下述步骤进行处理:  The conversion processing device according to claim 15, wherein the post processing unit performs processing according to the following steps:
将输入经正变换处理得到的数据 8x8数据块 Υ,与 8x8矩阵 Μ做操作 II得到正变换后处理步骤的输出数据 Υ, 所述操作 II为:  Input the data obtained by the forward transformation processing 8x8 data block Υ, and the 8x8 matrix Μ operation II to obtain the output data of the forward transformation post-processing step Υ, the operation II is:
Y[ym = [Yf[yWxM[y][x] + (l « \9) - f(Y y][x])] » z xe [0, 7] ; 其中函 数 m)为:
Figure imgf000031_0001
Y[ym = [Y f [yWxM[y][x] + (l « \9) - f(Y y][x])] » z xe [0, 7] ; where the function m) is:
Figure imgf000031_0001
«表示左移, 》表示右移。  «Represents left shift," means right shift.
PCT/CN2008/071798 2007-07-29 2008-07-29 The transform method and device applying for video and image process WO2009015600A1 (en)

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
CN200710070256.X 2007-07-29
CN 200710070256 CN101106714A (en) 2007-07-29 2007-07-29 Conversion method for video and image processing
CN 200710300902 CN101282476B (en) 2007-07-29 2007-12-07 Method for transferring video and image process
CN200710300902.7 2007-12-07

Publications (1)

Publication Number Publication Date
WO2009015600A1 true WO2009015600A1 (en) 2009-02-05

Family

ID=39000349

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2008/071798 WO2009015600A1 (en) 2007-07-29 2008-07-29 The transform method and device applying for video and image process

Country Status (2)

Country Link
CN (2) CN101106714A (en)
WO (1) WO2009015600A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118368443A (en) * 2024-06-17 2024-07-19 深圳市旗云智能科技有限公司 Transformation method applied to video and image processing

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101106714A (en) * 2007-07-29 2008-01-16 浙江大学 Conversion method for video and image processing
CN102438136A (en) * 2007-12-07 2012-05-02 浙江大学 Transformation method applied to video and image processing
CN101742298B (en) * 2008-11-19 2011-07-27 中国科学院微电子研究所 Virtual decimal inverse discrete cosine transform method for embedded real-time decoder
CN101754009B (en) * 2008-11-28 2012-01-11 展讯通信(上海)有限公司 Integral inverse transform method and the device thereof
JP4594420B2 (en) * 2008-12-25 2010-12-08 キヤノン株式会社 Data conversion apparatus and control method thereof
US8885701B2 (en) * 2010-09-08 2014-11-11 Samsung Electronics Co., Ltd. Low complexity transform coding using adaptive DCT/DST for intra-prediction
CN102200963B (en) * 2010-12-28 2013-06-19 上海山景集成电路股份有限公司 Method of fixed-point inverse modified discrete cosine transform for audio decoding
CN102595112B (en) * 2011-01-12 2014-02-19 北京大学 Method for coding and rebuilding image block in video coding
US9942593B2 (en) * 2011-02-10 2018-04-10 Intel Corporation Producing decoded audio at graphics engine of host processing platform
CN104244010B (en) * 2013-06-14 2018-03-23 浙江大学 Improve the method and digital signal converting method and device of digital signal conversion performance

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN88102019A (en) * 1987-04-10 1988-12-21 菲利浦光灯制造公司 Use the television transmission system of transition coding
US20040010528A1 (en) * 2002-07-14 2004-01-15 Roger Kumar Encoding and decoding data arrays using separate pre-multiplication stages
US20040096116A1 (en) * 2002-11-20 2004-05-20 Samsung Electronics Co., Ltd. Method and apparatus for performing inverse discrete cosine transform
CN1665143A (en) * 2004-03-04 2005-09-07 上海杰得微电子有限公司 Transformation circuit and inverse transformation circuit with 8X8 two-dimensional integral number discrete cosine transform
CN1809170A (en) * 2006-01-11 2006-07-26 浙江大学 Discrete cosine transform method and apparatus applicable to image coding and video coding
CN1889690A (en) * 2006-07-12 2007-01-03 浙江大学 Discrete cosine transforming method operated for image coding and video coding
CN101106714A (en) * 2007-07-29 2008-01-16 浙江大学 Conversion method for video and image processing

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN88102019A (en) * 1987-04-10 1988-12-21 菲利浦光灯制造公司 Use the television transmission system of transition coding
US20040010528A1 (en) * 2002-07-14 2004-01-15 Roger Kumar Encoding and decoding data arrays using separate pre-multiplication stages
US20040096116A1 (en) * 2002-11-20 2004-05-20 Samsung Electronics Co., Ltd. Method and apparatus for performing inverse discrete cosine transform
CN1665143A (en) * 2004-03-04 2005-09-07 上海杰得微电子有限公司 Transformation circuit and inverse transformation circuit with 8X8 two-dimensional integral number discrete cosine transform
CN1809170A (en) * 2006-01-11 2006-07-26 浙江大学 Discrete cosine transform method and apparatus applicable to image coding and video coding
CN1889690A (en) * 2006-07-12 2007-01-03 浙江大学 Discrete cosine transforming method operated for image coding and video coding
CN101106714A (en) * 2007-07-29 2008-01-16 浙江大学 Conversion method for video and image processing

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
ZHANG CIXUN.: "Design and Implementation of Discrete Cosine Transform.", FULL TEXT DATABASE OF EXCELLENT DISSERTATIONS IN CHINA, 19 July 2006 (2006-07-19) *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118368443A (en) * 2024-06-17 2024-07-19 深圳市旗云智能科技有限公司 Transformation method applied to video and image processing

Also Published As

Publication number Publication date
CN101282476B (en) 2011-10-05
CN101106714A (en) 2008-01-16
CN101282476A (en) 2008-10-08

Similar Documents

Publication Publication Date Title
WO2009015600A1 (en) The transform method and device applying for video and image process
CN101796506B (en) Transform design with scaled and non-scaled interfaces
JP5086274B2 (en) Conversion using common factors
CA2653692C (en) Reduction of errors during computation of inverse discrete cosine transform
US5467131A (en) Method and apparatus for fast digital signal decoding
JP2003204552A5 (en)
CN108200439B (en) Method for improving digital signal conversion performance and digital signal conversion method and device
JP6357345B2 (en) Data processing apparatus and method for performing conversion between spatial domain and frequency domain when processing video data
EP1687736A1 (en) Process and device for determining a transforming element for a given transformation function, method and device for transforming a digital signal from the time domain into the frequency domain and vice versa and computer readable medium
Nagabushanam et al. Design and implementation of parallel and pipelined distributive arithmetic based discrete wavelet transform IP core
Mukherjee et al. Hardware efficient architecture for 2D DCT and IDCT using Taylor-series expansion of trigonometric functions
WO2002035380A1 (en) Faster transforms using scaled terms, early aborts, and precision refinements
TWI468015B (en) Apparatus and method for parallely processing video decoding
Li et al. An efficient hardware accelerator architecture for implementing fast IMDCT computation
JP6102707B2 (en) Digital encoding device
TWI432029B (en) Transform design with scaled and non-scaled interfaces
Balam et al. Associative processors for video coding applications
Kumar et al. POWER AND AREA OPTIMAL IMPLEMENTATION OF 2D-CSDA FOR MULTI STANDARD CORE
Itha et al. A HIGH SPEED OPTIMIZATION FOR FAST COMPUTATION OF 2-D DWT FOR COMPENSATING MEMORY ERRORS IN JPEG2000

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

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 08783791

Country of ref document: EP

Kind code of ref document: A1