CN101854526A - Code rate control method and code controller - Google Patents

Code rate control method and code controller Download PDF

Info

Publication number
CN101854526A
CN101854526A CN200910128307A CN200910128307A CN101854526A CN 101854526 A CN101854526 A CN 101854526A CN 200910128307 A CN200910128307 A CN 200910128307A CN 200910128307 A CN200910128307 A CN 200910128307A CN 101854526 A CN101854526 A CN 101854526A
Authority
CN
China
Prior art keywords
processing unit
basic processing
quantization matrix
coded bits
rate control
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
CN200910128307A
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.)
International Business Machines Corp
Original Assignee
International Business Machines Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by International Business Machines Corp filed Critical International Business Machines Corp
Priority to CN200910128307A priority Critical patent/CN101854526A/en
Publication of CN101854526A publication Critical patent/CN101854526A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

The invention discloses a code rate control method and a code controller. The code rate control method comprises the following steps: receiving a basic processing unit of an image to be coded; calculating the quantization matrix of the basic processing unit, wherein the quantization matrix and the quantization mode type of the basic processing unit are associated with the code bit distributed by the basic processing unit; coding the basic processing unit by applying the calculated quantization matrix; and outputting the coded code stream. Compared with the prior art, the code rate control method and code controller in the invention can control coding rate accurately and reduce jitter of code rate, reserve more image details and improve video image quality under the same communication bandwidth.

Description

Bit rate control method and coding controller
Technical field
The present invention relates to communication technical field, be specifically related to bit rate control method and coding controller in multimedia communication.
Background technology
For field of video communication, different networks, Ethernet for example, WLAN, and Cable, its communication channel bandwidth is normally fixing.When in the channel multimedia, need to carry out Rate Control, thereby guarantee encoding code stream by smoothly transmission glibly of network to the video coding of transmission, the video watched of recipient is continuous like this, the sequential of breaking in the time of can not occurring, the sight that can not be connected.
For example, if original multimedia coding code stream is 500kbps (bit per second), and the network bandwidth has only 400kbps, then recipient's buffer memory is understood the state that is in " sky " of discontinuity, promptly do not have multimedia code stream to be played, the user will watch the image of level and smooth smoothness.
Real-time code rate control has VBR (Variable Bitrate variable bit rate) and two kinds of patterns of CBR (Constants Bit Rate fixed bit rate).Under the VBR pattern; because the image complexity in the actual video sequence constantly changes; for example how much different details is; motion speed difference or the like; cause also respective change of bit rate; the bit rate that is original multimedia coding code stream changes; this VBR Rate Control pattern is transmitted under the network of current fixed-bandwidth usually slack problem can occur; and under the CBR pattern; be input as the target bits of video source code flow and transmission channel; according to the source complexity is estimated; quantization parameter is dynamically adjusted in the size of decoding buffering and network bandwidth estimation etc., obtains meeting the code check of the target bits of transmission channel.So transmitting multimedia under the network of current fixed-bandwidth substantially all uses CBR.
With reference to figure 1, Fig. 1 shows the composition of existing coded system.Coding generally be by source code flow is carried out in the frame/inter prediction, discrete cosine transform, quantification and entropy coding obtain encoding code stream.As seen from Figure 1, Rate Control mainly is that coding control module by wherein realizes.Existing coding control module (device) adopts rate control algorithm to carry out Rate Control.By dynamically adjusting coder parameters, obtain target bit in the rate control algorithm.Existing rate control algorithm mainly is by adjusting the quantization parameter size export target code check of discrete cosine transform.In fact, quantization parameter (QP) has reflected spatial detail compression situation, and little as QP, most details all can be retained, and code check increases; And QP increases, some loss in detail, and code check reduces, but image fault is strengthened and quality descends.In other words, the relation that QP and bit rate are inversely proportional to, and also along with the raising of video source complexity, this inverse relation can be more obvious.In the prior art, MPEG2, MPEG4, all adopt QP to carry out Rate Control in the H264 image encoding standard, that is, the different macro block of a two field picture of multimedia image is calculated different QP encode, each interior macroblocks adopts fixing QP to carry out Rate Control.
The most general at present and effective Rate Control model is a secondary model, sees formula (1)
H set = f ( QP ) = c 2 · σ 2 QP 2 + c 1 · σ QP + H hdr - - - ( 1 )
QP=f then -1(H Set, σ, c 1, c 2) (2)
In formula (1) and (2), H SetBe defined as the number of coded bits of distributing for the present encoding unit; H HdrBe the header bit number; c 1, c 2Be model coefficient, can obtain by the data point linear regression method of front.σ is determined by MAD (the mean residual absolute value of Mean Average Difference predicated error).
This shows that the number of coded bits of distributing for the present encoding unit only is decided by quantization parameter, can obtain the number of coded bits that to distribute for the present encoding unit, oppositely obtain QP according to communication bandwidth.In the present method, the coefficient of all frequencies in each macro block of a two field picture of multimedia image is all adopted identical quantization parameter QP.In theory, if can adopt different quantization parameters to coefficient of frequencies different in each macro block, then the precision of its Rate Control can be meticulousr, and the quality of reconstructed image can be better.
Summary of the invention
Therefore, need a kind of very accurately code rate control method and coding controller.
According to an aspect of the present invention, provide a kind of code rate control method, having comprised: a basic processing unit that receives image to be encoded; Calculate the quantization matrix of this basic processing unit, the quantitative mode type of wherein said quantization matrix and this basic processing unit and be that the described basic processing unit number of coded bits of distributing is relevant; Using the quantization matrix that calculates encodes to this basic processing unit; And the code stream of output encoder.
According to another aspect of the present invention, provide a kind of coding controller, having comprised: receiving element is used to receive a basic processing unit of image to be encoded; The quantization matrix computing unit is used to calculate the quantization matrix of this basic processing unit, the quantitative mode type of wherein said quantization matrix and this basic processing unit and be that the described basic processing unit number of coded bits of distributing is relevant; Coding unit, the quantization matrix that is used to use calculating is encoded to this basic processing unit; And output unit, be used for the code stream of output encoder.
Compared with prior art, code rate control method of the present invention and coding controller can carry out Rate Control more accurately under same communication bandwidth, reduce the shake of code check, and keep the more details of image, improve the quality of video image.
Description of drawings
By the more detailed description to illustrated embodiments of the invention mode in the accompanying drawing, above-mentioned and other purpose, feature and advantage of the present invention will become more obvious, and wherein, identical reference number is represented the same parts in the illustrated embodiments of the invention mode usually.
Fig. 1 shows the composition of existing coded system;
Fig. 2 schematically shows the adjacent processing unit of pending unit in the Streaming Media processing;
Fig. 3 shows a kind of flow chart of bit rate control method according to an embodiment of the invention;
Fig. 4 shows the flow chart of the method for the quantization matrix QM that calculates basic processing unit according to an embodiment of the invention;
Fig. 5 schematically shows the flow chart of method that the adjacent processing unit that utilizes basic processing unit is according to an embodiment of the invention differentiated the quantitative mode type of basic processing unit;
Fig. 6 shows and utilizes method of the present invention and traditional Rate Control side to carry out code check-frame comparison curves that Rate Control obtains to a trial image sequence;
Fig. 7 shows and utilizes method of the present invention and conventional method that the standard picture sequence is carried out Rate Control, and decoded image relatively;
Fig. 8 shows a kind of structured flowchart of coding controller according to an embodiment of the invention;
Fig. 9 schematically shows the structured flowchart according to a kind of quantization matrix computing unit of the embodiment of the invention.
Embodiment
Describe preferred implementation of the present invention with reference to the accompanying drawings in further detail, shown the preferred embodiments of the present invention in the accompanying drawings.Yet the present invention can should not be construed the embodiment that is set forth here with the various forms realization and limit.On the contrary, it is in order to make the present invention thorough more and complete that these embodiment are provided, and, fully scope of the present invention is conveyed to those skilled in the art.
Here to herein image, frame, a notion describes.Image can be a frame image, also can be that field pattern resembles.Hereinafter, for simplicity, technology is described, but this technology is not only applicable to frame image, and is applicable to that field pattern resembles with frame image.
For the ease of introducing the present invention, introduce the ABC relevant in some video stream media encoding process technology earlier with the present invention.Two field picture in the image sequence of Streaming Media is identical with still image, has three components of RGB.Processing for independent processing of a two field picture and still image is slightly different, and the macro block that at first defines in Streaming Media is the image of 16x16 pixel size.Macro block is used as the elementary cell of encoding process usually, and some is that example is described with the macro block for a further part of the present invention, and those skilled in the art can know, if the encoding process elementary cell is defined by other size, method of the present invention is suitable equally.
Another basic conception is adjacent processing unit or claims adjacent block that adjacent block defines as shown in Figure 2.Wherein, the adjacent block of piece E comprises piece DBCA.Adjacent block can be used for infra-frame prediction etc.Further part of the present invention claims that for the ease of statement piece D is the upper left adjacent block of processing block; Piece B is the last adjacent block of processing block; Piece C is the upper right adjacent block of processing block; Piece A is the left adjacent block of processing block.These processing blocks and adjacent block can be macro blocks, the sub-piece of macro block, perhaps bigger than macro block data block.Among the present invention, claim that the whole of piece DBCA are whole adjacent blocks.
Some other ABC also comprises: (Intra) predictive coding pattern is the predictive coding of carrying out on the image space territory of a two field picture inside in the frame, and this coding can be removed the spatial redundancies between the adjacent block, reaches the purpose of compression.
Interframe (Inter) predictive coding pattern is to utilize the correlation of video image interframe, i.e. time correlation reaches the purpose of image compression.It is the temporal image sequence that successive image frame is at interval formed that live image is normally gone up with the frame period by the time, and it is in time than spatially having bigger correlation.Utilize the characteristics of the correlation that frame has to carry out interframe encode, can obtain the compression ratio more much higher than intraframe coding.
Skip mode (skip mode) is under this coding mode, identical to coding unit content that should the position in the coding unit in the coded video sequences in the current encoded image frame and the former frame image.This pattern can improve compression performance significantly.
In the inter prediction encoding pattern, usually adopt big image block to predict earlier, if effect is bad, adopt less image block prediction again.The overall background piece can be understood as the data predicted piece of employing greater than current pending image block.
Bi-directional predicted reference picture: adopt the method for predictive coding to eliminate sequence image correlation in time, promptly the image of intermediate frame is to adopt the image of this position of former frame and the image of this position of next frame to predict in image sequence.
Usually have correlation between the consecutive frame of streaming media image sequence, therefore, can utilize this correlation to carry out motion prediction etc. during coding.Whenever, having a two field picture through a set time but the streaming media image sequence is general, all is infra-frame prediction during this two field picture coding, no longer utilizes from the time each two field picture the preceding.This two field picture coding is called IDR frame or reference frame.The IDR frame can independently be decoded, and is the basis of subsequent compression frame decoding.Any streaming media playing need begin decoding, play when the centre is cut from the IDR frame.
After the streaming media image sequence is carried out predictive coding, prediction residual to gained is carried out discrete cosine transform, be about to prediction residual and transform to the frequency domain spatial manipulation, by quantization parameter in the frequency domain space compression, carry out entropy coding then and compress, the code stream of output compression in the statistics territory.Rate Control is exactly the coefficient in the control frequency domain in cataloged procedure, the number of coded bits that obtains requiring.Coding can adopt the mode of traversal, obtain maximal pressure contract than or the code check that requires.During decoding as long as adopt and the coding method corresponding decoding method both can.
The target of Rate Control or evaluation criterion be, bit rate output ± α %, and wherein, α is the fluctuation of code check, and code check of the more little output of this value is steady more, and the fluency of Streaming Media is good more.
In addition, the viewing quality of Streaming Media is relevant with subjective factor, different spectators, and the focus difference, the quality that may think is also inequality.
Introduce basic thought of the present invention below.
At JPEG, MPEG2 with H.264/AVC in the high profile standard, also often adopt the notion of quantization matrix (Quantization Matrix).For example, in high profile standard H.264/AVC, two kinds of discrete cosines of 8x8 and 4x4 (DCT) transform size is arranged, therefore the quantization matrix of corresponding with it two groups of 8x8 or 4x4 is also arranged.For the quantization matrix of 8x8, the convergent-divergent that can adopt 64 coefficients that different frequency components is quantized; For the matrix of 4x4, the convergent-divergent that can adopt 16 coefficients that different frequency components is quantized.These 64 or 16 coefficients are formed the matrix of 8x8 or 4x4, just the quantization matrix of often saying.Each element of DCT coefficient matrix just obtains the coefficient that quantizes divided by each element to quantization matrix that should coefficient.In High Profile standard H.264/AVC, in the grammer of sequence head and image head, quantization matrix is arranged all.H.264/AVC High Profile not only allows all images of each sequence to have same quantization matrix, and allow the different image in the same sequence to have different quantization matrixes, but all macro blocks in the same subpicture of same sequence can only use same quantization matrix.
All macro blocks in the same subpicture of same sequence can only use same quantization matrix also to be adopted by JPEG and mpeg 4 standard.
In the quantization matrix of a macro block, from the near more element of initial point, quantification be the low frequency part of correspondence image piece, for from initial point element far away, quantification be the HFS of correspondence image piece.Because human eye not to the low frequency component sensitivity of image, also is very little so use the quantization matrix vision loss to the high fdrequency component of image.
If each macro block in the same subpicture uses different quantization matrixes, though can reach higher compression ratio to original image, thus encoder bit rate reduced, owing to need all transmit quantization matrix, increased encoder bit rate again to each macro block.
In the prior art of Rate Control, generally all adopt the coded system of quantization parameter QP, can simply understand, be exactly in quantization matrix QM, all matrix elements are identical.Obviously, Here it is carries out identical quantification to the high fdrequency component of image block with low frequency component, and possible visual effect is not fine, but because Rate Control needs only quantization parameter of transmission, code efficiency height.Under the QP coding mode, the number of coded bits of distributing for the present encoding unit is only relevant with QP.
Among the present invention, use different quantization matrixes to carry out Rate Control to each basic processing unit in the same subpicture, but this quantization matrix is different from quantization matrix of the prior art, is the quantization matrix that quantization matrix of the prior art and quantization parameter notion are combined.
Among the present invention, carry out Rate Control for basic processing unit, this basic processing unit can be macro block, and perhaps the sub-piece of macro block perhaps is user-defined data block.Fig. 3 shows a kind of flow chart of bit rate control method according to an embodiment of the invention.According to this method,, receive a basic processing unit of image to be encoded at step S301; At step S302, calculate the quantization matrix of this basic processing unit, the quantitative mode type of wherein said quantization matrix and this basic processing unit and be that the described basic processing unit number of coded bits of distributing is relevant; At step S303, use the quantization matrix that calculates this basic processing unit is encoded; At step S304, the code stream of output encoder.Compared with prior art, each basic processing unit of Rate Control of the present invention uses the quantization matrix of this basic processing unit to quantize, rather than adopts the quantization parameter of this basic processing unit to quantize.Wherein, how implementation step S303 and step S304 are known to those skilled in the art, are identical technology with what use in the JPEG compress technique, no longer describe among the present invention.
Below in emphasis the quantization matrix how to calculate this basic processing unit is described.
According to the present invention, be the number of coded bits H of present encoding unit (being basic processing unit) distribution SetBe the quantitative mode type (mod) of described basic processing unit and the function of quantization matrix (QM), promptly
H set=f(mod,QM) (3)
QM=f then -1(mod, H Set) (4)
At first, quantization matrix QM hypothesis is the matrix of a n * n, total n * n element in the matrix.The quantitative mode type (mod) of basic processing unit is the factor that usually influences the reconstruct quantization matrix by matrix element in following formula, and how the back influences if will being discussed it separately, and this factor does not consider that then formula (4) becomes earlier here:
QM=f -1(H set) (5)
Obviously, if quantization matrix QM uses n * n unknown element variable, this equation can't be separated.Fig. 4 shows the flow chart of the method for the quantization matrix QM that calculates a basic processing unit according to an embodiment of the invention.
According to Fig. 4, at first at step S401, be calculated as the number of coded bits that described basic processing unit distributes according to communication bandwidth, at step S402, according to the number of coded bits that calculates for described basic processing unit distribution, and what obtain be the described basic processing unit number of coded bits of distributing and the functional relation of a unknown parameter of stipulating, calculates the unknown parameter of this regulation.
In one embodiment, suppose to have only among the QM known variables x, the function that all other QM elements all are x, obtain its functional relation and can adopt multiple mode, for example use to use that least square fitting can obtain once, the functional relation of secondary or high order, also can adopt neural network learning, perhaps other adaptive learning method obtains its functional relation.Because this study is off-line, the result of study can be directly used in quantization encoding, therefore, even the learning process calculation of complex also can not influence the quantization encoding process of Rate Control.
Below for the ease of statement, be the example statement with the linear function, then:
H set=Ax+B (6)
Can be suitable for different quantization parameter QP (x) and obtain the number of coded bits H that it distributes for present encoding unit (basic processing unit) by a plurality of basic processing units great amount of images Set, use coefficient A and B that least square fitting obtains linear function.Adopt the processing of quadratic function similar, even also can adopt higher order functionality, the calculating of coefficient of just obtaining function is more complicated.
After obtaining the relational expression of function, according to the number of coded bits H that distributes for basic processing unit Set(calculating acquisition according to communication bandwidth) just can calculate x.
After obtaining x, how mapping out quantization matrix QM is again a technical problem, QM has n * n unknown element variable in principle, during but general Streaming Media is handled, for the component of identical frequency, be to adopt identical quantization parameter, like this, make QM become a symmetrical matrix, number of parameters is reduced to (n 2+ n)/2.The user can further reduce the number of parameter according to the requirement of using.At step S403, according to the unknown parameter of this regulation that calculates, and the functional relation of the unknown parameter of all unknown parameters in the quantization matrix that obtains and described regulation, calculate all unknown parameters in the quantization matrix.Notice that the functional relation of the unknown parameter of all unknown parameters in the quantization matrix and described regulation can obtain by test here, also can specify according to using, also can specify by the user earlier, finely tune by result of the test then by the user.When relating to quantization matrix reconstruct, the back also this problem can be discussed further.
In an embodiment of the invention, suppose to have 6 parameters, promptly
QM=f(x,ε,λ,β,α,ω) (7)
And the pass that is determined by experiment each variable is:
ε=2×x
λ=2.5×x
β=3×x
α=3.3×x
ω=4.5×x (8)
According to the x that calculates, just can obtain each parameter of above-mentioned quantization matrix.
After obtaining the parameter of quantization matrix QM, how the quantitative mode type (mod) of reconstruct quantization matrix and basic processing unit is relevant.Therefore, at step S404, need to determine the quantitative mode type of described basic processing unit.
Basic processing unit has three kinds of quantitative mode types, universal class, detail type and non-detail type.Here adopt the example quantitative mode type of different processing units in the summarized images visually, for example, in a host's who is seated image sequence, the host has static constant background after one's death, and the image of some variations is also arranged.At this moment, host's facial expression can be thought details area, and motionless background is non-details area, and the background of motion is a general areas.The processing unit of universal class does not need particular processing to it, and such zone is the zone that no expense matrix is adjusted.The graphics processing unit of detail type needs the higher quantization matrix of fidelity, makes high fdrequency component abundanter; The processing unit of non-detail type needs the low quantization matrix of fidelity, makes high fdrequency component reduce, and reduces bit number.
Type how to determine basic processing unit can have multiple mode, for example, and according to application type, by identification, determine the type of basic processing unit, in for example above-mentioned example, be the details unit after host's the face recognition, motionless background is non-details unit, and moving background is a universal class etc.It is different types that another mode can directly be specified different zones by the user.
In another preferred embodiment, differentiate the quantitative mode type of basic processing unit by the adjacent processing unit that utilizes this basic processing unit.Fig. 5 schematically shows this method of discrimination flow chart.According to Fig. 5, at step S501, judge whether described basic processing unit has whole adjacent processing units (be corresponding diagram 2, have adjacent processing unit ABCD), if not, then determine that at step S502 this basic processing unit is a universal class; Otherwise, at step S503, S504 and S505 judge that described basic processing unit is an intra prediction mode, is inter-frame forecast mode be bi-directional predicted reference model? if determine that at step S503 basic processing unit is an intra prediction mode, then carry out and judge 1: judge that the left adjacent processing unit of described basic processing unit and upper left adjacent processing unit (are corresponding diagram 2 at step S506, adjacent processing unit AD) whether be identical quantitative mode type, perhaps the last adjacent processing unit of described basic processing unit and upper right adjacent processing unit (are corresponding diagram 2, adjacent processing unit B C) whether be identical quantitative mode type, if be universal class then at the described basic processing unit of step S507; Otherwise, determine that at step S508 described basic processing unit is a detail type; If determine that at step S504 described basic processing unit is an inter-frame forecast mode, then carry out at step S509 and judge 2: whether at least one of whole adjacent processing units of judging described basic processing unit is intra prediction mode, if then determine that at step S512 described basic processing unit is a detail type; Otherwise carry out at step S510 and to judge 3: whether at least one of whole adjacent processing units of judging described basic processing unit is inter-frame forecast mode, if then determine that at step S512 described basic processing unit is a detail type; Otherwise carry out judgement 4 at step S511: judge that the left adjacent processing unit of described basic processing unit and upper left adjacent processing unit (are corresponding diagram 2, adjacent processing unit AD) whether be skip mode, perhaps whether the last adjacent processing unit of described basic processing unit and upper right adjacent processing unit are skip mode, if determine that at step S512 described basic processing unit is a detail type; Otherwise,, determine that described basic processing unit is a universal class at step S513; If determine that at step S505 the image type of described basic processing unit is bi-directional predicted reference model, then carry out and judge 5: judge that the left adjacent processing unit of described basic processing unit and upper left adjacent processing unit (are corresponding diagram 2 at step S514, adjacent processing unit AD) whether be skip mode, perhaps the last adjacent processing unit of described basic processing unit and upper left adjacent processing unit (are corresponding diagram 2, adjacent processing cells D B) whether be skip mode, if then determine that at step S515 described basic processing unit is a detail type; Otherwise determine that at step S516 described basic processing unit is non-detail type.
Above-mentioned determination methods is implemented more convenient, easy.
At step S405, according to the quantitative mode type of the described basic processing unit of determining, and all unknown parameters in the calculating quantization matrix that calculates, the reconstruct quantization matrix.
For example to front QM=f (x, ε, λ, β, α, ω), we can set the quantization matrix of different processing units, for example, suppose that basic processing unit is the sub-piece (8 * 8) of macro block, then for universal class and non-detail type macro block, set quantization matrix and are:
QM common / no det ail = x ϵ ϵ λ λ λ β β ϵ ϵ λ λ λ β β α ϵ λ λ λ β β α α λ λ λ β β α α ω λ λ β β α α ω ω λ β β α α ω ω ω β β α α ω ω ω ω β α α ω ω ω ω ω - - - ( 9 )
For the detail type macro block, the setting quantization matrix is:
QM det ail x x x x x β β β x x x x β β β β x x x β β β β ω x x β β β β ω ω x β β β β ω ω ω β β β β ω ω ω ω β β β ω ω ω ω ω β β ω ω ω ω ω ω - - - ( 10 )
Then as can be seen, the symmetry of above-mentioned quantization matrix, it is relatively good to set quantification matrix experiment effect like this.And for detail type, the low frequency component quantization parameter of quantization matrix is low, has kept more detailed information.For universal class and non-detail type, the low frequency component quantization parameter height of quantization matrix.Filter more detailed information, reduced code check.
Above-mentioned just according to a kind of execution mode of the quantitative mode type reconstruct quantization matrix of the element parameter basic processing unit of quantization matrix, those skilled in the art can adjust the setting of quantization matrix according to the type of using.It should be noted that, the picture quality of Streaming Media is a very subjective factor, and above-mentioned execution mode is better to the effect of experimental image sequence, but for different application, also should consider the characteristics of this application, may need different quantization matrix reconstruction strategy.
Fig. 6 shows and utilizes method of the present invention and traditional Rate Control side to carry out code check-frame comparison curves that Rate Control obtains to a trial image sequence, and among Fig. 6, selecting communication bandwidth is typical satellite broadcast channel (bandwidth 2.5Mbps).Among Fig. 6, the code check of dark colour curve for adopting method of the present invention to obtain; The code check of the curve of light colour for adopting the QP method to obtain.As seen from Figure 6, method of the present invention is more accurate than the code check of conventional method control, shakes littler.
Fig. 7 shows and utilizes method of the present invention and conventional method that the standard picture sequence is carried out Rate Control, and decoded image relatively.As seen from Figure 7, compare with traditional bit rate control method, method of the present invention keeps the more details of image, improves the quality of video image.
Based on same inventive concept, the invention also discloses a kind of coding controller, show the structured flowchart of this coding controller as Fig. 8.According to Fig. 8, this coding controller 800 comprises receiving element 801, is used to receive a basic processing unit of image to be encoded; Quantization matrix computing unit 802 is used to calculate the quantization matrix of this basic processing unit, the quantitative mode type of wherein said quantization matrix and this basic processing unit and be that the described basic processing unit number of coded bits of distributing is relevant; Coding unit 803, the quantization matrix that is used to use calculating is encoded to this basic processing unit; With output unit 804, be used for the code stream of output encoder.
In an embodiment of the invention, all unknown parameters in the quantization matrix and the number of coded bits of distributing for described basic processing unit are the function of the unknown parameter of a regulation in the quantization matrix, and above-mentioned two functional relations are to obtain outside cataloged procedure.Obtaining in front the bit rate control method of concrete functional relation described in detail, repeats no more here.
Fig. 9 schematically shows the structured flowchart according to a kind of quantization matrix computing unit of the embodiment of the invention.This quantization matrix computing unit comprises: number of coded bits computing unit 901 is used for being calculated as the number of coded bits that described basic processing unit distributes according to communication bandwidth; The unknown parameter computing unit 902 of regulation, be used for the number of coded bits of distributing for described basic processing unit that calculates according to number of coded bits computing unit 901, and what obtain be the functional relation of the unknown parameter of the number of coded bits of described basic processing unit distribution and this regulation, calculates the unknown parameter of this regulation; Quantization matrix unknown parameter computing unit 903, the unknown parameter that is used for this regulation that unknown parameter computing unit 902 according to the rules calculates, and the functional relation of the unknown parameter of all unknown parameters in the quantization matrix that obtains and described regulation, calculate all unknown parameters in the quantization matrix; Quantitative mode type determining unit 904 is used for determining the quantitative mode type of described basic processing unit; With quantization matrix reconfiguration unit 905, be used for quantizing the quantitative mode type of the definite described basic processing unit of type determining unit and all unknown parameters of the calculating quantization matrix that quantization matrix unknown parameter computing unit calculates, reconstruct quantization matrix.Wherein the quantitative mode type of basic processing unit comprises three kinds: universal class, detail type and non-detail type.How to differentiate in the quantitative mode type bit rate control method in front of basic basic processing unit and describe in detail, repeat no more here.
Though describe exemplary embodiment of the present invention here with reference to the accompanying drawings, but should be appreciated that and the invention is not restricted to these accurate embodiment, and under the situation that does not deviate from scope of the present invention and aim, those of ordinary skills can carry out the modification of various variations to embodiment.All such changes and modifications are intended to be included in the scope of the present invention defined in the appended claims.
And according to foregoing description, the person of ordinary skill in the field knows that the present invention can be presented as device, method or computer program.Therefore, the present invention can specific implementation be following form, that is, can be completely hardware, software (comprising firmware, resident software, microcode etc.) or this paper are commonly referred to as " circuit ", the software section of " module " or " system " and the combination of hardware components completely.In addition, the present invention can also take to be embodied in the form of the computer program in any tangible expression medium (medium of expression), comprises the procedure code that computer can be used in this medium.
Can use any combination of that one or more computers can be used or computer-readable medium.Computer can with or computer-readable medium for example can be---but being not limited to---electricity, magnetic, light, electromagnetism, ultrared or semi-conductive system, device, device or propagation medium.The example more specifically of computer-readable medium (non exhaustive tabulation) comprises following: the electrical connection, portable computer diskette, hard disk, random-access memory (ram), read-only memory (ROM), erasable type programmable read only memory (EPROM or flash memory), optical fiber, Portable, compact disk read-only memory (CD-ROM), light storage device of one or more leads arranged, such as transmission medium or the magnetic memory device of supporting internet or in-house network.Note computer can with or computer-readable medium in addition can be above be printed on paper or other suitable medium of program, this be because, for example can be by this paper of electric scanning or other medium, obtain program in the electronics mode, compiled by rights then, explain or handle, and necessary words are stored in computer storage.In the linguistic context of presents, computer can with or computer-readable medium can be anyly to contain, store, pass on, propagate or transmit for instruction execution system, device or device medium that use or the program that and instruction executive system, device or device interrelate.Computer can with medium can be included in the base band or propagate as a carrier wave part, embody the data-signal of the procedure code that computer can use by it.The procedure code that computer can be used can be with any suitable medium transmission, comprises that---but being not limited to---is wireless, electric wire, optical cable, RF or the like.
Be used to carry out the computer program code of operation of the present invention, can write with any combination of one or more programming languages, described programming language comprises the object-oriented programming language---such as Java, Smalltalk, C++, also comprising conventional process type programming language---such as " C " programming language or similar programming language.Procedure code can fully carried out in user's the calculating, partly carry out on the user's computer, carrying out on the remote computer or carrying out on remote computer or server fully on user's computer top as an independently software kit execution, part.In a kind of situation in back, remote computer can---comprise Local Area Network or wide area network (WAN)---by the network of any kind of and be connected to user's computer, perhaps, can (for example utilize the ISP to pass through the internet) and be connected to outer computer.
In addition, the combination of each square frame can be realized by computer program instructions in each square frame of flow chart of the present invention and/or block diagram and flow chart and/or the block diagram.These computer program instructions can offer the processor of all-purpose computer, special-purpose computer or other programmable data processing unit, thereby produce a kind of machine, make and these instructions of carrying out by computer or other programmable data processing unit produce the device (means) of the function/operation of stipulating in the square frame in realization flow figure and/or the block diagram.
Also can be stored in these computer program instructions in energy command calculations machine or the computer-readable medium of other programmable data processing unit with ad hoc fashion work, like this, the instruction that is stored in the computer-readable medium produces a manufacture that comprises the command device (instruction means) of the function/operation of stipulating in the square frame in realization flow figure and/or the block diagram
Also can be loaded into computer program instructions on computer or other programmable data processing unit, make and on computer or other programmable data processing unit, carry out the sequence of operations step, producing computer implemented process, thereby the instruction of carrying out on computer or other programmable device just provides the process of the function/operation of stipulating in the square frame in realization flow figure and/or the block diagram.
Flow chart in the accompanying drawing and block diagram illustrate the system according to various embodiments of the invention, architectural framework in the cards, function and the operation of method and computer program product.In this, each square frame in flow chart or the block diagram can be represented the part of module, block or a code, and the part of described module, block or code comprises one or more executable instructions that are used to realize the logic function stipulated.Should be noted that also what the function that is marked in the square frame also can be marked to be different from the accompanying drawing occurs in sequence in some realization as an alternative.For example, in fact the square frame that two adjoining lands are represented can be carried out substantially concurrently, and they also can be carried out by opposite order sometimes, and this decides according to related function.Also be noted that, each square frame in block diagram and/or the flow chart and the combination of the square frame in block diagram and/or the flow chart, can realize with the hardware based system of the special use of function that puts rules into practice or operation, perhaps can realize with the combination of specialized hardware and computer instruction.

Claims (18)

1. code rate control method comprises:
Receive a basic processing unit of image to be encoded;
Calculate the quantization matrix of this basic processing unit, the quantitative mode type of wherein said quantization matrix and this basic processing unit and be that the described basic processing unit number of coded bits of distributing is relevant;
Using the quantization matrix that calculates encodes to this basic processing unit; And
The code stream of output encoder.
2. code rate control method according to claim 1, wherein said basic processing unit are macro block.
3. code rate control method according to claim 1 and 2, all unknown parameters in the wherein said quantization matrix and the number of coded bits of distributing for described basic processing unit are the function of the unknown parameter of a regulation in the quantization matrix, and above-mentioned two functional relations are to obtain outside cataloged procedure.
4. code rate control method according to claim 3, the functional relation of the unknown parameter of wherein above-mentioned number of coded bits of distributing for described basic processing unit and described regulation are by the least square fitting acquisition of the number of coded bits of distributing to the quantization parameter of each basic processing unit of a plurality of experimental image sequences with for this basic processing unit.
5. code rate control method according to claim 3, the quantization matrix step of wherein said this basic processing unit of calculating comprises:
Be calculated as the number of coded bits that described basic processing unit distributes according to communication bandwidth;
According to being the number of coded bits that described basic processing unit distributes, and what obtain be the functional relation of the unknown parameter of the number of coded bits of described basic processing unit distribution and this regulation, calculates the unknown parameter of this regulation.
6. code rate control method according to claim 5, the quantization matrix step of wherein said this basic processing unit of calculating also comprises:
According to the functional relation of all unknown parameters in the unknown parameter of this regulation that calculates and the described quantization matrix that obtains with the unknown parameter of described regulation, all unknown parameters in the calculating quantization matrix.
7. code rate control method according to claim 6, the quantitative mode type of wherein said basic processing unit comprises three kinds: universal class, detail type and non-detail type.
8. code rate control method according to claim 7, the step of the quantization matrix of wherein said this basic processing unit of calculating also comprises:
Determine the quantitative mode type of described basic processing unit;
The quantitative mode type of all unknown parameters in the described quantization matrix that utilization calculates and the described basic processing unit determined, the reconstruct quantization matrix.
9. code rate control method according to claim 8 wherein utilizes the adjacent processing unit of this basic processing unit to differentiate the quantitative mode type of basic processing unit.
10. coding controller comprises:
Receiving element is used to receive a basic processing unit of image to be encoded;
The quantization matrix computing unit is used to calculate the quantization matrix of this basic processing unit, the quantitative mode type of wherein said quantization matrix and this basic processing unit and be that the described basic processing unit number of coded bits of distributing is relevant;
Coding unit, the quantization matrix that is used to use calculating is encoded to this basic processing unit; And
Output unit is used for the code stream of output encoder.
11. coding controller according to claim 10, wherein said basic processing unit are macro block.
12. according to claim 10 or 11 described coding controllers, all unknown parameters in the wherein said quantization matrix and the number of coded bits of distributing for described basic processing unit are the function of the unknown parameter of a regulation in the quantization matrix, and above-mentioned two functional relations are obtained outside cataloged procedure.
13. coding controller according to claim 12, the functional relation of the unknown parameter of wherein above-mentioned number of coded bits of distributing for described basic processing unit and described regulation are by the least square fitting acquisition of the number of coded bits of distributing to the quantization parameter of each basic processing unit of a plurality of experimental image sequences with for this basic processing unit.
14. coding controller according to claim 12, wherein said quantization matrix computing unit comprises:
The number of coded bits computing unit is used for being calculated as the number of coded bits that described basic processing unit distributes according to communication bandwidth;
The unknown parameter computing unit of regulation, being used for according to the number of coded bits computing unit is the number of coded bits that described basic processing unit distributes, and what obtain be the functional relation of the unknown parameter of the number of coded bits of described basic processing unit distribution and this regulation, calculates the unknown parameter of this regulation.
15. coding controller according to claim 14, wherein said quantization matrix computing unit also comprises:
Quantization matrix unknown parameter computing unit, the unknown parameter that is used for this regulation that unknown parameter computing unit according to the rules calculates, and the functional relation of the unknown parameter of all unknown parameters in the quantization matrix that obtains and described regulation, calculate all unknown parameters in the quantization matrix.
16. coding controller according to claim 15, the quantitative mode type of wherein said basic processing unit comprises three kinds: universal class, detail type and non-detail type.
17. coding controller according to claim 16, wherein said quantization matrix computing unit also comprises:
The type determining unit is used for determining the quantitative mode type of described basic processing unit;
The quantization matrix reconfiguration unit is used for all unknown parameters in the quantitative mode type of the described basic processing unit determined according to described type determining unit and the quantization matrix that quantization matrix unknown parameter computing unit calculates, the reconstruct quantization matrix.
18. coding controller according to claim 17, wherein said type determining unit utilize the adjacent processing unit of this basic processing unit to differentiate the quantitative mode type of basic processing unit.
CN200910128307A 2009-03-30 2009-03-30 Code rate control method and code controller Pending CN101854526A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN200910128307A CN101854526A (en) 2009-03-30 2009-03-30 Code rate control method and code controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN200910128307A CN101854526A (en) 2009-03-30 2009-03-30 Code rate control method and code controller

Publications (1)

Publication Number Publication Date
CN101854526A true CN101854526A (en) 2010-10-06

Family

ID=42805753

Family Applications (1)

Application Number Title Priority Date Filing Date
CN200910128307A Pending CN101854526A (en) 2009-03-30 2009-03-30 Code rate control method and code controller

Country Status (1)

Country Link
CN (1) CN101854526A (en)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103765788A (en) * 2011-08-23 2014-04-30 联发科技(新加坡)私人有限公司 Method and system of transform block processing according to quantization matrix in video coding
CN106658005A (en) * 2016-12-30 2017-05-10 上海聚力传媒技术有限公司 Video coding method and device
CN107360380A (en) * 2017-06-28 2017-11-17 中国科学院西安光学精密机械研究所 A kind of double Compression camera devices and its host computer decoding apparatus
CN108012163A (en) * 2017-12-19 2018-05-08 希诺麦田技术(深圳)有限公司 The bit rate control method and device of Video coding
CN109117945A (en) * 2017-06-22 2019-01-01 上海寒武纪信息科技有限公司 Processor and its processing method, chip, chip-packaging structure and electronic device
CN110650370A (en) * 2019-10-18 2020-01-03 北京达佳互联信息技术有限公司 Video coding parameter determination method and device, electronic equipment and storage medium
WO2022027442A1 (en) * 2020-08-06 2022-02-10 华为技术有限公司 Input preprocessing method and apparatus of image processing network, and output postprocessing method and apparatus of image processing network
US11537858B2 (en) 2017-06-13 2022-12-27 Shanghai Cambricon Information Technology Co., Ltd. Computing device and method
US11544526B2 (en) 2017-06-26 2023-01-03 Shanghai Cambricon Information Technology Co., Ltd. Computing device and method
US11727268B2 (en) 2017-06-21 2023-08-15 Shanghai Cambricon Information Technology Co., Ltd. Sparse training in neural networks

Cited By (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10218977B2 (en) 2011-08-23 2019-02-26 Hfi Innovation Inc. Method and system of transform block processing according to quantization matrix in video coding
CN103765788B (en) * 2011-08-23 2015-08-05 联发科技(新加坡)私人有限公司 According to the method and system of quantization matrix process transform blockiis in Video coding
US9560347B2 (en) 2011-08-23 2017-01-31 Hfi Innovation Inc. Method and system of transform block processing according to quantization matrix in video coding
CN103765788A (en) * 2011-08-23 2014-04-30 联发科技(新加坡)私人有限公司 Method and system of transform block processing according to quantization matrix in video coding
CN106658005A (en) * 2016-12-30 2017-05-10 上海聚力传媒技术有限公司 Video coding method and device
CN106658005B (en) * 2016-12-30 2019-07-05 上海聚力传媒技术有限公司 Method for video coding and device
US11544542B2 (en) 2017-06-13 2023-01-03 Shanghai Cambricon Information Technology Co., Ltd. Computing device and method
US11537858B2 (en) 2017-06-13 2022-12-27 Shanghai Cambricon Information Technology Co., Ltd. Computing device and method
US11544543B2 (en) 2017-06-13 2023-01-03 Shanghai Cambricon Information Technology Co., Ltd. Apparatus and method for sparse training acceleration in neural networks
US11727268B2 (en) 2017-06-21 2023-08-15 Shanghai Cambricon Information Technology Co., Ltd. Sparse training in neural networks
CN109117945A (en) * 2017-06-22 2019-01-01 上海寒武纪信息科技有限公司 Processor and its processing method, chip, chip-packaging structure and electronic device
CN109117945B (en) * 2017-06-22 2021-01-26 上海寒武纪信息科技有限公司 Processor and processing method thereof, chip packaging structure and electronic device
US11544526B2 (en) 2017-06-26 2023-01-03 Shanghai Cambricon Information Technology Co., Ltd. Computing device and method
CN107360380A (en) * 2017-06-28 2017-11-17 中国科学院西安光学精密机械研究所 A kind of double Compression camera devices and its host computer decoding apparatus
CN108012163B (en) * 2017-12-19 2020-08-18 希诺麦田技术(深圳)有限公司 Code rate control method and device for video coding
CN108012163A (en) * 2017-12-19 2018-05-08 希诺麦田技术(深圳)有限公司 The bit rate control method and device of Video coding
CN110650370B (en) * 2019-10-18 2021-09-24 北京达佳互联信息技术有限公司 Video coding parameter determination method and device, electronic equipment and storage medium
CN110650370A (en) * 2019-10-18 2020-01-03 北京达佳互联信息技术有限公司 Video coding parameter determination method and device, electronic equipment and storage medium
WO2022027442A1 (en) * 2020-08-06 2022-02-10 华为技术有限公司 Input preprocessing method and apparatus of image processing network, and output postprocessing method and apparatus of image processing network

Similar Documents

Publication Publication Date Title
CN101854526A (en) Code rate control method and code controller
US9319714B2 (en) Intra prediction method and apparatus, and image encoding/decoding method and apparatus using same
RU2414093C2 (en) Method and apparatus, and video coding/decoding programme
US9100646B2 (en) Device and method for image encoding/decoding using prediction direction conversion and selective encoding
KR101089325B1 (en) Encoding method, decoding method, and encoding apparatus for a digital picture sequence
US8406297B2 (en) System and method for bit-allocation in video coding
CN103718556A (en) Encoding/decoding apparatus and method using flexible deblocking filtering
US9232234B2 (en) Video coding device, video coding method thereof, video decoding device, and video decoding method thereof
CN104796705A (en) SSIM (structural similarity) based HEVC (high efficiency video coding) video coding rate distortion optimizing and rate control algorithms
KR100601615B1 (en) Apparatus for compressing video according to network bandwidth
CN101411200B (en) Method of video signal coding
KR100540655B1 (en) Rate control method and apparatus in video coding
Pang et al. An analytic framework for frame-level dependent bit allocation in hybrid video coding
CN101252693A (en) Code rate control method based on image histogram
KR101086724B1 (en) ?? Deciding Method of H.264/AVC Encoder using Complexity of Frame, and H.264/AVC Encoder implementing the same
KR20030060009A (en) Adaptive coding method and apparatus considering human visual characteristics
Pang et al. Dependent joint bit allocation for H. 264/AVC statistical multiplexing using convex relaxation
Ma et al. Rate model for compressed video considering impacts of spatial, temporal and amplitude resolutions and its applications for video coding and adaptation
Khan et al. Evaluation and analysis of rate control methods for H. 264/AVC and MPEG-4 video codec
KR100963322B1 (en) Method of Adaptive Rate Control in Frame-layer for Real-time H.264/AVC
Li et al. Inter-dependent rate-distortion modeling for video coding and its application to rate control
JP5389298B2 (en) Image encoding device, image decoding device, image encoding method, and image decoding method
KR20040039805A (en) Method for moving picture coding
LI et al. Efficient rate control scheme for low bit rate H. 264/AVC video coding
KR100223194B1 (en) Method for controlling bit rates and fractal moving picture encoding apparatus adopting the same

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C02 Deemed withdrawal of patent application after publication (patent law 2001)
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20101006