CN108900840A - For hard-wired H264 macro-block level bit rate control method - Google Patents

For hard-wired H264 macro-block level bit rate control method Download PDF

Info

Publication number
CN108900840A
CN108900840A CN201810750088.7A CN201810750088A CN108900840A CN 108900840 A CN108900840 A CN 108900840A CN 201810750088 A CN201810750088 A CN 201810750088A CN 108900840 A CN108900840 A CN 108900840A
Authority
CN
China
Prior art keywords
module
macro
quantization parameter
macro block
block
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
Application number
CN201810750088.7A
Other languages
Chinese (zh)
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.)
Zhuhai Wisdom Electronic Technology Co Ltd
Original Assignee
Zhuhai Wisdom Electronic Technology 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 Zhuhai Wisdom Electronic Technology Co Ltd filed Critical Zhuhai Wisdom Electronic Technology Co Ltd
Priority to CN201810750088.7A priority Critical patent/CN108900840A/en
Publication of CN108900840A publication Critical patent/CN108900840A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods 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/17Methods 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/176Methods 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods 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/124Quantisation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/164Feedback from the receiver or from the transmission channel
    • H04N19/166Feedback from the receiver or from the transmission channel concerning the amount of transmission errors, e.g. bit error rate [BER]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/42Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by implementation details or hardware specially adapted for video compression or decompression, e.g. dedicated software implementation

Abstract

The invention discloses one kind to be directed to hard-wired H264 macro-block level bit rate control method, including realizes H264 hardware encoding using 5 level production lines, specifically includes IME module, FME module, IPTQ module, DBK module and EE module and WBK module.The hardware realization macro-block level bit rate control method mainly includes:In computing macro block quantization parameter QP, it is divided into 2 grades, the texture information for first passing through macro block calculates rough quantization parameter coarse_qp, this value is only used for IME module and FME module, after the macro block (mb) type of macro block has been determined, the mad value of macro block is available, the quantization parameter mb_qp of macro block is recalculated according to the mad value of macro block, this value is for IPTQ module, DBK module and the processing of EE module arithmetic.Inventive process avoids macroblock quantization parameter QP complicated in JVT-G012 algorithm calculating, and algorithm is simple, is easy to hardware realization.

Description

For hard-wired H264 macro-block level bit rate control method
Technical field
It is specifically a kind of to be controlled for hard-wired H264 macro block level bit-rate the present invention relates to image algorithm coding field Method.
Background technique
In transmission of video, encode compressed code stream information usually need in limited and non-constant bandwidth network into Row transmission avoids receiving end since instantaneous code rate is excessively high, causes to receive to make the video flowing after coding well adapt to bandwidth It holds bit stream buffer buffer spilling or code rate too low, causes receiving end to play and phenomena such as Caton occur, it is therefore desirable in video During coding, code rate control is carried out to the video flowing of coding, so that can be more stable under certain bandwidth limitation Outputting video streams, while obtaining preferable video quality.
In the rate control algorithm of H264, due to having used quantization to join in code rate control and rate-distortion optimization link simultaneously Number, and then result in the laying hen antinomy in H264 encryption algorithm:When carrying out rate-distortion optimization to current macro, need first to calculate It obtains the MAD of current macro, and then the quantization parameter QP of current macro is obtained by rate-distortion optimization algorithm, and current macro MAD only known to the quantization parameter QP under the conditions of, by H264 encryption algorithm, select optimal coding mould for each macro block Formula, and then the MAD of each macro block can be just obtained, thus there is laying hen antinomy.In order to solve this problem, the official of H264 standard Side tissue JVT adopts a more outstanding code rate control motion JVT-G012, in this motion, by linear MAD model, Predict the MAD value of current macro, from the MAD value of former frame corresponding position macro block so as to avoid laying hen question of paradoxes.
Although the code rate in JVT-G012 algorithm very good solution H264 cataloged procedure controls laying hen question of paradoxes, by Be in this algorithm it is software-based, it is unfriendly to hardware realization, especially use this rate control algorithm in macroblock layer, hardware is real Now can be extremely complex, a large amount of resource is consumed, and in the hardware design, generally can be all designed using assembly line, it is related Parameter can have dependence, further increase hard-wired difficulty.
Summary of the invention
In order to solve the above-mentioned problems in the prior art, it is macro for hard-wired H264 that the present invention provides one kind Block level bit-rate control method, including using 5 level production lines realize H264 hardware encoding, specifically include IME module, FME module, IPTQ module, DBK module and EE module and WBK module.
Further, the IME module mainly realizes code rate control and whole pixel search.Code rate control, which is calculated, works as The rough quantization parameter coarse_qp of preceding macro block, this quantization parameter are only used for IME module and FME module, to current macro into After row mode decision obtains macro block (mb) type, the quantization parameter of macro block can be recalculated in IPTQ module.The calculating of coarse_qp according to According to the texture of current macro, to texture, complicated, details macro block abundant suitably increases quantization parameter on the basis of slice_qp, Macro block simple to texture, smooth suitably reduces quantization parameter on the basis of slice_qp.The texture of current macro, which calculates, to be calculated Method is fairly simple, and does not depend on periphery macro block, facilitates hardware realization.Whole pixel search is used in P/B frame, from reference frame It finds and most matched piece of current macro.Common searching algorithm has very much, and in order to facilitate hardware realization, diamond search can be selected (DS), after whole pixel search, the optimal piecemeal type of available current macro inter type and each piecemeal institute are right The optimal whole pixel mv information answered.
Further, the FME module mainly realizes brightness Intra prediction, divides pixel search, mode decision and change Change quantization, inverse quantization, inverse transformation and reconstruct.The coarse_qp that the quantization parameter that this step uses is calculated for IME module.It is bright Intra prediction is spent mainly to carry out the brightness data of current block in the frame of intra4x4, intra8x8 and intra16x16 in advance It surveys, chooses optimal prediction modes when current macro is encoded to intra type.Dividing pixel search is in the whole pixel search of upper level On the basis of, finer 1/2 and 1/4 search is carried out, the corresponding optimal mv information of each piecemeal type is found.Mode decision is calculated Method can compare the cost for being encoded to intra macro block (mb) type and inter macro block (mb) type, and choose the smallest cost as current macro Final type of coding.Change quantization and inverse quantization inverse transformation are a pair of of inverse operation, original image of the change quantization to current macro Element subtracts the difference value that predicted value obtains and carries out integer dct transform and quantization, obtains the residual error data to entropy coding, inverse quantization and Inverse transformation carries out inverse quantization to this residual error data and anti-dct is converted, in addition current macro luminance component can be obtained in predicted value Rebuild data, and then the available mad at the quantization parameter coarse_qp of current coarse.
Further, the IPTQ module is mainly realized macro block QP calculating, intra prediction, coloration inter interpolation, is become Change quantization, inverse quantization and inverse transformation and reconstruct.It is current macro after 2 grades of front IME module and the processing of FME module pipeline The macro block (mb) type of block has been finalized, and mad value of the macro block at quantization parameter coarse_qp is available, at this time basis This mad recalculates macro block more accurately quantization parameter mb_qp, this mb_qp value is the real quantization parameter of macro block, Calculation process is all carried out using this quantization parameter mb_qp during IPTQ module and subsequent DBK module, EE resume module. Intra prediction starts this treatment process when current macro is confirmed as intra macro block (mb) type, using new quantization parameter mb_ Qp recalculates intra type luma prediction value, while needing to be calculated the optimal intra prediction mode of chrominance block.Coloration Inter interpolation starts this treatment process when current macro is confirmed as inter macro block (mb) type, is obtained according to the mv information of brightness The mv information of coloration reads the chroma reference frame data of corresponding position according to this mv information from reference frame, completes interpolation arithmetic Obtain chromatic component interpolation result.Change quantization and inverse quantization inverse transformation are a pair of of inverse operations, and change quantization is to current macro Original pixels subtract the difference value that predicted value obtains and carry out integer dct transform and quantization, obtain the residual error data to entropy coding, instead Quantization and inverse transformation carry out inverse quantization and anti-dct transformation to this residual error data, in addition the weight of current macro can be obtained in predicted value Build data.
Further, the DBK module and EE module are mainly realized to the intra-loop filtering of current macro and to residual error Data carry out CABAC or CAVLC entropy coding.
Further, the WBK module mainly realizes that coded data include the data rebuild and encoding code stream number According to write-back is carried out, it is output in external DDR memory.
The beneficial effects of the invention are as follows:
(1)The present invention provides one kind to be directed to hard-wired H264 macro-block level bit rate control method, in hardware realization macro-block level Bite rate control, when computing macro block quantization parameter QP, be divided into 2 grades, rough quantization parameter coarse_qp first calculated, in IME mould Block and FME module are obtained in FME module by mode decision using this rough quantization parameter coarse_qp progress calculation process To after the macro block (mb) type of current macro, mad value of the macro block at quantization parameter coarse_qp is available, is counted again according to mad The more accurate quantization parameter mb_qp for calculating macro block, during IPTQ module and subsequent DBK module, EE resume module Calculation process is all carried out using this quantization parameter mb_qp.It is divided into 2 grades by the way that the bite rate control of macro-block level is calculated quantization parameter QP Processing, for preceding 2 level production line using rough quantization parameter coarse_qp, latter 2 grades use more accurate quantization parameter mb_qp, The realization of hardware is greatly facilitated on the basis of guaranteeing coding efficiency.
(2)When calculating rough quantization parameter coarse_qp, according to the texture of current macro, calculate simply, and not Periphery macro block is relied on, hardware realization is facilitated.
Detailed description of the invention
Fig. 1 is H264 coded macroblocks assembly line schematic diagram in the present invention.
Fig. 2 is H264 encryption algorithm frame diagram in the present invention.
Fig. 3 is that H264 coding divides pixel search algorithm schematic diagram in the present invention.
The present invention is described further with reference to the accompanying drawings and embodiments.
Specific embodiment
In the present invention, in order to reduce complexity, facilitate hardware realization, 5 level production lines are used to H264 encryption algorithm It realizes, as shown in Figure 1, respectively IME module, FME module, IPTQ module, DBK module and EE module, WBK module, wherein DBK module and EE module are in same assembly line.Synchronization, each module on 5 level production lines are working, but handle It is different macro blocks, when IME module starts to carry out whole pixel search to n-th of macro block, FME module has just just started macro to (n-1)th Block carries out a point pixel search, and IPTQ module starts to handle the n-th -2 macro blocks, has arrived DBK module and EE module, starts pair The n-th -3 macro blocks carry out intra-loop filtering and entropy coding operation, the number that last WBK module obtains the n-th -4 macroblock codings According to write-back is carried out, this level production line has been arrived, has just really completed the coding work of a macro block.The algorithm that each level production line is realized Function as shown in Figure 2, is described below in detail.
(1)IME module
IME module is in the 1st grade of assembly line, and the algorithm function point mainly realized has code rate control and whole pixel search.Macro It before block flowing water starts, needs to obtain the quantization parameter QP of current macro by rate control algorithm, is searched in next whole pixel Suo Zhong calculates optimal match point and needs to use this quantization parameter QP.Due to the bite rate control motion JVT- adopted in H264 official In G012, calculating current macro quantization parameter QP is excessively complicated, is not suitable for hardware realization, uses a set of simplification in the present invention Rate control algorithm calculates the QP of current macro.
The mean value y_avg and each pixel for calculating current macro luminance component first subtract the absolute value after mean value it is cumulative and Y_sum, calculation formula are as follows:
The mean value u_avg and v_avg of chromatic component is obtained using same algorithm and chromatic component subtract it is absolute after mean value Value is cumulative and u_sum and v_sum, calculation formula are as follows:
The absolute value of cumulative tri- components of y, u, v, obtains the total accumulated value total_sum of current macro, calculation formula is as follows:
Total accumulated value total_sum reflects whether current macro is that smooth block or texture block are calculated if it is texture block Obtained total_sum can be bigger than normal, appropriate on the basis of slice_qp to increase currently by being compared with 3 threshold values The QP of macro block;If it is smooth block, total_sum can be smaller, and same and 3 threshold values are compared, in the base of slice_qp The QP appropriate for reducing current macro on plinth, to dynamically adjust the quantization parameter QP of macro block.Calculation formula is as follows:
if(total_sum <= RC_MB_TH0)
{
coarse_qp = slice_qp - RC_MB_QP_OFFSET0;
}
else if (total_sum <= RC_MB_TH1)
{
coarse_qp = slice_qp - RC_MB_QP_OFFSET1;
}
else if (total_sum <= RC_MB_TH2)
{
coarse_qp = slice_qp - RC_MB_QP_OFFSET2;
}
else if (total_sum <= RC_MB_TH3)
{
coarse_qp = slice_qp + RC_MB_QP_OFFSET3;
}
else if (total_sum <= RC_MB_TH4)
{
coarse_qp = slice_qp + RC_MB_QP_OFFSET4;
}
else if (total_sum <= RC_MB_TH5)
{
coarse_qp = slice_qp + RC_MB_QP_OFFSET5;
}
else
{
coarse_qp = slice_qp + RC_MB_QP_OFFSET6;
}
Wherein, slice_qp is the quantization parameter for the current slice that software is calculated, threshold value RC_MB_TH0 to RC_MB_TH5 And deviant RC_MB_QP_OFFSET0 to the RC_MB_QP_OFFSET6 of quantization parameter is by register configuration to hard Part facilitates hardware to adapt to different scenes so as to flexible configuration.Under general application scenarios, by experiment, threshold value RC_MB_TH0 It can be configured to be worth as follows to RC_MB_TH5:
RC_MB_TH0 = (unsigned int ) (0.4 * last_pic_avg_sum)
RC_MB_TH1 = (unsigned int ) (0.6 * last_pic_avg_sum)
RC_MB_TH2 = (unsigned int ) (0.8 * last_pic_avg_sum)
RC_MB_TH3 = (unsigned int ) (1.2 * last_pic_avg_sum)
RC_MB_TH4 = (unsigned int ) (1.6 * last_pic_avg_sum)
RC_MB_TH5 = (unsigned int ) (2.0 * last_pic_avg_sum)
Wherein last_pic_avg_sum is the mean value of the total_sum of all macro blocks in previous frame.
RC_MB_QP_OFFSET0 to RC_MB_QP_OFFSET6 can be configured to be worth as follows:
RC_MB_QP_OFFSET0 = 3
RC_MB_QP_OFFSET1 = 2
RC_MB_QP_OFFSET2 = 1
RC_MB_QP_OFFSET3 = 0
RC_MB_QP_OFFSET4 = 1
RC_MB_QP_OFFSET5 = 2
RC_MB_QP_OFFSET6 = 3
The quantization parameter QP that the control of this level production line code rate is calculated is more rough coarse_qp, is not real macro block Quantization parameter QP, be used only in IME module and FME module, the quantization parameter mb_qp of real macro block can basis in IPTQ module The mad of macro block recalculates to obtain.
Whole pixel search is used in P/B frame, is found from reference frame and most matched piece of current macro.Common search Algorithm has full search(FS), three-wave mixing(TSS), new three-wave mixing(NTSS), four-step search(FSS), diamond search(DS)Deng, In order to facilitate hardware realization, diamond search can be selected(DS), this algorithm comparison is general, is not repeated herein.It is searched by whole pixel Suo Hou can obtain optimal whole pixel mv letter corresponding to the optimal piecemeal type of current macro inter type and each piecemeal Breath(bestmv_ime_x,bestmv_ime_y).
(2)FME module
FME module is in the 2nd grade of assembly line, the algorithm function point mainly realized have brightness Intra prediction, minute pixel search, Mode decision and change quantization, inverse quantization, inverse transformation and reconstruct.Brightness Intra is predicted mainly to the brightness data of current block The intra prediction of intra4x4, intra8x8 and intra16x16 are carried out, and according to cost=satd+lamda * Bit chooses optimal prediction modes when the smallest cost is encoded to intra type as current macro.Pixel search is divided to be used for On the basis of upper level assembly line whole pixel search, each piecemeal is more accurately matched with reference frame.First with whole picture Vegetarian refreshments(bestmv_ime_x,bestmv_ime_y)Centered on, 8, periphery, 1/2 pixel is found, as shown in figure 3, carrying out a point picture Element search, obtains 1/2 optimal pixel matching point, and judgment criteria equally uses cost=satd+lamda * bit, chooses The smallest 1/2 pixel of cost is as optimal match point, if 1/2 pixel in the upper left corner is optimal, is then put again with this and is The heart finds 4, periphery, 1/4 pixel, carries out the pixel search that divides of a new round, and judgment criteria and 1/2 pixel search are completely the same, To find Optimum Matching point, the corresponding optimal mv information of this piecemeal type is obtained.Above-mentioned 1/2 search is carried out to each piecemeal With 1/4 search, the most optimal sorting pixel mv information of all piecemeals under current macro inter type is obtained(bestmv_fme_x, bestmv_fme_y), the cost to add up under all inter piecemeal types, the cost as current macro inter type.Mode Decision making algorithm can compare the optimal cost for being encoded to intra macro block (mb) type and be encoded to the cost of inter macro block (mb) type, and choose Type of coding the smallest cost final as current macro.Change quantization and inverse quantization inverse transformation are a pair of of inverse operations, transformation Quantify to subtract the original pixels of current macro the difference value progress integer dct transform and quantization that predicted value obtains, obtain to entropy The residual error data of coding, inverse quantization and inverse transformation carry out inverse quantization to this residual error data and anti-dct is converted, in addition predicted value The reconstruction data of current macro luminance component are obtained, and then available at the quantization parameter coarse_qp of current coarse mad。
(3)IPTQ module
IPTQ module is in the 3rd level of assembly line, and the algorithm function point mainly realized has macro block QP to calculate, intra is predicted, coloration Inter interpolation, change quantization, inverse quantization and inverse transformation and reconstruct.At 2 grades of front IME module and FME module pipeline After reason, the macro block (mb) type of current macro has been finalized, simultaneously, if it is determined that is intra type, corresponding optimum prediction Mode is that intra4x4, intra8x8 or intra16x16 are also finally determined together, if it is determined that it is inter type, Inter macroblock mode is also finalized.After determining the macro block (mb) type of current macro, so that it may be calculated in current coarse Quantization parameter coarse_qp under current macro mad value, calculation formula is as follows:
Wherein pred (i, j) is intra predicted value when current macro is encoded to intra type or is encoded to inter type When, result that each piecemeal is obtained according to optimal mv interpolation.
After obtaining the mad value of macro block, so that it may the quantization parameter QP of macro block be calculated according to mad, calculation formula is as follows:
if(mad <= RC_MB_MAD_TH0)
{
mb_qp = slice_qp - RC_MB_QP_DELTA0;
}
else if(mad <= RC_MB_MAD_TH1)
{
mb_qp = slice_qp - RC_MB_QP_DELTA1;
}
else if(mad <= RC_MB_MAD_TH2)
{
mb_qp = slice_qp - RC_MB_QP_DELTA2;
}
else if(mad <= RC_MB_MAD_TH3)
{
mb_qp = slice_qp - RC_MB_QP_DELTA3;
}
else if(mad <= RC_MB_MAD_TH4)
{
mb_qp = slice_qp - RC_MB_QP_DELTA4;
}
else if(mad <= RC_MB_MAD_TH5)
{
mb_qp = slice_qp + RC_MB_QP_DELTA5;
}
else if(mad <= RC_MB_MAD_TH6)
{
mb_qp = slice_qp + RC_MB_QP_DELTA6;
}
else if(mad <= RC_MB_MAD_TH7)
{
mb_qp = slice_qp + RC_MB_QP_DELTA7;
}
else if(mad <= RC_MB_MAD_TH8)
{
mb_qp = slice_qp + RC_MB_QP_DELTA8;
}
else
{
mb_qp = slice_qp + RC_MB_QP_DELTA9;
}
Deviant RC_MB_QP_DELTA0 to the RC_ of threshold value RC_MB_MAD_TH0 to RC_MB_MAD_TH8 and quantization parameter MB_QP_DELTA9 is to facilitate hardware to adapt to different scenes so as to flexible configuration to hardware by register configuration.General Application scenarios under, by experiment, threshold value RC_MB_MAD_TH0 to RC_MB_MAD_TH8 can be configured to be worth as follows:
RC_MB_ MAD_TH0 = (unsigned int ) (0.1 * last_pic_avg_mad)
RC_MB_ MAD_TH1 = (unsigned int ) (0.2 * last_pic_avg_mad)
RC_MB_ MAD_TH2 = (unsigned int ) (0.3 * last_pic_avg_mad)
RC_MB_ MAD_TH3 = (unsigned int ) (0.4 * last_pic_avg_mad)
RC_MB_ MAD_TH4 = (unsigned int ) (0.5 * last_pic_avg_mad)
RC_MB_ MAD_TH5 = (unsigned int ) (2.0 * last_pic_avg_mad)
RC_MB_ MAD_TH6 = (unsigned int ) (3.0 * last_pic_avg_mad)
RC_MB_ MAD_TH7 = (unsigned int ) (4.0 * last_pic_avg_mad)
RC_MB_ MAD_TH8 = (unsigned int ) (6.0 * last_pic_avg_mad)
Wherein last_pic_avg_ mad is the mean value of the mad of all macro blocks of previous frame.
RC_MB_QP_ DELTA0 to RC_MB_QP_ DELTA9 can be configured to be worth as follows:
RC_MB_QP_ DELTA0 = 5
RC_MB_QP_ DELTA1 = 4
RC_MB_QP_ DELTA2 = 3
RC_MB_QP_ DELTA3 = 2
RC_MB_QP_ DELTA4 = 1
RC_MB_QP_ DELTA5 = 0
RC_MB_QP_ DELTA6 = 1
RC_MB_QP_ DELTA7 = 2
RC_MB_QP_ DELTA8 = 3
RC_MB_QP_ DELTA9 = 4
The QP that this step is calculated is that the real quantization parameter QP of macro block is used during subsequent pipeline processes This QP is calculated.
Intra prediction starts this treatment process when current macro is confirmed as intra macro block (mb) type, using new amount Change parameter mb_qp and recalculate intra type luma prediction value, while needing to be calculated the optimal intra prediction of chrominance block Mode.Coloration inter interpolation starts this treatment process when current macro is confirmed as inter macro block (mb) type, according to brightness Mv information obtains the mv information of coloration, reads the chroma reference frame data of corresponding position from reference frame according to this mv information, complete Chromatic component interpolation result is obtained at interpolation arithmetic.Change quantization and inverse quantization inverse transformation are a pair of of inverse operation, change quantization pair The original pixels of current macro subtract the difference value that predicted value obtains and carry out integer dct transform and quantization, obtain to entropy coding Residual error data, inverse quantization and inverse transformation carry out inverse quantization to this residual error data and anti-dct is converted, and works as in addition predicted value can be obtained The reconstruction data of preceding macro block.
(4)DBK module and EE module
DBK module and EE module are in the 4th grade of assembly line together, are respectively completed the ring to current macro according to H264 algorithm flow It is interior to filter and CABAC or CAVLC entropy coding is carried out to residual error data.
(5)WBK module
WBK module is in the afterbody of assembly line, includes mainly the yuv data and encoding code stream number rebuild to coded data According to write-back is carried out, it is output in external DDR memory.
The above is only the preferred embodiment of the present invention, it is noted that for those skilled in the art, is not being taken off Under the premise of from the principle of the invention, several improvement can also be made, these improvement also should be regarded as the scope of the present invention.

Claims (6)

1. being directed to hard-wired H264 macro-block level bit rate control method, including H264 hardware encoding is realized using 5 level production lines, Specifically include IME module, FME module, IPTQ module, DBK module and EE module and WBK module.
2. being directed to hard-wired H264 macro-block level bit rate control method as described in claim 1, it is characterised in that:In hardware The bite rate control for realizing macro-block level when computing macro block quantization parameter QP, is divided into 2 grades, first calculates rough quantization parameter coarse_ Qp, the rear more accurate quantization parameter mb_qp of calculating ratio.
3. being directed to hard-wired H264 macro-block level bit rate control method as described in claim 1, it is characterised in that:It calculates To rough quantization parameter coarse_qp be used only in IME module and FME module.
4. being directed to hard-wired H264 macro-block level bit rate control method as described in claim 1, it is characterised in that:It calculates The more accurate quantization parameter mb_qp arrived is used in IPTQ module, DBK module and EE module.
5. calculating rough quantization parameter coarse_qp as claimed in claim 2, it is characterised in that:According to current macro Texture, to texture, complicated, details macro block abundant suitably increases quantization parameter on the basis of slice_qp, simple to texture, Smooth macro block suitably reduces quantization parameter on the basis of slice_qp.
6. the more accurate quantization parameter mb_qp of calculating ratio as claimed in claim 2, it is characterised in that:According to rough quantization Parameter coarse_qp has been finalized in the macro block (mb) type of macro block, after the mad value of macro block obtains, according to the mad of macro block Value recalculates the quantization parameter of macro block, obtains more accurate quantization parameter mb_qp.
CN201810750088.7A 2018-07-10 2018-07-10 For hard-wired H264 macro-block level bit rate control method Pending CN108900840A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810750088.7A CN108900840A (en) 2018-07-10 2018-07-10 For hard-wired H264 macro-block level bit rate control method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810750088.7A CN108900840A (en) 2018-07-10 2018-07-10 For hard-wired H264 macro-block level bit rate control method

Publications (1)

Publication Number Publication Date
CN108900840A true CN108900840A (en) 2018-11-27

Family

ID=64348978

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810750088.7A Pending CN108900840A (en) 2018-07-10 2018-07-10 For hard-wired H264 macro-block level bit rate control method

Country Status (1)

Country Link
CN (1) CN108900840A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114727108A (en) * 2021-01-04 2022-07-08 北京金山云网络技术有限公司 Quantization factor adjusting method and device, electronic equipment and storage medium
CN116055715A (en) * 2022-05-30 2023-05-02 荣耀终端有限公司 Scheduling method of coder and decoder and electronic equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101309422A (en) * 2008-06-23 2008-11-19 北京工业大学 Macroblock level quantized parameter process method and apparatus
CN102271248A (en) * 2011-08-15 2011-12-07 复旦大学 H.264/AVC (Advanced Video Coding) macroblock-level code rate control algorithm based on weight window models
US20120230400A1 (en) * 2011-03-10 2012-09-13 Microsoft Corporation Mean absolute difference prediction for video encoding rate control
CN104683806A (en) * 2015-02-28 2015-06-03 中国科学院长春光学精密机械与物理研究所 High-speed FPGA realization method applied to MQ arithmetic encoder based on deep running water
CN104796704A (en) * 2015-04-22 2015-07-22 哈尔滨工业大学 Microblock rate control method used for scalable video coding

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101309422A (en) * 2008-06-23 2008-11-19 北京工业大学 Macroblock level quantized parameter process method and apparatus
US20120230400A1 (en) * 2011-03-10 2012-09-13 Microsoft Corporation Mean absolute difference prediction for video encoding rate control
CN102271248A (en) * 2011-08-15 2011-12-07 复旦大学 H.264/AVC (Advanced Video Coding) macroblock-level code rate control algorithm based on weight window models
CN104683806A (en) * 2015-02-28 2015-06-03 中国科学院长春光学精密机械与物理研究所 High-speed FPGA realization method applied to MQ arithmetic encoder based on deep running water
CN104796704A (en) * 2015-04-22 2015-07-22 哈尔滨工业大学 Microblock rate control method used for scalable video coding

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
潘申欣: "面向低功耗H.264编码的参考帧有损压缩算法的设计及硬件实现", 《中国优秀硕士学位论文全文数据库信息科技辑》 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114727108A (en) * 2021-01-04 2022-07-08 北京金山云网络技术有限公司 Quantization factor adjusting method and device, electronic equipment and storage medium
CN116055715A (en) * 2022-05-30 2023-05-02 荣耀终端有限公司 Scheduling method of coder and decoder and electronic equipment
CN116055715B (en) * 2022-05-30 2023-10-20 荣耀终端有限公司 Scheduling method of coder and decoder and electronic equipment

Similar Documents

Publication Publication Date Title
CN102150427B (en) System and method for video encoding using adaptive loop filter
CN104185989B (en) For the improvement infra-frame prediction in lossless coding in the binaryzation scheme and HEVC of intra prediction
CN106170092B (en) Fast coding method for lossless coding
US10735725B2 (en) Boundary-intersection-based deblock filtering
CN113170143B (en) Encoder, decoder and corresponding deduction method of boundary strength of deblocking filter
CN101098473A (en) Picture coding method and apparatus
CA2886995C (en) Rate-distortion optimizers and optimization techniques including joint optimization of multiple color components
CN110365982A (en) The different transform of intraframe coding selects accelerated method in a kind of multipurpose coding
CN1568015A (en) Multiple visual-angle video coding-decoding prediction compensation method and apparatus
CN103442229B (en) The bit rate estimation method of SAO mode adjudgings suitable for the encoder of HEVC standard
KR20210064332A (en) Encoders, decoders and countermeasures using compact MV storage
CN108900840A (en) For hard-wired H264 macro-block level bit rate control method
CN117880499A (en) Deblocking filtering adaptive encoder, decoder and corresponding methods
CN101742288A (en) Video noise reduction encoding method and video noise reduction encoding device
CN102934445B (en) Based on the method and apparatus of segmentation to image coding and decoding
CN110351552A (en) A kind of fast encoding method in Video coding
Ma et al. Evolution of AVS video coding standards: twenty years of innovation and development
CN103747272B (en) Fast transform approach for the remaining quaternary tree coding of HEVC
CN109874012B (en) Video coding method, encoder, electronic device and medium
CN104320656B (en) Interframe encoding mode fast selecting method in x265 encoder
CN110677646B (en) Intra-frame coding prediction method based on CPU + GPU hybrid coding
JP5566406B2 (en) Method for predicting block of image data, decoding and encoding device for realizing the method
JP4688279B2 (en) Method and apparatus for automatically setting spatial resolution of moving image
JP2001076166A (en) Encoding method of animation dynamic image
CN101969559A (en) Transpression method of video code stream and system of same

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