+

CN102196272B - P frame coding method and device - Google Patents

P frame coding method and device Download PDF

Info

Publication number
CN102196272B
CN102196272B CN201010122608.3A CN201010122608A CN102196272B CN 102196272 B CN102196272 B CN 102196272B CN 201010122608 A CN201010122608 A CN 201010122608A CN 102196272 B CN102196272 B CN 102196272B
Authority
CN
China
Prior art keywords
frame
macro block
sampling
inter
reconstruction
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
CN201010122608.3A
Other languages
Chinese (zh)
Other versions
CN102196272A (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.)
Ruili Flat Core Microelectronics Guangzhou Co Ltd
Original Assignee
Institute of Microelectronics of CAS
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 Institute of Microelectronics of CAS filed Critical Institute of Microelectronics of CAS
Priority to CN201010122608.3A priority Critical patent/CN102196272B/en
Publication of CN102196272A publication Critical patent/CN102196272A/en
Application granted granted Critical
Publication of CN102196272B publication Critical patent/CN102196272B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

本发明公开了一种P帧编码方法及装置,包括下采样模块,用于将待编码P帧进行下采样,以得到原始分辨率降低为预定倍数的下采样帧;模式选择模块,将下采样帧的宏块编码模式在Intra/Inter之间进行模式选择;Intra编码模块,对Intra宏块进行帧内预测,重建时整体上采样,以获得原始分辨率大小的重建Intra宏块;Inter编码模块,利用原始分辨率大小的参考帧对Inter宏块进行帧间预测编码,通过非对称分辨率的运动补偿和残差上采样,以获得原始分辨率的重建Inter宏块;合成模块,利用重建Intra宏块与重建Inter宏块组成原始分辨率的重建P帧。本发明能够显著降低计算复杂度,同时对一些运动不大、纹理简单的移动无线应用环境下的视频还可明显提高编码效率。

Figure 201010122608

The invention discloses a P frame encoding method and device, comprising a downsampling module for downsampling a P frame to be encoded to obtain a downsampled frame whose original resolution is reduced to a predetermined multiple; a mode selection module for downsampling The macroblock coding mode of the frame is selected between Intra/Inter; the Intra coding module performs intra-frame prediction on the Intra macroblock, and the overall upsampling during reconstruction to obtain the reconstructed Intra macroblock of the original resolution size; the Inter coding module , use the reference frame of the original resolution to perform inter-frame predictive coding on the Inter macroblock, and obtain the reconstructed Inter macroblock with the original resolution through asymmetric resolution motion compensation and residual upsampling; the synthesis module uses the reconstructed Intra The macroblocks and the reconstructed Inter macroblocks compose the reconstructed P-frame at the original resolution. The invention can significantly reduce the computational complexity, and at the same time can obviously improve the encoding efficiency for some videos in the mobile wireless application environment with little movement and simple texture.

Figure 201010122608

Description

A kind of P frame coding method and device
Technical field
The invention belongs to technical field of video processing, relate in particular to coding method and the device of P frame in the coded video sequence.
Background technology
In the past few decades, the two large ISO-MPEG of international organization of video field and ITU's a series of video compression standards such as MPEG-1, MPEG-2 and MPEG-4 and H.261, H.263, H.263+, H.264/AVC wait have released one after another, China also set up " digital video-audio encoding and decoding technique standardization effort group " in 2002 be the AVS tissue, finished and become national standard in 2005.These standards have constantly improved Video coding efficient, have also promoted the development of multimedia industry.
H.264/AVC compare with coding standard before, have better code efficiency, but corresponding with it be that its computation complexity also is multiplied, this has proposed higher challenge to coding and decoding video terminal especially embedded processing platform.In order to reduce computation complexity H.264/AVC, people have done a large amount of optimization and improvement to the highest estimation of its complexity, motion compensation and model selection process on this basis, have proposed a lot of optimized algorithms.
The P frame is forward-predictive-coded frames, finds out motion vector and the prediction residual of P frame " certain point " in the reference frame of I frame or P frame, gets prediction residual and motion vector transmits together.From reference frame, find out the prediction piece of this piece and obtained the reconstructed value of this piece mutually with difference according to motion vector at receiving terminal, thereby can obtain complete P frame.
But in existing H.264 coding techniques, these researchs mainly are for module itself, further reduce on this basis the limited space of module computation complexity.And, especially in P frame coding, do not take into full account the call number that how to reduce these modules at coding side, need to carry out estimation and motion compensation etc. as reducing.Therefore, cause the problems such as existing P frame coding method computation complexity is high, coding time is excessive.
Summary of the invention
Purpose of the present invention is intended to one of solve the aforementioned problems in the prior at least.
For this reason, embodiments of the invention propose a kind of P frame coding method and device that can significantly reduce encoder complexity.
According to an aspect of the present invention, the embodiment of the invention has proposed a kind of P frame coding method, and described P frame coding method may further comprise the steps: a) P frame to be encoded is carried out down-sampling, be reduced to the down-sampling frame of prearranged multiple to obtain original resolution; B) described down-sampling frame is carried out model selection between intraframe predictive coding Intra and inter prediction encoding Inter coding mode; C) for the macro block that is selected as Intra in the described down-sampling frame, carry out intraframe predictive coding, and when rebuilding, sample on the whole, to obtain the reconstruction Intra macro block of original resolution size; D) for the macro block that is selected as Inter in the described down-sampling frame, the reference frame that utilizes the original resolution size carries out inter prediction encoding to the macro block of described Inter, the motion compensation of asymmetric resolution and residual error up-sampling are to obtain the reconstruction Inter macro block of original resolution; And e) utilize described reconstruction Intra macro block and described reconstruction Inter macro block to form the reconstruction P frame of original resolution.
The further embodiment according to the present invention, described step c comprises: c1) described macro block is carried out infra-frame prediction, conversion, quantification, inverse quantization, inverse transformation and infra-frame prediction compensation, to obtain having the reconstruction Intra macro block of described reduction resolution sizes; And c2) described reconstruction Intra macro block is sampled on the whole, to obtain described reconstruction Intra macro block with original resolution size.
The further embodiment according to the present invention, described steps d comprises: d1) utilize described reference frame that described macro block is carried out Motion estimation and compensation, obtaining corresponding motion vector and residual error, and determine the position of described macro block in described reference frame; D2) according to described position described motion vector is carried out equivalent up-sampling, expand a described motion vector as a plurality of motion vectors of corresponding described multiple take equivalence; D3) described residual error is sampled on the whole, to obtain the up-sampling residual error of corresponding original resolution size; And d4) with the reference block addition of described up-sampling residual error with the corresponding extraction of described a plurality of motion vectors, obtains described reconstruction Inter macro block.
The further embodiment according to the present invention, described step a comprises: described P frame to be encoded is carried out each down-sampling of 1/2 of row, column, to obtain as the described down-sampling frame of original resolution 1/4 multiple size.
The further embodiment according to the present invention, the method also comprises: the residual error that described infra-frame prediction obtains is carried out conversion and quantized to carry out afterwards the entropy coding; And compressed bit stream corresponding to output.Perhaps, with described motion vector and carry out conversion and quantize after residual error carry out the entropy coding; And compressed bit stream corresponding to output.
The further embodiment according to the present invention, described reconstruction P frame be not as the reference frame of next frame to be encoded.
According to a further aspect in the invention, embodiments of the invention propose a kind of P frame code device, described P frame code device comprises: down sample module, described down sample module are used for P frame to be encoded is carried out down-sampling, to obtain decrease resolution as the down-sampling frame of original resolution prearranged multiple; Mode selection module is used for the macro-block coding pattern of described down-sampling frame is carried out model selection between Intra/Inter; The Intra coding module, described Intra coding module carries out infra-frame prediction to the macro block that is selected as the Intra pattern in the described down-sampling frame, and samples on the whole when rebuilding, to obtain the reconstruction Intra macro block of original resolution size; The Inter coding module, described Inter coding module utilizes the reference frame of original resolution size that the macro block that is selected as the Inter pattern is carried out inter prediction encoding, the motion compensation of asymmetric resolution and residual error up-sampling are to obtain the reconstruction Inter macro block of original resolution; And synthesis module, described synthesis module utilizes described reconstruction Intra macro block and described reconstruction Inter macro block to form the reconstruction P frame of original resolution.
The further embodiment according to the present invention, described Intra coding module carries out infra-frame prediction, conversion, quantification, inverse quantization, inverse transformation and infra-frame prediction compensation, the reconstruction Intra macro block that obtains having described reduction resolution sizes to described macro block; And described reconstruction Intra macro block sampled on the whole, to obtain described reconstruction Intra macro block with original resolution size.
The further embodiment according to the present invention, described Inter coding module comprises: the Inter coding unit, described Inter coding unit utilizes described reference frame that described macro block is carried out Motion estimation and compensation, obtaining corresponding motion vector and residual error, and determine the position of described macro block in described reference frame; Motion vector up-sampling unit, described motion vector up-sampling unit carries out equivalent up-sampling with described motion vector, expands a described motion vector as a plurality of motion vectors of corresponding described multiple take equivalence; Residual error up-sampling unit, sample described residual error on the whole in described residual error up-sampling unit, to obtain the up-sampling residual error of corresponding original resolution size; And Inter macro block reconstruction unit, described Inter macro block reconstruction unit is with the reference block addition of described up-sampling residual error with the corresponding extraction of described a plurality of motion vectors, to obtain described reconstruction Inter macro block.
The further embodiment according to the present invention, described down sample module is carried out each down-sampling of 1/2 of row, column with described P frame to be encoded, to obtain as the described down-sampling frame of original resolution 1/4 multiple size.
The further embodiment according to the present invention also comprises the entropy coding module, and described entropy coding module is used for described motion vector and/or the described residual error after quantizing is carried out the entropy coding, and compressed bit stream corresponding to output.
The further embodiment according to the present invention, described reconstruction P frame be not as the reference frame of next frame to be encoded.
The present invention obtains a kind of novel R frame by P frame down-sampling coding.Like this, for Motion estimation and compensation part the most consuming time, its computation complexity is essentially 1/4 of original resolution frame, and several frees of losses of coding efficiency.Therefore, the present invention coding can effectively reduce computation complexity, and simultaneously, the video under, the simple mobile environment of texture little to some motions also can obviously improve code efficiency.The aspect that the present invention adds and advantage in the following description part provide, and part will become obviously from the following description, or recognize by practice of the present invention.
Description of drawings
Above-mentioned and/or additional aspect of the present invention and advantage are from obviously and easily understanding becoming the description of embodiment below in conjunction with accompanying drawing, wherein:
Fig. 1 is existing coded video sequence schematic diagram corresponding to coding techniques;
Fig. 2 is the P frame code device block diagram of the embodiment of the invention;
Fig. 3 is the P frame down-sampling schematic diagram of the embodiment of the invention;
Fig. 4 is the Inter macro block estimation schematic diagram of the embodiment of the invention;
Fig. 5 is the Inter macro block motion compensation principle schematic of the embodiment of the invention;
Fig. 6 is conventional P frame Inter macro block motion compensation principle schematic; And
Fig. 7 is the flow chart of steps of the P frame coding method of the embodiment of the invention.
Embodiment
The below describes embodiments of the invention in detail, and the example of described embodiment is shown in the drawings, and wherein same or similar label represents same or similar element or the element with identical or similar functions from start to finish.Be exemplary below by the embodiment that is described with reference to the drawings, only be used for explaining the present invention, and can not be interpreted as limitation of the present invention.
The present invention proposes a kind of P frame code device and method, the P frame that obtains rebuilding can be referred to as a kind of novel R frame here, to solve the problems such as existing P frame coding techniques complexity is high, coding time is excessive.
In one embodiment of the invention, P frame code device can comprise down sample module, mode selection module, intraframe predictive coding (Intra) module, inter prediction encoding (Inter) module and synthesis module.
Specifically, down sample module is used for P frame to be encoded is carried out down-sampling, and to reduce the original resolution of input video, obtaining decrease resolution is the down-sampling frame of original resolution prearranged multiple.
Mode selection module is selected between Intra/Inter for the macro-block coding pattern of the down-sampling frame that will obtain, wherein by the Intra coding module macro block that is selected as the Intra pattern in the down-sampling frame is carried out infra-frame prediction and up-sampling, to obtain the reconstruction Intra macro block of original resolution size.And, utilized the reference frame of original resolution size by the Inter coding module, the macro block that is selected as the Inter pattern in the down-sampling frame is carried out inter prediction encoding, adopt motion compensation technique and the residual block up-sampling of asymmetric resolution, to obtain the reconstruction Inter macro block of original resolution.
At last, then will rebuild the Intra macro block and rebuild the reconstruction P frame that the Inter macro block forms original resolution by synthesis module.
With reference now to Fig. 2 and 3,, below in conjunction with this figure P frame code device structure and the operation principle of the embodiment of the invention are described in detail.
As shown in Figure 2, the P frame to be encoded of input video at first is input in the down sample module 30, thereby P frame to be encoded is carried out down-sampling, and then reduces the original resolution of this P frame.
In one embodiment, the down-sampling that down sample module 30 is carried out can be as shown in Figure 3, and here, down sample module 30 can be carried out each down-sampling of 1/2 of row, column to P frame to be encoded, thereby obtains the down-sampling frame into original resolution 1/4 multiple size.
As shown in Figure 3, according to interlacing, every the principle of row each pixel in the P frame to be encoded of original resolution is divided in four subframes, upper left, upper right, the lower-left that forms that horizontal and vertical resolution reduces by half, 4 subframes in bottom right (being down-sampling P frame).Here, only need to carry out follow-up coding on the basis of a down-sampling P frame therein.Certainly, this subframe can be any one in a plurality of subframes of dividing.
After obtaining the down-sampling frame, the macro block of the down-sampling frame being divided by Intra coding module and Inter coding module carries out the Intra/Inter coding.Usually the down-sampling frame is divided into the macro block of 16x16 size, by follow-up each macro block is encoded, thereby finish coding to this down-sampling frame.
In this case, each macro block still has 4 kinds of 16x16 intra prediction modes, 9 kinds of 4x4 intra prediction modes, and skip, 16x16,16x8,8x16,8x8,8x4,4x8,8 kinds of inter prediction macroblock modes such as 4x4.
Therefore, before macro block being carried out the correspondence coding, at first for all macro blocks to the down-sampling frame, intraprediction unit 31 and motion estimation unit 38 by P frame code device are carried out respectively infra-frame prediction and inter prediction, and according to its cost result of obtaining of corresponding cost function calculation unit 52 and 54 respectively, determine to be fit to the macro block part (Intra macro block) of infra-frame predictions and the macro block part (Inter macro block) of suitable inter prediction by mode selection module 56.Here, it can be existing system of selection that the macro-block coding pattern that mode selection module is corresponding is selected to judge.
Afterwards, Intra coding module and Inter coding module be the predictive mode corresponding according to each macro block respectively, carries out corresponding intraframe coding or interframe encode.
For the part macro block that adopts the Intra coding mode, the Intra coding module carries out infra-frame prediction, conversion, quantification, inverse quantization, inverse transformation and infra-frame prediction compensation to macro block, at first obtain corresponding down-sampling resolution, the reconstruction Intra macro block that namely reduces resolution sizes (also can be referred to as first and rebuild the Intra macro block, corresponding 16x16 size), and then this reconstruction Intra macro block sampled on the whole, with the reconstruction Intra macro block (also can be referred to as second and rebuild the Intra macro block, corresponding 32x32 size) that obtains corresponding original resolution size.
In Fig. 2 embodiment, aforesaid operations can be by the on the whole corresponding execution of sampling unit 48 philosophies of intraprediction unit 31, converter unit 32, quantifying unit 34, inverse quantization unit 44, inverse transformation unit 46, infra-frame prediction reconstruction unit 49 and reconstructed block.
In addition, for the part macro block that adopts the Inter coding mode, the Inter coding module utilizes reference frame that macro block is carried out Motion estimation and compensation.
As shown in Figure 2, the Inter coding module comprises motion estimation unit 38 and motion compensation units 40, obtaining respectively corresponding residual sum motion vector, and the position of definite macro block in reference frame.The reference frame of estimation unit 38 is encoded I frame or P frame of the former frame of original resolution size.
The schematic diagram that carries out estimation about the Inter macro block of 38 pairs of down-sampling frames of motion estimation unit can be with reference to the embodiment of the invention of figure 4.
For example, for decrease resolution be the down-sampling frame f of original resolution 1/4 multiple t 1/4(corresponding current encoded frame, constantly Time=t), motion estimation unit 38 is in conjunction with reference frame f T-1(corresponding last coded frame, constantly Time=t-1) can calculate its for motion vector MV.And motion compensation units 40 can determine that by the motion vector MV that estimation unit 38 calculates this macro block is at reference frame f T-1In the position.
But, because the resolution of down-sampling frame reduces, therefore also need the motion vector that this macro block is corresponding to carry out up-sampling.Motion vector (MV) up-sampling unit 42 is used for the motion vector computation value that each macro block is corresponding and carries out equivalent up-sampling, expands a motion vector as a plurality of motion vectors of corresponding resolution minification take equivalence.
About asymmetric resolution motion compensation (that is, the motion vector up-sampling) principle of motion vector up-sampling unit 42, make an explanation below in conjunction with the embodiment of Fig. 5 and Fig. 6.Wherein, Fig. 5 is the Inter macro block motion compensation principle schematic of the embodiment of the invention, and Fig. 6 is conventional P frame Inter macro block motion compensation principle schematic.
For example, for reduction by 1/4 multiple resolution sizes shown in Figure 5 and be selected from the upper left down-sampling frame of P frame to be encoded f t 1/4, need to utilize the motion compensation of asymmetric resolution, the motion vector of macro block is carried out equivalent up-sampling, be extended for 4 motion vectors with equivalence.That is, a motion vector that obtains with estimation extracts simultaneously that corresponding this macro block is upper right, the reference block of 3 positions of lower-left, position, bottom right, makes upper right, the lower-left of this macro block, bottom-right macro block have identical motion vector.Like this, with down-sampling frame f t 1/4The macro block of corresponding 16x16 size is extended for the 32x32 size, is the original resolution reconstruction frames f with 2 * 2 times of sizes of this macro block t
So, just can in reference frame, extract the reference block of 2 * 2 times of sizes of this macro block, thereby so that reference block had the original resolution size.
From upper and lower two frames shown in Fig. 5 and Fig. 6 right side as can be known, the motion compensation frame corresponding to estimation of conventional P frame Inter macro block is equal resolution, and as can be seen from Figure 5, the motion compensation of Inter macro block of the present invention frame corresponding to estimation is asymmetric resolution frame.
In addition, after motion estimation unit 38 obtains residual error, by converter unit 32, quantifying unit 34 residual error is carried out conversion, quantification.Then, again the residual error after quantizing is carried out inverse quantization, inverse transformation by inverse quantization unit 44, inverse transformation unit 46.Then be input in the residual error up-sampling unit 47, sample on the whole so that the residual error that obtains is carried out residual error, thereby obtain the up-sampling residual error of corresponding original resolution size.
Then, as shown in Figure 2, the up-sampling residual error addition that the reference block that the corresponding up-sampling motion vectors in motion vector up-sampling unit 42 are extracted and up-sampling unit 47 are exported under the Inter pattern, thus the Inter macro block reconstructed value of corresponding original resolution obtained, namely rebuild the Inter macro block.
At last, synthesis module 50 will rebuild Inter macro block and reconstructed block on the whole the reconstruction Intra macro block of the original resolution when Intra predicts, exported of sampling unit 48 form, thereby obtain the reconstruction P frame of original resolution, i.e. novel R frame.
In one embodiment, lose too much for fear of video information, guarantee better picture quality, novel R frame can be not as the reference frame of next frame to be encoded.
In embodiments of the present invention, P frame code device can also comprise entropy coding module 36, is used for carrying out data entropy coding, and compressed bit stream corresponding to output.The residual error that obtains when infra-frame prediction is input in the entropy coding module 36 after change unit 32 and quantifying unit 34 are carried out conversion and quantized, to carry out entropy coding and output squeezing code stream.And when inter prediction, the residual sum motion vector that motion estimation unit 38 obtains also is input in the entropy coding module 36.
In addition, the invention allows for a kind of P frame coding method, the method may further comprise the steps: P frame to be encoded is carried out down-sampling, to obtain decrease resolution as the down-sampling frame of original resolution prearranged multiple.Then, the down-sampling frame is carried out model selection between Intra and Inter coding mode.Wherein, the macro block for being selected as Intra in the down-sampling frame carries out intraframe predictive coding and up-sampling, to obtain the reconstruction Intra macro block of original resolution size; For the macro block that is selected as Inter in the sample frame, the reference frame that utilizes the original resolution size carries out inter prediction encoding to the macro block of Inter, and the motion compensation of asymmetric resolution and residual block up-sampling are to obtain the reconstruction Inter macro block of original resolution.At last, utilize the reconstruction P frame of rebuilding the Intra macro block and rebuilding Inter macro block composition original resolution.
Below, in conjunction with Fig. 6 the concrete steps flow process of the P frame coding method of the embodiment of the invention is provided detailed description.
At first obtain P frame to be encoded (step 202) corresponding to input video, and P frame to be encoded is carried out down-sampling (step 204), thus a plurality of subframes of the resolution that is reduced, and for example resolution is 4 subframes of original resolution 1/4 multiple size.Particularly, P frame to be encoded can be carried out each down-sampling of 1/2 of row, column.Here, only need from a plurality of subframes of dividing, to select any one down-sampling frame as next code, for example select upper left subframe.
After obtaining the down-sampling frame, the macro block that the down-sampling frame is divided carries out the Intra/Inter coding.Usually this down-sampling frame is carried out macroblock partitions (step 205), thereby be divided into the macro block of 16x16 size.By follow-up each macro block is encoded, thereby finish coding to this down-sampling frame.
Wherein each macro block still has 16x16 intra prediction mode in 4, and 9 kinds of 4x4 intra prediction modes except the skip pattern, have 16x16,16x8,8x16,8x8,8x4,4x8,7 kinds of inter prediction macroblock modes such as 4x4.
Before macro block being carried out the correspondence coding, at first for all macro blocks of down-sampling frame, judge which adopts intraframe coding in division macro block corresponding to down-sampling frame, which adopts interframe encode (step 206).
Particularly, for all macro blocks to the down-sampling frame, carry out respectively infra-frame prediction and inter prediction, and according to cost function calculation result corresponding to difference under two kinds of predictive modes, determine to be fit to the Intra macro block of infra-frame prediction and the Inter macro block of suitable inter prediction.
Intra macro block for adopting intraframe coding goes to step 208; Otherwise go to step 210.
When carrying out intraframe coding, at first carry out the infra-frame prediction (step 208) of down-sampling frame, and the residual error that infra-frame prediction obtains is carried out conversion (step 214), quantized (step 216).Then be divided into two-way parallel processing (step 218), the one tunnel carries out entropy coding (step 220), output squeezing code stream (step 222); Another road forwards the reconstruction that step 224 is carried out the Intra macro block to.
In the process of reconstruction of Intra macro block, the residual error after at first step 216 being quantized is carried out inverse quantization (step 224), inverse transformation (step 226).Then, carry out infra-frame prediction and rebuild, obtain corresponding down-sampling resolution, namely reduce the reconstruction Intra macro block (step 230) of resolution sizes, and this reconstruction macro block sampled (step 232) on the whole, obtain the reconstruction Intra macro block of original resolution size.
The Inter macro block that adopts inter prediction is carried out estimation (step 210) and motion compensation (step 212), and its reference frame is P frame former frame to be encoded and is the I frame of original resolution size or the P frame of having encoded.
At first by step 210, obtain residual sum motion vector corresponding to this macro block.And, by step 212, can obtain the position of this macro block in reference frame according to the motion vector computation that estimation obtains.
Then, the residual error that obtains in the motion-estimation step is carried out conversion (step 214), quantized (step 216), be divided into afterwards the two-way parallel processing, one the tunnel with motion vector and the residual error after quantizing carry out entropy coding (step 220), and output squeezing code stream (step 222), another road forwards the reconstruction that step 224 is carried out macro block to.
When the reconstruction of Inter macro block, at first the residual error after quantizing is carried out inverse transformation (step 224), inverse quantization (step 226), then when being judged as the corresponding residual error of inter prediction (step 228), the residual error that obtains is carried out residual error up-sampling (step 234), obtain the up-sampling residual error of corresponding original resolution size.
When motion compensation, except the position that utilizes this macro block of motion vector computation in reference frame, also need the multiple according to down-sampling frame frame decrease resolution, carry out motion vector up-sampling (step 236), be about to this motion vector equivalence and be extended for a plurality of motion vectors.
For example, for reducing by 1/4 multiple resolution sizes and being selected from the upper left down-sampling frame of P frame to be encoded, need to utilize the motion compensation of asymmetric resolution, motion vector to macro block carries out equivalent up-sampling, be extended for 4 motion vectors with equivalence, it is upper right that a motion vector that namely obtains with estimation extracts corresponding this macro block simultaneously, the lower-left, the reference block of 3 positions of position, bottom right, make the upper right of this macro block, the lower-left, bottom-right macro block has identical motion vector, so just, can in reference frame, extract the reference block of this macro block 2 * 2 sizes, thereby so that reference block had the original resolution size.
At this moment, the residual error behind the residual error up-sampling that the corresponding reference block that extracts of a plurality of motion vectors behind the motion vector up-sampling and step 234 are obtained is carried out addition, thereby obtains the Inter macro block reconstructed value of corresponding original resolution.
At last, the Inter macro block of the Intra macro block rebuild and reconstruction is formed the reconstruction P frame (can be defined as the R frame) of original resolution size, this frame can not be re-used as the reference frame of next code.
The present invention can obtain a kind of novel R frame by realize may also be referred to as down-sampling P frame coding by P frame coding such as upper type.The present invention directly before coding with the original video image decrease resolution, like this, for Motion estimation and compensation part the most consuming time, its computation complexity is essentially 1/4 of original resolution frame, and several frees of losses of coding efficiency, therefore the present invention's coding can effectively reduce computation complexity, thereby improves P frame code efficiency.
Although illustrated and described embodiments of the invention, for the ordinary skill in the art, be appreciated that without departing from the principles and spirit of the present invention and can carry out multiple variation, modification, replacement and modification to these embodiment, scope of the present invention is by claims and be equal to and limit.

Claims (8)

1. a P frame coding method is characterized in that, described P frame coding method may further comprise the steps:
A) P frame to be encoded is carried out down-sampling, be reduced to the down-sampling frame of prearranged multiple to obtain original resolution;
B) described down-sampling frame is carried out model selection between intraframe predictive coding Intra and inter prediction encoding Inter coding mode;
C) for the macro block that is selected as the Intra pattern, carry out intraframe predictive coding and up-sampling, to obtain the reconstruction Intra macro block of original resolution size;
D) for the macro block that is selected as the Inter pattern, utilize the reference frame of original resolution size to carry out inter prediction encoding, adopt motion compensation and residual error up-sampling, to obtain the reconstruction Inter macro block of original resolution, described steps d) comprise that d1 is to four of d4 step by step:
D1) utilize described reference frame that described macro block is carried out Motion estimation and compensation, obtaining corresponding motion vector and residual error, and determine the position of described macro block in described reference frame;
D2) according to described position described motion vector is carried out equivalent up-sampling, expand a described motion vector as a plurality of motion vectors of corresponding described multiple take equivalence;
D3) described residual error is sampled on the whole, to obtain the up-sampling residual error of corresponding original resolution size; And
D4) with the reference block addition of described up-sampling residual error with the corresponding extraction of described a plurality of motion vectors, obtain described reconstruction Inter macro block;
E) utilize described reconstruction Intra macro block and described reconstruction Inter macro block to form the reconstruction P frame of original resolution.
2. P frame coding method as claimed in claim 1 is characterized in that, described step c comprises:
C1) described macro block is carried out infra-frame prediction, conversion, quantification, inverse quantization, inverse transformation and infra-frame prediction compensation, to obtain having the reconstruction Intra macro block of described reduction resolution sizes; And
C2) described reconstruction Intra macro block is sampled on the whole, to obtain described reconstruction Intra macro block with original resolution size.
3. P frame coding method as claimed in claim 1 is characterized in that, described step a comprises:
Described P frame to be encoded is carried out each down-sampling of 1/2 of row, column, to obtain as the described down-sampling frame of original resolution 1/4 multiple size.
4. P frame coding method as claimed in claim 1 is characterized in that, described reconstruction P frame is not as the reference frame of next frame to be encoded.
5. a P frame code device is characterized in that, described P frame code device comprises:
Down sample module, described down sample module are used for P frame to be encoded is carried out down-sampling, are reduced to the down-sampling frame of prearranged multiple to obtain original resolution;
Mode selection module is used for the macro-block coding pattern of described down-sampling frame is carried out model selection between Intra/Inter;
The Intra coding module, described Intra coding module carries out infra-frame prediction to the macro block that is selected as the Intra pattern in the described down-sampling frame, and samples on the whole when rebuilding, to obtain the reconstruction Intra macro block of original resolution size;
The Inter coding module, described Inter coding module utilizes the reference frame of original resolution size that the macro block that is selected as the Inter pattern in the described down-sampling frame is carried out inter prediction encoding, adopt motion compensation and residual error up-sampling, to obtain the reconstruction Inter macro block of original resolution, this module comprises the Inter coding unit, motion vector up-sampling unit, residual error up-sampling unit, and Inter macro block reconstruction unit;
Described Inter coding unit utilizes described reference frame that described macro block is carried out Motion estimation and compensation, obtaining corresponding motion vector and residual error, and determines the position of described macro block in described reference frame;
Described motion vector up-sampling unit carries out equivalent up-sampling with described motion vector, expands a described motion vector as a plurality of motion vectors of corresponding described multiple take equivalence;
Sample described residual error on the whole in described residual error up-sampling unit, to obtain the up-sampling residual error of corresponding original resolution size; And
Described Inter macro block reconstruction unit, described Inter macro block reconstruction unit are with the reference block addition of described up-sampling residual error with the corresponding extraction of described a plurality of motion vectors, to obtain described reconstruction Inter macro block;
Synthesis module, described synthesis module utilize described reconstruction Intra macro block and described reconstruction Inter macro block to form the reconstruction P frame of original resolution.
6. P frame code device as claimed in claim 5, it is characterized in that, described Intra coding module carries out infra-frame prediction, conversion, quantification, inverse quantization, inverse transformation and infra-frame prediction compensation, the reconstruction Intra macro block that obtains having described reduction resolution sizes to described macro block; And
Described reconstruction Intra macro block is sampled on the whole, to obtain described reconstruction Intra macro block with original resolution size.
7. P frame code device as claimed in claim 5 is characterized in that, described down sample module is carried out each down-sampling of 1/2 of row, column with described P frame to be encoded, to obtain as the described down-sampling frame of original resolution 1/4 multiple size.
8. P frame code device as claimed in claim 5 is characterized in that, described reconstruction P frame is not as the reference frame of next frame to be encoded.
CN201010122608.3A 2010-03-11 2010-03-11 P frame coding method and device Active CN102196272B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201010122608.3A CN102196272B (en) 2010-03-11 2010-03-11 P frame coding method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201010122608.3A CN102196272B (en) 2010-03-11 2010-03-11 P frame coding method and device

Publications (2)

Publication Number Publication Date
CN102196272A CN102196272A (en) 2011-09-21
CN102196272B true CN102196272B (en) 2013-04-17

Family

ID=44603557

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201010122608.3A Active CN102196272B (en) 2010-03-11 2010-03-11 P frame coding method and device

Country Status (1)

Country Link
CN (1) CN102196272B (en)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016101091A1 (en) * 2014-12-22 2016-06-30 Thomson Licensing Method of encoding video picture, method of decoding video picture, apparatus for encoding video picture, apparatus for decoding video picture and computer program product
CN104754338A (en) * 2014-12-30 2015-07-01 北京奇艺世纪科技有限公司 Selection method and device for intra-frame predication mode
CN110446042B (en) * 2019-08-01 2021-09-21 杭州当虹科技股份有限公司 Coding method for improving P frame quality in H.264
CN110493596B (en) * 2019-09-02 2021-09-17 西北工业大学 Video coding system and method based on neural network
CN112702602B (en) * 2020-12-04 2024-08-02 浙江智慧视频安防创新中心有限公司 A video encoding and decoding method and storage medium
WO2022155799A1 (en) * 2021-01-19 2022-07-28 Alibaba Group Holding Limited Neural network based in-loop filtering for video coding
CN113301347B (en) * 2021-05-08 2023-05-05 广东工业大学 HEVC high definition video coding optimization method
CN114339231B (en) * 2021-12-27 2023-10-27 杭州当虹科技股份有限公司 Method for rapidly jumping Cu-level mode selection by utilizing motion vector
CN118803254A (en) * 2024-02-01 2024-10-18 中移(杭州)信息技术有限公司 Intra-frame downsampling decoding method, device and storage medium

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8611423B2 (en) * 2008-02-11 2013-12-17 Csr Technology Inc. Determination of optimal frame types in video encoding
CN101252686B (en) * 2008-03-20 2010-04-14 上海交通大学 Method and system for lossless encoding and decoding in video frames based on interleaved prediction
CN100591136C (en) * 2008-10-15 2010-02-17 北京航空航天大学 A Video Intra-Frame Coding Method Based on Spatial Domain Decomposition
CN101389032A (en) * 2008-10-24 2009-03-18 北京工商大学 A Method of Intra-frame Predictive Coding Based on Image Interpolation
CN101477820A (en) * 2008-12-30 2009-07-08 深圳华为通信技术有限公司 File playing method and apparatus

Also Published As

Publication number Publication date
CN102196272A (en) 2011-09-21

Similar Documents

Publication Publication Date Title
CN102196272B (en) P frame coding method and device
CN100593955C (en) Method and device for encoding video images in inter or intra mode
CN101783957B (en) A video predictive coding method and device
CN102196256B (en) Video coding method and device
TWI492637B (en) Method and apparatus for performing hybrid multihypothesis motion-compensated prediction during video coding of a coding unit
CN104038764B (en) A kind of H.264 arrive video transcoding method H.265 and transcoder
JP5795525B2 (en) Image encoding method, image decoding method, image encoding device, image decoding device, image encoding program, and image decoding program
CN101022555B (en) Fast Mode Selection Method for Inter-Frame Predictive Coding
CN103546758B (en) A kind of fast deep graphic sequence inter mode decision fractal coding
CN102811346B (en) coding mode selection method and system
TW200952499A (en) Apparatus and method for computationally efficient intra prediction in a video coder
JP2015530035A (en) Video encoding method and video encoding apparatus using this method
CN100518324C (en) A method for converting compressed domain MPEG-2 to H.264 video based on regions of interest
CN104702959B (en) A kind of intra-frame prediction method and system of Video coding
CN101742288B (en) Video noise reduction encoding method and video noise reduction encoding device
CN102075751B (en) Macro block motion state-based H264 quick mode selection method
CN104113761B (en) Bit rate control method and encoder in a kind of Video coding
KR101885885B1 (en) Parallel intra prediction method for video data
CN101277447A (en) A Fast Inter-frame Prediction Method for Aerial Traffic Video
CN101854554A (en) Video Codec System Based on Image Restoration Prediction
CN101715124B (en) Single-input and multi-output video encoding system and video encoding method
CN105791865A (en) Intra-frame prediction and deblocking filtering method
KR20170114598A (en) Video coding and decoding methods using adaptive cross component prediction and apparatus
JP2009260421A (en) Moving image processing system, encoding device, encoding method, encoding program, decoding device, decoding method and decoding program
CN100579227C (en) A system and method for selecting an intra prediction mode

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
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20201217

Address after: 510000 601, building a, 136 Kaiyuan Avenue, Huangpu District, Guangzhou City, Guangdong Province

Patentee after: AoXin integrated circuit technology (Guangdong) Co.,Ltd.

Address before: 100029 Beijing city Chaoyang District Beitucheng West Road No. 3

Patentee before: Institute of Microelectronics of the Chinese Academy of Sciences

TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20220525

Address after: 510000 room 710, Jianshe building, No. 348, Kaifa Avenue, Huangpu District, Guangzhou, Guangdong

Patentee after: Ruili flat core Microelectronics (Guangzhou) Co.,Ltd.

Address before: 510000 601, building a, 136 Kaiyuan Avenue, Huangpu District, Guangzhou City, Guangdong Province

Patentee before: AoXin integrated circuit technology (Guangdong) Co.,Ltd.

点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载