CN104320657A - Method for selecting prediction mode of HEVC lossless video coding and corresponding coding method - Google Patents
Method for selecting prediction mode of HEVC lossless video coding and corresponding coding method Download PDFInfo
- Publication number
- CN104320657A CN104320657A CN201410609275.5A CN201410609275A CN104320657A CN 104320657 A CN104320657 A CN 104320657A CN 201410609275 A CN201410609275 A CN 201410609275A CN 104320657 A CN104320657 A CN 104320657A
- Authority
- CN
- China
- Prior art keywords
- frame
- prediction
- bit rate
- inter
- coding
- 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.)
- Granted
Links
Landscapes
- Compression Or Coding Systems Of Tv Signals (AREA)
Abstract
The invention provides a method for selecting a prediction mode of HEVC lossless video coding and a corresponding coding method. The method for selecting the prediction mode of the HEVC lossless video coding comprises the steps that firstly, the Lagrange multiplier, for RDO, of intra-frame prediction and the Lagrange multiplier, for RDO, of inter-frame prediction of each LCU of a video frame are initialized, intra-frame prediction and inter-frame prediction are conducted, an optimal mode is selected and used for coding, and the bit rate needed by coding of the frame is calculated and is used as a reference bit rate of initialization; secondly, the multipliers of the K LCUs of the frame are changed, the optimal mode is then selected and used for coding, the current bit rate is calculated, the difference value between the current bit rate and the reference bit rate is calculated, according to a preset rule, the changed multipliers are accepted or rejected, the current bit rate is used as the reference bit rate when the changed multipliers are accepted, whether the multipliers need to be changed again or not is judged, if not, the steps are ended, and if yes, the second step is executed again and iteration is conducted. According to the method for selecting the prediction mode of the HEVC lossless video coding, the original coding structure of the HEVC is changed slightly, the adverse influence of the QP in a primary standard on the lossless-mode coding efficiency is eliminated, and the coding bit rate is greatly reduced.
Description
Technical field
The present invention relates to field of video encoding, more specifically, the predicting mode selecting method relating to HEVC lossless video encoding and the method for video coding making based on the method.
Background technology
In recent years, along with the development of the communication technology, multimedia technology, people are also more and more higher for the demand of the multimedia communications such as video.But the data volume of video is huge, the video data without compression coding cannot transmit substantially in existing channel.In order to meet various requirement above, successively propose various Video Coding Scheme in the world.Since eighties of last century the nineties, International Telecommunication Union's telecommunication standards is organized ITU.T and International Organization for standardization ISO to combine and has been formulated a series of international standard about video compression coding-decoding and suggestion, wherein, the H.26X series video compression standard of ITU proposition and the MPEG series international standard of ISO/IEC JTC release have the greatest impact.In January, 2013, video-coding standardization organizes JCT-VC (Joint Collaborative Team on Video Coding) formally to issue latest generation video coding international standard---high performance video standard HEVC (High Efficiency Video Coding), under same video subjective quality, its bit rate be approximately previous generation video encoding standard H.264/AVC 50%.
The coding basic framework of HEVC and previous H.264/AVC standard class seemingly, still adopt hybrid coding pattern.Whole cataloged procedure is mainly divided into: prediction, conversion, quantification, entropy code four step.Predicted portions is divided into infra-frame prediction and the large class of inter prediction two.Infra-frame prediction utilizes present frame to rebuild pixel as carrying out tentative prediction with reference to pixel, before inter prediction utilizes or the pixel value rebuild of subsequent frames as a reference.Then the predicted value of gained and current block original pixel value are subtracted each other, and then obtain residual error, residual error obtains conversion coefficient through change quantization, finally conversion coefficient is obtained last code stream through entropy code.No matter be inter prediction, or infra-frame prediction, all need to use the information of rebuilding image, thus in an encoding process, residual image is also needed to carry out inverse transformation quantification, again this residual image is added with predicted value, eventually passes the noise in a loop filtering filtering video image, the video image deterioration impacts such as blocking effect can be avoided simultaneously.
In HEVC standard, there is lossy compression method and the large class coding mode of Lossless Compression two.For the most of video transmitted in the Internet, carry out suitable lossy compression method and can reduce bit rate well, thus improve the efficiency of transmission.And for fields such as medical video, remote sensing video, fingerprints, also there is very large application in Lossless Compression.In HEVC standard, Lossless Compression exists as the expansion of lossy compression method.Owing to quantizing to there is distortion, and transform and quantization is combined togather and carries out in HEVC, and thus its conversion process also exists distortion, thus in HEVC lossless compression-encoding, change quantization process is closed.In addition, because before and after coding, pixel is undistorted, thus do not need to carry out loop filtering, therefore HEVC lossless compression operation has also skipped loop filtering process.That is, in current HEVC lossless compression operation, only there are prediction and entropy code two parts.Visible, the quality of prediction will directly affect the performance of HEVC Lossless Compression.
As mentioned above, the prediction of HEVC is divided into infra-frame prediction and inter prediction.For infra-frame prediction, the direction of prediction reaches 35 kinds of patterns.Wherein each pattern correspond to a kind of intra prediction direction, specifically as shown in Figure 1.So meticulous pattern, is convenient to find a kind of pattern preferably removing redundancy in frame, thus the raising of coding efficiency in achieve frame substantially.In HEVC, adopt rate-distortion optimization (rate distortion optimization, RDO) select optimal mode, namely select a pattern with minimum RD cost (rate distortion costs, rate distortion cost) as predictive mode.The calculating of RD cost is as shown in formula (1):
RD cost=D+λR (1)
Wherein, D represents the distortion factor of rebuilding image block and original picture block, R encodes under representing this pattern this bit rate (comprising the bit rate needed for coded residual and coding prediction mode) needed for prediction block, and λ is Lagrange's multiplier, for weighing the weight of bit rate in this RD cost, obtain by computing formula (2):
λ=Qpfactor×2
(QP-12)/3 (2)
Wherein, QP is quantization parameter (quantization parameter), be used to indicate different quantization steps, QP is larger, then quantization step is larger, and the quantizing distortion namely produced is larger, and Qpfactor is quantization parameter, be a constant in this formula, determined by specific coding situations such as frame types.
From formula (1), often calculate a RD cost, need to calculate D and R two parts, need that change quantization is carried out to residual image (difference of predicted picture and original image) when particularly calculating D, inverse transformation quantizes, reconstruction obtains rebuilding image block, calculated distortion degree again, its operand is very high.And if when selecting optimal mode, directly calculate its rate distortion one by one to these 35 kinds of patterns, its operand will be very high.In order to reduce operand, HEVC first adopts rough mode to calculate RD cost to select several good candidate pattern, and then carries out RD cost accurately to these candidate pattern and calculate, to select best pattern.So-called rough mode refers to the calculating using the simple Hadamard conversion of residual image block to substitute complicated distortion factor D, thus effectively reduces complexity.
And for inter prediction, encoder finds the image block the most similar to prediction block around reference frame prediction block position.In order to find the image block mated most, in HEVC, the precision of motion vector reaches 1/4 pixel.Same, the image block in relatively which position of reference frame, as during with reference to block, is also find the position with minimum RD cost.Similar with infra-frame prediction, if find optimum image block in the scope of 64 × 64, and precision is 1/4 pixel, and that is by the RD cost of calculating 16384 times, and its operand is equally very large.In order to reduce operand, when motion search, rough search is carried out in the calculating that HEVC uses calculating absolute length chang SAD (sum of abstract distortion) method to substitute degree of distortion in service.
In current many application, the demand of video being carried out to Lossless Compression is increasing, and because the lossless coding pattern of HEVC can provide higher compression ratio, its application at video lossless compressed encoding also will be more and more extensive.In the mainstream applications of HEVC standard, as Set Top Box, video monitoring etc., exigent code efficiency, thus have to produce some distortions as cost, that is, mainstream applications mostly is lossy compression method.But on HEVC lossy compression method standard, a set of brand-new coding tools of redeveloping is obviously unrealistic to obtain lossless coding efficiency as well as possible.Therefore, when carrying out the design of HEVC lossless coding scheme, we should follow such design principle: utilize existing HEVC lossy coding structure as much as possible, and the lossless coding scheme of proposition is little as far as possible to original lossy coding structural modification, consider the balance of code efficiency and complexity simultaneously.
From introducing above, the relative lossy compression method of HEVC Lossless Compression, is only to skip conversion, quantification, loop filtering three parts, and the strategy of prediction and entropy code all remains unchanged.Lossy compression method needs balanced reconstruction video quality and coding bit rate to encode.Be different from lossy compression method, in Lossless Compression, the D in formula (1) is finally zero, thus there is not the problem of reconstruction video Quality Down, then its unique target of encoding is exactly under admissible encoding and decoding complexity, reduces bit rate as much as possible.In Lossless Compression, if accurately calculate D, then the distortion D finally obtained is zero, and now, no matter λ be how many, and it is of equal value for minimizing RD cost and minimizing bit rate R, and thus the strategy of original lossy compression method now stands good in Lossless Compression.But, no matter be infra-frame prediction or inter prediction, all to each pattern accurate Calculation RD cost, can not must use rough selection strategy mentioned above.During lossy compression method, the D obtained through rough calculation is more or less the same with actual D, and during Lossless Compression, the D that rough calculation obtains with actual be zero D differ larger, not necessarily comprise actual optimum pattern in the candidate pattern then now obtained according to formula (1), (2), thus its final coding efficiency just differs and is decided to be optimum.Thus formula (1), (2) must be redefined, to better Lossless Compression performance to be obtained.
In addition, when lossy compression method, we can obtain the code stream of different quality and different bit rates by adjustment QP, to meet the demand of different application scene.This is because on the one hand, adjustment QP can obtain different λ, thus regulates the trade-off relationship in RD cost between bit rate and reconstructed image quality.On the other hand, be also most important one side, QP is less, and quantization error is less, and the video image quality of decoding and rebuilding is better, but the code stream bit rate that coding produces is higher.So in lossy compression method, if other encoding conditions are the same, bit rate reduces along with the increase of QP, and video image decoding reconstruction quality reduces along with the increase of QP.But, in Lossless Compression, there is not quantification, in fact not had other to act on except regulating λ, QP.Fig. 2 be in lossless compression-encoding sequence Racehorse bit rate with the curve chart of QP situation of change (HM 10.0), can be found by Fig. 2, when Lossless Compression, the bit rate of encoding code stream and QP are non-monotonic relation, be no matter QP minimum time (be 0 when encoded video is 8 bit, for-12 during 10 bit) or maximum time (being 39 when being 51,10 bit when encoded video is 8 bit), all cannot reach minimal bit rate.Thus for Lossless Compression, the effect of this coding parameter of QP is different, the corresponding relation of itself and λ for another example shown in formula (2) like that, need to redefine.
Summary of the invention
In view of this, the object of the present invention is to provide a kind of predicting mode selecting method for HEVC lossless video encoding, to readjust for the multimodal rough selection strategy of crowd in coded prediction process, farthest reduce Lossless Compression bit rate.
To achieve these goals, the invention provides 1, a kind of predicting mode selecting method of HEVC lossless video encoding, comprise the following steps of carrying out successively:
S1, for a frame of video, the infra-frame prediction of each LCU of frame of video and inter prediction are used for the Lagrange's multiplier of RDO
with
initialization, and carry out infra-frame prediction and inter prediction, select optimum frame inner estimation mode and best inter-frame forecast mode, from optimum frame inner estimation mode and best inter-frame forecast mode, select optimal mode for coding, bit rate needed for this frame of calculation code, as initial reference bits rate R
0, i, j represent the position coordinates of LCU; S2, change described frame of video K LCU described in
with
carry out infra-frame prediction and inter prediction, select optimum frame inner estimation mode and best inter-frame forecast mode, from optimum frame inner estimation mode and best inter-frame forecast mode, select optimal mode for coding, the bit rate needed for this frame of video of calculation code, be natural number as current bit rate R ', K; S3, calculate difference DELTA R between current bit rate and reference bits rate, accept according to predetermined rule or refusal change after described in
with
and when accepting using current bit rate as with reference to bit rate; S4, to judge whether without the need to described in changing again
with
when without the need to changing again, then by current
with
as final
with
otherwise return step S2.
Preferably, in step sl, described Lagrange's multiplier
with
be initialized as
with
described
span is [3,8], described in
span is [0.5,1.5].
Preferably, in step sl, for infra-frame prediction, use and minimize in formula (8)
cost criterion selects candidate pattern from multiple intra prediction mode, then from candidate pattern, selects optimum frame inner estimation mode according to formula (1), and formula is as follows:
RD cost=D+λR (1)
Wherein,
represent the rough rate distortion costs of infra-frame prediction, D
intrafor the prediction residual distortion of infra-frame prediction; R
intrabit rate needed for other information of forecastings of encoding except residual information in expression infra-frame prediction; λ is Lagrange's multiplier; D is the actual residual error distortion of infra-frame prediction, and R is actual coding bit rate, and RD cost represents actual rate distortion cost.
Preferably, in step sl, for inter prediction, use and minimize in formula (9)
cost criterion chooses optimum MV and corresponding reference frame, then from each inter-frame mode, selects best inter-frame forecast mode according to formula (1), and formula is as follows:
RD cost=D+λR (1)
Wherein,
represent the rough rate distortion costs of inter prediction, D
interfor the prediction residual distortion of inter prediction, R
interbit rate needed for other information of forecastings of encoding except residual information in expression inter prediction, λ is Lagrange's multiplier, and D is the actual residual error distortion of infra-frame prediction; R is actual coding bit rate, and RD cost represents actual rate distortion cost.
Preferably, in step s 2, K is the number of the contained LCU of each row of described frame of video.
Preferably, in step s3, if Δ R≤0, then accept described in after change
with
otherwise with exp (-Δ R/R
0) probability accept described in
with
Preferably, step S3 is in: record iterations Ti and iterative process continuously described in refusal
with
number of times Tr, if iterations Ti reaches an iterations threshold value THi, or continuously refusal number of times Tr reaches a refusal frequency threshold value THr continuously, then by current
with
as final
with
Preferably, step S1 also comprise to described iterations Ti and continuously refusal number of times Tr be initialized as 0.
Preferably, in step sl, described THi span is [1,1000], and described THr span is [1,50].
The present invention also proposes a kind of HEVC lossless video encoding method, comprises the predicting mode selecting method of aforesaid HEVC lossless video encoding.
Known by technique scheme, the predicting mode selecting method for HEVC lossless video encoding of the present invention has the following advantages: change very little to the original coding structure of HEVC, take full advantage of the coding tools that HEVC is existing; Owing to having skipped conversion, quantification in HEVC lossless coding, thus, this coding tools of QP does not have practical significance in Lossless Compression, and this method eliminates the adverse effect that in primary standard, QP brings code efficiency; The method of Lossless Compression in relative HM 10.0, coding bit rate of the present invention has had very large reduction, under RA-Main, LDB-Main and LDP-Main tri-kinds of coding environments, the bit rate of the inventive method on average reduces 1.2-1.4%, particularly F class testing sequence, which gives and on average saves up to the bit rate of 2.5-2.9%.
Accompanying drawing explanation
Fig. 1 is the schematic diagram of various intra prediction mode correspondence direction in prior art;
Fig. 2 be in lossless compression-encoding sequence Racehorse bit rate with the curve chart of QP situation of change (HM10.0);
Fig. 3 is the infra-frame prediction of each LCU and the inter prediction schematic diagram for the Lagrange's multiplier (in figure, each piece represents a LCU) of RDO;
Fig. 4 is the particular flow sheet of the predicting mode selecting method of HEVC lossless video encoding of the present invention.
Embodiment
For making the object, technical solutions and advantages of the present invention clearly understand, below in conjunction with specific embodiment, and with reference to accompanying drawing, the present invention is described in further detail.
In HEVC standard, there is lossy compression method and the large class coding mode of Lossless Compression two.In Lossless Compression, there is not reconstruction distortion, thus its sole purpose is exactly farthest reduce bit rate, namely minimizes bit rate R.Because the expansion of Lossless Compression as just HEVC exists, do not wish there is too large change to original HEVC in principle.When carrying out coarse mode and selecting, the variable in formula (1) is different from when accurately selecting, and wherein rebuilds image block and represents the distortion function relevant with residual error in essence to the distortion factor D of original picture block, namely
D=f(residue) (3)
Wherein residue represents residual error.
Equally, R
predInfobit rate needed for this predictive mode of presentation code.When carrying out infra-frame prediction, R
predInfothis bit rate needed for pattern correspondence direction of presentation code, when carrying out inter prediction, R
predInfothis bit rate needed for pattern respective motion vectors (MV) information of presentation code.Due to follow-up be that entropy code is carried out to residual information, can think, residual error is larger, and the bit rate needed for this residual error of next code is larger, namely
R
residue=αf(residue),α>0 (4)
Wherein, R
residuebit rate needed for presentation code residual information reality, α represents proportionality coefficient.
Final bit rate R then needed for certain pattern
totalbit rate sum needed for bit rate and the coding prediction mode information except residual information needed for coded residual, namely
R
total=R
residue+R
predInfo (5)
Can be obtained by formula (4), (5):
R
total=αf(residue)+R
predInfo=αD+R
predInfo (6)
Due to α > 0, so, R is minimized
totalbe equivalent to and minimize R
total/ α, namely minimizes
D+R
predInfo/α (7)
Contrast equation (1) and (7) can find, as λ=1/ α, minimize the RD cost in formula (1) and minimize final bit rate R
totalconsistent.Thus, as long as find out R
residuewith the proportionate relationship α of f (residue), obtain λ=1/ α thus, can damage on the optimization strategy basis of model selection original, realize the optimization that lossless mode is selected, i.e. the minimizing of lossless coding bit rate.
How analysis is obtained this proportionate relationship α below.
As described above, in HEVC Lossless Compression standard, there is not the transform and quantization to residual error, thus after acquisition residual error, just directly carry out entropy code, so entropy code is the key factor affecting bit rate needed for next code residual error.In the residual error entropy code of HEVC standard, adopt and carry out entropy code based on context adaptive binary arithmetic coding (Context-based Adaptive Binary Arithmetic Coding is called for short CABAC).In the CABAC entropy code of HEVC standard, outside the Pass the initialization of each frame context probability modeling and QP have, other parts all do not relate to QP.Due in CABAC, context model can self-adaptative adjustment in an encoding process, to reach the optimization of code efficiency.Thus initial context probability modeling only affects the coding of the few residual error bit started most, and the impact for whole residual coding is very little, so can think that, in entropy code process, QP is very little on the impact of final code efficiency.Thus, can think that α and QP does not exist remarkable relation.But known by formula (2), in lossy compression method, λ=1/ α and QP is closely related, the difference of Lossless Compression and lossy compression method in HEVC standard predictive mode selection that Here it is.
Therefore, the present invention proposes a lambda parameter method for designing had nothing to do completely with QP.
Consider that the residual error characteristic of each piece there are differences, method below attempts to find the optimum Lagrange's multiplier combination of each maximum coding unit in a certain frame (largest coding unit, LCU).
Fig. 3 is the infra-frame prediction of each LCU and the inter prediction schematic diagram for the Lagrange's multiplier (in figure, each piece represents a LCU) of RDO.As shown in Figure 3, first the infra-frame prediction of each LCU and inter prediction are used for the Lagrange's multiplier of RDO by the present invention
with
all be initialized as
with
span is [3,8],
span is [0.5,1.5], this span is based on document (F.Bossen, " Common Test Conditions and Software Reference Configurations ", JCT-VC document, JCTVC-L 1100, Geneva, Jan.2013) cycle tests provided in and test condition obtain, and can adjust according to actual coding condition.To refuse number of times Tr continuously and iterations Ti is set to 0, the coding carrying out this frame obtains the coding bit rate R of parameter current afterwards
0, random change K LCU's
with
encode, K is natural number again, and encode under calculating new Lagrange's multiplier bit rate R ' needed for this frame, and calculates bitrate difference Δ R=R '-R
0if Δ R≤0, then accept this Lagrange's multiplier as new Lagrange's multiplier, otherwise with exp (-Δ R/R
0) probability accept this Lagrange's multiplier and be provided as new Lagrange's multiplier.If new Lagrange's multiplier is accepted, is then set to 0 by refusing number of times Tr continuously, and makes R
0=R ', otherwise add 1 by refusing number of times Tr continuously.Then, iterations Ti is added 1.
Upgrade continuous refusal number of times Tr and iterations Ti, judge following two conditions:
(1) whether refusal number of times Tr is less than threshold value THr continuously;
(2) whether iterations Ti is less than threshold value THi.
Wherein, THi span is [1,1000], and described THr span is [1,50].This span is based on document (F.Bossen, " Common Test Conditions and Software Reference Configurations ", JCT-VC document, JCTVC-L 1100, Geneva, Jan.2013) cycle tests provided in and test condition obtain, and can adjust according to actual coding condition.If these two conditions are all satisfied, then on the basis of current Lagrange's multiplier, change K LCU's at random
with
encode next time, then calculate the coding bit rate R ' under new Lagrange's multiplier, again calculate Δ R, and adopt identical strategy decision whether to receive new Lagrange's multiplier according to Δ R, upgrade refusal number of times Tr and iterations Ti continuously.As long as if having one not meet in above-mentioned two conditions, then the optimum of up-to-date Lagrange's multiplier as the Lagrange's multiplier of each LCU infra-frame prediction of present frame and inter prediction is arranged, so far terminate the coding of this frame.
The optimum of up-to-date Lagrange's multiplier as the Lagrange's multiplier of each LCU infra-frame prediction of present frame and inter prediction until when having one not meet in condition (1) and (2), then arranges by continuous repetitive cycling above-mentioned steps.So far the coding of this frame is terminated.
Fig. 4 is the flow chart of the predicting mode selecting method of HEVC lossless video encoding of the present invention, and as shown in the figure, it comprises the steps:
S1, for a frame of video, the infra-frame prediction of each LCU of this frame of video of initialization and inter prediction are used for the Lagrange's multiplier of RDO
with
and carry out infra-frame prediction and inter prediction, select optimum frame inner estimation mode and best inter-frame forecast mode, select optimal mode to encode from optimum frame inner estimation mode and best inter-frame forecast mode, bit rate needed for this frame of calculation code, as initial reference bits rate R
0, i, j represent the position coordinates of LCU.
And number of times Tr and iterations Ti is refused in initialization continuously.
Such as in a specific embodiment, the infra-frame prediction of each LCU and inter prediction are used for the Lagrange's multiplier of RDO
with
all be set to
with
with
be set to 5 and 1 respectively.Continuous refusal number of times Tr and iterations Ti is all initialized as 0.
Then, in specific implementation process, the present invention proposes, and for infra-frame prediction, can use and minimize in formula (8)
cost criterion selects candidate pattern from multiple intra prediction mode, then from candidate pattern, selects optimum frame inner estimation mode according to formula (1); For inter prediction, use and minimize in formula (9)
cost criterion chooses optimum MV, then from each inter-frame mode, selects best inter-frame forecast mode according to formula (1).
Wherein,
represent the rough rate distortion costs of inter prediction and infra-frame prediction respectively, D
intraand D
interbe respectively the prediction residual distortion of infra-frame prediction and inter prediction, available predictions value and original value absolute length chang represent.R
intraand D
interrepresent bit rate needed for other information of forecastings of encoding except residual information in infra-frame prediction and inter prediction respectively.
From optimum frame inner estimation mode and optimum frame inner estimation mode, select optimal mode to carry out predicting, after entropy code, obtain bit needed for this frame of current coding, as with reference to bit rate R
0.
Step S2, with change described frame of video K LCU described in
with
carry out infra-frame prediction and inter prediction, select optimum frame inner estimation mode and best inter-frame forecast mode, from this optimum frame inner estimation mode and best inter-frame forecast mode, select optimal mode for coding, bit rate needed for this frame of calculation code, be natural number as current bit rate R ', K.
In a particular embodiment, the value of K can not be too little, otherwise finally cannot obtain best parameter group; Can not be too large, otherwise the complexity calculated will be very high.K can be the number of the contained LCU of each row of described frame of video.
Step S3, calculate difference DELTA R between current bit rate and reference bits rate, accept according to predetermined rule or refusal change after described in
with
and when accepting using current bit rate as with reference to bit rate.
Specifically, Δ R=R '-R is utilized
0calculated difference Δ R.If Δ R≤0, then accept described in after change
with
otherwise with exp (-Δ R/R
0) probability accept described in
with
described in acceptance
with
time, make R
0=R '.
Step S4, to judge whether without the need to described in changing again
with
when without the need to changing again, then by current
with
as final
with
otherwise return step S2.
A kind of execution mode is, records in iterations Ti and iterative process described in refusing continuously
with
number of times Tr, if iterations Ti reaches an iterations threshold value, or continuously refusal number of times Tr reaches one and refuses frequency threshold value continuously, then by current
with
as final
with
in a particular embodiment, can initialization Ti and Tr be 0 in step sl.When carrying out iteration, during each iteration, iterations Ti is added 1.If described in
with
be accepted, be then set to 0 by refusing number of times Tr continuously, otherwise add 1 by refusing number of times Tr continuously.Described THi span can be [1,1000], and described THr span can be [1,50].
For HEVC lossless video encoding method of the present invention, selected by above-mentioned predicting mode selecting method
with
carry out lossless video encoding.
Embodiment
In order to verify beneficial effect of the present invention, up-to-date HEVC identifying code HM10.0 achieves the method, and with identifying code in original skip convert, quantize, the lossless coding method of filtering contrasts.In simulation comparison, adopt document (F.Bossen, " Common Test Conditions and Software Reference Configurations; " JCT-VC document, JCTVC-L1100, Geneva, Jan.2013) in the cycle tests that provides and test condition as simulation comparison environment.Wherein, we have employed three coding environments, i.e. Stochastic accessing master file coding (Random Access Main Profile encoding, RA-Main), low delay B master file coding (Lowdelay B Main Profile encoding, LDB-Main) and low delay P master file coding (Lowdelay P Main Profile encoding, LDP-Main).We test to F class all videos sequence category-A, wherein F class is screen recording video sequence, the resolution of contained sequence is different, and there is 1280 × 720,1024 × 768 and more than 832 × 480 kind of resolution, the resolution of the video sequence of other classifications is as shown in table 1.Because the default code mode in reference software HM10.0 is lossy coding, we need the traffic sign placement indicating whether to carry out lossless coding in configuration file is 1, namely carries out lossless coding.
All kinds of cycle tests of table 1
Sequence type | Resolution |
Category-A | 2560×1600 |
Category-B | 1920×1080 |
C class | 832×480 |
D class | 416×240 |
E class | 1280×720 |
Table 2-4 sets forth under RA-Main, LDB-Main and LDP-Main tri-kinds of coding environments, the bit rate of the method that HM 10.0 Central Plains has lossless coding method and the present invention to propose, and wherein bit rate saving rate is obtained by following formula:
Bit rate variation rate=100 × (bit rate of the present invention-original method bit rate)/original method bit rate %.
Experimental result under table 2RA-Main configuration surroundings
Experimental result under table 3LDB-Main configuration surroundings
Experimental result under table 4LDP-Main configuration surroundings
By table 2-4, we can find out, the method for Lossless Compression in relative HM10.0, and coding bit rate of the present invention has had very large reduction.Under three kinds of coding environments, the bit rate of the inventive method on average reduces 1.2-1.4%, particularly F class testing sequence, which gives and on average saves up to the bit rate of 2.5-2.9%.
Above-described specific embodiment; object of the present invention, technical scheme and beneficial effect are further described; be understood that; the foregoing is only specific embodiments of the invention; be not limited to the present invention; within the spirit and principles in the present invention all, any amendment made, equivalent replacement, improvement etc., all should be included within protection scope of the present invention.
Claims (10)
1. a predicting mode selecting method for HEVC lossless video encoding, comprises the following steps of carrying out successively:
S1, for a frame of video, the infra-frame prediction of each LCU of frame of video and inter prediction are used for the Lagrange's multiplier of RDO
with
initialization, and carry out infra-frame prediction and inter prediction, select optimum frame inner estimation mode and best inter-frame forecast mode, from optimum frame inner estimation mode and best inter-frame forecast mode, select optimal mode for coding, bit rate needed for this frame of calculation code, as initial reference bits rate R
0, i, j represent the position coordinates of LCU;
S2, change described frame of video K LCU described in
with
carry out infra-frame prediction and inter prediction, select optimum frame inner estimation mode and best inter-frame forecast mode, from optimum frame inner estimation mode and best inter-frame forecast mode, select optimal mode for coding, the bit rate needed for this frame of video of calculation code, be natural number as current bit rate R ', K;
S3, calculate difference DELTA R between current bit rate and reference bits rate, accept according to predetermined rule or refusal change after described in
with
and when accepting using current bit rate as with reference to bit rate;
S4, to judge whether without the need to described in changing again
with
when without the need to changing again, then by current
with
as final
with
otherwise return step S2.
2. the predicting mode selecting method of HEVC lossless video encoding according to claim 1, is characterized in that, in step sl, and described Lagrange's multiplier
with
be initialized as
with
described
span is [3,8], described in
span is [0.5,1.5].
3. the predicting mode selecting method of HEVC lossless video encoding according to claim 1, is characterized in that, in step sl, for infra-frame prediction, uses and minimizes in formula (8)
cost criterion selects candidate pattern from multiple intra prediction mode, then from candidate pattern, selects optimum frame inner estimation mode according to formula (1), and formula is as follows:
RD cost=D+λR (1)
Wherein,
represent the rough rate distortion costs of infra-frame prediction, D
intrafor the prediction residual distortion of infra-frame prediction; R
intrabit rate needed for other information of forecastings of encoding except residual information in expression infra-frame prediction; λ is Lagrange's multiplier; D is the actual residual error distortion of infra-frame prediction, and R is actual coding bit rate, and RD cost represents actual rate distortion cost.
4. the predicting mode selecting method of HEVC lossless video encoding according to claim 1, is characterized in that, in step sl, for inter prediction, uses and minimizes in formula (9)
cost criterion chooses optimum MV and corresponding reference frame, then from each inter-frame mode, selects best inter-frame forecast mode according to formula (1), and formula is as follows:
RD cost=D+λR (1)
Wherein,
represent the rough rate distortion costs of inter prediction, D
interfor the prediction residual distortion of inter prediction, R
interbit rate needed for other information of forecastings of encoding except residual information in expression inter prediction, λ is Lagrange's multiplier, and D is the actual residual error distortion of infra-frame prediction; R is actual coding bit rate, and RD cost represents actual rate distortion cost.
5. the predicting mode selecting method of HEVC lossless video encoding according to claim 1, is characterized in that, in step s 2, K is the number of the contained LCU of each row of described frame of video.
6. the predicting mode selecting method of HEVC lossless video encoding according to claim 1, is characterized in that, in step s3, if Δ R≤0, then accepts described in after change
with
otherwise with exp (-Δ R/R
0) probability accept described in
with
7. the predicting mode selecting method of HEVC lossless video encoding according to claim 1, is characterized in that, step S3 is in: record iterations Ti and iterative process continuously described in refusal
with
number of times Tr, if iterations Ti reaches an iterations threshold value THi, or continuously refusal number of times Tr reaches a refusal frequency threshold value THr continuously, then by current
with
as final
with
8. the predicting mode selecting method of HEVC lossless video encoding according to claim 7, is characterized in that, described THi span is [1,1000], and described THr span is [1,50].
9. the predicting mode selecting method of HEVC lossless video encoding according to claim 7, is characterized in that, also comprises be initialized as 0 to described iterations Ti and continuous refusal number of times Tr in step S1.
10. a HEVC lossless video encoding method, is characterized in that, comprises the predicting mode selecting method of the HEVC lossless video encoding according to any one of claim 1-9.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410609275.5A CN104320657B (en) | 2014-10-31 | 2014-10-31 | The predicting mode selecting method of HEVC lossless video encodings and corresponding coding method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410609275.5A CN104320657B (en) | 2014-10-31 | 2014-10-31 | The predicting mode selecting method of HEVC lossless video encodings and corresponding coding method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN104320657A true CN104320657A (en) | 2015-01-28 |
CN104320657B CN104320657B (en) | 2017-11-03 |
Family
ID=52375818
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410609275.5A Active CN104320657B (en) | 2014-10-31 | 2014-10-31 | The predicting mode selecting method of HEVC lossless video encodings and corresponding coding method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104320657B (en) |
Cited By (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105959611A (en) * | 2016-07-14 | 2016-09-21 | 同观科技(深圳)有限公司 | Adaptive H264-to-HEVC (High Efficiency Video Coding) inter-frame fast transcoding method and apparatus |
CN108347602A (en) * | 2017-01-22 | 2018-07-31 | 上海澜至半导体有限公司 | Method and apparatus for lossless compression video data |
CN109361924A (en) * | 2018-10-26 | 2019-02-19 | 西安科锐盛创新科技有限公司 | Image encoding method and device |
CN109547780A (en) * | 2018-10-26 | 2019-03-29 | 西安科锐盛创新科技有限公司 | Image encoding method and device |
CN109660806A (en) * | 2018-12-27 | 2019-04-19 | 上海众源网络有限公司 | A kind of coding method and device |
CN110300310A (en) * | 2018-03-23 | 2019-10-01 | 华为技术有限公司 | Image encoding method and device |
CN110381323A (en) * | 2018-04-12 | 2019-10-25 | 福州瑞芯微电子股份有限公司 | Frame motion vector information lossless compressibility and method are assisted based on inter-prediction |
US10797723B2 (en) | 2017-03-14 | 2020-10-06 | International Business Machines Corporation | Building a context model ensemble in a context mixing compressor |
CN111882564A (en) * | 2020-07-27 | 2020-11-03 | 山东大学 | Compression processing method for ultra-high definition medical pathological image |
CN112118444A (en) * | 2019-06-20 | 2020-12-22 | 杭州海康威视数字技术股份有限公司 | Encoding method and device |
CN114762336A (en) * | 2019-10-05 | 2022-07-15 | Lg电子株式会社 | Image or video coding based on signaling of transform skip and palette coding related information |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1708991A (en) * | 2002-11-08 | 2005-12-14 | 苹果电脑有限公司 | Method and apparatus for control of rate-distortion tradeoff by using Lagrange multiplier and visual mask |
CN1846446A (en) * | 2003-09-03 | 2006-10-11 | 汤姆森许可贸易公司 | Process and arrangement for encoding video pictures |
CN101651831A (en) * | 2003-01-08 | 2010-02-17 | 苹果公司 | Method and apparatus for improved coding mode selection |
CN101960466A (en) * | 2007-09-11 | 2011-01-26 | 彩升集团有限公司 | Rate distortion optimization for inter mode generation for error resilient video coding |
CN102625102A (en) * | 2011-12-22 | 2012-08-01 | 北京航空航天大学 | H.264/scalable video coding medius-grain scalability (SVC MGS) coding-oriented rate distortion mode selection method |
-
2014
- 2014-10-31 CN CN201410609275.5A patent/CN104320657B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1708991A (en) * | 2002-11-08 | 2005-12-14 | 苹果电脑有限公司 | Method and apparatus for control of rate-distortion tradeoff by using Lagrange multiplier and visual mask |
CN101651831A (en) * | 2003-01-08 | 2010-02-17 | 苹果公司 | Method and apparatus for improved coding mode selection |
CN1846446A (en) * | 2003-09-03 | 2006-10-11 | 汤姆森许可贸易公司 | Process and arrangement for encoding video pictures |
CN101960466A (en) * | 2007-09-11 | 2011-01-26 | 彩升集团有限公司 | Rate distortion optimization for inter mode generation for error resilient video coding |
CN102625102A (en) * | 2011-12-22 | 2012-08-01 | 北京航空航天大学 | H.264/scalable video coding medius-grain scalability (SVC MGS) coding-oriented rate distortion mode selection method |
Cited By (19)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105959611A (en) * | 2016-07-14 | 2016-09-21 | 同观科技(深圳)有限公司 | Adaptive H264-to-HEVC (High Efficiency Video Coding) inter-frame fast transcoding method and apparatus |
CN105959611B (en) * | 2016-07-14 | 2018-09-21 | 同观科技(深圳)有限公司 | A kind of the interframe fast transcoding method and device of adaptive slave H264 to HEVC |
CN108347602A (en) * | 2017-01-22 | 2018-07-31 | 上海澜至半导体有限公司 | Method and apparatus for lossless compression video data |
US10797723B2 (en) | 2017-03-14 | 2020-10-06 | International Business Machines Corporation | Building a context model ensemble in a context mixing compressor |
CN110300310B (en) * | 2018-03-23 | 2021-01-15 | 华为技术有限公司 | Image coding method, device and computer storage medium |
CN110300310A (en) * | 2018-03-23 | 2019-10-01 | 华为技术有限公司 | Image encoding method and device |
CN110381323B (en) * | 2018-04-12 | 2021-10-26 | 福州瑞芯微电子股份有限公司 | Inter-frame prediction-based lossless compression system and method for assisting frame motion vector information |
CN110381323A (en) * | 2018-04-12 | 2019-10-25 | 福州瑞芯微电子股份有限公司 | Frame motion vector information lossless compressibility and method are assisted based on inter-prediction |
CN109547780B (en) * | 2018-10-26 | 2020-06-23 | 武汉天娱动画设计有限公司 | Image coding method and device |
CN109361924B (en) * | 2018-10-26 | 2020-11-10 | 西安科锐盛创新科技有限公司 | Image coding method and device |
CN109547780A (en) * | 2018-10-26 | 2019-03-29 | 西安科锐盛创新科技有限公司 | Image encoding method and device |
CN109361924A (en) * | 2018-10-26 | 2019-02-19 | 西安科锐盛创新科技有限公司 | Image encoding method and device |
CN109660806A (en) * | 2018-12-27 | 2019-04-19 | 上海众源网络有限公司 | A kind of coding method and device |
CN109660806B (en) * | 2018-12-27 | 2021-01-29 | 上海众源网络有限公司 | Encoding method and device and electronic equipment |
CN112118444A (en) * | 2019-06-20 | 2020-12-22 | 杭州海康威视数字技术股份有限公司 | Encoding method and device |
CN112118444B (en) * | 2019-06-20 | 2022-11-25 | 杭州海康威视数字技术股份有限公司 | Encoding method and device |
CN114762336A (en) * | 2019-10-05 | 2022-07-15 | Lg电子株式会社 | Image or video coding based on signaling of transform skip and palette coding related information |
CN114762336B (en) * | 2019-10-05 | 2024-03-26 | Lg电子株式会社 | Image or video coding based on signaling of transform skip and palette coding related information |
CN111882564A (en) * | 2020-07-27 | 2020-11-03 | 山东大学 | Compression processing method for ultra-high definition medical pathological image |
Also Published As
Publication number | Publication date |
---|---|
CN104320657B (en) | 2017-11-03 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104320657B (en) | The predicting mode selecting method of HEVC lossless video encodings and corresponding coding method | |
US7792193B2 (en) | Image encoding/decoding method and apparatus therefor | |
US9118921B2 (en) | Image encoding/decoding method and device | |
KR100953152B1 (en) | Method and Apparatus for selecting macroblock quantization parameters in a video encoder | |
CN102845060B (en) | Data compression for video | |
CN103918262B (en) | Code rate distortion optimization based on structural similarity perceives method for video coding and system | |
US10091526B2 (en) | Method and apparatus for motion vector encoding/decoding using spatial division, and method and apparatus for image encoding/decoding using same | |
KR100739714B1 (en) | Method and apparatus for intra prediction mode decision | |
CN102740077B (en) | H.264/AVC standard-based intra-frame prediction mode selection method | |
CN102334337A (en) | Apparatus and method for coding/decoding image selectivly using descrete cosine/sine transtorm | |
CN102939753A (en) | Method and apparatus for encoding video by compensating for pixel value according to pixel groups, and method and apparatus for decoding video by the same | |
CN101796847A (en) | Video image encoding method, video image decoding method, video image encoding apparatus, video image decoding apparatus, program and integrated circuit | |
JPH10126793A (en) | Video predictive encoder and its method | |
CN102640495A (en) | Motion vector encoding/decoding method and device and image encoding/decoding method and device using same | |
US20050243930A1 (en) | Video encoding method and apparatus | |
CN106791848B (en) | Two-Pass code rate control method based on HEVC | |
KR20090087767A (en) | Method for predictive intra coding for image data | |
CN107040785A (en) | The method and apparatus of image decoding and Image Coding | |
CN103581670A (en) | H.264 self-adaptation intra-frame mode selection code rate estimated rate-distortion optimization method and device thereof | |
CN1194544C (en) | Video encoding method based on prediction time and space domain conerent movement vectors | |
CN103634608B (en) | Residual error transformation method of high-performance video coding lossless mode | |
CN101651831B (en) | Method and apparatus for improved coding mode selection | |
CN104320660B (en) | Rate-distortion optimization method and coding method for lossless video encoding | |
CN112887714B (en) | Video coding bit resource reallocation method | |
CN104796704B (en) | A kind of macro-block level bit rate control method for scalable video |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |