CN101059952A - An image rotation processing method, device and multi-media processor - Google Patents

An image rotation processing method, device and multi-media processor Download PDF

Info

Publication number
CN101059952A
CN101059952A CN 200710074029 CN200710074029A CN101059952A CN 101059952 A CN101059952 A CN 101059952A CN 200710074029 CN200710074029 CN 200710074029 CN 200710074029 A CN200710074029 A CN 200710074029A CN 101059952 A CN101059952 A CN 101059952A
Authority
CN
China
Prior art keywords
rectangular lattice
discrete cosine
basic rectangular
pic
image
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.)
Granted
Application number
CN 200710074029
Other languages
Chinese (zh)
Other versions
CN100578605C (en
Inventor
孙丛豪
徐怀懿
蔡宁宁
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangzhou Ankai Microelectronics Co.,Ltd.
Original Assignee
SHENZHEN ANYKA MICROELECTRONICS TECHNOLOGY 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 SHENZHEN ANYKA MICROELECTRONICS TECHNOLOGY Co Ltd filed Critical SHENZHEN ANYKA MICROELECTRONICS TECHNOLOGY Co Ltd
Priority to CN200710074029A priority Critical patent/CN100578605C/en
Publication of CN101059952A publication Critical patent/CN101059952A/en
Application granted granted Critical
Publication of CN100578605C publication Critical patent/CN100578605C/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Image Processing (AREA)
  • Editing Of Facsimile Originals (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

The invention provides an image rotary processing method, a relative device and a multimedia processor, belonging to image processing technical field. The method comprises that processing symbol conversion on the data of each basic rectangle dot matrix, after discrete cosine encode on initial image, outputting rotated discrete cosine result of each basic rectangle dot matrix, processing reverse discrete cosine conversion on the discrete cosine conversion result, outputting rotated the data of each basic rectangle dot matrix, rebuilding image according to the data of each rotated basic rectangle dot matrix. The invention has low calculation, simple logic and easy operation.

Description

A kind of image rotation processing method, device and multimedia processor
Technical field
The invention belongs to image processing field, the multimedia processor that relates in particular to a kind of image rotation processing method and device and have the image spinfunction.
Background technology
At present, the portable multimedia processor mainly is divided into raw data and obtains stored logic and equipment, data processing module and Data Transmission Controlling logic, display device and three parts of steering logic.Wherein raw data is obtained stored logic and equipment and is mainly used in and obtains raw image data and bit stream data by all means; By the Data Transmission Controlling logic, can obtain corresponding original image information, code stream information and reference image information, data processing module then converts the raw data that obtains to required data mode (for meeting the code stream of definition, then being yuv data dot matrix or RGB dot matrix for decoding) for coding; Display device and steering logic then are presented at corresponding view data on the display device, thereby make the people obtain corresponding information by vision.
In order to satisfy the various application requirements of portable video multimedia processor, image display is for needing data presented that special requirement is arranged, and the view data that promptly requires chip to provide can be done the rotation (0 degree, 90 degree, 180 degree and 270 degree) of basic four direction according to the configuration of software.
Existing video image spinning solution mainly contains two kinds.A kind of spinning solution is directly to handle in Data Transmission Controlling, by direct memory access (DMA) (Direct Memory Access, DMA) control in the transmission, direct splicing becomes postrotational reconstructed image, and the rectangular lattice of the reconstructed image that has obtained according to postrotational sequential delivery, change the calculating of DMA start address simultaneously, like this for the rotation and the non-rotary situation of various angles, different calculating all will be passed through in each address of local matrix buffer, make the circuit more complicated that becomes, makeing mistakes has a big risk, and when the outside obtains reference image data same problem is arranged also.For example revolve turn 90 degrees or rotate 270 the degree situations under, during by DMA transmitted image data or reference data, because each data is all discontinuous, so the efficient of DMA is very low, this and real-time Flame Image Process and guarantee that the principle of DMA bandwidth is all conflicting are unsuitable at present requiring demand than higher portable video multimedia processor for real-time.
Another kind of video image spinning solution is to realize by the hardware around user definition reference point image rotating.In the method, at first receive the user definition reference point, this user definition reference point can define outside image; Computed image position then, this location definition the position of the reconstructed image after the rotation of user definition reference point; Calculate afterwards from the order of one or more image pixels of memory fetch, this sequential definition in the rotation order of image after user definition reference point rotation; At last, according to the order of calculating from the memory fetch image pixel.This method has the characteristics of similar software operation, can realize rotating at any angle, though can satisfy various dirigibility requirements, operand is big, consumes too many CPU time, and the relevant hardware logic is very complicated, greatly reduces system performance.Because the problem of cost, hardware can not add a large amount of logics and realize these functions in design process, therefore increases considerably the complicacy of circuit, is unsuitable for practical application for portable multimedia processor.
Summary of the invention
The purpose of the embodiment of the invention is to provide a kind of image rotation processing method, is intended to solve prior art when image being rotated processing, and operand is big, the hardware logic complicated problems.
The embodiment of the invention is to realize like this, a kind of image rotation processing method, may further comprise the steps: the data to each the basic rectangular lattice of original image behind the discrete cosine coding are carried out sign reversing, the discrete cosine result of each basic rectangular lattice of output rotation back; The discrete cosine transform result is carried out inverse discrete cosine transformation, the data of postrotational each the basic rectangular lattice of output; Data presentation reconstructed image according to postrotational each basic rectangular lattice.
Another purpose of the embodiment of the invention is to provide a kind of image rotary processor, comprising: the code stream analyzing unit; The inverse discrete cosine transformation pretreatment unit is used for carrying out sign reversing, the discrete cosine result of each basic rectangular lattice of output rotation back according to the data of each basic rectangular lattice of original image behind the discrete cosine coding of code stream analyzing unit resolves output; The inverse discrete cosine transformation processing unit is used for that the discrete cosine result of each basic rectangular lattice after the rotation of inverse discrete cosine transformation pretreatment unit output is carried out anti-discrete cosine and separates code conversion, obtains the data of postrotational each basic rectangular lattice.
The another purpose of the embodiment of the invention is to provide a kind of multimedia processor, comprise: the image rotary processor, image processing apparatus comprises the code stream analyzing unit, the image rotary processor also comprises: the inverse discrete cosine transformation pretreatment unit, be used for carrying out sign reversing, the discrete cosine result of each basic rectangular lattice of output rotation back according to the data of each basic rectangular lattice of original image behind the discrete cosine coding of code stream analyzing unit resolves output; The inverse discrete cosine transformation processing unit is used for that the discrete cosine result of each basic rectangular lattice after the rotation of inverse discrete cosine transformation pretreatment unit output is carried out anti-discrete cosine and separates code conversion, obtains the data of postrotational each basic rectangular lattice; Display device is used for the data according to postrotational each basic rectangular lattice of inverse discrete cosine transformation processing unit output, shows reconstructed image.
The embodiment of the invention obtains the postrotational data of original image by the data of the basic rectangular lattice of original image behind the discrete cosine coding are carried out sign reversing and inverse discrete cosine transformation, and operand is little, and hardware logic is simple, is easy to realize.
Description of drawings
Fig. 1 is the process flow diagram of the image rotation processing method that provides of the embodiment of the invention;
Fig. 2 is the synoptic diagram of the multimedia processor that provides of the embodiment of the invention;
Fig. 3 is the synoptic diagram of the 2-D discrete cosine characteristic that provides of the embodiment of the invention;
Fig. 4 is the rectangular lattice unit rotation sequential schematic that the embodiment of the invention provides;
Fig. 5 is the sequential schematic of rectangular element in the external buffer district that provides of the embodiment of the invention;
Fig. 6 a and Fig. 6 b are respectively that the former pixel that the embodiment of the invention provides is arranged the synoptic diagram of reading to read with rotation pixel arrangement after 90s in proper order order.
Embodiment
In order to make purpose of the present invention, technical scheme and advantage clearer,, the present invention is further elaborated below in conjunction with drawings and Examples.Should be appreciated that specific embodiment described herein only in order to explanation the present invention, and be not used in qualification the present invention.
The embodiment of the invention according to the coding and decoding video of portable video multimedia processor mostly based on DCT (Discrete Cosine Transform, discrete cosine transform) characteristic of orthogonal transformation such as, make by the input of adjusting inverse discrete cosine transformation (IDCT) and to splice postrotational entire image by each dot matrix after the rotation of IDCT output expectation.
As shown in Figure 1, the image rotation processing method of the embodiment of the invention comprises the steps:
In step S111, the data of original image behind the DCT coding of the output of the bit stream buffer district in the external memory storage are carried out code stream analyzing;
In step S113, to carrying out sign reversing through the data of each basic rectangular lattice of original image behind the DCT coding of resolving or carrying out sign reversing simultaneously and change the order operation, the discrete cosine result of each basic rectangular lattice of output rotation back, here said original basic rectangular lattice unit is at each the basic n * n rectangular lattice unit (as 8 * 8 rectangular lattice unit among Fig. 3) of image, and computing method are hereinafter described coupling apparatus in detail
In step S115, the discrete cosine result who rotates each basic rectangular lattice of back is carried out idct transform, obtain the data of postrotational each basic rectangular lattice unit, and import locally bufferedly, wherein idct transform hereinafter will be described in detail;
In step S117, calculate the DMA start address in the upper left corner of each rectangular element of original image in reconstructed image, concrete computing method hereinafter will describe in detail;
In step S119, display buffer in the external memory storage reads the data of locally buffered interior postrotational each basic rectangular lattice unit by DMA mechanism, and the DMA start address in the upper left corner of each rectangular element of original image in reconstructed image, stitching image;
In step S121, display terminal shows rotation back image.
Below will describe in detail and adopt embodiment of the invention image rotary processor and multimedia processor.The image rotary processor of the embodiment of the invention and multimedia processor are based on two-dimensional dct video decode circuit, handled image always with a certain size n * n rectangular lattice unit (for convenience of description, following n * n rectangular lattice unit will be an example with 8 * 8 rectangular lattice unit) be fundamental, be combined into a complete image by these fundamentals.
Figure 2 shows that the synoptic diagram of the multimedia processor 10 that the embodiment of the invention provides, number in the figure 100 is the image rotary processor of the embodiment of the invention, below will at first describe the principle of work of the image rotary processor 100 of the embodiment of the invention.Image rotary processor 100 comprises that code stream analyzing unit 103, inverse discrete cosine transformation pretreatment unit 105, inverse discrete cosine transformation processing unit 107, internal buffer 109 and rotation address produce logical block 111.
Code stream analyzing unit 103 is used for the raw image data that receives from the outside is carried out code stream analyzing, the raw image data of input code flow resolution unit 103 is encoded by two-dimensional dct, so comprises the DCT data of each rectangular lattice unit of original image in the data of Unit 103, code stream analyzing unit output.Below the two-dimensional dct characteristic is done brief description.
Figure 3 shows that the synoptic diagram of 2-D discrete cosine characteristic, shown in (a) among Fig. 3, suppose that data represents the data of one 8 * 8 rectangular lattice unit, dctdata represents the result after data encodes through two-dimensional dct, dctdata90, dctdata180, dctdata270 represent that respectively the matrix that dctdata represents is carrying out 90 degree, 180 degree and the postrotational result of 270 degree, can obtain following equation so:
dctdata=dct2d(data);
dctdata90(i,j)=(-1)^(j+1)*dctdata(j,i);
dctdata180(i,j)=(-1)^(i+j)*dctdata(i,j);
dctdata270(i,j)=(-1)^(i+1)*dctdata(j,i);
Wherein ^ represents power, the position symbol of each point in i, j difference 8 * 8 rectangular lattice unit, and dct2d is the two-dimensional dct operation, (i j) is the position data of each point in the rectangular lattice unit to data, and (j i) is data (i, commentaries on classics order j) to data.
From above-mentioned analysis to the DCT characteristic as can be known, at dctdata (i, j), to its carry out sign reversing and change the order operation can obtain dctdata90 (i, j) and dctdata270 (i, j), as (b) among Fig. 3 with (d), only to dctdata (i, j) symbol before carries out conversion and can obtain dctdata180 (i, j), shown in (c) among Fig. 3.The order of the data of each point of numeral in 8 * 8 rectangular lattice unit when lining by line scan (raster scan) wherein.
Inverse discrete cosine transformation pretreatment unit 105 promptly carries out such processing, DCT data dctdata (i at each point in each rectangular lattice unit of the original image of code stream analyzing unit 103 output, j), carry out sign reversing or carry out sign reversing simultaneously and change the order operation, each matrix unit of output original image revolve turn 90 degrees, DCT data dctdata90, dctdata180, dctdata270 behind 180 degree and 270 degree.
Revolve when turning 90 degrees for the rectangular lattice unit, 105 couples of data dctdata of inverse discrete cosine transformation pretreatment unit (i, j) preceding symbol carries out (1) ^ (j+1) operation, and to dctdata (i, j) change order, and acquisition (1) ^ (j+1) dctdata (j, i), be the rectangular lattice unit revolve DCT data dctdata90 after turning 90 degrees (i, j).When spending for rectangular lattice unit Rotate 180,105 couples of data dctdata of inverse discrete cosine transformation pretreatment unit (i, j) preceding symbol carries out (1) ^ (i+j) operation, no longer change order this moment, obtain (1) ^ (i+j) * dctdata (i, j), promptly the DCT data dctdata180 behind the rectangular lattice unit Rotate 180 degree (i, j).When spending for rectangular lattice unit rotation 270,105 couples of data dctdata of inverse discrete cosine transformation pretreatment unit (i, j) preceding symbol carries out (1) ^ (i+1) operation, and to dctdata (i, j) change order, and acquisition (1) ^ (i+1) dctdata (j, i), be behind rectangular lattice unit rotation 270 degree DCT data dctdata270 (i, j).The mode that inverse discrete cosine transformation pretreatment unit 105 carries out sign reversing and/or changes the order operation can adopt the modes such as logical process of prior art, but the realization means are various simple, can use as long as can realize the principle of the embodiment of the invention.
The realization of inverse discrete cosine transformation pretreatment unit 105 has two pacing itemss, the firstth, the elementary cell of Flame Image Process object is n * n rectangular lattice unit, as 8 * 8 rectangular lattice unit among Fig. 3, the secondth, local buffer 109 stored objects have been direct corresponding relation to be arranged with the image lattice that graphic display terminal 15 is accepted.105 couples of data dctdata of inverse discrete cosine transformation pretreatment unit (i, j) carry out sign reversing or carry out sign reversing simultaneously and change the order operation after, with the dctdata90 (i that obtains, j), dctdata180 (i, j), (i j) exports inverse discrete cosine transformation processing unit 107 to dctdata270.
The data of 107 pairs of inverse discrete cosine transformation pretreatment units of inverse discrete cosine transformation processing unit, 105 outputs are carried out idct transform, it is anti-dct transform, the data that draw postrotational rectangular lattice unit are data90, data180, data270, as (b) among Fig. 4, (c) with (d).The result that the data of 107 pairs of inverse discrete cosine transformation pretreatment units of inverse discrete cosine transformation processing unit, 105 outputs are carried out behind the idct transform is as follows:
data=idct2d(dctdata);
Data90=idct2d (dctdata90), promptly data90 (i, j)=idct2d ((1) ^ (j+1) * dctdata (j, i));
Data180=idct2d (dctdata180), promptly data180 (i, j)=idct2d ((1) ^ (i+j) * dctdata (i, j));
Data270=idct2d (dctdata270), promptly data270 (i, j)=idct2d ((1) ^ (i+1) * dctdata (j, i));
In other words, by above-mentioned idct transform, can calculate that each puts postrotational position data in the rectangular lattice unit, and export internal buffer 109 to.
Through after the above-mentioned processing, each rectangular lattice unit of original image all becomes unit, rotation back.Because present Video Codec is generally exported reconstructed image by the DMA transmission mechanism in external memory storage, therefore to realize the integral body rotation of original image at display terminal, the image rotary processor that the embodiment of the invention provides also needs to calculate at different rotary pattern (90 degree, 180 degree and 270 degree) each rectangular element (in the present embodiment down, rectangular element is 8 * 8 rectangular lattice unit shown in Figure 3) postrotational DMA start address, the remaining address of this rectangular element is uploaded according to unified DMA mechanism then, realizes the splicing of whole image.
The rotation address produces logical block 111 and promptly is used for calculating the start address of each rectangular element at reconstructed image upper left corner DMA, and computing method hereinafter will be described in detail in conjunction with Fig. 5.(a) and (b) among Fig. 5, (c), (d) four little figure represent original image do not rotate, revolve turn 90 degrees, Rotate 180 degree, rotation 270 order of rectangular dots array element in the external buffer district when spending.As shown in Figure 5, among Fig. 5 (a) first first rectangular element of row (1) is exactly one 8 * 8 rectangular lattice unit among Fig. 3, among Fig. 5 (a) first row has k rectangular element, each rectangular element is adjacent one another are, it is capable that image has a m, and the circle in the upper left corner of each rectangular element is represented the address in this rectangular element upper left corner.Among Fig. 5 (a) these rectangular lattice unit according to from left to right, from top to bottom arrangement mode arranges (lining by line scan) and forms piece image, wherein the width of each pixel is pic_width, highly is pic_height.These data are all rotated address generation logical block 111 and are obtained from code stream analyzing unit 103.Under the non-rotary situation of original image, among Fig. 5 (a) first first its upper left corner, rectangular lattice unit (1) of row (being the point 1 in 8 * 8 rectangular lattice unit among Fig. 3) externally the reconstructed image DMA start address in the buffer zone be recon_add, can draw the DMA start address of other rectangular element upper left corner when not rotating among Fig. 5 (a) so:
On the first row rectangular element (1) is recon_addr by reference;
On the first row rectangular element (2) is recon_addr+n by reference;
On the first row rectangular element (3) is recon_addr+2n by reference;
......
On the second row rectangular element (1) is recon_addr+pic_width*n by reference;
On the second row rectangular element (2) is recon_addr+pic_width*n+n by reference;
On the second row rectangular element (3) is recon_addr+pic_width*n+2n by reference;
......
Be recon_addr+pic_width*n* (m-1)+n* (k-1) by reference on the capable rectangular element of m (k); Wherein, rectangular lattice unit dot matrix number in the n presentation graphs 3, because the rectangular lattice unit among Fig. 3 is 8 * 8 rectangular lattice unit, n is 8 so, the line number of image rectangular element when m represents not rotate, the columns of image rectangular element when k represents not rotate.
When original image revolves when turning 90 degrees, the upper left corner of same each rectangular element of needs calculating is the interior reconstructed image DMA start address of buffer zone externally, shown in Fig. 5 (b), to calculate original image first row first rectangular element (1) DMA start address in the upper left corner in reconstructed image is example, just need to calculate point 57 in 8 * 8 rectangular lattice unit that this rectangular element comprises in the DMA address in the reconstructed image (shown in Fig. 4 (b), the DMA address in the upper left corner always of calculating), according to the width pic_width of pixel and height pic_height can calculate its externally the DMA start address in the buffer zone be recon_add+pic_height-n, can calculate the DMA start address in all the other rectangular element upper left corners in the lump:
On the first row rectangular element (1) is recon_addr+pic_height-n by reference;
On the first row rectangular element (2) is recon_addr+pic_height*n-n by reference;
On the first row rectangular element (3) is recon_addr+pic_height*2n-n by reference
......
On the second row rectangular element (1) is recon_addr+pic_height-2n by reference;
On the second row rectangular element (2) is recon_addr+pic_height*n-2n by reference;
On the second row rectangular element (3) is recon_addr+pic_height*2n-2n by reference;
......
Be recon_addr+pic_height*n* (k-1)+pic_height-by reference on the capable rectangular element of m (k)
m*n;
What pay particular attention to is that the capable rectangular element of m (k) all is at the position of image when not rotating herein, with consistent among Fig. 5 (a).
In like manner shown in Fig. 5 (c), when the original image Rotate 180 is spent the DMA in each rectangular element upper left corner on be by reference:
On the first row rectangular element (1) is recon_addr+pic_height*pic_width-pic_width*n by reference
+pic_width-n;
On the first row rectangular element (2) is recon_addr+pic_height*pic_width-pic_width*n by reference
+pic_width-2n;
On the first row rectangular element (3) is recon_addr+pic_height*pic_width-pic_width*n by reference
+pic_width-3n;
......
On the second row rectangular element (1) is recon_addr+pic_height*pic_width-pic_width by reference
*2n+pic_width-n;
On the second row rectangular element (2) is recon_addr+pic_height*pic_width-pic_width by reference
*2n-2n;
On the second row rectangular element (3) is recon_addr+pic_height*pic_width-pic_width by reference
*2n-3n
......
Be recon_addr+pic_height*pic_width by reference on the capable rectangular element of m (k)
-pic_width*n*m+pic_width-k*n;
The capable rectangular element of m (k) also is at the position of image when not rotating herein, with consistent among Fig. 5 (a).
Shown in Fig. 5 (d), when original image rotation 270 is spent on the DMA in each rectangular element upper left corner be by reference:
On the first row rectangular element (1) is recon_addr+pic_height*pic_width-pic_width by reference
*n;
On the first row rectangular element (2) is recon_addr+pic_height*pic_width-pic_width by reference
*2n;
On the first row rectangular element (3) is recon_addr+pic_height*pic_width-pic_width by reference
*3n;
......
On the second row rectangular element (1) is recon_addr+pic_height*pic_width-pic_width*n by reference
+n;
On the second row rectangular element (2) is recon_addr+pic_height*pic_width-pic_width by reference
*2n+n;
On the second row rectangular element (3) is recon_addr+pic_height*pic_width-pic_width by reference
*3n+n;
......
Be recon_addr+pic_width*pic_width-by reference on the capable rectangular element of m (k)
pic_height*n*k+(m-1)*n;
The capable rectangular element of m (k) also is at the position of image when not rotating herein, with consistent among Fig. 5 (a).
With regard to present employed DMA transmission mechanism, what requirement was at first uploaded is the start address of each DMA of the rectangular element upper left corner in reconstructed image, as long as calculate the address of each DMA of the rectangular element upper left corner in reconstructed image, remaining address can be according to the sequential operation of DMA transmission mechanism, DMA process when not rotating is without any difference, can either guarantee to realize rotating the splicing of back reconstructed image like this, not influence the DMA transmitting speed again.
But, except said method, also can adopt alternate manner to calculate the postrotational DMA start address of each rectangular element.
In some applications, internal buffer 109 can read the data of 2 pixels at every turn from inverse discrete cosine transformation processing unit 107.Shown in Fig. 6 a and Fig. 6 b, be respectively former pixel and arrange the synoptic diagram of reading to read with rotation pixel arrangement after 90s in proper order order, rectangular element is the rectangular element among Fig. 5, the scanning sequency of the numeral original image in the rectangular element, two pixels of two circular expressions in the rectangular element.Because the data that internal buffer 109 reads from inverse discrete cosine transformation processing unit 107 are that the rectangular lattice unit has rotated, the accessing operation of internal buffer 107 compared with prior art need not anyly change, thus image upload order when not rotating and revolve when turning 90 degrees upload in proper order the same.But the embodiment of the invention to the quantity of internal buffer 109 each read pixel points without limits.
The image rotary processor that the embodiment of the invention provides can be used in the video multimedia processor, as shown in Figure 2, the multimedia processor 10 that provides of the embodiment of the invention comprises the unit, bit stream buffer district 11 in image rotary processor 100, the external memory storage, display buffer 13 and the display terminal 15 in the external memory storage.
Unit, bit stream buffer district 11 in the external memory storage is used for providing to image rotary processor 100 data of original image, the data of 100 pairs of original images of image rotary processor are handled, export on each rectangular element upper left corner DMA in reconstructed image by reference and each postrotational position data in rectangular lattice unit, display buffer 13 in the external memory storage obtains the output of image rotary processor 100 by DMA mechanism, realization is to the splicing of whole image, and realized the demonstrations of rotation back reconstructed images by display terminal 15.
Image rotary processor 100 in the embodiment of the invention multimedia processor 10 was above described in detail, repeated no more herein.
The embodiment of the invention is at the DCT video decode circuit based on n * n rectangular lattice unit, just simply handle the anglec of rotation that can obtain needs when the output of the IDCT of two dimension according to needs image when rotation needs IDCT in the DCT video decode, make the rectangular lattice unit directly to upload, the DMA process does not need through too big modification, can not have influence on the efficient of DMA.If the data of opposite original image are without the processing of inverse discrete cosine transformation pretreatment unit 105 and inverse discrete cosine transformation processing unit 107, the pixel of uploading for the first time corresponding to Fig. 6 b internal buffer of representing for top circle in the rectangular element 29 and 25, what upload for the second time is the pixel that the top circle is represented in the rectangular element 21 and 17, calculate so with regard to more complicated, need address decoding.
The embodiment of the invention also start address of the DMA by adjusting each upper left corner, rectangular lattice unit realizes rotation on the four direction to the arbitrary dimension image, substantially do not revise existing steering logic, little for the available circuit influence, reduced the circuit association to reduce the hardware design risk, be easy to checking, and shortened the time of checking, reduced the error rate of circuit, and, save the chip area cost because the logic area that increases is very little.And the present invention only needs to add a spot of logic and just can realize rotation with respect to not with the design of picture orbiting facility, and design independence is good, has reduced the possibility that causes original logical mistake because adding multimode.
The above only is preferred embodiment of the present invention, not in order to restriction the present invention, all any modifications of being done within the spirit and principles in the present invention, is equal to and replaces and improvement etc., all should be included within protection scope of the present invention.

Claims (18)

1, a kind of image rotation processing method is characterized in that, said method comprising the steps of:
Data to each the basic rectangular lattice of original image behind the discrete cosine coding are carried out sign reversing, the discrete cosine result of each basic rectangular lattice of output rotation back;
Described discrete cosine transform result is carried out inverse discrete cosine transformation, the data of postrotational each the basic rectangular lattice of output;
Data presentation reconstructed image according to postrotational each basic rectangular lattice.
2, image rotation processing method as claimed in claim 1 is characterized in that, when the discrete cosine of output behind the basic rectangular lattice Rotate 180 degree as a result the time, the discrete cosine result of described basic rectangular lattice realizes by following formula:
dctdata180(i,j)=(-1)^(i+j)*dctdata(i,j);
Wherein, dctdata (i, j) data of each the basic rectangular lattice of expression original image behind the discrete cosine coding, dctdata180 (i, j) represent discrete cosine result behind each basic rectangular lattice Rotate 180 degree, ^ represents power, and i, j represent the position symbol of each point in each basic rectangular lattice.
3, image rotation processing method as claimed in claim 2, it is characterized in that, when the basic rectangular lattice of output revolve turn 90 degrees or 270 degree after discrete cosine as a result the time, the step that described data to each the basic rectangular lattice of original image behind the discrete cosine coding are carried out sign reversing further comprises:
The data of each the basic rectangular lattice of original image behind discrete cosine coding are carried out sign reversing and are changeed the order operation, export each basic rectangular lattice revolve turn 90 degrees or 270 degree after the discrete cosine result;
Described basic rectangular lattice revolve turn 90 degrees or 270 degree after the discrete cosine result realize by following formula respectively:
dctdata90(i,j)=(-1)^(j+1)*dctdata(j,i);
dctdata270(i,j)=(-1)^(i+1)*dctdata(j,i);
Wherein, dctdata (i, j) data of each the basic rectangular lattice of expression original image behind discrete cosine coding, and dctdata90 (i, j) and dctdata270 (i, j) represent respectively each basic rectangular lattice revolve turn 90 degrees or rotate 270 the degree after the discrete cosine result, data (j, i) expression data (i, commentaries on classics order j), ^ represents power, and i, j represent the position symbol of each point in each basic rectangular lattice.
4, image rotation processing method as claimed in claim 3 is characterized in that, the step of described data presentation reconstructed image according to postrotational each basic rectangular lattice comprises:
Obtain the direct memory access (DMA) start address of each basic rectangular lattice in reconstructed image;
Data presentation reconstructed image according to described direct memory access (DMA) start address and described postrotational each basic rectangular lattice.
5, image rotation processing method as claimed in claim 4 is characterized in that, described basic rectangular lattice is n * n rectangular lattice unit, and the acquisition methods of the direct memory access (DMA) start address of described each basic rectangular lattice in reconstructed image is specially:
Obtain length, width, the n of each pixel of original image, and the direct memory access (DMA) address of one of them basic rectangular lattice;
According to length, width, the n of described each pixel of original image, and the direct memory access (DMA) address computation of one of them basic rectangular lattice goes out the direct memory access (DMA) address of all the other basic rectangular lattices in reconstructed image.
6, image rotation processing method as claimed in claim 5 is characterized in that, when image rotation 0 degree, revolve turn 90 degrees, Rotate 180 degree and rotate 270 when spending, described direct memory access (DMA) start address is obtained by following formula respectively:
recon_addr+pic_width*n*(m-1)+n*(k-1);
recon_addr+pic_height*n*(k-1)+pic_height-m*n;
recon_addr+pic_height*pic_width-pic_width*n*m+pic_width-k*n;
recon_addr+pic_width*pic_width-pic_height*n*k+(m-1)*n;
Wherein, recon_addr represents the direct memory access (DMA) address in the basic rectangular element of original image first row, first row upper left corner, m and k represent the line number and the columns of the basic rectangular lattice of original image unit respectively, and pic_width and pic_height be the width and the height of remarked pixel respectively.
7, a kind of image rotary processor comprises a code stream analyzing unit, it is characterized in that described device comprises:
The inverse discrete cosine transformation pretreatment unit, be used for carrying out sign reversing, the discrete cosine result of each basic rectangular lattice of output rotation back according to the data of each basic rectangular lattice of original image behind the discrete cosine coding of described code stream analyzing unit resolves output;
The inverse discrete cosine transformation processing unit is used for that the discrete cosine result of each basic rectangular lattice after the rotation of described inverse discrete cosine transformation pretreatment unit output is carried out anti-discrete cosine and separates code conversion, obtains the data of postrotational each basic rectangular lattice.
8, image rotary processor as claimed in claim 7, it is characterized in that, discrete cosine after described inverse discrete cosine transformation pretreatment unit is exported basic rectangular lattice Rotate 180 degree is as a result the time, and the discrete cosine result of described basic rectangular lattice realizes by following formula:
dctdata180(i,j)=(-1)^(i+j)*dctdata(i,j);
Wherein, dctdata (i, j) data of each the basic rectangular lattice of expression original image behind the discrete cosine coding, dctdata180 (i, j) represent discrete cosine result behind each basic rectangular lattice Rotate 180 degree, ^ represents power, and i, j represent the position symbol of each point in each basic rectangular lattice.
9, image rotary processor as claimed in claim 8, it is characterized in that, when described inverse discrete cosine transformation pretreatment unit export basic rectangular lattice revolve turn 90 degrees or 270 degree after discrete cosine as a result the time, described inverse discrete cosine transformation pretreatment unit further comprises:
The data of each the basic rectangular lattice of original image behind discrete cosine coding are carried out sign reversing and are changeed the order operation, export each basic rectangular lattice revolve turn 90 degrees or 270 degree after the discrete cosine result;
Described basic rectangular lattice revolve turn 90 degrees or 270 degree after the discrete cosine result realize by following formula respectively:
dctdata90(i,j)=(-1)^(j+1)*dctdata(j,i);
dctdata270(i,j)=(-1)^(i+1)*dctdata(j,i);
Wherein, dctdata (i, j) data of each the basic rectangular lattice of expression original image behind discrete cosine coding, and dctdata90 (i, j) and dctdata270 (i, j) represent respectively each basic rectangular lattice revolve turn 90 degrees or rotate 270 the degree after the discrete cosine result, data (j, i) expression data (i, commentaries on classics order j), ^ represents power, and i, j represent the position symbol of each point in each basic rectangular lattice.
10, image rotary processor as claimed in claim 9 is characterized in that, described image rotary processor further comprises:
The rotation address-generation unit is used for obtaining the direct memory access (DMA) start address of each basic rectangular lattice at reconstructed image.
11, image rotary processor as claimed in claim 10, it is characterized in that, described basic rectangular lattice is n * n rectangular lattice unit, and described rotation address-generation unit obtains the direct memory access (DMA) address of all the other basic rectangular lattices in reconstructed image according to the direct memory access (DMA) address of a basic rectangular lattice in length, width, n and the original image of each pixel of original image.
12, image rotary processor as claimed in claim 11, it is characterized in that, when image rotation 0 degree, revolve turn 90 degrees, Rotate 180 degree and rotate 270 when spending, described rotation address-generation unit obtains described direct memory access (DMA) start address by following formula respectively:
recon_addr+pic_width*n*(m-1)+n*(k-1);
recon_addr+pic_height*n*(k-1)+pic_height-m*n;
recon_addr+pic_height*pic_width-pic_width*n*m+pic_width-k*n;
recon_addr+pic_width*pic_width-pic_height*n*k+(m-1)*n;
Wherein, recon_addr represents the direct memory access (DMA) address in the basic rectangular element of original image first row, first row upper left corner, m and k represent the line number and the columns of the basic rectangular lattice of original image unit respectively, and pic_width and pic_height be the width and the height of remarked pixel respectively.
13, a kind of multimedia processor is characterized in that, comprising:
Image rotary processor, described image processing apparatus comprise a code stream analyzing unit, and described image rotary processor also comprises:
The inverse discrete cosine transformation pretreatment unit, be used for carrying out sign reversing, the discrete cosine result of each basic rectangular lattice of output rotation back according to the data of each basic rectangular lattice of original image behind the discrete cosine coding of described code stream analyzing unit resolves output;
The inverse discrete cosine transformation processing unit is used for that the discrete cosine result of each basic rectangular lattice after the rotation of described inverse discrete cosine transformation pretreatment unit output is carried out anti-discrete cosine and separates code conversion, obtains the data of postrotational each basic rectangular lattice;
Display device is used for the data according to postrotational each basic rectangular lattice of described inverse discrete cosine transformation processing unit output, shows reconstructed image.
14, multimedia processor as claimed in claim 13, it is characterized in that, discrete cosine after described inverse discrete cosine transformation pretreatment unit is exported basic rectangular lattice Rotate 180 degree is as a result the time, and the discrete cosine result of described basic rectangular lattice realizes by following formula:
dctdata180(i,j)=(-1)^(i+j)*dctdata(i,j);
Wherein, dctdata (i, j) data of each the basic rectangular lattice of expression original image behind the discrete cosine coding, dctdata180 (i, j) represent discrete cosine result behind each basic rectangular lattice Rotate 180 degree, ^ represents power, and i, j represent the position symbol of each point in each basic rectangular lattice.
15, multimedia processor as claimed in claim 14, it is characterized in that, when described inverse discrete cosine transformation pretreatment unit export basic rectangular lattice revolve turn 90 degrees or 270 degree after discrete cosine as a result the time, described inverse discrete cosine transformation pretreatment unit further comprises:
The data of each the basic rectangular lattice of original image behind discrete cosine coding are carried out sign reversing and are changeed the order operation, export each basic rectangular lattice revolve turn 90 degrees or 270 degree after the discrete cosine result;
Described basic rectangular lattice revolve turn 90 degrees or 270 degree after the discrete cosine result realize by following formula respectively:
dctdata90(i,j)=(-1)^(j+1)*dctdata(j,i);
dctdata270(i,j)=(-1)^(i+1)*dctdata(j,i);
Wherein, dctdata (i, j) data of each the basic rectangular lattice of expression original image behind discrete cosine coding, and dctdata90 (i, j) and dctdata270 (i, j) represent respectively each basic rectangular lattice revolve turn 90 degrees or rotate 270 the degree after the discrete cosine result, data (j, i) expression data (i, commentaries on classics order j), ^ represents power, and i, j represent the position symbol of each point in each basic rectangular lattice.
16, multimedia processor as claimed in claim 15 is characterized in that, described image processing apparatus further comprises: the rotation address-generation unit is used for obtaining the direct memory access (DMA) start address of each basic rectangular lattice at reconstructed image; Described display device is according to each basic rectangular lattice of the described rotation address-generation unit direct memory access (DMA) start address in reconstructed image and the data presentation reconstructed image of postrotational each basic rectangular lattice of obtaining of described inverse discrete cosine transformation processing unit.
17, multimedia processor as claimed in claim 16, it is characterized in that, described basic rectangular lattice is n * n rectangular lattice unit, and described rotation address-generation unit goes out the direct memory access (DMA) address of all the other basic rectangular lattices in reconstructed image according to the direct memory access (DMA) address computation of a basic rectangular lattice in length, width, n and the original image of each pixel of original image.
18, multimedia processor as claimed in claim 17 is characterized in that, when image rotation 0 degree, revolve turn 90 degrees, Rotate 180 degree and rotate 270 when spending, described rotation address-generation unit obtains described direct memory access (DMA) start address by following formula respectively:
recon_addr+pic_width*n*(m-1)+n*(k-1);
recon_addr+pic_height*n*(k-1)+pic_height-m*n;
recon_addr+pic_height*pic_width-pic_width*n*m+pic_width-k*n;
recon_addr+pic_width*pic_width-pic_height*n*k+(m-1)*n;
Wherein, recon_addr represents the direct memory access (DMA) address in the basic rectangular element of original image first row, first row upper left corner, m and k represent the line number and the columns of the basic rectangular lattice of original image unit respectively, and pic_width and pic_height be the width and the height of remarked pixel respectively.
CN200710074029A 2007-04-12 2007-04-12 An image rotation processing method, device and multi-media processor Active CN100578605C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN200710074029A CN100578605C (en) 2007-04-12 2007-04-12 An image rotation processing method, device and multi-media processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN200710074029A CN100578605C (en) 2007-04-12 2007-04-12 An image rotation processing method, device and multi-media processor

Publications (2)

Publication Number Publication Date
CN101059952A true CN101059952A (en) 2007-10-24
CN100578605C CN100578605C (en) 2010-01-06

Family

ID=38866029

Family Applications (1)

Application Number Title Priority Date Filing Date
CN200710074029A Active CN100578605C (en) 2007-04-12 2007-04-12 An image rotation processing method, device and multi-media processor

Country Status (1)

Country Link
CN (1) CN100578605C (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2011009289A1 (en) * 2009-07-21 2011-01-27 北京中天联科微电子技术有限公司 Method and system for implementing image rotation in reception of digital television
CN101729903B (en) * 2008-10-24 2013-06-19 安凯(广州)微电子技术有限公司 Method, system and multimedia processor for reading reference frame data
CN105739874A (en) * 2016-03-11 2016-07-06 沈阳聚德视频技术有限公司 EDMA achieving method in image rotation based on DSP
CN106570827A (en) * 2016-08-31 2017-04-19 天津大学 Method and device utilizing storage space address transformation to carry out image rotation
CN110189687A (en) * 2019-06-04 2019-08-30 深圳市摩西尔电子有限公司 The method and apparatus that a kind of pair of LED module image carries out image transformation

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101729903B (en) * 2008-10-24 2013-06-19 安凯(广州)微电子技术有限公司 Method, system and multimedia processor for reading reference frame data
WO2011009289A1 (en) * 2009-07-21 2011-01-27 北京中天联科微电子技术有限公司 Method and system for implementing image rotation in reception of digital television
CN105739874A (en) * 2016-03-11 2016-07-06 沈阳聚德视频技术有限公司 EDMA achieving method in image rotation based on DSP
CN106570827A (en) * 2016-08-31 2017-04-19 天津大学 Method and device utilizing storage space address transformation to carry out image rotation
CN106570827B (en) * 2016-08-31 2019-07-26 天津大学 The method and device for carrying out image rotation is converted using memory space address
CN110189687A (en) * 2019-06-04 2019-08-30 深圳市摩西尔电子有限公司 The method and apparatus that a kind of pair of LED module image carries out image transformation

Also Published As

Publication number Publication date
CN100578605C (en) 2010-01-06

Similar Documents

Publication Publication Date Title
US20200221067A1 (en) Apparatus and methods for providing a cubic transport format for multi-lens spherical imaging
CN1149485C (en) Display equipment and method capable of rotating 180d degree of picture
US11470337B2 (en) Image processor, image processing system including image processor, system-on-chip including image processing system, and method of operating image processing system
CN116917927A (en) Method and apparatus for tensor object support in a machine learning workload
CN1905000A (en) Method and apparatus for efficient image rotation
CN1255765C (en) Data communication system and method, computer program, and recording medium
CN101059952A (en) An image rotation processing method, device and multi-media processor
CN100351814C (en) An apparatus and method for performing data access in accordance with memory access patterns
CN1719435A (en) Method and apparatus for implementing DCT/IDCT
CN1691052A (en) Coded pattern for an optical device and a prepared surface
US20110249744A1 (en) Method and System for Video Processing Utilizing N Scalar Cores and a Single Vector Core
CN1685363A (en) Block-based rotation of arbitrary-shaped images
US20090102850A1 (en) Error Diffusion for Display Frame Buffer Power Saving
US20220084159A1 (en) Image signal processor, method of operating the image signal processor, and application processor including the image signal processor
CN101061501A (en) Perspective transformation of two-dimensional images
TWI791578B (en) Video encoding apparatus
US8711170B2 (en) Edge alphas for image translation
JP2016502211A (en) Image memory access optimization
CN1158873C (en) Method and apparatus for image processing
US10733694B2 (en) Semiconductor device for processing image data in layers for display by a display device
WO2007104018A2 (en) Using super-pixels for efficient in-place rotation of images
CN1924794A (en) Digital document processing system, data processing system and peripheral equipment
Sun et al. Energy-efficient 360-degree video rendering on fpga via algorithm-architecture co-design
CN1612163A (en) Graphic decoder, image reproduction apparatus and method for graphic display acceleration based on commands
CN1203452C (en) Graphic describing device for processing describing data containing image target

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
ASS Succession or assignment of patent right

Owner name: ANYKA (GUANGZHOU) MICROELECTRONICS TECHNOLOGY CO.,

Free format text: FORMER OWNER: SHENZHEN ANKAI MICROELECTRONICS TECHNOLOGY CO., LTD.

Effective date: 20100122

C41 Transfer of patent application or patent right or utility model
TR01 Transfer of patent right

Effective date of registration: 20100122

Address after: 3 floor, C1 District, Chuangxin Road, No. 182, science Avenue, Guangzhou Science City, Guangdong

Patentee after: Ankai (Guangzhou) Microelectronics Technology Co., Ltd.

Address before: A3, building 2, building, Shenzhen digital technology park, Nanshan District hi tech Industrial Park, Shenzhen, Guangdong, China

Patentee before: Shenzhen Anyka Microelectronics Technology Co., Ltd.

CP01 Change in the name or title of a patent holder
CP01 Change in the name or title of a patent holder

Address after: 510600, Guangzhou Science City, Guangdong science Road, 182 innovation building, C1 District, 3 floor

Patentee after: Guangzhou Ankai Microelectronics Co.,Ltd.

Address before: 510600, Guangzhou Science City, Guangdong science Road, 182 innovation building, C1 District, 3 floor

Patentee before: ANYKA (GUANGZHOU) MICROELECTRONICS TECHNOLOGY Co.,Ltd.

CP02 Change in the address of a patent holder

Address after: 510555 No. 107 Bowen Road, Huangpu District, Guangzhou, Guangdong

Patentee after: Guangzhou Ankai Microelectronics Co.,Ltd.

Address before: 510600, Guangzhou Science City, Guangdong science Road, 182 innovation building, C1 District, 3 floor

Patentee before: Guangzhou Ankai Microelectronics Co.,Ltd.

CP02 Change in the address of a patent holder