WO2018068239A1 - 码率控制的方法、计算机系统和装置 - Google Patents

码率控制的方法、计算机系统和装置 Download PDF

Info

Publication number
WO2018068239A1
WO2018068239A1 PCT/CN2016/101939 CN2016101939W WO2018068239A1 WO 2018068239 A1 WO2018068239 A1 WO 2018068239A1 CN 2016101939 W CN2016101939 W CN 2016101939W WO 2018068239 A1 WO2018068239 A1 WO 2018068239A1
Authority
WO
WIPO (PCT)
Prior art keywords
strip
frame
quota
stripe
bits
Prior art date
Application number
PCT/CN2016/101939
Other languages
English (en)
French (fr)
Inventor
赵文军
陈玮
郑萧桢
Original Assignee
深圳市大疆创新科技有限公司
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 深圳市大疆创新科技有限公司 filed Critical 深圳市大疆创新科技有限公司
Priority to CN201910258306.XA priority Critical patent/CN109996076B/zh
Priority to PCT/CN2016/101939 priority patent/WO2018068239A1/zh
Priority to CN201680003464.5A priority patent/CN107113430B/zh
Publication of WO2018068239A1 publication Critical patent/WO2018068239A1/zh
Priority to US16/381,927 priority patent/US10917652B2/en
Priority to US17/169,022 priority patent/US20210160516A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/115Selection of the code volume for a coding unit prior to coding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/124Quantisation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/146Data rate or code amount at the encoder output
    • H04N19/15Data rate or code amount at the encoder output by monitoring actual compressed data size at the memory before deciding storage at the transmission buffer
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • H04N19/174Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a slice, e.g. a line of blocks or a group of blocks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • H04N19/176Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a block, e.g. a macroblock
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/186Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being a colour or a chrominance component
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/189Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the adaptation method, adaptation tool or adaptation type used for the adaptive coding
    • H04N19/196Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the adaptation method, adaptation tool or adaptation type used for the adaptive coding being specially adapted for the computation of encoding parameters, e.g. by averaging previously computed encoding parameters

Definitions

  • the present invention relates to the field of information technology and, more particularly, to a method, computer system and apparatus for rate control.
  • the communication channel bandwidth of a video communication system is generally constant and limited, and a code stream whose code rate is constantly changing is not suitable for transmission in a constant channel. Therefore, rate control is introduced in video coding in order to control the generated code stream rate within a certain fluctuation range.
  • Effective rate control enables the video communication system to have a relatively stable transmission rate and a small video delay under certain data bandwidth constraints. Therefore, how to effectively control the code rate has become a technical problem to be solved urgently.
  • Embodiments of the present invention provide a method, a computer system, and a device for rate control, which can effectively control a code rate.
  • a method for rate control comprising: determining, according to a quota of an uncoded first stripe in a frame and a quota of at least one encoded stripe in the frame, An adjustment value of the first coding parameter of the slice, wherein the quota associated code strip uses the number of bits; and the first coding parameter is determined according to the adjustment value.
  • a computer system comprising: a memory for storing computer executable instructions; a processor for accessing the memory and executing the computer executable instructions to: operate according to a frame And determining, by the quota of the first stripe that is not encoded, and the quota of the at least one encoded stripe in the frame, determining an adjustment value of the first encoding parameter used to encode the first stripe, where the quota associated with the encoded stripe is used The number of bits; based on the adjustment value, determine the number An encoding parameter.
  • an apparatus for rate control comprising: an adjustment value determining module, configured to: according to a quota of a first stripe that is not encoded in a frame, and a quota of at least one encoded stripe in the frame, Determining an adjustment value of the first coding parameter used to encode the first stripe, wherein the quota-associated coding strip uses a number of bits; the encoding parameter determining module is configured to determine the first encoding parameter according to the adjusted value .
  • a computer storage medium having stored therein program code, the program code being operative to indicate a method of performing the first aspect described above.
  • the coding parameter is determined based on the quota, and the coding parameter can be adjusted in time, so that the code rate can be effectively controlled.
  • FIG. 1 is a schematic diagram of a system to which the technical solution of the embodiment of the present invention is applicable.
  • FIG. 2 is a schematic diagram of input data in accordance with an embodiment of the present invention.
  • FIG. 3 is a schematic flow chart of a method of rate control according to an embodiment of the present invention.
  • FIG. 4 is a schematic flow chart of a method of rate control according to another embodiment of the present invention.
  • Figure 5 is a schematic illustration of the removal of high frequency coefficients in accordance with an embodiment of the present invention.
  • Figure 6 is a schematic block diagram of a computer system in accordance with an embodiment of the present invention.
  • FIG. 7 is a schematic block diagram of an apparatus for rate control according to an embodiment of the present invention.
  • the size of the sequence numbers of the processes does not imply a sequence of executions, and the order of execution of the processes should be determined by its function and internal logic, and should not be construed as an embodiment of the present invention.
  • the implementation process constitutes any limitation.
  • the technical solution of the embodiment of the present invention can be used to control the code rate of video or other media data. For example, in a case where the number of bits after encoding of each frame of the video sequence cannot exceed a certain number of bits, the technical solution of the embodiment of the present invention can implement rate control at one time without requiring pre-processing.
  • the particular number of bits that cannot be exceeded by the number of bits encoded per frame may also be referred to as the number of bits allocated to the frame or the number of bits available for the frame.
  • FIG. 1 shows a schematic diagram of a system 100 in which the technical solution of an embodiment of the present invention can be applied.
  • system 100 can receive and encode input data 102 to produce output data 108.
  • system 100 can receive video data, compressing the video data to produce a compressed bitstream.
  • the system 100 can control the code rate of the encoded data by using the technical solution of the embodiment of the present invention.
  • components in system 100 may be implemented by one or more processors, which may be processors in a computing device or processors in a mobile device (eg, a drone).
  • the processor may include an ARM processor, a Field-Programmable Gate Array (FPGA), a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), and the like.
  • FPGA Field-Programmable Gate Array
  • CPU Central Processing Unit
  • GPU Graphics Processing Unit
  • system 100 can include an encoder 104 and a code rate controller 106.
  • Encoder 104 and rate controller 106 may be implemented by the same or different computing devices.
  • the rate controller 106 can be an integrated portion of the encoder 104, or the encoder 104 can be an integrated portion of the rate controller 106.
  • Encoder 104 is operative to receive input data 102, encode input data 102, and provide output data 108 including encoded input data.
  • Input data can include text, images, graphic objects, animation sequences, audio, video, or any other data that needs to be encoded.
  • the input data may include sensory data from sensors, which may be vision sensors (eg, cameras, infrared sensors), microphones, near field sensors (eg, ultrasonic sensors, radar), position sensors, temperature sensors , touch sensors, etc.
  • the input data may include information from the user, for example, Object information, which may include facial features, fingerprint scanning, retinal scanning, voice recording, DNA sampling, and the like.
  • Encoding is necessary for efficient and/or secure transmission or storage of data.
  • the encoding of the input data may include data compression, encryption, error correction coding, format conversion, and the like.
  • compression of multimedia data such as video or audio, can reduce the number of bits transmitted in the network.
  • Sensitive data such as financial information and personally identifiable information, can be encrypted to protect confidentiality and/or privacy prior to transmission and storage.
  • Any suitable encoding technique can be used to encode the input data.
  • the type of encoding depends on the data being encoded and the specific coding requirements.
  • encoder 104 may implement one or more different codecs.
  • Each codec may include code, instructions or a computer program that implements different encoding algorithms. Based on various factors, including the type and/or source of the input data, the receiving entity of the encoded data, available computing resources, network environment, business environment, rules and standards, etc., a suitable encoder can be selected to encode the given input. data set.
  • the encoder can be configured to encode a series of video frames. Encoding the data in each frame can take a series of steps. The encoding can be based entirely on spatial information within the frame.
  • the encoding step can include a transform step, a quantization step, and an entropy encoding step.
  • rate controller 106 may control the code rate of the output data by providing encoder 104 with encoding parameters 110 (which may also be referred to as rate control parameters).
  • the code rate can be controlled to a specific range (eg, below the maximum code rate, above the minimum code rate) or close to the target average code rate.
  • the rate of control can be controlled depending on the complexity of the frame, bandwidth limitations, buffer capacity or other factors.
  • the rate control may have one or more levels, such as a Group of Picture (GOP) level, a frame level, a strip level, a macro block level, a block level, a pixel level, and the like.
  • GOP Group of Picture
  • the encoding parameters may include one or more quantization parameters that control the quantization steps in the encoding process such that the encoding parameters may control the code rate of the generated output data.
  • the quantization parameter may include a quantization step size, a quantization step size or a value related to the quantization step size, for example, a quantization parameter (QP) in an H.264 or similar encoder, or a quantization matrix or Reference matrix, etc.
  • QP quantization parameter
  • the encoding parameters may also include parameters that control other aspects of the encoding process.
  • the rate controller 106 can control the code rate based on the output information 112 about the output data 108 or the encoder 104, or control the code rate based on the input information 114 about the input data 102.
  • rate controller 106 may control the code rate based on one or more code rate control predetermined values 116.
  • the predetermined values in various embodiments of the invention may be pre-set and/or dynamically updated.
  • the predetermined value can be used to obtain the encoding parameters.
  • rate controller 106 may also control the code rate based on other additional information.
  • FIG. 2 shows a schematic diagram of input data in accordance with an embodiment of the present invention.
  • input data 202 can include a plurality of frames 204.
  • multiple frames 204 may represent consecutive image frames in a video stream.
  • Each frame 204 can include one or more strips 206.
  • Each strip 206 can include one or more macroblocks 208.
  • Each macroblock 208 can include one or more blocks 210.
  • Each block 210 can include one or more pixels 212.
  • Each pixel 212 can include one or more data sets corresponding to one or more data portions, such as a luminance data portion and a chrominance data portion.
  • the data unit can be a frame, a stripe, a macroblock, a block, a pixel, or a group of any of the above. In various embodiments, the size of the data unit can vary.
  • one frame 204 may include 100 strips 206, each strip 206 may include ten macroblocks 208, and each macroblock 208 may include four (eg, 2x2) blocks 210, each of which may include 64 (eg, 8x8) pixels 212.
  • FIG. 3 shows a schematic flow chart of a method 300 for rate control according to an embodiment of the present invention.
  • the method 300 can be performed by the system 100 shown in FIG. 1, and in particular, by the rate controller 106 of FIG.
  • the quota associated code strip in the embodiment of the present invention uses the number of bits. That is, the number of copies of a stripe used bit is related to the quota of the stripe. For example, if the quota of a certain strip is N, then encoding the strip can use N shares of bits, and the number of bits of 1 part will be specifically described later.
  • the first stripe represents a stripe to be encoded
  • the first encoding parameter represents an encoding parameter used to encode the first stripe.
  • the quota of at least one encoded stripe determines an adjustment value of the first encoding parameter.
  • the adjustment value is used to determine the first coding parameter. That is, in the embodiment of the present invention, the encoding parameter used to encode the first stripe is based on the quota of the first stripe and the quota of at least one encoded stripe in the frame.
  • the encoding parameter can be a quantization parameter.
  • the coding parameters refer to the foregoing description, and details are not described herein again.
  • the method 300 may further include:
  • the present invention does not limit the manner in which the quota is determined, and the quota of the stripe may be associated with the data characteristics of the stripe or may be associated with the specific information.
  • the quota of each strip in the frame may be determined according to the data characteristics of each strip in the frame.
  • the quota of the stripe may be associated with the data characteristics of the stripe.
  • Data characteristics include, but are not limited to, complexity, interestingness, or texture.
  • a quota of each stripe may be a forward mapping relationship with a data characteristic of each stripe. For example, the higher the complexity of a stripe, the larger its quota.
  • the complexity information may be obtained according to a method of image processing.
  • the complexity of the image is evaluated by acquiring the relevant gradient values by the sobel operator; or the complexity of the image is obtained by obtaining the amplitude of the relevant high-frequency components by the Roberts operator; or obtaining the boundary amplitude by Edge detection (Edge magnitude) ) to evaluate the complexity of the image.
  • Edge detection Edge magnitude
  • the strips can be classified as follows:
  • the strip behavior noise is a noise strip
  • the strip acts as a non-noise strip line, and the strip in the non-noise strip line is a non-noise strip;
  • the strip is a non-noise strip containing regular high frequency components
  • the quota of each stripe in the frame may be determined according to the location or pre-configuration information of each stripe in the frame.
  • the quota of the stripe may also be determined according to the position of the stripe. For example, the quota may be determined according to whether the location where the stripe is located is a key area in the image. Alternatively, the quota of the stripe may also be determined according to the pre-configuration information, for example, which strips are pre-configured with high quotas and which strips have low quotas.
  • the quota of the noise strip in the frame may be determined according to the following formula (1).
  • Quota i staData i *M 1 /sumStaDataNoise (1)
  • Quota i is the quota of the noise strip i in the frame
  • staData i is the complexity of the strip i
  • sumStaDataNoise is the sum of the complexity of all the noise strips in the frame
  • M 1 is a predetermined value.
  • the quota of non-noise strips in the frame can be determined according to the following formula (2).
  • Quota j staData j *M 2 /sumStaDataNonNoise (2)
  • Quota j is the quota of the non-noise strip j in the frame
  • staData j is the complexity of the strip j
  • sumStaDataNonNoise is the sum of the complexity of all non-noise strips in the frame
  • M 2 is a predetermined value.
  • Quota j when the quota Quota j of the non-noise strip j is greater than a predetermined value in the frame, Quota j may be set to the predetermined value. That is to say, if the quota of a certain non-noise strip obtained according to the above formula (2) is large, the quota is set to a predetermined value, so that the quota of the non-noise strip is not particularly large.
  • the method 300 may further include:
  • the frame when the frame includes a noise strip,
  • the number of stripes of zero determines the number of bits per quota for non-noise strips in the frame.
  • the number of bits allocated to the frame can be divided into the number of bits available for encoding all the noise strips in the frame, and the bits available for encoding all non-noise strips in the frame.
  • the ratio of the two can be the ratio of the sum of the complexity of all noise strips in the frame to the sum of the complexity of all non-noise strips in the frame.
  • the number of bits corresponding to each quota of the noise stripe and the number of bits corresponding to each quota of the non-noise stripe are respectively available to encode the number of bits available for all noise strips in the frame and encode all non-noise strips in the frame.
  • the number of bits is associated.
  • the number of bits corresponding to each quota of the noise strip in the frame may be,
  • size4Noise is the number of bits available for encoding all the noise bands in the frame in the number of bits allocated to the frame
  • sumQuotaNoise is the cumulative sum of the quotas of all noise bands in the frame
  • numQuota0Noise is the quota in the noise band in the frame. The number of strips that are zero;
  • the number of bits corresponding to each quota of non-noise strips in the frame may be,
  • size4NonNoise is the number of bits available for encoding all non-noise strips in the frame in the number of bits allocated to the frame
  • sumQuotaNonNoise is the sum of the quotas of all non-noise strips in the frame
  • numQuota0NonNoise is the non-noise strip in the frame. The number of stripes with zero quota.
  • the frame when the frame does not include a noise strip, according to the number of bits allocated to the frame, an accumulated sum of quotas of all non-noise strips in the frame, and the frame The number of stripes with zero quota in the non-noise stripe determines the number of bits corresponding to each quota.
  • the number of bits corresponding to each quota may be,
  • sumQuotaNonNoise is the accumulated sum of the quotas of all non-noise strips in the frame
  • numQuota0NonNoise the number of stripes in the non-noisy stripe in the frame that is zero.
  • the number of bits corresponding to each quota may also be determined according to another manner as follows:
  • the number of coded bits used in each of the zero stripe rows in the frame may be a predetermined value
  • the number of coded bits used by the zero strips in all zero strip rows in the frame, the number of zero strips in the zero stripe row in the frame, and all non-noise strips in the frame, based on the number of bits allocated to the frame The accumulated sum of the quotas, and the number of stripes with zero quotas in the non-noise strips in the frame, determine the number of bits corresponding to each quota.
  • the number of bits corresponding to each quota may be,
  • remSize is the number of bits remaining in the number of bits allocated to the frame, except for the number of coded bits used by the zero strips in all zero stripe rows in the frame
  • numZeroSlice is the zero in the zero stripe row in the frame.
  • the number of stripes, sumQuotaNonNoise is the sum of the quotas of all non-noise strips in the frame
  • numQuota0NonNoise the number of stripes in the non-noise stripe in the frame that are zero.
  • this approach can be used when the frame satisfies one of the following conditions:
  • a quota with one strip is greater than or equal to a predetermined value
  • the number of stripes with a complexity of 0 is greater than a predetermined value.
  • the former method can be used.
  • the adjustment value may be determined according to a quota of the first stripe and a quota of at least one encoded strip in the vicinity of the first stripe in the frame.
  • At least one of the encoded strips used may be a strip near the first strip, but it should be understood that the present invention does not limit the encoded strips employed.
  • the adjustment value may be determined according to a quota of the first stripe and a quota of at least one encoded stripe adjacent to the first stripe in the frame.
  • At least one of the encoded strips employed may be a strip adjacent to the first strip.
  • At least one encoded strip employed is related to the encoding order, for example, when the encoding order is from left to right and top to bottom, at least one encoded strip employed may be the first strip. a strip on the left, top, or top left; when the encoding order is from right to left and bottom to top, The at least one encoded strip employed may be the strip on the right, below or lower right of the first strip.
  • the following is an example in which the coding order is from left to right and from top to bottom, and the other coding order can be equivalently transformed.
  • the left strip of the first strip satisfies the first condition that the first strip is not the first strip of the strip line where the first strip is located
  • the upper strip of the first strip satisfies the first condition indicating that the strip line where the first strip is located is not the first strip line of the frame
  • the strip line above the first strip is a non-noise strip line or the strip line above the first strip is noise when the first strip is a noise strip Strip line.
  • the fact that the strip satisfies the first condition indicates that the strip is available, ie the strip can be used.
  • the adjustment value is determined according to the quota of the first strip and the quota of available strips.
  • the adjustment value may be determined in the following manner.
  • the adjustment value is the first predetermined value.
  • the first predetermined value is greater than 0, and the encoded strip is used in the frame.
  • the first predetermined value is not greater than zero.
  • the adjustment value is a second predetermined value.
  • the second predetermined value is greater than 0, and the encoded strip is used in the frame.
  • the second predetermined value is not greater than zero.
  • the first strip Determine the adjustment by the quota of the strip on the left side of the strip and the stripe in the upper stripe where the quota is not 0 and the number of bits used. value.
  • the quotas of the left strip and the upper strip of the first strip are not 0, the number of bits available in the first strip according to the quota of the first strip, the first strip The quota of the left and upper strips and the number of bits used are used to encode the encoding parameters of the left strip and the upper strip of the first strip, and the prediction values of the encoding parameters are determined.
  • the encoding parameter prediction value may be determined according to the following formula.
  • nextQIdx predQIdx*predSize/alloSize (7)
  • the alloSize is the number of available bits in the first strip.
  • the number of available bits in the first strip may be the quota of the first strip and the corresponding quota. The product of the number of bits.
  • the predSize and predQIdx in the above formula (7) can be determined according to the following formulas (8)-(11).
  • predSizeT sizeT*quotaC/quotaT (8)
  • predSize (predSizeT+predSizeL)/2 (10)
  • quotaC, quota, and quotaT are quotas of the first strip, the left strip of the first strip, and the upper strip of the first strip, respectively, qIdxL and qIdxT are respectively used to encode the first strip
  • the encoding parameters of the left and upper strips of the strip, sizeL and sizeT are the number of bits used by the left strip of the first strip and the upper strip of the first strip, respectively.
  • the quota of the strip on the left side of the first strip is not 0, and the quota of the upper strip of the first strip is 0, the number of available bits of the first strip according to the quota of the first strip.
  • the quota of the left strip of the first strip and the number of bits used are used to encode the encoding parameters of the left strip of the first strip, and determine the predicted value of the encoding parameter.
  • the predSize and predQIdx in the above formula (7) may be according to the following formula ( 12)-(14) OK,
  • the quota of the strip above the first strip is not 0, and the strip of the left strip of the first strip is When the amount is 0, according to the quota of the first strip, the number of available bits of the first strip, the quota of the upper strip of the first strip, and the number of used bits, used to encode the first strip
  • the encoding parameters of the upper stripe determine the predicted value of the encoding parameters.
  • the predSize and predQIdx in the above formula (7) may be according to the following formula ( 15)-(17) OK,
  • the adjustment value may be determined according to the prediction parameter of the coding parameter and the second coding parameter used for encoding the second slice, where the second slice is the last coded in the frame. Bands.
  • the adjustment value can be determined according to the following formula.
  • qIdxDelta is the adjustment value
  • preQIdx is the second coding parameter
  • nextQIdx is the prediction parameter of the coding parameter.
  • the quota of the first strip is 0, and the quota of at least one of the left strip and the upper strip of the first strip is 0, according to the left strip and the upper strip of the first strip
  • the number of bits used for a stripe with a quota of 0 determines the adjustment value.
  • the left strip and the upper strip of the first strip are according to the number of available bits of the first strip.
  • the number of bits used is used to encode the encoding parameters of the left strip and the upper strip of the first strip to determine the predicted value of the encoding parameter.
  • the encoding parameter prediction value may be determined according to the above formula (7).
  • the number of available alloSizes of the first strip may be the number of bits corresponding to 1 quota or a predetermined number of bits.
  • the predSize and predQIdx in the above formula (7) can be determined according to the following formulas (19)-(22),
  • predSize (predSizeT+predSizeL)/2 (21)
  • the quota of the strip on the left side of the first strip is 0, and the quota of the upper strip of the first strip is not 0, according to the number of bits available in the first strip, the left of the first strip
  • the number of bits used by the side strips is used to encode the encoding parameters of the left strip of the first strip, and the predicted values of the encoding parameters are determined.
  • the predSize and predQIdx in the above formula (7) may be according to the following formula ( 23)-(25) OK,
  • the quota of the strip above the first strip is 0, and the quota of the strip on the left side of the first strip is not 0, according to the number of available bits of the first strip, above the first strip
  • the number of bits used by the stripe is used to encode the encoding parameters of the upper stripe of the first stripe to determine the predicted value of the encoding parameters.
  • the predSize and predQIdx in the above formula (7) may be according to the following formula ( 26)-(28) OK,
  • the adjustment value may be determined according to the encoding parameter prediction value and the second encoding parameter used to encode the second strip.
  • the adjustment value can be determined according to the above formula (18).
  • the adjustment value when the number of bits used by the encoded stripe in the frame is greater than the number of bits allocated to the encoded stripe in the frame, the adjustment value is greater than 0, When the number of bits used for the encoded stripe in the frame is less than the number of bits allocated to the encoded stripe in the frame, the adjustment value is limited to less than zero.
  • the adjustment value is limited to be greater than zero; if the number of bits accumulated by the encoded strip is less than the assigned number The number of bits in these stripes, then the adjustment value is limited to less than zero.
  • the first encoding parameter may be determined according to the adjustment value and the second encoding parameter, where the second encoding parameter is an encoding parameter used to encode the second stripe,
  • the second strip is the last strip encoded in the frame.
  • the first coding parameter may be a sum of the second coding parameter and the adjustment value, as shown in the following formula (29).
  • qIdx is the first coding parameter
  • preQIdx is the second coding parameter
  • qIdxDelta is the adjustment value
  • the number of uncoded stripes in the frame is not greater than a predetermined value, and the number of bits used in the encoded strips in the frame is greater than the number of bits allocated in the frame.
  • the first encoding parameter is a sum of the second encoding parameter and the adjusted value and a predetermined value greater than 0, as shown in the following formula (30).
  • qIdx is the first coding parameter
  • preQIdx is the second coding parameter
  • N is a predetermined value greater than 0
  • qIdxDelta is the adjustment value
  • the first coding parameter when the first coding parameter exceeds the value range of the coding parameter, the first coding parameter is limited to be within the value range of the coding parameter.
  • the coding parameters are limited to the range of values of the coding parameters. If the first coding parameter obtained by the foregoing method exceeds the value range of the coding parameter, the first coding parameter is limited to be within the value range of the coding parameter.
  • the initial value can be set.
  • the coding parameter can be continuously adjusted in the above manner, and the range of the coding parameter can be continuously adjusted.
  • the method 300 may further include:
  • the present invention does not limit the manner in which the initial coding parameters are determined, for example, may be set according to data characteristics.
  • the initial coding parameters may be determined according to the average complexity of all non-noise strips in the frame, wherein the smaller the average complexity, the smaller the initial coding parameters.
  • the initial encoding parameter may be a predetermined value N5;
  • the frame does not include a non-noise strip containing regular high frequency components, and the initial encoding parameter is a predetermined value N6, where N6 is greater than N5.
  • the initial encoding parameter is a predetermined value N7, and N7 is not less than N6.
  • the method 300 may further include:
  • the initial value of the range of values of the encoding parameter is determined.
  • the initial coding parameter value range may be determined according to the initial coding parameter.
  • an upper limit of the value range of the initial coding parameter may be,
  • the lower limit of the initial coding parameter value range may be,
  • maxQIdx and minQIdx are respectively the upper and lower limits of the initial coding parameter range
  • qIdx 0 is the initial coding parameter
  • delta1 and delta2 are constants greater than zero.
  • determining to encode the The third coding parameter of the third strip is the initial coding parameter.
  • the left strip of the third strip satisfies the second condition that the third strip is the first strip of the strip row where the third strip is located
  • the upper strip of the third strip satisfies the second condition indicating that the strip line where the third strip is located is the first strip line of the frame, or the third strip is a non-noise strip
  • the strip row above the three strips is a noise strip row, or the strip row above the third strip is a non-noise strip row when the third strip is a noise strip.
  • the fact that the strip satisfies the second condition indicates that the strip is not available.
  • the encoding parameters used to encode the strip use the initial encoding parameters.
  • the range of values of the coding parameters used to limit the values of the coding parameters may also be continuously adjusted.
  • the code may be adjusted according to the encoded result.
  • the range of parameters may be adjusted according to the encoded result.
  • the encoding parameter is taken.
  • the lower limit of the range of values is reduced by a predetermined value.
  • the sum of the lower limit of the coding parameter value range during the encoding process of the frame is reduced by less than a predetermined value.
  • the encoding parameter takes a range of values.
  • the upper limit is increased by a predetermined value.
  • the sum of the upper limit of the range of values of the encoding parameter is increased in the encoding process of the frame by no more than a predetermined value.
  • the first strip is removed when encoding the first stripe.
  • a component corresponding to a predetermined high frequency coefficient in the first strip is
  • the specific high frequency coefficient will be cut-off (ie, regarded as zero) according to the set parameters, and no encoding will be performed.
  • the coding parameters are determined based on the quota, and the coding parameters can be adjusted in time, so that the code rate can be effectively controlled.
  • FIG. 6 shows a schematic block diagram of a computer system 600 in accordance with an embodiment of the present invention.
  • the computer system 600 can include a processor 610 and a memory 620.
  • the computer system 600 may also include components that are generally included in other computer systems, such as input and output devices, communication interfaces, and the like, which are not limited by the present invention.
  • Memory 620 is used to store computer executable instructions.
  • the memory 620 may be various kinds of memories, for example, may include a high speed random access memory (RAM), and may also include a non-volatile memory, such as at least one disk memory. This is not limited.
  • RAM high speed random access memory
  • non-volatile memory such as at least one disk memory. This is not limited.
  • the processor 610 is configured to access the memory 620 and execute the computer executable instructions to perform the operations in the method of rate control of the embodiment of the present invention described above.
  • the processor 610 can include an ARM processor, an FPGA, a CPU, a GPU, etc., the present invention This is not limited.
  • FIG. 7 shows a schematic block diagram of an apparatus 700 for rate control of an embodiment of the present invention.
  • the apparatus 700 can perform the method of rate control of the embodiment of the present invention described above.
  • the apparatus 700 can be disposed in the system 100 described above.
  • the apparatus 700 can be the rate controller 106 of FIG.
  • the apparatus 700 can include:
  • the adjustment value determining module 710 is configured to determine an adjustment value of the first encoding parameter used to encode the first strip according to a quota of the first stripe that is not encoded in the frame and a quota of the at least one encoded stripe in the frame. , wherein the quota associated code strip uses the number of bits;
  • the encoding parameter determining module 720 is configured to determine the first encoding parameter according to the adjusted value.
  • the apparatus for rate rate control determines the coding parameters based on the quota, and can adjust the coding parameters in a timely manner, so that the code rate can be effectively controlled.
  • the adjustment value determining module 710 is configured to:
  • the adjustment value is determined according to a quota of the first stripe and a quota of at least one encoded stripe adjacent to the first stripe in the frame.
  • the adjustment value determining module 710 is configured to:
  • the left strip of the first strip satisfies the first condition that the first strip is not the first strip of the strip line where the first strip is located
  • the upper strip of the first strip satisfies the first condition indicating that the strip line where the first strip is located is not the first strip line of the frame
  • the strip line above the first strip is a non-noise strip line or the strip line above the first strip is noise when the first strip is a noise strip Strip line.
  • the adjustment value determining module 710 is configured to:
  • the adjustment value is the first predetermined value.
  • the first predetermined value when the number of bits used in the encoded stripe in the frame is greater than the number of bits allocated to the encoded stripe in the frame, the first predetermined value is greater than 0, and the encoded strips in the frame are When the number of bits used is not greater than the number of bits allocated to the encoded stripe in the frame, the first predetermined value is not large At 0; or
  • the adjustment value is a second predetermined value.
  • the second predetermined value when the number of bits used in the encoded stripe in the frame is greater than the number of bits allocated to the encoded stripe in the frame, the second predetermined value is greater than 0, and the encoded strips in the frame are When the number of bits used is not greater than the number of bits allocated to the encoded stripe in the frame, the second predetermined value is not greater than zero.
  • the adjustment value determining module 710 is configured to:
  • the quota of the first strip is not 0, and the quota of at least one of the left strip and the upper strip of the first strip is not 0, according to the quota of the first strip, and the first The adjustment value is determined by the quota of the strip on the left side of the strip and the number of strips in the upper stripe where the quota is not 0 and the number of bits used.
  • the adjustment value determining module 710 is configured to:
  • the quota of the strip on the left side of the first strip is not 0, and the quota of the upper strip of the first strip is 0, the number of available bits of the first strip according to the quota of the first strip.
  • the quota of the strip above the first strip is not 0, and the quota of the strip on the left side of the first strip is 0, the number of available bits of the first strip according to the quota of the first strip.
  • the quota of the upper strip of the first strip and the number of bits used are used to encode the encoding parameters of the upper strip of the first strip, and determine the predicted value of the encoding parameter;
  • the adjustment value is determined based on the encoding parameter prediction value and a second encoding parameter used to encode the second stripe, wherein the second stripe is the last strip encoded in the frame.
  • the adjustment value determining module 710 is configured to:
  • the quota of the first strip is 0, and the quota of at least one of the left strip and the upper strip of the first strip is 0, according to the left strip and the upper strip of the first strip
  • the number of bits used for a stripe with a quota of 0 determines the adjustment value.
  • the adjustment value determining module 710 is configured to:
  • the left strip and the upper strip of the first strip are used. a number of bits, used to encode coding parameters of the left strip and the upper strip of the first strip, to determine a prediction value of the encoding parameter, or
  • the quota of the strip on the left side of the first strip is 0, and the quota of the upper strip of the first strip is not 0, according to the number of bits available in the first strip, the left of the first strip.
  • the quota of the strip above the first strip is 0, and the quota of the strip on the left side of the first strip is not 0, according to the number of available bits of the first strip, above the first strip
  • the adjustment value is determined based on the encoding parameter prediction value and a second encoding parameter used to encode the second stripe, wherein the second stripe is the last strip encoded in the frame.
  • the encoding parameter determining module 720 is configured to:
  • the second encoding parameter is an encoding parameter used to encode the second strip
  • the second strip is the last encoded encoded in the frame Bands.
  • the first coding parameter is a sum of the second coding parameter and the adjustment value.
  • the number of uncoded stripes in the frame is not greater than a third predetermined value, and the number of bits used by the encoded strips in the frame is greater than that allocated to the frame.
  • the number of bits of the encoded stripe is the sum of the second encoding parameter and the adjusted value and a fourth predetermined value greater than zero.
  • the encoding parameter determining module 720 is configured to:
  • the first coding parameter When the first coding parameter exceeds the value range of the coding parameter, the first coding parameter is limited to be within the value range of the coding parameter.
  • the apparatus 700 further includes:
  • the value range determining module 730 is configured to adjust the value range of the encoding parameter according to the encoded result.
  • the apparatus 700 further includes:
  • the quota determination module 740 is configured to determine a quota for each stripe in the frame.
  • the quota determining module 740 is configured to:
  • the quota for each strip in the frame is determined based on the data characteristics of each strip in the frame.
  • a quota of each stripe in the frame is forwardly mapped to a data characteristic of each stripe.
  • the apparatus 700 further includes:
  • the bit number determining module 750 is configured to determine the number of bits corresponding to each quota.
  • the bit number determining module 750 is configured to: when the frame includes a noise strip,
  • the number of strips determines the number of bits per quota for the non-noise strips in the frame.
  • the frame when the frame does not include a noise strip, according to the number of bits allocated to the frame, an accumulated sum of quotas of all non-noise strips in the frame, and an The number of stripes with zero quota in the non-noise stripe determines the number of bits corresponding to each quota.
  • the number of coded bits used by each of the zero strips in the zero stripe row in the frame is the eleventh predetermined value
  • the number of coded bits used by the zero strips in all zero strip rows in the frame, the number of zero strips in the zero stripe row in the frame, and all non-noise strips in the frame, based on the number of bits allocated to the frame The accumulated sum of the quotas, and the number of stripes with zero quotas in the non-noise strips in the frame, determine the number of bits corresponding to each quota.
  • the encoding parameter determining module 720 is further configured to determine an initial encoding parameter.
  • the value range determining module 730 is further configured to determine an initial encoding parameter value range.
  • the encoding parameter determining module 720 is configured to:
  • the left and upper strips of the third strip uncoded in the frame satisfy the second condition Determining, that the third coding parameter used to encode the third strip is an initial coding parameter
  • the left strip of the third strip satisfies the second condition that the third strip is the first strip of the strip row where the third strip is located
  • the upper strip of the third strip satisfies the second condition indicating that the strip line where the third strip is located is the first strip line of the frame, or the third strip is a non-noise strip
  • the strip row above the three strips is a noise strip row, or the strip row above the third strip is a non-noise strip row when the third strip is a noise strip.
  • the computer system and rate control apparatus may correspond to an execution body of a method of rate control according to an embodiment of the present invention, and the above and other operations of respective modules in the computer system and the rate control apparatus
  • the functions and/or functions are respectively omitted in order to implement the corresponding processes of the foregoing various methods, and are not described herein for brevity.
  • the embodiment of the invention further provides a computer storage medium, wherein the computer storage medium stores program code, and the program code can be used to indicate a method for performing rate rate control of the embodiment of the invention.
  • the term "and/or” is merely an association relationship describing an associated object, indicating that there may be three relationships.
  • a and/or B may indicate that A exists separately, and A and B exist simultaneously, and B cases exist alone.
  • the character "/" in this article generally indicates that the contextual object is an "or" relationship.
  • the disclosed systems, devices, and methods may be implemented in other manners.
  • the device embodiments described above are merely illustrative, for example, the division of the unit is only a logical function division, in actual implementation. There may be additional ways of dividing, for example multiple units or components may be combined or may be integrated into another system, or some features may be omitted or not performed.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, or an electrical, mechanical or other form of connection.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the embodiments of the present invention.
  • each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
  • the above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
  • the integrated unit if implemented in the form of a software functional unit and sold or used as a standalone product, may be stored in a computer readable storage medium.
  • the technical solution of the present invention contributes in essence or to the prior art, or all or part of the technical solution may be embodied in the form of a software product stored in a storage medium.
  • a number of instructions are included to cause a computer device (which may be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present invention.
  • the foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, and the like. .

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Computing Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

一种码率控制的方法、计算机系统和装置。该方法包括:根据帧中未编码的第一条带的配额和该帧中至少一个已编码条带的配额,确定用于编码该第一条带的第一编码参数的调整值,其中,该配额关联编码条带使用比特的份数(310);根据该调整值,确定该第一编码参数(320)。所述码率控制的方法、计算机系统和装置,能够有效地控制码率。

Description

码率控制的方法、计算机系统和装置
版权申明
本专利文件披露的内容包含受版权保护的材料。该版权为版权所有人所有。版权所有人不反对任何人复制专利与商标局的官方记录和档案中所存在的该专利文件或者该专利披露。
技术领域
本发明涉及信息技术领域,并且更具体地,涉及一种码率控制的方法、计算机系统和装置。
背景技术
视频通信系统的通信信道带宽一般是恒定、有限的,码率不断变化的码流不适合在恒定信道中传输。因此,在视频编码中引入了码率控制,目的是将产生的码流码率控制在一定波动范围之内。
有效的码率控制可以使视频通信系统在一定数据带宽的限制下能有较稳定的传输码率以及较小的视频时延。因此,如何有效地控制码率成为亟待解决的一个技术问题。
发明内容
本发明实施例提供了一种码率控制的方法、计算机系统和装置,能够有效地控制码率。
第一方面,提供了一种码率控制的方法,该方法包括:根据帧中未编码的第一条带的配额和该帧中至少一个已编码条带的配额,确定用于编码该第一条带的第一编码参数的调整值,其中,该配额关联编码条带使用比特的份数;根据该调整值,确定该第一编码参数。
第二方面,提供了一种计算机系统,该计算机系统包括:存储器,用于存储计算机可执行指令;处理器,用于访问该存储器,并执行该计算机可执行指令,以进行如下操作:根据帧中未编码的第一条带的配额和该帧中至少一个已编码条带的配额,确定用于编码该第一条带的第一编码参数的调整值,其中,该配额关联编码条带使用比特的份数;根据该调整值,确定该第 一编码参数。
第三方面,提供了一种码率控制的装置,该装置包括:调整值确定模块,用于根据帧中未编码的第一条带的配额和该帧中至少一个已编码条带的配额,确定用于编码该第一条带的第一编码参数的调整值,其中,该配额关联编码条带使用比特的份数;编码参数确定模块,用于根据该调整值,确定该第一编码参数。
第四方面,提供了一种计算机存储介质,该计算机存储介质中存储有程序代码,该程序代码可以用于指示执行上述第一方面的方法。
本发明实施例的技术方案,基于配额确定编码参数,可以适时地对编码参数进行调整,从而能够有效地控制码率。
附图说明
为了更清楚地说明本发明实施例的技术方案,下面将对本发明实施例中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1是可应用本发明实施例的技术方案的系统的示意图。
图2是本发明实施例的输入数据的示意图。
图3是本发明一个实施例的码率控制的方法的示意性流程图。
图4是本发明另一个实施例的码率控制的方法的示意性流程图。
图5是本发明实施例的去除高频系数的示意图。
图6是本发明实施例的计算机系统的示意性框图。
图7是本发明实施例的码率控制的装置的示意性框图。
具体实施方式
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明的一部分实施例,而不是全部实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动的前提下所获得的所有其他实施例,都应属于本发明保护的范围。
应理解,本文中的具体的例子只是为了帮助本领域技术人员更好地理 解本发明实施例,而非限制本发明实施例的范围。
还应理解,本发明实施例中的公式只是一种示例,而非限制本发明实施例的范围,各公式可以进行变形,这些变形也应属于本发明保护的范围。
还应理解,在本发明的各种实施例中,各过程的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本发明实施例的实施过程构成任何限定。
本发明实施例的技术方案可以用于控制视频或其他媒体数据的码率。例如,在规定视频序列的每一帧编码后的比特数不能超过特定比特数的情况下,本发明实施例的技术方案可以不需要预处理,而能一次性地实现码率控制。
在本发明的各种实施例中,每一帧编码后的比特数不能超过的特定比特数也可以称为分配给该帧的比特数或者该帧可用的比特数。
图1示出了可应用本发明实施例的技术方案的系统100的示意图。如图1所示,系统100可以接收并编码输入数据102,以产生输出数据108。例如,系统100可以接收视频数据,压缩视频数据以产生压缩的比特流。在数据编码过程中,系统100可以采用本发明实施例的技术方案控制编码数据的码率。在一些实施例中,系统100中的部件可以由一个或多个处理器实现,该处理器可以是计算设备中的处理器,也可以是可移动设备(例如无人机)中的处理器。该处理器可以包括ARM处理器,现场可编程门阵列(Field-Programmable Gate Array,FPGA),中央处理器(Central Processing unit,CPU),图形处理器(Graphics Processing Unit,GPU)等。
如图1所示,系统100可以包括编码器104和码率控制器106。编码器104和码率控制器106可以由相同或不同的计算设备实现。在一些实施例中,码率控制器106可以为编码器104中的一个集成部分,或者,编码器104可以为码率控制器106中的一个集成部分。编码器104用于接收输入数据102,编码输入数据102,并提供包括编码的输入数据的输出数据108。输入数据可以包括文本,图像,图形对象,动画序列,音频,视频,或者任何需要编码的其他数据。在一些情况下,输入数据可以包括来自传感器的传感数据,该传感器可以为视觉传感器(例如,照相机、红外传感器),麦克风,近场传感器(例如,超声波传感器、雷达),位置传感器,温度传感器,触摸传感器等。在一些情况下,输入数据可以包括来自用户的信息,例如,生 物信息,该生物信息可以包括面部特征,指纹扫描,视网膜扫描,嗓音记录,DNA采样等。
编码对于高效和/或安全的传输或存储数据是必需的。对输入数据的编码可以包括数据压缩,加密,纠错编码,格式转换等。例如,对多媒体数据(例如视频或音频)压缩可以减少在网络中传输的比特数量。敏感数据,例如金融信息和个人标识信息,在传输和存储前可以加密以保护机密和/或隐私。
任何合适的编码技术都可以用于编码输入数据。编码类型依赖于被编码的数据和具体的编码需求。
在一些实施例中,编码器104可以实现一种或多种不同的编解码器。每种编解码器可以包括实现不同编码算法的代码,指令或计算机程序。基于各种因素,包括输入数据的类型和/或来源,编码数据的接收实体,可用的计算资源,网络环境,商业环境,规则和标准等,可以选择一种合适的编码器编码给定的输入数据集。
例如,编码器可以被配置为编码一系列视频帧。编码每个帧中的数据可以采用一系列步骤。编码可以完全地基于帧内的空间信息。在一些实施例中,编码步骤可以包括变换步骤,量化步骤和熵编码步骤。
在图1中,码率控制器106可以通过给编码器104提供编码参数110(也可以称为码率控制参数)以控制输出数据的码率。码率可以被控制到一个特定的范围内(例如,低于最大码率,高于最小码率)或者接近目标平均码率。可选地,可以控制码率依赖于帧的复杂度,带宽限制,缓存容量或其他因素而变化。在一些情况下,码率控制可以有一个或多个层级,例如画面组(Group of Picture,GOP)级,帧级,条带级,宏块级,块级,像素级等。
在本发明各种实施例中,编码参数可以包括一个或多个控制编码流程中的量化步骤的量化参数,从而编码参数可以控制产生的输出数据的码率。例如,量化参数可以包括量化步长,表示量化步长或者与量化步长相关的值,例如,H.264或者类似的编码器中的量化参数(Quantization Parameter,QP),或者,量化矩阵或其参考矩阵等。编码参数也可以包括控制编码流程中其他方面的参数。
码率控制器106可以基于有关输出数据108或编码器104的输出信息112控制码率,或者,基于有关输入数据102的输入信息114控制码率。
在一些实施例中,码率控制器106可以基于一个或多个码率控制预定值116控制码率。
本发明各实施例中的预定值可以预先设定和/或动态更新。预定值可以用于获取编码参数。
在一些实施例中,码率控制器106还可以基于其他附加信息控制码率。
图2示出了根据本发明实施例的输入数据的示意图。
如图2所示,输入数据202可以包括多个帧204。例如,多个帧204可以表示视频流中的连续的图像帧。每个帧204可以包括一个或多个条带206。每个条带206可以包括一个或多个宏块208。每个宏块208可以包括一个或多个块210。每个块210可以包括一个或多个像素212。每个像素212可以包括一个或多个数据集,对应于一个或多个数据部分,例如,亮度数据部分和色度数据部分。数据单元可以为帧,条带,宏块,块,像素或以上任一种的组。在不同的实施例中,数据单元的大小可以变化。作为举例,一个帧204可以包括100个条带206,每个条带206可以包括10个宏块208,每个宏块208可以包括4个(例如,2x2)块210,每个块210可以包括64个(例如,8x8)像素212。
以下以条带为例描述本发明实施例的技术方案。应理解,本发明实施例的技术方案中的条带也可以变换为其他数据单元,例如,宏块、块等,本发明对此并不限定。
图3示出了本发明实施例的码率控制的方法300的示意性流程图。该方法300可以由图1所示的系统100执行,具体地,可以由图1中的码率控制器106执行。
310,根据帧中未编码的第一条带的配额和该帧中至少一个已编码条带的配额,确定用于编码该第一条带的第一编码参数的调整值,其中,该配额关联编码条带使用比特的份数。
本发明实施例中的配额关联编码条带使用比特的份数。也就是说,编码某一条带使用比特的份数与该条带的配额相关。例如,若某一条带的配额为N,则编码该条带可以使用N份的比特,其中1份的比特的数量后续将具体描述。
在本发明实施例中,第一条带表示待编码的条带,第一编码参数表示用于编码该第一条带的编码参数。对于第一条带,根据第一条带的配额和帧 中至少一个已编码条带的配额,确定第一编码参数的调整值。该调整值用于确定该第一编码参数。也就是说,在本发明实施例中,用于编码第一条带的编码参数基于第一条带的配额和帧中至少一个已编码条带的配额。
可选地,编码参数可以为量化参数。关于编码参数的说明可以参见前述的描述,在此不再赘述。
可选地,如图4所示,在步骤310之前,该方法300还可以包括:
306,确定该帧中每个条带的配额。
本发明对配额的确定方式不做限定,条带的配额可以与条带的数据特性关联,也可以与特定的信息关联。
可选地,在本发明一个实施例中,可以根据该帧中每个条带的数据特性确定该帧中每个条带的配额。
具体而言,在本实施例中,条带的配额可以与条带的数据特性关联。数据特性包括但不限于复杂度、有趣度或纹理度等。可选地,每个条带的配额与每个条带的数据特性之间可以为正向映射关系。例如,条带的复杂度越高,其配额越大。
可选地,复杂度信息可以根据图像处理的方法获得。例如通过sobel算子获取相关梯度值来评价图像的复杂度;或者通过Roberts算子获取相关高频分量幅值来评价图像的复杂度;或者通过边界检测(Edge detection)获取边界幅值(Edge magnitude)来评价图像的复杂度。
可选地,条带可以根据以下方式分类:
若帧中某一条带行中的条带的复杂度的平均值大于预定值N1,且该条带行中复杂度大于预定值N2的条带的数目大于预定值N3,则该条带行为噪声条带行,噪声条带行中的条带为噪声条带;
否则,该条带行为非噪声条带行,非噪声条带行中的条带为非噪声条带;
若非噪声条带行中的某一条带的复杂度大于预定值N4,N4不小于N2,则该条带为包含有规律高频分量的非噪声条带;
若非噪声条带行中的每一个条带的复杂度为0,则为零条带行,零条带行中的条带为零条带。
应理解,上述条带的分类方式只是示例,本发明对此并不限定,也就是说,也可以根据其他方式对条带进行分类。
可选地,在本发明另一个实施例中,可以根据该帧中每个条带的位置或预配置信息确定该帧中每个条带的配额。
具体而言,条带的配额也可以根据条带的位置确定,例如,可以根据条带所在的位置是否是图像中的关键区域确定配额。或者,条带的配额也可以根据预配置信息确定,例如,预先配置哪些条带的配额高,哪些条带的配额低等。
可选地,以复杂度为例,作为一个实施例,可以根据以下公式(1)确定帧中噪声条带的配额,
Quotai=staDatai*M1/sumStaDataNoise   (1)
其中,Quotai为该帧中噪声条带i的配额,staDatai为该条带i的复杂度,sumStaDataNoise为该帧中所有噪声条带的复杂度的累加和,M1为预定值。
类似地,可以根据以下公式(2)确定该帧中非噪声条带的配额,
Quotaj=staDataj*M2/sumStaDataNonNoise   (2)
其中,Quotaj为该帧中非噪声条带j的配额,staDataj为该条带j的复杂度,sumStaDataNonNoise为该帧中所有非噪声条带的复杂度的累加和,M2为预定值。
可选地,作为一个实施例,在该帧中非噪声条带j的配额Quotaj大于某一预定值时,Quotaj可以被设置为该预定值。也就是说,若根据上述公式(2)得到的某一非噪声条带的配额较大时,则设置其配额为预定值,这样可以使得非噪声条带的配额不至于特别大。
在确定了条带的配额后,接下来可以确定每份配额对应的比特数。下面进行详细描述。
可选地,如图4所示,该方法300还可以包括:
308,确定每份配额对应的比特数。
可选地,在本发明一个实施例中,在该帧包括噪声条带时,
根据分配给该帧的比特数中编码该帧中所有噪声条带可用的比特数,该帧中所有噪声条带的配额的累加和,和该帧中的噪声条带中配额为零的条带的数目,确定该帧中噪声条带的每份配额对应的比特数;
根据分配给该帧的比特数中编码该帧中所有非噪声条带可用的比特数,该帧中所有非噪声条带的配额的累加和,和该帧中的非噪声条带中配额 为零的条带的数目,确定该帧中非噪声条带的每份配额对应的比特数。
具体而言,在帧中包括噪声条带时,可以将分配给该帧的比特数分为编码该帧中所有噪声条带可用的比特数,以及编码该帧中所有非噪声条带可用的比特数,二者的比例可以为该帧中所有噪声条带的复杂度的累加和与该帧中所有非噪声条带的复杂度的累加和的比例。噪声条带的每份配额对应的比特数和非噪声条带的每份配额对应的比特数分别与编码该帧中所有噪声条带可用的比特数和编码该帧中所有非噪声条带可用的比特数关联。
具体地,作为一个实施例,该帧中噪声条带的每份配额对应的比特数可以为,
size4Noise/(sumQuotaNoise+numQuota0Noise)   (3)
其中,size4Noise为分配给该帧的比特数中编码该帧中所有噪声条带可用的比特数,sumQuotaNoise为该帧中所有噪声条带的配额的累加和,numQuota0Noise该帧中的噪声条带中配额为零的条带的数目;
类似地,该帧中非噪声条带的每份配额对应的比特数可以为,
size4NonNoise/(sumQuotaNonNoise+numQuota0NonNoise)   (4)
其中,size4NonNoise为分配给该帧的比特数中编码该帧中所有非噪声条带可用的比特数,sumQuotaNonNoise为该帧中所有非噪声条带的配额的累加和,numQuota0NonNoise该帧中的非噪声条带中配额为零的条带的数目。
可选地,在本发明另一个实施例中,在该帧不包括噪声条带时,根据分配给该帧的比特数,该帧中所有非噪声条带的配额的累加和,和该帧中的非噪声条带中配额为零的条带的数目,确定每份配额对应的比特数。
具体地,作为一个实施例,在该帧不包括噪声条带时,每份配额对应的比特数可以为,
sizeTotal/(sumQuotaNonNoise+numQuota0NonNoise)   (5)
其中,sizeTotal为分配给该帧的比特数,sumQuotaNonNoise为该帧中所有非噪声条带的配额的累加和,numQuota0NonNoise该帧中的非噪声条带中配额为零的条带的数目。
可选地,在本发明另一个实施例中,在该帧不包括噪声条带时,还可以根据如下的另一种方式确定每份配额对应的比特数:
在该帧不包括噪声条带时,
该帧中零条带行中的每一个零条带使用的编码比特数可以为预定值;
根据分配给该帧的比特数,该帧中所有零条带行中的零条带使用的编码比特数,该帧中零条带行中的零条带的数目,该帧中所有非噪声条带的配额的累加和,和该帧中的非噪声条带中配额为零的条带的数目,确定每份配额对应的比特数。
具体地,作为一个实施例,在该帧不包括噪声条带时,每份配额对应的比特数可以为,
remSize/(sumQuotaNonNoise+numQuota0NonNoise-numZeroSlice)   (6)
其中,remSize为分配给该帧的比特数中,除去该帧中所有零条带行中的零条带使用的编码比特数后剩余的比特数,numZeroSlice为该帧中零条带行中的零条带的数目,sumQuotaNonNoise为该帧中所有非噪声条带的配额的累加和,numQuota0NonNoise该帧中的非噪声条带中配额为零的条带的数目。
可选地,这种方式可以在该帧满足以下条件之一时采用:
存在一个条带的配额大于或等于某一预定值;
在非零条带行中,存在至少一个条带的配额是0;
复杂度为0的条带的数目大于某一预定值。
若以上条件都不满足,则可以采用前一种方式。
以上详细描述了条带的配额,以及每份配额对应的比特数的确定方式,下面详细描述调整值的确定方式。
可选地,在本发明一个实施例中,可以根据该第一条带的配额和该帧中该第一条带附近的至少一个已编码条带的配额,确定该调整值。
具体而言,在本实施例中,所采用的至少一个已编码条带可以是该第一条带附近的条带,但应理解,本发明对所采用的已编码条带并不限定。
可选地,在本发明一个实施例中,可以根据该第一条带的配额和该帧中与该第一条带相邻的至少一个已编码条带的配额,确定该调整值。
也就是说,在本实施例中,所采用的至少一个已编码条带可以是与该第一条带相邻的条带。
应理解,所采用的至少一个已编码条带与编码顺序有关,例如,在编码顺序为从左到右、从上到下时,所采用的至少一个已编码条带可以为该第一条带的左侧、上方或左上的条带;在编码顺序为从右到左、从下到上时, 所采用的至少一个已编码条带可以为该第一条带的右侧、下方或右下的条带。为了便于描述,以下以编码顺序为从左到右、从上到下为例进行说明,对于其他编码顺序可以以此进行等效变换。
可选地,在本发明一个实施例中,在该帧中该第一条带的左侧条带和上方条带中的至少一个满足第一条件时,根据该第一条带的配额和该第一条带的左侧条带和上方条带中的至少一个的配额,确定该调整值,
其中,该第一条带的左侧条带满足第一条件表示该第一条带不是该第一条带所在的条带行的第一个条带,
该第一条带的上方条带满足第一条件表示该第一条带所在的条带行不是该帧的第一个条带行,而且,
在该第一条带是非噪声条带时该第一条带上方的条带行是非噪声条带行或者在该第一条带是噪声条带时该第一条带上方的条带行是噪声条带行。
具体而言,条带满足第一条件表示该条带可用,即可以采用该条带。在本实施例中,在第一条带的左侧条带和上方条带中的至少一个可用时,根据该第一条带的配额和可用的条带的配额确定该调整值。
可选地,在该第一条带的左侧条带和上方条带中的至少一个满足第一条件时,可以采用以下方式确定该调整值。
若该第一条带的配额为0,且该第一条带的左侧条带和上方条带的配额均不为0,则确定该调整值为第一预定值。
在该帧中已编码的条带所使用的比特数大于分配给该帧中已编码的条带的比特数时,该第一预定值大于0,在该帧中已编码的条带所使用的比特数不大于分配给该帧中已编码的条带的比特数时,该第一预定值不大于0。
若该第一条带的配额不为0,且该第一条带的左侧条带和上方条带的配额均为0,则确定该调整值为第二预定值。
在该帧中已编码的条带所使用的比特数大于分配给该帧中已编码的条带的比特数时,该第二预定值大于0,在该帧中已编码的条带所使用的比特数不大于分配给该帧中已编码的条带的比特数时,该第二预定值不大于0。
若该第一条带的配额不为0,且该第一条带的左侧条带和上方条带中的至少一个的配额不为0,则根据该第一条带的配额,和该第一条带的左侧条带和上方条带中配额不为0的条带的配额和所使用的比特数,确定该调整 值。
具体地,在该第一条带的左侧条带和上方条带的配额均不为0时,根据该第一条带的配额,该第一条带可用的比特数,该第一条带的左侧条带和上方条带的配额和所使用的比特数,用于编码该第一条带的左侧条带和上方条带的编码参数,确定编码参数预测值。
可选地,可以根据以下公式确定该编码参数预测值,
nextQIdx=predQIdx*predSize/alloSize   (7)
其中,alloSize为该第一条带可用的比特数,在该第一条带的配额不为0时,该第一条带可用的比特数可以为该第一条带的配额与每份配额对应的比特数的乘积。
在该第一条带的左侧条带和上方条带的配额均不为0时,上述公式(7)中的predSize和predQIdx可以根据以下公式(8)-(11)确定,
predSizeT=sizeT*quotaC/quotaT   (8)
predSizeL=sizeL*quotaC/quotaL   (9)
predSize=(predSizeT+predSizeL)/2   (10)
predQIdx=(qIdxT+qIdxL)/2   (11)
其中,quotaC、quotaL和quotaT分别为该第一条带、该第一条带的左侧条带和该第一条带的上方条带的配额,qIdxL和qIdxT分别为用于编码该第一条带的左侧条带和上方条带的编码参数,sizeL和sizeT分别为该第一条带的左侧条带和该第一条带的上方条带所使用的比特数。
在该第一条带的左侧条带的配额不为0,该第一条带的上方条带的配额为0时,根据该第一条带的配额,该第一条带可用的比特数,该第一条带的左侧条带的配额和所使用的比特数,用于编码该第一条带的左侧条带的编码参数,确定编码参数预测值。
具体地,在该第一条带的左侧条带的配额不为0,该第一条带的上方条带的配额为0时,上述公式(7)中的predSize和predQIdx可以根据以下公式(12)-(14)确定,
predSize=predSizeL   (12)
predSizeL=sizeL*quotaC/quotaL   (13)
predQIdx=qIdxL   (14)
在该第一条带的上方条带的配额不为0,该第一条带的左侧条带的配 额为0时,根据该第一条带的配额,该第一条带可用的比特数,该第一条带的上方条带的配额和所使用的比特数,用于编码该第一条带的上方条带的编码参数,确定编码参数预测值。
具体地,在该第一条带的上方条带的配额不为0,该第一条带的左侧条带的配额为0时,上述公式(7)中的predSize和predQIdx可以根据以下公式(15)-(17)确定,
predSize=predSizeT   (15)
predSizeT=sizeT*quotaC/quotaT   (16)
predQIdx=qIdxT   (17)
在得到编码参数预测值后,可以根据该编码参数预测值和用于编码第二条带的第二编码参数,确定该调整值,其中,该第二条带为该帧中已编码的最后一个条带。
具体地,可以根据以下公式确定该调整值,
qIdxDelta=nextQIdx–preQIdx   (18)
其中,qIdxDelta为该调整值,preQIdx为该第二编码参数,nextQIdx为该编码参数预测值。
若该第一条带的配额为0,且该第一条带的左侧条带和上方条带中的至少一个的配额为0,则根据该第一条带的左侧条带和上方条带中配额为0的条带所使用的比特数,确定该调整值。
具体地,在该第一条带的左侧条带和上方条带的配额均为0时,根据该第一条带可用的比特数,该第一条带的左侧条带和上方条带所使用的比特数,用于编码该第一条带的左侧条带和上方条带的编码参数,确定编码参数预测值。
可选地,可以根据上述公式(7)确定该编码参数预测值。其中,在该第一条带的配额为0时,该第一条带可用的比特数alloSize可以为1份配额对应的比特数或者预定的比特数。
在该第一条带的左侧条带和上方条带的配额均为0时,上述公式(7)中的predSize和predQIdx可以根据以下公式(19)-(22)确定,
predSizeT=sizeT   (19)
predSizeL=sizeL   (20)
predSize=(predSizeT+predSizeL)/2   (21)
predQIdx=(qIdxT+qIdxL)/2   (22)
在该第一条带的左侧条带的配额为0,该第一条带的上方条带的配额不为0时,根据该第一条带可用的比特数,该第一条带的左侧条带所使用的比特数,用于编码该第一条带的左侧条带的编码参数,确定编码参数预测值。
具体地,在该第一条带的左侧条带的配额为0,该第一条带的上方条带的配额不为0时,上述公式(7)中的predSize和predQIdx可以根据以下公式(23)-(25)确定,
predSize=predSizeL   (23)
predSizeL=sizeL   (24)
predQIdx=qIdxL   (25)
在该第一条带的上方条带的配额为0,该第一条带的左侧条带的配额不为0时,根据该第一条带可用的比特数,该第一条带的上方条带所使用的比特数,用于编码该第一条带的上方条带的编码参数,确定编码参数预测值。
具体地,在该第一条带的上方条带的配额为0,该第一条带的左侧条带的配额不为0时,上述公式(7)中的predSize和predQIdx可以根据以下公式(26)-(28)确定,
predSize=predSizeT   (26)
predSizeT=sizeT   (27)
predQIdx=qIdxT   (28)
类似地,在得到编码参数预测值后,可以根据该编码参数预测值和用于编码第二条带的第二编码参数,确定该调整值。例如,可以根据上述公式(18)确定该调整值。
可选地,在本发明各种实施例中,在该帧中已编码的条带所使用的比特数大于分配给该帧中已编码的条带的比特数时,限定该调整值大于0,在该帧中已编码的条带所使用的比特数小于分配给该帧中已编码的条带的比特数时,限定该调整值小于0。
也就是说,在该帧中,如果已编码条带积累的比特数超过了分配给这些条带的比特数,那么限定该调整值大于零;如果已编码条带积累的比特数小于了分配给这些条带的比特数,那么限定该调整值小于零。
320,根据该调整值,确定该第一编码参数。
在得到调整值后,基于该调整值确定用于编码该第一条带的编码参 数。
可选地,在本发明一个实施例中,可以根据该调整值和第二编码参数,确定该第一编码参数,其中,该第二编码参数为用于编码第二条带的编码参数,该第二条带为该帧中已编码的最后一个条带。
可选地,作为一个实施例,该第一编码参数可以为该第二编码参数与该调整值的和,如以下公式(29)所示。
qIdx=preQIdx+qIdxDelta   (29)
其中,qIdx为该第一编码参数,preQIdx为该第二编码参数,qIdxDelta该调整值。
可选地,作为一个实施例,在该帧中未编码的条带的数目不大于某一预定值,且该帧中已编码的条带所使用的比特数大于分配给该帧中已编码的条带的比特数时,该第一编码参数为该第二编码参数与该调整值以及大于0的预定值的和,如以下公式(30)所示。
qIdx=preQIdx+N+qIdxDelta   (30)
其中,qIdx为该第一编码参数,preQIdx为该第二编码参数,N为大于0的预定值,qIdxDelta该调整值。
可选地,在本发明一个实施例中,在该第一编码参数超出编码参数取值范围时,限定该第一编码参数在该编码参数取值范围内。
编码参数要限定在编码参数取值范围内。若通过上述方式得到的第一编码参数超出编码参数取值范围,则限定该第一编码参数在该编码参数取值范围内。
对于编码参数和编码参数取值范围可以设定初始值,编码参数可通过上述方式不断调整,编码参数取值范围也可以不断调整。
可选地,如图4所示,该方法300还可以包括:
302,确定初始编码参数。
本发明对初始编码参数的确定方式不做限定,例如,可以根据数据特性设定。
可选地,对于该帧中的非噪声条带,可以根据该帧中所有非噪声条带的平均复杂度确定初始编码参数,其中,该平均复杂度越小时,该初始编码参数越小。可选地,在该平均复杂度大于某一预定值时,若该帧中包括包含有规律高频分量的非噪声条带,则该初始编码参数可以为预定值N5;若该 帧中不包括包含有规律高频分量的非噪声条带,则该初始编码参数为预定值N6,其中N6大于N5。
可选地,对于该帧中的噪声条带,可以确定初始编码参数为预定值N7,N7不小于N6。
可选地,如图4所示,该方法300还可以包括:
304,确定初始编码参数取值范围。
也就是说,确定编码参数取值范围的初始值。
可选地,可以根据初始编码参数,确定初始编码参数取值范围。
具体地,作为一个实施例,该初始编码参数取值范围的上限可以为,
maxQIdx=qIdx0+delta1   (31)
该初始编码参数取值范围的下限可以为,
minQIdx=qIdx0–delta2   (32)
其中,maxQIdx和minQIdx分别为该初始编码参数取值范围的上限和下限,qIdx0为初始编码参数,delta1和delta2为大于零的常数。
可选地,在本发明一个实施例中,在该帧中未编码的条带(表示为第三条带)的左侧条带和上方条带均满足第二条件时,确定用于编码该第三条带的第三编码参数为初始编码参数,
其中,该第三条带的左侧条带满足第二条件表示该第三条带是该第三条带所在的条带行的第一个条带,
该第三条带的上方条带满足第二条件表示该第三条带所在的条带行是该帧的第一个条带行,或者,在该第三条带是非噪声条带时该第三条带上方的条带行是噪声条带行,或者,在该第三条带是噪声条带时该第三条带上方的条带行是非噪声条带行。
与第一条件相反,条带满足第二条件表示该条带不可用。在某一条带的左侧条带和上方条带均不可用时,用于编码该条带的编码参数采用初始编码参数。
这样,结合初始编码参数以及前述的根据调整值确定编码参数的方式,可以得到用于编码每一条带的编码参数。
可选地,用于限定编码参数的取值的编码参数取值范围也可以不断调整。
可选地,在本发明一个实施例中,可以根据已编码结果,调整该编码 参数取值范围。
具体地,若在该帧的编码过程中,连续出现该帧中已编码的条带所使用的比特数小于分配给该帧中已编码的条带的比特数的情况,则将该编码参数取值范围的下限减小某一预定值。可选地,在该帧的编码过程中该编码参数取值范围的下限累积减小的和不大于某一预定值。
若在该帧的编码过程中,连续出现该帧中已编码的条带所使用的比特数大于分配给该帧中已编码的条带的比特数的情况,则将该编码参数取值范围的上限增大某一预定值。可选地,在该帧的编码过程中该编码参数取值范围的上限累积增大的和不大于某一预定值。
可选地,在本发明一个实施例中,若该帧中已编码的条带所使用的比特数大于分配给该帧中已编码的条带的比特数,在编码该第一条带时去除该第一条带中的预定高频系数对应的分量。
具体而言,当编码产生的比特数过高时,在下一条带编码时,将根据设定参数,特定的高频系数会被cut-off(即视为零),不再进行编码。
例如,如图5所示,假如cut-off的系数值设置为60,则图中高于60的系数都将被视为0。
本发明实施例的码率控制的方法,基于配额确定编码参数,可以适时地对编码参数进行调整,从而能够有效地控制码率。
上文中详细描述了根据本发明实施例的码率控制的方法,下面将描述根据本发明实施例的计算机系统和码率控制的装置。
图6示出了本发明实施例的计算机系统600的示意性框图。如图6所示,该计算机系统600可以包括处理器610和存储器620。
应理解,该计算机系统600还可以包括其他计算机系统中通常所包括的部件,例如,输入输出设备、通信接口等,本发明对此并不限定。
存储器620用于存储计算机可执行指令。
存储器620可以是各种种类的存储器,例如可以包括高速随机存取存储器(Random Access Memory,RAM),还可以包括非不稳定的存储器(non-volatile memory),例如至少一个磁盘存储器,本发明对此并不限定。
处理器610用于访问该存储器620,并执行该计算机可执行指令,以进行上述本发明实施例的码率控制的方法中的操作。
处理器610可以包括ARM处理器,FPGA,CPU,GPU等,本发明 对此并不限定。
图7示出了本发明实施例的码率控制的装置700的示意性框图。该装置700可以执行上述本发明实施例的码率控制的方法。该装置700可以设置于上述系统100中,例如,该装置700可以为图1中的码率控制器106。
如图7所示,该装置700可以包括:
调整值确定模块710,用于根据帧中未编码的第一条带的配额和该帧中至少一个已编码条带的配额,确定用于编码该第一条带的第一编码参数的调整值,其中,该配额关联编码条带使用比特的份数;
编码参数确定模块720,用于根据该调整值,确定该第一编码参数。
本发明实施例的码率控制的装置,基于配额确定编码参数,可以适时地对编码参数进行调整,从而能够有效地控制码率。
可选地,在本发明一个实施例中,该调整值确定模块710用于,
根据该第一条带的配额和该帧中与该第一条带相邻的至少一个已编码条带的配额,确定该调整值。
可选地,在本发明一个实施例中,该调整值确定模块710用于,
在该帧中该第一条带的左侧条带和上方条带中的至少一个满足第一条件时,根据该第一条带的配额和该第一条带的左侧条带和上方条带中的至少一个的配额,确定该调整值,
其中,该第一条带的左侧条带满足第一条件表示该第一条带不是该第一条带所在的条带行的第一个条带,
该第一条带的上方条带满足第一条件表示该第一条带所在的条带行不是该帧的第一个条带行,而且,
在该第一条带是非噪声条带时该第一条带上方的条带行是非噪声条带行或者在该第一条带是噪声条带时该第一条带上方的条带行是噪声条带行。
可选地,在本发明一个实施例中,该调整值确定模块710用于,
若该第一条带的配额为0,且该第一条带的左侧条带和上方条带的配额均不为0,则确定该调整值为第一预定值,
其中,在该帧中已编码的条带所使用的比特数大于分配给该帧中已编码的条带的比特数时,该第一预定值大于0,在该帧中已编码的条带所使用的比特数不大于分配给该帧中已编码的条带的比特数时,该第一预定值不大 于0;或者
若该第一条带的配额不为0,且该第一条带的左侧条带和上方条带的配额均为0,则确定该调整值为第二预定值,
其中,在该帧中已编码的条带所使用的比特数大于分配给该帧中已编码的条带的比特数时,该第二预定值大于0,在该帧中已编码的条带所使用的比特数不大于分配给该帧中已编码的条带的比特数时,该第二预定值不大于0。
可选地,在本发明一个实施例中,该调整值确定模块710用于,
若该第一条带的配额不为0,且该第一条带的左侧条带和上方条带中的至少一个的配额不为0,则根据该第一条带的配额,和该第一条带的左侧条带和上方条带中配额不为0的条带的配额和所使用的比特数,确定该调整值。
可选地,在本发明一个实施例中,该调整值确定模块710用于,
在该第一条带的左侧条带和上方条带的配额均不为0时,根据该第一条带的配额,该第一条带可用的比特数,该第一条带的左侧条带和上方条带的配额和所使用的比特数,用于编码该第一条带的左侧条带和上方条带的编码参数,确定编码参数预测值,或者,
在该第一条带的左侧条带的配额不为0,该第一条带的上方条带的配额为0时,根据该第一条带的配额,该第一条带可用的比特数,该第一条带的左侧条带的配额和所使用的比特数,用于编码该第一条带的左侧条带的编码参数,确定编码参数预测值,或者,
在该第一条带的上方条带的配额不为0,该第一条带的左侧条带的配额为0时,根据该第一条带的配额,该第一条带可用的比特数,该第一条带的上方条带的配额和所使用的比特数,用于编码该第一条带的上方条带的编码参数,确定编码参数预测值;
根据该编码参数预测值和用于编码第二条带的第二编码参数,确定该调整值,其中,该第二条带为该帧中已编码的最后一个条带。
可选地,在本发明一个实施例中,该调整值确定模块710用于,
若该第一条带的配额为0,且该第一条带的左侧条带和上方条带中的至少一个的配额为0,则根据该第一条带的左侧条带和上方条带中配额为0的条带所使用的比特数,确定该调整值。
可选地,在本发明一个实施例中,该调整值确定模块710用于,
在该第一条带的左侧条带和上方条带的配额均为0时,根据该第一条带可用的比特数,该第一条带的左侧条带和上方条带所使用的比特数,用于编码该第一条带的左侧条带和上方条带的编码参数,确定编码参数预测值,或者,
在该第一条带的左侧条带的配额为0,该第一条带的上方条带的配额不为0时,根据该第一条带可用的比特数,该第一条带的左侧条带所使用的比特数,用于编码该第一条带的左侧条带的编码参数,确定编码参数预测值,或者,
在该第一条带的上方条带的配额为0,该第一条带的左侧条带的配额不为0时,根据该第一条带可用的比特数,该第一条带的上方条带所使用的比特数,用于编码该第一条带的上方条带的编码参数,确定编码参数预测值;
根据该编码参数预测值和用于编码第二条带的第二编码参数,确定该调整值,其中,该第二条带为该帧中已编码的最后一个条带。
可选地,在本发明一个实施例中,该编码参数确定模块720用于,
根据该调整值和第二编码参数,确定该第一编码参数,其中,该第二编码参数为用于编码第二条带的编码参数,该第二条带为该帧中已编码的最后一个条带。
可选地,在本发明一个实施例中,该第一编码参数为该第二编码参数与该调整值的和。
可选地,在本发明一个实施例中,在该帧中未编码的条带的数目不大于第三预定值,且该帧中已编码的条带所使用的比特数大于分配给该帧中已编码的条带的比特数时,该第一编码参数为该第二编码参数与该调整值以及大于0的第四预定值的和。
可选地,在本发明一个实施例中,该编码参数确定模块720用于,
在该第一编码参数超出编码参数取值范围时,限定该第一编码参数在该编码参数取值范围内。
可选地,在本发明一个实施例中,该装置700还包括:
取值范围确定模块730,用于根据已编码结果,调整该编码参数取值范围。
可选地,在本发明一个实施例中,该装置700还包括:
配额确定模块740,用于确定该帧中每个条带的配额。
可选地,在本发明一个实施例中,该配额确定模块740用于,
根据该帧中每个条带的数据特性确定该帧中每个条带的配额。
可选地,在本发明一个实施例中,该帧中每个条带的配额与每个条带的数据特性之间为正向映射关系。
可选地,在本发明一个实施例中,该装置700还包括:
比特数确定模块750,用于确定每份配额对应的比特数。
可选地,在本发明一个实施例中,该比特数确定模块750用于,在该帧包括噪声条带时,
根据分配给该帧的比特数中编码该帧中所有噪声条带可用的比特数,该帧中所有噪声条带的配额的累加和,和该帧中的噪声条带中配额为零的条带的数目,确定该帧中噪声条带的每份配额对应的比特数;
根据分配给该帧的比特数中编码该帧中所有非噪声条带可用的比特数,该帧中所有非噪声条带的配额的累加和,和该帧中的非噪声条带中配额为零的条带的数目,确定该帧中非噪声条带的每份配额对应的比特数。
可选地,在本发明一个实施例中,在该帧不包括噪声条带时,根据分配给该帧的比特数,该帧中所有非噪声条带的配额的累加和,和该帧中的非噪声条带中配额为零的条带的数目,确定每份配额对应的比特数。
可选地,在本发明一个实施例中,在该帧不包括噪声条带时,
该帧中零条带行中的每一个零条带使用的编码比特数为第十一预定值;
根据分配给该帧的比特数,该帧中所有零条带行中的零条带使用的编码比特数,该帧中零条带行中的零条带的数目,该帧中所有非噪声条带的配额的累加和,和该帧中的非噪声条带中配额为零的条带的数目,确定每份配额对应的比特数。
可选地,在本发明一个实施例中,该编码参数确定模块720还用于,确定初始编码参数。
可选地,在本发明一个实施例中,该取值范围确定模块730还用于,确定初始编码参数取值范围。
可选地,在本发明一个实施例中,该编码参数确定模块720用于,
在该帧中未编码的第三条带的左侧条带和上方条带均满足第二条件 时,确定用于编码该第三条带的第三编码参数为初始编码参数,
其中,该第三条带的左侧条带满足第二条件表示该第三条带是该第三条带所在的条带行的第一个条带,
该第三条带的上方条带满足第二条件表示该第三条带所在的条带行是该帧的第一个条带行,或者,在该第三条带是非噪声条带时该第三条带上方的条带行是噪声条带行,或者,在该第三条带是噪声条带时该第三条带上方的条带行是非噪声条带行。
根据本发明实施例的计算机系统和码率控制的装置可对应于根据本发明实施例的码率控制的方法的执行主体,并且计算机系统和码率控制的装置中的各个模块的上述和其它操作和/或功能分别为了实现前述各个方法的相应流程,为了简洁,在此不再赘述。
本发明实施例还提供了一种计算机存储介质,该计算机存储介质中存储有程序代码,该程序代码可以用于指示执行上述本发明实施例的码率控制的方法。
应理解,在本发明实施例中,术语“和/或”仅仅是一种描述关联对象的关联关系,表示可以存在三种关系。例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,本文中字符“/”,一般表示前后关联对象是一种“或”的关系。
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、计算机软件或者二者的结合来实现,为了清楚地说明硬件和软件的可互换性,在上述说明中已经按照功能一般性地描述了各示例的组成及步骤。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本发明的范围。
所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,上述描述的系统、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
在本申请所提供的几个实施例中,应该理解到,所揭露的系统、装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时 可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另外,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口、装置或单元的间接耦合或通信连接,也可以是电的,机械的或其它的形式连接。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本发明实施例方案的目的。
另外,在本发明各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以是两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分,或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本发明各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。
以上所述,仅为本发明的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到各种等效的修改或替换,这些修改或替换都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应以权利要求的保护范围为准。

Claims (66)

  1. 一种码率控制的方法,其特征在于,包括:
    根据帧中未编码的第一条带的配额和所述帧中至少一个已编码条带的配额,确定用于编码所述第一条带的第一编码参数的调整值,其中,所述配额关联编码条带使用比特的份数;
    根据所述调整值,确定所述第一编码参数。
  2. 根据权利要求1所述的方法,其特征在于,所述第一编码参数为量化参数。
  3. 根据权利要求1或2所述的方法,其特征在于,所述根据帧中未编码的第一条带的配额和所述帧中至少一个已编码条带的配额,确定用于编码所述第一条带的第一编码参数的调整值,包括:
    根据所述第一条带的配额和所述帧中所述第一条带附近的至少一个已编码条带的配额,确定所述调整值。
  4. 根据权利要求3所述的方法,其特征在于,所述根据所述第一条带的配额和所述帧中所述第一条带附近的至少一个已编码条带的配额,确定所述调整值,包括:
    根据所述第一条带的配额和所述帧中与所述第一条带相邻的至少一个已编码条带的配额,确定所述调整值。
  5. 根据权利要求4所述的方法,其特征在于,所述根据所述第一条带的配额和所述帧中与所述第一条带相邻的至少一个已编码条带的配额,确定所述调整值,包括:
    在所述帧中所述第一条带的左侧条带和上方条带中的至少一个满足第一条件时,根据所述第一条带的配额和所述第一条带的左侧条带和上方条带中的至少一个的配额,确定所述调整值,
    其中,所述第一条带的左侧条带满足第一条件表示所述第一条带不是所述第一条带所在的条带行的第一个条带,
    所述第一条带的上方条带满足第一条件表示所述第一条带所在的条带行不是所述帧的第一个条带行,而且,
    在所述第一条带是非噪声条带时所述第一条带上方的条带行是非噪声条带行或者在所述第一条带是噪声条带时所述第一条带上方的条带行是噪声条带行。
  6. 根据权利要求5所述的方法,其特征在于,所述根据所述第一条带的配额和所述第一条带的左侧条带和上方条带中的至少一个的配额,确定所述调整值,包括:
    若所述第一条带的配额为0,且所述第一条带的左侧条带和上方条带的配额均不为0,则确定所述调整值为第一预定值,
    其中,在所述帧中已编码的条带所使用的比特数大于分配给所述帧中已编码的条带的比特数时,所述第一预定值大于0,在所述帧中已编码的条带所使用的比特数不大于分配给所述帧中已编码的条带的比特数时,所述第一预定值不大于0;或者
    若所述第一条带的配额不为0,且所述第一条带的左侧条带和上方条带的配额均为0,则确定所述调整值为第二预定值,
    其中,在所述帧中已编码的条带所使用的比特数大于分配给所述帧中已编码的条带的比特数时,所述第二预定值大于0,在所述帧中已编码的条带所使用的比特数不大于分配给所述帧中已编码的条带的比特数时,所述第二预定值不大于0。
  7. 根据权利要求5所述的方法,其特征在于,所述根据所述第一条带的配额和所述第一条带的左侧条带和上方条带中的至少一个的配额,确定所述调整值,包括:
    若所述第一条带的配额不为0,且所述第一条带的左侧条带和上方条带中的至少一个的配额不为0,则根据所述第一条带的配额,和所述第一条带的左侧条带和上方条带中配额不为0的条带的配额和所使用的比特数,确定所述调整值。
  8. 根据权利要求7所述的方法,其特征在于,所述根据所述第一条带的配额,和所述第一条带的左侧条带和上方条带中配额不为0的条带的配额和所使用的比特数,确定所述调整值,包括:
    在所述第一条带的左侧条带和上方条带的配额均不为0时,根据所述第一条带的配额,所述第一条带可用的比特数,所述第一条带的左侧条带和上方条带的配额和所使用的比特数,用于编码所述第一条带的左侧条带和上方条带的编码参数,确定编码参数预测值,或者,
    在所述第一条带的左侧条带的配额不为0,所述第一条带的上方条带的配额为0时,根据所述第一条带的配额,所述第一条带可用的比特数,所述 第一条带的左侧条带的配额和所使用的比特数,用于编码所述第一条带的左侧条带的编码参数,确定编码参数预测值,或者,
    在所述第一条带的上方条带的配额不为0,所述第一条带的左侧条带的配额为0时,根据所述第一条带的配额,所述第一条带可用的比特数,所述第一条带的上方条带的配额和所使用的比特数,用于编码所述第一条带的上方条带的编码参数,确定编码参数预测值;
    根据所述编码参数预测值和用于编码第二条带的第二编码参数,确定所述调整值,其中,所述第二条带为所述帧中已编码的最后一个条带。
  9. 根据权利要求8所述的方法,其特征在于,所述第一条带可用的比特数为所述第一条带的配额与每份配额对应的比特数的乘积。
  10. 根据权利要求5所述的方法,其特征在于,所述根据所述第一条带的配额和所述第一条带的左侧条带和上方条带中的至少一个的配额,确定所述调整值,包括:
    若所述第一条带的配额为0,且所述第一条带的左侧条带和上方条带中的至少一个的配额为0,则根据所述第一条带的左侧条带和上方条带中配额为0的条带所使用的比特数,确定所述调整值。
  11. 根据权利要求10所述的方法,其特征在于,所述根据所述第一条带的左侧条带和上方条带中配额为0的条带所使用的比特数,确定所述调整值包括:
    在所述第一条带的左侧条带和上方条带的配额均为0时,根据所述第一条带可用的比特数,所述第一条带的左侧条带和上方条带所使用的比特数,用于编码所述第一条带的左侧条带和上方条带的编码参数,确定编码参数预测值,或者,
    在所述第一条带的左侧条带的配额为0,所述第一条带的上方条带的配额不为0时,根据所述第一条带可用的比特数,所述第一条带的左侧条带所使用的比特数,用于编码所述第一条带的左侧条带的编码参数,确定编码参数预测值,或者,
    在所述第一条带的上方条带的配额为0,所述第一条带的左侧条带的配额不为0时,根据所述第一条带可用的比特数,所述第一条带的上方条带所使用的比特数,用于编码所述第一条带的上方条带的编码参数,确定编码参数预测值;
    根据所述编码参数预测值和用于编码第二条带的第二编码参数,确定所述调整值,其中,所述第二条带为所述帧中已编码的最后一个条带。
  12. 根据权利要求11所述的方法,其特征在于,所述第一条带可用的比特数为1份配额对应的比特数或者预定的比特数。
  13. 根据权利要求7至12中任一项所述的方法,其特征在于,在所述帧中已编码的条带所使用的比特数大于分配给所述帧中已编码的条带的比特数时,限定所述调整值大于0,在所述帧中已编码的条带所使用的比特数小于分配给所述帧中已编码的条带的比特数时,限定所述调整值小于0。
  14. 根据权利要求1至13中任一项所述的方法,其特征在于,所述根据所述调整值,确定所述第一编码参数,包括:
    根据所述调整值和第二编码参数,确定所述第一编码参数,其中,所述第二编码参数为用于编码第二条带的编码参数,所述第二条带为所述帧中已编码的最后一个条带。
  15. 根据权利要求14所述的方法,其特征在于,所述第一编码参数为所述第二编码参数与所述调整值的和。
  16. 根据权利要求14所述的方法,其特征在于,在所述帧中未编码的条带的数目不大于第三预定值,且所述帧中已编码的条带所使用的比特数大于分配给所述帧中已编码的条带的比特数时,所述第一编码参数为所述第二编码参数与所述调整值以及大于0的第四预定值的和。
  17. 根据权利要求14至16中任一项所述的方法,其特征在于,在所述第一编码参数超出编码参数取值范围时,限定所述第一编码参数在所述编码参数取值范围内。
  18. 根据权利要求17所述的方法,其特征在于,在所述确定所述第一编码参数之前,所述方法还包括:
    根据已编码结果,调整所述编码参数取值范围。
  19. 根据权利要求18所述的方法,其特征在于,所述调整所述编码参数取值范围,包括:
    若在所述帧的编码过程中,连续出现所述帧中已编码的条带所使用的比特数小于分配给所述帧中已编码的条带的比特数的情况,则将所述编码参数取值范围的下限减小第五预定值。
  20. 根据权利要求19所述的方法,其特征在于,在所述帧的编码过程 中所述编码参数取值范围的下限累积减小的和不大于第六预定值。
  21. 根据权利要求18至20中任一项所述的方法,其特征在于,所述调整所述编码参数取值范围,包括:
    若在所述帧的编码过程中,连续出现所述帧中已编码的条带所使用的比特数大于分配给所述帧中已编码的条带的比特数的情况,则将所述编码参数取值范围的上限增大第七预定值。
  22. 根据权利要求21所述的方法,其特征在于,在所述帧的编码过程中所述编码参数取值范围的上限累积增大的和不大于第八预定值。
  23. 根据权利要求1至22中任一项所述的方法,其特征在于,所述方法还包括:
    若所述帧中已编码的条带所使用的比特数大于分配给所述帧中已编码的条带的比特数,在编码所述第一条带时去除所述第一条带中的预定高频系数对应的分量。
  24. 根据权利要求1至23中任一项所述的方法,其特征在于,所述方法还包括:
    确定所述帧中每个条带的配额。
  25. 根据权利要求24所述的方法,其特征在于,所述确定所述帧中每个条带的配额,包括:
    根据所述帧中每个条带的数据特性确定所述帧中每个条带的配额。
  26. 根据权利要求25所述的方法,其特征在于,所述帧中每个条带的配额与每个条带的数据特性之间为正向映射关系。
  27. 根据权利要求25或26所述的方法,其特征在于,所述数据特性包括复杂度、有趣度或纹理度。
  28. 根据权利要求26或27所述的方法,其特征在于,在所述帧中非噪声条带j的配额Quotaj大于第九预定值时,Quotaj被设置为所述第九预定值。
  29. 根据权利要求24所述的方法,其特征在于,所述确定所述帧中每个条带的配额,包括:
    根据所述帧中每个条带的位置或预配置信息确定所述帧中每个条带的配额。
  30. 根据权利要求24至29中任一项所述的方法,其特征在于,所述方法还包括:
    确定每份配额对应的比特数。
  31. 根据权利要求30所述的方法,其特征在于,在所述帧包括噪声条带时,
    根据分配给所述帧的比特数中编码所述帧中所有噪声条带可用的比特数,所述帧中所有噪声条带的配额的累加和,和所述帧中的噪声条带中配额为零的条带的数目,确定所述帧中噪声条带的每份配额对应的比特数;
    根据分配给所述帧的比特数中编码所述帧中所有非噪声条带可用的比特数,所述帧中所有非噪声条带的配额的累加和,和所述帧中的非噪声条带中配额为零的条带的数目,确定所述帧中非噪声条带的每份配额对应的比特数。
  32. 根据权利要求30所述的方法,其特征在于,在所述帧不包括噪声条带时,根据分配给所述帧的比特数,所述帧中所有非噪声条带的配额的累加和,和所述帧中的非噪声条带中配额为零的条带的数目,确定每份配额对应的比特数。
  33. 根据权利要求30所述的方法,其特征在于,在所述帧不包括噪声条带时,
    所述帧中零条带行中的每一个零条带使用的编码比特数为第十预定值;
    根据分配给所述帧的比特数,所述帧中所有零条带行中的零条带使用的编码比特数,所述帧中零条带行中的零条带的数目,所述帧中所有非噪声条带的配额的累加和,和所述帧中的非噪声条带中配额为零的条带的数目,确定每份配额对应的比特数。
  34. 根据权利要求1至33中任一项所述的方法,其特征在于,所述方法还包括:
    确定初始编码参数。
  35. 根据权利要求34所述的方法,其特征在于,所述确定初始编码参数,包括:
    对于所述帧中的非噪声条带,根据所述帧中所有非噪声条带的平均复杂度确定所述初始编码参数。
  36. 根据权利要求35所述的方法,其特征在于,在所述平均复杂度大于第十一预定值时,
    若所述帧中包括包含有规律高频分量的非噪声条带,则所述初始编码参 数为第十二预定值;若所述帧中不包括包含有规律高频分量的非噪声条带,则所述初始编码参数为第十三预定值,其中所述第十三预定值大于所述第十二预定值。
  37. 根据权利要求34所述的方法,其特征在于,所述确定初始编码参数,包括:
    对于所述帧中的噪声条带,确定所述初始编码参数为第十四预定值。
  38. 根据权利要求1至37中任一项所述的方法,其特征在于,所述方法还包括:
    确定初始编码参数取值范围。
  39. 根据权利要求38所述的方法,其特征在于,所述确定初始编码参数取值范围,包括:
    根据初始编码参数,确定所述初始编码参数取值范围。
  40. 根据权利要求1至39中任一项所述的方法,其特征在于,所述方法还包括:
    在所述帧中未编码的第三条带的左侧条带和上方条带均满足第二条件时,确定用于编码所述第三条带的第三编码参数为初始编码参数,
    其中,所述第三条带的左侧条带满足第二条件表示所述第三条带是所述第三条带所在的条带行的第一个条带,
    所述第三条带的上方条带满足第二条件表示所述第三条带所在的条带行是所述帧的第一个条带行,或者,在所述第三条带是非噪声条带时所述第三条带上方的条带行是噪声条带行,或者,在所述第三条带是噪声条带时所述第三条带上方的条带行是非噪声条带行。
  41. 根据权利要求1至40中任一项所述的方法,其特征在于,若所述帧中第一条带行中的条带的复杂度的平均值大于第十五预定值,且所述第一条带行中复杂度大于第十六预定值的条带的数目大于第十七预定值,则所述第一条带行为噪声条带行,噪声条带行中的条带为噪声条带;
    否则,所述第一条带行为非噪声条带行,非噪声条带行中的条带为非噪声条带;
    若非噪声条带行中的第四条带的复杂度大于第十八预定值,所述第十八预定值不小于所述第十六预定值,则所述第四条带为包含有规律高频分量的非噪声条带;
    若非噪声条带行中的每一个条带的复杂度为0,则为零条带行,零条带行中的条带为零条带。
  42. 一种计算机系统,其特征在于,包括:
    存储器,用于存储计算机可执行指令;
    处理器,用于访问所述存储器,并执行所述计算机可执行指令,以进行如下操作:
    根据帧中未编码的第一条带的配额和所述帧中至少一个已编码条带的配额,确定用于编码所述第一条带的第一编码参数的调整值,其中,所述配额关联编码条带使用比特的份数;
    根据所述调整值,确定所述第一编码参数。
  43. 一种码率控制的装置,其特征在于,包括:
    调整值确定模块,用于根据帧中未编码的第一条带的配额和所述帧中至少一个已编码条带的配额,确定用于编码所述第一条带的第一编码参数的调整值,其中,所述配额关联编码条带使用比特的份数;
    编码参数确定模块,用于根据所述调整值,确定所述第一编码参数。
  44. 根据权利要求43所述的装置,其特征在于,所述第一编码参数为量化参数。
  45. 根据权利要求43或44所述的装置,其特征在于,所述调整值确定模块用于,
    根据所述第一条带的配额和所述帧中与所述第一条带相邻的至少一个已编码条带的配额,确定所述调整值。
  46. 根据权利要求45所述的装置,其特征在于,所述调整值确定模块用于,
    在所述帧中所述第一条带的左侧条带和上方条带中的至少一个满足第一条件时,根据所述第一条带的配额和所述第一条带的左侧条带和上方条带中的至少一个的配额,确定所述调整值,
    其中,所述第一条带的左侧条带满足第一条件表示所述第一条带不是所述第一条带所在的条带行的第一个条带,
    所述第一条带的上方条带满足第一条件表示所述第一条带所在的条带行不是所述帧的第一个条带行,而且,
    在所述第一条带是非噪声条带时所述第一条带上方的条带行是非噪声 条带行或者在所述第一条带是噪声条带时所述第一条带上方的条带行是噪声条带行。
  47. 根据权利要求46所述的装置,其特征在于,所述调整值确定模块用于,
    若所述第一条带的配额为0,且所述第一条带的左侧条带和上方条带的配额均不为0,则确定所述调整值为第一预定值,
    其中,在所述帧中已编码的条带所使用的比特数大于分配给所述帧中已编码的条带的比特数时,所述第一预定值大于0,在所述帧中已编码的条带所使用的比特数不大于分配给所述帧中已编码的条带的比特数时,所述第一预定值不大于0;或者
    若所述第一条带的配额不为0,且所述第一条带的左侧条带和上方条带的配额均为0,则确定所述调整值为第二预定值,
    其中,在所述帧中已编码的条带所使用的比特数大于分配给所述帧中已编码的条带的比特数时,所述第二预定值大于0,在所述帧中已编码的条带所使用的比特数不大于分配给所述帧中已编码的条带的比特数时,所述第二预定值不大于0。
  48. 根据权利要求46所述的装置,其特征在于,所述调整值确定模块用于,
    若所述第一条带的配额不为0,且所述第一条带的左侧条带和上方条带中的至少一个的配额不为0,则根据所述第一条带的配额,和所述第一条带的左侧条带和上方条带中配额不为0的条带的配额和所使用的比特数,确定所述调整值。
  49. 根据权利要求48所述的装置,其特征在于,所述调整值确定模块用于,
    在所述第一条带的左侧条带和上方条带的配额均不为0时,根据所述第一条带的配额,所述第一条带可用的比特数,所述第一条带的左侧条带和上方条带的配额和所使用的比特数,用于编码所述第一条带的左侧条带和上方条带的编码参数,确定编码参数预测值,或者,
    在所述第一条带的左侧条带的配额不为0,所述第一条带的上方条带的配额为0时,根据所述第一条带的配额,所述第一条带可用的比特数,所述第一条带的左侧条带的配额和所使用的比特数,用于编码所述第一条带的左 侧条带的编码参数,确定编码参数预测值,或者,
    在所述第一条带的上方条带的配额不为0,所述第一条带的左侧条带的配额为0时,根据所述第一条带的配额,所述第一条带可用的比特数,所述第一条带的上方条带的配额和所使用的比特数,用于编码所述第一条带的上方条带的编码参数,确定编码参数预测值;
    根据所述编码参数预测值和用于编码第二条带的第二编码参数,确定所述调整值,其中,所述第二条带为所述帧中已编码的最后一个条带。
  50. 根据权利要求46所述的装置,其特征在于,所述调整值确定模块用于,
    若所述第一条带的配额为0,且所述第一条带的左侧条带和上方条带中的至少一个的配额为0,则根据所述第一条带的左侧条带和上方条带中配额为0的条带所使用的比特数,确定所述调整值。
  51. 根据权利要求50所述的装置,其特征在于,所述调整值确定模块用于,
    在所述第一条带的左侧条带和上方条带的配额均为0时,根据所述第一条带可用的比特数,所述第一条带的左侧条带和上方条带所使用的比特数,用于编码所述第一条带的左侧条带和上方条带的编码参数,确定编码参数预测值,或者,
    在所述第一条带的左侧条带的配额为0,所述第一条带的上方条带的配额不为0时,根据所述第一条带可用的比特数,所述第一条带的左侧条带所使用的比特数,用于编码所述第一条带的左侧条带的编码参数,确定编码参数预测值,或者,
    在所述第一条带的上方条带的配额为0,所述第一条带的左侧条带的配额不为0时,根据所述第一条带可用的比特数,所述第一条带的上方条带所使用的比特数,用于编码所述第一条带的上方条带的编码参数,确定编码参数预测值;
    根据所述编码参数预测值和用于编码第二条带的第二编码参数,确定所述调整值,其中,所述第二条带为所述帧中已编码的最后一个条带。
  52. 根据权利要求43至51中任一项所述的装置,其特征在于,所述编码参数确定模块用于,
    根据所述调整值和第二编码参数,确定所述第一编码参数,其中,所述 第二编码参数为用于编码第二条带的编码参数,所述第二条带为所述帧中已编码的最后一个条带。
  53. 根据权利要求52所述的装置,其特征在于,所述第一编码参数为所述第二编码参数与所述调整值的和。
  54. 根据权利要求52所述的装置,其特征在于,在所述帧中未编码的条带的数目不大于第三预定值,且所述帧中已编码的条带所使用的比特数大于分配给所述帧中已编码的条带的比特数时,所述第一编码参数为所述第二编码参数与所述调整值以及大于0的第四预定值的和。
  55. 根据权利要求52至54中任一项所述的装置,其特征在于,所述编码参数确定模块用于,
    在所述第一编码参数超出编码参数取值范围时,限定所述第一编码参数在所述编码参数取值范围内。
  56. 根据权利要求55所述的装置,其特征在于,所述装置还包括:
    取值范围确定模块,用于根据已编码结果,调整所述编码参数取值范围。
  57. 根据权利要求43至56中任一项所述的装置,其特征在于,所述装置还包括:
    配额确定模块,用于确定所述帧中每个条带的配额。
  58. 根据权利要求57所述的装置,其特征在于,所述配额确定模块用于,
    根据所述帧中每个条带的数据特性确定所述帧中每个条带的配额。
  59. 根据权利要求58所述的装置,其特征在于,所述帧中每个条带的配额与每个条带的数据特性之间为正向映射关系。
  60. 根据权利要求57至59中任一项所述的装置,其特征在于,所述装置还包括:
    比特数确定模块,用于确定每份配额对应的比特数。
  61. 根据权利要求60所述的装置,其特征在于,所述比特数确定模块用于,在所述帧包括噪声条带时,
    根据分配给所述帧的比特数中编码所述帧中所有噪声条带可用的比特数,所述帧中所有噪声条带的配额的累加和,和所述帧中的噪声条带中配额为零的条带的数目,确定所述帧中噪声条带的每份配额对应的比特数;
    根据分配给所述帧的比特数中编码所述帧中所有非噪声条带可用的比 特数,所述帧中所有非噪声条带的配额的累加和,和所述帧中的非噪声条带中配额为零的条带的数目,确定所述帧中非噪声条带的每份配额对应的比特数。
  62. 根据权利要求60所述的装置,其特征在于,在所述帧不包括噪声条带时,根据分配给所述帧的比特数,所述帧中所有非噪声条带的配额的累加和,和所述帧中的非噪声条带中配额为零的条带的数目,确定每份配额对应的比特数。
  63. 根据权利要求60所述的装置,其特征在于,在所述帧不包括噪声条带时,
    所述帧中零条带行中的每一个零条带使用的编码比特数为第十预定值;
    根据分配给所述帧的比特数,所述帧中所有零条带行中的零条带使用的编码比特数,所述帧中零条带行中的零条带的数目,所述帧中所有非噪声条带的配额的累加和,和所述帧中的非噪声条带中配额为零的条带的数目,确定每份配额对应的比特数。
  64. 根据权利要求43至63中任一项所述的装置,其特征在于,所述编码参数确定模块还用于,确定初始编码参数。
  65. 根据权利要求56至64中任一项所述的装置,其特征在于,所述取值范围确定模块还用于,确定初始编码参数取值范围。
  66. 根据权利要求43至65中任一项所述的装置,其特征在于,所述编码参数确定模块用于,
    在所述帧中未编码的第三条带的左侧条带和上方条带均满足第二条件时,确定用于编码所述第三条带的第三编码参数为初始编码参数,
    其中,所述第三条带的左侧条带满足第二条件表示所述第三条带是所述第三条带所在的条带行的第一个条带,
    所述第三条带的上方条带满足第二条件表示所述第三条带所在的条带行是所述帧的第一个条带行,或者,在所述第三条带是非噪声条带时所述第三条带上方的条带行是噪声条带行,或者,在所述第三条带是噪声条带时所述第三条带上方的条带行是非噪声条带行。
PCT/CN2016/101939 2016-10-12 2016-10-12 码率控制的方法、计算机系统和装置 WO2018068239A1 (zh)

Priority Applications (5)

Application Number Priority Date Filing Date Title
CN201910258306.XA CN109996076B (zh) 2016-10-12 2016-10-12 码率控制的方法、计算机系统和装置
PCT/CN2016/101939 WO2018068239A1 (zh) 2016-10-12 2016-10-12 码率控制的方法、计算机系统和装置
CN201680003464.5A CN107113430B (zh) 2016-10-12 2016-10-12 码率控制的方法、计算机系统和装置
US16/381,927 US10917652B2 (en) 2016-10-12 2019-04-11 Data rate control method, computer system, and device
US17/169,022 US20210160516A1 (en) 2016-10-12 2021-02-05 Data rate control method, computer system, and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2016/101939 WO2018068239A1 (zh) 2016-10-12 2016-10-12 码率控制的方法、计算机系统和装置

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US16/381,927 Continuation US10917652B2 (en) 2016-10-12 2019-04-11 Data rate control method, computer system, and device

Publications (1)

Publication Number Publication Date
WO2018068239A1 true WO2018068239A1 (zh) 2018-04-19

Family

ID=59676460

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/101939 WO2018068239A1 (zh) 2016-10-12 2016-10-12 码率控制的方法、计算机系统和装置

Country Status (3)

Country Link
US (2) US10917652B2 (zh)
CN (2) CN107113430B (zh)
WO (1) WO2018068239A1 (zh)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108012163B (zh) * 2017-12-19 2020-08-18 希诺麦田技术(深圳)有限公司 视频编码的码率控制方法及装置
CN110875744B (zh) * 2018-08-31 2023-06-20 阿里巴巴集团控股有限公司 编码方法及装置

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101159871A (zh) * 2007-11-12 2008-04-09 中兴通讯股份有限公司 宏块组级视频码率控制方法
CN101888556A (zh) * 2008-03-19 2010-11-17 华为技术有限公司 编码、解码方法和编码、解码装置
CN102355584A (zh) * 2011-10-31 2012-02-15 电子科技大学 基于帧内预测编码模式的码率控制方法
US20120201304A1 (en) * 2003-12-24 2012-08-09 Apple Inc. Method and system for video encoding using a variable number of b frames
CN103391439A (zh) * 2013-07-18 2013-11-13 西安交通大学 一种基于主动宏块隐藏的h.264/avc码率控制方法

Family Cites Families (30)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5144426A (en) * 1989-10-13 1992-09-01 Matsushita Electric Industrial Co., Ltd. Motion compensated prediction interframe coding system
DE69132268T2 (de) * 1990-09-29 2000-10-26 Victor Company Of Japan Bildsignalkodierer/Dekodierer mit adaptiver Quantisierung
US5144424A (en) * 1991-10-15 1992-09-01 Thomson Consumer Electronics, Inc. Apparatus for video data quantization control
JP2646921B2 (ja) * 1991-11-15 1997-08-27 日本ビクター株式会社 適応量子化装置
JPH05167998A (ja) * 1991-12-16 1993-07-02 Nippon Telegr & Teleph Corp <Ntt> 画像の符号化制御処理方法
JPH0974566A (ja) * 1995-09-04 1997-03-18 Sony Corp 圧縮符号化装置及び圧縮符号化データの記録装置
CN1193616C (zh) * 2000-09-29 2005-03-16 中兴通讯股份有限公司 一种用于图像压缩传输的量化与码流控制方法
US7050497B2 (en) * 2001-03-28 2006-05-23 Thomson Licensing Process and device for the video coding of high definition images
CN101232618B (zh) * 2002-04-23 2013-03-27 诺基亚有限公司 用于在视频编码系统中指示量化器参数的方法与设备
US8594186B1 (en) * 2007-02-27 2013-11-26 Xilinx, Inc. Digital video coding using quantized DC block values
TW200837663A (en) * 2007-03-13 2008-09-16 Univ Nat Taiwan Constant picture quality bit rate control system for a multiple-video encoder in single video signal source and the method
JP5365518B2 (ja) * 2007-09-12 2013-12-11 ソニー株式会社 画像処理装置及び方法
CN101127909B (zh) * 2007-09-29 2010-07-07 华为技术有限公司 一种图像码率控制方法及装置
US8473990B2 (en) * 2008-04-30 2013-06-25 Zeevee, Inc. System and method for local broadcasting
CN101340571B (zh) * 2008-08-15 2012-04-18 北京中星微电子有限公司 一种码率控制方法及控制装置
WO2010150470A1 (ja) * 2009-06-23 2010-12-29 パナソニック株式会社 動画像符号化方法、動画像符号化装置、プログラム、および集積回路
KR101702948B1 (ko) * 2010-07-20 2017-02-06 삼성전자주식회사 깊이영상 부호화를 위한 율-왜곡 최적화 장치 및 방법
KR20120016980A (ko) * 2010-08-17 2012-02-27 한국전자통신연구원 영상 부호화 방법 및 장치, 그리고 복호화 방법 및 장치
KR102032940B1 (ko) * 2011-03-11 2019-10-16 소니 주식회사 화상 처리 장치, 화상 처리 방법 및 컴퓨터 판독가능 기록 매체
US8767824B2 (en) * 2011-07-11 2014-07-01 Sharp Kabushiki Kaisha Video decoder parallelization for tiles
US9398307B2 (en) * 2011-07-11 2016-07-19 Sharp Kabushiki Kaisha Video decoder for tiles
HUE042414T2 (hu) * 2012-01-30 2019-07-29 Samsung Electronics Co Ltd Eljárás és berendezés hierarchikus adategység alapú video kódolásra és dekódolásra, amely tartalmaz kvantálás paraméter predikciót
US9800869B2 (en) * 2012-06-15 2017-10-24 Google Technology Holdings LLC Method and apparatus for efficient slice header processing
CN102868883B (zh) * 2012-06-26 2013-11-13 中国科学技术大学 一种视频编码的码率控制方法
CN103533359B (zh) * 2013-10-16 2016-06-15 武汉大学 一种h.264码率控制方法
EP3036903A4 (en) * 2013-10-25 2016-11-09 Mediatek Inc METHOD AND APPARATUS FOR CONTROLLING TRANSMISSION OF COMPRESSED IMAGE FROM TRANSMISSION SYNCHRONIZATION EVENTS
JP6300565B2 (ja) * 2014-02-19 2018-03-28 株式会社メガチップス 動画像符号化装置、プログラム、および、集積回路
US9848193B2 (en) * 2014-04-15 2017-12-19 Qualcomm Incorporated System and method for selecting quantization parameter (QP) in display stream compression (DSC)
US9924175B2 (en) * 2014-06-11 2018-03-20 Qualcomm Incorporated Determining application of deblocking filtering to palette coded blocks in video coding
US10574988B2 (en) * 2015-11-19 2020-02-25 Qualcomm Incorporated System and methods for reducing slice boundary visual artifacts in display stream compression (DSC)

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120201304A1 (en) * 2003-12-24 2012-08-09 Apple Inc. Method and system for video encoding using a variable number of b frames
CN101159871A (zh) * 2007-11-12 2008-04-09 中兴通讯股份有限公司 宏块组级视频码率控制方法
CN101888556A (zh) * 2008-03-19 2010-11-17 华为技术有限公司 编码、解码方法和编码、解码装置
CN102355584A (zh) * 2011-10-31 2012-02-15 电子科技大学 基于帧内预测编码模式的码率控制方法
CN103391439A (zh) * 2013-07-18 2013-11-13 西安交通大学 一种基于主动宏块隐藏的h.264/avc码率控制方法

Also Published As

Publication number Publication date
CN109996076B (zh) 2021-08-06
US20190246124A1 (en) 2019-08-08
US10917652B2 (en) 2021-02-09
CN109996076A (zh) 2019-07-09
CN107113430A (zh) 2017-08-29
CN107113430B (zh) 2019-04-30
US20210160516A1 (en) 2021-05-27

Similar Documents

Publication Publication Date Title
US8588297B2 (en) Quantization parameter prediction
US10887365B2 (en) System and methods for bit rate control
US9525870B2 (en) Encoding an image
WO2019157717A1 (zh) 运动补偿的方法、装置和计算机系统
KR102599314B1 (ko) 포인트 클라우드 압축을 위한 양자화 단차 파라미터
JP6226578B2 (ja) 画像符号化装置、画像符号化方法及びプログラム
CN113630600A (zh) 人类视觉系统自适应视频编码
WO2018068239A1 (zh) 码率控制的方法、计算机系统和装置
TW201328361A (zh) 視頻/圖像編碼方法與系統
CN106664404A (zh) 视频编码中的块分割方式处理方法和相关装置
Abu et al. A novel psychovisual threshold on large DCT for image compression
US11997275B2 (en) Benefit-based bitrate distribution for video encoding
CN117280680A (zh) 动态网格对齐的并行方式
KR20190122479A (ko) 3차원 데이터를 프로세싱하기 위한 방법 및 장치
WO2020258020A1 (zh) 信息处理方法及装置、设备、存储介质
US11930168B2 (en) Consistent adjustment of parameters for video encoding
WO2020181541A1 (zh) 环路滤波的方法、装置、计算机系统和可移动设备
US11272185B2 (en) Hierarchical measurement of spatial activity for text/edge detection
US10848772B2 (en) Histogram-based edge/text detection
US10015507B2 (en) Transform system and method in video and image compression
WO2019191888A1 (zh) 环路滤波的方法、装置和计算机系统
TWI441522B (zh) 固定緩衝之即時影像壓縮技術,及用於實行即時影像壓縮技術的裝置和系統
JP2004056264A (ja) 画像復号装置、画像処理装置、動画像表示システム、プログラム、記憶媒体及び画像復号方法
WO2019191887A1 (zh) 运动补偿的方法、装置和计算机系统
CN116458157A (zh) 用于图像中感兴趣的对象区域的ai编码装置和方法以及ai解码装置和方法

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 16918980

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 16918980

Country of ref document: EP

Kind code of ref document: A1