CN101179728B - Method and apparatus for determining interframe encoding mode - Google Patents

Method and apparatus for determining interframe encoding mode Download PDF

Info

Publication number
CN101179728B
CN101179728B CN 200710179463 CN200710179463A CN101179728B CN 101179728 B CN101179728 B CN 101179728B CN 200710179463 CN200710179463 CN 200710179463 CN 200710179463 A CN200710179463 A CN 200710179463A CN 101179728 B CN101179728 B CN 101179728B
Authority
CN
China
Prior art keywords
mode
rate distortion
distortion costs
pattern
optimization model
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 200710179463
Other languages
Chinese (zh)
Other versions
CN101179728A (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.)
Vimicro Corp
Original Assignee
Vimicro 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 Vimicro Corp filed Critical Vimicro Corp
Priority to CN 200710179463 priority Critical patent/CN101179728B/en
Publication of CN101179728A publication Critical patent/CN101179728A/en
Application granted granted Critical
Publication of CN101179728B publication Critical patent/CN101179728B/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 method and apparatus for determining inter-frame coding modes, which compares the rate-distortion function cost of the skip mode with the presupposition current value of the first threshold. If the rate-distortion function cost of the skip mode is smaller than the current first threshold, then the skip mode is determined to be the optimal mode under the inter-frame prediction mode; otherwise, the optimal mode under the inter-frame prediction mode is determined from the other modes under the inter-frame prediction mode, the rate-distortion function cost of which is subsequently compared with the presupposition current value of the second threshold. If the rate-distortion function cost of the optimal mode under the inter prediction mode is smaller than the current second threshold, then the optimal mode is determined to be the inter-frame coding mode; otherwise, the smallest one among the optimal modes under the intra prediction mode and the optimal modes under the intra prediction mode is determined to be the inter-frame coding mode. The invention has no need of calculating the rate-distortion function cost of all the modes, thus reducing the calculation work and enhancing the coding speed.

Description

Interframe encoding mode is determined method and device
Technical field
The present invention relates to technical field of video processing, particularly interframe encoding mode is determined method and device.
Background technology
At present, in standard H.264, for when guaranteeing video quality, reduce the code check of video coding as far as possible, can before carrying out interframe encode, macro block carry out the selection of coding mode, adopt the rate distortion costs (RDCost) under all possible coding mode of rate-distortion optimization (RDO) algorithm computation, the coding mode of selection rate distortion cost minimum is as interframe encoding mode.
Wherein, interframe encoding mode can adopt intraframe predictive coding or inter prediction encoding, and wherein inter prediction encoding can be divided into 7 kinds again according to macroblock partition situation difference.The difference of macro block is cut apart situation as shown in Figure 1, is respectively 16 * 16,16 * 8,8 * 16,8 * 8, wherein under 8 * 8 pattern, can also carry out 8 * 4,4 * 8,4 * 4 sub-macroblock partition.The respectively corresponding 7 kinds of inter prediction encoding patterns of these 7 kinds of macro block modes, i.e. 16 * 16 associative modes 1 (mode1), 16 * 8 associative modes 2 (mode2), 8 * 16 associative modes 3 (mode3), 8 * 8 associative modes 4 (mode4), 8 * 4 associative modes 5 (mode5), 4 * 8 associative modes 6 (mode6), 4 * 4 associative modes 7 (mode7).In addition, when macroblock to be encoded is carried out estimation, draw macro block do not have the motion as a result the time, corresponding skip mode (mode0).
In the existing H.264 standard, need carry out estimation to all possible interframe encoding mode, and difference calculation rate distortion cost.Because the computational process complexity of estimation and rate distortion costs is very high, amount of calculation is very big, though therefore existing inter-frame mode selecting method can be chosen best interframe encoding mode, this process need expends huge amount of calculation, has reduced coding rate.
Summary of the invention
The embodiment of the invention provides a kind of interframe encoding mode to determine method, can reduce interframe encoding mode and select spent amount of calculation, improves coding rate.
The embodiment of the invention provides a kind of interframe encoding mode to determine device, can reduce interframe encoding mode and select spent amount of calculation, improves coding rate.
For achieving the above object, technical scheme of the present invention specifically is achieved in that
A kind of interframe encoding mode is determined method, and this method comprises:
The rate distortion costs of skip mode and the currency of presetting first threshold are compared, if the rate distortion costs of skip mode is littler than current first threshold, determine that then skip mode is the optimization model under the inter-frame forecast mode, otherwise, the non-rate distortion costs of computation schema 1, pattern 4, mode 7; According to the magnitude relationship between the non-rate distortion costs of pattern 1, pattern 4 and mode 7, determine the optimization model under the inter-frame forecast mode; Wherein, macro block is divided into 16*16 associative mode 1,8*8 associative mode 4,4*4 associative mode 7;
The rate distortion costs of the optimization model the determined currency with default second threshold value is compared, if the rate distortion costs of the optimization model under the described inter-frame forecast mode is littler than described second threshold value, determine that then described optimization model is an interframe encoding mode, otherwise, in the optimization model under optimization model under the intra prediction mode and the described inter-frame forecast mode, one of the rate distortion costs minimum is defined as interframe encoding mode.
A kind of inter-frame mode choice device, this device comprises:
Interframe optimization model determination module, be used to instruct the rate distortion costs computing module to calculate the rate distortion costs of skip mode, the rate distortion costs of skip mode and the currency of presetting first threshold are compared, if the rate distortion costs of skip mode is littler than described first threshold, determine that then skip mode is the optimization model under the inter-frame forecast mode, otherwise, the non-rate distortion costs of computation schema 1, pattern 4, mode 7; According to the magnitude relationship between the non-rate distortion costs of pattern 1, pattern 4 and mode 7, determine the optimization model under the inter-frame forecast mode; Wherein, macro block is divided into 16*16 associative mode 1,8*8 associative mode 4,4*4 associative mode 7;
The rate distortion costs computing module is used to calculate the rate distortion costs of various patterns;
The interframe encoding mode determination module, be used to instruct the rate distortion costs computing module to calculate the rate distortion costs of the optimization model under the definite inter-frame forecast mode of described interframe optimization model determination module, the rate distortion costs of the described definite optimization model currency with default second threshold value is compared, if the rate distortion costs of the optimization model under the described inter-frame forecast mode is littler than described second threshold value, determine that then described optimization model is an interframe encoding mode, otherwise, in the optimization model under optimization model under the intra prediction mode and the described inter-frame forecast mode, less one of rate distortion costs is defined as interframe encoding mode.
As seen from the above technical solutions, the of the present invention this rate distortion costs of skip mode and current first threshold are compared, if the rate distortion costs of skip mode is littler than the currency of presetting first threshold, determine that then skip mode is the optimization model under the inter-frame forecast mode, otherwise determine the optimization model under the inter-frame forecast mode all the other patterns under inter-frame forecast mode; Again the rate distortion costs of the described definite optimization model currency with default second threshold value is compared, if the rate distortion costs of the optimization model under the described inter-frame forecast mode is littler than the second current threshold value, determine that then described optimization model is an interframe encoding mode, otherwise, in the optimization model under optimization model under the intra prediction mode and the described inter-frame forecast mode, a method and the device that is defined as interframe encoding mode that rate distortion costs is less, utilize the macro block mode tendency of different video images, which macro block mode of decision is an optimization model before the estimation of carrying out all macro block modes.Calculate owing to all macro block modes are not carried out rate distortion costs, therefore can significantly reduce amount of calculation and the computation complexity of determining coding mode in the interframe encode process, under the prerequisite that does not have substantially to descend in picture quality, improved coding rate.
Description of drawings
Fig. 1 is the macro block mode schematic diagram of H.264 standard;
Fig. 2 determines method flow diagram for the interframe encoding mode of the embodiment of the invention;
Fig. 3 determines structure drawing of device for the interframe encoding mode of the embodiment of the invention.
Embodiment
For making purpose of the present invention, technical scheme and advantage clearer, below with reference to the accompanying drawing embodiment that develops simultaneously, the present invention is described in more detail.
In the ordinary course of things, when adopting the large-size macro block, when encoding as 16 * 16,16 * 8 or 8 * 16, the data volume of prediction residual is bigger usually, but the data volume that is used for encoding motion vector and macro block (mb) type can be fewer, is suitable for fewer, the image-region stably of image detail.And adopting the reduced size macro block as 8 * 4,4 * 8 or 4 * 4 o'clock, prediction residual is smaller usually, but the data volume that is used for encoding motion vector and macro block (mb) type can increase a lot, and it is more to be suitable for image detail, and more violent image-region moves.The Skip pattern does not comprise prediction residual and movable information, thereby the data volume minimum, and is more common in generally uncomplicated in motion and the scene that background not too changes.
As seen, in dissimilar images, the selection of Optimal Macroblock Mode is to have different tendentiously, and the embodiment of the invention mainly is to utilize this tendentiousness, by the non-rate distortion costs under the more various macro block modes, decision need be carried out the type of the piece of motion search.
Fig. 2 is the overview flow chart of the interframe encoding mode system of selection of the embodiment of the invention, as shown in Figure 2, and specifically the comprising of this flow process:
Step 201, the rate distortion costs of skip mode and current first threshold are compared, if the rate distortion costs of skip mode is littler than current first threshold, determine that then skip mode is the optimization model under the inter-frame forecast mode, otherwise determine the optimization model under the inter-frame forecast mode all the other patterns under inter-frame forecast mode.
Step 202, the rate distortion costs of the optimization model under the described inter-frame forecast mode and the second current threshold value are compared, if the rate distortion costs of the optimization model under the described inter-frame forecast mode is littler than the second current threshold value, determine that then the optimization model under the described inter-frame forecast mode is an interframe encoding mode, otherwise, in the optimization model under optimization model under the intra prediction mode and the described inter-frame forecast mode, less one of rate distortion costs is defined as interframe encoding mode.
Below be the interframe encoding mode system of selection flow process of invention specific embodiment:
Step 1 judges whether skip mode is optimization model.
Calculate the rate distortion costs C of skip mode (mode 0) Skip, if satisfy formula (1) then execution in step 9 otherwise execution in step 2.
C Skip<T 1 (1)
T wherein 1Be first threshold, its computing formula is (2):
T 1=(T 1′·n+C)/(n+1) (2)
T 1Be 0 during initialization, only when selecting skip mode to be Optimal Macroblock Mode, just utilize formula (2) to upgrade T 1Value.T 1T before the ' presentation code current macro 1Value, selecting skip mode before the n representative coding current macro is the macro block number of optimization model, C is the rate distortion costs of current macro.The meaning of formula (2) is: selecting to select in the coded macroblocks the mean value of the macro block rate distortion costs of skip mode directly to select skip mode as macro block to be encoded is the threshold value of Optimal Macroblock Mode (not doing the search of rest block).
Step 2 is calculated 16 * 16 (mode 1), 8 * 8 (mode 4), the non-rate distortion costs C of 4 * 4 (mode 7) 16 * 16, C 8 * 8And C 4 * 4, according to its magnitude relationship, judge whether following inequality is set up:
C 4×4<C 8×8<C 16×16 (3)
C 16×16<C 8×8<C 4×4 (4)
C 4×4<C 16×16<C 8×8 (5)
C 16×16<C 4×4<C 8×8 (6)
If C 16 * 16, C 8 * 8And C 4 * 4Satisfy inequality (3), then execution in step 3; If satisfy inequality (4), then execution in step 4; If satisfy inequality (5), then execution in step 5; If satisfy inequality (6), then execution in step 6; If above condition does not all satisfy, then execution in step 7, and make that J is 2.Wherein J will use in step 7 for the variable of record redirect direction.
Step 3 is calculated the non-rate distortion costs C of 8 * 4 (mode 5) and 4 * 8 (mode 6) 8 * 4And C 4 * 8, select C 8 * 8, C 8 * 4, C 4 * 8And C 4 * 4In minimum value, with the macro block mode of minimum value correspondence as Optimal Macroblock Mode, and execution in step 8.
Step 4 is calculated the non-rate distortion costs C of 16 * 8 (mode 2) and 8 * 16 (mode 3) 16 * 8And C 8 * 16, select C 16 * 16, C 16 * 8, C 8 * 16And C 8 * 8In minimum value, with the macro block mode of minimum value correspondence as Optimal Macroblock Mode, and execution in step 8.
Step 5 is calculated 8 * 4 (mode 5), the non-rate distortion costs C of 4 * 8 (mode 6) 8 * 4And C 4 * 8, if C 8 * 4, C 4 * 8And C 4 * 4Make conditional inquality (7) for true, then with mode7 as Optimal Macroblock Mode, and execution in step 8; Otherwise execution in step 7, and make that J is 5.
C 4×4<C 4×8&&C 4×4<C 8×4 (7)
Step 6 is calculated 16 * 8 (mode 2), the non-rate distortion costs C of 8 * 16 (mode 3) 16 * 8And C 8 * 16, if C 16 * 16, C 16 * 8And C 8 * 16Make conditional inquality (8) for true, then with mode1 as Optimal Macroblock Mode, and execution in step 8; Otherwise execution in step 7, and make that J is 6.
C 16×16<C 16×8&&C 16×16<C 8×16 (8)
Step 7, the value of inspection J if J is 2, is then calculated the non-rate distortion costs C of 16 * 8 (mode 2), 8 * 16 (mode3), 8 * 4 (mode 5) and 4 * 8 (mode 6) 16 * 8, C 8 * 16, C 8 * 4, and C 4 * 8If J is 5, then calculate the non-rate distortion costs C of 16 * 8 (mode 2) and 8 * 16 (mode 3) 16 * 8And C 8 * 16If J is 6, then calculate the non-rate distortion costs C of 8 * 4 (mode 5) and 4 * 8 (mode 6) 8 * 4And C 4 * 8The macro block mode of selecting non-rate distortion costs minimum in all seven kinds of patterns (not comprising skip mode) is as Optimal Macroblock Mode, and execution in step 8.
In this step, the purpose of calculating non-rate distortion costs according to the J value be exactly according to before the non-rate distortion costs of the various patterns calculated, in all 7 kinds of patterns, determine also calculative non-rate distortion costs, thereby calculate the non-rate distortion costs of all 7 kinds of patterns, avoid double counting.Certainly, no matter how make, as long as guarantee to calculate the non-rate distortion costs of all 7 kinds of patterns.
Step 8, the rate distortion costs C of the Optimal Macroblock Mode that calculating finally obtains Inter, if satisfy formula (9), then will more than the interframe encoding mode of the Optimal Macroblock Mode correspondence selected as the final interframe encoding mode of selecting, otherwise execution in step 9.
C inter<T 2 (9)
T wherein 2Be second threshold value that is used for judging whether to carry out infra-frame prediction, computing formula is (10):
T 2=(T 2′·n+C)/(n+1) (10)
T 2When initial is 0, has only when having selected intra prediction mode to be Optimal Macroblock Mode, just utilizes formula (10) to upgrade T 2Value.T 2T before the ' presentation code current macro 2Value, selecting intra prediction mode before the n representative coding current macro is the macro block number of Optimal Macroblock Mode, C is the rate distortion costs of current macro.The meaning of formula (10) is: select the mean value of intra prediction mode rate distortion costs in the coded macroblocks to judge whether to carry out the threshold value of infra-frame prediction as macroblock to be encoded.
Step 9, the rate distortion costs C of calculating intra prediction mode Intra, if C InterAnd C IntraSatisfy formula (11), then selecting inter-frame forecast mode is Optimal Macroblock Mode; Otherwise the selection intra prediction mode is an Optimal Macroblock Mode;
C inter<C intra (11)
Introduce the interframe encoding mode system of selection of the embodiment of the invention above, will introduce the interframe encoding mode choice device of the embodiment of the invention below in detail.
Fig. 3 is the structure chart of the interframe encoding mode choice device of the embodiment of the invention; As shown in Figure 3, this device comprises: interframe optimization model determination module 301, rate distortion costs computing module 302 and interframe encoding mode determination module 303.
Interframe optimization model determination module 301 is used to instruct rate distortion costs computing module 302 to calculate the rate distortion costs of skip mode, the rate distortion costs of skip mode and the currency of presetting first threshold are compared, if the rate distortion costs of skip mode is littler than current first threshold, determine that then skip mode is the optimization model under the inter-frame forecast mode, otherwise determine the optimization model under the inter-frame forecast mode all the other patterns under inter-frame forecast mode.
Rate distortion costs computing module 302 is used to calculate the rate distortion costs of various patterns.
Interframe encoding mode determination module 303 is used to instruct rate distortion costs computing module 302 to calculate the rate distortion costs of the optimization model under the definite inter-frame forecast mode of described interframe optimization model determination module, the rate distortion costs of the described optimization model currency with default second threshold value is compared, if the rate distortion costs of the optimization model under the described inter-frame forecast mode is littler than the second current threshold value, determine that then the optimization model under the described inter-frame forecast mode is an interframe encoding mode, otherwise, in the optimization model under optimization model under the intra prediction mode and the described inter-frame forecast mode, less one of rate distortion costs is defined as interframe encoding mode.
Wherein, interframe optimization model determination module 301 comprises first threshold computing unit 304 and optimization model determining unit 306.
First threshold computing unit 304 is used for first threshold T 1Initial value be set to 0, when definite skip mode is interframe encoding mode, according to formula T 1=(T 1' n+C)/(n+1) upgrade T 1Value, T wherein 1' be illustrated in the present encoding pattern determine before T 1Value, n is illustrated in the present encoding pattern, and to select skip mode before determining be the macro block number of interframe encoding mode, C is the rate distortion costs of current macroblock to be encoded.
Optimization model determining unit 306, being used for the first threshold that rate distortion costs and first threshold computing unit 304 with skip mode calculate compares, if the rate distortion costs of skip mode is littler than first threshold, determine that then skip mode is the optimization model under the inter-frame forecast mode, otherwise determine the optimization model under the inter-frame forecast mode all the other patterns under inter-frame forecast mode.
Wherein, optimization model determination module 301 can also comprise non-rate distortion costs computing unit 305.
The non-rate distortion costs of non-rate distortion costs computing unit 305 computation schemas 1 of described optimization model determining unit 306 instructions, pattern 4, mode 7; And the magnitude relationship between the non-rate distortion costs of comparison pattern 1, pattern 4, mode 7.
If the non-rate distortion costs of mode 7 is less than the non-rate distortion costs of pattern 4, and the non-rate distortion costs of pattern 4 is less than the non-rate distortion costs of pattern 1, then instructs the non-rate distortion costs of non-rate distortion costs computing unit 305 computation schemas 5 and pattern 6; And the pattern of non-rate distortion costs minimum in pattern 4, pattern 5, pattern 6, the mode 7 is defined as optimization model under the inter-frame forecast mode.
If the non-rate distortion costs of pattern 1 is less than the non-rate distortion costs of pattern 4, and the non-rate distortion costs of pattern 4 is less than the non-rate distortion costs of mode 7, then instructs the non-rate distortion costs of non-rate distortion costs computing unit 305 computation schemas 2 and mode 3; The pattern of non-rate distortion costs minimum in pattern 1, pattern 2, mode 3, the pattern 4 is defined as optimization model under the inter-frame forecast mode.
If the non-rate distortion costs of mode 7 is less than the non-rate distortion costs of pattern 1, and the non-rate distortion costs of pattern 1 is less than the non-rate distortion costs of pattern 4, then instructs the non-rate distortion costs of non-rate distortion costs computing unit 305 computation schemas 5 and pattern 6; If the non-rate distortion costs of mode 7 is less than the non-rate distortion costs of pattern 5, and the non-rate distortion costs of mode 7 then is defined as mode 7 need carry out the optimization model of estimation less than the non-rate distortion costs of pattern 6; The non-rate distortion costs of non-rate distortion costs computing unit 305 computation schemas 2 of ELSE instruction and mode 3 is defined as optimization model under the inter-frame forecast mode with pattern 1 pattern of non-rate distortion costs minimum to the mode 7.
If the non-rate distortion costs of pattern 1 is less than the non-rate distortion costs of mode 7, and the non-rate distortion costs of mode 7 is less than the non-rate distortion costs of pattern 4, then instructs the non-rate distortion costs of non-rate distortion costs computing unit 305 computation schemas 2 and mode 3; If the non-rate distortion costs of pattern 1 is less than the non-rate distortion costs of pattern 2, and the non-rate distortion costs of pattern 1 then is defined as pattern 1 need carry out the optimization model of estimation less than the non-rate distortion costs of mode 3; The non-rate distortion costs of non-rate distortion costs computing unit 305 computation schemas 5 of ELSE instruction and pattern 6 is defined as optimization model under the inter-frame forecast mode with pattern 1 pattern of non-rate distortion costs minimum to the mode 7.
If the discontented condition that is enough to of the magnitude relationship between the non-rate distortion costs of pattern 1, pattern 4 and mode 7, then instruct the non-rate distortion costs of non-rate distortion costs computing unit 305 computation schemas 2, mode 3, pattern 5 and pattern 6, pattern 1 pattern of non-rate distortion costs minimum to the mode 7 is defined as optimization model under the inter-frame forecast mode.
Interframe encoding mode determination module 303 comprises the second threshold calculations unit 307 and interframe encoding mode determining unit 308.
The second threshold calculations unit 307 is used for the second threshold value T 2Initial value be set to 0, when definite intra prediction mode is interframe encoding mode, according to formula T 2=(T 2' n+C)/(n+1) upgrade T 2Value, T wherein 2' be illustrated in the present encoding pattern determine before T 2Value, n is illustrated in the present encoding pattern, and to select intra prediction mode before determining be the macro block number of interframe encoding mode, C is the rate distortion costs of current macroblock to be encoded.
Interframe encoding mode determining unit 308 is used for second threshold value that the rate distortion costs of the optimization model under the described inter-frame forecast mode and the second threshold calculations unit 307 calculate is compared, if the rate distortion costs of the optimization model under the described inter-frame forecast mode is littler than second threshold value, determine that then the optimization model under the described inter-frame forecast mode is an interframe encoding mode, otherwise, in the optimization model under optimization model under the intra prediction mode and the described inter-frame forecast mode, less one of rate distortion costs is defined as interframe encoding mode.
By the above embodiments as seen, the of the present invention this rate distortion costs of skip mode and the currency of presetting first threshold are compared, if the rate distortion costs of skip mode is littler than current first threshold, determine that then skip mode is the optimization model under the inter-frame forecast mode, otherwise determine the optimization model under the inter-frame forecast mode all the other patterns under inter-frame forecast mode; Again the rate distortion costs of the optimization model under the described inter-frame forecast mode currency with default second threshold value is compared, if the rate distortion costs of the optimization model under the described inter-frame forecast mode is littler than the second current threshold value, determine that then the optimization model under the described inter-frame forecast mode is an interframe encoding mode, otherwise, in the optimization model under optimization model under the intra prediction mode and the described inter-frame forecast mode, a method and the device that is defined as interframe encoding mode that rate distortion costs is less, utilize the macro block mode tendency of different video images, before the estimation of carrying out all macro block modes, utilize the non-rate distortion costs of calculating various macro block modes, determine which macro block mode is an optimization model.Because the amount of calculation and the computation complexity of the calculating phase ratio distortion cost of non-rate distortion costs are much smaller, therefore can significantly reduce amount of calculation and the computation complexity of determining coding mode in the interframe encode process, substantially under the prerequisite that does not have to descend in picture quality, improved code efficiency.
Institute is understood that; the above is a better embodiment of the present invention only, and is not intended to limit the scope of the invention, and is within the spirit and principles in the present invention all; any modification of being made, be equal to replacement, improvement etc., all should be included within protection scope of the present invention.

Claims (8)

1. an interframe encoding mode is determined method, it is characterized in that, this method comprises:
The rate distortion costs of skip mode and the currency of presetting first threshold are compared, if the rate distortion costs of skip mode is littler than current first threshold, determine that then skip mode is the optimization model under the inter-frame forecast mode, otherwise, the non-rate distortion costs of computation schema 1, pattern 4, mode 7; According to the magnitude relationship between the non-rate distortion costs of pattern 1, pattern 4 and mode 7, determine the optimization model under the inter-frame forecast mode; Wherein, macro block is divided into 16*16 associative mode 1,8*8 associative mode 4,4*4 associative mode 7;
The rate distortion costs of the optimization model the determined currency with default second threshold value is compared, if the rate distortion costs of the optimization model under the described inter-frame forecast mode is littler than described second threshold value, determine that then described optimization model is an interframe encoding mode, otherwise, in the optimization model under optimization model under the intra prediction mode and the described inter-frame forecast mode, one of the rate distortion costs minimum is defined as interframe encoding mode.
2. interframe encoding mode as claimed in claim 1 is determined method, it is characterized in that, establishing described first threshold is T 1, described T 1Initial value be 0;
When definite skip mode was interframe encoding mode, this method further comprised:
According to formula T 1=(T 1' n+C)/(n+1) upgrade T 1Value, T wherein 1' be illustrated in the present encoding pattern determine before T 1Value, n is illustrated in the present encoding pattern, and to select skip mode before determining be the macro block number of interframe encoding mode, C is the rate distortion costs of current macroblock to be encoded.
3. interframe encoding mode as claimed in claim 1 is determined method, it is characterized in that, establishing described second threshold value is T 2, described T 2Initial value be 0;
When definite intra prediction mode was interframe encoding mode, this method further comprised:
According to formula T 2=(T 2' n+C)/(n+1) upgrade T 2Value, T wherein 2' be illustrated in the present encoding pattern determine before T 2Value, n is illustrated in the present encoding pattern, and to select intra prediction mode before determining be the macro block number of interframe encoding mode, C is the rate distortion costs of current macroblock to be encoded.
4. interframe encoding mode system of selection as claimed in claim 1 is characterized in that, describedly determines the optimization model under the inter-frame forecast mode according to the magnitude relationship between the non-rate distortion costs of pattern 1, pattern 4 and mode 7, comprising:
If the non-rate distortion costs of mode 7 is less than the non-rate distortion costs of pattern 4, and the non-rate distortion costs of pattern 4 is less than the non-rate distortion costs of pattern 1, then the non-rate distortion costs of computation schema 5 and pattern 6; The pattern of non-rate distortion costs minimum in pattern 4, pattern 5, pattern 6, the mode 7 is defined as optimization model under the inter-frame forecast mode;
If the non-rate distortion costs of pattern 1 is less than the non-rate distortion costs of pattern 4, and the non-rate distortion costs of pattern 4 is less than the non-rate distortion costs of mode 7, then the non-rate distortion costs of computation schema 2 and mode 3; The pattern of non-rate distortion costs minimum in pattern 1, pattern 2, mode 3, the pattern 4 is defined as optimization model under the inter-frame forecast mode;
If the non-rate distortion costs of mode 7 is less than the non-rate distortion costs of pattern 1, and the non-rate distortion costs of pattern 1 is less than the non-rate distortion costs of pattern 4, then the non-rate distortion costs of computation schema 5 and pattern 6; If the non-rate distortion costs of mode 7 is less than the non-rate distortion costs of pattern 5, and the non-rate distortion costs of mode 7 then is defined as mode 7 need carry out the optimization model of estimation less than the non-rate distortion costs of pattern 6; Otherwise the non-rate distortion costs of computation schema 2 and mode 3 is defined as optimization model under the inter-frame forecast mode with pattern 1 pattern of non-rate distortion costs minimum to the mode 7;
If the non-rate distortion costs of pattern 1 is less than the non-rate distortion costs of mode 7, and the non-rate distortion costs of mode 7 is less than the non-rate distortion costs of pattern 4, then the non-rate distortion costs of computation schema 2 and mode 3; If the non-rate distortion costs of pattern 1 is less than the non-rate distortion costs of pattern 2, and the non-rate distortion costs of pattern 1 then is defined as pattern 1 need carry out the optimization model of estimation less than the non-rate distortion costs of mode 3; Otherwise the non-rate distortion costs of computation schema 5 and pattern 6 is defined as optimization model under the inter-frame forecast mode with pattern 1 pattern of non-rate distortion costs minimum to the mode 7;
If the discontented condition that is enough to of the magnitude relationship between the non-rate distortion costs of pattern 1, pattern 4 and mode 7, the non-rate distortion costs of computation schema 2, mode 3, pattern 5 and pattern 6 then, pattern 1 pattern of non-rate distortion costs minimum to the mode 7 is defined as optimization model under the inter-frame forecast mode
Wherein, 16 * 16 associative modes, 1,16 * 8 associative modes, 2,8 * 16 associative modes, 3,8 * 8 associative modes, 4,8 * 4 associative modes, 5,4 * 8 associative modes, 6,4 * 4 associative modes 7.
5. an inter-frame mode choice device is characterized in that, this device comprises:
Interframe optimization model determination module, be used to instruct the rate distortion costs computing module to calculate the rate distortion costs of skip mode, the rate distortion costs of skip mode and the currency of presetting first threshold are compared, if the rate distortion costs of skip mode is littler than described first threshold, determine that then skip mode is the optimization model under the inter-frame forecast mode, otherwise, the non-rate distortion costs of computation schema 1, pattern 4, mode 7; According to the magnitude relationship between the non-rate distortion costs of pattern 1, pattern 4 and mode 7, determine the optimization model under the inter-frame forecast mode; Wherein, macro block is divided into 16*16 associative mode 1,8*8 associative mode 4,4*4 associative mode 7;
The rate distortion costs computing module is used to calculate the rate distortion costs of various patterns;
The interframe encoding mode determination module, be used to instruct the rate distortion costs computing module to calculate the rate distortion costs of the optimization model under the definite inter-frame forecast mode of described interframe optimization model determination module, the rate distortion costs of the described definite optimization model currency with default second threshold value is compared, if the rate distortion costs of the optimization model under the described inter-frame forecast mode is littler than described second threshold value, determine that then described optimization model is an interframe encoding mode, otherwise, in the optimization model under optimization model under the intra prediction mode and the described inter-frame forecast mode, less one of rate distortion costs is defined as interframe encoding mode.
6. inter-frame mode choice device as claimed in claim 5 is characterized in that, described interframe optimization model determination module comprises:
The first threshold computing unit is used for first threshold T 1Initial value be set to 0, when definite skip mode is interframe encoding mode, according to formula T 1=(T 1' n+C)/(n+1) upgrade T 1Value, T ' wherein 1Be illustrated in the present encoding pattern and determine T before 1Value, n is illustrated in the present encoding pattern, and to select skip mode before determining be the macro block number of interframe encoding mode, C is the rate distortion costs of current macroblock to be encoded;
The optimization model determining unit, being used for the first threshold that rate distortion costs and first threshold computing unit with skip mode calculate compares, if the rate distortion costs of skip mode is littler than presetting first threshold, determine that then skip mode is the optimization model under the inter-frame forecast mode, otherwise, determine the optimization model under the inter-frame forecast mode all the other patterns under inter-frame forecast mode.
7. inter-frame mode choice device as claimed in claim 6 is characterized in that, described optimization model determination module also comprises:
Non-rate distortion costs computing unit is used to calculate the non-rate distortion costs of various patterns under the inter-frame mode;
Described optimization model determining unit is instructed the non-rate distortion costs of non-rate distortion costs computing unit computation schema 1, pattern 4, mode 7;
If the non-rate distortion costs of mode 7 is less than the non-rate distortion costs of pattern 4, and the non-rate distortion costs of pattern 4 is less than the non-rate distortion costs of pattern 1, then instructs the non-rate distortion costs of non-rate distortion costs computing unit computation schema 5 and pattern 6; And the pattern of non-rate distortion costs minimum in pattern 4, pattern 5, pattern 6, the mode 7 is defined as optimization model under the inter-frame forecast mode;
If the non-rate distortion costs of pattern 1 is less than the non-rate distortion costs of pattern 4, and the non-rate distortion costs of pattern 4 is less than the non-rate distortion costs of mode 7, then instructs the non-rate distortion costs of non-rate distortion costs computing unit computation schema 2 and mode 3; The pattern of non-rate distortion costs minimum in pattern 1, pattern 2, mode 3, the pattern 4 is defined as optimization model under the inter-frame forecast mode;
If the non-rate distortion costs of mode 7 is less than the non-rate distortion costs of pattern 1, and the non-rate distortion costs of pattern 1 is less than the non-rate distortion costs of pattern 4, then instructs the non-rate distortion costs of non-rate distortion costs computing unit computation schema 5 and pattern 6; If the non-rate distortion costs of mode 7 is less than the non-rate distortion costs of pattern 5, and the non-rate distortion costs of mode 7 then is defined as mode 7 need carry out the optimization model of estimation less than the non-rate distortion costs of pattern 6; Otherwise the non-rate distortion costs of computation schema 2 and mode 3 is defined as optimization model under the inter-frame forecast mode with pattern 1 pattern of non-rate distortion costs minimum to the mode 7;
If the non-rate distortion costs of pattern 1 is less than the non-rate distortion costs of mode 7, and the non-rate distortion costs of mode 7 is less than the non-rate distortion costs of pattern 4, then instructs the non-rate distortion costs of non-rate distortion costs computing unit computation schema 2 and mode 3; If the non-rate distortion costs of pattern 1 is less than the non-rate distortion costs of pattern 2, and the non-rate distortion costs of pattern 1 then is defined as pattern 1 need carry out the optimization model of estimation less than the non-rate distortion costs of mode 3; Otherwise the non-rate distortion costs of computation schema 5 and pattern 6 is defined as optimization model under the inter-frame forecast mode with pattern 1 pattern of non-rate distortion costs minimum to the mode 7;
If the discontented condition that is enough to of the magnitude relationship between the non-rate distortion costs of pattern 1, pattern 4 and mode 7, then instruct the non-rate distortion costs of non-rate distortion costs computing unit computation schema 2, mode 3, pattern 5 and pattern 6, pattern 1 pattern of non-rate distortion costs minimum to the mode 7 is defined as optimization model under the inter-frame forecast mode, wherein, 16 * 16 associative modes 1,16 * 8 associative modes 2,8 * 16 associative modes, 3,8 * 8 associative modes, 4,8 * 4 associative modes, 5,4 * 8 associative modes, 6,4 * 4 associative modes 7.
8. inter-frame mode choice device as claimed in claim 5 is characterized in that, described interframe encoding mode determination module comprises:
The second threshold calculations unit is used for the second threshold value T 2Initial value be set to 0, when definite intra prediction mode is interframe encoding mode, according to formula T 2=(T 2' n+C)/(n+1) upgrade T 2Value, T wherein 2' be illustrated in the present encoding pattern determine before T 2Value, n is illustrated in the present encoding pattern, and to select intra prediction mode before determining be the macro block number of interframe encoding mode, C is the rate distortion costs of current macroblock to be encoded;
The interframe encoding mode determining unit, be used for the rate distortion costs of described definite optimization model and second threshold value that the second threshold calculations unit calculates are compared, if the rate distortion costs of the optimization model under the described inter-frame forecast mode is littler than described second threshold value, determine that then described optimization model is an interframe encoding mode, otherwise, in the optimization model under optimization model under the intra prediction mode and the described inter-frame forecast mode, less one of rate distortion costs is defined as interframe encoding mode.
CN 200710179463 2007-12-13 2007-12-13 Method and apparatus for determining interframe encoding mode Expired - Fee Related CN101179728B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 200710179463 CN101179728B (en) 2007-12-13 2007-12-13 Method and apparatus for determining interframe encoding mode

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 200710179463 CN101179728B (en) 2007-12-13 2007-12-13 Method and apparatus for determining interframe encoding mode

Publications (2)

Publication Number Publication Date
CN101179728A CN101179728A (en) 2008-05-14
CN101179728B true CN101179728B (en) 2011-07-20

Family

ID=39405786

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 200710179463 Expired - Fee Related CN101179728B (en) 2007-12-13 2007-12-13 Method and apparatus for determining interframe encoding mode

Country Status (1)

Country Link
CN (1) CN101179728B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114513659A (en) * 2022-02-15 2022-05-17 北京百度网讯科技有限公司 Method, apparatus, electronic device and medium for determining picture prediction mode

Families Citing this family (21)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100596202C (en) * 2008-05-30 2010-03-24 四川虹微技术有限公司 Fast mode selection method in frame
CN101867818B (en) * 2008-06-06 2012-08-29 浙江大学 Selection method and device of macroblock mode
CN101873500B (en) * 2009-04-24 2012-05-23 华为技术有限公司 Interframe prediction encoding method, interframe prediction decoding method and equipment
CN101640802B (en) * 2009-08-28 2012-06-20 北京工业大学 Video inter-frame compression coding method based on macroblock features and statistical properties
CN102118615B (en) * 2010-01-05 2012-08-22 香港应用科技研究院有限公司 Video coding/decoding method adopting variable size block skipping mode and device
CN101969561B (en) * 2010-10-27 2016-03-30 北京中星微电子有限公司 A kind of intra-frame mode selection method, device and a kind of encoder
CN102186070B (en) * 2011-04-20 2013-06-05 北京工业大学 Method for realizing rapid video coding by adopting hierarchical structure anticipation
CN102364950B (en) * 2011-11-17 2014-09-10 武汉天喻信息产业股份有限公司 H.264/advanced video coding (AVC)-standard-based intra-frame prediction mode rapid selection method and device
CN103517077B (en) * 2012-12-14 2017-02-15 深圳百科信息技术有限公司 Method and device for rapidly selecting prediction mode
CN103929650B (en) * 2013-01-10 2017-04-12 乐金电子(中国)研究开发中心有限公司 Depth coding unit coding method and decoding method, encoder and decoder
CN103079068A (en) * 2013-01-14 2013-05-01 天津大学 Interframe mode judging method based on relevance between motion intensity and space domain
CN103384327A (en) * 2013-04-22 2013-11-06 张新安 AVS fast mode selection algorithm based on adaptive threshold
CN104601988B (en) * 2014-06-10 2018-02-02 腾讯科技(北京)有限公司 Video encoder, method and apparatus and its inter-frame mode selecting method and device
CN105578195B (en) * 2015-12-24 2019-03-12 福州瑞芯微电子股份有限公司 A kind of H.264 inter-frame prediction system
CN105578197B (en) * 2015-12-24 2019-04-30 福州瑞芯微电子股份有限公司 A kind of realization inter-prediction master control system
CN105721865A (en) * 2016-02-01 2016-06-29 同济大学 Fast decision algorithm for dividing HEVC inter-frame coding unit
CN105828084B (en) * 2016-03-30 2021-04-13 腾讯科技(深圳)有限公司 HEVC (high efficiency video coding) inter-frame coding processing method and device
CN106101701B (en) * 2016-08-08 2019-05-14 传线网络科技(上海)有限公司 Based on H.264 interframe encoding mode selection method and device
CN110351552B (en) * 2018-04-03 2021-06-25 杭州微帧信息科技有限公司 Fast coding method in video coding
CN112637591A (en) * 2020-12-11 2021-04-09 百果园技术(新加坡)有限公司 Method and device for video predictive coding
CN113573066A (en) * 2021-07-07 2021-10-29 网宿科技股份有限公司 Video coding method and device

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
牛宇,赵德斌.基于率失真代价的快速帧间编码模式确定算法.《哈尔滨商业大学学报(自然科学版)》.2005,第21卷(第5期),596-599. *
王宇.H.264/AVC可变尺寸帧间预测块模式决策研究.《微电子与计算机》.2006,第23卷(第3期),第4.1.2节. *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114513659A (en) * 2022-02-15 2022-05-17 北京百度网讯科技有限公司 Method, apparatus, electronic device and medium for determining picture prediction mode

Also Published As

Publication number Publication date
CN101179728A (en) 2008-05-14

Similar Documents

Publication Publication Date Title
CN101179728B (en) Method and apparatus for determining interframe encoding mode
JP5081305B2 (en) Method and apparatus for interframe predictive coding
US10148947B2 (en) Method and device for determining parameters for encoding or decoding of an image of a video sequence
CN114009040B (en) Encoder, decoder and corresponding methods
CN102835111B (en) The motion vector of previous block is used as the motion vector of current block, image to be carried out to the method and apparatus of coding/decoding
CN102833532B (en) For to the method for digital coding video data and digital video encoder system
CN102883159A (en) High precision edge prediction for intracoding
CN103124353A (en) Motion prediction method and video coding method
WO2014173092A1 (en) Image prediction coding method and image coder
CN111698500B (en) Encoding and decoding method, device and equipment
CN102932642A (en) Interframe coding quick mode selection method
CN113491132B (en) Video image decoding method, video image encoding method, video image decoding device, video image encoding device, and readable storage medium
CN115348442A (en) Motion information determination method, device and equipment
CN102742270B (en) For the method and apparatus of the improvement of sub pixel interpolation
EP1784984A1 (en) Fast motion estimation for multiple reference pictures
CN113163207B (en) Encoding and decoding method, device and equipment
US20180027256A1 (en) Video encoding device, video encoding method, and video encoding program
CN101977317B (en) Intra-frame prediction method and device
CN101626505B (en) Mode processing method and device thereof of duplex-prediction
CN110662074B (en) Motion vector determination method and device
CN108259899A (en) Video encoder and method, video decoding apparatus and method
CN111510726A (en) Coding and decoding method and equipment thereof
CN117376551B (en) Video coding acceleration method and electronic equipment
CN112055220B (en) Encoding and decoding method, device and equipment
CN110691247B (en) Decoding and encoding method and device

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: 20110720

Termination date: 20111213