CN114900703B - Universal video coding system and data processing method - Google Patents
Universal video coding system and data processing method Download PDFInfo
- Publication number
- CN114900703B CN114900703B CN202210346297.1A CN202210346297A CN114900703B CN 114900703 B CN114900703 B CN 114900703B CN 202210346297 A CN202210346297 A CN 202210346297A CN 114900703 B CN114900703 B CN 114900703B
- Authority
- CN
- China
- Prior art keywords
- data
- transformation
- unit
- instruction
- horizontal
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000003672 processing method Methods 0.000 title claims abstract description 9
- 230000009466 transformation Effects 0.000 claims abstract description 241
- 238000004364 calculation method Methods 0.000 claims abstract description 91
- 238000012545 processing Methods 0.000 claims abstract description 19
- 239000011159 matrix material Substances 0.000 claims description 63
- 238000006243 chemical reaction Methods 0.000 claims description 38
- 238000009825 accumulation Methods 0.000 claims description 16
- 238000000034 method Methods 0.000 claims description 12
- 230000001360 synchronised effect Effects 0.000 claims description 6
- 230000009977 dual effect Effects 0.000 claims 1
- 238000010586 diagram Methods 0.000 description 7
- 208000037170 Delayed Emergence from Anesthesia Diseases 0.000 description 3
- 101100425598 Solanum lycopersicum tm-1 gene Proteins 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 3
- 230000009286 beneficial effect Effects 0.000 description 2
- 238000000844 transformation Methods 0.000 description 2
- 238000004458 analytical method Methods 0.000 description 1
- 238000007630 basic procedure Methods 0.000 description 1
- 238000013501 data transformation Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000002474 experimental method Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000000638 solvent extraction Methods 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/60—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/169—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
- H04N19/18—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being a set of transform coefficients
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/60—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding
- H04N19/625—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding using discrete cosine transform [DCT]
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Physics & Mathematics (AREA)
- Discrete Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Compression Or Coding Systems Of Tv Signals (AREA)
Abstract
The invention relates to the technical field of video coding, and discloses a universal video coding system and a data processing method, wherein the universal video coding system comprises the following steps: the data selecting unit is used for acquiring data to be encoded and sending the data to be encoded to the main control unit; the main control unit is used for judging the data to be coded, generating a transformation instruction based on the judging result and sending the transformation instruction to the data selecting unit; the computing unit is used for performing horizontal transformation processing on the data to be coded based on the target transformation coefficient to obtain horizontal transformation data when the transformation type in the transformation instruction is horizontal transformation, or performing vertical transformation processing on the data to be coded based on the target transformation coefficient to obtain vertical transformation data when the transformation type in the transformation instruction is vertical transformation; the problems of large operand and complex calculation of the existing video coding system are solved by optimizing the system architecture.
Description
Technical Field
The present invention relates to the field of video coding technologies, and in particular, to a general video coding system and a data processing method.
Background
With the rapid development of video technology, in order to improve the visual quality of video, a new video coding standard is formulated, compared with the original video coding standard, the coding efficiency of the new video coding standard is increased by 50%, the gain of the new video coding standard mainly comes from the improvement of inter-frame prediction, intra-frame prediction and transformation modules in the new video coding standard, the improvement can promote coding performance, but brings additional complexity, especially in terms of computing resources, storage control and realization, when the existing general video coding system faces the new video coding standard, a great deal of logic resources are required to be consumed for operation, how to reduce the computing complexity of the system and improve the performance of transformation computation is a problem which needs to be solved at present, although a scheme for accelerating transformation coding is adopted by improving a hardware architecture, most schemes are aiming at 1-dimensional transformation, but few hardware schemes capable of realizing 2-dimensional transformation are adopted, even if limitations exist generally, and the existing video coding system has the problems of large computing amount and complex computation.
Disclosure of Invention
The invention provides a universal video coding system and a data processing method, which are used for solving the problems of large operand and complex calculation of the existing video coding system.
In order to achieve the above object, the present invention is realized by the following technical scheme:
in a first aspect, the present invention provides a universal video coding system comprising:
the data selecting unit is used for acquiring data to be encoded and sending the data to be encoded to the main control unit; the data to be encoded comprises data input by a user or horizontal conversion data read from a storage unit group;
The main control unit is used for judging the data to be coded, determining a target transformation coefficient corresponding to the data to be coded, generating a transformation instruction based on the judgment result and sending the transformation instruction to the data selection unit, wherein the judgment result comprises the target transformation coefficient and a transformation type of the data to be coded, and the transformation type comprises horizontal transformation or vertical transformation;
the data selection unit is further used for sending the transformation instruction and the data to be coded corresponding to the transformation instruction to the calculation unit;
The computing unit is used for performing horizontal transformation processing on the data to be coded based on the target transformation coefficient to obtain horizontal transformation data when the transformation type in the transformation instruction is horizontal transformation, and storing the horizontal transformation data into the storage unit group, or performing vertical transformation processing on the data to be coded based on the target transformation coefficient to obtain vertical transformation data when the transformation type in the transformation instruction is vertical transformation;
the computing unit is also used for determining the coding result of the data to be coded according to the vertical transformation data.
Optionally, the horizontal transform data is one-dimensional transform data, and the vertical transform data is two-dimensional transform data obtained by multiplexing the one-dimensional transform data by the computing unit based on the target transform coefficient and performing vertical transform processing.
Optionally, the data selecting unit is further configured to generate a data scheduling instruction according to the determination result, and send the data scheduling instruction to the data scheduling unit; the system further comprises:
The data scheduling unit is used for reading the horizontal transformation data and the target transformation coefficient in the storage unit group according to the data scheduling instruction and sending the reading result to the data selecting unit.
Optionally, the computing unit includes a 1-dimensional 4-point transformation computing unit, and the 1-dimensional 4-point transformation computing unit includes 4 independent transformation computing modules;
And 4 independent transformation calculation modules are used for completing transformation calculation of 1 piece of data to be coded in parallel.
Optionally, the computing unit further includes a 4×4 matrix accumulating unit;
The main control unit is also used for generating an accumulation signal to the 4 multiplied by 4 matrix accumulation unit according to the transformation type of the coded data;
the 4×4 matrix accumulating unit performs an accumulating operation on the calculation results of the 4 independent transformation calculation modules according to the accumulating signals.
Optionally, the computing unit further includes a4×4 register array and an addition shift unit;
The 4×4 register array is used for storing the data to be encoded, or is used for sending the stored data to be encoded to the 1-dimensional 4-point transformation calculation unit;
The addition shift unit is used for performing bit width scaling on the horizontal transformation data and the vertical transformation data.
Optionally, the storage unit group includes a first storage unit and a second storage unit, where the first storage unit is connected to the data selection unit, the data scheduling unit and the calculation unit at the same time, and the second storage unit is connected to the data selection unit and the data scheduling unit at the same time;
The first storage unit is used for storing the horizontal transformation data output by the calculation unit;
the second storage unit is used for storing target transformation coefficients used in the calculation process of the calculation unit.
Optionally, the first memory unit includes a synchronous dual-port 256bit×136RAM, and the second memory unit includes a synchronous single-port 128bit×383ROM;
the width of the first storage unit is 256 bits, and each row is used for storing 256bit data;
the width of the second storage unit is 128 bits, and each row is used for storing the target transformation coefficient.
In a second aspect, an embodiment of the present application provides a data processing method, where the method is applied to the universal video coding system according to any one of the first aspect, and the method includes:
the method comprises the steps of obtaining data to be encoded by a data selection unit, and sending the data to be encoded to a main control unit;
Determining a target transformation coefficient corresponding to the data to be encoded by judging the data to be encoded through a main control unit, generating a transformation instruction based on the judging result, and sending the transformation instruction to a data selecting unit, wherein the judging result comprises the target transformation coefficient and a transformation type of the data to be encoded, and the transformation type comprises horizontal transformation or vertical transformation;
The transformation instruction and the data to be coded corresponding to the transformation instruction are sent to a computing unit through a data selecting unit;
The calculation unit performs horizontal transformation processing on the data to be coded based on the target transformation coefficient to obtain horizontal transformation data under the condition that the transformation type in the transformation instruction is horizontal transformation, and stores the horizontal transformation data into the storage unit group;
and the computing unit performs vertical transformation processing on the data to be coded based on the target transformation coefficient to obtain vertical transformation data under the condition that the transformation type in the transformation instruction is vertical transformation, and determines the coding result of the data to be coded according to the vertical transformation data.
The beneficial effects are that:
According to the universal video coding system provided by the invention, the data input by a user is input into the computing unit through the data selecting unit, the computing unit carries out one-dimensional horizontal transformation on the data to be coded, then the data selecting unit sends the horizontal transformation data subjected to the one-dimensional horizontal transformation to the computing unit, the computing unit carries out one-dimensional vertical transformation on the horizontal transformation data to obtain vertical transformation data, the coding result can be obtained according to the vertical transformation data, the data selecting unit inputs the data to be coded into the computing unit, the computing unit can play a multiplexing effect, no-delay conversion of the one-dimensional horizontal transformation and the one-dimensional vertical transformation is realized through multiplexing the computing unit, the utilization rate and the throughput of the system are greatly improved, meanwhile, the two-dimensional transformation of the data input by the user is realized through the two one-dimensional transformations, and the use amount of hardware resources can be better reduced on the premise of ensuring the processing performance of the system.
Drawings
Fig. 1 is a schematic diagram of a general video coding system according to a preferred embodiment of the present invention;
FIG. 2 is a schematic diagram of a computing unit according to a preferred embodiment of the present invention;
FIG. 3 is a schematic diagram of a 1-dimensional 4-point transform unit according to a preferred embodiment of the present invention;
FIG. 4 is a schematic diagram of a transformation calculation module according to a preferred embodiment of the present invention;
FIG. 5 is a schematic diagram of a second memory cell according to a preferred embodiment of the present invention;
FIG. 6 is a diagram of a read address generation and scheduling multiplexing of a second memory cell in accordance with a preferred embodiment of the present invention;
FIG. 7 is a diagram of a read address generation and scheduling multiplexing of a first memory cell in accordance with a preferred embodiment of the present invention;
FIG. 8 is a flow chart of a data processing method according to a preferred embodiment of the present invention;
FIG. 9 is a flowchart of a transformation calculation according to another embodiment of the present invention.
Detailed Description
The following description of the present invention will be made clearly and fully, and it is apparent that the embodiments described are only some, but not all, of the embodiments of the present invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Unless defined otherwise, technical or scientific terms used herein should be given the ordinary meaning as understood by one of ordinary skill in the art to which this invention belongs. The terms "first," "second," and the like, as used herein, do not denote any order, quantity, or importance, but rather are used to distinguish one element from another. Likewise, the terms "a" or "an" and the like do not denote a limitation of quantity, but rather denote the presence of at least one. The terms "connected" or "connected," and the like, are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. "upper", "lower", "left", "right", etc. are used merely to indicate a relative positional relationship, which changes accordingly when the absolute position of the object to be described changes.
Referring to fig. 1, an embodiment of the present application provides a universal video coding system, including:
the data selecting unit is used for acquiring data to be encoded and sending the data to be encoded to the main control unit; the data to be encoded comprises data input by a user or horizontal conversion data read from a storage unit group;
The main control unit is used for judging the data to be coded, determining a target transformation coefficient corresponding to the data to be coded, generating a transformation instruction based on the judgment result and sending the transformation instruction to the data selection unit, wherein the judgment result comprises the target transformation coefficient and a transformation type of the data to be coded, and the transformation type comprises horizontal transformation or vertical transformation;
the data selection unit is further used for sending the transformation instruction and the data to be coded corresponding to the transformation instruction to the calculation unit;
The computing unit is used for performing horizontal transformation processing on the data to be coded based on the target transformation coefficient to obtain horizontal transformation data when the transformation type in the transformation instruction is horizontal transformation, and storing the horizontal transformation data into the storage unit group, or performing vertical transformation processing on the data to be coded based on the target transformation coefficient to obtain vertical transformation data when the transformation type in the transformation instruction is vertical transformation;
the computing unit is also used for determining the coding result of the data to be coded according to the vertical transformation data.
In the above embodiment, after receiving the data input by the user, the data selecting unit sends the data input by the user to the main control unit, the main control unit determines the data input by the user and sends the data selecting unit a conversion instruction according to the determination result, the data selecting unit sends the data input by the user to the calculating unit according to the conversion instruction, and simultaneously the data selecting unit also generates a corresponding data scheduling instruction according to the conversion instruction and sends the data scheduling instruction to the data scheduling unit, the data scheduling unit reads the target conversion coefficient in the storage unit group according to the data scheduling instruction and sends the read result to the data selecting unit, the data selecting unit sends the target conversion coefficient and the data input by the user to the calculating unit together, the calculating unit performs horizontal conversion according to the target conversion coefficient and the data input by the user to generate horizontal conversion data, and sends the horizontal conversion data to the storage unit group for storage, and simultaneously the calculating unit generates a calculation completion signal and sends the main control unit after the horizontal conversion is completed, the main control unit determines the signal and sends the conversion instruction to the data selecting unit again, the data selecting unit regenerates the corresponding data scheduling instruction according to the conversion instruction and sends the data scheduling instruction to the data scheduling unit, and sends the data scheduling instruction to the data selecting unit to the data unit, the target conversion coefficient is read by the target conversion coefficient and the data selecting unit, the target conversion coefficient is sent to the data selecting unit and the target conversion coefficient is vertical to the target conversion unit, the target conversion coefficient is generated and the target conversion coefficient is calculated and the target conversion coefficient is vertical to be converted to the target converted and converted to the target conversion unit and the target conversion coefficient is vertical to be converted to the target conversion data and converted to the target conversion unit and converted data unit and vertical conversion data is stored, determining a coding result according to the vertical transformation data;
Through multiplexing the calculation unit, the one-dimensional horizontal transformation and the one-dimensional vertical transformation are realized without time delay, the utilization rate and throughput of the system are greatly improved, and meanwhile, the two-dimensional transformation of input data is realized through the two one-dimensional transformations, so that the use amount of hardware resources can be better reduced on the premise of ensuring the processing performance of the system.
Optionally, the horizontal transform data is one-dimensional transform data, and the vertical transform data is two-dimensional transform data obtained by multiplexing the one-dimensional transform data by the computing unit based on the target transform coefficient and performing vertical transform processing.
In the embodiment, the utilization rate of hardware resources is reduced in a mode of multiplexing the calculation unit, and meanwhile, the conversion from one-dimensional conversion data to two-dimensional conversion data is realized by utilizing two one-dimensional conversion calculations, so that the calculated amount in the conversion of the two-dimensional conversion data is reduced, and the calculation efficiency is improved.
Optionally, the data selecting unit is further configured to generate a data scheduling instruction according to the determination result, and send the data scheduling instruction to the data scheduling unit; the system further comprises:
The data scheduling unit is used for reading the horizontal transformation data and the target transformation coefficient in the storage unit group according to the data scheduling instruction and sending the reading result to the data selecting unit.
In the above embodiment, by reading the horizontal transform data and the target transform coefficients in the storage unit group by the data selecting unit, the calculating unit can perform time division multiplexing calculation, and select the corresponding target transform coefficient according to the type of the data to be encoded to perform corresponding transform calculation, so that the transform calculation result is more accurate, where the target transform coefficient includes three integer transform coefficients, namely, a DCT2 transform coefficient, a DST7 transform coefficient and a DCT8 transform coefficient.
Referring to fig. 2-4, optionally, the computing unit includes a 1-dimensional 4-point transform computing unit, where the 1-dimensional 4-point transform computing unit includes 4 independent transform computing modules;
And 4 independent transformation calculation modules are used for completing transformation calculation of 1 piece of data to be coded in parallel.
In the above embodiment, the 1-dimensional 4-point transform calculation unit is composed of 4 independent transform calculation modules, each transform calculation module has 4 output ports, and the 4 independent transform calculation modules share 16 output ports, which are the same as the data size of 1 piece of 4×4 matrix data, so that the 1-dimensional 4-point transform calculation unit can just complete the transform operation of 1 piece of 4×4 matrix data in parallel every cycle, thereby being beneficial to improving the speed of transform calculation.
Optionally, the computing unit further includes a 4×4 matrix accumulating unit;
The main control unit is also used for generating an accumulation signal to the 4 multiplied by 4 matrix accumulation unit according to the transformation type of the coded data;
the 4×4 matrix accumulating unit performs an accumulating operation on the calculation results of the 4 independent transformation calculation modules according to the accumulating signals.
In the above embodiment, the system can implement the transformation calculation from 4×4 matrix data to 64×64 matrix data, because the 1-dimensional 4-point transformation calculation unit can only complete 1×4 matrix data operation in parallel at a time, when the matrix data amount is greater than 4×4 matrix data, it is necessary to accumulate the matrix data after the calculation by the 4×4 matrix accumulation unit, thereby implementing the matrix transformation calculation when the data amount is greater than 4×4 matrix data, the main control unit divides the data to be encoded into n pieces of 4×4 matrix data according to the transformation type of the data to be encoded, and generates an accumulation signal according to the transformation type of the data to be encoded, and sends the accumulation signal to the 4×4 matrix accumulation unit, where n pieces of 4×4 matrix data after transformation calculation are accumulated according to the accumulation signal, n is a positive integer, and the 4×4 matrix accumulation unit can expand the calculation range of the calculation unit while not affecting the matrix data transformation operation.
Optionally, the computing unit further includes a4×4 register array and an addition shift unit;
The 4×4 register array is used for storing the data to be encoded, or is used for sending the stored data to be encoded to the 1-dimensional 4-point transformation calculation unit;
The addition shift unit is used for performing bit width scaling on the horizontal transformation data and the vertical transformation data.
In the above embodiment, when the calculation unit calculates the data with the data size larger than the 4×4 matrix data, since the calculation unit needs to perform the accumulation operation after the calculation is completed, after the 4×4 matrix data operation is completed for the 4-point conversion calculation unit 1, the operation result is stored in the 4×4 register array, so that the 4×4 matrix accumulation unit performs the accumulation operation after the calculation is completed, the data loss can be avoided, the number of times of different data in the calculation process is different, the data bit widths after the calculation is completed are unequal, and the addition shift unit performs the bit width scaling on the calculation result after all the calculation is completed, thereby improving the effectiveness of the data and avoiding the data failure.
Referring to fig. 5 to 7, optionally, the storage unit group includes a first storage unit and a second storage unit, where the first storage unit is connected to the data selecting unit, the data scheduling unit, and the calculating unit at the same time, and the second storage unit is connected to the data selecting unit and the data scheduling unit at the same time;
The first storage unit is used for storing the horizontal transformation data output by the calculation unit;
the second storage unit is used for storing target transformation coefficients used in the calculation process of the calculation unit.
In the above embodiment, by dividing the storage unit into the first storage unit and the second storage unit, the target transform coefficient and the horizontal transform data can be stored separately, so that the data scheduling unit is prevented from data collision when the target transform coefficient and the horizontal transform data are read, and the two sets of data can be ensured not to affect each other in the process of storing the target transform coefficient and the horizontal transform data.
Optionally, the first memory unit includes a synchronous dual-port 256bit×136RAM, and the second memory unit includes a synchronous single-port 128bit×383ROM;
the width of the first storage unit is 256 bits, and each row is used for storing 256bit data;
the width of the second storage unit is 128 bits, and each row is used for storing the target transformation coefficient.
In the above embodiment, the storage width of each row of the first storage unit and the second storage unit is defined, so that each row of the first storage unit can just store data adapted to the data amount of the data to be encoded, and each row of the second storage unit can just store data adapted to the data amount of the target transform coefficient, thereby facilitating the data scheduling unit to read the target transform coefficient and the horizontal transform coefficient.
Referring to fig. 8, an embodiment of the present application further provides a data processing method, which is applied to the above-mentioned universal video coding system, and includes:
the method comprises the steps of obtaining data to be encoded by a data selection unit, and sending the data to be encoded to a main control unit;
Determining a target transformation coefficient corresponding to the data to be encoded by judging the data to be encoded through a main control unit, generating a transformation instruction based on the judging result, and sending the transformation instruction to a data selecting unit, wherein the judging result comprises the target transformation coefficient and a transformation type of the data to be encoded, and the transformation type comprises horizontal transformation or vertical transformation;
The transformation instruction and the data to be coded corresponding to the transformation instruction are sent to a computing unit through a data selecting unit;
The calculation unit performs horizontal transformation processing on the data to be coded based on the target transformation coefficient to obtain horizontal transformation data under the condition that the transformation type in the transformation instruction is horizontal transformation, and stores the horizontal transformation data into the storage unit group;
and the computing unit performs vertical transformation processing on the data to be coded based on the target transformation coefficient to obtain vertical transformation data under the condition that the transformation type in the transformation instruction is vertical transformation, and determines the coding result of the data to be coded according to the vertical transformation data.
Referring to fig. 9, in still another embodiment, the data interfaces of the residual block and the coefficient block in the 2-dimensional MTS processor architecture are 4×4 matrices, for m×n residual matrices, M and N are positive integers greater than 4, and the input needs to be sequentially performed according to 4×4 size blocks, and the 2-dimensional transform calculation and operation sequence of the 4×4 to 64×64 residual matrices can be divided into 2 cases based on the unified transform formula, the designed 2-dimensional MTS processor architecture and the large-size transform block discard high-frequency coefficient technology:
(1) When the residual matrix size is 4n×4m (n=1, 2,4,8; m=1, 2,4, 8), the coefficient matrix size is 4m×4m. The 4nX4m residual matrix is divided into n X m 4 residual sub-matrices (S00, …, sn-1, m-1, and S00, …, sn-1, m-1 are coefficients in the residual sub-matrix), and similarly the 4mX4m coefficient matrix is divided into m X m 4 coefficient sub-matrices (T00, …, tm-1, m-1, and T00, …, tm-1, m-1 are coefficients in the coefficient sub-matrix).
When the residual matrix size is 4n×4m (n=1, 2,4,8; m=1), the coefficient matrix size is 4×4. When the residual matrix size is 4n×4m (n=1, 2,4,8; m=1), partitioning into n 4×4 residual submatrices, wherein in n× 2 clock cycles where i_valid is valid, i_valid is one input port of the control unit, 14×4 residual submatrix is introduced into i_src input in each clock cycle, and i_src is one input port of the data selecting unit; the 4×4 coefficient matrix is introduced into the i_tr input in the 1 st clock cycle, and then the i_tr data is kept unchanged in n×m 2 -1 clock cycles, i_tr is another input port of the data selection unit, and the processor completes 1-dimensional horizontal transformation of the 1-dimensional residual matrix for 14 n×4m (n=1, 2,4,8; m=1) every n×m 2 clock cycles.
When the residual matrix size is 4n×4m (n= 1;m =2, 4, 8), of the n×m 2 clock cycles where i_valid is valid, a 4×4 coefficient submatrix (T00, …, T0, m-1, …, tm-1,0, …, tm-1, m-1) is introduced into the i_tr input in turn each cycle, and a 4n×4m (n= 1;m =2, 4, 8) residual matrix (consisting of 4×4 residual submatrices S00, …, sn-1, 0) is also introduced into the i_src input in turn each cycle. Note here that the 4n×4m (n= 1;m =2, 4, 8) residual matrix data will be multiplexed m times. The processor calculation operation is shown in the gray part of fig. 9, where o_valid is high and the 4×4 output sub-matrices Y00, …, ym-1,0 are sequentially output per cycle with o_dst as one output port of the control unit and o_dst as one output port of the calculation unit. Thus, the processor performs a 1-dimensional horizontal transformation of the 1-dimensional 4n×4m (n= 1;m =2, 4, 8) residual matrix every n×m 2 (n=1) clock cycles. Similarly, the transformation calculation of the 4n×4m (n=2, 4,8; m=2, 4, 8) residual matrix is completed by iterating the basic procedure of the gray part in fig. 9. When the residual matrix size is 4n×4m (n=2, 4,8; m=2, 4, 8), the 4m×4n (n=2, 4,8; m=2, 4, 8) output matrix may be divided into n columns according to the 4m×4n (n= 1;m =2, 4, 8) submatrices. To calculate the column output result for the first 4m x 4n (n= 1;m =2, 4, 8) matrix size, the basic process in fig. 9 is iterated 1 time. Thus, the entire 1-dimensional horizontal transformation of the 4n×4m (n=2, 4,8; m=2, 4, 8) residual matrix requires m 2×n=n*m2 clock cycles to complete.
The 2-dimensional transform calculation of the 4n×4m (n=1, 2,4,8; m=1, 2,4, 8) residual matrix is realized by a 1-dimensional horizontal transform and a 1-dimensional vertical transform in succession. The 1-dimensional horizontal transformation calculation result of the 4n×4m residual matrix is a 4m×4n1-dimensional output matrix and is stored in the RAM storage unit. Then, a 1-dimensional vertical transformation is performed on the 4mx4n output matrix and a 4nx4m2-dimensional output matrix is calculated. It is noted that the 1-dimensional vertical transform computation amount in the 2-dimensional transform of the 4n×4m residual matrix is the same as the 1-dimensional horizontal transform computation amount of the 4m×4n residual matrix. Therefore, the processor reads the horizontal conversion result by using the designated read address sequence and the multiplexing number as the input data of the 1-dimensional vertical conversion. Finally, the processor may complete a 2-dimensional transform calculation of a 4n×4m (n=1, 2,4,8; m=1, 2,4, 8) residual matrix.
(2) For 1-dimensional transform computation of a 4n×4m (n=1, 2,4,8; m=16) residual matrix, a 4n×4m (n=16; m=1, 2,4, 8) residual matrix, a 4n×4m (n=16; m=16) residual matrix, the high-frequency coefficient technique is discarded by adopting a large-size transform block to reduce the computational complexity. In 2-dimensional transformation calculation of a 4n×4m (n=1, 2,4,8; m=16) residual block, 1-dimensional horizontal transformation calculation complexity is reduced by 1/2, and 1-dimensional vertical transformation calculation complexity is unchanged. Thus, the processor performs a 2-dimensional transform calculation of 14 n x 4m (n=1, 2,4,8; m=16) residual matrix every n x m 2/2+m*n2 clock cycles, where n x m 2/2 is a 1-dimensional horizontal calculation use period and m x n 2 is a subsequent 1-dimensional vertical calculation use period.
In 2-dimensional transformation calculation of a 4n×4m (n=16; m=1, 2,4, 8) residual block, 1-dimensional horizontal transformation calculation complexity is reduced by 1/2, and 1-dimensional vertical transformation calculation complexity is also reduced by 1/2. Thus, the processor performs a 2-dimensional transform calculation of the residual matrix of 14 n x 4m (n=16, m=1, 2,4, 8) every n x m 2/2+m*n2/2 clock cycles, where n x m 2/2 is the 1-dimensional horizontal calculation use period and m x n 2/2 is the subsequent 1-dimensional vertical calculation use period.
Similarly, in 2-dimensional transformation calculation of the 4n×4m (n=16; m=16) residual matrix, the 1-dimensional horizontal transformation calculation complexity is reduced by 3/4, and the 1-dimensional vertical transformation calculation complexity is also reduced by 1/2. Thus, the processor performs a 2-dimensional transform calculation of the residual matrix of 14 n x 4m (n=16 m=16) every n x m 2/4+m*n2/2 clock cycles, where n x m 2/4 is a 1-dimensional horizontal calculation use period and m x n 2/2 is a subsequent 1-dimensional vertical calculation use period.
The foregoing describes in detail preferred embodiments of the present invention. It should be understood that numerous modifications and variations can be made in accordance with the concepts of the invention by one of ordinary skill in the art without undue burden. Therefore, all technical solutions which can be obtained by logic analysis, reasoning or limited experiments based on the prior art by the person skilled in the art according to the inventive concept shall be within the scope of protection defined by the claims.
Claims (9)
1. A universal video coding system, comprising:
the data selecting unit is used for acquiring data to be encoded and sending the data to be encoded to the main control unit; the data to be encoded comprises data input by a user or horizontal conversion data read from a storage unit group;
The main control unit is used for judging the data to be coded, determining a target transformation coefficient corresponding to the data to be coded, generating a transformation instruction based on the judgment result and sending the transformation instruction to the data selection unit, wherein the judgment result comprises the target transformation coefficient and a transformation type of the data to be coded, and the transformation type comprises horizontal transformation or vertical transformation;
the data selection unit is further used for sending the transformation instruction and the data to be coded corresponding to the transformation instruction to the calculation unit;
The computing unit is used for performing horizontal transformation processing on the data to be coded based on the target transformation coefficient to obtain horizontal transformation data when the transformation type in the transformation instruction is horizontal transformation, and storing the horizontal transformation data into the storage unit group, or performing vertical transformation processing on the data to be coded based on the target transformation coefficient to obtain vertical transformation data when the transformation type in the transformation instruction is vertical transformation;
the computing unit is also used for determining the coding result of the data to be coded according to the vertical transformation data.
2. The general video coding system according to claim 1, wherein the horizontal transform data is one-dimensional transform data, and the vertical transform data is two-dimensional transform data obtained by the calculation unit performing vertical transform processing by multiplexing the one-dimensional transform data based on the target transform coefficient.
3. The universal video coding system according to claim 1, wherein the data selection unit is further configured to generate a data scheduling instruction according to the determination result, and send the data scheduling instruction to the data scheduling unit; the system further comprises:
The data scheduling unit is used for reading the horizontal transformation data and the target transformation coefficient in the storage unit group according to the data scheduling instruction and sending the reading result to the data selecting unit.
4. The universal video coding system of claim 1, wherein the computing unit comprises a 1-dimensional 4-point transform computing unit, the 1-dimensional 4-point transform computing unit comprising 4 independent transform computing modules;
And 4 independent transformation calculation modules are used for completing transformation calculation of 1 piece of data to be coded in parallel.
5. The universal video coding system according to claim 4, wherein the computing unit further comprises a4 x 4 matrix accumulation unit;
The main control unit is also used for generating an accumulation signal to the 4 multiplied by 4 matrix accumulation unit according to the transformation type of the data to be coded;
the 4×4 matrix accumulating unit performs an accumulating operation on the calculation results of the 4 independent transformation calculation modules according to the accumulating signals.
6. The universal video coding system according to claim 4, wherein the computing unit further comprises a4 x 4 register array and an addition shift unit;
The 4×4 register array is used for storing the data to be encoded, or is used for sending the stored data to be encoded to the 1-dimensional 4-point transformation calculation unit;
The addition shift unit is used for performing bit width scaling on the horizontal transformation data and the vertical transformation data.
7. The universal video coding system of claim 3, wherein the set of storage units comprises a first storage unit and a second storage unit, the first storage unit being coupled to the data selection unit, the data scheduling unit, and the computing unit simultaneously, the second storage unit being coupled to the data selection unit and the data scheduling unit simultaneously;
The first storage unit is used for storing the horizontal transformation data output by the calculation unit;
the second storage unit is used for storing target transformation coefficients used in the calculation process of the calculation unit.
8. The universal video coding system of claim 7, wherein the first memory unit comprises a synchronous dual port 256bit x 136RAM and the second memory unit comprises a synchronous single port 128bit x 383ROM;
the width of the first storage unit is 256 bits, and each row is used for storing 256bit data;
the width of the second storage unit is 128 bits, and each row is used for storing the target transformation coefficient.
9. A data processing method applied to the universal video coding system according to any one of claims 1 to 7, comprising:
the method comprises the steps of obtaining data to be encoded by a data selection unit, and sending the data to be encoded to a main control unit;
Determining a target transformation coefficient corresponding to the data to be encoded by judging the data to be encoded through a main control unit, generating a transformation instruction based on the judging result, and sending the transformation instruction to a data selecting unit, wherein the judging result comprises the target transformation coefficient and a transformation type of the data to be encoded, and the transformation type comprises horizontal transformation or vertical transformation;
The transformation instruction and the data to be coded corresponding to the transformation instruction are sent to a computing unit through a data selecting unit;
The calculation unit performs horizontal transformation processing on the data to be coded based on the target transformation coefficient to obtain horizontal transformation data under the condition that the transformation type in the transformation instruction is horizontal transformation, and stores the horizontal transformation data into the storage unit group;
and the computing unit performs vertical transformation processing on the data to be coded based on the target transformation coefficient to obtain vertical transformation data under the condition that the transformation type in the transformation instruction is vertical transformation, and determines the coding result of the data to be coded according to the vertical transformation data.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210346297.1A CN114900703B (en) | 2022-03-31 | 2022-03-31 | Universal video coding system and data processing method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210346297.1A CN114900703B (en) | 2022-03-31 | 2022-03-31 | Universal video coding system and data processing method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114900703A CN114900703A (en) | 2022-08-12 |
CN114900703B true CN114900703B (en) | 2024-07-23 |
Family
ID=82715915
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210346297.1A Active CN114900703B (en) | 2022-03-31 | 2022-03-31 | Universal video coding system and data processing method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114900703B (en) |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111669580A (en) * | 2019-03-09 | 2020-09-15 | 杭州海康威视数字技术股份有限公司 | Method, decoding end, encoding end and system for encoding and decoding |
CN112055210A (en) * | 2020-08-19 | 2020-12-08 | 浙江大华技术股份有限公司 | Video image processing method, encoder and computer readable storage medium |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
AU2018204786A1 (en) * | 2018-06-29 | 2020-01-16 | Canon Kabushiki Kaisha | Method, apparatus and system for encoding and decoding a transformed block of video samples |
CN116866579A (en) * | 2018-08-08 | 2023-10-10 | Lg电子株式会社 | Encoding/decoding method, storage medium, and transmission method |
-
2022
- 2022-03-31 CN CN202210346297.1A patent/CN114900703B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111669580A (en) * | 2019-03-09 | 2020-09-15 | 杭州海康威视数字技术股份有限公司 | Method, decoding end, encoding end and system for encoding and decoding |
CN112055210A (en) * | 2020-08-19 | 2020-12-08 | 浙江大华技术股份有限公司 | Video image processing method, encoder and computer readable storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN114900703A (en) | 2022-08-12 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8345764B2 (en) | Motion estimation device having motion estimation processing elements with adder tree arrays | |
JP2959104B2 (en) | Signal processor | |
CN103369326A (en) | Transition coder applicable to HEVC ( high efficiency video coding) standards | |
CN101729893A (en) | MPEG multi-format compatible decoding method based on software and hardware coprocessing and device thereof | |
CN101426134A (en) | Hardware device and method for video encoding and decoding | |
CN1268231A (en) | Variable block size 2-dimensional inverse discrete cosine transform engine | |
CN114900703B (en) | Universal video coding system and data processing method | |
CN108259919B (en) | Hardware system for rapidly realizing 8x8DCT (discrete cosine transform) | |
CN113032723B (en) | Matrix multiplier realizing method and matrix multiplier device | |
JPH10504408A (en) | Apparatus and method for performing inverse discrete cosine transform | |
JPS622721A (en) | Coding and decoding device for picture signal | |
CN107368459B (en) | Scheduling method of reconfigurable computing structure based on arbitrary dimension matrix multiplication | |
US5555321A (en) | Image data binary coding method and apparatus | |
CN101640791A (en) | Decoding method, decoding device and decoder | |
CN100486333C (en) | Interpolation arithmetic device and method | |
CN104053011B (en) | It is applied to the 2-d discrete wavelet inverse converter in JPEG2000 decoder | |
CN102447898B (en) | Method for realizing KLT (Karhunen-Loeve Transform) by means of FPGA (Field Program Gate Array) | |
US5930403A (en) | Method and apparatus for half pixel SAD generation utilizing a FIFO based systolic processor | |
CN102006478A (en) | Inverse transformation method and device of video decoding | |
CN103327332B (en) | The implementation method of 8 × 8IDCT conversion in a kind of HEVC standard | |
KR100246033B1 (en) | A real-time high speed full search block matching motion estimation processor | |
US6668087B1 (en) | Filter arithmetic device | |
CN111787333B (en) | Motion search method and device for video coding | |
CN116560733B (en) | Space target feature on-orbit real-time parallel LU decomposition computing system and method | |
CN115756613B (en) | Sine interpolation method and device based on vectorization processing and SAR radar |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |