CN108696749A - A kind of mode selecting method and device improving image coding quality - Google Patents
A kind of mode selecting method and device improving image coding quality Download PDFInfo
- Publication number
- CN108696749A CN108696749A CN201710231451.XA CN201710231451A CN108696749A CN 108696749 A CN108696749 A CN 108696749A CN 201710231451 A CN201710231451 A CN 201710231451A CN 108696749 A CN108696749 A CN 108696749A
- Authority
- CN
- China
- Prior art keywords
- coding mode
- judgement
- difference
- foundation
- main
- 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.)
- Pending
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/102—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
- H04N19/103—Selection of coding mode or of prediction mode
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/169—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
- H04N19/17—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
- H04N19/176—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a block, e.g. a macroblock
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Compression Or Coding Systems Of Tv Signals (AREA)
Abstract
The present invention relates to technical field of image processing more particularly to a kind of mode selecting methods and device improving image coding quality.This method includes:Determine a main judgement foundation and one or more auxiliary judgement foundations;According to each coding mode, the numerical value of main judgement foundation corresponding with the coding mode and all auxiliary judgement foundations is determined;Optimal coding mode is determined according to the numerical value.It can be seen that this method not only increases the efficiency of judgement while can't increase calculation amount.
Description
Technical field
The present invention relates to technical field of image processing more particularly to a kind of mode selecting methods improving image coding quality
And device.
Background technology
When being encoded to video using H264 video code models, it is necessary first to select an optimal coding mould
Formula, process needs traverse each coding mode, then select optimal coding mode by comparing.It is encoding
During model selection, the value for calculating the judgement foundation of each pattern is needed, then determines that pattern is in which according to the value
Optimal, the process is as follows:
Judgement foundation is COST;
COST=Distortion+bit-count*lambda
Wherein Distortion is the difference degree of the compressed image of description and the image before compression, and Distortion is got over
Illustrate that the effect of this pattern is more bad greatly;
Bit-count is the cost for describing to write all information that coding needs the bit numbers needed in code stream, is needed
Bit numbers are more, then final code stream is bigger, and it is small to be equivalent to compression ratio;
Generally speaking, sum of the two is bigger, then corresponding pattern is more bad.The coding for needing selection judgement small according to value
Pattern;
Judgement is according to there are many, and there are commonly Cost_sse, Cost_satd, Cost_sad.Calculation formula is as follows:
Cost_sse=SSE+bit-count*lambda_sse;
Cost_satd=SATD+bit-count*lambda_satd;
Cost_sad=SAD+bit-count*lambda_sad;
Wherein various pieces are defined as follows:
1, bit-count is the length for the code stream for encoding a macro block.Entropy coding length process is obtained by calling to obtain
It arrives;
2, lambda is a number by tabling look-up by this function of quantisation parameter;
Lambda_sse, lambda_satd, lambda_sad be looked by the same quantisation parameter functions it is different
What table obtained.It is as follows:
One of which judgement is being used alone according to come when doing coding mode selection, effect is according to by the good sequence to difference
For:Cost_sse>cost_satd>cost_sad;
The operand for obtaining judgement foundation descending is:Cost_sse>cost_satd>cost_sad.
But the inventors discovered that when a kind of judgement foundation be used alone doing model selection, in many cases effect it is bad or
Person generates erroneous judgement, does not finally probably select a good coding mode.
Such as:When using Cost_sse as judgement foundation, (it is squared since SSE plays the role of the larger difference of amplification
Operation can amplify larger value, 2*2=4,5*5=25), when image has individual noises, influences of noise be amplified very greatly,
The value of Cost_sse may be made, which to become larger, causes model selection bad.
Invention content
The embodiment of the present invention provides a kind of mode selecting method and device improving image coding quality, existing for improving
The efficiency of selection coding mode in technology.
A kind of mode selecting method improving image coding quality, the method includes:
Determine a main judgement foundation and one or more auxiliary judgement foundations;
According to each coding mode, determine that main judgement foundation corresponding with the coding mode and all auxiliary are sentenced
The certainly numerical value of foundation;
Optimal coding mode is determined according to the numerical value.
As it can be seen that adding the mode of auxiliary judgement using method provided in an embodiment of the present invention, can effectively avoid existing
A kind of judgement mode is only used in technology to determine coding mode, caused by erroneous judgement or low efficiency problem.A book is implemented
In the calculating process for the judgement foundation that example provides, some intermediate results be can by different judgements according to used at the same time, because
This substantially increases deterministic process, but still it is considered that increased is only smaller operand.Therefore, this method not only carries
The high efficiency judged can't increase calculation amount simultaneously.
Description of the drawings
It, below will be to embodiment or the prior art in order to illustrate more clearly of the present invention or technical solution in the prior art
Attached drawing needed in description is briefly described.
Fig. 1 is a kind of flow chart of the mode selecting method for raising image coding quality that inventive embodiments provide;
Fig. 2 is a kind of structure drawing of device of model selection improving image coding quality provided in an embodiment of the present invention.
Specific implementation mode
In order to make those skilled in the art more fully understand the technical solution in the embodiment of the present invention, and make the present invention's
Above objects, features, and advantages can be more obvious and easy to understand, makees below in conjunction with the accompanying drawings to technical solution in the present invention further detailed
Thin explanation.
The mode of auxiliary judgement is added using method provided in an embodiment of the present invention, can effectively be avoided in the prior art
A kind of judgement mode is only used to determine coding mode, caused by erroneous judgement or low efficiency problem.A sheets the present embodiment provides
Judgement foundation calculating process in, some intermediate results be can by different judgements according to used at the same time, so even
Deterministic process is increased, but still it is considered that increased is only smaller operand.Therefore, this method, which not only increases, sentences
Disconnected efficiency can't increase calculation amount simultaneously.As shown in Figure 1, detailed process is as follows:
Step 11, a main judgement foundation and one or more auxiliary judgement foundations are determined;
Step 12, according to each coding mode, main judgement foundation corresponding with the coding mode and institute are determined
There is the numerical value of auxiliary judgement foundation;
Step 13, optimal coding mode is determined according to the numerical value.
Specifically, described according to each coding mode, determine main judgement corresponding with the coding mode according to
And the numerical value of all auxiliary judgement foundations includes:
Calculate the value of the main judgement foundation corresponding to each coding mode;
When it is all it is main judgement foundations the first differences be more than or equal to threshold value when, it is described determined according to the numerical value it is optimal
Coding mode includes:
Using the coding mode corresponding to the value of minimum main judgement foundation as optimal coding mode.
Specifically, when the first difference of all main judgement foundations is less than threshold value, calculate auxiliary corresponding to each pattern
Help the second difference of judgement foundation;
When second difference is more than or equal to zero, the coding mode corresponding to the value of minimum main judgement foundation is made
For optimal coding mode.
Specifically, when second difference is less than or equal to zero, then determined according to pre-set operation method optimal
Coding mode.
It is introduced below with specific embodiment:
The embodiment of the present invention provides a kind of mode selecting method improving image coding quality, introduces for convenience, this reality
It applies with there are two types of the pending selection of coding mode, one of which is mode_A in example, another kind is mode_B;
Selection about main decision pattern and auxiliary judgement pattern is as follows:
According to there are many, such as there are commonly Cost_sse, Cost_satd, Cost_sad, the calculating of each is public for judgement
Formula is as follows:
Cost_sse=SSE+bit-count*lambda_sse
Cost_satd=SATD+bit-count*lambda_satd
Cost_sad=SAD+bit-count*lambda_sad
One of which judgement is being used alone according to come when doing model selection, effect according to by being well to the sequence of difference:
Cost_sse>cost_satd>cost_sad。
The operand for obtaining judgement foundation descending is:Cost_sse>cost_satd>cost_sad.
Method provided by the invention needs to select a kind of judgement that effect is good foundation to be main judgement foundation, one or more
The relatively bad judgement foundation of effect is auxiliary judgement foundation, and mainly adjudicates foundation and one or more auxiliary judgement foundations
There are many combinations, such as table 1, wherein listing part combination, technical staff also with carrying out it according to actual needs
He combines.
Main judgement foundation | Auxiliary judgement foundation |
Cost_sse | Cost_satd |
Cost_sse | Cost_satd,Cost_sad |
Cost_satd | Cost_sad |
Table 1
The advantage of doing so is that:The increase due to increasing auxiliary judgement according to caused operand can be reduced.It is former
Because being:
A. some intermediate results in the calculating process of judgement foundation be can by different judgements according to used at the same time,
Such as bit-count;
The calculating of b.SAD is the intermediate result of SSE calculating process and the intermediate result of SATD calculating process.So such as
Fruit is using Cost_sad as the auxiliary judgement foundation of Cost_sse or Cost_satd, it is believed that does not increase calculation amount substantially.
The calculating of SATD is that the intermediate result that SSE is calculated is obtained using simple operation, it is believed that increases smaller operand.
Technical staff can combine table 1 according to actual needs, determine that a main judgement foundation and one or more are auxiliary
Help judgement foundation;
Such as foundation is adjudicated to be main using Cost_sse, Cost_sad is auxiliary judgement foundation.Then coding mode selects
Steps are as follows:
According to each coding mode, determine that main judgement foundation corresponding with the coding mode and all auxiliary are sentenced
The certainly numerical value of foundation;It is specific as follows:
According to above-mentioned formula, the value Cost_sse of the main judgement foundation corresponding to each coding mode is calculated, with
And Cost_sad;
Both of which is ordered as mode_0, mode_1 from small to large according to the value of Cost_sse, corresponding value is respectively
Cost_sad_0, Cost_sad_1, Cost_sse_0, Cost_sse_1.
When the first difference of all main judgement foundations is more than or equal to threshold value, that is, calculate mode_1's and mode_0
The first difference sse_diff of Cost_sse:
Sse_diff=Cost_sse_1-Cost_sse_0
When sse_diff is more than or equal to threshold value, using the coding mode corresponding to the value of minimum main judgement foundation as
Optimal coding mode, that is, directly select mode_0 as optimal coding mode, i.e., described to determine optimal volume according to the numerical value
Pattern.
When sse_diff is less than threshold value, the second difference of the auxiliary judgement foundation corresponding to each pattern is calculated;Count
Calculate the difference of the Cost_sad of mode_1 and mode_0, the second difference sad_diff:
Sad_diff=Cost_sad_1-Cost_sad_0.
If sad_diff is more than or equal to 0, using the coding mode corresponding to the value of minimum main judgement foundation as most
Excellent coding mode, that is, select mode_0.
If sad_diff is less than 0, optimal coding mode is determined according to pre-set operation method, that is, is carried out down
Face comparison operation:
If ((sad_diff/Cost_sad_0)s <8* (sse_diff/Cost_sse_0)), then mode_0 is selected, it is no
Then, mode_1 is selected;
Therein 8 this value are empirical values, can also select different values according to actual needs.
The determination of threshold value can be used the value of Cost_sse_0 and move to right 4 and obtain (being equivalent to divided by 16, using in the present embodiment
Right-shift operation is in order to simplify operation), it can also use otherwise.
When the coding mode for carrying out selection is more than two kinds, this method is by appropriate deformation.When as auxiliary judgement
The judgement of foundation according to it is more than one when, the value of auxiliary judgement foundation can be considered to carry out assisted Selection.
As shown in Fig. 2, a kind of device for the model selection improving image coding quality of the embodiment of the present invention, described device
Including:
Determining module, for determining a main judgement foundation and one or more auxiliary judgement foundations;
Computing module, for according to each coding mode, determining main judgement foundation corresponding with the coding mode
And the numerical value of all auxiliary judgement foundations;
Coding module, for determining optimal coding mode according to the numerical value.
The computing module is specifically used for:
Calculate the value of the main judgement foundation corresponding to each coding mode;And judge the first of main judgement foundation
Whether difference is more than or equal to threshold value;
The coding module is specifically used for, will most when the first difference of all main judgement foundations is more than or equal to threshold value
Coding mode corresponding to the value of small main judgement foundation is as optimal coding mode.
The computing module is specifically used for:When the first difference of all main judgement foundations is less than threshold value, each is calculated
Second difference of the auxiliary judgement foundation corresponding to pattern;And judge whether second difference is more than or equal to zero;
The coding module is specifically used for, when second difference is more than or equal to zero, by minimum main judgement foundation
Value corresponding to coding mode as optimal coding mode.
When the computing module judges that second difference is less than or equal to zero, then basis is pre-set the coding module
Operation method determine optimal coding mode.
In conclusion advantageous effect:
The mode of auxiliary judgement is added using method provided in an embodiment of the present invention, can effectively be avoided in the prior art
A kind of judgement mode is only used to determine coding mode, caused by erroneous judgement or low efficiency problem.A sheets the present embodiment provides
Judgement foundation calculating process in, some intermediate results be can by different judgements according to used at the same time, so even
Deterministic process is increased, but still it is considered that increased is only smaller operand.Therefore, this method, which not only increases, sentences
Disconnected efficiency can't increase calculation amount simultaneously.
The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the invention, all essences in the present invention
All any modification, equivalent and improvement etc., should all be included in the protection scope of the present invention made by within refreshing and principle.
Claims (8)
1. a kind of mode selecting method improving image coding quality, which is characterized in that the method includes:
Determine a main judgement foundation and one or more auxiliary judgement foundations;
According to each coding mode, determine main judgement corresponding with the coding mode according to and all auxiliary judgements according to
According to numerical value;
Optimal coding mode is determined according to the numerical value.
2. the method as described in claim 1, which is characterized in that it is described according to each coding mode, it determines and the coding
The corresponding main judgement of pattern according to and the numerical value of all auxiliary judgement foundations include:
Calculate the value of the main judgement foundation corresponding to each coding mode;
It is described that optimum code is determined according to the numerical value when the first difference of all main judgement foundations is more than or equal to threshold value
Pattern includes:
Using the coding mode corresponding to the value of minimum main judgement foundation as optimal coding mode.
3. method as claimed in claim 2, which is characterized in that when the first difference of all main judgement foundations is less than threshold value
When, calculate the second difference of the auxiliary judgement foundation corresponding to each pattern;
When second difference is more than or equal to zero, using the coding mode corresponding to the value of minimum main judgement foundation as most
Excellent coding mode.
4. as claimed in claim 3, which is characterized in that when second difference is less than or equal to zero, then basis is pre-set
Operation method determine optimal coding mode.
5. a kind of device for the model selection improving image coding quality, which is characterized in that described device includes:
Determining module, for determining a main judgement foundation and one or more auxiliary judgement foundations;
Computing module, for according to each coding mode, determine main judgement foundation corresponding with the coding mode and
The numerical value of all auxiliary judgement foundations;
Coding module, for determining optimal coding mode according to the numerical value.
6. device as claimed in claim 5, which is characterized in that the computing module is specifically used for:
Calculate the value of the main judgement foundation corresponding to each coding mode;And judge the first difference of main judgement foundation
Whether threshold value is more than or equal to;
The coding module is specifically used for, when the first difference of all main judgement foundations is more than or equal to threshold value, by minimum
Coding mode corresponding to the value of main judgement foundation is as optimal coding mode.
7. device as claimed in claim 6, which is characterized in that the computing module is specifically used for:When it is all it is main judgement according to
According to the first difference be less than threshold value when, calculate each pattern corresponding to auxiliary judgement foundation the second difference;And described in judging
Whether the second difference is more than or equal to zero;
The coding module is specifically used for, when second difference is more than or equal to zero, by the value of minimum main judgement foundation
Corresponding coding mode is as optimal coding mode.
8. device as claimed in claim 7, which is characterized in that the computing module judges that second difference is less than or equal to
When zero, the coding module then determines optimal coding mode according to pre-set operation method.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710231451.XA CN108696749A (en) | 2017-04-11 | 2017-04-11 | A kind of mode selecting method and device improving image coding quality |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710231451.XA CN108696749A (en) | 2017-04-11 | 2017-04-11 | A kind of mode selecting method and device improving image coding quality |
Publications (1)
Publication Number | Publication Date |
---|---|
CN108696749A true CN108696749A (en) | 2018-10-23 |
Family
ID=63843375
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710231451.XA Pending CN108696749A (en) | 2017-04-11 | 2017-04-11 | A kind of mode selecting method and device improving image coding quality |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108696749A (en) |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102752596A (en) * | 2012-07-05 | 2012-10-24 | 深圳广晟信源技术有限公司 | Rate distortion optimization method |
GB2495990A (en) * | 2011-10-28 | 2013-05-01 | Canon Kk | Motion compensated image coding with omission of coding mode cost calculation for a motion predictor in a set. |
CN103327325A (en) * | 2013-05-13 | 2013-09-25 | 西安电子科技大学 | Intra-frame prediction mode rapid self-adaptation selection method based on HEVC standard |
CN104168480A (en) * | 2014-09-09 | 2014-11-26 | 西安电子科技大学 | Fast selecting method for intra-frame prediction encoding modes based on HEVC standard |
US20150010070A1 (en) * | 2013-07-05 | 2015-01-08 | Samsung Electronics Co., Ltd. | Method and apparatus for deciding a video prediction mode |
CN104954787A (en) * | 2014-03-27 | 2015-09-30 | 浙江大华技术股份有限公司 | HEVC interframe prediction mode selection method and apparatus |
US20160007046A1 (en) * | 2014-07-02 | 2016-01-07 | Apple Inc. | Estimating rate costs in video encoding operations using entropy encoding statistics |
-
2017
- 2017-04-11 CN CN201710231451.XA patent/CN108696749A/en active Pending
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
GB2495990A (en) * | 2011-10-28 | 2013-05-01 | Canon Kk | Motion compensated image coding with omission of coding mode cost calculation for a motion predictor in a set. |
CN102752596A (en) * | 2012-07-05 | 2012-10-24 | 深圳广晟信源技术有限公司 | Rate distortion optimization method |
CN103327325A (en) * | 2013-05-13 | 2013-09-25 | 西安电子科技大学 | Intra-frame prediction mode rapid self-adaptation selection method based on HEVC standard |
US20150010070A1 (en) * | 2013-07-05 | 2015-01-08 | Samsung Electronics Co., Ltd. | Method and apparatus for deciding a video prediction mode |
CN104954787A (en) * | 2014-03-27 | 2015-09-30 | 浙江大华技术股份有限公司 | HEVC interframe prediction mode selection method and apparatus |
US20160007046A1 (en) * | 2014-07-02 | 2016-01-07 | Apple Inc. | Estimating rate costs in video encoding operations using entropy encoding statistics |
CN104168480A (en) * | 2014-09-09 | 2014-11-26 | 西安电子科技大学 | Fast selecting method for intra-frame prediction encoding modes based on HEVC standard |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Cao et al. | Video steganalysis exploiting motion vector reversion-based features | |
TWI453680B (en) | Face recognition method eliminating affection of blur noise and environmental variations | |
Nie et al. | Defining Embedding Distortion for Intra Prediction Mode-Based Video Steganography. | |
JP2008507211A (en) | H. based on intra prediction direction. H.264 spatial error concealment | |
EP1872590A1 (en) | Method and apparatus for digital image coding | |
CN105791877A (en) | Adaptive loop filter method in video coding and decoding | |
CN112702599A (en) | VVC intra-frame rapid coding method based on deep learning | |
US20130156310A1 (en) | Dynamic Image Quality Checker for use in Image Transcoding | |
CN104243987B (en) | Image sampling method based on adaptive sample rate | |
CN111401906A (en) | Transfer risk detection method and system | |
Ladune et al. | Aivc: Artificial intelligence based video codec | |
CN111209741A (en) | Processing method and device of table data dictionary | |
CN108696749A (en) | A kind of mode selecting method and device improving image coding quality | |
EP3952314A1 (en) | Inter-frame prediction method and apparatus, device and storage medium | |
Zhai et al. | Multi-domain embedding strategies for video steganography by combining partition modes and motion vectors | |
CN101600111A (en) | A kind of searching method of realizing secondary coding of self-adaptive interpolation filter | |
CN114334696B (en) | Quality detection method and device, electronic equipment and computer readable storage medium | |
CN113691811B (en) | Coding block dividing method, device, system and storage medium | |
CN114124309A (en) | Data transmission method and equipment | |
US20210074296A1 (en) | Transcription generation technique selection | |
CN112218075A (en) | Filling method of candidate list, electronic device and computer readable storage medium | |
CN112449201B (en) | Decoding method, encoding method, corresponding devices, electronic equipment and storage medium | |
CN109219960B (en) | Method, device and equipment for optimizing video coding quality smoothness and storage medium | |
CN113784147A (en) | Efficient video coding method and system based on convolutional neural network | |
CN106658024A (en) | Fast video coding method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20181023 |
|
RJ01 | Rejection of invention patent application after publication |