CN1722832A - Efficient rate control techniques for video encoding - Google Patents

Efficient rate control techniques for video encoding Download PDF

Info

Publication number
CN1722832A
CN1722832A CN 200510084105 CN200510084105A CN1722832A CN 1722832 A CN1722832 A CN 1722832A CN 200510084105 CN200510084105 CN 200510084105 CN 200510084105 A CN200510084105 A CN 200510084105A CN 1722832 A CN1722832 A CN 1722832A
Authority
CN
China
Prior art keywords
video
lut
threshold value
frame
encoder
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN 200510084105
Other languages
Chinese (zh)
Other versions
CN100581245C (en
Inventor
N·马拉亚斯
S·莫洛伊
Y·常
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.)
Qualcomm Inc
Original Assignee
Qualcomm Inc
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 Qualcomm Inc filed Critical Qualcomm Inc
Publication of CN1722832A publication Critical patent/CN1722832A/en
Application granted granted Critical
Publication of CN100581245C publication Critical patent/CN100581245C/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

This disclosure describes rate control techniques that can improve video encoding. In particular, the described rate control techniques exploit relationships between the number of bits encoded per frame and the number of non-zero coefficients of the video blocks after quantization. The number of number of non-zero coefficients of the video blocks after quantization is referred to as rho. The value of rho is generally proportional to the number of bits used in the video encoding. This disclosure utilizes a relationship between rho and a quantization parameter (QP) in order to achieve rate controlled video encoding. More specifically, this disclosure provides techniques for generating a lookup table (LUT) that maps values of rho to different QP s.

Description

The efficient rate control techniques that is used for video coding
Technical field
The application requires the priority of the U.S. Provisional Application patent No. 60/586,963 of 8 submissions July in 2004.
Content disclosed by the invention relates to Digital Video Processing, relates more specifically to the rate controlled coding of video sequence.
Background technology
Digital video capabilities can be incorporated in the far-ranging equipment, these equipment comprise Digital Television, digital live broadcast system, Wireless Telecom Equipment, PDA(Personal Digital Assistant), laptop computer, desktop computer, digital camera, digital recording equipment, honeycomb fashion or satellite radio telephone, or the like.Digital-video equipment provides significant improvement creating, revise, transmit, store, write down and play aspect the full dynamic video sequence to compare with the analog video systems of routine.
Set up the coding that many different video encoding standards are used for digital video sequences.For example, Motion Picture Experts Group's standard (MPEG) has been developed the many standards that comprise MPEG-1, MPEG-2 and MPEG-4.Other standard comprises H.263 standard of International Telecommunication Association (ITU), by the QuickTime of the Apple Computer of Cupertino California research and development TMTechnology is covered the Window of Microsoft's research and development of (Redmond) by washingtonian Randt TMVideo, the Indeo of Intel company's research and development TM, the RealVideo of the RealNetworks company of Seattle, Washington TM, and the Cinepak of SuperMac company research and development TMAnd new standard constantly occurs and develops, and comprises ITU H.264 standard and a large amount of application specific standard.
Many video encoding standards allow to improve the transmission rate of video sequence by with compress mode data being encoded.Compression can reduce the data total amount that need be transmitted, with transmission of video frame effectively.For example, the figure of most video encoding standard utilizations design and video compression technology assist video and image to compare on the narrower bandwidth in the bandwidth that obtains when not compressing to transmit.
For example, mpeg standard and ITU H.263 with the ITU such video coding technique of standard support H.264, these technology have been utilized the similitude between the successive video frames, this is called as the time or interframe is relevant, so that the interframe compression to be provided.This inter-frame compression techniques is utilized data redundancy on these frames by the expression based on pixel of frame of video being changed into movement representation.In addition, some video coding techniques can be utilized the further compressed video frame of similitude that is called as in the frame relevant in space or the frame.
For supporting compression, digital-video equipment generally includes the encoder of compressed digital video sequence and the decoder that digital video sequences is decompressed.In many cases, encoder forms an integrated encoder/decoder (CODEC), and it is operated on the block of pixels of the frame inside of definition video sequence.For example, in the MPEG-4 standard, encoder is divided into the video blocks that is known as " macro block " to a frame of video will transmitting usually.ITU H.264 standard supports 16 * 16 video blocks, 16 * 8 video blocks, 8 * 16 video blocks, 8 * 8 video blocks, 8 * 4 video blocks, 4 * 8 video blocks and 4 * 4 video blocks.Other standard can be supported the video blocks of different sizes.
For each video blocks in the frame of video, encoder is sought one or more directly video blocks of the similar size of frame of video (or after frame) the preceding, and with the most similar video blocks of identification, this is called as " optimum prediction ".The process that current video block is compared with the video blocks of other frame is commonly called motion estimation.In case " optimum prediction " of a video blocks is identified, encoder can be encoded to the difference between current video block and this optimum prediction.The process that difference between current video block and this optimum prediction is encoded comprises the process that is called as motion compensation.Motion compensation comprises the process of creating difference block, current video block that this difference block indicates to be encoded and the difference between the optimum prediction.Particularly, motion compensation is commonly referred to as and utilizes motion vector to obtain best prediction block, deducts optimum prediction to generate the behavior of a difference block from an input block then.
After motion compensation is created difference block, typically carry out a series of other coding steps, so that this difference block is encoded.These other coding steps can be depending on the coding standard of use.For example, in the encoder of MPEG4 compatibility, these other coding steps can comprise 8 * 8 discrete cosine transforms, be scalar quantization (scalar quantization) then, being that grating-zigzag (raster-to-zigzag) is reset then, is run-length encoding then, is huffman coding then.The difference block that is encoded can be transmitted with a motion vector, and which video blocks that this motion vector is pointed out from previous frame is used for coding.Decoder receives the difference block of this motion vector and this coding, the information of receiving is decoded, to rebuild this video sequence.
For video coding has been developed many rate control techniques.For the facility of the real-time Transmission of video sequence, rate control techniques is important especially, but rate control techniques also can be used in the non real-time coding environment.For rate controlled, coding techniques is dynamically regulated the figure place that every frame is encoded.Particularly, rate controlled can limit the figure place that every frame is encoded, to guarantee that speed that video sequence can be given is encoded effectively and to transmit by the bandwidth of distributing.If coding techniques does not respond the scene change of video sequence, then the bit rate of the real-time Transmission of video sequence can have very big change with scene change.Therefore, in order to define constant substantially bit rate, the figure place of every frame is dynamically regulated in cataloged procedure.
A kind of mode that realizes the rate controlled coding is to make to regulate quantization parameter (QP) in video coding process.QP directly influences the figure place that per second is encoded.When QP increased, less data were saved, and the quality of video coding may reduce.When QP reduced, more data were saved, and the quality of video coding can improve.Yet if QP is too little, the figure place that per second is encoded can surpass the bandwidth of distributing, and the ability of infringement transmission frame in the limited amount bandwidth.By selecting QP, can make the bit rate of transmission of video frame constant substantially with dynamical fashion.
Summary of the invention
Present disclosure has been described the rate control techniques that can improve video coding.Particularly, described rate control techniques utilizes the figure place that every frame is encoded and quantizes relation between the quantity of nonzero coefficient of rear video piece.The quantity of the nonzero coefficient of the video blocks of frame is known as ρ after quantizing.The value of ρ usually and in the video coding process used figure place proportional.The disclosure is utilized a relation between ρ and the quantization parameter (QP), to realize the rate controlled video coding.More particularly, the disclosure provides the technology that generates a question blank (LUT), and this question blank is mapped to different QP with the value of ρ.Then, can select QP, to obtain code rate, this code rate and the ρ linear correlation of expectation.Described technology can be simplified video encoder, and reduces the desired number of computations of using in the generating rate control of video coding of LUT widely.
The disclosure has also been described the video encoder of realizing rate control techniques described here.In one embodiment, this video encoder comprises an encoder, calculate the threshold value of the non-quantized coefficient of video blocks, wherein when threshold value identification becomes non-zero for different quantization parameter (QP's) quantization parameter, and generating a ρ-QP question blank (LUT), it utilizes threshold value will quantize a large amount of nonzero coefficients in (ρ's) back and is mapped to QP.Video encoder also comprises a memory, storage ρ-QP LUT.At one more in the certain embodiments, encoder generates one with the threshold value-QP LUT of threshold map to QP, and utilizes threshold value-QP LUT to generate ρ-QPLUT.In any case, discern the threshold value that when becomes non-zero for different quantization parameter (QP's) quantization parameter by utilizing, described technology can be simplified the generation of ρ-QP LUT greatly.
These technology described here and other technology can be used in the digital-video equipment of hardware, software, firmware or its combination.If realize in software, software can be carried out in digital signal processor (DSP).In this case, originally the software of execution technique can be stored in the computer-readable medium, and be written in DSP and carry out, and is used for the effective speed control coding of digital-video equipment.Other details of various embodiment is set forth in accompanying drawing and following description.From description, accompanying drawing and the claim of this paper, can obviously see its its feature, target and advantage.
Description of drawings
Fig. 1 is a block diagram, represents an exemplary system, and wherein the source digital-video equipment is transferred to receiving digital video equipment with the coded sequence of video data.
Fig. 2 is a block diagram according to the digital-video equipment of embodiment of the present disclosure.
Fig. 3 is the figure place of the every frame of expression and the chart of the linear approximate relationship between the ρ.
Fig. 4 illustrates an exemplary circuitry figure, and this circuit can directly calculate ρ (OP) question blank (LUT) according to MPEG-4 standard or ITUH.263 standard.
Fig. 5 A and 5B are the exemplary circuit diagram of illustrative circuitry, and this circuit can be used to directly calculate ρ (0P) LUT according to the ITUH.264 standard.
Fig. 6 is the histogram of interior DC coefficient, and it is unnecessary that signal is used independent equation (or table is searched) for interior ac coefficient, because it is few to quantize the chance of these coefficient vanishing of back.
Fig. 7 is the exemplary circuit diagram of a typical circuit, and this circuit can be used for according to ITUH.264 criterion calculation employed threshold value in the establishment of threshold value-OP LUT.
Fig. 8 A and 8B are signals the round off chart of effect of the deviation of using for calculated threshold LUT.
Fig. 9 can be used for the exemplary circuit diagram of accumulation threshold QP with the circuit that forms a threshold value-QP table.
Figure 10 comprises four different curves, the position that every frame that expression is obtained by the baseline method of routine and ρ described here-territory method of rate control uses and the Y-PSNR (PSNR) of every frame.
Figure 11 is the figure of standard deviation of the position that is used for the different video segment that utilizes the ρ-territory method of baseline method, ρ-territory method described here and adaptation described here.
Figure 12 comprises figure and corresponding video frame, and the remarkable reduction of frame level-rate variation that signal is caused by ρ-territory rate controlled does not cause any decline of encoded video sequence quality.
Embodiment
The disclosure is described the rate control techniques that can be used for improving video coding.These technology can be used for any in the various video encoding standards, as MPEG-4 standard, ITU H.264 standard or other standard of standard, ITU H.263.Specifically, these technology are utilized the figure place (code rate) that every frame is encoded and are quantized relation between the quantity of nonzero coefficient of video blocks of back frame.The quantity of the nonzero coefficient of the video blocks of frame is known as ρ after quantizing.The value of ρ usually and the quantization parameter (QP) that uses in the video coding proportional.Therefore, the disclosure is utilized the relation between ρ and the QP, to realize the rate controlled video coding.More specifically, the disclosure provides the technology of generated query table (LUT), and this question blank is mapped to different Q P with the value of ρ.Described technology can be simplified video encoder, and reduces the desired number of computations of using in the speed control of video coding in generation ρ-territory of LUT greatly.Video encoder utilizes LUT to select QP, guarantees to reach the code rate of expectation.
Fig. 1 is a block diagram, represents an exemplary system 10, and wherein source device 12 sends a coded sequence of video data to receiving equipment 14 by communication link 15.Source device 12 and receiving equipment 14 all are digital-video equipments.Particularly, source device 12 is with a video standard, as MPEG-4 standard, ITU H.263 standard, ITU H.264 standard maybe can use in various other standards of rate controlled video coding any one to coding video data.In the equipment 12,14 of system 10 one or both are achieved as follows the rate control techniques of describing in detail in the literary composition, to improve video coding process.For the real-time Transmission of the video sequence that passes through qualification bandwidth communication link 15 (as wireless communication links), such rate control techniques is useful especially.
Communication link 15 can comprise Radio Link, physical transfer circuit, optical fiber, as local area network (LAN), wide area network or such as the network based on packet, the public switched telephone network (PSTN) of the World Wide Web of internet, or any other can transmit the communication link of data.Thereby, any suitable communication media of communication link 15 representative, or the possible combination of heterogeneous networks and link, with from source device 12 to receiving equipment 14 transmitting video datas.As indicated above, communication link 15 can have the bandwidth of qualification, makes rate controlled extremely important for the real-time Transmission of the video sequence that passes through link 15.
Source device 12 can comprise any digital-video equipment that can encode with transmitting video data.The video encoder 18 that source device 12 can comprise the video memory 16 of storing digital video sequences, encode to this sequence and by the transmitter 20 of communication link 15 to source device 14 transfer encoding sequences.Video encoder 18 can comprise, for example various hardware, software or firmware, or as described herein, carry out the one or more digital signal processors (DSP) of programmable software modules with the control of video coding techniques.Can provide relevant memory and logical circuit to support DSP control of video coding techniques.
Source device 12 also can comprise a video capturing device 23, as video camera, and with the seizure video sequence, and the sequence that storage is caught in memory 16.Particularly, video capturing device 23 can comprise charge-coupled device (CCD), charge injection device, photodiode array, CMOS (Complementary Metal Oxide Semiconductor) (CMOS) device, or any can captured video image or other photosensitive device of digital video sequences.
As further example, video capturing device 23 can be a video converter, and the analog video data of TV, cartridge VTR, field camera or another video equipment is converted to digital of digital video data coming freely for it.In certain embodiments, source device 12 can be configured to by the real-time video sequence of communication link 15 transmission.In this case, receiving equipment 14 can receive real-time video sequence and this video sequence is shown to the user.Perhaps, source device 12 can be caught and encoded video sequence, and this video sequence can be used as video data file, promptly sends to receiving equipment 14 in non real-time mode.Like this, source device 12 and receiving equipment 14 can support these to use, such as video communication, video clips playback, video-mail or as video conference on mobile wireless network.Equipment 12 and 14 can comprise various other elements that do not illustrate especially in Fig. 1.
Receiving equipment 14 can adopt the form of any digital-video equipment that can receive the decode video data.For example, receiving equipment 14 can comprise a receiver 22, for example comes from the digital video sequences of transmitter 20 received codes by intermediate line link, router, other network equipment or the like.Receiving equipment 14 also can comprise the Video Decoder 24 that this sequence is decoded, and a display device 26 that this sequence is shown to the user.But in certain embodiments, receiving equipment 14 can not comprise integrated display device 14.Under these circumstances, receiving equipment 14 can be used as receiver, the video data that receives is decoded, to drive independent display device, as a TV or monitor.
The exemplary apparatus of source device 12 and receiving equipment 14 can comprise server, work station or other the desk-top computing equipment that is positioned on the computer network, and as the mobile computing device of laptop computer or PDA(Personal Digital Assistant).Other example comprises as the digital television broadcasting satellite of digital TV and receiving equipment, digital camera, Digital Video or other digital recording equipment, the digital video phone such as the mobile phone with video capability, the direct and two-way communication equipment with video capability, other wireless video equipment, or the like.
In some cases, source device 12 and receiving equipment 14 comprise an encoder/decoder (CODEC) (not shown) separately, with to digital coding video data and decoding.Specifically, source device 12 and receiving equipment 14 all comprise transmitter, receiver and memory and display.Many coding techniquess of hereinafter listing are to be described under the background of the digital-video equipment that comprises encoder.But it should be understood that this encoder can form the part of CODEC.In this case, CODEC can carry out in hardware, software, firmware, DSP, microprocessor, application-specific integrated circuit (ASIC) (ASIC), field programmable gate array (FPGA), independent hardware component or its various combinations.
Block of pixels in 18 pairs of a series of frame of video of video encoder in the source device 12 are operated, with to coding video data.For example, video encoder 18 can be carried out motion estimation and motion compensation technique, and a frame of video that wherein is transmitted is divided into a plurality of block of pixels (being called as video blocks).In order to describe, these video blocks can comprise the piece of any size, and can change in given video sequence.As an example, ITU H.264 standard supports 16 * 16 video blocks, 16 * 8 video blocks, 8 * 16 video blocks, 8 * 8 video blocks, 8 * 4 video blocks, 4 * 8 video blocks and 4 * 4 video blocks.Using less video blocks that better resolution can be provided in coding in video coding, is useful especially for the location of the frame of video that comprises the higher level details.And video encoder 18 can be designed to operate on 4 * 4 video blocks, if needed, rebuilds bigger video blocks from 4 * 4 video blocks.
Each pixel in the video blocks can be represented by different n-place values (as 8), and this defines the visual properties of this pixel with colourity and brightness value, as color and brightness.For colourity and brightness value, each pixel can have one or more 8-place values.But the principle of this paper is not limited to the form of this pixel, can expand to the pixel format of the simpler less bits of use or the more complicated pixel format than multidigit.These pixels also can define according to other color coordinate system.
For each video blocks in the frame of video, the video encoder 18 of source device 12 by search in the video blocks in being stored in memory 16 one or more be transmitted in preceding frame of video (or at rear video frame) discerning a similar video blocks (being known as predicted video block), thereby carry out motion estimation.In some cases, predicted video block can comprise according to preceding or after " optimum prediction " of frame of video, although the disclosure is not limited to this aspect.Video encoder 18 is carried out motion compensation, indicates a difference block of current video blocks that will be encoded and the difference between the optimum prediction with establishment.Motion compensation is commonly referred to as and utilizes motion vector to obtain the optimum prediction video blocks, deducts optimum prediction subsequently to generate the behavior of a difference block from an input block.
After movement compensation process is created difference block, typically carry out a series of other coding steps, so that difference block is encoded.These other coding steps depend on the coding standard of use.For example, in the encoder of MPEG4 compatibility, other coding step can comprise one 8 * 8 discrete cosine transform, is scalar quantization then, then is that grating-zigzag (raster-to-zigzag) reorders, and is run-length encoding then, is huffman coding then.
In case be encoded, the difference block that is encoded can be transmitted with motion vector, and this motion vector is from the frame the preceding that is used to encode (or after frame) identification video piece.In this mode, be not to be that each frame is encoded as an independent image, but the difference between 18 pairs of consecutive frames of video encoder is encoded.Such technology has reduced the required data volume of each frame that will accurately represent video sequence significantly.
Although can use other form of motion vector, but motion vector can be with respect to location of pixels of upper left corner definition of the video blocks that is encoded.Under any circumstance, video blocks is encoded, can greatly reduce the used bandwidth of transmitting video data stream by utilizing motion vector.
In some cases, video encoder 18 is also supported intraframe coding except supporting interframe encode.Intraframe coding has utilized the similitude of frame inside, and this is called in space or the frame relevant, with further compressed video frame.Compression typically based on the texture coding of compression rest image, is encoded as discrete cosine transform (DCT) in the frame.Compression is usually compressed in conjunction with interframe and is used in the frame, but also can be used as a replacement scheme in some implementations.
The coding difference block of the coding difference between the optimum prediction of using in video blocks that but the video data of receiver 22 received codes of receiving equipment 14, its form are motion vector and expression to be encoded and the motion estimation.Yet, in some cases, not to send motion vector, but the difference between translatory movement vector and the previous motion vector predictor of calculating (MVP).In any case, decoder 24 can be carried out video decode, generates the video sequence that is shown to the user by display device 26.The decoder 24 of receiving equipment 14 also can be embodied as an encoder/decoder (CODEC).In this case, source device 12 and receiving equipment 14 can both decode, transmit, receive the decode digital video sequences.
According to present disclosure, in order to realize effective rate controlled coding, video encoder 18 is selected quantization parameter (QP) with dynamical fashion.Based on video blocks or frame of video, video encoder generates a question blank (LUT), is mapped to employed quantization parameter (QP) in the video coding with the value with ρ.Value ρ represents to quantize the quantity of the nonzero coefficient of rear video piece, and employed figure place is proportional usually and in the video coding.Therefore, video encoder 18 utilizes the relation between ρ and the QP, to reach the rate controlled video coding.More specifically, video encoder 18 is carried out the technology of generated query table (LUT), and this question blank is mapped to different Q P with the value of ρ.Because ρ and speed near-linear dependency, ρ-QP LUT can be used for selecting QP, causes effective speed control of video coding.ρ-QP LUT also can be called as ρ (QP) here.
Fig. 2 is an exemplary block diagram of equipment 30, and equipment 30 can be corresponding to source device 12.Generally speaking, equipment 30 comprises the digital-video equipment that can carry out rate controlled coding techniques described here.Equipment 30 can meet video encoding standard, as MPEG-4, ITU H.263, ITUH.264, or support the estimation of intraframe video coding and another video encoding standard of motion compensation technique.
As shown in Figure 2, equipment 30 comprise video coding apparatus 32 that video sequence is encoded and before coding with a video memory 34 of stores video sequences afterwards.Equipment 30 also can comprise and sends the sequence the be encoded transmitter 36 to another equipment, also may comprise video capturing device 38, as video camera, to catch video sequence and storage is caught in memory 34 sequence.The connection that the various elements of equipment 30 can communicate by communication bus 35.Various other elements can be included in the equipment 30 as intra encoder element, various filter or other element, but for brevity, these devices are not illustrated particularly yet.
Video memory 34 typically comprises a relatively large memory space.For example, video memory 34 can comprise dynamic random access memory (DRAM) or flash memory.In other example, video memory 34 can comprise nonvolatile memory or any other data storage device.
Video coding apparatus 32 can comprise a chipset that is used for mobile radiotelephone, comprises the combination of hardware, software, firmware and/or processor or digital signal processor (DSP).Video coding apparatus 32 generally includes an encoder 28 that is connected to local storage 37.Local storage 37 can comprise 34 littler, the memory space faster of relative video memory.As an example, local storage 37 can comprise synchronous RAM (SRAM).Local storage 37 can comprise " on the sheet (on-chip) " memory that other parts with video coding apparatus 32 integrate, to provide very fast data access in the high-intensity encoding process process of processor.In the cataloged procedure of given frame of video, the current video block that is encoded can be loaded into local storage 37 from video memory 34.The used search volume of optimum prediction, location also can be loaded into local storage 37 from video memory 34.
This search volume can comprise the subclass of one or more pixels in preceding frame of video (or back frame).The subclass of selecting can be discerned a similar position as optimum prediction identification in advance, and it mates with the current video block that is encoded very much.And if use different search level (search stage), the search volume can change by rough estimation.Under this situation, the search volume can progressively diminish aspect search volume big or small, and these search are after a while compared previous search and are performed with bigger resolution.
Local storage 37 is loaded with the current video block and the search volume that will be encoded, and this search volume comprises part or all of one or more frame of video of using in interframe encode.Motion estimator 40 compares the various video blocks in current video block and the search volume, to discern an optimum prediction.But in some cases, the suitable coupling that is used to encode (adequate match) can be discerned quickly, and each possible candidate of verification especially, in this case, though suitably coupling is enough for the effective video coding, in fact this suitable coupling may not be " the best " prediction.Generally speaking, phrase " predicted video block " refers to a suitably coupling, and it can be optimum prediction.
Comparison between the candidate video blocks in the current video block that motion estimator 40 execution will be encoded and the search volume of memory 37.In some cases, candidate video blocks can be included as the non-integer pixel value that the mark interpolation is generated.As example, motion estimator 40 can be carried out absolute error and (SAD) technology, the difference of two squares and (SSD) technology or other comparison techniques, with the different value of definition candidate video blocks.Lower difference represents that generally candidate video blocks is a better matching, therefore compares with other candidate video blocks that generates higher difference, and be the better candidate that is used for the motion estimation coding.
At last, one " optimum prediction " of motion estimator identification, this is the candidate video blocks of mating most with the video blocks that will be encoded.But be understandable that in many cases, can locate a suitably coupling before this optimum prediction, under these circumstances, this suitably mates and can be used for coding.In addition, predicted video block refers to a suitably coupling, and it can be optimum prediction.
In case the optimum prediction passive movement of video blocks estimation device 40 is discerned, motion compensator 42 is just created a difference block, and this difference block is represented the difference between current video block and the optimum prediction.Difference block encoder 44 can be further to this difference block coding, compress this difference block, and transmit the difference block of this coding, so that be transferred to another equipment, thereby confirm to be used to coding from which candidate video blocks of search volume along motion vector (or the difference between motion vector and the motion vector predictor).Because concrete parts can change along with the concrete standard of being supported,, be used for after motion compensation, carrying out the other parts of encoding and be summarized as difference block encoder 44 for describing for simplicity.In other words, difference block encoder 44 can be carried out the coding techniques of one or more routines to the difference block of above-mentioned generation.
It is very big that the cataloged procedure that comprises motion estimation and motion compensation calculates intensity.But it can be limited carrying out the necessary number of computations of rate controlled.For carrying out such rate controlled, video encoder 28 comprises a rate controlled unit 46.Rate controlled unit 46 utilizes the figure place that every frame is encoded and quantizes relation between the quantity of nonzero coefficient of rear video piece.Expression quantizes the value of ρ of quantity of the nonzero coefficient of rear video piece, generally be the figure place that is encoded with every frame proportional (and therefore with constant frame rate under the figure place that is encoded of per second proportional).Thereby rate controlled unit 46 utilizes the relation between ρ and the QP, to obtain the rate controlled video coding.More particularly, rate controlled unit 46 generates one or more LUT48, and the value of ρ is mapped to different QP.Can select QP then, be used for value corresponding to the desirable ρ of the video coding rate of hope.
As hereinafter in greater detail, the rate controlled unit 46 of video encoder 28 calculates the threshold value of the non-quantized coefficient of a video blocks, and wherein threshold value identification is for different quantization parameters (QP ' s), and when the coefficient of quantification becomes non-zero.Rate controlled unit 46 generates a ρ-QP LUT then, utilizes threshold value that the quantity that quantizes back (ρ ' s) nonzero coefficient is mapped to QP ' s.Local storage 37 storage ρ-QP LUT.At one more specifically among the embodiment, the rate controlled unit 46 of video encoder 28 can generate one the threshold value QP LUT of threshold map to QP ' s, utilizes this threshold value-QP LUT to generate ρ-QP LUT.The one or more LUT of the general expression of LUT48, listed as this paper, as ρ-QP LUT, may be in addition in order to generate threshold value-QP LUT of ρ-QP LUT.
Generate after ρ-QP LUT, video encoder 28 selects a QP to be used for the rate controlled video coding of video blocks from ρ-QP LUT.Video encoder 28 based on the coefficient of the QP quantitation video piece of selecting, is encoded to video blocks according to inter-frame video coding techniques as indicated above then.
The establishment of ρ-QP LUT can be carried out on video blocks basis or frame of video basis.In the previous case, video encoder 28 is that the different video piece of a frame of video generates different ρ-QP LUT, utilizes a corresponding ρ-QP LUT of given video blocks, is that the rate controlled video coding of a given video blocks is selected a QP.Under latter event, video encoder 28 is that the different video frame of a video sequence generates different ρ-QP LUT, utilizing a corresponding ρ-QP LUT of given frame of video, is that the rate controlled video coding of the video blocks of a given frame of video is selected a QP.
In video coding, wish to have an accurate rate-distortion model usually.Accurate rate-distortion model can cause a rate controlled scheme, and it not only obtains target bit rate, and produces the low variation of every framing bit number.Compare with many other rate control algorithms, especially compare, utilize the quantity of nonzero coefficient (ρ) to predict that the rate controlled scheme of bit rate can obtain the significantly performance of improvement with adopting fixedly the algorithm of secondary rate-distortion model.Utilizing fixedly, the conventional algorithm of secondary rate-distortion model is referred to as conventional baseline method or baseline method in this article.
Basically, ρ-territory rate controlled is based on two simple principle:
1, ρ is and the figure place linear correlation of using; And
2, the QP value that generates a specific ρ value can be estimated from non-quantized conversion coefficient.
If R needs the figure place used on a frame, the quantity of the nonzero coefficient that should generate after then quantizing is to be provided by following equation:
R=A ρ+B equation 1
In above-mentioned equation 1, because non-texture information, B parameter can be considered to the position, and parameter A can be counted as the encode par of required position of nonzero coefficient.Parameter A and B can estimate from the R of former frame and the value of ρ.From above-mentioned equation 1,, can very directly estimate ρ if R is given.Fig. 3 draws the figure place of every frame use and the ρ of different frame.As can be seen from Figure 3, the relation between R and the ρ is an approximately linear.
Therefore, rate control techniques can select to produce a QP value of the desired value of ρ.Yet, for selecting a such QP value, need know the quantity of non-zero transform coefficient, this coefficient can draw from each the permissible QP that is supported by the standard of using.If conversion coefficient is with T iProvide, corresponding to the quantization step of QP with S QPProvide, then ρ-QP table can be provided by following:
ρ ( QP ) = Σ i = 0 N - 1 f ( T i , S QP )
Wherein equation 2
f(T i,S Qp)=1 iff|T i+r qp|≥S QP
=Ootherwise
In above-mentioned equation 2, step-length S QpWith the factor r that rounds off QpDepend on following factors:
1, coding standard, as ITU H.264, MPEG-4 or ITU H.263;
2, be to carry out intraframe coding or interframe encode; And
3, coefficient subscript.
For example, in MPEG-4, all coefficient S QPInter-coded macroblocks be to provide by 2QP, r QPBe by-(QP/2) provide.The equation 2 that is used to generate ρ-QP table can be realized by adder and comparator.Need be to the value computational chart clauses and subclauses ρ (QP) of all QP.For MPEG-4, the QP scope is from 1 to 31, and for H.264, its scope is 0 to 51.Usually need to repeat these calculating, to calculate all possible QP value.If a specific quantization parameter ρ is 0, then for all bigger quantization parameter values, ρ is guaranteed to remain on 0, does not therefore need to be calculated.That is to say:
If ρ is (QP i)=0 is item for all QP>QP i, ρ (QP)=0
Can be from ρ-QP table that a macro block obtains by accumulative total on entire frame, with the ρ-QP table that obtains this frame." macro block " typically refers to the video blocks that one 16 pixel is taken advantage of 16 pixels.If supposing the image of a video sequence is very stably, then ρ-QP the table from the former frame estimation can be used to predict the QP of present frame.And, utilize the rate controlled of macro-block level on macroblock basis, can change the initial value of QP.
Can utilize the following step, carry out a basic ρ-territory rate control algorithm.
Step 1: the position budget R of estimation present frame f
Step 2: utilize above-mentioned equation 1, the ρ that estimation is corresponding fFor first frame, use the initial value of A and B
Step 3: utilize ρ f(QP), select a QP=QP f, QP fGiven one near ρ fρ
Step 4 (a): carry out macroblock level rate control initialization: ρ a=0; I=0, wherein N is the quantity of every frame macro block, i is the macro block subscript.
Step 4 (b): ρ m=(ρ fa)/(N-i).Utilize ρ m(QP), select a QP=QP m, QP mGiven near ρ mA ρ.ρ m(QP) can be ρ f(QP) a ratio version, or estimate from macro block before.Location QP m, make its variation (for MPEG-4) in [2+2] from previous macro block (for MPEG-4).
Step 4 (c):, utilize above-mentioned equation 2 to calculate ρ for each QP i(QP)
Step 4 (d): for each QP, with ρ (QP)+ρ i(QP) substitute ρ (QP)
Step 4 (e): with ρ a+ ρ i(QP m) alternative ρ aSubstitute i with i+1
Step 4 (f): be recycled to step 4 (b) up to (i<n=
Step 5: substitute ρ with ρ (QP) f(QP).Utilize ρ aWith texture bits (R used in the present frame t) and non-texture (R n) position, estimate A and B again.B=R nAnd A=(R t/ ρ a)
Step 6: be recycled to step (1), all finish up to all frames.
For MPEG compatible-4 and ITU encoder H.263, the ρ-calculating of QP table can utilize than the more direct mode of compatible ITU encoder H.264 and carry out.Following false code is represented according to MPEG-4 or the H.263 calculating of such video blocks of standard of ITU.
    For QP=1 to 31  {       ρ(QP)=0;       If(INTRA)       {       if(|(DCT(0)+(dc_scalar>>1))|>=dc_scalar)              ρ(QP)++;       for i=0 to 63              if(|DCT(i)|>=(QP<<1))                       ρ(QP)++;              end  }  else  {  for i=0 to 63        if(|(|DCT(i)|-(QP>>1))|>=(QP<<1))                  ρ(QP)++;         end  }  if(ρ(QP))=0)        break;  }
Fig. 4 represents typical hardware circuit diagram, can be used for calculating meeting H.263 ρ (QP) table of an encoder of coding standard of MPEG-4 or ITU.Adding up shown in Fig. 4 need be repeated, to be used for all brightness (brightness) and colourity (colourity) piece, as 4 brightness and 2 chrominance block.
As shown in Figure 4, circuit 400 receives DCT (i) as input.DCT (i) representative has the discrete cosine transform coefficient of subscript (i).Piece 401 generates the absolute value of DCT (i), and it is sent to adder 402.The absolute value of DCT (i) is added to the output of multiplexer 403 then.Multiplexer 403 is selected in three values.To the input of multiplexer 403 is move to right 1 dc_scaler value, 0 value and 1 the negative of quantization parameter QP of moving to right.When I and DC are 1, multiplexer 403 1 the dc_scaler value of selecting to move to right, when I is 1, DC is 0 o'clock selective value 0, when I is 0, regardless of the DC value, move to right 1 the negative of quantization parameter QP of selection.During piece, the I value is 1 in input block is a frame, and when input block was an interframe block, the I value was 0.When input parameter was DC, the DC value was 1, and when input parameter was AC, the DC value was 0.The DC coefficient is represented the mean value of a video blocks, and the AC coefficient is all the other coefficients of this video blocks.
The output of multiplexer 403 is added to the output of piece 401 by adder 402.404 absolute values that generate the output of adder 402 of piece, and the negative that this value is provided is added to the output of multiplexer 406 as the input to adder 405.Multiplexer 406 receives the dc_scaler values and 1 the quantization parameter QP of moving to left.When I and DC were 1, multiplexer 406 selected dc_scaler values as output, and 1 quantization parameter QP is as output otherwise selection moves to left.
Adder 405 deducts the output of piece 404 from the output of multiplexer 406.Piece 407 is checked the 12nd position (sign bit) of the output of adder 405, and provides this position to adder 408.Piece 409 is by add up ρ (QP) table of the clauses and subclauses that sign bit are added to each front.Thereby adder 408 and ρ (QP) table block 409 can be counted as generating the accumulator of ρ (QP) table together.Circuit 400 can repeat these calculating, from I=1 to 63, and QP=1 to 31.
In compatible ITU encoder H.264, quantization step merges with the coefficient that relies on the conversion ratio.This makes the calculating of ρ (QP) table more complicated.Utilize following equation can carry out quantification.
F Ij=(MW Ij+ A)>>S equation 3 F wherein IjBe quantization parameter, W IjIt is non-quantized conversion coefficient.Multiplication factor M, additive factor A and translocation factor S depend on QP, coefficient subscript i, j, intra prediction mode, and piece is brightness or colourity.From equation 3, can be observed quantized value F IjTo be nonzero value, and have only and work as:
W Ij>=(2 s-A)/and M, equation 4
>=C
Wherein
S=16+ (QP/6) is for the DC and the colourity of Intra_16 * 16
S=15+ (QP/6) for other
A=2 S-1In frame
A=2 S-2For interframe
Quantification can be designed, and doubles so that QP increases by 6 o'clock quantization steps.Therefore, M has one group of 6 unique value, and the scope of M value is as (QP%6) and subscript i, the function of j, and symbol % represents the MOD function, and remainder is provided.Thereby QP%6 is identical with QP MOD 6, and this is that QP is removed by 6, produces the remainder of division.It is because the needed ratio of integer transform is absorbed this fact in quantification treatment that M relies on following target.Following table 1 has been represented the value of M.Particularly, table 1 has been listed multiplier value (being also referred to as multiplication factor), and M is used for different subscripts and QP%6.
Table 1
QP%6 Subscript (0,0) (2,0) (2,2) (0,2) Subscript (1,1) (1,3) (3,1) (3,3) Other subscript
0 13107 5243 8066
1 11916 4660 7490
2 10082 4194 6554
3 9362 3647 5825
4 8192 3355 5243
5 7282 2893 4559
From equation 4, can see, if non-quantized value W IjMore than or equal to C, the result will be a nonzero coefficient.Because the right side of equation 4 is marks, with W IjInteger value is relatively provided by following:
Figure A20051008410500221
Equation 5
Following table 2 is in various subscripts and the frame and the tabulation of the comparator value C of the QP%6 of inter macroblocks.
Table 2
QP%6 S=24 Intra-frame macro block: A=2 s-1 Inter macroblocks: A=2 s-2
Subscript (0,0) (2,0) (2,2) (0,2) Subscript (1,1) (1,3) (3,1) (3,3) Other subscript Subscript (0,0) (2,0) (2,2) (0,2) Subscript (1,1) (1,3) (3,1) (3,3) Other subscript
0 641 1600 1040 961 2400 1560
1 704 1801 1120 1056 2701 1680
2 833 2001 1280 1249 3001 1920
3 897 2301 1441 1345 3451 2161
4 1024 2501 1600 1536 3751 2400
5 1152 2900 1841 1728 4350 2761
The value of the comparator C when particularly, table 2 has provided the maximum shift value of S=24 of each QP%6.These values can from left to right be stored in the row of 36 * 13ROM and take advantage of in the row.Fig. 5 A and 5B are the circuit diagrams of expression exemplary circuit, and this circuit can be used for criterion calculation ρ (QP) table H.264 according to ITU.
Shown in Fig. 5 A, value 15 is by adder 501 value of being added to QP/6.The output of adder 501 is provided for the output of multiplexer 505 and adder 501, and the output of adder 501 is added 1.The output of multiplexer 505 is based on selected with the control signal of OR-gate 504 from AND gate 503.Be input to the i of AND gate 503 and the subscript value that j is input coefficient, and be squeezed.Whether the input indication current block to OR-gate 504 is piece in the frame, and whether current block is chrominance block.When two inputs to multiplexer 505 all were 1, the output of adder 502 device that is re-used was selected, otherwise, select the output of adder 501.The output S of circuit 500 is used by the circuit among Fig. 5 B 600.
Shown in Fig. 5 B, multiplexer 603 is based on one in the input signal selective value 0,1 or 2 of AND gate 601 and NOR gate 602.To the input of door 601 and 602 is in the dimension the 0th of the subscript coefficient separately of i and j.If door 601 output is 0, and the output of door 602 is 1, multiplexer 603 selective values 0.If door 601 output is 1, and the output of door 602 is 0, multiplexer 603 selective values 1.If door 601 output is 0, and the output of door 602 is 0, multiplexer 603 selective values 2.
Multiplier 604 multiply by 6 to the output of multiplexer 603, and imports this and be worth memory 605 and 606.IROM605 is corresponding to piece in the frame, and PROM is corresponding to interframe block.When interframe block just when processed, be 1 to the input value P of multiplexer 607.
Multiplexer 607 is based on selecting among input P from memory 605,606.The output of multiplexer 607 is provided to adder 608.From the 15 value S that deduct circuit 5A.Value 511 is moved to right by the result of (15-S) of piece 609, and the output of piece 609 is provided to adder 608.Adder 608 is the output addition of piece 609 and multiplexer 607.The output of adder 608 is moved to right by 24-S then, and it is represented by variable C, represents a comparator value.Value C is provided to adder 611.Value W IjThe expression input coefficient.Piece 612 generation value W IjAbsolute value, deducted from value C by adder.
Piece 613 generates the sign bit (the 15th) of the output of adder 611.Then, sign bit is provided to adder 614.Piece 615 is by being added to sign bit in add up ρ (QP) table of each preceding paragraph.Thereby adder 614 and ρ (QP) table 615 can be counted as an accumulator that generates ρ (QP) table together.Circuit 500 and 600 can repeat these calculating, from i, and j=1 to 3, and QP=1 to 51.
Shown in Fig. 5 A and 5B summary, the factor that rounds off was added to the comparator value of storage before its displacement downwards.The selection of this factor is to make the mark that obtains from the division computing that always rounds up.By doing like this, can guarantee that the C that obtains is the rounding operation of equation 5 mid-scores for each value between 15 to 24.In addition, the majority of circuit has been arranged in hardware component shown in Fig. 5 A and the 5B, and these parts are carried out the H.264 forward quantification of standard according to ITU, comprises the parts of address generator and calculating S.Adding up shown in Fig. 5 A and the 5B can be to all brightness and chrominance block (16 brightness and 8 chrominance block) and be repeated.
Above described in Fig. 4, Fig. 5 A and the 5B and the direct calculating of the ρ-QP of explanation table to calculate be complicated.In the worst case, this direct calculating can comprise once comparing and a sub-addition each each coefficient of QP.If QP has M possible values, and N coefficient arranged, then directly calculating ρ-required operation amount of QP table then is M * N.To describe the method for more simplifying below, comprise various " threshold value " method.
In a kind of " threshold value " method, ρ-QP table can comprise each non-quantized coefficient C iCalculating QP threshold tau iThreshold tau iCan be a quantization parameter, so that,
For all QP>τ i, Q (C 1, QP)=0 He
For all QP≤τ i, Q (C i, QP) ≠ 0 equation 6 function Q (C i, QP) expression utilizes the coefficient C of quantization parameter QP iQuantization operation.Threshold value-QP table T (QP) can utilize following false code to calculate:
for QP=1 to 31
T(QP)=0
End
Fir I=1 to N
T(τ i)++;
End
Then, the false code below utilizing, can easily calculate a ρ-QP table from T (QP):
for QP=QP MAX-1 to QP MIN
T(QP)=T(QP+1)+T(QP)
End
ρ(QP)=T(QP)
The N required with direct calculating * M calculating is compared, and the total quantity of utilizing threshold method (being also referred to as a kind of threshold mode) to calculate ρ-operation that the QP table needs can be reduced to 2N+M.This normally supposes needs N operation to search a table to calculate the threshold value of each coefficient, also needs the add up threshold value of N coefficient of N operation, needs M operation to come accumulative total T (OP) table then, obtains ρ-QP at last and shows.
If each macro block is all carried out the calculating of ρ-QP table, then threshold method will calculate and reduce more than 90%.And, if being every frame, calculates once by this table, the minimizing meeting of calculating is bigger.It also is very favorable that the threshold method that calculates ρ-QP table is carried out for hardware, because it has avoided providing the needs of the accumulator of M parallel running.If carry out in hardware, hardware can be each macro block and calculates T (QP) table, and it is sent to DSP.DSP will use this threshold value table to calculate ρ-QP table.
For MPEG-4 and H.263, τ iCalculating can carry out as follows:
τ i=|C i|>>1,
For AC in the frame and DC coefficient
τ i = | 2 C i | 5
=(|C i|×0x666+0x4CD)>>12
For interframe AC and DC coefficient for the situation in the frame, | C i| be limited to [0 62], and for the interframe situation, | C i| be limited to [0 77].0x666 is (2/5) and 0x4CD is (3/10) in 012.From these equatioies, can find out, for MPEG-4 and H.263, estimate τ iNecessary calculating is inappreciable.Because the chance of these coefficient vanishing is few after quantizing, therefore there is no need to utilize the independent equation (or question blank) that is used for AC coefficient in the frame.This can be in the frame shown in Fig. 6 the histogram of DC coefficient as can be seen.
Below, table 3 is the exemplary query tables (LUT) that are used to seek the threshold value of MPEG4 interframe coefficient.
Table 3
The address Value The address Value The address Value
0 0 27 11 54 21
1 0 28 11 55 22
2 1 29 11 56 22
3 1 30 12 57 23
4 1 31 12 58 23
5 2 32 13 59 23
6 2 33 13 60 24
7 3 34 13 61 24
8 3 35 14 62 25
9 3 36 14 63 25
10 4 37 15 64 25
11 4 38 15 65 26
12 5 39 15 66 26
13 5 40 16 67 27
14 5 41 16 68 27
15 6 42 17 69 27
16 6 43 17 70 28
17 7 44 17 71 28
18 7 45 18 72 29
19 7 46 18 73 29
20 8 47 19 74 29
21 8 48 19 75 30
22 9 49 19 76 30
23 9 50 20 77 31
24 9 51 20 - -
25 10 52 21 - -
26 10 53 21 - -
Below, table 4 is the exemplary query tables (LUT) that are used to seek the threshold value of coefficient in the MPEG4 frame.
Table 4
The address Value The address Value The address Value
0 0 26 13 52 26
1 0 27 13 53 26
2 1 28 14 54 27
3 1 29 14 55 27
4 2 30 15 56 28
5 2 31 15 57 28
6 3 32 16 58 29
7 3 33 16 59 29
8 4 34 17 60 30
9 4 35 17 61 30
10 5 36 18 62 31
11 5 37 18 - -
12 6 38 19 - -
13 6 39 19 - -
14 7 40 20 - -
15 7 41 20 - -
16 8 42 21 - -
17 8 43 21 - -
18 9 44 22 - -
19 9 45 22 - -
20 10 46 23 - -
21 10 47 23 - -
22 11 48 24 - -
23 11 49 24 - -
24 12 50 25 - -
25 12 51 25 - -
Particularly, if because the consideration of hardware aspect need utilize a table to carry out the threshold calculations of MPEG-4, then in table 3 and 4, provide in the frame respectively and the exemplary entries of interframe coefficient.
For ITU standard H.264, more difficult from the direct calculated threshold of non-quantized coefficient, because at ITU H.264 in the standard, divisor not only depends on QP, and depends on other factors.In Fig. 7, represented the common hardware configuration that can be used for calculated threshold of standard H.264 according to ITU.
As shown in Figure 7, input coefficient W IiBe imported into piece 701, generate W IjAbsolute value.Piece 702 restriction W IjAbsolute value to 2047, and its output sent to adder 707.The output of piece 702 also moves to right 5 by piece 703.The output of piece 703 is the input signals to multiplexer 704.Highest significant position to the input of multiplexer 704 is used for selecting output from being worth 0,1,2,3,4,5 and 6.
Adder 705 deducts 1 from the output of multiplexer 704.The output of adder 705 is moved to left 1 then.The output of piece 706 is provided to adder 707, and is added to the output of piece 702.Move to right the then value of multiplexer 704 output of the output of adder 707.Piece 709 is limited to 31 with the value of piece 708.The output of piece 709 is provided to address generator 710 then.
Address generator 710 generates the address that LUT711 uses.Particularly, address generator receives the output of piece 709, and i, is worth in j and the frame, is fed to the address of LUT711 with generation.The example of LUT711 is provided in the table 6 below and 7.A LUT of value in the table 6 expression frame, an example LUT of table 7 expression inter values.Can be mapped to one particular value among a plurality of LUT to the input value separately of address generator 710.Suitable data can be selected from LUT711 in a given address (addr).
The output of each LUT711 is provided to adder 717.The output of multiplexer 704 also is provided to multiplexer 715.Adder 712 deducts 1 from the output of multiplexer 704, and should value be provided to multiplexer 715 as other input.The output of multiplexer 715 is based on from the control signal of AND gate 713 and OR-gate 714 and is selecteed.The subscript value that is input coefficient to the input i and the j of AND gate 713, and be squeezed.Whether the input indication current block to OR-gate 714 is piece in the frame, and whether current block is a chrominance block.When two inputs to multiplexer 715 all were 1, the output of adder 712 device that is re-used was selected, and under other situation, multiplexer 715 is selected the output of multiplexers 704.
The output of multiplexer 715 be multiply by 6 by multiplier 716 then.One selection output is added among the LUT711 in the output of multiplier 716 by adder 717.The output of adder 717 is limited under it by piece 718 and is limited to 0, on be limited to 52.The output of circuit 700 is quantization parameter threshold value QP TValue QP TCan be used as input, hereinafter will discuss to the circuit 900 of Fig. 9.
In the hardware circuit diagram of Fig. 7, the absolute value that restriction factor L is used to limit non-quantized coefficient is for less than quantizing used maximum divisor.For all W greater than L Ij, guarantee τ usually Ij(QP T) equal QP MaxTherefore, need be corresponding to W greater than L IjLUT in store items.The value of L depends on the pattern of coefficient subscript and macro block (the interior or interframe of frame).Following table 5 shows the various values of L.Particularly, table 5 has been listed the QP threshold value and will have been navigated to QP MaxOn absolute value.
Table 5
Subscript (0,0) (2,0) (2,2) (0,2) Subscript (1,1) (1,3) (3,1) (3,3) Other subscript
In the frame 450 1152 722
Interframe 674 1727 1082
In certain embodiments, the KB limit of 2 power (2047) is used as the general slicing factor.Only be 32 input values [0 to 31] storage LUT.ITU H.264 in, increase at 6 o'clock at every turn in QP, quantization step (divisor) doubles.Therefore, be mapping input value, minimum divisor (power or 2), D=2 sCan be calculated, it will convert slicing input between 0 and 31 a number.This is by will importing divided by 32, and finishes by the number count to the position that is used for expression output (being carried out by displacement shift register and multiplexer).The slicing value moves down S then, if this division is rounded off, can make that the deviation of the error in inquiring about is less.Fig. 8 A and 8B are the charts of the deviation effect that rounds off that expression is used for the address computation of threshold value LUT.
Translocation factor multiply by 6, is added to the result of inquiry then, to obtain final threshold value QP.LUT depends on that macro block is piece or an interframe block in the frame, also depends on the subscript of coefficient.Table 6 and 7 has provided in the frame respectively and the exemplary entries of interframe coefficient.Specifically, table 6 is exemplary query tables seeking threshold value for coefficient in the ITUH.264 frame, and table 7 be for ITU H.264 the interframe coefficient seek an exemplary query table of threshold value.
Table 6
The address Subscript (0,0) (2,0) (2,2) (0,2) Subscript (1,1) (1,3) (3,1) (3,3) Other subscript
0 0 0 0
1 0 0 0
2 5 0 0
3 8 0 4
4 11 3 6
5 12 5 9
6 14 6 10
7 15 7 11
8 17 9 12
9 18 10 14
10 18 11 15
11 20 11 15
12 20 12 16
13 20 13 17
14 21 13 17
15 22 14 18
16 23 15 18
17 23 15 19
18 24 16 20
19 24 16 20
20 24 17 21
21 25 17 21
22 26 17 21
23 26 18 22
24 26 18 22
25 26 19 23
26 26 19 23
27 27 19 23
28 27 19 23
29 28 20 24
30 28 20 24
31 28 20 24
Table 7
The address Subscript (0,0) (2,0) (2,2) (0,2) Subscript (1,1) (1,3) (3,1) (3,3) Other subscript
0 0 0 0
1 0 0 0
2 1 0 0
3 5 0 0
4 7 0 3
5 9 1 5
6 11 3 6
7 12 4 8
8 13 5 9
9 14 6 10
10 15 7 11
11 16 8 12
12 17 9 12
13 17 9 13
14 18 10 14
15 18 11 15
16 19 11 15
17 20 12 16
18 20 12 16
19 20 13 17
20 21 13 17
21 21 13 17
22 22 14 18
23 22 14 18
24 23 15 18
25 23 15 19
26 23 15 19
27 24 16 20
28 24 16 20
29 24 16 20
30 24 17 21
31 25 17 21
For further simplifying the establishment of threshold value-QP table, can design hardware with the threshold value QP on whole coefficients that add up, form T (QP) table.Can be used for accumulation threshold QP is illustrated among Fig. 9 with the exemplary circuit diagram that forms T (QP) table.
As shown in Figure 9, circuit 900 receives and quantizes parameter threshold QP TInput.Adder 901 is from QP TDeduct 30, and this value is offered colourity QP LUT902, an one example is presented in table 8.Multiplexer 904 is based on the input signal (as determined by piece 903) of the output symbol of respective adders 901, and Luma and H264 input signal are at QP TValue and being stored between the value among the colourity QP LUT902 select.The if symbol value is zero, and the value that is stored among the colourity QP LUT902 is selected, and brightness value is that zero this piece of indication is not a luminance block, and H264 value be 1 indicate coding standard be ITU H.264.Otherwise multiplexer 904 is selected QP TAs output.The output of multiplexer 904 comprises an Input Address that is stored in T (QP) table 905.But, be output to adder 906 from the original address value output of multiplexer 904, added 1, and stored on the original address value in T (QP) table 905.Be each coefficient and these QP TIn each, generate a specific QP T
In table 8, provide the LUT that is used for colourity QP value is converted to the QP value of standard H.264 according to ITU.Specifically, table 8 shows the table of mapping colourity-QP threshold value to the QP threshold value.
Table 8
The address 0 1 2 3 4 5 6 7 8 9 10-22
Value 31 32 33 35 36 38 40 42 45 48 52
Table 9 has been listed the experimental result of the bit rate variation of different video segment.Table 9 has been listed the result who utilizes conventional baseline method and utilize ρ described herein-territory method to obtain and has been compared.Table 9 has been listed 5 different video clips that use in the experiment.Different segments is to be encoded in 4 kinds of different rate controlled modes: 64 kilobits/second (Kbps) and 1/4th CLV Common Intermediate Formats (QCIF)-15 frame/second (FPS); 28Kbps and QCIF-15FPS; 55Kbps and QCIF-10FPS; And 35Kbps and QCIF-10FPS.The baseline method generally is meant fixedly quadratic method mentioned above.
Table 9
Segment 64Kbps QClF-15FPS 28Kbps QCIF-15FPS 55Kbps QCIF-10FPS 35Kbps QCIF-10FPS
Aging method ρ-method Aging method ρ-method Aging method ρ-method Aging method ρ-method
Stefan 64.05 63.98 30.37 29.71 55.03 55.00 35.03 34.99
Table 63.95 63.97 28.00 27.99 54.97 54.97 34.97 34.98
Foreman 63.87 64.01 28.01 27.99 55.00 55.00 35.00 35.00
Mothet_dau 63.71 63.98 27.92 27.99 55.02 55.02 34.72 34.99
Costguard 63.92 64.01 27.97 28.00 55.00 55.00 34.97 35.01
Standard deviation 0.13 0.02 1.07 0.77 0.02 0.02 0.12 0.01
As can be seen from Table 9, the ρ-territory method of conventional baseline method and the present invention proposition all is enough to obtain target bit rate.ρ-territory method has reduced the variation of bit rate between the different segments.
Table 10 is listed as with the different target bit rate various video clips is encoded, and quantizes the experimental result of the standard deviation of the used position of every frame.Table 10 has been listed and has been utilized conventional baseline method result who obtains and the result who utilizes ρ described herein-territory method to obtain.Table 10 comprises the data of 5 different video segments of encoding with the different target bit rate.These different segments are encoded in 4 different rate controlled modes: 28 kilobits/second (Kbps) and 1/4th CLV Common Intermediate Formats (QCIF)-15 frame/second (FPS); 35Kbps and QCIF-10FPS; 55Kbps and QCIF-10FPS; And 64Kbps and QCIF-15FPS.
Table 10
Segment 28Kbps QCIF-64FPS (position) 35Kbps QCIF-10FPS (position) 55Kbps QCIF-10FPS (position) 64Kbps QCIF-15FPS (position)
Aging method ρ-method Aging method ρ-method Aging method ρ-method Aging method ρ-method
Stefan 553 442 1010 545 1889 861 1029 619
Table 746 558 1333 839 2163 926 1549 889
Foreman 621 302 1020 504 1323 792 1155 632
Mother_dau 772 304 2060 318 2664 864 2515 375
Costguard 646 293 956 420 1359 522 1150 476
Mean value 667 357 1275 525 1880 796 1480 598
What change reduces - 46% - 59% - 58% - 60%
As can be seen from Table 10, ρ-field technique is better significantly on performance than conventional baseline system.On average, ρ-field technique reduces standard deviation more than 50%.For some segments (mother_daughter), this reduction can be up to 85%.
Figure 10 comprises 4 different drawing, and every frame that expression is obtained by the baseline method of routine and ρ described here-territory method of rate control makes the used position and the Y-PSNR (PSNR) of every frame.The coding of the mother_daughter segment of the corresponding 64Kbps of the drawing among Figure 10.
As can be seen, although the variation of the position on the frame reduces greatly, ρ-territory rate controlled does not have negative effect to PSNR from the drawing of Figure 10.In this embodiment, ρ-territory rate controlled even temporal PSNR track played smoothing effect, and this is to wish the result that obtains.
Further improvement to coding efficiency also can obtain by parameter A and the B that revises in the equation of above listing 1.Particularly, revise parameter A and B in the equation 1, can further improve rate controlled by the position fluctuation that reduces the frame level, as shown in figure 11.This correction further will change average reduction by 37% again.In this embodiment, for each frame in the ρ adaptive technique, parameter is updated once.Parameter A combines threshold method described herein with the correction of B, is called as the threshold method of adaptation.
The variation that reduces QP in the frame also is important, because reduce the position that the variation of QP in the frame helps to reduce coding delta_QP needs, and by making the quality on the frame relatively stable, the reduction that QP changes can improve coding quality.Reducing this target that QP changes in the frame can obtain with the rate controlled of carrying out macro-block level by the pro rata ρ-QP table that utilizes former frame.This helps to reduce the variation of ρ-QP table estimation, thereby reduces the fluctuation of QP value in the frame.If the ρ of last macro block-QP table is used to rate controlled, 25% the macro block of only having an appointment has unaltered QP value.Can see, by the pro rata ρ-QP table that uses former frame, the macro block for about 80%, the value of QP does not change.
The remarkable reduction that the frame level bit rate that is caused by ρ-territory rate controlled changes can not cause the reduction of encoded video sequence quality, and is as shown in table 11.Table 11 provides from the comparison of the PSNR of various coded sequences acquisitions.
Table 11
Segment Baseline rate control (is the PSNR of unit with dB) ρ-territory rate controlled (is the PSNR of unit with dB)
Carphone 128Kbps 37.19 37.09
Carphone 40Kbps 32.16 32.11
Dancer 128Kbps 37.54 37.36
Dancer 40Kbps 31.36 31.39
Foreman 128Kbps 35.10 34.91
Foreman 40Kbps 30.53 30.51
Mean value 33.98 33.90
Figure 12 further shows any reduction that remarkable reduction that the frame level bit rate that caused by ρ-territory rate controlled changes can't cause the encoded video sequence quality.Although illustrated by utilizing ρ-territory method, obtain a kind of more accurate rate controlled, as can be seen from Figure 12, ρ-territory rate controlled also can keep lower QP value.On average, this can not increase PSNR.And qualitative variation can be lowered by the rate controlled scheme of the present invention's proposition.
Various embodiment have been described.Specifically, proved that ρ-territory rate controlled has produced splendid effect, compared, the variation of every framing bit has been reduced by 50 to 80% with conventional baseline method.This reduction that the bit rate fluctuation also has been described can not bring any reduction with the see quality of image to PSNR.Illustrated and can simplify the multiple technologies that generate ρ-QP LUT, this comprises a kind of threshold method, wherein creates a threshold value-QP LUT, and this threshold value-QP LUT is used to create ρ-QP LUT then.
Technology described herein can realize in hardware, software, firmware or its any combination.If realize with software, these technology can when carrying out, be carried out one or more method mentioned above at the computer-readable medium that comprises program code in the equipment that video sequence is encoded.In this case, computer-readable medium can comprise such as the random-access memory (ram) of Synchronous Dynamic Random Access Memory (SDRAM), read-only memory (ROM), nonvolatile RAM (NVRAM), EEPROM (Electrically Erasable Programmable Read Only Memo) (EEPROM), flash memory, or the like.
Program code can computer-readable instruction form be stored on the memory.In this case, can carry out the instruction that is stored in the memory, carry out one or more technology described here such as the processor of DSP.In some cases, these technology can be carried out by DSP, and this DSP calls various nextport hardware component NextPorts, with the speech coding process.Under other situation, video encoder can be used as microprocessor, one or more application-specific integrated circuit (ASIC) (ASIC), one or more field programmable gate array (FPGA) or some other hardware-combination of software and realizes.These and other embodiment is included in the scope of claims.

Claims (31)

1, a kind of video encoder comprises:
Encoder, it calculates the threshold value of the non-quantized coefficient of video blocks, the identification of wherein said threshold value is for different quantization parameters (QP ' s), when quantization parameter becomes non-zero, and described encoder generates a ρ-QP question blank (LUT), and described question blank utilizes described threshold value will quantize afterwards the quantity of nonzero coefficient (ρ ' s) and is mapped to described QP ' s; And
Memory, it stores described ρ-QP LUT.
2, it is QP of rate controlled video coding selection of described video blocks that video encoder as claimed in claim 1, wherein said encoder use described ρ-QP LUT.
3, video encoder as claimed in claim 2, wherein said encoder quantizes the coefficient of described video blocks based on the QP of described selection, and according to the inter-frame video coding techniques described video blocks is encoded.
4, video encoder as claimed in claim 1, wherein said encoder:
Generation is with the threshold value-QP LUT of described threshold map to QP ' s; And
Use described threshold value-QP LUT to generate described ρ-QP LUT,
The described threshold value of wherein said memory stores-QP LUT and described ρ-QP LUT.
5, video encoder as claimed in claim 4, wherein said encoder generate threshold value-QP LUT by the threshold value of the QP ' s from maximum QP to minimum QP that adds up.
6, video encoder as claimed in claim 4, wherein given threshold value (T i) make:
For all QP>T i, Q (C i, QP)=0 and
For all QP≤T i, Q (C i, QP) ≠ 0 Q (C wherein i, QP) utilize described quantization parameter QP to represent given coefficient C iQuantization operation.
7, video encoder as claimed in claim 1, wherein said encoder is that the different video piece of a frame of video generates different ρ-QP LUT, and to use the corresponding ρ-QP LUT of described given video blocks be that the rate controlled video coding of given video blocks is selected a QP.
8, video encoder as claimed in claim 1, wherein said encoder is that the different video frame of a video sequence generates different ρ-QP LUT, and to use the corresponding ρ-QP LUT of described given frame of video be that the rate controlled video coding of given frame of video is selected a QP.
9, video encoder as claimed in claim 1, wherein said encoder generate described ρ-needed totalizing of QP LUT and are approximately 2N+M, and wherein N represents the quantity of coefficient, and M represents the quantity of the probable value of QP.
10, a kind of for video coding provides the method for rate controlled, comprising:
Be the non-quantized coefficient calculations threshold value of a video blocks, the identification of wherein said threshold value is for different quantization parameters (QP ' s), and when quantization parameter becomes non-zero; And
Generate a ρ-QP question blank (LUT), the quantity (ρ ' s) that described question blank uses described threshold value will quantize the back nonzero coefficient is mapped to described QP ' s.
11, method as claimed in claim 10 comprises that also using described ρ-QP LUT is QP of rate controlled video coding selection of described video blocks.
12, method as claimed in claim 11 comprises that also the QP based on described selection quantizes the coefficient of described video blocks, and according to the inter-frame video coding techniques described video blocks is encoded.
13, method as claimed in claim 10 also comprises:
Generation is with the threshold value-QP LUT of described threshold map to quantization parameter (QP ' s); And
Use described threshold value-QP LUT to generate described ρ-QP LUT.
14, method as claimed in claim 13 wherein generates the threshold value that described threshold value-QP LUT comprises the described quantization parameter that adds up from maximum QP to minimum QP (QP ' s).
15, method as claimed in claim 10, the different video piece that also is included as frame of video generates different ρ-QP LUT, and to use the corresponding ρ-QP LUT of described given video blocks be that the rate controlled video coding of given video blocks is selected a QP.
16, method as claimed in claim 10, the different video frame that also is included as video sequence generates different ρ-QP LUT, and to use the corresponding ρ-QPLUT of described given frame of video be that the rate controlled video coding of the video blocks of given frame of video is selected a QP.
17, method as claimed in claim 10, wherein given threshold value (T i) make:
For all QP>T i, Q (C i, QP)=0 He
For all QP≤T i, Q (C i, QP) ≠ 0 Q (C wherein i, QP) utilize described quantization parameter QP to represent given coefficient C iQuantization operation.
18, method as claimed in claim 10 wherein generates needed the totalizing of described ρ-QP LUT and is approximately 2N+M, and wherein N represents the quantity of coefficient, and M represents the quantity of the probable value of QP.
19, a kind of device comprises:
Be the device of the non-quantized coefficient calculations threshold value of video blocks, wherein said threshold value identification is for different quantization parameters (QP ' s), and when quantization parameter becomes non-zero; And
Generate the device of ρ-QP question blank (LUT), described question blank uses described threshold value will quantize afterwards the quantity of nonzero coefficient (ρ ' s) and is mapped to described QP ' s.
20, device as claimed in claim 10 comprises that also using described ρ-QP LUT is the device of a QP of rate controlled video coding selection of described video blocks.
21, device as claimed in claim 20 comprises that also the QP based on described selection quantizes the coefficient of described video blocks, and according to the inter-frame video coding techniques described video blocks is carried out apparatus for encoding.
22, device as claimed in claim 19 also comprises:
With generating with the device of described threshold map to the threshold value-QP LUT of quantization parameter (QP ' s); And
Use described threshold value-QP LUT to generate the device of described ρ-QP LUT.
23, device as claimed in claim 22 wherein comprises the device of the threshold value of the described quantization parameter that adds up from maximum QP to minimum QP (QP ' s) with the device that generates described threshold value-QP LUT.
24, device as claimed in claim 22, wherein given threshold value (T i) make:
For all QP>T i, Q (C i, QP)=0 and
For all QP≤T i, Q (C i, QP) ≠ 0 Q (C wherein i, QP) utilize described quantization parameter QP to represent given coefficient C iQuantization operation.
25, device as claimed in claim 19, the different video piece that also is included as frame of video generates the device of different ρ-QP LUT and uses the corresponding ρ-QPLUT of described given video blocks is the device that the rate controlled video coding of given video blocks is selected a QP.
26, device as claimed in claim 19, the different video frame that also is included as video sequence generates the device of different ρ-QP LUT and uses the corresponding ρ-QP LUT of described given frame of video is the device that the rate controlled video coding of the video blocks of given frame of video is selected a QP.
27, device as claimed in claim 19 wherein generates needed the totalizing of described ρ-QP LUT and is approximately 2N+M, and wherein N represents the quantity of coefficient, and M represents the quantity of the probable value of QP.
28, device as claimed in claim 19 wherein is that the device of the non-quantized coefficient calculations threshold value of video blocks is included in the software of carrying out on the digital signal processor.
29, device as claimed in claim 19 wherein is that the device of the non-quantized coefficient calculations threshold value of video blocks comprises firmware.
30, device as claimed in claim 19 wherein is that the device of the non-quantized coefficient calculations threshold value of video blocks comprises hardware.
31, device as claimed in claim 30, the device that wherein generates ρ-QP LUT is included in the software of carrying out on the digital signal processor.
CN200510084105A 2004-07-08 2005-07-08 Efficient rate control techniques for video encoding Expired - Fee Related CN100581245C (en)

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
US58696304P 2004-07-08 2004-07-08
US60/586,963 2004-07-08
US11/019,331 2004-12-21

Publications (2)

Publication Number Publication Date
CN1722832A true CN1722832A (en) 2006-01-18
CN100581245C CN100581245C (en) 2010-01-13

Family

ID=35912730

Family Applications (1)

Application Number Title Priority Date Filing Date
CN200510084105A Expired - Fee Related CN100581245C (en) 2004-07-08 2005-07-08 Efficient rate control techniques for video encoding

Country Status (1)

Country Link
CN (1) CN100581245C (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103238329A (en) * 2010-12-06 2013-08-07 索尼公司 Image decoding device, motion vector decoding method, image encoding device, and motion vector encoding method
CN104871184A (en) * 2012-11-12 2015-08-26 卡尔加里科学股份有限公司 Framework to notify and invite users to join a collaborative session
CN109196863A (en) * 2016-05-27 2019-01-11 夏普株式会社 For changing the system and method for quantization parameter
CN113692740A (en) * 2019-04-19 2021-11-23 华为技术有限公司 Method and apparatus for division-free intra prediction

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5677969A (en) * 1995-02-23 1997-10-14 Motorola, Inc. Method, rate controller, and system for preventing overflow and underflow of a decoder buffer in a video compression system
CA2208950A1 (en) * 1996-07-03 1998-01-03 Xuemin Chen Rate control for stereoscopic digital video encoding
US6300973B1 (en) * 2000-01-13 2001-10-09 Meir Feder Method and system for multimedia communication control
US7206448B2 (en) * 2002-02-28 2007-04-17 At&T Corp. System and method for using pattern vectors for video and image coding and decoding

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103238329A (en) * 2010-12-06 2013-08-07 索尼公司 Image decoding device, motion vector decoding method, image encoding device, and motion vector encoding method
CN104871184A (en) * 2012-11-12 2015-08-26 卡尔加里科学股份有限公司 Framework to notify and invite users to join a collaborative session
CN109196863A (en) * 2016-05-27 2019-01-11 夏普株式会社 For changing the system and method for quantization parameter
US11039175B2 (en) 2016-05-27 2021-06-15 Sharp Kabushiki Kaisha Systems and methods for varying quantization parameters
CN109196863B (en) * 2016-05-27 2021-07-30 夏普株式会社 System and method for changing quantization parameter
CN113692740A (en) * 2019-04-19 2021-11-23 华为技术有限公司 Method and apparatus for division-free intra prediction
CN113692740B (en) * 2019-04-19 2023-08-04 华为技术有限公司 Method and apparatus for division-free intra prediction
US11870977B2 (en) 2019-04-19 2024-01-09 Huawei Technologies Co., Ltd. Method and apparatus for division-free intra-prediction

Also Published As

Publication number Publication date
CN100581245C (en) 2010-01-13

Similar Documents

Publication Publication Date Title
KR101185146B1 (en) Efficient rate control techniques for video encoding
JP4847521B2 (en) Block noise removal filtering technology for video encoding according to multiple video standards
US8208563B2 (en) Boundary artifact correction within video units
CN1236616C (en) Method and device for changing active image coding code
CN100352287C (en) Picture encoding device, image decoding device and their methods
JP5290325B2 (en) Quantization based on rate distortion modeling for CABAC coder
JP4700069B2 (en) Mode selection technique for intra prediction video coding
CN1225125C (en) Switching between bit streams in video transmission
TWI408966B (en) Different weights for uni-directional prediction and bi-directional prediction in video coding
JP4990927B2 (en) Method and apparatus for encoding / decoding motion vector information
CN1926875A (en) Motion compensation method
CN1910933A (en) Image information encoding device and image information encoding method
CN1767644A (en) Non-integer pixel sharing for video encoding
CN1713730A (en) Method of and apparatus for estimating noise of input image, and method and recording media of eliminating noise
KR20120042910A (en) Template matching for video coding
CN101044763A (en) Encoder-assisted adaptive video frame interpolation
CN1592421A (en) Moving image encoder, moving image decoder, moving image encoding method, moving image decoding method
CN1671209A (en) Moving picture coding apparatus
CN1574970A (en) Method and apparatus for encoding/decoding image using image residue prediction
CN1247670A (en) Appts. and method for optimizing rate control in coding system
CN1893657A (en) Methods and systems for rate control in video encoder
KR20120048612A (en) Non-zero rounding and prediction mode selection techniques in video encoding
US20210211680A1 (en) Method and apparatus for real-time sao parameter estimation
JPWO2006101126A1 (en) Encoding device and moving image recording system provided with encoding device
CN1225919C (en) Image information encoding method and encoder, and image information decoding method decoder

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20100113

Termination date: 20190708