CN102098477B - Method and device for obtaining pixel values - Google Patents
Method and device for obtaining pixel values Download PDFInfo
- Publication number
- CN102098477B CN102098477B CN200910242666.7A CN200910242666A CN102098477B CN 102098477 B CN102098477 B CN 102098477B CN 200910242666 A CN200910242666 A CN 200910242666A CN 102098477 B CN102098477 B CN 102098477B
- Authority
- CN
- China
- Prior art keywords
- picture frame
- value
- pixel
- row
- read
- 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.)
- Expired - Fee Related
Links
- 238000000034 method Methods 0.000 title claims abstract description 46
- 230000015654 memory Effects 0.000 claims abstract description 28
- 230000008569 process Effects 0.000 claims description 25
- 239000011159 matrix material Substances 0.000 claims description 10
- 238000001914 filtration Methods 0.000 claims description 8
- 230000017105 transposition Effects 0.000 claims description 4
- 238000010586 diagram Methods 0.000 description 3
- 230000004048 modification Effects 0.000 description 3
- 238000012986 modification Methods 0.000 description 3
- 230000000903 blocking effect Effects 0.000 description 2
- 230000008859 change Effects 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 230000006870 function Effects 0.000 description 2
- 230000009471 action Effects 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
Landscapes
- Compression Or Coding Systems Of Tv Signals (AREA)
Abstract
The invention discloses a method for obtaining pixel values, which is used for realizing the decoding of an image and increasing a decoding speed. The method comprises the following steps of: storing a first image frame and a second image frame in a memory, wherein values of pixel points in a row in the second image frame correspond to those of the pixel points in a column in the first image frame one to one; when the values of the pixel points in the row are required to be obtained from the first image frame, reading the values of the pixel points in the row from the stored first image frame; and when the values of the pixel points in the column are required to be obtained from the first image frame, reading the values, corresponding to the values of the pixel points in the column, of the pixel points in the row in the second image frame from the stored second image frame. The invention also discloses a method for implementing the method.
Description
Technical field
The present invention relates to computer and image domains, particularly relate to the method and device that obtain pixel value.
Background technology
In order to reduce the memory space shared by image, and improve the efficiency of transmission etc. of code stream, the encoding and decoding technique of image is widely used.
In existing image decoding technique, using decoded frame as with reference to frame, by methods such as motion compensation, obtain the value of the pixel of present frame according to reference frame.Shown in Figure 1, each square represents a pixel, the value of capitalization A...U represents the value of the respective pixel point in reference frame, and the value of lowercase aa, bb, cc, dd, ee, ff gg, hh, b, h, i, m, s needs to calculate according to the value of the pixel around it.Such as, the motion vector points (2,2.5) of certain pixel in present frame, namely point to pixel b, then b=round ((E-5F+20G+20H-5I+J)/32), round represents bracket function.If the value of calculating pixel point h, then h=round ((A-5C+20G+20M-5R+T)/32).
In decode procedure, need storage of reference frames in internal memory, may need when the value of calculating pixel point to read some data in high-speed cache from internal memory.Such as, during the value of calculating pixel point b, from internal memory, the value of read pixel point E/F/G/H/I/J is to high-speed cache.CPU just can calculate the value of pixel b according to the value of pixel E/F/G/H/I/J in high-speed cache.During the value of calculating pixel point h, owing to being read internal memory in rows, and the memory space of high-speed cache is much smaller than internal memory, so this situation may be there is, once read the value of one-row pixels point in internal memory, the value of the first row pixel is read high-speed cache by first time, obtain the value of pixel A, the value of the second row pixel is read high-speed cache by second time, obtain the value of pixel C, by that analogy, need reading 6 internal memories could obtain the value of the pixel E/F/G/H/I/J required for value of calculating pixel point h, greatly affect decoding efficiency.To in a two field picture decoding, there is the pixel of the action need access vertical direction of similar half, so the situation that high-speed cache does not hit is very serious.
Be not only decoding inter frames process and there is such problem, and macro block filtering etc. needs the processing procedure of the value reading vertical direction pixel all to there is such problem.
Summary of the invention
The embodiment of the present invention provides a kind of method and the device that obtain pixel value, for improving the speed obtaining pixel value.
Obtain a method for pixel value, comprise the following steps:
The first picture frame and the second picture frame is stored, the value one_to_one corresponding of a row pixel in the value of the one-row pixels point wherein in the second picture frame and the first picture frame in internal memory;
When needing to obtain the value of one-row pixels point from the first picture frame, in the first picture frame stored, read the value of this one-row pixels point;
When needing to obtain the value of a row pixel from the first picture frame, in the second picture frame stored, read the value of this row pixel one-row pixels point corresponding in the second picture frame.
For obtaining a device for pixel value, comprising:
Memory modules, for storing the first picture frame and the second picture frame, the value one_to_one corresponding of a row pixel in the value of the one-row pixels point wherein in the second picture frame and the first picture frame;
Read module, for when needing to obtain the value of one-row pixels point from the first picture frame, reads the value of this one-row pixels point in the first picture frame stored; When needing to obtain the value of a row pixel from the first picture frame, in the second picture frame stored, read the value of this row pixel one-row pixels point corresponding in the second picture frame.
The embodiment of the present invention preserves two two field pictures in internal memory, the value one_to_one corresponding of a row pixel in the value of the one-row pixels point in the second picture frame and the first picture frame.Obtaining from the first picture frame when needing the value reading pixels across point, obtaining from the second picture frame when needing the value reading longitudinal pixel.Substantially like this, once can obtain required data from internal memory, decrease the number of times of access memory, also improve the hit rate of high-speed cache, namely improve the speed obtaining pixel value, thus improve the speed of image procossing.
Accompanying drawing explanation
Fig. 1 is the schematic diagram of picture frame in prior art;
Fig. 2 is the main method flow chart obtaining pixel value in the embodiment of the present invention;
Fig. 3 is the schematic diagram of the first picture frame in the embodiment of the present invention;
Fig. 4 is the schematic diagram of the second picture frame in the embodiment of the present invention;
Fig. 5 is the method detailed flow chart of image procossing in the embodiment of the present invention;
Fig. 6 is the structure chart of device in the embodiment of the present invention.
Embodiment
The embodiment of the present invention stores two two field pictures in internal memory, and the first picture frame is exactly normal picture frame, and namely the pixel of the first picture frame is consistent with the pixel of objective image.Second picture frame is through obtaining after the first picture frame process, the value one_to_one corresponding of a row pixel in the value of the one-row pixels point in the second picture frame and the first picture frame.Like this, the value of required pixel is stored in internal memory all in rows, facilitates the reading of data, thus improves the speed of image procossing.
See Fig. 2, the main method flow process obtaining pixel value in the present embodiment is as follows:
Step 201: store the first picture frame and the second picture frame in internal memory, the value one_to_one corresponding of a row pixel in the value of the one-row pixels point wherein in the second picture frame and the first picture frame.
Step 202: when needing to obtain the value of one-row pixels point from the first picture frame, read the value of this one-row pixels point in the first picture frame stored.
Step 203: when needing to obtain the value of a row pixel from the first picture frame, read the value of this row pixel one-row pixels point corresponding in the second picture frame in the second picture frame stored.
Can also process the value of the pixel read further.
First picture frame can be the reference frame by obtaining after decoding, and the second picture frame obtains after the first picture frame process.In the motion compensation process process of decoding, the position corresponding in the first picture frame according to the value of the pixel in the motion vector determination present frame in present frame.When this position is between upper and lower two pixels, determine that this position column is at row corresponding to the second picture frame, and from the second picture frame, read the value of this row pixel, the value of described position is calculated again according to the value of this row pixel read, the value of the pixel namely in present frame, to realize the decoding to present frame.
Or the first picture frame is not complete picture frame, it comprises a few row and several row pixel that have decoded, or comprises one or more pieces in image.That is, the first picture frame only includes reference image vegetarian refreshments.Second picture frame obtains after the first picture frame process.In the intra-prediction process of decoding, when needing the value obtaining certain pixel, the value of the longitudinal neighbor pixel obtaining this pixel in advance or the value of horizontal neighbor pixel may be needed.When needing the value obtaining horizontal neighbor pixel, from the first picture frame, read the value of this horizontal neighbor pixel; When needing the value obtaining longitudinal neighbor pixel, determining the row that this longitudinal neighbor pixel is corresponding in the second picture frame, and from this row, reading the value of this longitudinal neighbor pixel.Go out the value of current pixel point according to the value prediction of the neighbor pixel read out, realize the decoding to this current pixel point.Then current pixel point is stored in the first picture frame and the second picture frame, to decode to later pixel point as with reference to pixel.
Or the first picture frame is the two field picture obtained after decoding, and the second picture frame obtains after the first picture frame process.Because infra-frame prediction is block-based prediction, so easily cause blocking effect, namely have obvious edge between block and block, in order to eliminate blocking effect, need to carry out macro block filtering, the pixel namely reducing the pixel on both sides, edge is poor.Carry out the value that macro block filtering also needs to obtain neighbor pixel.If edge is the longitudinal edge produced by two, left and right block, then need the value of the pixel obtaining these longitudinal edge both sides, namely the value of horizontal neighbor pixel is obtained, now need the row determining that this horizontal neighbor pixel is corresponding in the first picture frame, and from this row of the first picture frame, read the value of this horizontal neighbor pixel.If edge is the transverse edge produced by upper and lower two blocks, then need the value of the pixel obtaining these transverse edge both sides, namely the value of longitudinal neighbor pixel is obtained, now need the row determining that this longitudinal neighbor pixel is corresponding in the second picture frame, and from this row of the second picture frame, read the value of this longitudinal neighbor pixel.
Known by introducing above, in image processing process, need the scheme of the value obtaining longitudinal pixel, all can adopt the present embodiment.
In the present embodiment, the value one_to_one corresponding of a row pixel in the value of the one-row pixels point in the second picture frame and the first picture frame.In order and the first picture frame between second image frame middle row from row, order between the column and the column can be different.In the one-row pixels point of the second picture frame, in the order of pixel and a row pixel of the first picture frame, the order of pixel also can be different.As long as the corresponding relation of every row pixel in obtaining in the second picture frame often row pixel and the first picture frame.Preferably, the n-th row in corresponding first picture frame of n-th line in the second picture frame, and in the one-row pixels point of the second picture frame pixel one_to_one corresponding first picture frame from left to right a row pixel in pixel from top to bottom.Shown in Fig. 3 and Fig. 4, the table shown in Fig. 3 is equivalent to the first picture frame, and each cell represents a pixel, and its coordinate of each pixel identifies.Table shown in Fig. 4 is equivalent to the second picture frame.Can be found out by the corresponding relation of the mark of pixel in the mark of pixel in Fig. 4 and Fig. 3, the first row of the first picture frame is converted to the first row in the second picture frame, and the secondary series of the first picture frame is converted to the second row in the second picture frame ...
In the present embodiment, the second picture frame obtains after the first picture frame process, and processing mode has multiple, as first kind of way: by overturn the first picture frame and rotation obtains the second picture frame.Such as, after upwards overturning the first picture frame, dextrorotation turn 90 degrees again; Or rear another mistake hour hands 90-degree rotation etc. is overturn to the right to the first picture frame.As the second way: using pixel in the first picture frame as entry of a matrix element, using the value of pixel in the first picture frame as entry of a matrix element value, transposition is carried out to this matrix, obtains the second picture frame.N-th line element in n-th line pixel homography in first picture frame, preferably, in matrix, in the column locations relation of element and the first picture frame, the column locations relation of pixel is completely the same.
See Fig. 5, in the present embodiment, the method detailed flow process of image procossing is as follows:
Step 501: store the first picture frame in internal memory.
Step 502: process is carried out to the first picture frame and obtains the second picture frame.
Step 503: store the second picture frame in internal memory.
Step 504: determine the pixel needing to obtain.
Step 505: judge that the position of pixel in the first picture frame determined is longitudinal or transverse direction, if transverse direction, then continue step 506, if time longitudinal direction, then continue step 507.
Step 506: the value obtaining the pixel determined from the first picture frame.
Step 507: the value obtaining the pixel determined from the second picture frame.
Step 508: the value of the pixel read is processed.Process according to the value of decode operation to the pixel read; Or, process etc. according to the value of filtering operation to the pixel read.
Be more than the introduction to image processing process, this process can be realized by image processing apparatus, is introduced below to the internal structure of image processing apparatus and function.
See Fig. 6, the device for obtaining pixel value in the present embodiment comprises: memory modules 601, read module 602 and processing module 603.
Memory modules 601 for storing the first picture frame and the second picture frame, the value one_to_one corresponding of a row pixel in the value of the one-row pixels point wherein in the second picture frame and the first picture frame.
Read module 602, for when needing to obtain the value of one-row pixels point from the first picture frame, reads the value of this one-row pixels point in the first picture frame stored; When needing to obtain the value of a row pixel from the first picture frame, in the second picture frame stored, read the value of this row pixel one-row pixels point corresponding in the second picture frame.
Device also comprises: processing module 603 is for processing the value of the pixel read.Processing module 603 is specifically for processing according to the value of decode operation to the pixel read; Or, process according to the value of filtering operation to the pixel read.
Device also comprises: generation module 604 is for by overturn the first picture frame and rotation obtains the second picture frame; Or, using the value of pixel in the first picture frame as entry of a matrix element value, and transposition is carried out to this matrix, obtains the second picture frame.
Software for realizing the embodiment of the present invention can be stored in the storage mediums such as floppy disk, hard disk, CD and flash memory.
The embodiment of the present invention preserves two two field pictures in internal memory, the value one_to_one corresponding of a row pixel in the value of the one-row pixels point in the second picture frame and the first picture frame.Obtaining from the first picture frame when needing the value reading pixels across point, obtaining from the second picture frame when needing the value reading longitudinal pixel.Substantially like this, once can obtain required data from internal memory, decrease the number of times of access memory, also improve the hit rate of high-speed cache, thus improve the speed of image procossing.The technical scheme that the embodiment of the present invention provides is applicable to the several scenes such as image decoding, filtering.
Obviously, those skilled in the art can carry out various change and modification to the present invention and not depart from the spirit and scope of the present invention.Like this, if belong within the scope of the claims in the present invention and equivalent technologies thereof to these amendments of the present invention and modification, then the present invention is also intended to comprise these change and modification.
Claims (7)
1. obtain a method for pixel value, it is characterized in that, comprise the following steps:
By to overturn the first picture frame and rotation obtains the second picture frame; Or using the value of pixel in the first picture frame as entry of a matrix element value, and transposition is carried out to this matrix, obtain the second picture frame;
The first picture frame and the second picture frame is stored, the value one_to_one corresponding of a row pixel in the value of the one-row pixels point wherein in the second picture frame and the first picture frame in internal memory;
When needing to obtain the value of one-row pixels point from the first picture frame, in the first picture frame stored, read the value of this one-row pixels point;
When needing to obtain the value of a row pixel from the first picture frame, in the second picture frame stored, read the value of this row pixel one-row pixels point corresponding in the second picture frame.
2. the method for claim 1, it is characterized in that, the value of the one-row pixels point in the second picture frame comprises with the value one_to_one corresponding of a row pixel in the first picture frame: in corresponding first picture frame of the n-th line in the second picture frame n-th arranges, and in the one-row pixels point of the second picture frame pixel one_to_one corresponding first picture frame from left to right a row pixel in pixel from top to bottom.
3. the method for claim 1, is characterized in that, also comprises: process the value of the pixel read;
The step that the value of the pixel read processes is comprised: process according to the value of decode operation to the pixel read; Or, process according to the value of filtering operation to the pixel read.
4. for obtaining a device for pixel value, it is characterized in that, comprising:
Generation module, for by overturn the first picture frame and rotation obtains the second picture frame; Or, using the value of pixel in the first picture frame as entry of a matrix element value, and transposition is carried out to this matrix, obtains the second picture frame;
Memory modules, for storing the first picture frame and the second picture frame, the value one_to_one corresponding of a row pixel in the value of the one-row pixels point wherein in the second picture frame and the first picture frame;
Read module, for when needing to obtain the value of one-row pixels point from the first picture frame, reads the value of this one-row pixels point in the first picture frame stored; When needing to obtain the value of a row pixel from the first picture frame, in the second picture frame stored, read the value of this row pixel one-row pixels point corresponding in the second picture frame.
5. device as claimed in claim 4, it is characterized in that, the value of the one-row pixels point in the second picture frame comprises with the value one_to_one corresponding of a row pixel in the first picture frame: in corresponding first picture frame of the n-th line in the second picture frame n-th arranges, and in the one-row pixels point of the second picture frame pixel one_to_one corresponding first picture frame from left to right a row pixel in pixel from top to bottom.
6. device as claimed in claim 4, is characterized in that, also comprise: processing module, for processing the value of the pixel read.
7. device as claimed in claim 6, is characterized in that, processing module processes according to the value of decode operation to the pixel read; Or, process according to the value of filtering operation to the pixel read.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN200910242666.7A CN102098477B (en) | 2009-12-14 | 2009-12-14 | Method and device for obtaining pixel values |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN200910242666.7A CN102098477B (en) | 2009-12-14 | 2009-12-14 | Method and device for obtaining pixel values |
Publications (2)
Publication Number | Publication Date |
---|---|
CN102098477A CN102098477A (en) | 2011-06-15 |
CN102098477B true CN102098477B (en) | 2015-05-20 |
Family
ID=44131317
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN200910242666.7A Expired - Fee Related CN102098477B (en) | 2009-12-14 | 2009-12-14 | Method and device for obtaining pixel values |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN102098477B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103862882B (en) * | 2014-02-24 | 2016-06-15 | 广东宝莱特医用科技股份有限公司 | A kind of method and system of thermal printer self adaptation Paper Printing |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1315023A (en) * | 1998-08-13 | 2001-09-26 | 赤道技术公司 | Circuit and method for performing bidimentional transform during processing of an image |
CN1404015A (en) * | 2002-10-16 | 2003-03-19 | 威盛电子股份有限公司 | Partial image rotating device and method |
CN1685363A (en) * | 2002-09-18 | 2005-10-19 | 皇家飞利浦电子股份有限公司 | Block-based rotation of arbitrary-shaped images |
CN101515999A (en) * | 2008-02-09 | 2009-08-26 | 富士通微电子株式会社 | Image processing circuit, image processing method, and camera |
-
2009
- 2009-12-14 CN CN200910242666.7A patent/CN102098477B/en not_active Expired - Fee Related
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1315023A (en) * | 1998-08-13 | 2001-09-26 | 赤道技术公司 | Circuit and method for performing bidimentional transform during processing of an image |
CN1685363A (en) * | 2002-09-18 | 2005-10-19 | 皇家飞利浦电子股份有限公司 | Block-based rotation of arbitrary-shaped images |
CN1404015A (en) * | 2002-10-16 | 2003-03-19 | 威盛电子股份有限公司 | Partial image rotating device and method |
CN101515999A (en) * | 2008-02-09 | 2009-08-26 | 富士通微电子株式会社 | Image processing circuit, image processing method, and camera |
Also Published As
Publication number | Publication date |
---|---|
CN102098477A (en) | 2011-06-15 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP6208993B2 (en) | Image decoding apparatus and decoding processing method of image decoding apparatus | |
JP5147102B2 (en) | Memory access method | |
CN103096057A (en) | Chromaticity intra-frame prediction method and device | |
CN109360140B (en) | Reversible image watermarking method and device based on prediction error addition expansion | |
CN102291531A (en) | Image processing apparatus, image processing method, and program | |
US20170078670A1 (en) | Analytics Assisted Encoding | |
CN102088610A (en) | Video codec and motion estimation method thereof | |
TW201824868A (en) | Video decoding system, video decoding method and computer storage medium thereof | |
US20150189333A1 (en) | Method and system for image processing, decoding method, encoder, and decoder | |
JP4865662B2 (en) | Entropy encoding apparatus, entropy encoding method, and computer program | |
CN102098477B (en) | Method and device for obtaining pixel values | |
CN102760280A (en) | High-capacity reversible watermark embedding and extracting method as well as implement system thereof | |
CN110572713B (en) | Transcoding method and processing terminal for adaptive video bandwidth ratio | |
CN105007493B (en) | Matching searching method and system based on motion search window | |
US20080049035A1 (en) | Apparatus and method for accessing image data | |
CN102111615B (en) | Method and system for implementing video filtering in DMA removal | |
CN104219529B (en) | Image-scaling method, system and device | |
US20110102681A1 (en) | Image converting method and apparatus therefor based on motion vector-sharing | |
CN100592799C (en) | Rapid reading method of motion compensating data based on H.264 standard | |
KR102247741B1 (en) | An image processor, a method of operating the image processor, and an application processor including the image processor | |
CN114792290A (en) | Image/video processing | |
JP4383367B2 (en) | Motion vector detection device | |
CN102629366B (en) | Image processing method and apparatus thereof | |
US9432690B2 (en) | Apparatus and method for video processing | |
JP5261694B2 (en) | Image processing memory |
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 | ||
C56 | Change in the name or address of the patentee | ||
CP01 | Change in the name or title of a patent holder |
Address after: 214028 national integrated circuit design Park, Changjiang Road, New District, Jiangsu,, Wuxi Patentee after: WUXI ZHONGGAN MICROELECTRONIC CO., LTD. Address before: 214028 national integrated circuit design Park, Changjiang Road, New District, Jiangsu,, Wuxi Patentee before: Wuxi Vimicro Co., Ltd. |
|
CF01 | Termination of patent right due to non-payment of annual fee | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20150520 Termination date: 20181214 |