[go: up one dir, main page]

CN1302668C - Error-corcealed video decoding method - Google Patents

Error-corcealed video decoding method Download PDF

Info

Publication number
CN1302668C
CN1302668C CNB2004100185080A CN200410018508A CN1302668C CN 1302668 C CN1302668 C CN 1302668C CN B2004100185080 A CNB2004100185080 A CN B2004100185080A CN 200410018508 A CN200410018508 A CN 200410018508A CN 1302668 C CN1302668 C CN 1302668C
Authority
CN
China
Prior art keywords
macroblock
error
frame
frameno
boundary
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
CNB2004100185080A
Other languages
Chinese (zh)
Other versions
CN1581972A (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.)
Fudan University
Original Assignee
Fudan University
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 Fudan University filed Critical Fudan University
Priority to CNB2004100185080A priority Critical patent/CN1302668C/en
Publication of CN1581972A publication Critical patent/CN1581972A/en
Application granted granted Critical
Publication of CN1302668C publication Critical patent/CN1302668C/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

本发明是一种隐藏错误的视频译码方法。本发明利用视频解码器在解码时得到的副产品信息,包括运动矢量和I帧的直流(DC)图像,进行实时镜头分割,判断当前发生错误的帧是否是镜头边界。如果当前帧是镜头边界,则使用空域上基于块的分割-匹配的错误隐蔽方法进行错误隐藏;如果不是边界,则用时域上的前向-后向块匹配错误隐蔽方法进行错误隐藏。该方法具有速度快、系统开销小、隐藏效果好、鲁棒性好等优点,非常适合于各种类型的视频播放器。The invention is a video decoding method for concealing errors. The present invention utilizes the by-product information obtained during decoding by a video decoder, including motion vectors and direct current (DC) images of I frames, to perform real-time shot segmentation, and to judge whether the current frame in which an error occurs is a shot boundary. If the current frame is a shot boundary, error concealment is performed using the block-based segmentation-matching error concealment method in the spatial domain; if it is not a boundary, error concealment is performed using the forward-backward block matching error concealment method in the temporal domain. The method has the advantages of fast speed, small system overhead, good hiding effect, good robustness, etc., and is very suitable for various types of video players.

Description

A kind of video decoding method of concealing errors
Technical field
The invention belongs to the video technique field, be specifically related to a kind of video decoding method of concealing errors.Be mainly used in the picture quality that improves Video Decoder, mosaic phenomenon in its principle decoding image that to be hiding (promptly allowing the people cannot see) cause because of the video code flow mistake as far as possible reduces the sensitivity of people's vision system to deterioration of image quality.
Background technology
Along with the continuous development of technology such as Digital Television, video conferencing, computer network and universal rapidly, how on Internet, to transmit video flowing and become more and more important.Do not keep dedicated channel because Internet is real time flow medium transmission such as video and audio frequency, make the transmission of audio frequency and video be easy to be subjected to the influence of network congestion and delay.The basic compress technique of some of video coding itself, as time domain prediction in the MPEG-1/2/4 standard and mutilation long codes etc., be subjected to the influence of network congestion and packet loss especially easily, even the error code of a bit or lose, also can cause large stretch of mistake in the video image, cause subjective visual quality do seriously to descend.
Code stream loss of data may occur at any time in network transmission process.In the MPEG video data, most of bit is the Huffman code (Huffman) that is used for encoding motion vector and the Huffman sign indicating number of discrete cosine transform (DCT) coefficient, well-known Huffman sign indicating number is a kind of mutilation long code, in case make a mistake, be difficult to find immediately, normally wrongly spread to the code stream of just knowing certain unknown position place, front when can't decode and mistake occurred.The characteristics of variable-length encoding make decoding algorithm can not return the place of alignment error, can only search opening code again, begin to continue decoding from next synchronous points.From finding that mistake (actual mistake toward contact before this) is undefined to the decoding of the macro block the next synchronous points.The time domain prediction of high compression efficiency makes the matter worse and this mistake is more owing to having very.If this mistake occurs in the group of picture in the more preceding reference frame, then in this group of picture in all subsequent decoding frames the decoding of same position macro block all can cause distortion, this distortion generally continues half second through regular meeting, consequence is very serious.
Studies show that in a large number, can overcome this error diffusion problem from many aspects, data staging for example, add forward error correction (FEC) sign indicating number, transmit leg flow control etc., add the error concealing measure and also be proved to be a kind of effectively technological means in Video Decoder, its cost just increases the complexity of some decoding algorithms.
Error concealing method commonly used comprises: forward error is hidden, the hiding error by reprocessing, decoder and the mutual hiding error three major types of encoder.(1) forward error is hidden: encoder plays a major role, by having increased a certain amount of redundant information in information source coding device end or transport layer encoder-side, when data made a mistake on network, receiving terminal might recover the information of losing from redundant information.Usually the redundant information data volume that increases is very important, and when generation in the network was congested, redundant information can increase the weight of this congested, causes the decline that video quality is more serious.(2) in the mutual error hidding method of decoder and encoder, encoder-side is adjusted own coding strategy with the acquisition more performance by obtain feedback information from decoder end, this just requires encoder to have certain interactivity, so the normally same developer of encoder.The video flowing that such encoder obtains lacks versatility.In view of there are some essential defectives in above-mentioned two kinds of error concealing methods, the error hidding method by reprocessing has obtained using widely.
Error hidding method by reprocessing has following several usually:
(1) hide based on the time domain error of motion compensation: a simple method is utilized the time domain correlation properties of vision signal, promptly uses macro block identical with the erroneous macroblock locus in the former frame of erroneous macroblock place frame, replaces the erroneous macroblock in the present frame.But when having more violent motion in the video, this method will produce a very large impact visual effect.Seek accordingly when substituting macro block by motion compensation, concealment effect is improved a lot.
(2) maximum is smoothly recovered: utilize the space smoothing characteristic of most of images and vision signal, by progressively energy minimization method realization.
(3) at the error concealing on spatial domain or the frequency domain: error concealing method on spatial domain or the frequency domain is in a two field picture, utilizes loss of data piece image on every side, adopts interpolation method to recover to lose piece.Because a paroxysmal mistake often causes losing of consecutive number blocks of data, in this case, the calculating of interpolation will be more complicated, effect is also relatively poor.
Summary of the invention
It is comparatively simple to the objective of the invention is to propose a kind of calculating, the video decoding method of the reasonable concealing errors of effect.
The video decoding method of the concealing errors that the present invention proposes, it is a kind of method of carrying out error concealing in the Video Decoder that is embedded in, it combines the quick camera lens dividing method of compression domain and spatial domain error concealing, time domain error hidden method, obtains good error concealing effect.The steps include: earlier the mistake in the video to be positioned, specifically can use two kinds of methods to check mistake: the pixel value on (1) computing macro block border and macroblock boundaries pixel value around it; (2) check that the grammer of MPEG code stream is to find mistake in the code stream.Then for vicious frame, adopt frame that the method detection based on motion vector (P and B frame) and direct current (DC) image (I frame) makes a mistake whether on the border of camera lens (shot).If not on the border of camera lens, just carry out error concealing to piece matching error concealment method with the forward direction-back on the time domain; If on the border of camera lens, difference is very big between the consecutive frame of front and back so, can not carry out the hiding error of time-domain, and the error hidding method that adopt block-based cutting apart on the spatial domain-mate this moment carries out error concealing.
Description of drawings
Fig. 1 is cut apart-diagram of 4 steps of matching process for the present invention, and wherein (a),, (d) illustrates for not cutting apart, increase the region of search (c) for secondary splitting illustrates (b) for cutting apart diagram first for the initial matching diagram.
Fig. 2 is the error concealing diagram on the time domain.Wherein (A) is for selecting the macro block of erroneous macroblock top, (B) for selecting the macro block of erroneous macroblock below, (C) for selecting the macro block of erroneous macroblock above and below simultaneously.
Embodiment
The present invention is based on the error concealing method that camera lens cuts apart and can be generalized into following basic step:
1, decoding n frame.
2, detect the n frame and whether make a mistake, change 3 if make a mistake, otherwise change 5.
Whether 3, detect the n frame is the border of a camera lens.
If 4 n frames are not the borders of a camera lens, carry out time domain error and hide.If shot boundary carries out the spatial domain error concealing.
If 5 n frames are last frames, withdraw from, otherwise n=n+1 changes 1.
Specifically introduce wrong discovery mechanism and the spatial domain error concealing and the time domain error hidden method that are adopted below respectively, provide the quick camera lens dividing method of compression domain again, camera lens dividing method and spatial domain error concealing, time domain error are hidden combined at last.When specific implementation method is discussed, be the example introduction with the video flowing of Moving Picture Experts Group-2, but the inventive method is not limited in Moving Picture Experts Group-2, is equally applicable to MPEG-1/4 standard or other video encoding standard.
1, mistake discovery mechanism
In order to carry out hiding error, the most important thing is correctly to locate the wrong position that occurs.If can not accurately locate wrong position, just error concealing can not be carried out.Mistake of the present invention finds mainly to have used two kinds of methods:
(1) checks the pixel value of macroblock boundaries and the difference of macroblock boundaries pixel value around it
When playing, producing " mosaic " phenomenon when occurring wrong in the video flowing, by intuitively can feel to occur the macro block of mistake and on every side macro block tangible difference is arranged.Here utilized just error macro block and on every side the difference of macro block in colourity, brightness find the position of erroneous macroblock.According to the coded system of MPEG-2, adopted the VLC coding for macro block, when certain macro block makes a mistake, tend to have influence on follow-up macro block in this sheet (slice), up to the arrival of next sheet.Be can not surmount delegation because of a sheet again, so the mistake that this macro block brings at most only can influence the one's own profession macro block.
By last surface analysis, can know: in the macro block around the erroneous macroblock, about macro block tend to be affected, and its up and down macro block generally can not be affected the therefore coboundary of a computing macro block and difference and the lower boundary of macro block and the difference of macro block coboundary, below of top macro block lower boundary here.By to the calculating of many frames with relatively find in three components of color YUV (wherein, the brightness of Y representation in components, U represents blue and green aberration, the aberration that the V representation in components is red with green), the difference of U component value is the most significant, therefore selects the difference of U component as macro block and the differentiation of macro block difference size on every side in the method.Choosing small number of pixels value participation calculating is in order to reduce the complexity of algorithm.
The pixel value that select to calculate the pixel value of current macro coboundary and top macro block lower boundary in the method the pixel value of the difference on the U component and this macro block lower boundary and below the difference of pixel on the U component of macro block coboundary simultaneously as judgment condition, when this two differences during, can judge that mistake has taken place this macro block simultaneously greater than threshold value (threshold range is 25~35 in this method).
(2) when detected code value is not in code table, illustrates mistake has taken place in the code stream
Because used VLC code table is not completely in the mpeg standard, therefore when code stream makes a mistake, the mutilation long code word (VLC) that occurs the motion vector of a macro block or discrete cosine transform (DCT) coefficient probably can be concluded when this situation occurs mistake has taken place in code stream not in the VLC code table.But often can not accurately locate wrong position in this way, because when a code word does not occur in the VLC code table, may not be that mistake has appearred in this code word, but mistake has just appearred in the code word of front in this sheet, just code word causes just finding over time mistake owing to having the bit mistake to become the another one code word and having changed the error propagation that the length of code word causes.But,, just can conclude the transmission mistake has taken place in this sheet that therefore in the hiding error that this method realizes, when this thing happens, we will be hidden to whole implementation mistake in case this situation occurs.
2, error concealing on the spatial domain
The error hidding method that error concealing has adopted block-based cutting apart on the spatial domain-mated on the spatial domain, following algorithm 1 is the method for a macro block being carried out error concealing:
Algorithm 1, concrete steps are as follows:
(1) position of the macro block of alignment error;
(2) judge " error macro block directly over adjacent macroblocks and under adjacent macroblocks " whether can use; If unavailable, find the nearest macro block that can be used for error concealing;
(3) similarity in the zone in zone and the available macroblock is calculated in the error macro block;
(4) finish and cut apart-matching process;
(5) calculate in the 4th step cut apart-whether two used zones of matching process are similar areas; If not, change (3), if change (6);
(6) finish error concealing;
(7) error concealing has been carried out in each zone of judging current error macro block; If not, change (3); If withdraw from.
Below that interpretation algorithms 1 is related ins and outs.
The zone similarity is estimated:
In the method, size is the adjacent block B of bx * by TAnd B BBetween the average of absolute error estimate by following formula:
MAD = 1 bx × by Σ x = 0 bx Σ y = 0 by | B T ( x , y ) - B B ( x , y ) |
When MAD value during, or when in specifying the region of search, having found a minimum MAD, carry out hiding error with two match block at this moment less than a predetermined threshold value.
Cut apart-matching process
Cut apart-4 steps of matching process are as shown in Figure 1.Wherein MBc indicates by the macro block of hiding error, MB T, MB TL, MB TR, MB B, MB BL, MB BRTop, upper left side, upper right side, below, lower left, the bottom-right macro block that obtains of macro block decreased in expression respectively.
In preceding 2 steps, defined bigger adjacent block and mated, and in the end all used the piece of minimum dimension 4 * 4 to mate in 2 steps, but defined different regions of search.Adopt this method to guarantee minimum processing time and concealment effect as well as possible.Process begin guaranteed that with relatively large the coupling bigger conforming zone can have been avoided more calculating and delay by direct reconstruct.On the other hand, there is the zone of more details to need littler piece to mate.Introduce 4 steps below in detail:
(1) the piece size of initial matching-maximum
Initial matching attempts to mate largest block b adjacent on the vertical direction 1And t 1, it is of a size of 16 * 8 pixels.As shown in Figure 1a.If these two zones are considered to similar, the hiding error of whole macro block can be realized by copying.Otherwise algorithm continued to carry out (2) step.
(2) cut apart first-in the vertical direction only
Original block in (1) step is divided into two littler pieces, is respectively b 1, b 2And t 1, t 2, its size is 8 * 8.Only in the vertical direction is that each is to mating.As b 1With t 1And b 2With t 2(seeing Fig. 1 (b)).Therefore there is the hiding quilt of less texture region directly to carry out.
(3) set of secondary splitting-definition initial search area-less direction
In (2) step, piece further is divided into the size 4 * 4 of the minimum that is allowed, and uses b iAnd t iRepresent.In this step, shown in Fig. 1 (c), defined the initial search area on the horizontal direction, the smallest blocks (b that will be mated iAnd t i) in the region of search of definition, slide.Whether all their combinations are the decision-makings of optimum Match with the similarity algorithm for estimating that the front was introduced all.This step is carried out by iteration, realizes up to the hiding error that similarity coupling or whole macro block are no longer satisfied in next optimical block combination.The notion of sliding has guaranteed that the border of any direction or lines can be by reconstruct.
(4) do not cut apart-increase region of search-more multi-direction set
The region of search of definition is further increased in (3) step shown in Fig. 1 (d).Allow the direction of reconstruct to expand to adjacent upper left side, upper right side or lower left, bottom-right macro block, therefore enlarged the direction of reconstruct.In this step, the size of the piece that is used for mating remains unchanged, shown in Fig. 1 (d).Coupling is at b k, t kBetween carry out.This step also is that iteration is carried out, and has all carried out hiding error up to whole macro block.
Error concealing
In the error hidding method of this method, adopted the method for copy.As shown in Figure 1, the picture material of the adjacent best matching blocks in above and below is copied into the first half and the latter half of lost regions respectively by matching direction.(for example, in Fig. 1 a, if b 1And t 1In the first step, be considered to mate, then b 1Content be copied into the zone of equal sizes in erroneous macroblock the first half, the i.e. more shallow zone of color among the figure; t 1Be copied into the zone of equal sizes in the latter half of erroneous macroblock, i.e. the darker zone of color among the figure).Cutting apart-preceding two steps of matching process in, hiding error is directly carried out and is not needed iterative process, and needs iterative process in latter two steps, and hiding error is carried out in the zone of also not carrying out hiding error in back.Therefore in algorithm for each pixel in the macro block is provided with a sign, be used to refer to this pixel and whether carried out hiding error.If pixel has been carried out hiding error, when occurring on his the direction, do not need again he to be carried out hiding error in next optimum Match.
3, the error concealing on the time domain
Compare with the hiding error on the spatial domain, less or not have the zone of motion in motion, the hiding error on the time domain can be obtained intimate perfect effect.Around the macro block that makes a mistake the motion vector of macro block inconsistent or since around it macro block be intraframe coding and can't obtain their movable information the time, simple block matching method can't obtain gratifying result, and the forward direction-back on the time domain in this method can reduce these shortcomings to piece matching error concealment method.This method is that erroneous macroblock has been selected neighborhood, based on the piece coupling in principle, can carry out possible best concealment to erroneous macroblock in this neighborhood.
The redundancy of forward direction-back on the time domain on the hidden time domain of utilizing video sequence of piece matching error.Here suppose that at least some adjacent pieces have level and smooth, consistent motion vector.Introduce this algorithm below in detail.
MB CBe the current macro block that makes a mistake, MB TBe the macro block of erroneous macroblock top, MB BMacro block for the erroneous macroblock below.Be the center with the macro block with the erroneous macroblock same position in reference frame, the zone of pre-defined N * M size is the region of search, select simultaneously erroneous macroblock around macro block as candidate.Here we can only select the macro block of erroneous macroblock top, shown in Fig. 2 A; Also can only select the macro block of erroneous macroblock below, shown in Fig. 2 (B); Also the macro block that can select the erroneous macroblock above and below simultaneously is as candidate, shown in Fig. 2 c.Under in the end a kind of situation, the vertical distance of macro block is restricted to 16 pixels up and down, simultaneously MB TAnd MB BMotion in the region of search is consistent.Search in selected zone causes the piece of minimum MAD to be used as the estimation of erroneous macroblock content to piece coupling on the time domain to all candidates.Hiding error copies the content of piece around the best matching blocks that finds suitable on the position of the macro block that makes a mistake to, if adopt the mode of Fig. 2 (A) to select candidate such as us, the macro block that will mate the macro block below so copies the position of erroneous macroblock to.
4, quick camera lens dividing method in the compression domain
In traditional error concealment strategy, in general time domain error hides that to have a computing cost little, and the characteristics that concealment effect is good are methods of being inclined to use in error concealing.But when the content change between consecutive frame in the video is obvious especially (this significant change is generally switched by camera lens and caused), the effect that time domain error is hidden is just very poor.Consider this point, the new error concealing method that we propose is cut apart real-time camera lens with traditional error concealing method and is combined.
A camera lens is the video clips of the interior shooting of time between video camera opens and closes.Video frequency program semantically can be regarded as the combination of some camera lenses, and it is exactly to find these semantic borders that camera lens is cut apart.It is a lot of to be used for the algorithm that camera lens cuts apart, and consider in our application that the precision that camera lens is cut apart is not very important, and the speed that camera lens is cut apart is very crucial, has adopted the real-time camera lens dividing method based on motion vector among the present invention, and basic thought is as follows:
In MPEG-2 stream, the frame of three types of I, P, B is arranged, in the I frame, do not have motion vector, in the P frame, forward motion vector is arranged, in the B frame, may exist forward direction, back to and bi-directional motion vector.But,, during the work of MPEG-1/2 encoder, always select rational coding mode according to a certain foundation no matter how complicated situation is.Therefore, encoder is still followed certain reasonably strategy in the time of the processing variation camera lens.For example when running into the saltus step camera lens, inter prediction will inevitably lose efficacy, and relatively tend to select intra-frame encoding mode this moment, and both sides after before shot boundary, then forward direction, back are to selecting to be bound to meet certain rational pattern with bi-predictive mode.
If R PThe macro block and the ratio of macro block in frame that forward motion vector is arranged that do not have motion vector in the expression P frame:
R P = MV non MV F
MV FThe number that the macro block of forward motion vector is arranged in the expression frame, MV NonExpression does not have the sum of the macro block of motion vector.Under normal circumstances, the most of macro block in the P frame can be encoded with the reduction coded-bit with reference to the reference frame of its front, so R PVery little (general 1<R P); When the camera lens switching takes place at P frame place the time, because the reference frame content of current P frame and front differs greatly, reference frame coding with reference to the front is used more bit on the contrary, and the macro block in most of P frame can adopt intraframe coding method (not having motion vector), so R PVery big.Pass through R PValue can judge whether the camera lens switching to have taken place at P frame place.
In like manner, establish R BMacro block and the ratio of macro block in frame that forward motion vector is arranged that backward motion vector is arranged in the expression B frame
R B = MV B MV F
Under normal circumstances, the most of macro block in the B frame can be encoded to reduce coded-bit, R with reference to the reference frame of its front and the reference frame of back BIt is near the value of a fluctuation 1; When the camera lens switching takes place at B frame place, because the reference frame content of current B frame and front differs greatly.Use more bit on the contrary with reference to the reference frame of front coding, the macro block in most of B frame can adopt the reference frame frame of back to give a forecast, and does not give a forecast with reference to the reference frame of front, so R BVery big.Pass through R BValue can judge whether the camera lens switching to have taken place at B frame place.
Adopt sliding window, can judge at the P frame with at the possible camera lens that the B frame occurs and switch.In the method, be R PAnd R BTo set up sliding window separately respectively.
If W is a sliding window that length is l, w i(i ∈ [0, l)) is that an element in the window (is R XValue), the expectation of window is
E ( W ) = Σ i = 0 l - 1 w i l
FrameNo represents the current frame number that enters into the X frame of sliding window, and ShotCount represents current camera lens counter, can find the switching of possibility X frame place's generation with following algorithm.
Sliding window algorithm, concrete steps are as follows:
(1)FrameNo=0,ShotCount=0;
(2) to each element in the window, make w i=InitialEle, (i ∈ [0, l)), i=0 calculates E (W);
(3) if R X(FrameNo)>and TH_X * E (W), change (4), otherwise change (5);
(4) Shot[ShotCount]=FrameNo, ShotCount=ShotCount+1, FrameNo=FrameNo+1 changes (3), otherwise, change (5);
(5) W (imodl)=R X(FrameNo), recomputate E (W), i=i+1, FrameNo=FrameNo+1 if FrameNo>Max_X_Frame withdraws from, otherwise changes (3);
In the present invention, for P frame (being that X is P), InitialEle=1000, sliding window width l ∈ [8,10], threshold value TH_P=4.For B frame (X is B), InitialEle=1000, sliding window width l ∈ [18,22], threshold value TH_B=6.
Switch for the camera lens that may take place, detect with following method at I frame place:
Each piece (8 * 8 pixel) to macro block carries out dct transform, obtains 64 DCT coefficients, and wherein first coefficient is a DC coefficient, i.e. the DC coefficient.If c (0,0) is the DC coefficient of each piece, then
c ( 0,0 ) = Σ x = 0 7 Σ y = 0 7 c ( x , y ) 64
Be that the DC coefficient is a whole average.Just constituted the DC image of original image by all DC coefficients in the frame, the resolution of DC image is 1/64 of original image, has but kept the most information of original image.
In order further to reduce amount of calculation, we only utilize the DC image of I frame luminance component to detect to dissolve.The DC image of I frame can directly extract from compression domain, establishes I iAnd I I+1Be two adjacent I frames, the difference of DC image is defined as between them:
Diff _ I _ DC ( I i , I i + 1 ) = Σ k = 0 TotalBlock - 1 | DC k i - DC k i + 1 |
When camera lens dissolves switching, Diff_I_DC (I i, I I+1) obvious peak value can appear.Equally, to Diff_I_DC (I i, I I+1) also can adopt the sliding window method, in above-mentioned sliding window algorithm, X is I, InitialEle = width × heiggt × 8 256 , Sliding window width l=4, TH_I=3.

Claims (9)

1、一种隐藏错误的视频译码方法,其特征在于:首先对视频流中错误进行定位:检查宏块边界的像素值和它周围宏块边界像素值的差值,或者从MPEG码流的语法中实现错误检查;然后对有错帧,采用基于运动矢量或直流(DC)图像方法,判断它是否出现在镜头边界上;如果不在镜头边界上,就用时域上前向-后向块匹配错误隐蔽方法进行错误隐藏;如果在镜头边界上,就用空域上基于块的分割-匹配的错误隐蔽方法进行隐藏。1, a kind of video decoding method of hiding error, it is characterized in that: at first error is positioned in the video stream: check the pixel value of macroblock boundary and the difference value of its surrounding macroblock boundary pixel value, or from the MPEG bit stream Implement error checking in the grammar; then, for wrong frames, use the method based on motion vector or direct current (DC) image to judge whether it appears on the shot boundary; if it is not on the shot boundary, use the forward-backward block matching in the time domain The error concealment method is used for error concealment; if it is on the shot boundary, the block-based segmentation-matching error concealment method for spatial domain is used for concealment. 2、根据权利要求1所述的方法,其特征在于所述检查宏块边界的像素值和它周围宏块边界像素值的差值,是计算当前宏块的上边界和上方宏块下边界的U分量的差值、以及该宏块的下边界和下方宏块上边界的的U分量的差值;如果这两个差值都大于一个给定阈值TH_1,则断定当前宏块有错,这里U分量为绿色差。2. The method according to claim 1, characterized in that the difference between the pixel value of the boundary of the macroblock and its surrounding macroblock boundary pixel value is calculated by calculating the upper boundary of the current macroblock and the lower boundary of the upper macroblock. The difference between the U component and the U component of the lower boundary of the macroblock and the upper boundary of the macroblock below; if these two differences are greater than a given threshold TH_1, it is determined that the current macroblock is wrong, here The U component is the green difference. 3、根据权利要求1所述的方法,其特征在于所述从MPEG码流的语法中检索错误,是当检测到一个宏块的运动矢量或离散余弦变换(DCT)系数的变字长码字(VLC)不在编码表中时,则断定当前宏块的码流有错。3. The method according to claim 1, characterized in that said retrieval error from the syntax of the MPEG code stream is when detecting the motion vector of a macroblock or the variable word length code word of the discrete cosine transform (DCT) coefficient (VLC) is not in the encoding table, then it is concluded that the code stream of the current macroblock is wrong. 4、根据权利要求1所述的方法,其特征在于在空域上基于块的分割-匹配的错误隐蔽方法,具体步骤如下:4. The method according to claim 1, characterized in that the block-based segmentation-matching error concealment method in the air domain, the specific steps are as follows: (1)定位出错的宏块的位置;(1) locate the position of the macroblock in error; (2)判断“出错宏块的正上方相邻宏块和正下方相邻宏块”是否都可以用;如果不可用,找到最近的可以用于错误隐藏的宏块;(2) Judging whether "the adjacent macroblock directly above the error macroblock and the adjacent macroblock directly below" can be used; if not available, find the nearest macroblock that can be used for error concealment; (3)出错宏块中区域和可用宏块中的区域的相似度计算;(3) The similarity calculation of the area in the error macroblock and the area in the available macroblock; (4)完成分割-匹配过程;(4) Complete the segmentation-matching process; (5)计算第四步中分割-匹配过程所用的两个区域是否是相似区域;如果不是,转(3),如果是,转(6);(5) whether the two regions used in the division-matching process are similar regions in the fourth step of calculation; if not, turn to (3), if yes, turn to (6); (6)完成错误隐藏;(6) complete error hiding; (7)判断当前出错宏块的每个区域进行了错误隐藏;如果不是,转(3);如果是,退出。(7) Judging that each region of the current erroneous macroblock has carried out error concealment; if not, turn to (3); if yes, exit. 5、根据权利要求4所述的方法,其特征在于所述的两个宏块的相似度以绝对误差均值来衡量,大小为bx×by的图像块BT和BB之间绝对误差的均值通过下式计算:5. The method according to claim 4, characterized in that the similarity of the two macroblocks is measured by the mean value of absolute error, and the mean value of the absolute error between image blocks BT and BB whose size is bx×by Calculated by the following formula: MADMAD == 11 bxbx ×× byby ΣΣ xx == 00 bxbx ΣΣ ythe y == 00 byby || BB TT (( xx ,, ythe y )) -- BB BB (( xx ,, ythe y )) || .. 6、根据权利要求1所述的方法,其特征在于所述在时域上前向一后向块匹配错误隐蔽时,采用基于运动矢量的实时镜头分割方法后向块匹配错误隐蔽。6. The method according to claim 1, characterized in that the forward-backward block matching error concealment in the time domain uses a motion vector-based real-time shot segmentation method for backward block matching error concealment. 7、根据权利要求6所述的方法,其特征在于当进行实时镜头分割时候,对P帧,检测没有运动矢量的宏块和有前向运动矢量的宏块的比率是否异常;对B帧,检测有后向运动矢量的宏块和有前向运动矢量的宏块的比率是否异常;对I帧,检测I帧DC图像的差值是否出现异常。7. The method according to claim 6, wherein when performing real-time shot segmentation, for P frames, it is detected whether the ratio of macroblocks without motion vectors and macroblocks with forward motion vectors is abnormal; for B frames, Detect whether the ratio of the macroblock with the backward motion vector to the macroblock with the forward motion vector is abnormal; for the I frame, detect whether the difference value of the DC image of the I frame is abnormal. 8、根据权利要求7所述的方法,其特征在于检测P帧、B帧、I帧的异常,采用滑动窗口算法,具体步骤如下:8. The method according to claim 7, characterized in that detecting the abnormality of P frame, B frame, and I frame adopts a sliding window algorithm, and the specific steps are as follows: (1)FrameNo=0,ShotCount=0;(1) FrameNo=0, ShotCount=0; (2)对窗口中的每一个元素,令wi=InitialEle,i∈[0,l),i=0,计算E(W);(2) For each element in the window, let wi=InitialEle, i∈[0, l), i=0, calculate E(W); (3)如果RX(FrameNo)>TH_X×E(W),转(4),否则转(5);(3) If R X (FrameNo)>TH_X×E(W), go to (4), otherwise go to (5); (4)Shot[ShotCount]=FrameNo,ShotCount=ShotCount+1,FrameNo=FrameNo+1,转(3),否则,转(5);(4) Shot[ShotCount]=FrameNo, ShotCount=ShotCount+1, FrameNo=FrameNo+1, go to (3), otherwise, go to (5); (5)W(imodl)=RX(FrameNo),重新计算E(W),i=i+1,FrameNo=FrameNo+1,如果FrameNo>Max_X_Frame,退出,否则转(3);(5) W(imodl)=R X (FrameNo), recalculate E(W), i=i+1, FrameNo=FrameNo+1, if FrameNo>Max_X_Frame, exit, otherwise go to (3); 上述步骤中,FrameNo为帧序号,ShotCount为当前镜头计数器,l为窗口宽度,W为一个长度为l的滑动窗口,wi是窗口中的元素,InitialEle为窗口元素初始值,E(W)为窗口的期望;X表示P帧、B帧、I帧类型之一种,TH_X表示X帧所对应的阈值,Max_X_Frame为帧序号最大值。In the above steps, FrameNo is the frame number, ShotCount is the current shot counter, l is the window width, W is a sliding window with a length of l, wi is the element in the window, InitialEle is the initial value of the window element, E(W) is the window The expectation; X represents one of the types of P frame, B frame, and I frame, TH_X represents the threshold corresponding to the X frame, and Max_X_Frame is the maximum value of the frame number. 9、根据权利要求8所述的方法,其特征在于对于P帧,X取为P,此时,InitialEle=1000,l∈[8,10],TH_P=4;对于B帧,X取为B,此时,InitialEle=1000,l∈[18,22],TH_B=6;对于I帧,X取为I, InitialEle = width × height × 8 256 , l=4,TH_I=3。9. The method according to claim 8, wherein for a P frame, X is taken as P, at this time, InitialEle=1000, l∈[8,10], TH_P=4; for a B frame, X is taken as B , at this time, InitialEle=1000, l∈[18,22], TH_B=6; for I frame, X is taken as I, InitialEle = width × height × 8 256 , 1=4, TH_I=3.
CNB2004100185080A 2004-05-20 2004-05-20 Error-corcealed video decoding method Expired - Fee Related CN1302668C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB2004100185080A CN1302668C (en) 2004-05-20 2004-05-20 Error-corcealed video decoding method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB2004100185080A CN1302668C (en) 2004-05-20 2004-05-20 Error-corcealed video decoding method

Publications (2)

Publication Number Publication Date
CN1581972A CN1581972A (en) 2005-02-16
CN1302668C true CN1302668C (en) 2007-02-28

Family

ID=34581824

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB2004100185080A Expired - Fee Related CN1302668C (en) 2004-05-20 2004-05-20 Error-corcealed video decoding method

Country Status (1)

Country Link
CN (1) CN1302668C (en)

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009081576A (en) * 2007-09-25 2009-04-16 Toshiba Corp Moving picture decoding apparatus and moving picture decoding method
CN101990090B (en) * 2009-08-06 2013-08-07 中兴通讯股份有限公司 Method and device for labelling characteristic information of video code stream and method and device for detecting characteristic information of video code stream
CN102148985B (en) * 2010-02-05 2013-06-12 宏碁股份有限公司 video decoding device
CN102378012A (en) * 2011-11-26 2012-03-14 南京邮电大学 Data hiding-based H.264 video transmission error code recovery method
CN102611895A (en) * 2012-03-15 2012-07-25 天津大学 Time domain and space domain error concealment method based on multi-viewpoint three-dimensional video
CN103369327B (en) * 2012-03-27 2016-12-07 华为软件技术有限公司 A kind of error concealing method and communication equipment
CN103530895B (en) * 2012-07-06 2016-07-13 北京大学 A method and device for detecting mosaics
CN105791879B (en) * 2016-03-04 2019-04-05 广东顺德中山大学卡内基梅隆大学国际联合研究院 The compensation motion vector method and system of lost blocks in video code flow error concealing
US10477238B2 (en) * 2016-09-07 2019-11-12 Qualcomm Incorporated Sub-PU based bi-directional motion compensation in video coding
CN113630597B (en) * 2021-08-19 2024-01-23 随锐科技集团股份有限公司 Method and system for preventing video from losing packets irrelevant to encoding and decoding
CN114782866B (en) * 2022-04-20 2024-03-08 山东省计算中心(国家超级计算济南中心) Similarity determination method and device for geotag video, electronic equipment and medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6339450B1 (en) * 1999-09-21 2002-01-15 At&T Corp Error resilient transcoding for video over wireless channels
US6636565B1 (en) * 1999-01-12 2003-10-21 Lg Electronics Inc. Method for concealing error
WO2004008733A2 (en) * 2002-07-15 2004-01-22 Nokia Corporation Method for error concealment in video sequences

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6636565B1 (en) * 1999-01-12 2003-10-21 Lg Electronics Inc. Method for concealing error
US6339450B1 (en) * 1999-09-21 2002-01-15 At&T Corp Error resilient transcoding for video over wireless channels
WO2004008733A2 (en) * 2002-07-15 2004-01-22 Nokia Corporation Method for error concealment in video sequences

Also Published As

Publication number Publication date
CN1581972A (en) 2005-02-16

Similar Documents

Publication Publication Date Title
US8331448B2 (en) Systems and methods for efficient spatial intra predictabilty determination (or assessment)
US8693543B2 (en) Inter-frame prediction coding method, device and system
CN101873500B (en) Interframe prediction encoding method, interframe prediction decoding method and equipment
KR101184245B1 (en) Apparatus and method of reduced reference frame search in video encoding
US7822280B2 (en) Epipolar geometry-based motion estimation for multi-view image and video coding
CN104602028B (en) A kind of three-dimensional video-frequency B frames entire frame loss error concealing method
CN1302668C (en) Error-corcealed video decoding method
CN1874519A (en) Intraprediction method and apparatus using video symmetry and encoding and decoding method and apparatus
CN1757240A (en) Video encoding
CN101009835A (en) Background-based motion estimation coding method
EP2382786A1 (en) Multiple-candidate motion estimation with advanced spatial filtering of differential motion vectors
CN1839556A (en) Direct mode derivation process for error concealment
CN1875637A (en) Method and apparatus for minimizing number of reference pictures used for inter-coding
CN1258925C (en) Multi-view video coding and decoding prediction compensation method and device
WO2009134642A2 (en) Apparatus and method for computationally efficient intra prediction in a video coder
US20170094306A1 (en) Method of acquiring neighboring disparity vectors for multi-texture and multi-depth video
WO2009134641A2 (en) Apparatus and method for high quality intra mode prediction in a video coder
CN102075757B (en) Video foreground object coding method by taking boundary detection as motion estimation reference
US8644388B2 (en) Method and device for approximating a DC coefficient of a block of pixels of a frame
CN114554219B (en) A rate-distortion optimization method and device based on motion detection
CN1214636C (en) Method for shielding errors happening in video signal
CN102223544B (en) A method for processing errors after detecting errors in H264 video code stream
CN1324155A (en) Video error concealing method in ground digital TV broadcast
CN102098516B (en) Deblocking filtering method for multi-view video decoder
CN101056398A (en) A method and decoding and encoding method for capturing the video difference vector in the multi-video coding process

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
C17 Cessation of patent right
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20070228

Termination date: 20100520