CN100440973C - A macro block prefetching method in video encoding-decoding process - Google Patents
A macro block prefetching method in video encoding-decoding process Download PDFInfo
- Publication number
- CN100440973C CN100440973C CNB2004101014648A CN200410101464A CN100440973C CN 100440973 C CN100440973 C CN 100440973C CN B2004101014648 A CNB2004101014648 A CN B2004101014648A CN 200410101464 A CN200410101464 A CN 200410101464A CN 100440973 C CN100440973 C CN 100440973C
- Authority
- CN
- China
- Prior art keywords
- macro block
- piece
- decoding process
- address
- video encoding
- 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
Landscapes
- Compression Or Coding Systems Of Tv Signals (AREA)
Abstract
The present invention discloses a method for prefetching a macro block in the encoding-decoding process of a video. The present invention comprises the following steps: 1. obtaining a macro block, 2. prefetching one block in the macro block according to the line order and the column order of the block for buffering, 3. using the buffered block for the encoding-decoding process of the video, 4. processing all the blocks in the macro block in order according to the step 2 and the step 3, and 5. processing all the macro blocks which need to be processed in order according to step 1 to step 4. Because the present invention changes the method that the macro block is prefetched according to the line order and the column order of the macro block in the prior art and adopts the method that the macro block is prefetched according to the line order and the column order of the blocks in the macro block, a buffer address is an effective address, the problem of buffering miss in the prior art is avoided, the speed of the encoding-decoding process is enhanced, and meanwhile, the stability and the knowability of system performance are ensured.
Description
Technical field
The present invention relates to a kind of method of video data encoding and decoding, the method for macro block prefetching in particularly a kind of video encoding-decoding process.
Technical background
The algorithm of currently used coding and decoding video is divided into several macro blocks (macro block) as encoding and decoding H.264 with view data.And each macro block in the detail section of image will further be subdivided into several pieces (block).H.264 the encoding and decoding flow process comprises estimation (motion estimation, ME), motion compensation (motion compensation, MC), processing procedures such as infra-frame prediction, conversion, quantification, inverse transformation, inverse quantization, entropy coding, and when carrying out these processing, can be the unit with the macro block, by each piece sequential processes of interior macroblocks.General System memory buffer size is 32WORDS, i.e. 64 words are equivalent to the size of one 8 * 8 piece.Thereby when macro block was operated, Installed System Memory was not enough to all data addresses of macro block are looked ahead.In addition, in interior macroblocks, data are with the linescan method sequential storage, and therefore for a piece, its address is discontinuous.The method of carrying out macro block prefetching at present mainly is, reads and writes the data of one of them piece in proper order by the linescan method of macro block, after the end, reads and writes the data of other piece more in the same way, all piece in finishing this macro block.Because block address is discontinuous, and be subjected to the restriction of system buffer size, all data that can not store a piece in the buffering area, therefore inevitably there is the problem of the buffering miss (cache miss) of read-write in this method.And the existence of sort buffer miss will reduce the speed of video data encoding and decoding on the one hand greatly, also will increase the unknowable defective of the systematic function that causes because of internal storage access on the other hand.
Summary of the invention
The objective of the invention is:, provide the method for macro block prefetching in the video encoding-decoding process that a kind of video data encoding and decoding speed is fast, cache hit rate is high at the deficiencies in the prior art.
In order to solve the problems of the technologies described above, the technical solution used in the present invention is: the method for macro block prefetching in a kind of video encoding-decoding process comprises the steps:
Step 1, macro block of acquisition;
Step 2, the ranks order of pressing piece, a piece in this macro block of looking ahead carries out buffer memory;
Step 3, the piece of institute's buffer memory is used for coding and decoding video handles;
Step 4, handle all pieces in this macro block successively according to step 2 and step 3;
Step 5, according to step 1~step 4, handle the macro block that all need be handled successively.
Described step 1 is specifically as follows: obtain the base address of a macro block and the type of the interior piece of this macro block.
Described step 2 is specifically as follows: according to the base address of macro block, the type and the position of this piece in macro block of piece, thus the actual address of definite this piece, and the cache blocks data.
Can adopt look-up table to determine the actual address of piece.
Described step 1 is specifically as follows: the type of determining the address realm and the interior piece of this macro block of a macro block.
Described step 2 is specifically as follows: according to the type and the position of this piece in macro block of piece, determine the actual address of this piece, thus the cache blocks data.
Described macro block can be 16 * 16 pixels, and described can be 8 * 8,8 * 4,4 * 8 or 4 * 4 pixels.
In technique scheme, the present invention is owing to the linescan method according to the piece in the macro block obtains block address, with the cache blocks data, thereby in carrying out video data encoding and decoding processing procedure, can be according to directly in buffering area, obtaining blocks of data, do not exist extra buffering to hit the problem of inefficacy, thereby the internal storage access time of system can effectively be estimated, reduced the unknowable defective of the systematic function that causes because of internal storage access.In addition, under the situation of type of precognition piece,, just can determine the address realm of interior each piece of macro block, can guarantee the validity of the buffer address that reads and writes data by tabling look-up or calculation mode as long as obtained the base address of macro block.Its processing procedure is simple but can improve the speed of video data encoding and decoding greatly.
Embodiment
Below in conjunction with specific embodiment the present invention is described in further detail.
The invention provides the method for macro block prefetching in a kind of video encoding-decoding process, its step is as follows:
Step 1, macro block of acquisition;
Step 2, the ranks order of pressing piece, a piece in this macro block of looking ahead carries out buffer memory;
Step 3, the piece of institute's buffer memory is used for coding and decoding video handles;
Step 4, handle all pieces in this macro block successively according to step 2 and step 3;
Step 5, according to step 1~step 4, handle the macro block that all need be handled successively.
Because the size of system buffer is generally 64 bytes at present, just in time is one 8 * 8 piece.This becomes possibility with regard to making system buffer piece that is less than or equal to 8 * 8 pixels of each buffer memory.Therefore, from above-mentioned steps as can be seen, essence of the present invention is: change the way to looking ahead in proper order by the macro block ranks in the prior art, and the method that employing is looked ahead in proper order by the ranks of the piece of interior macroblocks, making the buffer address is effective address, avoid the problem of buffering miss of problem in the prior art with this, improved the speed of encoding and decoding, also guaranteed the stability and the knowability of systematic function simultaneously.
To provide two kinds of specific embodiments of the present invention below.The present invention includes but be not limited to this two kinds of embodiment.
Embodiment 1:
The method of macro block prefetching in a kind of video encoding-decoding process, its step is as follows:
Step 1) obtains a macro block.Be specially: obtain the base address of a macro block and the type of the interior piece of this macro block.
In the video data encoding-decoding process, the division of piece comprises 4 * 4,4 * 8,8 * 4 to 16X16 is several, for example when the estimation of algorithm H.264, generally the pattern that all pieces are divided will be used for simultaneously calculating, the last residual result of estimating at comparing motion decides any block of use to divide.Therefore adopt method provided by the present invention, can effectively improve the visit hit rate of interior macroblocks.
Under the YUV420 pattern, a macro block (macro block) size is 16 * 16 pixels, comprises the piece of 4 brightness (Y) component and the piece of each 1 UV component.Wherein each piece is 8 * 8 pixels.
Step 2), press the ranks order of piece, a piece in this macro block of looking ahead carries out buffer memory.Be specifically as follows: according to the base address of macro block, the type and the position of this piece in macro block of piece, thereby the actual address of definite this piece buffers into the blocks of data with correspondence in the buffering area of system.
Here we can adopt look-up table to determine the actual address of piece.
As the type of knowing piece in advance is 8 * 8 pixels, then at first sets up the address date table, is used to store the offset address of each piece.
Then when cache blocks, only need to search the offset address sum that obtains actual address, and, blocks of data is buffered into the system buffer by this actual address as piece with the macro block base address and in the address date table.
Step 3, the piece of institute's buffer memory is used for coding and decoding video handles.H.264 described coding and decoding video processing procedure comprises in the algorithm, carries out processing procedures such as estimation, motion compensation, conversion, quantification.
Step 4, handle all pieces in this macro block successively according to step 2 and step 3.
Step 5, according to step 1~step 4, handle the macro block that all need be handled successively.
Embodiment 2:
The method of macro block prefetching comprises the steps: in a kind of video encoding-decoding process that present embodiment provides
Step 1, macro block of acquisition; Be specially: the type of determining the address realm and the interior piece of this macro block of a macro block.
Step 2, the ranks order of pressing piece, a piece in this macro block of looking ahead carries out buffer memory; Be specially: according to the type and the position of this piece in macro block of piece, determine the actual address of this piece, thus the cache blocks data.Here can be according to the type and the position of this piece in macro block of piece, utilize software to set up data address index to piece, thereby to the blocks of data of the assigned address buffer memory of looking ahead.
Step 3, the piece of institute's buffer memory is used for coding and decoding video handles;
Step 4, handle all pieces in this macro block successively according to step 2 and step 3;
Step 5, according to step 1~step 4, handle the macro block that all need be handled successively.
The present invention is not only applicable to 8 * 8 piece, equally is used in the piece less than 8 * 8 pixels yet, as 8 * 4, and the piece of 4 * 8 or 4 * 4 pixels.
Claims (7)
1, the method for macro block prefetching in a kind of video encoding-decoding process comprises the steps:
Step 1, macro block of acquisition;
The actual address of the piece in this macro block is determined in step 2, the address that obtains macro block, the type of the piece in this macro block and the position in macro block thereof, and by the ranks order of the piece of interior macroblocks, a piece in this macro block of looking ahead carries out buffer memory;
Step 3, the piece of institute's buffer memory is used for coding and decoding video handles;
Step 4, handle all pieces in this macro block successively according to step 2 and step 3;
Step 5, according to step 1~step 4, handle the macro block that all need be handled successively.
2, the method for macro block prefetching in the video encoding-decoding process according to claim 1, it is characterized in that: described step 1 is specially: the type that obtains piece in the base address of a macro block and this macro block.
3, as the method for macro block prefetching in the video encoding-decoding process as described in the claim 2, it is characterized in that: described step 2 is specially: according to the base address of macro block, the type and the position of this piece in macro block of piece, thereby determine the actual address of this piece, and cache blocks data.
4, as the method for macro block prefetching in the video encoding-decoding process as described in the claim 3, it is characterized in that: adopt look-up table to determine the actual address of piece.
5, the method for macro block prefetching in the video encoding-decoding process according to claim 1, it is characterized in that: described step 1 is specially: the type of determining piece in the address realm of a macro block and this macro block.
6, as the method for macro block prefetching in the video encoding-decoding process as described in the claim 5, it is characterized in that: described step 2 is specially: according to the type and the position of this piece in macro block of piece, determine the actual address of this piece, thus the cache blocks data.
7, as the method for macro block prefetching in the video encoding-decoding process as described in one of in the claim 1,2,3,4,5,6, it is characterized in that: described macro block is 16 * 16 pixels, and described is 8 * 8,8 * 4,4 * 8 or 4 * 4 pixels.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CNB2004101014648A CN100440973C (en) | 2004-12-21 | 2004-12-21 | A macro block prefetching method in video encoding-decoding process |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CNB2004101014648A CN100440973C (en) | 2004-12-21 | 2004-12-21 | A macro block prefetching method in video encoding-decoding process |
Publications (2)
Publication Number | Publication Date |
---|---|
CN1622626A CN1622626A (en) | 2005-06-01 |
CN100440973C true CN100440973C (en) | 2008-12-03 |
Family
ID=34766771
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CNB2004101014648A Expired - Fee Related CN100440973C (en) | 2004-12-21 | 2004-12-21 | A macro block prefetching method in video encoding-decoding process |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN100440973C (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103533366B (en) * | 2012-07-03 | 2016-11-23 | 展讯通信(上海)有限公司 | The caching method compensated for video motion and device |
CN103634604B (en) * | 2013-12-01 | 2017-01-11 | 北京航空航天大学 | Multi-core DSP (digital signal processor) motion estimation-oriented data prefetching method |
CN105847817B (en) * | 2015-01-14 | 2019-09-17 | 炬芯(珠海)科技有限公司 | A kind of video processing equipment and method |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1126408A (en) * | 1994-06-14 | 1996-07-10 | 大宇电子株式会社 | Apparatus for parallel decoding of digital video signals |
-
2004
- 2004-12-21 CN CNB2004101014648A patent/CN100440973C/en not_active Expired - Fee Related
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1126408A (en) * | 1994-06-14 | 1996-07-10 | 大宇电子株式会社 | Apparatus for parallel decoding of digital video signals |
Non-Patent Citations (6)
Title |
---|
关于汇编语言中寻址方式的深入探讨. 关爱芬,宋鸣.云南教育学院学报,第14卷第5期. 1998 |
关于汇编语言中寻址方式的深入探讨. 关爱芬,宋鸣.云南教育学院学报,第14卷第5期. 1998 * |
数字电视中心技术. 张琦 杨盈昀等,112,北京广播学院出版社. 2001 |
数字电视中心技术. 张琦 杨盈昀等,112,北京广播学院出版社. 2001 * |
视频编码新标准-H.264. 朱秀昌.电信科学,第12期. 2002 |
视频编码新标准-H.264. 朱秀昌.电信科学,第12期. 2002 * |
Also Published As
Publication number | Publication date |
---|---|
CN1622626A (en) | 2005-06-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20180084269A1 (en) | Data caching method and apparatus for video decoder | |
US8203648B2 (en) | Motion vector detecting apparatus and motion vector detecting method | |
US20130028324A1 (en) | Method and device for decoding a scalable video signal utilizing an inter-layer prediction | |
CN101163244A (en) | Picture element caching method and system in movement compensation process of video decoder | |
US7965773B1 (en) | Macroblock cache | |
CN101022553A (en) | Image data accessing and decoding method and decoding device | |
CN111355962A (en) | Video decoding caching method suitable for multiple reference frames, computer device and computer readable storage medium | |
CN103634604B (en) | Multi-core DSP (digital signal processor) motion estimation-oriented data prefetching method | |
US8963809B1 (en) | High performance caching for motion compensated video decoder | |
CN100440973C (en) | A macro block prefetching method in video encoding-decoding process | |
CN103618898A (en) | Complexity image lossless compression method supporting random access | |
CN101557518B (en) | Method and device for compensating motion, method and device for replacing cache | |
CN101783958B (en) | Calculation method and device of temporal direct mode motion vector in AVS video standard | |
US9137541B2 (en) | Video data cache | |
US9363524B2 (en) | Method and apparatus for motion compensation reference data caching | |
KR20070034231A (en) | External memory device, image data storage method thereof, image processing device using the same | |
US8514237B2 (en) | Two dimensional memory caching apparatus for high definition video | |
US20090157982A1 (en) | Multiple miss cache | |
JP3322233B2 (en) | Moving image decompression method and recording medium recording program for executing the method | |
CN100592799C (en) | Rapid reading method of motion compensating data based on H.264 standard | |
US7843993B2 (en) | Moving picture encoding apparatus having increased encoding speed and method thereof | |
JP2006270683A (en) | Coding device and method | |
CN1520187A (en) | System and method for video data compression | |
CN101304520A (en) | Image decoding system and adaptive fast access method for motion compensation thereof | |
CN110945872A (en) | Video processing apparatus and method |
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 | ||
C17 | Cessation of patent right | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20081203 Termination date: 20111221 |