CN101309427B - Video encoding method and device - Google Patents

Video encoding method and device Download PDF

Info

Publication number
CN101309427B
CN101309427B CN 200810127700 CN200810127700A CN101309427B CN 101309427 B CN101309427 B CN 101309427B CN 200810127700 CN200810127700 CN 200810127700 CN 200810127700 A CN200810127700 A CN 200810127700A CN 101309427 B CN101309427 B CN 101309427B
Authority
CN
China
Prior art keywords
frame
image
sequence number
reference frame
interval
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
CN 200810127700
Other languages
Chinese (zh)
Other versions
CN101309427A (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.)
ZTE Corp
Original Assignee
ZTE Corp
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 ZTE Corp filed Critical ZTE Corp
Priority to CN 200810127700 priority Critical patent/CN101309427B/en
Publication of CN101309427A publication Critical patent/CN101309427A/en
Application granted granted Critical
Publication of CN101309427B publication Critical patent/CN101309427B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

The invention discloses a video encoding method and a video encoding device. The video encoding method comprises the steps that the space k of the maximum reference frame can be arranged, wherein, k is larger than zero; under the condition that the number of the frame which can be used as reference and is positioned before the current frame with serial number n is less than one or equal to the space k of the maximum reference frame, the reservation frame in the frame which can be used as the reference and is positioned before the current frame with the serial number n can be taken as the reference frame, to perform the motion predicting and encoding operation, wherein, n is larger than one or equal to 1; under the condition that the number of the frame which can be used as the reference and is positioned before the current frame with the serial number n is larger than the space k of the maximum reference frame, the reservation frame in the frame with the serial number is between (n-1) and (n-k-1) can be taken as the reference frame, to perform the motion predicting and encoding operation. By the technical proposal, the fault-tolerant rate can be enhanced, the error frame is concealed, the better supporting can be provided, and the better video quality can be achieved.

Description

Method for video coding and device
Technical field
The invention belongs to the communications field, and especially, relate to a kind of method for video coding and device.
Background technology
At present, in the advanced video application system, the fault-tolerant control of coding and decoding video and hiding error are very important aspects, video code flow is very responsive to error code and packet loss, can cause the code word mistake of video code flow, and Fig. 1 is original single frames reference frame pattern, as shown in Figure 1, in frame and inter prediction the time, the diffusion that makes the mistake easily, long lasting effect video decode quality.
Usually, use the method for fault-tolerant control at the video encoder end, purpose is to improve the robustness of video code flow to mistake in advance, and common method has hierarchical coding, multiple description coded, independent segmented coding, synchronous coding and redundancy encoding etc. again.
Wherein, the I frame refreshes or the I piece to refresh be the most frequently used method in the existing video communication system, can adopt that fixed intervals refresh, random refresh or refreshing based on feedback, because I frame or inter-coded macroblocks are not used reference frame information, mistake can be prevented from immediately at I frame or I piece position like this, but I frame and I piece have that code efficiency is low, big and scope error diffusion is subjected to problems such as I frame period restriction to the shake of bandwidth requirement height, code check.
In addition, reference frame selecting method has less the having a few in error diffusion zone, when feedback channel is arranged, use reference frame according to feedback information, select suitable reference frame to be used for inter prediction, make code efficiency higher relatively, but making needs to have feedback in this way, yet, in a lot of the application, do not have feedback channel, so just can't finish mutual.
In addition, in the system that has used the multi-reference frame coding, in general because the correlation between adjacent two frames is the strongest, so the reference frame of macroblock coding is next-door neighbour's previous frame under most of situation, like this in communication process, when if wherein the code stream of a certain frame makes a mistake, this mistake still can be spread in the decode procedure of subsequent frame, the long lasting effect video quality.Yet, the technical scheme that addresses the above problem is not proposed at present as yet.
Summary of the invention
Consider that the code efficiency in the existing fault tolerant control method is low, need problem such as Return Channel and make the present invention that for this reason, main purpose of the present invention is to provide method for video coding and device, to solve the problems referred to above in the correlation technique.
According to an aspect of the present invention, provide a kind of method for video coding, be used under frame level on-fixed reference frame interval mode, carrying out video coding.
Method for video coding according to the embodiment of the invention comprises: maximum reference frame k at interval is set, and wherein, k is greater than 0; Being that the quantity that can be used as the frame of reference before the present frame of n is less than or equal to maximum reference frame at interval under the situation of k in sequence number, is to can be used as predetermined frame in the frame of reference before the present frame of n as the reference frame with sequence number, carries out motion prediction and coding; Wherein, n is more than or equal to 1; Be that the quantity that can be used as the frame of reference before the present frame of n at interval under the situation of k, as the reference frame, is carried out motion prediction and coding with the predetermined frame in the frame of sequence number between (n-1) to (n-k-1) greater than maximum reference frame in sequence number; Wherein, above-mentioned predetermined frame is that the image behavior property is the frame of little moving image, and wherein, above-mentioned image behavior attribute kit is drawn together the texture variations degree of the motion amplitude and the image of image, and the frame of little moving image is the frame of image behavior property less than judgment threshold.
Wherein, with predetermined frame being specially in the frame of above-mentioned sequence number between (n-1) to (n-k-1): the image behavior property that begins to travel through k+1 the frame of sequence number between (n-1) to (n-k-1) from sequence number for the frame of (n-1) as the reference frame, up to finding the image behavior property is the frame of little moving image, and is that the frame of little moving image is as predetermined frame with the image behavior property.
In addition, before maximum reference frame interval k was set, further comprise: the reference frame interval mode of selecting sequence to be encoded was an on-fixed reference frame interval mode.
According to a further aspect in the invention, provide a kind of method for video coding, be used under frame level fixed reference frame period pattern, carrying out video coding.
Food coding method according to the embodiment of the invention comprises: fixed reference frame period s is set, and wherein, s is greater than 0; Be that the quantity that can be used as the frame of reference before the present frame of n is less than or equal under the situation of fixed reference frame period s in sequence number, with sequence number is to can be used as predetermined frame in the frame of reference before the present frame of n as the reference frame, carry out motion prediction and coding, wherein, predetermined frame is that the image behavior property is the frame of little moving image, wherein, image behavior attribute kit is drawn together the texture variations degree of the motion amplitude and the image of image, the frame of little moving image is the frame of image behavior property less than judgment threshold, wherein, n is more than or equal to 1; Be to can be used as before the present frame of n under the situation of quantity greater than fixed reference frame period s of frame of reference in sequence number, the frame that with sequence number is (n-s-1) carries out motion prediction and coding as the reference frame.
In addition, before fixed reference frame period s is set, further comprise: the reference frame interval mode of selecting sequence to be encoded is a fixed reference frame period pattern.
In accordance with a further aspect of the present invention, provide a kind of video coding apparatus, be used under frame level on-fixed reference frame interval mode, carrying out video coding.
Video coding apparatus according to the embodiment of the invention comprises: module is set, is used to be provided with maximum reference frame k at interval, wherein, k is greater than 0; Whether judge module, the quantity that is used to judge the frame that can be used as reference before sequence number is the present frame of n be greater than maximum reference frame k at interval; First reference frame is provided with module, the quantity that is used for can be used as the frame of reference before sequence number is the present frame of n is less than or equal to maximum reference frame at interval under the situation of k, with sequence number is to can be used as predetermined frame in the frame of reference before the present frame of n as the reference frame, carries out motion prediction and coding; Wherein, n is more than or equal to 1; Second reference frame is provided with module, the quantity of frame that is used for can be used as reference before sequence number is the present frame of n is greater than maximum reference frame at interval under the situation of k, with the sequence number predetermined frame that is (n-1) to the frame of (n-k-1) as the reference frame, carry out motion prediction and coding, wherein, predetermined frame is that the image behavior property is the frame of little moving image, wherein, image behavior attribute kit is drawn together the texture variations degree of the motion amplitude and the image of image, and the frame of little moving image is the frame of image behavior property less than judgment threshold.
In addition, above-mentioned second reference frame is provided with module and further comprises: image behavior determined property module, be used for the image behavior property of judgment frame, and wherein, image behavior attribute kit is drawn together the texture variations degree of the motion amplitude and the image of image.
In addition, said apparatus further comprises: image behavior determined property module is used for beginning to travel through for the frame of (n-1) from sequence number the image behavior property of k+1 the frame of sequence number between (n-1) to (n-k-1), up to finding the image behavior property is the frame of little moving image, and is that the frame of little moving image is as predetermined frame with the image behavior property.
In accordance with a further aspect of the present invention, provide a kind of video coding apparatus, be used under frame level fixed reference frame period pattern, carrying out video coding.
Frequency code device according to the embodiment of the invention comprises: module is set, is used to be provided with fixed reference frame period s, wherein, s is greater than 0; Judge module, whether the quantity that is used to judge the frame that can be used as reference before sequence number is the present frame of n is greater than described fixed reference frame period s; First reference frame is provided with module, the quantity that is used for can be used as the frame of reference before sequence number is the present frame of n is less than or equal under the situation of fixed reference frame period s, with sequence number is to can be used as predetermined frame in the frame of reference before the present frame of n as the reference frame, carry out motion prediction and coding, wherein, predetermined frame is that the image behavior property is the frame of little moving image, wherein, image behavior attribute kit is drawn together the texture variations degree of the motion amplitude and the image of image, the frame of little moving image is the frame of image behavior property less than judgment threshold, wherein, n is more than or equal to 1; Second reference frame is provided with module, is used for can be used as before sequence number is the present frame of n under the situation of quantity greater than fixed reference frame period s of frame of reference, and the frame that with sequence number is (n-s-1) carries out motion prediction and coding as the reference frame.
By means of technical scheme of the present invention, can improve serious forgiveness, and erroneous frame be carried out hidden, better support is provided, reach better video quality.
Other features and advantages of the present invention will be set forth in the following description, and, partly from specification, become apparent, perhaps understand by implementing the present invention.Purpose of the present invention and other advantages can realize and obtain by specifically noted structure in the specification of being write, claims and accompanying drawing.
Description of drawings
Accompanying drawing is used to provide further understanding of the present invention, and constitutes the part of specification, is used from explanation the present invention with embodiments of the invention one, is not construed as limiting the invention.In the accompanying drawings:
Fig. 1 is the schematic diagram of single frames reference frame pattern in the correlation technique;
Fig. 2 is the schematic diagram according to the method for video coding of the inventive method embodiment one;
Fig. 3 is the schematic diagram of the frame level reference frame example 1 at interval of indefinite period during according to the K=1 of the embodiment of the invention;
Fig. 4 is the schematic diagram of the frame level reference frame example 2 at interval of indefinite period during according to the K=1 of the embodiment of the invention;
Fig. 5 is the schematic diagram of the frame level reference frame example 3 at interval of indefinite period during according to the K=1 of the embodiment of the invention;
Fig. 6 is the schematic diagram of the frame level reference frame example 4 at interval of indefinite period during according to the K=1 of the embodiment of the invention;
Fig. 7 is the frame level reference frame schematic diagram at interval of indefinite period during according to the K=2 of the embodiment of the invention;
Fig. 8 is the flow chart according to the method for video coding of the inventive method embodiment two;
Fig. 9 is the flow chart according to the detailed process of the inventive method embodiment one and method embodiment two;
Figure 10 is the frame level reference frame schematic diagram at interval of fixed cycle during according to the S=1 of the embodiment of the invention;
Figure 11 is the frame level reference frame schematic diagram at interval of fixed cycle during according to the S=2 of the embodiment of the invention;
Figure 12 is the block diagram according to the video coding apparatus of apparatus of the present invention embodiment one;
Figure 13 is the block diagram according to the video coding apparatus of apparatus of the present invention embodiment two.
Embodiment
Below in conjunction with accompanying drawing the preferred embodiments of the present invention are described, should be appreciated that preferred embodiment described herein only is used for description and interpretation the present invention, and be not used in qualification the present invention.
Method embodiment one
In the present embodiment, a kind of method for video coding is provided, be used under frame level on-fixed reference frame interval mode, carrying out video coding, Fig. 2 is the schematic diagram according to the method for video coding of the inventive method embodiment one, before carrying out processing shown in Figure 2, the reference frame interval mode that need at first select sequence to be encoded is an on-fixed reference frame interval mode.As shown in Figure 2, comprise following processing:
Step S202 is provided with maximum reference frame k at interval, and wherein, k is greater than 0;
Step S204, be that the quantity that can be used as the frame of reference before the present frame of n is less than or equal to maximum reference frame at interval under the situation of k in sequence number, with sequence number is to can be used as predetermined frame in the frame of reference before the present frame of n as the reference frame, carry out motion prediction and coding, wherein, n is more than or equal to 1, wherein, above-mentioned predetermined frame is that the image behavior property is the frame of little moving image, and image behavior attribute kit is drawn together the texture variations degree of the motion amplitude and the image of image;
Step S206 is that the quantity that can be used as the frame of reference before the present frame of n at interval under the situation of k, as the reference frame, is carried out motion prediction and coding with the predetermined frame in the frame of sequence number between (n-1) to (n-k-1) greater than maximum reference frame in sequence number.
Wherein, in step S206, the predetermined frame in the frame of above-mentioned sequence number between (n-1) to (n-k-1) can be the image behavior property that begins to travel through k+1 the frame of sequence number between (n-1) to (n-k-1) from sequence number for the frame of (n-1) as the concrete processing of reference frame, up to finding the image behavior property is the frame of little moving image, and with frame as predetermined frame.
Utilize above-mentioned technical scheme, can make wrong diffusivity reduce, and carry out hidden erroneous frame.
Below, technique scheme is illustrated, suppose that current P frame to be encoded is numbered n (n 〉=1) in the whole video coded sequence.
The first step, the reference frame interval mode of selecting sequence to be encoded are that frame level on-fixed reference frame (also can be called " the frame level reference frame of indefinite period at interval ") at interval;
Second step was under the on-fixed reference frame situation at interval in the frame level, and maximum reference frame k (k>0) at interval is set, if can be used as the frame number of reference smaller or equal to k before the present frame, then carried out for the 3rd step, if the frame number that can be used as reference before the present frame then carried out for the 4th step greater than k;
The 3rd step, use a frame in the frame that can be used as reference before the present frame as the reference frame, carry out motion prediction and coding, can select as a reference, also can use the method described in similar following the 4th step and the 5th step to handle from a present frame frame farthest;
The 4th step, judge the image behavior property that is numbered (n-1) frame, if (n-1) frame is little moving image, then select (n-1) frame to carry out the motion prediction and the coding of present frame; Otherwise carried out for the 5th step.Here, image behavior attribute definition is the motion amplitude and the texture variations degree of image.For example, Fig. 3 is in Fig. 7, and P3 is little moving image, and then P4 is directly with reference to P3, and in Fig. 4, P5 is big moving image, and then P6 is with reference to P5, and carries out the method in the 5th step;
The 5th step, judge that successively (n-2) frame arrives (n-k-1) behavior property of k reference frame altogether, a selection frame wherein is as the reference frame, carry out the motion prediction and the coding of present frame, wherein, selection principle is: when the behavior property of (n-2) frame is little motion, then select (n-2) frame; Otherwise, if (n-2) when frame switches for bigger motion or scene, then suitably increase the judgment threshold of behavior property after, continue to judge the behavior property of (n-3) frame, the rest may be inferred, till (n-k-1) frame.For example, among Fig. 7, P6 judges P4 not with reference to P5 after continuing to increase threshold value, and when finding that P4 still is big moving, selecting P3 is the reference frame of P6, carries out motion prediction and coding.
Below, in conjunction with the accompanying drawings, technique scheme is illustrated.
Fig. 3 is the schematic diagram of the frame level reference frame example 1 at interval of indefinite period during according to the K=1 of the embodiment of the invention, and as shown in Figure 3, P1, P2 are big moving image, P3, P4, P5 are little moving image, and P3 at first judges P2, and P2 is big moving image, after then increasing suitable threshold, judge P1, P1 relatively and P3 be little moving image, therefore, selection P3 is a reference frame, by that analogy, it is reference frame that P2 selects I0, it is reference frame that P4 selects P3, and it is reference frame that P5 selects P4, and it is reference frame that P6 selects P5.Can guarantee original code efficiency like this, after making a mistake, utilize former frame to carry out hiding error than being easier to.
Fig. 4 is the schematic diagram of the frame level reference frame example 2 at interval of indefinite period during according to the K=1 of the embodiment of the invention, as shown in Figure 4, P1, P2, P5 are big moving image, P3, P4 are little moving image, because P5 is big moving image, so P6 is not with reference to P5, but with reference to P4, after P5 makes a mistake like this, can be with error diffusion to the P6 frame.Conversely, correct P6 frame can also be used to the P5 frame is carried out the back to hiding error; Perhaps, the P5 frame is carried out two-way hiding error with the combination of P4 frame.
Fig. 5 is the schematic diagram of the frame level reference frame example 3 at interval of indefinite period during according to the K=1 of the embodiment of the invention, as shown in Figure 5, P1, P2, P4 are big moving image, and P3, P5 are little moving image, because P4 is big moving image, so P5 is not with reference to P4, but with reference to P3, P3 judges when P2 is big moving image, increases threshold value, judge that P1 is little moving image relatively, thus P3 with P1 as the reference frame.
Fig. 6 is the schematic diagram of the frame level reference frame example 4 at interval of indefinite period during according to the K=1 of the embodiment of the invention, as shown in Figure 6, P1, P2, P4, P5 are big moving image, and P3 is little moving image, P6 is with reference to P4, P5 is with reference to P3, because P3 is little moving image, therefore, P4 is directly with reference to P3, can guarantee original code efficiency, P3 is with reference to P1, and P2 is with reference to I0.
Fig. 7 is the frame level reference frame schematic diagram at interval of indefinite period during according to the K=2 of the embodiment of the invention, as shown in Figure 7, P1, P2, P4, P5 are big moving image, P3 is little moving image, because P5 is big moving image, P6 is not with reference to P5, continue to judge that P4 is still big moving image after increasing threshold value, then select P3 as a reference, after P4 makes a mistake like this, can be with error diffusion to P5 frame and P6 frame; After P5 makes a mistake, can be with error diffusion to the P6 frame.Conversely, correct P5 frame can also be used to the P4 frame is carried out the back to hiding error; Perhaps, the P4 frame is carried out two-way hiding error with the combination of P3 frame.
Method embodiment two
In the present embodiment, a kind of method for video coding is provided, be used under frame level fixed reference frame period pattern, carrying out video coding, Fig. 8 is the flow chart according to the method for video coding of the inventive method embodiment two, before carrying out processing shown in Figure 8, the reference frame interval mode that need at first select sequence to be encoded is a fixed reference frame period pattern, as shown in Figure 8, comprises following processing:
Step S802 is provided with fixed reference frame period s, and wherein, s is greater than 0;
Step S804, being that the quantity that can be used as the frame of reference before the present frame of n is less than or equal under the situation of fixed reference frame period s in sequence number, is to can be used as predetermined frame in the frame of reference before the present frame of n as the reference frame with sequence number, carries out motion prediction and coding, wherein, n is more than or equal to 1;
Step S806 is to can be used as before the present frame of n under the situation of quantity greater than fixed reference frame period s of frame of reference in sequence number, and the frame that with sequence number is (n-s-1) carries out motion prediction and coding as the reference frame.
Utilize above-mentioned technical scheme, can make wrong diffusivity reduce, and carry out hidden erroneous frame.
Below, in conjunction with the accompanying drawings, technical scheme to method embodiment one and method embodiment two is elaborated, and, suppose that current P frame to be encoded is numbered n (n 〉=1) in the whole video coded sequence, Fig. 9 is according to the flow chart of the detailed process of the inventive method embodiment one and method embodiment two, as shown in Figure 9, may further comprise the steps:
The first step is selected the reference frame interval mode of sequence to be encoded, if for frame level fixed reference frame period then carried out for second step, if carried out for the 5th step at interval for frame level on-fixed reference frame;
Second step was under the situation of fixed reference frame period in the frame level, and a fixed reference frame period s (s>0) is set, if can be used as the frame number of reference smaller or equal to s before the present frame, then carried out for the 3rd step, if the frame number that can be used as reference before the present frame then carried out for the 4th step greater than s;
The 3rd step, use before the present frame, and can be used as in the frame of reference one as a reference, carry out motion prediction and coding;
The 4th step, use sequence number be the frame of (n-s-1) as the reference frame, carry out the motion prediction and the coding of present frame;
The 5th step was under the on-fixed reference frame situation at interval in the frame level, and maximum reference frame k (k>0) at interval is set, if can be used as the frame number of reference smaller or equal to k before the present frame, then carried out for the 6th step, if the frame number that can be used as reference before the present frame then carried out for the 7th step greater than k;
In the 6th step, use a conduct in the frame that can be used as reference before the present frame with reference to frame, and carry out motion prediction and coding;
The 7th step, judge the image behavior property that is numbered (n-1) frame, if (n-1) frame is little moving image, then select (n-1) frame to carry out the motion prediction and the coding of present frame; Otherwise, carried out for the 8th step, here, image behavior attribute definition is the motion amplitude and the texture variations degree of image;
The 8th step, judge that successively (n-2) frame arrives (n-k-1) behavior property of k reference frame altogether, a selection frame wherein is as a reference, carry out the motion prediction and the coding of present frame, wherein, selection principle is: when the behavior property of (n-2) frame is little motion, then select (n-2) frame; Otherwise, if (n-2) when frame switches for bigger motion or scene, then suitably increase the judgment threshold of behavior property after, continue to judge the behavior property of (n-3) frame, the rest may be inferred, till determining (n-k-1) frame.
Figure 10 is the frame level reference frame schematic diagram at interval of fixed cycle during according to the S=1 of the embodiment of the invention, as shown in figure 10, utilizes the formula of n-s-1, and P6 is with reference to P4, and P5 is with reference to P3, and P4 is with reference to P2, and P3 is with reference to P1, and P2 and P1 are directly with reference to I0.
Figure 11 is the frame level reference frame schematic diagram at interval of fixed cycle during according to the S=2 of the embodiment of the invention, as shown in figure 11, utilizes the formula of n-s-1, and P6 is with reference to P3, and P5 is with reference to P2, and P4 is with reference to P1, and P3, P2, P1 are with reference to I0.
By the foregoing description, the present invention has improved serious forgiveness when not changing original video standard decode procedure as can be seen, reaches better video quality.
Device embodiment one
According to the embodiment of the invention, a kind of video coding apparatus is provided, be used under frame level on-fixed reference frame interval mode, carrying out video coding, Figure 12 is the block diagram according to the video coding apparatus of apparatus of the present invention embodiment one, as shown in figure 12, said apparatus comprises:
Module 120 is set, is used to be provided with maximum reference frame k at interval, wherein, k is greater than 0;
Whether judge module 122, the quantity that is used to judge the frame that can be used as reference before sequence number is the present frame of n be greater than maximum reference frame k at interval;
First reference frame is provided with module 124, the quantity that is used for can be used as the frame of reference before sequence number is the present frame of n is less than or equal to maximum reference frame at interval under the situation of k, with sequence number is to can be used as predetermined frame in the frame of reference before the present frame of n as the reference frame, carries out motion prediction and coding; Wherein, n is more than or equal to 1;
Second reference frame is provided with module 126, the quantity of frame that is used for can be used as reference before sequence number is the present frame of n is greater than maximum reference frame at interval under the situation of k, the sequence number predetermined frame that is (n-1) to the frame of (n-k-1) as the reference frame, is carried out motion prediction and coding.
In addition, above-mentioned second reference frame is provided with module 126 and further comprises: image behavior determined property module, be used for the image behavior property of judgment frame, and wherein, image behavior attribute kit is drawn together the texture variations degree of the motion amplitude and the image of image.
In addition, said apparatus further comprises:
Image behavior determined property module is used for from sequence number for the frame of (n-1) begins to travel through the image behavior property of k+1 the frame of sequence number between (n-1) to (n-k-1), is the frame of little moving image up to finding the image behavior property, and with frame as predetermined frame.
For example, as shown in Figure 7, module 120 is set maximum reference frame k=2 at interval is set, and, P1, P2, P4, P5 are big moving image, and first reference frame is provided with the reference frame that module 124 I0 are set to P1, and P3 is little moving image, because P5 is big moving image, so P6 continues to judge that P4 is still big moving image after, increasing threshold value not with reference to P5, second reference frame is provided with 126 of modules and selects P3 as a reference, after P4 makes a mistake like this, can be with error diffusion to P5 frame and P6 frame; After P5 makes a mistake, can be with error diffusion to the P6 frame.Conversely, correct P5 frame can also be used to the P4 frame is carried out the back to hiding error; Perhaps, the P4 frame is carried out two-way hiding error with the combination of P3 frame.
Device embodiment two
In the present embodiment, provide a kind of video coding apparatus, be used for carrying out video coding under frame level fixed reference frame period pattern, Figure 13 is the block diagram according to the video coding apparatus of apparatus of the present invention embodiment two, as shown in figure 13, comprising:
Module 130 is set, is used to be provided with fixed reference frame period s, wherein, s is greater than 0;
Whether judge module 132, the quantity that is used to judge the frame that can be used as reference before sequence number is the present frame of n be greater than described maximum reference frame s at interval;
First reference frame is provided with module 134, the quantity that is used for can be used as the frame of reference before sequence number is the present frame of n is less than or equal under the situation of fixed reference frame period s, with sequence number is to can be used as predetermined frame in the frame of reference before the present frame of n as the reference frame, carries out motion prediction and coding; Wherein, n is more than or equal to 1;
Second reference frame is provided with module 136, is used for can be used as before sequence number is the present frame of n under the situation of quantity greater than fixed reference frame period s of frame of reference, and the frame that with sequence number is (n-s-1) carries out motion prediction and coding as the reference frame.
As shown in figure 11, module 130 is set fixed reference frame period s=2 is set, utilize the formula of n-s-1, judge module 132 can be done number of reference frames and be less than at 2 o'clock before judging P1, first reference frame is provided with module 134 and P1 is set directly with reference to I0, and second reference frame is provided with module 136 and P6 is set with reference to P3, and P5 is with reference to P2, the P4 reference, P3, P2 are with reference to I0.
In sum,, can improve serious forgiveness, and erroneous frame be carried out hidden, better support is provided, reach better video quality by means of technical scheme of the present invention.
The above is the preferred embodiments of the present invention only, is not limited to the present invention, and for a person skilled in the art, the present invention can have various changes and variation.Within the spirit and principles in the present invention all, any modification of being done, be equal to replacement, improvement etc., all should be included within protection scope of the present invention.

Claims (9)

1. a method for video coding is used for carrying out video coding under frame level on-fixed reference frame interval mode, it is characterized in that described method comprises:
Maximum reference frame k at interval is set, and wherein, k is greater than 0;
Be that the quantity that can be used as the frame of reference before the present frame of n is less than or equal to described maximum reference frame at interval under the situation of k in sequence number, with described sequence number is to can be used as predetermined frame in the frame of reference before the present frame of n as the reference frame, carry out motion prediction and coding, wherein, n is more than or equal to 1;
Be that the quantity that can be used as the frame of reference before the present frame of n at interval under the situation of k, as described reference frame, is carried out motion prediction and coding with the predetermined frame in the frame of sequence number between (n-1) to (n-k-1) greater than described maximum reference frame in described sequence number;
Wherein, described predetermined frame is that the image behavior property is the frame of little moving image, wherein, described image behavior attribute kit is drawn together the texture variations degree of the motion amplitude and the described image of image, and the frame of described little moving image is the frame of described image behavior property less than judgment threshold.
2. method according to claim 1 is characterized in that, with predetermined frame being specially in the frame of sequence number between (n-1) to (n-k-1) as the reference frame:
Begin to travel through the image behavior property of k+1 the frame of sequence number between (n-1) to (n-k-1) for the frame of (n-1) from sequence number, up to finding the image behavior property is the frame of little moving image, and with the described image behavior property frame that is little moving image as described predetermined frame.
3. method according to claim 1 and 2 is characterized in that, before maximum reference frame interval k is set, further comprises:
The reference frame interval mode of selecting sequence to be encoded is an on-fixed reference frame interval mode.
4. a method for video coding is used for carrying out video coding under frame level fixed reference frame period pattern, it is characterized in that described method comprises:
Fixed reference frame period s is set, and wherein, s is greater than 0;
Be that the quantity that can be used as the frame of reference before the present frame of n is less than or equal under the situation of described fixed reference frame period s in sequence number, with described sequence number is to can be used as predetermined frame in the frame of reference before the present frame of n as the reference frame, carry out motion prediction and coding, wherein, described predetermined frame is that the image behavior property is the frame of little moving image, wherein, described image behavior attribute kit is drawn together the texture variations degree of the motion amplitude and the described image of image, the frame of described little moving image is the frame of described image behavior property less than judgment threshold, wherein, n is more than or equal to 1; Be to can be used as before the present frame of n under the situation of quantity greater than described fixed reference frame period s of frame of reference in described sequence number, the frame that with sequence number is (n-s-1) carries out motion prediction and coding as described reference frame.
5. method according to claim 4 is characterized in that, before described fixed reference frame period s is set, further comprises:
The reference frame interval mode of selecting sequence to be encoded is a fixed reference frame period pattern.
6. a video coding apparatus is used for carrying out video coding under frame level on-fixed reference frame interval mode, it is characterized in that described device comprises:
Module is set, is used to be provided with maximum reference frame k at interval, wherein, k is greater than 0;
Whether judge module, the quantity that is used to judge the frame that can be used as reference before sequence number is the present frame of n be greater than described maximum reference frame k at interval;
First reference frame is provided with module, the quantity that is used for can be used as the frame of reference before sequence number is the present frame of n is less than or equal to described maximum reference frame at interval under the situation of k, with described sequence number is to can be used as predetermined frame in the frame of reference before the present frame of n as the reference frame, carry out motion prediction and coding, wherein, n is more than or equal to 1;
Second reference frame is provided with module, the quantity of frame that is used for can be used as reference before described sequence number is the present frame of n is greater than described maximum reference frame at interval under the situation of k, the sequence number predetermined frame that is (n-1) to the frame of (n-k-1) as the reference frame, is carried out motion prediction and coding
Wherein, described predetermined frame is that the image behavior property is the frame of little moving image, wherein, described image behavior attribute kit is drawn together the texture variations degree of the motion amplitude and the described image of image, and the frame of described little moving image is the frame of described image behavior property less than judgment threshold.
7. device according to claim 6 is characterized in that, second reference frame is provided with module and further comprises:
Image behavior determined property module is used for the image behavior property of judgment frame, and wherein, described image behavior attribute kit is drawn together the texture variations degree of the motion amplitude and the described image of image.
8. device according to claim 7 is characterized in that,
Described image behavior determined property module is used for beginning to travel through for the frame of (n-1) from sequence number the image behavior property of k+1 the frame of sequence number between (n-1) to (n-k-1), up to finding the image behavior property is the frame of little moving image, and with the described image behavior property frame that is little moving image as described predetermined frame.
9. a video coding apparatus is used for carrying out video coding under frame level fixed reference frame period pattern, it is characterized in that described device comprises:
Module is set, is used to be provided with fixed reference frame period s, wherein, s is greater than 0;
Judge module, whether the quantity that is used to judge the frame that can be used as reference before sequence number is the present frame of n is greater than described fixed reference frame period s;
First reference frame is provided with module, the quantity that is used for can be used as the frame of reference before sequence number is the present frame of n is less than or equal under the situation of described fixed reference frame period s, with described sequence number is to can be used as predetermined frame in the frame of reference before the present frame of n as the reference frame, carry out motion prediction and coding, wherein, described predetermined frame is that the image behavior property is the frame of little moving image, wherein, described image behavior attribute kit is drawn together the texture variations degree of the motion amplitude and the described image of image, the frame of described little moving image is the frame of described image behavior property less than judgment threshold, wherein, n is more than or equal to 1;
Second reference frame is provided with module, is used for can be used as before described sequence number is the present frame of n under the situation of quantity greater than described fixed reference frame period s of frame of reference, and the frame that with sequence number is (n-s-1) carries out motion prediction and coding as the reference frame.
CN 200810127700 2008-07-09 2008-07-09 Video encoding method and device Expired - Fee Related CN101309427B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 200810127700 CN101309427B (en) 2008-07-09 2008-07-09 Video encoding method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 200810127700 CN101309427B (en) 2008-07-09 2008-07-09 Video encoding method and device

Publications (2)

Publication Number Publication Date
CN101309427A CN101309427A (en) 2008-11-19
CN101309427B true CN101309427B (en) 2010-07-07

Family

ID=40125599

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 200810127700 Expired - Fee Related CN101309427B (en) 2008-07-09 2008-07-09 Video encoding method and device

Country Status (1)

Country Link
CN (1) CN101309427B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
RU2795934C2 (en) * 2018-09-04 2023-05-15 Хуавэй Текнолоджиз Ко., Лтд. Method and device for bidirectional inter-prediction

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB201405649D0 (en) * 2014-03-28 2014-05-14 Sony Corp Data encoding and decoding
CN110166776B (en) * 2018-02-11 2023-08-04 腾讯科技(深圳)有限公司 Video encoding method, device and storage medium
MX2021002488A (en) * 2018-09-04 2021-07-16 Huawei Tech Co Ltd Method and apparatus for acquiring reference frame applied to bidirectional inter-frame prediction.

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
RU2795934C2 (en) * 2018-09-04 2023-05-15 Хуавэй Текнолоджиз Ко., Лтд. Method and device for bidirectional inter-prediction

Also Published As

Publication number Publication date
CN101309427A (en) 2008-11-19

Similar Documents

Publication Publication Date Title
CN101605255B (en) Method and device for encoding and decoding video
CN101939992B (en) Reference selection for video interpolation or extrapolation
CN101677406B (en) Method and apparatus for video encoding and decoding
CN113194314B (en) Video processing method, encoding end and decoding end
CN104243982A (en) Video coding and decoding processing method and device
CN101207823A (en) Method for video encoding of video frequency corresponding synthesis anti-code error
CN101355708B (en) Self-adapting method for shielding error code
CN102227132A (en) Motion vector prediction coding and decoding method, apparatus thereof and coding and decoding system
CN101163250B (en) Boundary gradient based video stream fault tolerance method
CN101309427B (en) Video encoding method and device
JP5502798B2 (en) Channel switching frame
CN105163117A (en) Image coding and processing methods and devices
CN102769748B (en) Motion vector prediction method, device and system
CN101242540B (en) Error control method for video decoder chip
EP2117235A2 (en) Apparatus and method for managing reference frame buffer in layered video coding
CN102946533B (en) Video coding
CN102223544B (en) Method for processing error after detecting error in H264 video stream
CN106791870B (en) A kind of method for video coding, video encoding/decoding method and relevant device
CN101453656B (en) Video encoding, decoding method and apparatus, video encoding and decoding system
CN100370836C (en) Motion forecast method based on rate-distortion optimization
CN103096093A (en) Error concealment method of H. 246 video P frame
CN101986713B (en) View synthesis-based multi-viewpoint error-resilient encoding frame
CN101287128B (en) Error recovery method for video decoding
JP2002325259A (en) Method for coding digital image base on error correction
CN102318203B (en) Method and equipment used for encoding video frame containing light change

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
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20100707

Termination date: 20190709

CF01 Termination of patent right due to non-payment of annual fee