CN101426140B - AVS fast schema selection method and device - Google Patents

AVS fast schema selection method and device Download PDF

Info

Publication number
CN101426140B
CN101426140B CN 200810175241 CN200810175241A CN101426140B CN 101426140 B CN101426140 B CN 101426140B CN 200810175241 CN200810175241 CN 200810175241 CN 200810175241 A CN200810175241 A CN 200810175241A CN 101426140 B CN101426140 B CN 101426140B
Authority
CN
China
Prior art keywords
current macro
pattern
lectotype
rate distortion
distortion costs
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN 200810175241
Other languages
Chinese (zh)
Other versions
CN101426140A (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.)
Qingdao Hisense Electronic Industry Holdings Co Ltd
Original Assignee
Qingdao Hisense Electronic Industry Holdings Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Qingdao Hisense Electronic Industry Holdings Co Ltd filed Critical Qingdao Hisense Electronic Industry Holdings Co Ltd
Priority to CN 200810175241 priority Critical patent/CN101426140B/en
Publication of CN101426140A publication Critical patent/CN101426140A/en
Application granted granted Critical
Publication of CN101426140B publication Critical patent/CN101426140B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The present invention discloses an AVS fast mode selection method and device, relating to the field of video encoding, which can significantly improve the coding speed simultaneously guarantee the encoding rate distortion performance, and can obtain better encoding results specifically to image sequences having intense movement and complex texture. The technical scheme provided by the invention includes: dividing the candidate models of the current macro-block into sets including a preference mode set, a secondary mode set, and a post-election mode set; searching in the preference mode set, the secondary mode set, and the post-election mode set in sequence, and selecting an optimum mode for coding the current macro block. The invention is applicable to occasion for performing video coding.

Description

A kind of AVS fast schema selection method and device
Technical field
The present invention relates to field of video encoding, relate in particular to a kind of AVS fast schema selection method and device.
Background technology
Along with the development of digital video technology, many digital audio/video compression standards have appearred in recent years in the world.AVS (Audio Video Coding Standard) is that China independently formulates, and has the audio/video encoding standard of independent intellectual property right.
The AVS video standard has adopted a series of technology to reach high efficiency video coding, comprises infra-frame prediction, inter prediction, transform and quantization, entropy coding etc.Inter prediction uses the redundancy between block-based motion vector removal of images; Redundancy in the infra-frame prediction usage space predictive mode removal of images; Again by prediction residual being carried out the visual redundancy in the transform and quantization removal of images; At last, motion vector, predictive mode, quantization parameter and conversion coefficient compress with entropy coding, to eliminate the coding codeword redundancy.The performance height of AVS video standard, algorithm complex are low, under the code check situation suitable with PSNR, the coding rate of AVS be H.264 more than 4 times.
In the AVS video standard, the P frame there are 5 kinds of inter-frame forecast modes, comprise (SKIP), Inter16 * 16, Inter 16 * 8, Inter 8 * 16, Inter 8 * 8 patterns skipped; Infra-frame prediction is a unit with 8 * 8 luminance block and chrominance block, has defined 5 kind of 8 * 8 luminance block predictive mode and 4 kind of 8 * 8 chroma block prediction modes respectively.The model selection strategy that AVS adopts rate distortion costs (RDO) to optimize has improved code efficiency and picture quality, has obtained best distortion performance.But when carrying out model selection, owing to need carry out the calculating of rate distortion costs to each possible macro block mode, the encoder computation complexity is excessive, has expended most scramble times, is unfavorable for the practical application of encoder.
Publication number is the Chinese patent application of CN 101159873A, a kind of inter-frame mode selecting method is disclosed, this method adopts identical mode selecting method to the macro block that is in the same type area after utilizing pixel value difference each macro block belongs to different zones in present frame.When this method utilizes pixel value to carry out area dividing, the amount of calculation more complicated, amount of calculation is big; And mainly considered the correlation in space, do not taken into full account the temporal correlation between the image sequence, to there being the image sequence coding poor effect of strenuous exercise, coding efficiency remains to be improved especially.
Summary of the invention
In order to solve problems of the prior art, embodiments of the invention provide AVS fast schema selection method and device, can be when guaranteeing the encoding rate distortion performance, significantly improve coding rate, especially for the image sequence that has strenuous exercise and complex texture, the embodiment of the invention also can obtain preferable coding effect.
For achieving the above object, embodiments of the invention adopt following technical scheme:
A kind of AVS fast schema selection method, described method comprises:
Corresponding macroblock encoding pattern according to current macro in the consecutive frame of present frame, the candidate pattern of described current macro is divided into the set that comprises preferred mode set, the set of inferior lectotype and back lectotype set, and described consecutive frame comprises the coded frame adjacent with described present frame; Search in described preferred mode set, the set of inferior lectotype and back lectotype set successively, the optimal mode that selection is encoded to current macro specifically comprises:
Step 1: in the preferred mode set, calculate the rate distortion costs of current macro under every kind of pattern in order, if described rate distortion costs less than threshold value T1, enters step 3, otherwise, enter step 2;
Step 2: in inferior lectotype set, calculate the rate distortion costs of current macro under every kind of pattern in order, if described rate distortion costs less than threshold value T1, enters step 3, otherwise, enter step 4;
Step 3: whether more described rate distortion costs less than threshold value T1 less than threshold value T2, if the pattern of then described rate distortion costs correspondence is the optimal mode that current macro is encoded, otherwise, enter step 4;
Step 4: in the lectotype set of back, calculate the rate distortion costs of current macro under every kind of pattern in order,
The rate distortion costs that calculates in the rate distortion costs of the minimum that will calculate in the lectotype set of back and step 2 or the step 3 compares, with wherein minimum value corresponding codes pattern as the optimal mode that current macro is encoded.
Wherein, with the described present frame adjacent former frame of the consecutive frame of described present frame for having encoded according to coded sequence, the corresponding macro block of described current macro is a macro block identical with the current macro position in the described consecutive frame.
Further, the back lectotype set of described current macro comprises all frame modes;
According to statistical law, determine described current macro preferred mode set and time lectotype set according to described corresponding macroblock encoding pattern, wherein,
Corresponding macroblock encoding pattern is the Skip coding mode, and then the set of the preferred mode of described current macro comprises the Skip pattern, and inferior lectotype set comprises Inter16 * 16, Inter 16 * 8, Inter 8 * 16, Inter 8 * 8 patterns;
Corresponding macroblock encoding pattern is Inter16 * 16 coding modes, and then the set of the preferred mode of described current macro comprises Skip, Inter16 * 16 patterns, and inferior lectotype set comprises Inter 16 * 8, Inter 8 * 16, Inter8 * 8 patterns;
Corresponding macroblock encoding pattern is Inter 16 * 8 coding modes, and then the set of the preferred mode of described current macro comprises Skip, Inter16 * 16, Inter 16 * 8 patterns, and inferior lectotype set comprises Inter 8 * 16, Inter 8 * 8 patterns;
Corresponding macroblock encoding pattern is Inter 8 * 16 coding modes, and then the set of the preferred mode of described current macro comprises Skip, Inter16 * 16, Inter 8 * 16 patterns, and inferior lectotype set comprises Inter 16 * 8, Inter 8 * 8 patterns;
Corresponding macroblock encoding pattern is Inter 8 * 8 coding modes or intra-frame encoding mode, and then the set of the preferred mode of described current macro comprises all inter-frame modes, and inferior lectotype set is for empty.
A kind of AVS quick mode choice device comprises:
Candidate pattern set division unit, be used for corresponding macroblock encoding pattern according to the consecutive frame current macro of present frame, the candidate pattern of described current macro is divided the set that comprises preferred mode set, the set of inferior lectotype and back lectotype set, and described consecutive frame comprises the coded frame adjacent with described present frame;
The forced coding mode selecting unit is used for searching in described preferred mode set, the set of inferior lectotype and back lectotype set successively, selects the optimal mode that current macro is encoded.
Wherein, described forced coding mode selecting unit comprises:
First search module is used for calculating the rate distortion costs of current macro under every kind of pattern in order in the preferred mode set, if described rate distortion costs less than threshold value T1, is carried out the processing of the 3rd search module, otherwise, carry out the processing of second search module;
Second search module is used for calculating the rate distortion costs of current macro under every kind of pattern in order in inferior lectotype set, if described rate distortion costs less than threshold value T1, is carried out the processing of the 3rd search module, otherwise, carry out the processing of the 4th search module;
Whether the 3rd search module is used for more described rate distortion costs less than threshold value T1 less than threshold value T2, if the pattern of then described rate distortion costs correspondence is the optimal mode that current macro is encoded, otherwise, carry out the processing of the 4th search module;
The 4th search module, be used in back lectotype set, calculate the rate distortion costs of current macro under every kind of pattern in order, the rate distortion costs that calculates in the rate distortion costs of the minimum that will calculate in the lectotype set of back and second search module or the 3rd search module compares, with wherein minimum value corresponding codes pattern as the optimal mode that current macro is encoded.
The technical scheme that the embodiment of the invention provides, consider the relativity of time domain between the adjacent image in the image sequence, the set of the candidate pattern of each macro block of present frame changes adaptively, improved the adaptivity of the image sequence of unlike signal characteristic being carried out model selection, solve problems of the prior art, can be when guaranteeing the encoding rate distortion performance, significantly improve coding rate, especially for the image sequence that has strenuous exercise and complex texture, the embodiment of the invention also can obtain preferable coding effect.
Description of drawings
The AVS fast schema selection method principle schematic that Fig. 1 provides for the embodiment of the invention one;
The AVS fast schema selection method flow chart that Fig. 2 provides for the embodiment of the invention one;
The AVS quick mode choice device structural representation that Fig. 3 provides for the embodiment of the invention two.
Embodiment
In order to be illustrated more clearly in the technical scheme of the embodiment of the invention, below in conjunction with accompanying drawing embodiments of the invention are described in detail, following description only is some embodiments of the present invention, for those of ordinary skills, under the prerequisite of not paying creative work, can also obtain other execution mode of the present invention according to these embodiment.
The technical scheme that the embodiment of the invention provides, mainly based on the characteristic of video sequence itself, for the sequence (comprising the sequence that has strenuous exercise and complex texture) of unlike signal characteristic, can both under the prerequisite that guarantees the encoding rate distortion performance, significantly improve coding rate.Below the key technology in the embodiment of the invention one is described.
A kind of AVS fast schema selection method, as shown in Figure 1, described method comprises:
Step 111:, the candidate pattern of described current macro is divided the set that comprises preferred mode set, the set of inferior lectotype and back lectotype set according to the corresponding macroblock encoding pattern of current macro in the consecutive frame of present frame;
Step 112: in described preferred mode set, the set of inferior lectotype and back lectotype set, search for successively, select the optimal mode that current macro is encoded.
At first, the embodiment of the invention one is based on statistical law, forced coding pattern according to the corresponding macro block of current macro, the candidate pattern of current macro all possible options dynamically is divided into three set, comprise preferred mode set, the set of inferior lectotype and back lectotype set, represent with S set 1, S2, S3 respectively, corresponding macroblock encoding pattern according to current macro, preferentially in S set 1, search for, wherein, S1 mainly comprises first-selected inter-frame mode, and S2 mainly comprises time inter-frame mode of choosing, and S3 comprises all frame modes.
Owing to have very strong correlation between two adjacent images in the video sequence, particularly for the not too violent sequence of motion, current macro forced coding pattern is inevitable to have very big relation with the forced coding pattern of its correspondence position macro block (back is referred to as corresponding macro block) on last adjacent image.Be that example describes mainly in embodiments of the present invention, but associated description can be suitable for the situation with the B frame with the P frame.Preferably, in the described present frame adjacent former frame of consecutive frame for having encoded according to coded sequence of present frame described in the embodiment of the invention one, the corresponding macro block of described current macro is a macro block identical with the current macro position in the described consecutive frame.But be not limited thereto, described consecutive frame can be adjacent some frames of having encoded of present frame, for example, and front cross frame, preceding four frames etc.; Described corresponding macro block can be, the adjacent macroblocks of the macro block identical with the current macro position in the consecutive frame.Below in conjunction with statistics, the advantage of this set dividing mode of the present invention is described.Table 1 is the current macro probability statistics table identical with its corresponding macro-block coding pattern.
Table 1
Figure GSB00000254892000061
As can be seen, corresponding macro block is under the situation of Skip pattern, the current macro pattern is that the probability of Skip pattern reaches 57.42%, corresponding macro block is under the situation of 16x16 pattern, the current macro pattern is that the probability of Skip or 16x16 has reached 62.14%, and corresponding macro block mode is under the situation of Inter16x8 and Inter8x16 similar result to be arranged also.Therefore, in the embodiment of the invention one, preferred, corresponding macro block is under the different coding pattern, and choosing of the preferred mode S set 1 of current macro is as shown in table 2, is divided into 5 kinds of situations according to corresponding macroblock encoding pattern difference.
Preference pattern in table 2 S set 1
Figure GSB00000254892000062
The candidate pattern that the inferior lectotype S set 2 of current macro comprises is remaining inter-frame mode outside the S set 1 of current macro correspondence.Promptly when corresponding macroblock encoding pattern was respectively Skip, Inter16 * 16, Inter16 * 8, Inter 8 * 16, Inter 8 * 8, the candidate pattern that comprises in the preferred mode set of current macro and time lectotype set was respectively:
Corresponding macro-block coding pattern is the Skip coding mode, and the preferred mode set of current macro comprises the Skip pattern, and inferior lectotype set comprises Inter16 * 16, Inter 16 * 8, Inter 8 * 16, Inter 8 * 8 patterns;
Corresponding macro-block coding pattern is Inter16 * 16 coding modes, and the preferred mode set of current macro comprises Skip, Inter16 * 16 patterns, and inferior lectotype set comprises Inter 16 * 8, Inter 8 * 16, Inter 8 * 8 patterns;
Corresponding macro-block coding pattern is Inter 16 * 8 coding modes, and the preferred mode set of current macro comprises Skip, Inter16 * 16, Inter 16 * 8 patterns, and inferior lectotype set comprises Inter 8 * 16, Inter 8 * 8 patterns;
Corresponding macro-block coding pattern is Inter 8 * 16 coding modes, and the preferred mode set of current macro comprises Skip, Inter16 * 16, Inter 8 * 16 patterns, and inferior lectotype set comprises Inter 16 * 8, Inter 8 * 8 patterns;
Corresponding macro-block coding pattern is I nter 8 * 8 coding modes or intra-frame encoding mode, and the preferred mode set of current macro comprises all inter-frame modes, and inferior lectotype set is for empty.
No matter which kind of pattern is the pattern of current macro correspondence be, the back lectotype set of current macro comprises all frame modes.
Above-mentioned having provided in the former frame that corresponding macro block is a present frame, the situation of the macro block identical with the current macro position, but be not limited thereto, when the consecutive frame as the model selection reference comprises a plurality of frames, corresponding macro block is under a plurality of situation, can make statistics to the identical macroblock encoding pattern in position, makes the coding mode histogram, with the amplitude of histogram maximum forced coding pattern, determine the forced coding pattern of current macro with the forced coding pattern of all corresponding macro blocks as this macro block.
Determined in S1, S2, S3, to search for the forced coding pattern of current macro respectively successively after the candidate pattern in preferred mode set, the set of inferior lectotype and the back lectotype set, this concrete searching method has been described below in conjunction with Fig. 2.
Step 112: search in described preferred mode set, the set of inferior lectotype and back lectotype set successively, the optimal mode that selection is encoded to current macro as shown in Figure 2, specifically can comprise:
Step 1): in the preferred mode set, calculate the rate distortion costs of current macro under every kind of pattern in order, if described rate distortion costs less than threshold value T1, enters step 3), otherwise, enter step 2);
With the P frame is that example describes, if present frame is image sets (Group ofPictures, GOP) first P image in, do not adopt the I image or the B image of this frame front that the coding mode of current macro is predicted, current macro is made prediction and calculation rate distortion cost under all coding modes, with the coding mode of rate distortion costs minimum forced coding pattern as current macro.
If current P frame is not first P image in the image sets, at first in the preferred mode S set 1 of current macro, in order each pattern is carried out estimation, calculate the rate distortion costs of current macro under this kind pattern, if the rate distortion costs under this pattern is less than threshold value T1, then end step 1) in search procedure, enter step 3), otherwise, enter step 2);
Because for the macro block of two continuous on time domain same positions, if exercise intensity increases, then the rate distortion costs J of macro block also increases, J has reflected the exercise intensity of macro block to a certain extent.If the rate distortion costs J of macro block in the rate distortion costs of corresponding macro block under optimal mode on the last adjacent image, illustrates then that the exercise intensity of macro block is lower than its corresponding macro block less than it, the macro block optimal mode is that the probability of pattern in the S set 1 is very high so.Therefore, in embodiments of the present invention, described threshold value T1 gets the rate distortion costs value of corresponding macro block under optimal mode of current macro.
Wherein, it is more that the Inter8x8 pattern is fit to details, and motion is than the complex image zone.Than big block mode, this pattern can obtain better inter prediction precision, also needs more motion search process simultaneously, consumes more time.Do not need further careful piece to divide if can judge macro block in advance, thereby in the process of estimation and model selection, directly skip traversal, then can effectively reduce the scramble time this pattern.
Because the trend that macro block rate distortion costs under each pattern increases or reduces should be consistent with the trend of mode division.If macro block simultaneously less than its rate distortion costs under pattern Inter16x8 and Inter 8x16, illustrates then that macro block has not all further carried out necessity of piece division in the horizontal direction with on the vertical direction in the rate distortion costs under the pattern Inter 16x16.In this case, the embodiment of the invention once in skip calculating to the estimation and the rate distortion costs of Inter8x8 pattern, directly carry out the processing of next pattern.
Step 2): in inferior lectotype set, calculate the rate distortion costs of current macro under every kind of pattern in order, if described rate distortion costs less than threshold value T1, enters step 3), otherwise, enter step 4);
In the inferior lectotype S set 2 of current macro, in order each pattern is carried out estimation, calculate the rate distortion costs of current macro under this kind pattern, if the rate distortion costs under this pattern is less than threshold value T1, then end step 2) in search procedure, enter step 3), otherwise, step 4) entered.
Wherein, the Inter 8x8 pattern that satisfies condition has also been adopted the processing mode of skipping, concrete grammar can be referring to step 1).
Step 3): whether more described rate distortion costs less than threshold value T1 less than threshold value T2, if the pattern of then described rate distortion costs correspondence is the optimal mode that current macro is encoded, otherwise, enter step 4);
For the macro block on the inter frame image, select the probability of frame mode very low, generally occur in scene and switch or the violent occasion of moving.And the amount of calculation of frame mode is very large, select the combination of optimum frame inner estimation mode to every kind of intra prediction mode combination calculation rate distortion costs, compares with best inter mode again.
For fear of unnecessary infra-frame prediction, the present invention has taked that the mechanism of selecting the skipped frame internal schema is arranged, those are met the condition of ending in advance in the inter-frame mode selection course, the macro block of end frame inter mode selection in advance carries out the prediction of frame mode selectively, if promptly the rate distortion costs of macro block under best inter mode is less than threshold value T2, then skip the processing to frame mode, end mode is selected, and best inter mode is exactly a macro block forced coding pattern.
Wherein, described threshold value T2 is the dynamic parameter of a continual renovation, and is preferred, in the embodiment of the invention one, described threshold value T2 gets the current macro mean value of all inter-coded macroblocks rate distortion costs before, and initial value is the mean value of all macro block rate distortion costs on first I image.
When a macroblock encoding mode is frame mode, need upgrade threshold value T2.Threshold value T2 is along with the generation of intra-frame macro block is brought in constant renewal in, and the process of renewal can be as the formula (1)
T 2 ′ = J + T 2 × n n + 1 - - - ( 1 )
Wherein, J is the rate distortion costs of current employing inter-coded macroblocks, n be before the number of intra-frame macro block, T2 ' is the threshold value T2 after upgrading.Run into the I image, T2 and n are reset to 0.
Step 4): in the lectotype set of back, calculate the rate distortion costs of current macro under every kind of pattern in order,
The rate distortion costs and the step 2 of the minimum that will in the lectotype set of back, calculate) or step 3) in the rate distortion costs that calculates compare, with wherein minimum value corresponding codes pattern as the optimal mode that current macro is encoded.
Further specify the beneficial effect of the technical scheme that the embodiment of the invention provides below in conjunction with experimental result.
The embodiment of the invention adopts the test platform of the reference model rm52j of AVS1-P2 as fast algorithm, experiment parameter is provided with as follows: the cycle tests (football of the cif form of (1) 6 typical different motion characteristic and texture features, tempete, foreman, mobile, new, paris), frame per second 30f/s, wherein, football and tempete 250 frames of encoding, other sequential coding 300 frames; (2) coding structure is IPPP, and per second inserts two I frames; (3) reference picture is 2 frames; (4) use the Hadamard conversion; (5) utilization rate aberration optimizing; (6) use loop filtering; (7) fast motion estimation, hunting zone are 32 pixels; (8) quantization parameter gets 28,32, and 36 and 40.
Table 3 has been listed the quick mode selection algorithm of embodiment of the invention proposition and the algorithm coding property comparison result among the reference model rm52j.Δ PSNR, Δ BitRate, Δ Time represent that respectively the quick mode selection algorithm of embodiment of the invention proposition is with respect to variation, the code check percentage change of the algorithm Y-PSNR among the rm52j and the time percentage change of always encoding, wherein, Y, U, V represent the variation of the Y-PSNR of luminance component and two chromatic components respectively.AVG represents the mean value of same sequence under different quantization parameters, and Average represents the mean value of all cycle testss, and positive number is represented to increase, and negative number representation reduces.
Table 3 coding efficiency contrast table
Figure GSB00000254892000101
From experimental data as can be seen, the fast schema selection method that the embodiment of the invention provides reduces in the 0.04dB in the mean flow rate signal to noise ratio, the average chrominance signal to noise ratio is almost constant, and average output bit rate increases by 0.6% with under the interior situation, and coding rate has on average improved 34.8%.
As can be seen from Table 3, to the sequence of different motion characteristic and texture features, adopt fast schema selection method on coding efficiency, all to be significantly improved.To news and the relatively-stationary sequence of this background of paris, the precision that quick mode is selected is the highest, coding rate increase rate maximum, and low code check has been issued to more than 41%; Mobile and these texture-rich of tempete and prospect and background are all had the sequence of compound movement, and the coding rate increase rate is slightly little, but also more than 32%.For the football and the foreman that whole strenuous exercise and head strenuous exercise are arranged respectively and exist scene to switch, the brightness signal to noise ratio of fast algorithm reduces more obvious relatively.
From the above mentioned, the AVS quick mode selection algorithm that the embodiment of the invention one provides has utilized the correlation of time domain adjacent macroblocks, promptly predicts the pattern that the current macro possibility is bigger according to the optimal mode of the corresponding macro block of current macro.In addition, adopted the processing mode of carrying out the prediction of Inter8x8 pattern and frame mode selectively, the technical scheme that the embodiment of the invention one provides, consider the relativity of time domain between the adjacent image in the image sequence, the set of the candidate pattern of each macro block of present frame changes adaptively, improved the adaptivity of the image sequence of unlike signal characteristic being carried out model selection, solve problems of the prior art, can be when guaranteeing the encoding rate distortion performance, significantly improve coding rate, especially for the image sequence that has strenuous exercise and complex texture, the embodiment of the invention also can obtain preferable coding effect.
The embodiment of the invention two provides a kind of AVS quick mode choice device, and as shown in Figure 3, this device comprises:
Candidate pattern set division unit 31 is used for the corresponding macroblock encoding pattern according to the consecutive frame current macro of present frame, the candidate pattern of described current macro is divided into the set that comprises preferred mode set, the set of inferior lectotype and back lectotype set;
Forced coding mode selecting unit 32 is used for searching in described preferred mode set, the set of inferior lectotype and back lectotype set successively, selects the optimal mode that current macro is encoded.
Wherein, candidate pattern set division unit 31 is based on statistical law, forced coding pattern according to the corresponding macro block of current macro, the candidate pattern of current macro all possible options dynamically is divided into three set, comprise preferred mode set, the set of inferior lectotype and back lectotype set, when corresponding macroblock encoding pattern was respectively Skip, Inter16 * 16, Inter 16 * 8, Inter 8 * 16, Inter 8 * 8, the candidate pattern that comprises in the preferred mode set of current macro and time lectotype set was respectively:
Corresponding macro-block coding pattern is the Skip coding mode, and the preferred mode set of current macro comprises the Skip pattern, and inferior lectotype set comprises Inter16 * 16, Inter 16 * 8, Inter 8 * 16, Inter 8 * 8 patterns;
Corresponding macro-block coding pattern is Inter16 * 16 coding modes, and the preferred mode set of current macro comprises Skip, Inter16 * 16 patterns, and inferior lectotype set comprises Inter 16 * 8, Inter 8 * 16, Inter 8 * 8 patterns;
Corresponding macro-block coding pattern is Inter 16 * 8 coding modes, and the preferred mode set of current macro comprises Skip, Inter16 * 16, Inter 16 * 8 patterns, and inferior lectotype set comprises Inter 8 * 16, Inter 8 * 8 patterns;
Corresponding macro-block coding pattern is Inter 8 * 16 coding modes, and the preferred mode set of current macro comprises Skip, Inter16 * 16, Inter 8 * 16 patterns, and inferior lectotype set comprises Inter 16 * 8, Inter 8 * 8 patterns;
Corresponding macro-block coding pattern is I nter 8 * 8 coding modes or intra-frame encoding mode, and the preferred mode set of current macro comprises all inter-frame modes, and inferior lectotype set is for empty.
No matter which kind of pattern is the pattern of current macro correspondence be, the back lectotype set of current macro comprises all frame modes.
Wherein, described forced coding mode selecting unit 32 comprises search module, and this search module is used to carry out following step:
Step 1: in the preferred mode set, calculate the rate distortion costs of current macro under every kind of pattern in order, if described rate distortion costs less than threshold value T1, enters step 3, otherwise, enter step 2;
Step 2: in inferior lectotype set, calculate the rate distortion costs of current macro under every kind of pattern in order, if described rate distortion costs less than threshold value T1, enters step 3, otherwise, enter step 4;
Step 3: whether more described rate distortion costs less than threshold value T1 less than threshold value T2, if the pattern of then described rate distortion costs correspondence is the optimal mode that current macro is encoded, otherwise, enter step 4;
Step 4: in the lectotype set of back, calculate the rate distortion costs of current macro under every kind of pattern in order,
The rate distortion costs that calculates in the rate distortion costs of the minimum that will calculate in the lectotype set of back and step 2 or the step 3 compares, with wherein minimum value corresponding codes pattern as the optimal mode that current macro is encoded.
The concrete working method of each functional module can be referring to method embodiment of the present invention among apparatus of the present invention embodiment.
The technical scheme that the embodiment of the invention two provides, consider the relativity of time domain between the adjacent image in the image sequence, the set of the candidate pattern of each macro block of present frame changes adaptively, improved the adaptivity of the image sequence of unlike signal characteristic being carried out model selection, solve problems of the prior art, can be when guaranteeing the encoding rate distortion performance, significantly improve coding rate, especially for the image sequence that has strenuous exercise and complex texture, the embodiment of the invention also can obtain preferable coding effect.
One of ordinary skill in the art will appreciate that all or part of step that realizes in the foregoing description, can finish by the program command related hardware.The software of described embodiment correspondence can be stored in a computer and can store in the medium that reads.
The above; only be the specific embodiment of the present invention, but protection scope of the present invention is not limited thereto, anyly is familiar with those skilled in the art in the technical scope that the present invention discloses; can expect easily changing or replacing, all should be encompassed within protection scope of the present invention.Therefore, protection scope of the present invention should be as the criterion with the protection range of claim.

Claims (8)

1. an AVS fast schema selection method is characterized in that, described method comprises:
Corresponding macroblock encoding pattern according to current macro in the consecutive frame of present frame, the candidate pattern of described current macro is divided into the set that comprises preferred mode set, the set of inferior lectotype and back lectotype set, and described consecutive frame comprises the coded frame adjacent with described present frame;
Utilize following steps in described preferred mode set, the set of inferior lectotype and back lectotype set, to search for successively, select the optimal mode that current macro is encoded:
Step 1: in the preferred mode set, calculate the rate distortion costs of current macro under every kind of pattern in order, if described rate distortion costs less than threshold value T1, enters step 3, otherwise, enter step 2;
Step 2: in inferior lectotype set, calculate the rate distortion costs of current macro under every kind of pattern in order, if described rate distortion costs less than threshold value T1, enters step 3, otherwise, enter step 4;
Step 3: whether more described rate distortion costs less than threshold value T1 less than threshold value T2, if the pattern of then described rate distortion costs correspondence is the optimal mode that current macro is encoded, otherwise, enter step 4;
Step 4: in the lectotype set of back, calculate the rate distortion costs of current macro under every kind of pattern in order, the rate distortion costs that calculates in the rate distortion costs of the minimum that will calculate in the lectotype set of back and step 2 or the step 3 compares, with wherein minimum value corresponding codes pattern as the optimal mode that current macro is encoded.
2. AVS fast schema selection method according to claim 1, it is characterized in that, with the described present frame adjacent former frame of the consecutive frame of described present frame for having encoded according to coded sequence, the corresponding macro block of described current macro is a macro block identical with the current macro position in the described consecutive frame.
3. AVS fast schema selection method according to claim 1, it is characterized in that, described corresponding macroblock encoding pattern according to current macro in the consecutive frame of present frame is divided into the set that comprises preferred mode set, the set of inferior lectotype and back lectotype set with the candidate pattern of described current macro and comprises:
The back lectotype set of described current macro comprises all frame modes; According to statistical law, determine described current macro preferred mode set and time lectotype set according to described corresponding macroblock encoding pattern, wherein,
Corresponding macroblock encoding pattern is the Skip coding mode, and then the set of the preferred mode of described current macro comprises the Skip pattern, and inferior lectotype set comprises Inter16 * 16, Inter16 * 8, Inter8 * 16, Inter8 * 8 patterns;
Corresponding macroblock encoding pattern is Inter16 * 16 coding modes, and then the set of the preferred mode of described current macro comprises Skip, Inter16 * 16 patterns, and inferior lectotype set comprises Inter16 * 8, Inter8 * 16, Inter8 * 8 patterns;
Corresponding macroblock encoding pattern is Inter16 * 8 coding modes, and then the set of the preferred mode of described current macro comprises Skip, Inter16 * 16, Inter16 * 8 patterns, and inferior lectotype set comprises Inter8 * 16, Inter8 * 8 patterns;
Corresponding macroblock encoding pattern is Inter8 * 16 coding modes, and then the set of the preferred mode of described current macro comprises Skip, Inter16 * 16, Inter8 * 16 patterns, and inferior lectotype set comprises Inter16 * 8, Inter8 * 8 patterns;
Corresponding macroblock encoding pattern is Inter8 * 8 coding modes or intra-frame encoding mode, and then the set of the preferred mode of described current macro comprises all inter-frame modes, and inferior lectotype set is for empty.
4. AVS fast schema selection method according to claim 1, it is characterized in that, in described step 1 to step 3, when needs calculated the rate distortion costs of current macro under Inter 8 * 8 coding modes, described method also comprised before the rate distortion costs of calculating current macro under Inter 8 * 8 coding modes:
Judge current macro in the rate distortion costs under Inter 16 * 16 patterns whether less than its rate distortion costs under Inter 16 * 8 patterns and Inter 8 * 16 patterns, if skip the prediction under Inter 8 * 8 coding modes.
5. AVS fast schema selection method according to claim 4 is characterized in that, comprising:
Described threshold value T1 is the rate distortion costs value of described corresponding macro block under its coding mode.
6. AVS fast schema selection method according to claim 4 is characterized in that, comprising:
Described threshold value T2 is in the image sequence group at current macro place, the rate distortion costs mean value of all macro blocks of having encoded according to frame mode, described threshold value T2 is a dynamic parameter, when a macroblock encoding mode is frame mode, T2 upgrades to threshold value, and the mode of dynamically updating of described threshold value T2 is:
Figure FSB00000254891900021
In the formula, T2 is the threshold value before upgrading, and T2 ' is the threshold value T2 after upgrading, and J is the rate distortion costs of current employing inter-coded macroblocks, and n be the number of inter-coded macroblocks before.
7. AVS fast schema selection method according to claim 4 is characterized in that, present frame is first P frame in the image sets, and this method also comprises:
By the macro block in described first P frame being done the prediction under all coding modes, select the forced coding pattern of macro block in this frame.
8. an AVS quick mode choice device is characterized in that, comprising:
Candidate pattern set division unit, be used for corresponding macroblock encoding pattern according to the consecutive frame current macro of present frame, the candidate pattern of described current macro is divided into the set that comprises preferred mode set, the set of inferior lectotype and back lectotype set, and described consecutive frame comprises the coded frame adjacent with described present frame;
The forced coding mode selecting unit is used for searching in described preferred mode set, the set of inferior lectotype and back lectotype set successively, selects the optimal mode that current macro is encoded;
Wherein, described forced coding mode selecting unit comprises:
First search module is used for calculating the rate distortion costs of current macro under every kind of pattern in order in the preferred mode set, if described rate distortion costs less than threshold value T1, is carried out the processing of the 3rd search module, otherwise, carry out the processing of second search module;
Second search module is used for calculating the rate distortion costs of current macro under every kind of pattern in order in inferior lectotype set, if described rate distortion costs less than threshold value T1, is carried out the processing of the 3rd search module, otherwise, carry out the processing of the 4th search module;
Whether the 3rd search module is used for more described rate distortion costs less than threshold value T1 less than threshold value T2, if the pattern of then described rate distortion costs correspondence is the optimal mode that current macro is encoded, otherwise, carry out the processing of the 4th search module;
The 4th search module, be used in back lectotype set, calculate the rate distortion costs of current macro under every kind of pattern in order, the rate distortion costs that calculates in the rate distortion costs of the minimum that will calculate in the lectotype set of back and second search module or the 3rd search module compares, with wherein minimum value corresponding codes pattern as the optimal mode that current macro is encoded.
CN 200810175241 2008-11-06 2008-11-06 AVS fast schema selection method and device Active CN101426140B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 200810175241 CN101426140B (en) 2008-11-06 2008-11-06 AVS fast schema selection method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 200810175241 CN101426140B (en) 2008-11-06 2008-11-06 AVS fast schema selection method and device

Publications (2)

Publication Number Publication Date
CN101426140A CN101426140A (en) 2009-05-06
CN101426140B true CN101426140B (en) 2011-03-23

Family

ID=40616433

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 200810175241 Active CN101426140B (en) 2008-11-06 2008-11-06 AVS fast schema selection method and device

Country Status (1)

Country Link
CN (1) CN101426140B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106937122B (en) * 2010-10-28 2020-03-27 韩国电子通信研究院 Video decoding method
CN102438146B (en) * 2011-12-05 2014-04-30 晶门科技(深圳)有限公司 Method for improving video quality and implementing device thereof
CN102932642B (en) * 2012-11-13 2015-06-24 北京大学 Interframe coding quick mode selection method
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
CN110290388B (en) * 2019-06-17 2021-07-13 浙江大华技术股份有限公司 Intra-frame prediction method, video encoding method, computer device and storage device

Also Published As

Publication number Publication date
CN101426140A (en) 2009-05-06

Similar Documents

Publication Publication Date Title
CN101640802B (en) Video inter-frame compression coding method based on macroblock features and statistical properties
CN102186070B (en) Method for realizing rapid video coding by adopting hierarchical structure anticipation
CN101426140B (en) AVS fast schema selection method and device
CN102648627B (en) Speedup techniques for rate distortion optimized quantization
CN100551025C (en) Macroblock coding method and encoder
CN101815215B (en) Selecting method for coding mode and a device thereof
CN101217663B (en) A quick selecting method of the encode mode of image pixel block for the encoder
CN100401789C (en) Quick selection of prediction modes in H.264/AVC frame
CN103188496B (en) Based on the method for coding quick movement estimation video of motion vector distribution prediction
CN102025995B (en) Spatial enhancement layer rapid mode selection method of scalable video coding
CN101448159B (en) Rapid interframe mode selection method based on rate-distortion cost and mode frequency
CN1323555C (en) Quick selecting method for H.264/AVC multiple reference frame
CN102932642B (en) Interframe coding quick mode selection method
CN100444639C (en) Method of selecting H.264/AVC frame to frame motion estimation mode
CN107623850A (en) A kind of quick screen contents encoding method based on temporal correlation
CN101022555B (en) Interframe predictive coding mode quick selecting method
CN100574447C (en) Fast intraframe predicting mode selecting method based on the AVS video coding
CN101888546B (en) A kind of method of estimation and device
CN101304529A (en) Method and device for selecting macro block pattern
CN104601992B (en) SKIP mode quick selecting methods based on Bayesian Smallest Risk decision
CN100484249C (en) Method of forecast inside frame based on edge direction between frames
CN105187826A (en) Rapid intra-frame mode decision method specific to high efficiency video coding standard
CN101202915A (en) Method and apparatus for selecting frame inner forecasting mode
CN101883275B (en) Video coding method
CN103384327A (en) AVS fast mode selection algorithm based on adaptive threshold

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