Summary of the invention
Main purpose of the present invention provides a kind of discrete cosine conversion integration module of practicing thrift circuit resource, improving the integrated level of system, and it can accomplish discrete cosine transform, inverse discrete cosine transform, quantification, four kinds of computings of re-quantization and computing combination thereof;
An also purpose of the present invention provides a kind of discrete cosine conversion integration module that improves data processing speed;
Another main purpose of the present invention provides a kind of computing combination method of discrete cosine conversion integration module, and it can accomplish discrete cosine transform, inverse discrete cosine transform, quantification, four kinds of computings of re-quantization and computing combination thereof.
For realizing above-mentioned purpose, discrete cosine conversion integration module provided by the invention comprises input/output device, control device, quantification/re-quantization coefficient table storage device, image data storage apparatus, quantification/re-quantization device, discrete cosine transform/inverter and three selectors.Wherein, image data storage apparatus comprises two storage areas.
The computing combination method of discrete cosine conversion integration module provided by the present invention may further comprise the steps: the first step, and control device starts computing, from image data storage apparatus, reads the data that need conversion; Second step; Judge whether to carry out inverse discrete cosine transform: if do not carry out inverse discrete cosine transform, then enter data into and carry out discrete cosine transform in discrete cosine transform/inverter, after conversion finishes; Judge whether to carry out quantization operations; If do not quantize, then directly result data is deposited in the image data storage apparatus, carry out quantization operations if desired; Then quantification/re-quantization device carries out quantization operation according to the control information of control device, and then result data is deposited in the image data storage apparatus; Carry out inverse discrete cosine transform if desired; Then further judge whether to carry out the re-quantization computing,, then carry out inverse discrete cosine transform by discrete cosine transform/inverter if need not carry out the re-quantization computing; And the inverse transformation result data deposited in the image data storage apparatus; Carry out the re-quantization computing if desired, quantification/re-quantization device carries out the re-quantization operation according to the control information of control device, deposits result data in image data storage apparatus then.
Discrete cosine conversion integration module provided by the present invention with and the combinatorial operation method through control device three selectors are controlled; In a circuit module, realize discrete cosine transform, inverse discrete cosine transform, quantification, four kinds of computings of re-quantization and computing combination thereof, practiced thrift circuit resource, wherein; Discrete cosine transform is with quantize can concurrent operation; Inverse discrete cosine transform and re-quantization also can concurrent operations, simultaneously, because image data storage apparatus is divided into two storage areas; Support the input and the work of computing independent parallel of view data, improved data processing speed.
Embodiment
Referring to shown in Figure 1, Fig. 1 has disclosed the circuit structure in the coding/decoding system that discrete cosine conversion integration module 1 according to the invention is applied to comprise central processing unit 2.Discrete cosine conversion integration module 1 of the present invention (the phantom wire frame is inner to be divided) comprises input/output device 100, control device 110, quantification/re-quantization coefficient table storage device 120, image data storage apparatus 130, quantification/re-quantization device 140, discrete cosine transform/inverter 160 and three selectors 150,151,152.Image data storage apparatus 130 comprise two can be by the storage area 131,132 of concurrent access; Two storage areas 131,132 can be transfused to respectively/output device 100, discrete cosine transform/inverter 160 or quantification/re-quantization device visit 140 visits.
Input/output device 100 is connected with control device 110, quantification/re-quantization coefficient table storage device 120, image data storage apparatus 130 respectively, and quantification/re-quantization device 140 is connected with quantification/re-quantization coefficient table storage device 120.Connect mutually through three selectors 150,151,152 between image data storage apparatus 130, quantification/re-quantization device 140 and the discrete cosine transform/inverter 160, concrete connected mode is introduced hereinafter in detail.
Central processing unit 2 can be through input/output device 100 to control device 110 write control informations or read state information; Also can also write coefficient table through input/output device 100 vectorizations/re-quantization coefficient table storage device 120 through the data of input/output device 100 after image data storage apparatus 130 writes the data that need conversion or reads conversion.
Quantification/re-quantization device 140 and discrete cosine transform/inverter 160 can take out data from storage area 132 or 131, and under the control of control device 110, change, and the result after the conversion deposits in storage area 132 or 131.Meanwhile, the result data after central processing unit 2 can write the data that need conversion and read conversion storage area 131 or 132.Finish in data conversion completion and central processing unit visit, can carry out the conversion of next group data then through the mapping relations of two storage areas 131,132 of control device 110 exchanges.The stagnation that the working method of the storage area 131,132 in the discrete cosine conversion integration module 1 of the present invention has avoided available technology adopting fifo registers input and output data to be caused.
Input/output device 100 receives from central processing unit 2 and quantizes that coefficient table deposits quantifications/re-quantization coefficient table storage device 120 in, the reception view data deposits image data storage apparatus 130 (storage area 131 or storage area 132) in, and receiving control information deposits control device 110 in.
Element in the frame of broken lines 3 among Fig. 1 is that controlled device 110 is controlled; Mapping, control quantification/re-quantization device 140 that control device 110 carries out storage area 131 and 132 according to the control information of central processing unit 2 are selected quantification/re-quantization mode; Control discrete cosine transform/inverter 160 is selected alternative types, and control selector 150,151 and 152 is selected data flow.
Selector 150,151,152 includes two inputs and an output; In the present embodiment; Interconnect between each selector and image data storage apparatus 130, quantification/re-quantization device 140, the discrete cosine transform/inverter 160; Concrete annexation is following: the output of selector 150 connects image data storage apparatus 130, and its two inputs connect quantification/re-quantization device 140 and discrete cosine transform/inverter 160 respectively; The output of selector 151 connects quantification/re-quantization device 140, and its two inputs connect image data storage apparatus 130 and discrete cosine transform/inverter 160 respectively; The output of selector 152 links discrete cosine transform/inverter 160, and its two inputs connect image data storage apparatus 130 and quantification/re-quantization device 140 respectively.
Selector 150,151 and 152 can carry out " gating " respectively to the data flow between image data storage apparatus 130, quantification/re-quantization device 140 and the discrete cosine transform/inverter 160; Thereby accomplish the discrete cosine transform of view data; Inverse discrete cosine transform quantizes or the re-quantization computing.
Through description respectively to above-mentioned each main element; The course of work of discrete cosine conversion integration module of the present invention can roughly be described below: control device 110 is handled 2 instruction startup conversion according to central authorities; Reading of data from image data storage apparatus 130; And control selector 150,151 and 152 is input to quantification/re-quantization device 140 to data and discrete cosine transform/inverter 160 is handled; Discrete cosine transform/inverter 160 selects corresponding mapping mode to carry out conversion according to the control information of control device 110; Whether quantification/re-quantization device 140 is also selected to quantize or the re-quantization computing according to the control information of control device 110; Quantize if desired or the re-quantization computing, then select in corresponding quantization/re-quantization mode and quantification/re-quantization coefficient table storage device 120 corresponding coefficient table to handle, then calculated result is deposited in the image data storage apparatus 130.After corresponding operation finished, control device 110 was notified central processing unit 2 through sending the mode of interrupting or the end mark position being set, and central processing unit 2 is read transformation results through input/output device 100 from image data storage apparatus 130.
Invent said discrete cosine conversion integration module 1 and can accomplish discrete cosine transform, inverse discrete cosine transform, quantification, four kinds of computings of re-quantization and computing combination, the concrete working method of four kinds of main computing combinations is narrated respectively as follows:
Discrete cosine transform: in the process of some coding, need not to carry out quantization operations, can use selector 151,152 will quantize/140 bypasses of re-quantization device, only realize discrete cosine transform function if only need carry out discrete cosine transform.Detailed process is following: need carry out the view data and the control information of discrete cosine transform from central processing unit 2 receptions through input/output device 100.Control device 110 is according to control information control selector 152; Select image data storage apparatus 130 (quantification/re-quantization device 140 is in bypass condition at this moment) through selector 152; And the data in the image data storage apparatus 130 are input in discrete cosine transform/inverter 160, carry out discrete cosine transform; Accomplish after the discrete cosine transform, control device 110 control selectors 150 are selected discrete cosine transform/inverter 160, and directly deposit transformation results wherein in image data storage apparatus 130.
Inverse discrete cosine transform computing: in some special application; Need not to carry out the re-quantization computing if only inverse discrete cosine transform need be carried out; Can use selector 151,152 will quantize/140 bypasses of re-quantization device, only realize the inverse discrete cosine transform function.Detailed process is following: need carry out the view data and the control information of inverse discrete cosine transform from central processing unit 2 receptions through input/output device 100.Control device 110 is according to control information control selector 152; Select image data storage apparatus 130 (quantification/re-quantization device 140 is in bypass condition at this moment) through selector 152; And the data in the image data storage apparatus 130 are input in discrete cosine transform/inverter 160, carry out inverse discrete cosine transform; Accomplish after the discrete cosine transform, control device 110 control selectors 150 are selected discrete cosine transform/inverter 160, and directly deposit transformation results wherein in image data storage apparatus 130.
Discrete cosine transform and quantification: in the actual coding process, generally after executing the discrete cosine transform computing, all need do quantization operations.Discrete cosine conversion integration module 1 of the present invention can be realized discrete cosine transform simultaneously and quantized two kinds of computings through parallel working method in cataloged procedure, improved code efficiency.Detailed process is following: receive quantification coefficient table, view data and control information through input/output device 100 from central processing unit 2; Control device 110 is according to control information control selector 152, and the data of selection image data storage apparatus 130 are input to carries out discrete cosine transform in discrete cosine transform/inverter 160; Accomplish after the discrete cosine transform, control device 110 control selectors 151 are input to quantification/re-quantization device 140 with the result of discrete cosine transform and carry out quantization operations; After quantization operations finished, control device 110 control selectors 150 deposited the quantized result of quantification/re-quantization device 140 in image data storage apparatus 130.
Re-quantization and inverse discrete cosine transform: in the reality decoding; All need do the re-quantization computing earlier before the general execution inverse discrete cosine transform computing; Discrete cosine conversion integration module 1 of the present invention mode through concurrent working in cataloged procedure realizes re-quantization computing and inverse discrete cosine transform computing, improves decoding efficiency greatly.Detailed process is following: receive quantification coefficient table, view data and control information through input/output device 100 from central processing unit 2.The data of control device 110 control selectors 151 selection image data storage apparatus 130 are input to quantification/re-quantization device 140 and carry out re-quantization; After accomplishing the re-quantization computing, control device 110 is controlled selectors 152, the re-quantization operation result is input to carries out the inverse discrete cosine transform computing in discrete cosine transform/inverter 160; After computing finished, control device 110 control selectors 150 deposited final transformation results in image data storage apparatus 130.
More than describe to Fig. 1 and disclosed the process that discrete cosine conversion integration module 1 of the present invention is realized four kinds of computings and computing combination respectively respectively.In fact, in most encoding-decoding process, above-mentioned four kinds of computings are not independently to carry out respectively.Flow chart among Fig. 2 organically combines four kinds of computings, clear, complete description the computing combination method of discrete cosine conversion integration module 1 of the present invention, specifically describe as follows:
The first step, control device 110 starts computing in step 40, and execution in step 41 then, from image data storage apparatus 130, read the data that need conversion.
In second step, in step 42, judge whether to carry out inverse discrete cosine transform, if the judged result of step 42 is " N "; Then execution in step 43, enter data into to carry out discrete cosine transform in discrete cosine transform/inverter 160, after conversion finishes; In step 431, judge whether to carry out quantization operations, if the judged result of step 431 is " N ", then direct execution in step 45; Result data is deposited in the image data storage apparatus 130; If the judged result of step 431 is " Y ", then first execution in step 432, quantification/re-quantization device 140 carries out quantization operation according to the control information of control device 110; And then execution in step 45, result data is deposited in the image data storage apparatus 130.
If the judged result of step 42 is " Y ", then execution in step 44, judge whether to carry out the re-quantization computing; If the judged result of step 44 is " N ", then direct execution in step 442, discrete cosine transform/inverter 160 carries out inverse discrete cosine transform; If the judged result of step 44 is " Y "; Then first execution in step 441, quantification/re-quantization device 140 carries out the re-quantization operation according to the control information of control device 110, and then execution in step 442.After the execution of step 442, execution in step 45 deposits result data in image data storage apparatus 130.
In the 3rd step, execution in step 46 judges whether total transform block number is accomplished (because data are that piecemeal carries out various computings; Image data storage apparatus 130 can be stored 1~12 blocks of data); If the judged result of step 46 is " N ", then return execution in step 41, repeat above-mentioned steps; If the judged result of step 46 is " Y ", then execution in step 47, send interrupt signal or set end mark position by control device 110, in step 48, finish computing then.It is emphasized that discrete cosine transform/inverse transformation or the execution in step of quantification/re-quantization in the said process accomplish through three selectors 150,151,152.
Be appreciated that through above description; Discrete cosine conversion integration module 1 of the present invention is controlled through 110 pairs of selectors of control device 150,151,152; In a circuit module, realize discrete cosine transform, inverse discrete cosine transform, quantification, four kinds of computings of re-quantization, practiced thrift circuit resource, also improved the integrated level of system; Simultaneously; Because image data storage apparatus 130 is divided into two storage areas 131,132, under the control of control device 110, when input/output device 100 one of them storage area of visit; Another storage area can be by discrete cosine transform/inverter 160 or 140 visits of quantification/re-quantization device; Support the mode of concurrent working, compare that the data processing speed of discrete cosine conversion integration module 1 of the present invention improves greatly with the mode of existing employing fifo registers.
More than describing only is a specific embodiment of the present invention; In fact discrete cosine conversion integration module 1 of the present invention can also be made some equivalent changes according to foregoing description; For example, shown in 3 kinds in figure, the connected mode of selector 150,151,152 is not limited to the connected mode described in Fig. 1; As long as can reach control effect of the present invention; Selector 150,151,152 can adopt other connected mode that is fit to fully, that is, can use a suitable selector unit 5 to realize image data storage apparatus 130, quantification/re-quantization device 140, discrete cosine transform/inverter 160 are selected data; Be configured and control by control device 110, and then reach goal of the invention of the present invention.
All should be included within the scope that claim of the present invention protects such as the minor alteration of above-mentioned situation and equivalent transformation.