CN102625095B - AVS-based interframe prediction method - Google Patents

AVS-based interframe prediction method Download PDF

Info

Publication number
CN102625095B
CN102625095B CN201110030395.6A CN201110030395A CN102625095B CN 102625095 B CN102625095 B CN 102625095B CN 201110030395 A CN201110030395 A CN 201110030395A CN 102625095 B CN102625095 B CN 102625095B
Authority
CN
China
Prior art keywords
block
data
row
chrominance
external memory
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201110030395.6A
Other languages
Chinese (zh)
Other versions
CN102625095A (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.)
National Source Coding Center Digital Audio And Video Frequency Technology (beijing) Co Ltd
Original Assignee
National Source Coding Center Digital Audio And Video Frequency Technology (beijing) 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 National Source Coding Center Digital Audio And Video Frequency Technology (beijing) Co Ltd filed Critical National Source Coding Center Digital Audio And Video Frequency Technology (beijing) Co Ltd
Priority to CN201110030395.6A priority Critical patent/CN102625095B/en
Publication of CN102625095A publication Critical patent/CN102625095A/en
Application granted granted Critical
Publication of CN102625095B publication Critical patent/CN102625095B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

The invention provides an AVS-based interframe prediction method, comprising dividing frames that need interfame prediction into multiple macro-blocks and carrying out the interframe prediction to each macro-block successively. For each macro-block the interframe prediction comprises the following steps: reading corresponding motion vector of the present macro-block from AVS code stream; dividing the present macro-block into multiple subblocks in correspondence with the motion vector to carry out motion compensation; determining a minimum size for a reference image of the subblock according to an interpolation position where a corresponding motion vector of the subblock directs and reading a reference image from external storage according to the minimum size; and recovering the present macro-block according to an interpolation operation between the reference image and the motion vector. The method of the invention has the technological effects that bandwidth occupied for visiting external storage is substantially decreased, that frequency of visiting external storage is decreased, and that external storage room occupied for storing reference frames is decreased.

Description

A kind of inter-frame prediction method based on AVS
Technical field
The present invention relates to source coding technique field, specifically, the present invention relates to a kind of inter-frame prediction method.
Background technology
Advanced audio/video encoding standard (English is Audio Video Coding Standard, herein referred to as AVS standard) is the second generation information source coding standard that China possesses independent intellectual property right." information source " is information " source ", and the Important Problems that source coding technique solves is the compression coding problem of digital audio/video mass data (being primary data, information source), therefore also claim digital audio/video encoding and decoding technique.Obviously, it is the prerequisite of the links such as digital information transmission, storage, broadcasting thereafter, so information source coding standard is the general character basic standard of digital audio/video industry.
In AVS standard, frame (frame) is the expression of vision signal spatial information, a luma samples matrix (Y) and two chroma sample matrixes (Cb and Cr), consists of.Inter prediction (inter prediction) is to use early decoding image (or field) to generate the process of present image (or field) sample predicted value.
Typical AVS decode structures has adopted motion prediction compensation, inverse transformation, inverse quantization and the entropy decoding in time and space.In video code flow to be decoded, include following three kinds of coded images:
In-frame encoding picture (I image): only use image self-information to encode, in when decoding not with reference to other images;
Forward predictive coded image (P image): P image is to predict forward one or more I images or P image, therefore, if above certain does not exist with reference to I image or P image, this P image can not be decoded;
Bidirectionally predictive coded picture (B image): can be simultaneously forward with back forecast one frame or multiframe decoded I image or P image; Therefore when decoding B image, need to first decode and obtain on DISPLAY ORDER I image or P view data thereafter, can cause the inconsistent of decoding order and DISPLAY ORDER like this.
Can find out, the encoding-decoding process of P image and B image all needs to process through inter prediction.In cataloged procedure, if present image is P image or B image, need to carry out inter prediction according to corresponding reference picture, calculate and store present image with respect to the motion vector (motion vector is to point to reference picture by present image, the skew that its value is current block and reference block coordinate in image) of reference picture.When decoding, only need to, according to described motion vector and reference picture, just can recover described present image like this.Inter prediction technology can effectively reduce time redundancy, and in AVS standard, also for motion compensation, further introduce new technological means such as becoming piece size, multi-reference frame, direct and symmetrical predictive mode, unrestricted motion vector, picture element interpolation, thereby obtained higher code efficiency.Yet above-mentioned new technological means has also increased amount of calculation and memory bandwidth when improving code efficiency.
At present, high performance AVS decoder is generally used hardware to realize, and decoded frame can be stored into external memory as the reference data of other frame of decoding, just from external memory, reads these reference datas when inter prediction.
In AVS standard, decoder is divided into several macro blocks by a two field picture, successively each macro block is carried out to inter prediction.Each macro block has four kinds of partition modes.As shown in Figure 1, four kinds of partition modes respectively: 1 16 * 16 luminance block and corresponding chrominance block, 2 16 * 8 luminance block and corresponding chrominance block, 28 * 16 luminance block and corresponding chrominance block, 48 * 8 luminance block and corresponding chrominance block.Each luminance block and chrominance block be corresponding motion vector separately all, for use in motion compensation.AVS standard adopts four kinds of macro-block partition modes, can improve code efficiency.But due to the macro block of different patterns, while carrying out inter prediction, the location of pixels of the required reference picture reading and number are different, therefore, this change piece size is also brought to inter prediction can more challenges.
In the prior art, no matter what form is current macro be, the decoder all fixing pattern according to 48 * 8 reads reference picture, is unified into 8 * 8 and carries out motion compensation.The defects such as this mode is easy to realize, but has access external memory often, and the data total amount that reads from external memory is large.Its reason is: when motion vector is 1/2 pixel or 1/4 pixel, need to carry out to brightness (colourity) interpolation of 1/2nd samples and 1/4th samples, and the required reference picture of the interpolation of 1/2nd samples and 1/4th samples is more, in some location of interpolation, what need reads 12 * 12 individual reference pixel, therefore, and when bi-directional predicted, a macro block is carried out to inter prediction and need to read 12 * 12 * 4 * 2=1152 pixel, the i.e. data of 1152bytes.That is to say, a macro block is carried out to inter prediction, just need to from external memory, read the data of 1152bytes, and in the data of this 1152bytes, in fact have some redundant datas, cause the waste of memory bandwidth, hardware spending increases.On the other hand, due at every turn all the mode reads of 48 * 8 of cases fetch data, make the increased frequency of decoder accesses external memory, this can cause the increase of the total time delay of memory access.At present, the memory access amount of inter prediction accounts for 50% of the total memory access amount of decoder, and wherein the processing time of sub-pixel interpolation computing accounts for 25% of total decode time.Can find out, inter prediction has become one of the most intensive part of data volume in AVS codec, is also the bottleneck place of whole system simultaneously.
In sum, under the current prerequisite in the urgent need to a kind of code efficiency in assurance AVS standard, can avoid the inter-frame prediction method based on AVS that reads redundant data, reduces access external memory number of times.
Summary of the invention
The object of this invention is to provide under a kind of prerequisite of the code efficiency in assurance AVS standard, can avoid the inter-frame prediction method based on AVS that reads redundant data, reduces access external memory number of times.
For achieving the above object, the invention provides a kind of inter-frame prediction method based on AVS, the method comprises that the frame that need to carry out inter prediction is divided into several macro blocks, carries out inter prediction to each macro block successively, for each macro block, inter prediction comprises the following steps:
1) from AVS code stream, read the corresponding motion vector of current macro;
2) according to motion vector, read reference picture; Comprise following sub-step:
21) current macro is divided into the corresponding some sub-blocks of motion vector and carries out motion compensation,
22), for each sub-block, according to its corresponding motion vector location of interpolation pointed, determine (comprising whole picture element interpolation position, 1/2 picture element interpolation position and 1/4 picture element interpolation position) minimum dimension of its reference picture; According to the minimum dimension application external memory of described reference picture and read described reference picture from external memory;
3) according to reference picture and motion vector, carry out interpolation arithmetic, recover current macro.
Wherein, described step 1) in, also comprise the partition pattern that reads current macro from AVS code stream;
Described step 21) in, according to the partition mode division sub-block of read current macro.
Wherein, described step 22) in, according to motion vector, draw the location of interpolation of current block, different location of interpolation are adjusted respectively to line number and the columns of applied for external memory.
Wherein, described step 21) in, the luminance block unification of current macro is divided into 48 * 8 brightness sub-blocks; By the Cb chrominance block of the current macro also unified Cb colourity sub-block that is divided into 4 same sizes; By the Cr chrominance block of the current macro also unified Cr colourity sub-block that is divided into 4 same sizes.
Wherein, described step 22) in, for first sub-block in described macro block, from external memory, read the total data of reference picture, and read data are deposited in buffer memory mem; For other sub-block in this macro block, from the appropriate address of buffer memory mem, read the partial data of reference picture, and from external memory, read the remainder data of reference picture; Described sub-block is brightness sub-block and/or colourity sub-block.
Wherein, the described inter-frame prediction method based on AVS also comprises: by the Cb colourity in AVS code stream and Cr chroma data Laden Balance to external memory,
Described step 22), in, in an interleaved fashion the reference picture of every couple of Cb and Cr colourity sub-block is once read from external memory.
Wherein, described step 22), in, when motion vector position pointed exceeds frame boundaries, from external memory, read the data that are positioned at frame boundaries in reference picture, then according to motion vector, carry out data with the data that are positioned at frame boundaries that read and augment, thereby obtain complete reference picture.
Compared with prior art, the present invention has following technique effect:
1, greatly reduced the shared bandwidth of access external memory.
2, can reduce the number of times of access external memory.
3, reduced the shared external space of storage of reference frames.
Accompanying drawing explanation
Fig. 1 shows the partition pattern of a macro block in AVS standard;
Fig. 2 shows the overlapping data of the repetition occurring when each sub-block reads reference picture; Solid line boxes represents to carry out the sub-block of motion compensation, and dashed rectangle represents the corresponding reference picture of sub-block, and grey color part represents the overlapping data of repetition;
Fig. 3 shows the luminance block interpolation schematic diagram in AVS standard;
Fig. 4 shows the chrominance block interpolation schematic diagram in AVS standard;
Fig. 5 shows the data interlacing structural representation in the embodiment of the present invention 5;
The data that Fig. 6 shows in the embodiment of the present invention 6 are augmented structural representation.
Embodiment
Below, in conjunction with the accompanying drawings and embodiments the present invention is done further and described.
Embodiment 1
According to one embodiment of present invention, provide a kind of inter-frame prediction method based on AVS.In the method, the frame that decoder need to carry out inter prediction is divided into several macro blocks, successively each macro block is carried out to inter prediction.For each macro block, inter prediction process comprises the following steps:
The first step: the pattern and the corresponding motion vector that read current macro from AVS code stream;
Second step: read from external memory and carry out the required reference picture of inter prediction according to the pattern of current macro and motion vector;
The 3rd step: carry out interpolation arithmetic according to reference picture and motion vector, recover current macro.
Introduce in detail respectively above-mentioned steps below.
One, from AVS code stream, read partition mode and the corresponding motion vector of current macro
In AVS standard, single macro block can be divided into: 1 16 * 16 luminance block and corresponding chrominance block, 2 16 * 8 luminance block and corresponding chrominance block, 28 * 16 luminance block and corresponding chrominance block, or 48 * 8 luminance block and corresponding chrominance block.Its partition mode can be read from AVS code stream.Also read all corresponding motion vectors separately of each luminance block and chrominance block, for use in motion compensation (being inter prediction) simultaneously.
Two, according to the pattern of current macro and motion vector, from external memory, read and carry out the required reference picture of inter prediction
The present embodiment has adopted the mode of interblock data reusing from external memory, to read reference picture, can avoid like this in a macro block, repeating the overlapping reference data of reading section, can effectively reduce the bandwidth (memory bandwidth) of access external memory.
In AVS standard, a macro block comprises luminance block (Y) and chrominance block (Cb and Cr), and luminance block (Y) and chrominance block (Cb and Cr) all need to carry out motion compensation to draw inter prediction result.
In AVS standard, adopt the motion compensation of tree-shaped change piece size, minimum block size is 8 * 8, need to read 12 * 12 reference data.If be unified into 8 * 8, carry out motion compensation, carrying out when bi-directional predicted, need to read the data volume of 12 * 12 * 4 * 2=1152bytes.And in fact, all there is overlapping part (as shown in Figure 2) in the reference data of any two 8 * 8 corresponding 12 * 12, there are the data that repeat to read, so just consumed more memory bandwidth.Therefore, the present embodiment has designed data reusing mechanism, makes when carrying out interpolation arithmetic, can reuse the overlapping part between the reference data of two 8 * 8.
The buffer memory mem of the present embodiment 40 * 96 (40 row 96 row) size, mem shares when sub-pixel interpolation brightness and colourity.For luminance block, the address space of buffer memory mem is allocated as follows:
1) .0~11 row is used for storing forward direction block 0 or block 2, and the partial data of overlapping row;
2) .12~23 row is used for storing backward block 0 or block 2, and the partial data of overlapping row;
3) .24~27 row is for storing the partial data of the overlapping row of forward direction block 1;
4) .28~31 row is for storing the partial data of the overlapping row of backward block 1.
Like this, during first 8 * 8 luminance block interpolation, still from external memory, read 12 * 12 reference data of its correspondence, during other 8 * 8 luminance block interpolation, reading section reference data from the appropriate address of buffer memory mem, and from external memory, read all the other reference datas.So just greatly saved the memory bandwidth of decoder.
For chrominance block Cb, the address space of buffer memory mem is allocated as follows:
1) data of the block 0 of .0~4 row storage chrominance C b forward direction;
2) .5~9 row is stored the data of the backward block 0 of chrominance C b;
3) data of the block 1 of .10~14 row storage chrominance C b forward direction;
4) .15~19 row is stored the data of the backward block 1 of chrominance C b;
5) data of the block 2 of .20~24 row storage chrominance C b forward direction;
6) .25~29 row is stored the data of the backward block 2 of chrominance C b;
7) data of the block 3 of .30~34 row storage chrominance C b forward direction;
8) .35~39 row is stored the data of the backward block 3 of chrominance C b.
For chrominance block Cr, the address space of buffer memory mem is allocated as follows:
1) data of the block 0 of .0~4 row storage chrominance C r forward direction;
2) .5~9 row is stored the data of the backward block 0 of chrominance C r;
3) data of the block 1 of .10~14 row storage chrominance C r forward direction;
4) .15~19 row is stored the data of the backward block 1 of chrominance C r;
5) data of the block 2 of .20~24 row storage chrominance C r forward direction;
6) .25~29 row is stored the data of the backward block 2 of chrominance C r;
7) data of the block 3 of .30~34 row storage chrominance C r forward direction;
8) .35~39 row is stored the data of the backward block 3 of chrominance C r.
Interpolation in luminance block is similar, during to first chrominance block interpolation, reads required whole reference datas from external memory.During to other chrominance block interpolation, reading section reference data from the appropriate address of buffer memory mem, and from external memory, read all the other reference datas, thus save the memory bandwidth of decoder.
Three, according to reference picture and motion vector, carry out interpolation arithmetic, recover current macro.
After reading whole reference datas and motion vector, can carry out interpolation arithmetic according to the description of AVS standard 9.9.2.1 part, recover successively each luminance block and the chrominance block of current macro, thereby recover whole current macro.Now, the inter prediction of current macro is completed.
Embodiment 2
According to embodiments of the invention 2, provide a kind of inter-frame prediction method based on AVS.In the method, the frame that decoder need to carry out inter prediction is divided into several macro blocks, successively each macro block is carried out to inter prediction.For each macro block, inter prediction process comprises the following steps:
The first step: the pattern and the corresponding motion vector that read current macro from AVS code stream;
Second step: read from external memory and carry out the required reference picture of inter prediction according to the pattern of current macro and motion vector;
The 3rd step: carry out interpolation arithmetic according to reference picture and motion vector, recover current macro.
Wherein, the first step, the 3rd step are all consistent with embodiment 1, repeat no more.
In second step, the mode that the present embodiment adopts change piece size to read reads reference data from external memory.From AVS standard 9.9.2.1 part, can find out, when carrying out sub-pixel interpolation, for different motion vectors and different sub-pixel interpolation positions, the number of the reference data needing is distinct.For example: in the whole pixel samples of interpolation, only need 8 * 8 reference data, and interpolation 1/4 pixel samples needs 11 * 11 reference data.
The present embodiment is divided into 6 kinds of different types by location of interpolation, and the reference data amount of every type of needs is different, but in decode procedure, only has wherein one type at synchronization, to be performed.Therefore can be according to the value of motion vector, which kind of interpolation type judgement this time belongs to, thereby determines this memory access amount, to reach the object that reduces bandwidth.
The change piece size of luminance block reads
As shown in Figure 3, in AVS standard, the required reference pixel number of each interpolation point (being location of interpolation) is as follows:
The interpolation of ordering for D, the reference pixel needing is (0,0), the reference pixel matrix size that the interpolation of corresponding 8 * 8 needs is 8 * 8;
The interpolation of ordering for b, the reference pixel needing is (1,0), (0,0), (1,0), (2,0), the reference pixel matrix size that the interpolation of corresponding 8 * 8 needs is 11 * 8;
The interpolation of ordering for h, the reference pixel needing is (0 ,-1), (0,0), (0,1), (0,2), the reference pixel matrix size that the interpolation of corresponding 8 * 8 needs is 8 * 11;
The interpolation of ordering for j, the reference pixel needing is (1 ,-1), (0 ,-1), (1,-1), (2 ,-1), (1,0), (0,0), (1,0), (2,0), (1,1), (0,1), (1,1), (2,1), (1,2), (0,2), (1,2), (2,2), the reference pixel matrix size that the interpolation of corresponding 8 * 8 needs is 11 * 11;
The interpolation of ordering for a, the reference pixel needing is (2,0), (1,0), (0,0), (1,0), and (2,0), the reference pixel matrix size that the interpolation of corresponding 8 * 8 needs is 12 * 8;
The interpolation of ordering for c, the reference pixel needing is (1,0), (0,0), (1,0), (2,0), and (3,0), the reference pixel matrix size that the interpolation of corresponding 8 * 8 needs is 12 * 8;
The interpolation of ordering for d, the reference pixel needing is (0 ,-2), (0 ,-1), (0,0), (0,1), and (0,2), the reference pixel matrix size that the interpolation of corresponding 8 * 8 needs is 8 * 12;
The interpolation of ordering for n, the reference pixel needing is (0 ,-1), (0,0), (0,1), (0,2), and (0,3), the reference pixel matrix size that the interpolation of corresponding 8 * 8 needs is 8 * 12;
For e, g, p, the interpolation that r is ordered, the reference pixel needing is identical with j point, and the reference pixel matrix size that the interpolation of corresponding 8 * 8 needs is 11 * 11;
The interpolation of ordering for f, the reference pixel needing is (1 ,-2), (0 ,-2), (1 ,-2), (2 ,-2), (1,-1), (0 ,-1), (1,-1), (2 ,-1), (1,0), (0,0), (1,0), (2,0), (1,1), (0,1), (1,1), (2,1), (1,2), (0,2), (1,2), (2,2), the reference pixel matrix size that the interpolation of corresponding 8 * 8 needs is 11 * 12;
The interpolation of ordering for i, the reference pixel needing is (2 ,-1), (2,0), (2,1), (2,2), (1,-1), (1,0), (1,1), (1,2), (0,-1), (0,0), (0,1), (0,2), (1,-1), (1,0), (1,1), (1,2), (2,-1), (2,0), (2,1), (2,2), the reference pixel matrix size that the interpolation of corresponding 8 * 8 needs is 12 * 11;
The interpolation of ordering for k, the reference pixel needing is (1 ,-1), (1,0), (1,1), (1,2), (0,-1), (0,0), (0,1), (0,2), (1,-1), (1,0), (1,1), (1,2), (2,-1), (2,0), (2,1), (2,2), (3,-1), (3,0), (3,1), (3,2), the reference pixel matrix size that the interpolation of corresponding 8 * 8 needs is 12 * 11;
The interpolation of ordering for q, the reference pixel needing is (1 ,-1), (0 ,-1), (1 ,-1), (2 ,-1), (1,0), (0,0), (1,0), (2,0), (1,1), (0,1), (1,1), (2,1), (1,2), (0,2), (1,2), (2,2), (1,3), (0,3), (1,3), (2,3), the reference pixel matrix size that the interpolation of corresponding 8 * 8 needs is 11 * 12.
In reading the process of external memory, in order to reduce the visit capacity to external memory, the present embodiment is made certain optimization to the size reading.In brightness interpolating, the required number of pixels of different location of interpolation is different, if adopt maximum pixel number, natural energy meets the demands, but has increased like this visit capacity of external memory.
The present embodiment, in order to save the bandwidth of external memory, draws the location of interpolation of current block according to motion vector, to different location of interpolation, adjust respectively the size of line (OK) and the size (size representative row in the present invention) of the external memory of applying for.Table 3 has provided in brightness application external memory situation, and setting each base block size to external memory application is 8 * 8, different motion vector is set respectively the row, column increment of corresponding different application external memory simultaneously.By basic blocks row, column, add that corresponding increment row, column just can obtain the row, column information of this application.By further investigation, the present embodiment sums up following rule formula:
1). the columns increment-req_plus_wid of request external memory
2). the line number increment-req_plus_hei of request external memory
In formula, x is horizontal level, i.e. interpolation point numbering in the horizontal direction; Y is upright position, i.e. interpolation point numbering in vertical direction.
The luminance block that table 1 has below provided the present embodiment more intuitively becomes piece size read schemes.
Table 1
The change piece size of chrominance block reads
Similar with luminance block, in the change piece size read schemes of chrominance block, the size of applying for while at every turn reading external memory also adds that by basic blocks row, column corresponding increment row, column obtains.Basic blocks is of a size of 4 * 4, and its increment row, column draws by following formula:
1). the columns increment (req_plus_wid) of request external memory
req _ plus _ wid = 0 ; x = 0 1 ; other
2). the line number increment (req_plus_hei) of request external memory
req _ plus _ hei = 0 ; y = 0 1 ; other
In formula, x is horizontal level, i.e. interpolation point numbering in the horizontal direction; Y is upright position, i.e. interpolation point numbering in vertical direction.
In conjunction with reference to figure 4 and table 2, can show more intuitively that the chrominance block of the present embodiment becomes piece size read schemes.
Table 2
Embodiment 3
According to embodiments of the invention 3, provide a kind of inter-frame prediction method based on AVS.In the method, the frame that decoder need to carry out inter prediction is divided into several macro blocks, successively each macro block is carried out to inter prediction.For each macro block, inter prediction process comprises the following steps:
The first step: the pattern and the corresponding motion vector that read current macro from AVS code stream;
Second step: read from external memory and carry out the required reference picture of inter prediction according to the pattern of current macro and motion vector;
The 3rd step: carry out interpolation arithmetic according to reference picture and motion vector, recover current macro.
Wherein, the first step, the 3rd step are consistent with embodiment 1,2, repeat no more.
In second step, when reading reference data from external memory, the present embodiment adopts interblock data reusing simultaneously and becomes piece size and reads two kinds of mechanism, thereby has farthest avoided redundant data, has saved memory bandwidth.
Becoming aspect piece size reads, the present embodiment draws location of interpolation according to motion vector, and applies for corresponding external memory size, and this is consistent with embodiment 2, repeats no more.
Aspect interblock data reusing, the present embodiment arranges buffer memory mem, and its size is consistent with embodiment 1.For luminance block and chrominance block, the address space of buffer memory mem distributes also all consistent with embodiment 1, repeats no more here.In a macro block, during first piece interpolation, still from external memory, read its correspondence reference data, during to other piece interpolation, reading section reference data from the appropriate address of buffer memory mem reads all the other reference datas from external memory.So just greatly saved the memory bandwidth of decoder.
Embodiment 4
According to embodiments of the invention 4, provide a kind of inter-frame prediction method based on AVS.In the method, the frame that decoder need to carry out inter prediction is divided into several macro blocks, successively each macro block is carried out to inter prediction.For each macro block, inter prediction process comprises the following steps:
The first step: the pattern and the corresponding motion vector that read current macro from AVS code stream;
Second step: read from external memory and carry out the required reference picture of inter prediction according to the pattern of current macro and motion vector;
The 3rd step: carry out interpolation arithmetic according to reference picture and motion vector, recover current macro.
Wherein, the first step, the 3rd step are consistent with embodiment 2, repeat no more.
In second step, in the change piece size of embodiment 2, read on machine-processed basis, the present embodiment no longer carries out inter prediction with 8 * 8 Kuai Wei units, but the macro-block partition mode drawing according to the first step carries out inter prediction to corresponding sub-block respectively.When macroblock partitions is 1 16 * 16 luminance block, directly from internal memory, reads this 16 * 16 luminance block and carry out the required reference data of motion compensation; When macroblock partitions is 2 16 * 8 luminance block or 28 * 16 luminance block, reads at twice and carry out the required reference data of motion compensation; When macroblock partitions is 48 * 8 luminance block, divides to read for four times and carry out the required reference data of motion compensation.It is also to access the basic blocks of external memory and the mode of corresponding ranks increment realizes by setting that this change piece size reads.For those skilled in the art, easily reference example 2 show that in the present embodiment, becoming piece size reads machine-processed specific implementation, repeats no more here.
Embodiment 5
On any basis of above-described embodiment 1~4, the present embodiment has further been optimized the mechanism that reads of chroma data, thereby a kind of inter-frame prediction method based on AVS more with advantage is provided.
In AVS standard, chrominance block comprises Cb chrominance block and Cr chrominance block, and Cb chrominance block and Cr chrominance block occur in pairs.In prior art, in AVS code stream, the data of the every couple of Cb and Cr chrominance block are storage separately, after the data of a Cb chrominance block of Coutinuous store, stores the data of corresponding Cb chrominance block again.Like this, when a pair of Cb and Cr chrominance block are carried out to motion compensation, need to read respectively Cb chrominance block and reference data corresponding to Cr chrominance block.
In the present embodiment, by the Cb colourity in AVS code stream and Cr chroma data Laden Balance to external memory.Fig. 5 shows the pilotaxitic texture of Cb and Cr.In AVS standard, the every couple of Cb and Cr chrominance block share identical motion vector, and the sub-pixel interpolation mode of Cb and Cr is also identical.If deposit the reference data of Cb and Cr in external memory in a kind of mode interweaving, just can together with the reference data of Cb and Cr, read in the same mode interweaving.The number of times of access external memory just subtracts and is a half like this, also further improves the utilance of bandwidth.And, due to the restriction of DDR width, while accessing external memory, more or less can there are some redundant datas at every turn, therefore, when reducing access external memory number of times, also mean and reduced the total data volume reading.
The scheme of the chroma data Laden Balance in the present embodiment can independently be implemented, and also can on any basis of above-described embodiment 1~4, implement, and this is that those skilled in the art are understandable.
Embodiment 6
On any basis of above-described embodiment 1~5, the present embodiment has further been optimized data and has been augmented (padding) mechanism, thereby a kind of inter-frame prediction method based on AVS more with advantage is provided.
In AVS standard, use unconfined motion vector, that is to say that motion vector reference data pointed can exceed the border of reference picture, in this case the integral sample exceeding in should this integer reference data indication position of the service range nearest image of the integral sample of reference image border is carried out to border extension.In existing AVS decoder, in advance reference frame border expanded and deposited the reference frame after expansion in external memory.
The present embodiment is not done in advance expansion to reference frame, but the process that data are augmented is placed in motion compensation and carries out, and according to motion vector, to external memory, reads real reference data, completes data augment in this locality.Can further improve the utilance of bandwidth like this, save the shared external space of each reference frame simultaneously.
Fig. 6 shows the structure that the data of the present embodiment are augmented.According to the value of motion vector, the present embodiment has designed 4 kinds of data and has augmented (padding) type, and data are augmented configuration information and are:
1) type of .pad_type:padding, in Fig. 6,0 type represents upper left padding; 1 type represents lower-left padding; 2 types represent upper right padding; 3 types represent bottom right padding.
2) columns of .pad_size:padding, size is 0~11.When pad_type is upper left and lower-left, represent the columns of padding left, otherwise when pad_type is upper right and bottom right, represent not need the columns of padding.
3) line number of .pad_line:padding, size is 0~11.When pad_type is upper left and upper right, represent the upwards line number of padding, otherwise when pad_type is lower-left and bottom right, represent not need the line number of padding.
While predicting between conducting frame, read real reference data from external memory after, can augment configuration information (pad_type, pad_size and pad_line) according to data, in the enterprising row data in basis of real reference data, augment.On diverse location, the concrete numeric reference AVS standard of augmenting.
Wherein, when motion vector reference data pointed exceeds reference picture left margin, with the numerical value of reference picture Far Left one row pixel, carry out data and augment; While exceeding reference picture right margin, with the numerical value of rightmost one row pixel, carry out data and augment; Exceed reference picture coboundary, with the numerical value of a line topmost, carry out data and augment; Exceed reference picture lower boundary, with the numerical value of a line bottom, carry out data and augment.When the position that exceeds image is positioned at upper left, lower-left, upper right, bottom right, by the value of upper left angle point, lower-left angle point, upper right angle point, bottom right corner pixels, carries out data respectively and augment.
What deserves to be explained is, the data of the present embodiment are augmented scheme and both can on any basis of above-described embodiment 1~5, be implemented, and also can independently implement.
It should be noted last that, above embodiment is only unrestricted in order to technical scheme of the present invention to be described, although the present invention is had been described in detail with reference to preferred embodiment, those of ordinary skill in the art is to be understood that, can modify or be equal to replacement technical scheme of the present invention, and not departing from the spirit and scope of technical solution of the present invention, it all should be encompassed in the middle of claim scope of the present invention.

Claims (4)

1. the inter-frame prediction method based on AVS, the frame that need to carry out inter prediction comprises several macro blocks, for each macro block, inter prediction comprises the following steps:
1) read the corresponding motion vector of current macro;
2) current macro is divided into the corresponding some sub-blocks of motion vector and carries out motion compensation,
3), for each sub-block, according to its corresponding motion vector location of interpolation pointed, determine the minimum dimension of its reference picture; According to the minimum dimension application external memory of described reference picture and read described reference picture from external memory;
4) according to reference picture and motion vector, carry out interpolation arithmetic, recover current macro;
Wherein, Cb chroma pixel in AVS code stream and Cr chroma pixel Laden Balance are in external memory, described step 3) in, for every pair of Cb chrominance block and Cr chrominance block, when each external memory, Cb reference chroma pixel and the Cr reference chroma pixel of Laden Balance are read in couples in the reference pixel position drawn according to motion vector from AVS code stream;
Described step 3) in, in brightness interpolating application external memory situation, setting each base block size to external memory application is 8 * 8, according to motion vector, draw the location of interpolation of current block, to different location of interpolation, set respectively the row, column increment of corresponding different application external memory, by basic blocks row, column, add that corresponding increment row, column obtains the row, column information of the external memory of this application, wherein, the columns increment req_plus_wid of request external memory meets
The line number increment req_plus_hei of request external memory meets
In formula, x is horizontal level, and y is upright position;
Described step 4) in, adopt the buffer memory mem of 40 * 96 sizes to reuse the overlapping part between the reference data of two 8 * 8 while carrying out interpolation arithmetic, for luminance block, the address space of buffer memory mem is allocated as follows:
1) .0~11 row is used for storing forward direction block 0 or block 2, and the partial data of overlapping row;
2) .12~23 row is used for storing backward block 0 or block 2, and the partial data of overlapping row;
3) .24~27 row is for storing the partial data of the overlapping row of forward direction block 1;
4) .28~31 row is for storing the partial data of the overlapping row of backward block 1;
During first 8 * 8 luminance block interpolation, still from external memory, read 12 * 12 reference data of its correspondence, during other 8 * 8 luminance block interpolation, reading section reference data from the appropriate address of buffer memory mem, and from external memory, read all the other reference datas;
For chrominance block Cb, the address space of buffer memory mem is allocated as follows:
1) data of the block 0 of .0~4 row storage chrominance C b forward direction;
2) .5~9 row is stored the data of the backward block 0 of chrominance C b;
3) data of the block 1 of .10~14 row storage chrominance C b forward direction;
4) .15~19 row is stored the data of the backward block 1 of chrominance C b;
5) data of the block 2 of .20~24 row storage chrominance C b forward direction;
6) .25~29 row is stored the data of the backward block 2 of chrominance C b;
7) data of the block 3 of .30~34 row storage chrominance C b forward direction;
8) .35~39 row is stored the data of the backward block 3 of chrominance C b;
For chrominance block Cr, the address space of buffer memory mem is allocated as follows:
1) data of the block 0 of .0~4 row storage chrominance C r forward direction;
2) .5~9 row is stored the data of the backward block 0 of chrominance C r;
3) data of the block 1 of .10~14 row storage chrominance C r forward direction;
4) .15~19 row is stored the data of the backward block 1 of chrominance C r;
5) data of the block 2 of .20~24 row storage chrominance C r forward direction;
6) .25~29 row is stored the data of the backward block 2 of chrominance C r;
7) data of the block 3 of .30~34 row storage chrominance C r forward direction;
8) .35~39 row is stored the data of the backward block 3 of chrominance C r;
During to first chrominance block interpolation, read required whole reference datas from external memory, during to other chrominance block interpolation, reading section reference data from the appropriate address of buffer memory mem reads all the other reference datas from external memory.
2. the inter-frame prediction method based on AVS according to claim 1, is characterized in that, described step 1) in, also comprise the partition pattern that reads current macro from AVS code stream;
Described step 2) in, according to the partition mode division sub-block of read current macro.
3. the inter-frame prediction method based on AVS according to claim 1, it is characterized in that, described step 3) in, when described current macro is chrominance block, at every turn the base block size to external memory application is 4 * 4, thereby the row, column increment that different motion vector is set respectively application external memory is drawn to line number and the columns to external memory that should the required application of motion vector.
4. the inter-frame prediction method based on AVS according to claim 3, is characterized in that, described step 3) in,
The columns increment req_plus_wid of request external memory meets
req _ plus _ wid = 0 ; x = 0 1 ; other
The line number increment req_plus_hei of request external memory meets
req _ plus _ hei = 0 ; y = 0 1 ; other
In formula, x is horizontal level, and y is upright position.
CN201110030395.6A 2011-01-27 2011-01-27 AVS-based interframe prediction method Active CN102625095B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201110030395.6A CN102625095B (en) 2011-01-27 2011-01-27 AVS-based interframe prediction method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201110030395.6A CN102625095B (en) 2011-01-27 2011-01-27 AVS-based interframe prediction method

Publications (2)

Publication Number Publication Date
CN102625095A CN102625095A (en) 2012-08-01
CN102625095B true CN102625095B (en) 2014-12-10

Family

ID=46564757

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201110030395.6A Active CN102625095B (en) 2011-01-27 2011-01-27 AVS-based interframe prediction method

Country Status (1)

Country Link
CN (1) CN102625095B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113099231B (en) * 2021-03-23 2022-12-20 北京百度网讯科技有限公司 Method and device for determining sub-pixel interpolation position, electronic equipment and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101247523A (en) * 2008-03-18 2008-08-20 上海华平信息技术股份有限公司 Semi-pixel motion estimating method for H.264 encoder
CN102714721A (en) * 2009-11-19 2012-10-03 汤姆森特许公司 Method for coding and method for reconstruction of a block of an image

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010288098A (en) * 2009-06-12 2010-12-24 Sony Corp Device, method and program for interpolation of image frame

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101247523A (en) * 2008-03-18 2008-08-20 上海华平信息技术股份有限公司 Semi-pixel motion estimating method for H.264 encoder
CN102714721A (en) * 2009-11-19 2012-10-03 汤姆森特许公司 Method for coding and method for reconstruction of a block of an image

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
《中国优秀硕士学位论文全文数据库 信息科技辑》;常丽娜;《中国优秀硕士学位论文全文数据库 信息科技辑》;20051014;参见25-29,32-36页 *
Ronggang Wang, Chao Huang, Jintao Li,Yanfei Shen.Sub-pixel Motion Compensation Interpolation Filter in AVS.《Multimedia and Expo, 2004. ICME "04. 2004 IEEE International Conference on》.2004, *
Sub-pixel Motion Compensation Interpolation Filter in AVS;Ronggang Wang, Chao Huang, Jintao Li,Yanfei Shen;《Multimedia and Expo, 2004. ICME "04. 2004 IEEE International Conference on》;20040630;参见1-4页,Table 1 *
常丽娜.《中国优秀硕士学位论文全文数据库 信息科技辑》.《中国优秀硕士学位论文全文数据库 信息科技辑》.2005, *

Also Published As

Publication number Publication date
CN102625095A (en) 2012-08-01

Similar Documents

Publication Publication Date Title
KR100695141B1 (en) Memory access apparatus and method, data write/read apparatus and method for use in image processing system
CN101309405B (en) Reference data loading method and device
CN103004210B (en) For the Low-complexity intra prediction of Video coding
KR100668302B1 (en) Memory mapping apparatus and method for video decoer/encoder
JP2006174486A (en) Deblocking filter for simultaneously performing horizontal and vertical filtering of video data and method of operating the same
US20050190976A1 (en) Moving image encoding apparatus and moving image processing apparatus
CN102547296B (en) Motion estimation accelerating circuit and motion estimation method as well as loop filtering accelerating circuit
CN105578190B (en) Lossless compression method and system applied to video hard decoder
US20100020879A1 (en) Method for decoding a block of a video image
CN101490968A (en) Parallel processing apparatus for video compression
CN101198057A (en) Motion prediction processor with read buffers providing reference motion vectors for direct mode coding
CN101166277B (en) Method for accessing memory in apparatus for processing moving pictures
CN103414895A (en) Encoder intra-frame prediction device and method applicable to HEVC standards
CN1589028B (en) Predicting device and method based on pixel flowing frame
WO2023000695A1 (en) Video encoding reference block compression method, encoding method, and apparatuses
CN101783958B (en) Computation method and device of time domain direct mode motion vector in AVS (audio video standard)
CN100568920C (en) The method and apparatus of the video image brightness interpolating of serial input and line output
CN116600134B (en) Parallel video compression method and device adapting to graphic engine
CN102625095B (en) AVS-based interframe prediction method
CN102665080B (en) Electronic device for motion compensation and motion compensation method
CN102625091B (en) Inter prediction method based on AVS
CN102625093B (en) Interframe prediction method base on AVS
CN102625094B (en) AVS-based interframe prediction method
CN102420989A (en) Intra-frame prediction method and device
KR100708183B1 (en) Image storing device for motion prediction, and method for storing data of the same

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