WO2017004863A1 - 一种视频码率控制方法及视频编码装置 - Google Patents

一种视频码率控制方法及视频编码装置 Download PDF

Info

Publication number
WO2017004863A1
WO2017004863A1 PCT/CN2015/086688 CN2015086688W WO2017004863A1 WO 2017004863 A1 WO2017004863 A1 WO 2017004863A1 CN 2015086688 W CN2015086688 W CN 2015086688W WO 2017004863 A1 WO2017004863 A1 WO 2017004863A1
Authority
WO
WIPO (PCT)
Prior art keywords
code rate
difference
value
average
rate
Prior art date
Application number
PCT/CN2015/086688
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 US15/742,385 priority Critical patent/US10542254B2/en
Priority to EP15897519.3A priority patent/EP3322185B1/en
Publication of WO2017004863A1 publication Critical patent/WO2017004863A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
    • H04N21/4408Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving video stream encryption, e.g. re-encrypting a decrypted video stream for redistribution in a home network
    • 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

Definitions

  • the invention belongs to the technical field of video compression, and in particular relates to a video bit rate control method and a video encoding device.
  • the output code rate of video coding is closely related to image content, coding mode, and quantization coefficient. Generally speaking, the output code rate of video coding is always in constant dynamic change. The transmission bandwidth and storage capacity are known, and the output code rate of the video coding is constantly changing, and the contradiction requires rate control to adjust.
  • the existing rate control methods generally have two methods: a fixed rate control method and a variable rate control method. Among them, the fixed rate is served for the stability of the code rate, and the variable rate is served for the stability of the code rate quality.
  • the fixed rate generally sets the average of the code rate
  • variable rate generally sets the upper limit of the code rate
  • the fixed rate sets the average of the code rate: from a long time perspective, the demand for the code rate is different in different time periods. For example, in general, the code rate requirement during the day is higher than the code rate requirement at night. At this time, the high setting of the average bit rate value will bring waste, and the low setting will affect the video quality of certain time periods.
  • variable rate setting The upper limit of the code rate: the variable rate control method ensures the overall video quality without wasting the bit rate. However, the specific storage capacity cannot be estimated in advance. When the storage space is provided, it is often configured according to the upper limit of the code rate, and the problem is to increase the cost.
  • an aspect of the present invention provides a video rate control method for performing rate control on a video code stream in a period of time, including: according to a preset first rate value, and a front Generating a first quantization parameter according to a predetermined second code rate value and a code size generated in a previous time period; comparing the first quantization parameter and the second quantization parameter; If the first quantization parameter is greater than the second quantization parameter, the image frame of the current time period is encoded by using the first quantization parameter; if the first quantization parameter is smaller than the second quantization parameter, the image frame of the current time period is encoded by using the second quantization parameter.
  • the step of generating the first quantization parameter according to the preset first code rate value and the coding size generated in the previous period includes: dividing the period of time into N time segments, N>1; The first time interval is performed to obtain a first average code rate of each time period, such that the first average code rate satisfies the following formula:
  • the step of initial allocation includes: initially allocating an average code rate of each of the time slots according to preset a priori information; or assigning a first average code rate of each of the time segments to The first code rate values are the same.
  • the step of adjusting the code rate includes: acquiring an average code rate actually generated in a corresponding time period of a previous time period as a third average code rate; calculating a second average code rate of each time period and the time period a difference of the corresponding third average code rate; after each of the time division periods, performing a code rate adjustment according to the difference value of each time period; and/or after all the N minutes period ends, according to all the time periods The difference is performed to adjust the rate.
  • the step of performing rate adjustment according to the difference of each time period after the end of each time period includes: dividing the difference of the current time period by N to obtain a first difference average value; A difference average is superimposed on the second average code rate of each of the N divided periods after the divided period.
  • the step of performing rate allocation according to the difference of all the time periods after the end of all the N time periods includes: dividing each time difference value with a positive value into at least a part of the difference value It is put into the saving pool; for each negative difference time period with a negative difference value, the total code rate value of the saving pool is assigned to each negative difference time dividing period.
  • the step of placing at least a portion of the difference value into the saving pool includes: dividing the positive difference value The second average code rate of the time period is redistributed such that the second average code rate of the positive difference time period is reduced by at least a portion of the difference; the current value of the savings pool is increased by at least a portion of the difference.
  • the step of allocating the total code rate value of the saving pool to each negative difference time period includes: equally distributing the total code rate value of the saving pool to each negative difference time period; or according to the difference ratio, The total code rate value of the savings pool is assigned to each negative difference time period. .
  • the step of equally allocating the total code rate value of the saving pool to each negative difference time period includes dividing the total code rate value of the saving pool by the number of negative difference time segments to obtain the second difference. A value average; the second difference average is superimposed on a second average code rate of each negative difference time period.
  • the step of allocating the total code rate value of the saving pool to each negative difference time-dividing period according to the difference ratio includes: calculating a total difference of each negative difference time-segment period as a total of all negative difference time-dividing periods
  • the ratio of the difference of the difference is obtained by multiplying the total code rate value of the saving pool by the ratio of the difference of each negative difference time period to obtain a saving code rate allocation value for each negative difference time period;
  • the assigned values are respectively superimposed on the second average code rate of their corresponding time segments.
  • the first code rate value is a predetermined target average code rate, which is a fixed value in each of the cycle time periods; and the second code rate value is a predetermined code rate upper limit value.
  • the method further includes: stopping, when the transmission bandwidth limitation condition is not detected, the step of encoding the image frame by using the second quantization parameter.
  • Another aspect of the present invention provides a video encoding apparatus for performing video encoding by performing rate control on a video code stream in a period of time, including: an image sensor for acquiring image information and generating a video stream And outputting to the first rate controller and the second rate controller; the first rate controller is configured to generate the first quantization parameter according to the preset first rate value and output the signal to the encoder; the second code rate a controller, configured to generate a second quantization parameter according to the preset second code rate value and output the code And an encoder, configured to encode the image frame of the current time period according to the larger one of the first quantization parameter and the second quantization parameter.
  • the first code rate controller is further configured to receive, from the encoder, a code size generated by a previous time period, and calculate a first quantization parameter according to the first code rate value and a code size of a previous time period;
  • the second rate controller is further configured to receive, from the encoder, a code size generated in a previous time period, and calculate a second quantization parameter according to the second code rate value and a code size of a previous time period.
  • the first rate controller divides the period of time into N time slots, N>1, and further includes: a code rate initial allocation unit, configured to perform initial allocation for each of the time segments, to Obtaining a first average code rate of each time period such that the first average code rate satisfies the following formula:
  • a code rate adjustment unit configured to perform rate adjustment on the first average code rate of each of the time slots to obtain a second average code rate of each time period, such that the second average code rate satisfies the following formula:
  • the code rate initial allocation unit includes: a first initial allocation unit, configured to perform initial allocation on an average code rate of each of the time slots according to preset a priori information; and/or a second initial allocation unit And assigning a first average code rate of each of the divided time periods to be the same as the first code rate value.
  • the first rate controller further includes a code rate obtaining unit, configured to acquire an average code rate actually generated in a corresponding time period of a previous time period, as the third average code rate;
  • the code rate adjustment unit further includes a difference calculation unit configured to calculate a difference between the second average code rate of each time period and the third average code rate corresponding to the time period.
  • the code rate adjustment unit includes: a first adjustment subunit, configured to perform code rate allocation according to the difference value of each time period after each time period ends; and/or a second adjustment subunit, use After the end of all N time division periods, the code rate allocation is performed based on the difference of all the time division periods.
  • the first adjustment subunit performs code rate allocation by dividing a difference value of the current time period by N to obtain a first difference average value; and superposing the first difference value average value to the time division period The second average code rate of each of the last N time segments.
  • the second adjustment subunit further includes: a memory, configured to store the saved code rate value; and a first difference distribution unit, configured to divide the time difference for each positive difference value with a positive value At least a portion of the value is stored in the memory; the second adjustment sub-unit assigns a total saved rate value in the memory to each negative difference time period for each negative difference period of the negative value. .
  • the second adjustment subunit redistributes the second average code rate of the positive difference time period, so that the second average code rate of the positive difference time period is reduced by at least a part of the difference;
  • a difference allocation unit increases the current value of the memory by at least a portion of the difference.
  • the second adjustment subunit allocates a total saved rate value in the memory to each negative difference time period by dividing the total code rate value of the saving pool by the number of negative difference time periods. And obtaining a second difference average value; superimposing the second difference average value on a second average code rate of each negative difference time division period.
  • the second adjustment subunit further includes a second difference allocation unit, configured to calculate a ratio of the difference between the difference of each negative difference time period and the total difference of all the negative difference time periods, and store the difference The total saving code rate value is multiplied by the difference ratio of each negative difference time period to obtain a saving code rate allocation value for each negative difference time period; the second adjusting sub-unit allocates each saving code rate The values are respectively superimposed on the second average code rate of its corresponding time period.
  • the first code rate value is a predetermined target average code rate, which is a fixed value in each of the cycle time periods; and the second code rate value is a predetermined code rate upper limit value.
  • the apparatus further includes a bandwidth detecting unit that causes the encoder to stop encoding using the second quantization parameter when the transmission bandwidth limitation condition is not detected.
  • FIG. 1 is a schematic flow chart of a video bit rate control method of the present invention
  • FIG. 2 is a schematic flow chart of performing rate control on a first code rate value according to an embodiment of the present invention
  • FIG. 3 is a schematic diagram of a reference for dividing a cycle period according to the present invention.
  • FIG. 4 is a schematic flow chart of performing code rate allocation according to a difference value of each time period in an optional implementation manner of the present invention
  • FIG. 5 is a schematic flowchart of performing code rate adjustment according to the difference of each time period after the end of each time period in an embodiment of the present invention
  • FIG. 6 is a schematic flowchart of performing code rate adjustment according to a difference of all time periods in another alternative embodiment of the present invention.
  • FIG. 7 is a schematic flow chart of putting a difference into a saving pool according to an embodiment of the present invention.
  • FIG. 8 is a schematic flow chart of evenly distributing the total code rate values of the saving pool in an optional embodiment of the present invention.
  • FIG. 9 is a schematic flowchart of allocating a total code rate value of a saving pool according to a difference ratio according to another optional embodiment of the present invention.
  • FIG. 10 is a schematic structural diagram of a video bit rate control apparatus according to the present invention.
  • FIG. 11 is a schematic structural diagram of a first rate controller of the present invention.
  • FIG. 12 is a schematic structural diagram of a code rate initial allocation unit and a code rate adjusting unit according to the present invention.
  • Figure 13 is a schematic view showing the structure of a second adjustment subunit of the present invention.
  • CBR fixed bit rate
  • the video coded code stream is always close to the target bit rate during the encoding process.
  • CBR coding means that the amount of output code data per second (or the input code rate of the decoder) of the encoder should be a fixed value (constant).
  • the encoder detects the complexity of each frame of image and then calculates the code rate. If the code rate is too small, the useless data is filled to be consistent with the specified code rate; if the code rate is too large, the code rate is appropriately lowered and the code rate is kept consistent with the specified code rate. Therefore, the coding efficiency of the fixed bit rate mode is relatively low.
  • the bit rate is used to indicate how many bits of audio data are used per second. The higher the bit rate, the better the sound quality.
  • the fixed rate whether for audio coding or video coding, has the advantage of fast compression and can be supported by most software and devices. Especially when multimedia communication is performed in a bandwidth-limited channel, the fixed bit rate coding method is very advantageous. Because the maximum code rate is limited at this time, the fixed code rate can make better use of such a channel. However, the fixed bit rate is not suitable for storage because the fixed bit rate is not There are enough bitrates to encode complex portions of video content, resulting in a degradation in quality, while fixed bitrates waste some bitrate when encoding simple portions of video content.
  • VBR Variable bit rate
  • VBR Variable Bit Rate
  • the variable bit rate can follow the video image.
  • the complexity varies, so the coding efficiency is relatively high.
  • VBR encoding refers to the encoder's output bit rate (or the decoder's input bit rate) can be adaptively adjusted according to the complexity of the encoder's input source signal, in order to keep the output quality unchanged instead of maintaining the output bit rate. constant.
  • VBR is suitable for storage, and can make better use of limited storage space: encode more complex segments with more codewords, and encode less complex segments with fewer codewords.
  • FIG. 1 is a flow chart showing a video bit rate control method of the present invention.
  • the video rate control method of the present invention is used for rate control of a video code stream in a period of time, which includes:
  • Step S1 Generate a first quantization parameter according to the preset first code rate value and the code size generated in the previous time period.
  • the user presets the first code rate value, generates a first quantization parameter according to the first code rate value and the code size generated in the previous time period, and outputs the first quantization parameter in real time.
  • the first code rate value is a predetermined target average code rate value, which is a fixed value in each of the cycle periods.
  • the target average code rate value is an average code rate obtained by adjusting the code stream over a long period of time, that is, an average code rate under long-term statistics, and can be considered as a fixed value in each cycle period.
  • the target average bit rate is determined by the video storage period and storage capacity.
  • Step S2 Generate a second quantization parameter according to the preset second code rate value and the code size generated in the previous period.
  • the user presets a second code rate value, generates a second quantization parameter according to the code size generated by the second code rate value and the previous time period (corresponding to the previous time period in step S1), and outputs the second quantization parameter in real time.
  • the second quantization parameter is not limited to the code rate value, generates a second quantization parameter according to the code size generated by the second code rate value and the previous time period (corresponding to the previous time period in step S1), and outputs the second quantization parameter in real time.
  • the second code rate value is a predetermined code rate upper limit value.
  • the upper rate limit is the upper limit code rate of the instantaneous calculation of the code stream, and the upper limit of the code rate corresponds to the code rate under the limitation of the user transmission bandwidth.
  • step S1 and step S2 are not unique, and may be performed sequentially or simultaneously.
  • step S3 the first quantization parameter and the second quantization parameter are compared.
  • the sizes of the first quantization parameter and the second quantization parameter are compared, and a larger quantization coefficient is selected therefrom to encode an image frame of a current time period.
  • the unquantized image frame refers to an image frame that has not been encoded using a quantization parameter.
  • Step S4 If the first quantization parameter is greater than or equal to the second quantization parameter, the image frame is encoded using the first quantization parameter.
  • Step S5 If the first quantization parameter is smaller than the second quantization parameter, the image frame is encoded using the second quantization parameter.
  • a larger quantization coefficient is selected according to the comparison result to encode an unquantized image frame in the current time period. If the first quantization parameter is greater than or equal to the second quantization parameter, the image frame is encoded using the first quantization parameter. Otherwise, the image frame is encoded using the second quantization parameter.
  • FIG. 2 is a flow chart showing the rate control of the first code rate value in an embodiment of the present invention.
  • the step of generating the first quantization parameter according to the preset first code rate value and the code size generated in the previous time period further includes:
  • step S10 the period of time is divided into N sub-periods, N>1.
  • the current time period corresponding to the first code rate value is first divided into at least two time segments. It is assumed that the current time period corresponding to the first code rate value is 24 hours, and the 24 hours can be divided into 6 time segments or 8 time segments, etc., as shown in FIG. 3, FIG. 3 is a division of the cycle time period according to the present invention. Reference diagram of the reference.
  • the cycle period is a natural cycle period, such as one day, one week, and the like.
  • Step S11 Perform initial allocation for each of the divided time periods to obtain a first average code rate of each time period, such that the first average code rate satisfies the following formula:
  • an initial allocation is performed for each time period (ie, N time periods), and a first average code rate of each time period is further obtained, and a first average code rate of N time periods is obtained: a first time period a first average code rate, a first average code rate of the second minute period, ..., a first average code rate of the Nth time period, and causing the first average code rate of the N time periods to satisfy the above formula, That is, the sum of the first average code rates in all time periods is required, and the result after dividing by N is equal to the first code rate value.
  • Step S12 Perform rate adjustment on the first average code rate of each of the divided periods to obtain a second average code rate of each time period, so that the second average code rate satisfies the following formula:
  • the first average code rate (that is, the first average code rate of the N time segments) of each of the time slots is adjusted to obtain a second average code rate of each time period, and a total of a second average code rate of the N time segments: a second average code rate of the first minute period, a second average code rate of the second minute period, ..., a second average code rate of the Nth time period, and
  • the second average code rate of the N time segments satisfies the above formula, that is, the sum of the second average code rates in all the time periods obtained after the adjustment is required, and the result after dividing by N is also equal to the first code rate value.
  • the step of performing initial allocation for each time period includes: initially assigning each of the time segments according to preset a priori information; or first first code of each of the time segments The rate is assigned to be the same as the first rate value.
  • the rate allocation method uses different rate allocation methods depending on the stage in which it is located.
  • the initial allocation ie, initial code rate allocation
  • the first code rate value is 48 kbps
  • the cycle time period corresponding to the first code rate value is 24 hours. If the 24 hours are divided into 6 time slots, the 6 time division periods are initially allocated, and if the initial allocation is performed according to the prior information, the first average code rate of the first minute period, ..., the 6th time period
  • the first average bit rate may be 6 kbps, 10 kbps, 13 kbps, 9 kbps, 7 kbps, 3 kbps or 4 kbps, 8 kbps, 12 kbps, 12 kbps, 8 kbps, 4 kbps.
  • the first code rate value of 48 kbps is to be equally distributed to 6 time slots, then the first average code rate of the first minute period, ..., the first average code rate of the sixth time period They are 8, ..., 8, respectively.
  • the step of performing rate allocation on the first average code rate of each time period includes: after each time period ends, performing code rate allocation according to the difference value of each time period; and/or After all N time division periods have ended, the code rate allocation is performed based on the difference of all the time periods. Specifically, optionally, only the step of performing rate allocation according to the difference of each time period may be performed, or only the step of performing rate allocation according to the difference of all the time periods may be performed, or both of the foregoing may be performed simultaneously. Rate allocation method.
  • FIG. 4 is a schematic flow chart of performing code rate allocation according to a difference value of each time period in an optional embodiment of the present invention.
  • the performing a rate allocation step according to a difference value of each time period further includes:
  • Step S20 Acquire an average code rate actually generated in the corresponding time period of the previous time period as the third average code rate.
  • the average code rate actually generated in the first minute period of the previous time period is acquired as the third average code rate.
  • Step S21 calculating a difference between the second average code rate of each time period and the third average code rate corresponding to the time period.
  • the difference between the second average code rate of the first minute period and the average code rate actually generated in the first minute period of the previous period is calculated.
  • Step S22 after each sub-period ends, the code rate adjustment is performed according to the difference value of each sub-period.
  • the code rate adjustment is performed according to the calculated difference value, and the difference calculation is performed for all the divided time periods (ie, N divided time periods) and the code rate adjustment is performed.
  • FIG. 5 is a schematic flow chart of performing code rate adjustment according to the difference of each time period after the end of each time period in an embodiment of the present invention.
  • the step of performing rate adjustment according to the difference of each time period further includes:
  • step S30 the difference of the current time period is divided by N to obtain a first difference average value.
  • the difference generated in the first minute period is 1 kbps
  • the difference of 1 kbps in the first minute period is divided by 6 (according to the above example, assuming N is 6), and the first difference average value is obtained, that is, 1/ 6.
  • the second The difference generated by the time division is -1 kbps
  • the average value of the first difference is -1/6.
  • Step S31 superimposing the first difference average value on a second average code rate of each of the N time segments after the time division period.
  • the first difference average value (ie, 1/6) is superimposed to the Nth time period after the first minute period (ie, the second minute period to the N+1th time period) Two average bit rates.
  • the first difference average value (i.e., -1/6) of the second minute period is superimposed to each of the N minute periods (i.e., the third minute period to the N+2 minute period) after the second minute period.
  • the second average bit rate of the time slots If the difference generated by the third time period is 0 kbps, the difference need not be allocated.
  • the first difference average value is superimposed on the second average code rate of each of the N time segments after the time division period, and the purpose thereof is to flatten the influence of the difference to one day to digest.
  • FIG. 6 is a schematic flow chart of performing rate adjustment according to a difference of all time periods in another alternative embodiment of the present invention.
  • the performing a rate adjustment step according to the difference of all the time periods further includes:
  • step S40 each positive difference value with a positive value is divided into time periods, and at least a part of the difference is put into the saving pool.
  • the difference between the second average code rate of the N time segments and the average code rate actually generated in the corresponding time period is calculated, and each difference of the positive value is positive.
  • each difference of the positive value is positive.
  • at least a portion of the difference is placed into the savings pool.
  • the at least one portion may be 1/2, or 2/5, etc., or other values, and the highest is the total of the differences.
  • Step S41 dividing each negative difference value with a negative value into a period, and dividing the total code rate value of the saving pool Each negative difference is assigned to a time period.
  • the total code rate value of the saving pool is allocated to each negative difference time period in the current time period for each negative difference time period in which the difference value is a negative value.
  • FIG. 7 is a schematic flow chart of putting a difference into a saving pool according to an embodiment of the present invention.
  • the step of placing at least a portion of the difference into the saving pool further includes:
  • Step S50 reallocating the second average code rate of the positive difference time period, so that the second average code rate of the positive difference time period is reduced by at least a part of the difference.
  • the second average code rate of all the time periods is redistributed, that is, at least a part of the difference is reduced based on the second average code rate of all the time periods.
  • step S51 the current value of the saving pool is increased by at least a part of the difference.
  • the current value of the saving pool (ie, the current code rate value of the saving pool) is increased by at least a portion of the difference in the code rate.
  • the step of allocating the total code rate value of the saving pool to each negative difference time period includes: equally distributing the total code rate value of the saving pool to each negative difference time period; or according to the difference Proportion, the total rate value of the savings pool is assigned to each negative difference time period.
  • FIG. 8 is a schematic flow chart of evenly distributing the total code rate values of the saving pool in an optional embodiment of the present invention.
  • the step of equally allocating the total code rate value of the saving pool to each negative difference time period further includes:
  • step S60 the total code rate value of the saving pool is divided by the number of negative difference time segments to obtain a second difference average value.
  • step S61 the second difference average value is superimposed on the second average code rate of each negative difference time period.
  • the total rate value of the savings pool is 6, and the difference between the three negative differences of A, B, and C is -1, -2, -3; the meaning of the average allocation is: 6 divided by 3 to get the second average
  • the code rate value is 2, and 2 is superimposed on -1, -2, -3, respectively.
  • FIG. 9 is a schematic flowchart of allocating a total code rate value of a saving pool according to a difference ratio in another optional embodiment of the present invention.
  • the step of allocating the total code rate value of the saving pool to each negative difference time-dividing period according to the difference ratio further includes:
  • Step S70 calculating a ratio of the difference between the difference of each negative difference time period and the total difference of all the negative difference time periods.
  • Step S71 multiplying the total code rate value of the saving pool by the difference ratio of each negative difference time period to obtain a saving code rate allocation value of each negative difference time period.
  • step S72 the respective saving code rate allocation values are respectively superimposed on the second average code rate of the corresponding divided time period.
  • the total code rate of the savings pool is 6, and the difference between the three negative differences of A, B, and C is -1, -2, -3; the meanings of the proportions divided by the difference are: A, B, C
  • the difference ratio is 1/6, 2/6, 3/6; the total code rate value 6 is multiplied by the above three ratios to obtain the savings rate allocation values 1, 2, and 3 for each time period; 3 is superimposed on -1, -2, -3 respectively.
  • the method before the step of calculating the second quantization parameter, the method further includes: stopping, when the transmission bandwidth limitation condition is not detected, performing the step of encoding the image frame by using the second quantization parameter .
  • the image frame is encoded using only the first quantization parameter. If the transmission bandwidth limitation condition is detected, it indicates that the transmission bandwidth is limited, and the step of encoding the image frame using the first quantization parameter and the step of encoding the image frame using the second quantization parameter are simultaneously performed.
  • the video bit rate control method of the present invention is described in detail, which divides a long time (such as 24 hours) and initially allocates a first code rate value (ie, a target average code rate) to obtain a first average code rate. And performing rate adjustment on the first average code rate to obtain a second average code rate, where the code rate of each time period reflects the scene complexity of the time period, such that the code rate of each time period (ie, the second average code) Rate) While approximating the first code rate value (ie, the target average code rate), the stability of the video quality can be ensured to the utmost extent.
  • a first code rate value ie, a target average code rate
  • the existing fixed rate and the variable code are solved.
  • the rate control method can only select one of the problems of rate control, so that the two are organically combined.
  • Figure 10 is a block diagram showing the structure of a video bit rate control apparatus of the present invention.
  • the video bit rate control apparatus of the present invention is configured to perform video coding by performing rate control on a video code stream in a period of time, including: an image sensor, a first rate controller 1, Two code rate controller 2 and encoder 3.
  • the image sensor 1 is configured to acquire image information and generate a video code stream, which is output to the first rate controller and the second rate controller.
  • the first rate controller 2 is connected to the image sensor 1 for using a preset first code rate The value generates a first quantization parameter and outputs it to the encoder.
  • the second rate controller 3 is connected to the image sensor 1 for generating a second quantization parameter according to a preset second code rate value and outputting the same to the encoder.
  • An encoder 4 is coupled to the first rate controller 2 and the second rate controller 3 for encoding an image frame of a current time period according to a larger one of the first quantization parameter and the second quantization parameter .
  • the first rate controller 2 is further configured to receive, from the encoder 4, a code size generated in a previous time period, and calculate a code according to the first code rate value and a code size of a previous time period.
  • a quantitative parameter is further configured to calculate a code according to the first code rate value and a code size of a previous time period.
  • the second rate controller 3 is further configured to receive the code size generated by the previous period from the encoder 4, and calculate the second quantization parameter according to the second code rate value and the code size of the previous period.
  • Figure 11 is a block diagram showing the structure of a first rate controller of the present invention.
  • the first rate controller 2 divides the period of time into N divided periods, N>1, which further includes a code rate initial allocation unit 21 and a code rate adjustment unit 22.
  • the code rate initial allocation unit 21 is configured to perform initial allocation for each of the time division periods to obtain a first average code rate of each time period, such that the first average code rate satisfies the following formula:
  • the code rate adjustment unit 22 is connected to the code rate initial allocation unit 21 for performing rate adjustment on the first average code rate of each of the divided periods to obtain a second average code rate of each time period, so that The second average code rate satisfies the following formula:
  • the first rate controller 2 further includes a code rate obtaining unit 23, and is connected to the code rate adjusting unit 22, for acquiring the level actually generated in the corresponding time period of the previous time period.
  • Average code rate as the third average code rate
  • the code rate adjustment unit 22 further includes a difference calculation unit 22-3 connected to the code rate acquisition unit 23 for calculating a second average code rate of each time period and a third average code rate corresponding to the time division period. The difference.
  • Figure 12 is a block diagram showing the structure of a code rate initial allocation unit and a code rate adjusting unit of the present invention.
  • the code rate initial allocation unit 21 includes a first initial allocation unit 21-1 and/or a second initial allocation unit 21-2.
  • the first initial allocation unit 21-1 is configured to perform initial allocation on the average code rate of each of the divided periods according to preset a priori information.
  • the second initial allocation unit 21-2 allocates the first average code rate of each of the divided periods to be the same as the first code rate value.
  • the code rate adjustment unit 22 includes a first adjustment sub-unit 22-1 and/or a second adjustment sub-unit 22-2.
  • the first adjustment sub-unit 22-1 is configured to perform code rate allocation according to the difference value of each time period after the end of each time period.
  • the first adjustment sub-unit 22-1 performs code rate allocation by dividing the difference of the current time period by N to obtain a first difference average value; and superimposing the first difference average value on the The second average code rate of each of the N time segments after the time division period.
  • the second adjustment sub-unit 22-2 is configured to perform code rate allocation according to the difference values of all the time periods after the end of all the N time division periods.
  • Figure 13 is a schematic view showing the structure of a second adjustment subunit of the present invention.
  • the second adjustment subunit 22-2 further includes a memory 201 and a first difference. Distribution unit 202.
  • the memory 201 is configured to store the saved code rate value.
  • the first difference assigning unit 202 is connected to the difference calculating unit 22-3 and the memory 201, and is configured to divide each positive difference value period whose positive value is calculated in the code rate adjusting unit 22 into a period. At least a portion of the difference is stored in the memory 201.
  • the second adjusting sub-unit 22-2 assigns a total saving rate value in the memory 201 to each negative difference time period for each negative difference time period in which the difference value is a negative value.
  • the second adjusting sub-unit 22-2 reallocates the second average code rate of the positive difference time period, so that the second average code rate of the positive difference time period is reduced by at least a part of the difference
  • the first difference assigning unit 202 increases the current value of the memory 201 by at least a portion of the difference.
  • the second adjusting sub-unit 22-2 allocates the total saving code rate value in the memory 201 to each negative difference time period by dividing the total code rate value of the saving pool by the negative difference value. The number of time slots is divided to obtain a second difference average value; the second difference average value is superimposed on a second average code rate of each negative difference time period.
  • the second adjustment sub-unit 22-2 further includes a second difference distribution unit 203, configured to calculate a difference between the difference of each negative difference time period and the total difference of all the negative difference time periods. a ratio of values, the total saved code rate value in the memory 201 is multiplied by the difference ratio of each negative difference time period to obtain a saved code rate allocation value for each negative difference time period; the second adjustment subunit 22-2 superimposes each of the saving code rate allocation values on the second average code rate of its corresponding time period.
  • a second difference distribution unit 203 configured to calculate a difference between the difference of each negative difference time period and the total difference of all the negative difference time periods. a ratio of values, the total saved code rate value in the memory 201 is multiplied by the difference ratio of each negative difference time period to obtain a saved code rate allocation value for each negative difference time period; the second adjustment subunit 22-2 superimposes each of the saving code rate allocation values on the second average code rate of its corresponding time period.
  • the first code rate value is a predetermined target average code rate, which is a fixed value in each of the cycle periods.
  • the second code rate value is a predetermined code rate upper limit value.
  • the apparatus further includes a bandwidth detecting unit 6 when no transmission bandwidth limitation is detected.
  • the encoder 4 is caused to stop encoding using the second quantization parameter.
  • the video bit rate control apparatus of the present invention divides a long time (for example, 24 hours) and initially allocates a first code rate value (ie, a target average code rate) to obtain a first average code rate. And performing rate adjustment on the first average code rate to obtain a second average code rate, where the code rate of each time period reflects the scene complexity of the time period, such that the code rate of each time period (ie, the second average code) Rate) While approximating the first code rate value (ie, the target average code rate), the stability of the video quality can be ensured to the utmost extent.
  • a first code rate value ie, a target average code rate
  • a video bit rate control method based on a storage capacity (a rate control method based on a target average code rate) and a transmission bandwidth (a code rate control method based on a code rate upper limit) is used to solve the existing code rate and
  • the variable rate control method can only select one of the problems of rate control, so that the two are organically combined.
  • the present invention provides a rate control method and a video encoding apparatus.
  • a rate control method and a video encoding apparatus.
  • it is possible to achieve target average rate control for a long time (such as 24 hours), and to ensure video quality to the greatest extent. Stability.

Landscapes

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

Abstract

本发明公开了一种视频码率控制方法及视频编码装置,用于对周期时段内的视频码流进行码率控制,其包括:根据预设的第一码率值,以及前一时段产生的编码大小,生成第一量化参数;根据预设的第二码率值,以及前一时段产生的编码大小,生成第二量化参数;比较第一量化参数和第二量化参数;若第一量化参数大于等于第二量化参数,则使用第一量化参数对当前时段的图像帧进行编码;若第一量化参数小于第二量化参数,则使用第二量化参数对当前时段的图像帧进行编码。本发明能够实现长时间(如24小时)的码率控制,并能够最大程度地保证视频质量的稳定性。

Description

一种视频码率控制方法及视频编码装置 技术领域
本发明属于视频压缩技术领域,特别涉及一种视频码率控制方法及视频编码装置。
背景技术
视频编码的输出码率与图像内容、编码方式、量化系数等都息息相关,一般来说,视频编码的输出码率始终处于不断的动态变化中。传输带宽和存储容量是已知的,而视频编码的输出码率处于不断的动态变化中,这其中的矛盾就需要码率控制进行调节。
现有的码率控制方法一般有两种方式:定码率控制方法和变码率控制方法。其中,定码率是为了码率的稳定性而服务的,而变码率是为了码率质量的稳定性而服务的。上述两种码率控制方法,在设置码率时:
1.定码率一般设置码率的平均值;
2.变码率一般设置码率的上限值;
在实际应用过程中,上述两种码率控制方法都存在一些问题:
1.定码率设置码率的平均值:从长时间来看,不同时段对码率的需求是不一样的。比如,一般情况下,白天的码率需求要高于夜晚的码率需求,此时,平均码率值设置的高会带来浪费,设置的低又会影响某些时段的视频质量。
2.变码率设置码率的上限值:变码率控制方法,在保证整体的视频质量的同时,又不浪费码率。但其具体的存储容量无法进行预先估计,在配备存储空间时,往往是按照码率的上限值进行配置,随之带来的问题就是增加成本。
由于实际的传输带宽和存储容量都是有限的,而现有上述两种码率控制方法和码率设置方法均不能有效的均衡视频质量和目标码率之间的关系。
发明内容
本发明的目的是提供一种视频码率控制方法及视频编码装置,能够实现长时间(如24小时)的码率控制,并能够最大程度的保证视频质量的稳定性。
为实现上述目的,本发明的一个方面提供了一种视频码率控制方法,用于对周期时段内的视频码流进行码率控制,其包括:根据预设的第一码率值,以及前一时段产生的编码大小,生成第一量化参数;根据预设的第二码率值,以及前一时段产生的编码大小,生成第二量化参数;比较第一量化参数和第二量化参数;若第一量化参数大于第二量化参数,则使用第一量化参数对当前时段的图像帧进行编码;若第一量化参数小于第二量化参数,则使用第二量化参数对当前时段的图像帧进行编码。
其中,所述根据预设的第一码率值,以及前一时段产生的编码大小,生成第一量化参数的步骤包括:将所述周期时段划分为N个分时段,N>1;对每个所述分时段进行初始分配,以得到每个分时段的第一平均码率,使得所述第一平均码率满足下式:
Figure PCTCN2015086688-appb-000001
对所述每个分时段的第一平均码率进行码率调整,以得到每个分时段的第二平均码率,使得所述第二平均码率满足下式:
Figure PCTCN2015086688-appb-000002
根据预设的第一码率值,以及前一时段产生的编码大小,生成第一量化参数的步骤时段
其中,所述初始分配的步骤包括:根据预设的先验信息,对每个所述分时段的平均码率进行初始分配;或将每个所述分时段的第一平均码率分配为与所述第一码率值相同。
其中,所述码率调整的步骤包括:获取前一时段的对应分时段中实际产生的平均码率,以作为第三平均码率;计算每个分时段的第二平均码率与该分时段对应的第三平均码率的差值;在每个分时段结束后,根据每个分时段的所述差值执行码率调整;和/或在全部N个分时段结束后,根据所有分时段的差值执行码率调整。
其中,在每个分时段结束后,所述根据每个分时段的差值执行码率调整的步骤包括:将当前分时段的差值除以N得到第一差值平均值;将所述第一差值平均值叠加到该分时段后N个分时段中每个分时段的第二平均码率上。
其中,在全部N个分时段结束后,所述根据所有分时段的差值执行码率分配的步骤包括:对差值为正值的每个正差值分时段,将其差值的至少一部分放入到节约池;对差值为负值的每个负差值分时段,将节约池的总码率值分配给每个负差值分时段。
其中,所述将差值的至少一部分放入到节约池的步骤包括:将正差值分 时段的第二平均码率进行再分配,使所述正差值分时段的第二平均码率减少该差值的至少一部分;将节约池的当前值增加所述差值的至少一部分。。其中,所述将节约池的总码率值分配给每个负差值分时段的步骤包括:将节约池的总码率值平均分配给每个负差值分时段;或按照差值比例,将节约池的总码率值分配给每个负差值分时段。。
其中,所述将节约池的总码率值平均分配给每个负差值分时段的步骤包括:将节约池的总码率值除以负差值分时段的个数,以得到第二差值平均值;将该第二差值平均值叠加到每个负差值分时段的第二平均码率上。
其中,所述按照差值比例,将节约池的总码率值分配给每个负差值分时段的步骤包括:计算每个负差值分时段的差值占所有负差值分时段的总差值的差值比例;将节约池的总码率值乘以每个负差值分时段的差值比例,以得到每个负差值分时段的节约码率分配值;将各个节约码率分配值分别叠加到其对应分时段的第二平均码率上。
其中,所述第一码率值是预先确定的目标平均码率,其在每个所述周期时段内是固定值;所述第二码率值是预先确定的码率上限值。其中,在所述计算得到第二量化参数的步骤之前,还包括:当未检测到传输带宽限制条件时,停止执行所述使用第二量化参数对图像帧进行编码的步骤。
本发明的另一个方面提供了一种视频编码装置,用于通过对周期时段内的视频码流进行码率控制以进行视频编码,其包括:图像传感器,用于获取图像信息并产生视频码流,输出给第一码率控制器和第二码率控制器;第一码率控制器,用于根据预设的第一码率值生成第一量化参数并输出给编码器;第二码率控制器,用于根据预设的第二码率值生成第二量化参数并输出给编 码器;编码器,用于根据所述第一量化参数和第二量化参数中的较大值对当前时段的图像帧进行编码。
时段其中,所述第一码率控制器,还用于从编码器接收前一时段产生的编码大小,并根据所述第一码率值和前一时段的编码大小计算得到第一量化参数;所述第二码率控制器,还用于从编码器接收前一时段产生的编码大小,并根据所述第二码率值和前一时段的编码大小计算得到第二量化参数。
其中,所述第一码率控制器将所述周期时段划分为N个分时段,N>1,其进一步包括:码率初始分配单元,用于对每个所述分时段进行初始分配,以得到每个分时段的第一平均码率,使得所述第一平均码率满足下式:
Figure PCTCN2015086688-appb-000003
码率调整单元,用于对所述每个分时段的第一平均码率进行码率调整,以得到每个分时段的第二平均码率,使得所述第二平均码率满足下式:
Figure PCTCN2015086688-appb-000004
其中,所述码率初始分配单元包括:第一初始分配单元,用于根据预设的先验信息,对每个所述分时段的平均码率进行初始分配;和/或第二初始分配单元,将每个所述分时段的第一平均码率分配为与所述第一码率值相同。
其中,所述第一码率控制器还包括码率获取单元,用于获取前一时段的对应分时段中实际产生的平均码率,以作为第三平均码率;
所述码率调整单元还包括差值计算单元,其用于计算每个分时段的第二平均码率与该分时段对应的第三平均码率的差值。
其中,所述码率调整单元包括:第一调整子单元,用于在每个分时段结束后,根据每个分时段的所述差值执行码率分配;和/或第二调整子单元,用 于在全部N个分时段结束后,根据所有分时段的差值执行码率分配。
其中,所述第一调整子单元通过下述方式执行码率分配:将当前分时段的差值除以N得到第一差值平均值;将所述第一差值平均值叠加到该分时段后N个分时段中每个分时段的第二平均码率上。
其中,所述第二调整子单元还包括:存储器,用于存储节约的码率值;第一差值分配单元,用于对差值为正值的每个正差值分时段,将其差值的至少一部分存储到存储器中;所述第二调整子单元对差值为负值的每个负差值分时段,将存储器中总的节约码率值分配给每个负差值分时段。。
其中,所述第二调整子单元将正差值分时段的第二平均码率进行再分配,使所述正差值分时段的第二平均码率减少该差值的至少一部分;所述第一差值分配单元将存储器的当前值增加所述差值的至少一部分。
其中,所述第二调整子单元通过下述方式将存储器中总的节约码率值分配给每个负差值分时段:将节约池的总码率值除以负差值分时段的个数,以得到第二差值平均值;将该第二差值平均值叠加到每个负差值分时段的第二平均码率上。
其中,所述第二调整子单元还包括第二差值分配单元,其用于计算每个负差值分时段的差值占所有负差值分时段的总差值的差值比例,将存储器中总的节约码率值乘以每个负差值分时段的差值比例,以得到每个负差值分时段的节约码率分配值;所述第二调整子单元将各个节约码率分配值分别叠加到其对应分时段的第二平均码率上。
其中,所述第一码率值是预先确定的目标平均码率,其在每个所述周期时段内是固定值;所述第二码率值是预先确定的码率上限值。
其中,所述装置还包括带宽检测单元,当未检测到传输带宽限制条件时,使编码器停止使用所述第二量化参数进行编码。
如上所述,通过本发明的视频码率控制方法,能够实现长时间(如24小时)的码率控制,并能够最大程度的保证视频质量的稳定性。
附图说明
图1是本发明的视频码率控制方法的流程示意图;
图2是本发明一实施方式中对第一码率值进行码率控制的流程示意图;
图3是本发明对周期时段进行划分的参考示意图;
图4是本发明一可选实施方式中根据每个分时段的差值执行码率分配的流程示意图;
图5是本发明一实施方式中在每个分时段结束后,根据每个分时段的差值执行码率调整的流程示意图;
图6是本发明另一可选实施方式中根据所有分时段的差值执行码率调整的流程示意图;
图7是本发明一实施方式中将差值放入节约池的流程示意图;
图8是本发明一可选实施方式中对节约池的总码率值进行平均分配的流程示意图;
图9是本发明的另一可选实施方式中按照差值比例对节约池的总码率值进行分配的流程示意图;
图10是本发明的视频码率控制装置的结构示意图;
图11是本发明的第一码率控制器的结构示意图;
图12是本发明的码率初始分配单元和码率调整单元的结构示意图;
图13是本发明的第二调整子单元的结构示意图。
具体实施方式
为使本发明的目的、技术方案和优点更加清楚明了,下面结合具体实施方式并参照附图,对本发明进一步详细说明。应该理解,这些描述只是示例性的,而并非要限制本发明的范围。此外,在以下说明中,省略了对公知结构和技术的描述,以避免不必要地混淆本发明的概念。
需要说明的是:定码率,亦称固定码率(Constant Bit Rate,简称CBR),是一个用来形容通信服务质量的术语,是指视频编码码流在编码过程中,始终接近目标码率。对于视频编码来说,CBR编码指的是编码器每秒钟的输出码数据量(或者解码器的输入码率)应该是固定值(常数)。一般来说,编码器检测每一帧图像的复杂程度,然后计算出码率。如果码率过小,就填充无用数据,使之与指定码率保持一致;如果码率过大,就适当降低码率,也使之与指定码率保持一致。因此,固定码率模式的编码效率比较低。在快速运动画面部分,由于画面细节较多,通常需要更多的比特来进行描述,而该固定码率模式的编码方式在编码时强行降低码率,这样就导致部分画面的细节信息丢失,从而出现视频画面模糊、不清晰等现象。对于音频压缩来说,比如MP3,比特率用来表示每秒钟的音频数据占用了多少个比特,比特率的值越高,音质就越好。
定码率无论对于音频编码还是视频编码,其优点是压缩快,能被大多数软件和设备支持,尤其是在一个带宽受限的信道中进行多媒体通讯时,固定码率的编码方式是非常有利的,因为此时受限的是最高码率,固定码率可以更好的利用这样的信道。但是,固定码率不适合进行存储,因为固定码率没 有足够的码率对复杂的视频内容部分进行编码,从而导致质量下降,而固定码率在对简单的视频内容部分进行编码时,会浪费一些码率。
变码率,亦称为可变码率(Variable Bit Rate,简称VBR)是另一个用来形容通信服务质量的术语,视频编码码流在编码过程中,可变码率能够随着视频图像的复杂程度的不同而变化,因此其编码效率比较高。VBR编码指的是编码器的输出码率(或者解码器的输入码率)可以根据编码器的输入源信号的复杂度自适应的调整,目的是保持输出质量保持不变而不是保持输出码率保持不变。VBR适用于存储,可以更好的利用有限的存储空间:用比较多的码字对复杂度高的段进行编码,用比较少的码字对复杂度低的段进行编码。
图1是本发明的视频码率控制方法的流程示意图。
如图1所示,本发明的视频码率控制方法,用于对周期时段内的视频码流进行码率控制,其包括:
步骤S1,根据预设的第一码率值,以及前一时段产生的编码大小,生成第一量化参数。
本步骤中,用户预先设置第一码率值,根据所述第一码率值和前一时段产生的编码大小,生成第一量化参数并实时输出所述第一量化参数。
本发明中,所述第一码率值是预先确定的目标平均码率值,其在每个所述周期时段内是固定值。具体来说,目标平均码率值是编码码流经过长时间的调整所达到的平均码率,即长时间统计下的平均码率,可以认为在每个周期时段内是一个固定值。目标平均码率由视频存储周期和存储容量决定。
步骤S2,根据预设的第二码率值,以及前一时段产生的编码大小,生成第二量化参数。
本步骤中,用户预先设置第二码率值,根据所述第二码率值和前一时段(与步骤S1中的前一时段相对应)产生的编码大小,生成第二量化参数并实时输出所述第二量化参数。
本发明中,所述第二码率值是预先确定的码率上限值。码率上限值是编码码流瞬时统计的上限码率,码率上限值对应于用户传输带宽限制下的码率。
这里,步骤S1和步骤S2的执行顺序不唯一,可以先后执行或同时执行。
步骤S3,比较第一量化参数和第二量化参数。
本步骤中,比较所述第一量化参数和第二量化参数的大小,从中选择较大的量化系数对当前时段的图像帧进行编码。
本发明中,所述未量化的图像帧,是指尚未使用量化参数进行编码的图像帧。
步骤S4,若第一量化参数大于等于第二量化参数,则使用第一量化参数对图像帧进行编码。
步骤S5,若第一量化参数小于第二量化参数,则使用第二量化参数对图像帧进行编码。
具体的,根据比较结果选择较大的量化系数对当前时段中未量化的图像帧进行编码。若第一量化参数大于等于第二量化参数,则使用第一量化参数对图像帧进行编码。否则,使用第二量化参数对图像帧进行编码。
图2是本发明一实施方式中对第一码率值进行码率控制的流程示意图。
如图2所示,在一实施方式中,前述所述根据预设的第一码率值,以及前一时段产生的编码大小,生成第一量化参数的步骤,进一步包括:
步骤S10,将所述周期时段划分为N个分时段,N>1。
本步骤中,在对第一码率值进行码率控制前,首先将第一码率值对应的当前时段进行划分,划分为至少2个分时段。假设,第一码率值对应的当前时段为24小时,可以将该24小时划分为6个分时段或8个分时段等等,参见图3所示,图3是本发明对周期时段进行划分的参考示意图。
本发明中,所述周期时段为自然周期时段,例如一天、一周等等。
步骤S11,对每个所述分时段进行初始分配,以得到每个分时段的第一平均码率,使得所述第一平均码率满足下式:
Figure PCTCN2015086688-appb-000005
本步骤中,对每个分时段(即N个分时段)进行初始分配,进一步得到每个分时段的第一平均码率,共得到N个分时段的第一平均码率:第1分时段的第一平均码率、第2分时段的第一平均码率、……、第N分时段的第一平均码率,并且使得所述N个分时段的第一平均码率满足上式,即要求所有时段中第一平均码率的总和,除以N后的结果等于第一码率值。
步骤S12,对所述每个分时段的第一平均码率进行码率调整,以得到每个分时段的第二平均码率,使得所述第二平均码率满足下式:
Figure PCTCN2015086688-appb-000006
本步骤中,对所述每个分时段的第一平均码率(即N个分时段的第一平均码率)进行码率调整,以得到每个分时段的第二平均码率,共得到N个分时段的第二平均码率:第1分时段的第二平均码率、第2分时段的第二平均码率、……、第N分时段的第二平均码率,并且使得所述N个分时段的第二平均码率满足上式,即要求调整后得到的所有时段中第二平均码率的总和,除以N后的结果同样等于第一码率值。
本发明中,所述对每个分时段进行初始分配的步骤包括:根据预设的先验信息,对每个所述分时段进行初始分配;或将每个所述分时段的第一平均码率分配为与所述第一码率值相同。具体来说,码率分配方法因所处的阶段不同而采用不同的码率分配方式。初始分配(即初始码率分配)包括:根据预设的先验信息对每个所述分时段进行初始分配;或者将每个所述分时段的第一平均码率分配为与所述第一码率值相同。
举例来说,假设第一码率值为48kbps,第一码率值所对应的周期时段为24小时。若将24小时划分为6个时段,则对所述6个分时段进行初始分配,若根据先验信息进行初始分配,则第1分时段的第一平均码率、……、第6分时段的第一平均码率可能为6kbps、10kbps、13kbps、9kbps、7kbps、3kbps或4kbps、8kbps、12kbps、12kbps、8kbps、4kbps。若根据第二种初始分配方式,即将将第一码率值48kbps平均分配给6个分时段,则第1分时段的第一平均码率、……、第6分时段的第一平均码率分别为8、……、8。
本发明中,所述对每个分时段的第一平均码率进行码率分配的步骤包括:在每个分时段结束后,根据每个分时段的差值执行码率分配;和/或在全部N个分时段结束后,根据所有分时段的差值执行码率分配。具体来说,可选的,可以只执行根据每个分时段的差值执行码率分配的步骤,也可以只执行根据所有分时段的差值执行码率分配的步骤,或者同时执行前述两种码率分配方法。
图4是本发明一可选实施方式中根据每个分时段的差值执行码率分配的流程示意图。
如图4所示,在一可选实施方式中,所述根据每个分时段的差值执行码率分配步骤,进一步包括:
步骤S20,获取前一时段的对应分时段中实际产生的平均码率,以作为第三平均码率。
例如,在当前时段的第1分时段结束之后对第一平均码率进行码率时,获取前一时段的第1分时段中实际产生的平均码率,作为第三平均码率。
步骤S21,计算每个分时段的第二平均码率与该分时段对应的第三平均码率的差值。
承接上述例子,计算第1分时段的第二平均码率与前一时段的第1分时段中实际产生的平均码率的差值。
步骤S22,在每个分时段结束后,根据每个分时段的所述差值执行码率调整。
承接上述例子,在当前时段的第1分时段结束时,根据计算出的差值执行码率调整,依次对所有的分时段(即N个分时段)进行差值计算并执行码率调整。
图5是本发明一实施方式中在每个分时段结束后,根据每个分时段的差值执行码率调整的流程示意图。
如图5所示,在一实施方式中,所述在每个分时段结束后,根据每个分时段的差值执行码率调整的步骤,进一步包括:
步骤S30,将当前分时段的差值除以N得到第一差值平均值。
具体的,若第1分时段产生的差值为1kbps,则将第1分时段的差值1kbps除以6(承接上述例子,假设N为6),得到第一差值平均值,即1/6。若第2 分时段产生的差值为-1kbps,则得到第一差值平均值为-1/6。
步骤S31,将所述第一差值平均值叠加到该分时段后N个分时段中每个分时段的第二平均码率上。
承接上述例子,将第一差值平均值(即1/6)叠加到第1分时段后的N个分时段(即第2分时段至第N+1分时段)中每个分时段的第二平均码率上。同样的,将第2分时段的第一差值平均值(即-1/6)叠加到第2分时段后的N个分时段(即第3分时段至第N+2分时段)中每个分时段的第二平均码率上。若第三分时段产生的差值为0kbps,则不需要将该差值进行分配。
本实施方式中,将第一差值平均值叠加到该分时段后N个分时段中每个分时段的第二平均码率上,其的目的是将差值的影响平坦到一天来消化。
图6是本发明另一可选实施方式中根据所有分时段的差值执行码率调整的流程示意图。
如图6所示,在一可选实施方式中,所述根据所有分时段的差值执行码率调整步骤,进一步包括:
步骤S40,对差值为正值的每个正差值分时段,将其差值的至少一部分放入到节约池。
本步骤中,在全部N个分时段结束后,计算N个分时段的第二平均码率与对应分时段中实际产生的平均码率的差值,对差值为正值的每个正差值分时段,将其差值的至少一部分放入到节约池。
本发明中,所述至少一部分可以是1/2,或2/5等,或其他值,最高是差值的全部。
步骤S41,对差值为负值的每个负差值分时段,将节约池的总码率值分 配给每个负差值分时段。
本步骤中,对差值为负值的每个负差值分时段,将节约池的总码率值分配给当前时段中每个负差值分时段。
图7是本发明一实施方式中将差值放入节约池的流程示意图。
如图7所示,在一实施方式中,所述将差值的至少一部分放入到节约池的步骤,进一步包括:
步骤S50,将正差值分时段的第二平均码率进行再分配,使所述正差值分时段的第二平均码率减少该差值的至少一部分。
具体的,将所有分时段的第二平均码率进行再分配,即在所有分时段的第二平均码率的基础上减少该差值的至少一部分。
步骤S51,将节约池的当前值增加所述差值的至少一部分。
具体的,将节约池的当前值(即节约池的当前码率值)增加码率所述差值的至少一部分。
本发明中,所述将节约池的总码率值分配给每个负差值分时段的步骤包括:将节约池的总码率值平均分配给每个负差值分时段;或按照差值比例,将节约池的总码率值分配给每个负差值分时段。
图8是本发明一可选实施方式中对节约池的总码率值进行平均分配的流程示意图。
如图8所示,在一可选实施方式中,将节约池的总码率值平均分配给每个负差值分时段的步骤,进一步包括:
步骤S60,将节约池的总码率值除以负差值分时段的个数,以得到第二差值平均值。
步骤S61,将该第二差值平均值叠加到每个负差值分时段的第二平均码率上。
假设节约池的总码率值为6,A、B、C三个负差值分时段的差值为-1,-2,-3;平均分配的含义是:6除以3得第二平均码率值2,将2分别叠加到-1,-2,-3上。
图9是本发明的另一可选实施方式中按照差值比例对节约池的总码率值进行分配的流程示意图。
如图9所示,所述按照差值比例,将节约池的总码率值分配给每个负差值分时段的步骤,进一步包括:
步骤S70,计算每个负差值分时段的差值占所有负差值分时段的总差值的差值比例。
步骤S71,将节约池的总码率值乘以每个负差值分时段的差值比例,以得到每个负差值分时段的节约码率分配值。
步骤S72,将各个节约码率分配值分别叠加到其对应分时段的第二平均码率上。
假设节约池的总码率值为6,A、B、C三个负差值分时段的差值为-1,-2,-3;按差值比例分配的含义是:A、B、C的差值比例为1/6,2/6,3/6;总码率值6分别乘以上述3个比值得到每个分时段的节约码率分配值1、2、3;将1、2、3分别叠加到-1,-2,-3上。
在一可选实施方式中,在所述计算得到第二量化参数的步骤之前,还包括:当未检测到传输带宽限制条件时,停止执行所述使用第二量化参数对图像帧进行编码的步骤。
具体来说,在计算第二量化参数前,首先检测传输带宽是否受限制;若没有检测到传输带宽受限时,即说明传输带宽不受限制,则停止执行使用第二量化参数对图像帧进行编码的步骤,仅使用第一量化参数对图像帧进行编码即可。若检测到传输带宽限制条件时,则说明传输带宽受限,则同时执行使用第一量化参数对图像帧进行编码的步骤和使用第二量化参数对图像帧进行编码的步骤。
如上所述,详细介绍了本发明的视频码率控制方法,将长时间(如24小时)进行划分,并对第一码率值(即目标平均码率)进行初始分配得到第一平均码率,再对第一平均码率进行码率调整得到第二平均码率,每个分时段的码率反映了该分时段的场景复杂度,使得每个分时段的码率(即第二平均码率)在逼近第一码率值(即目标平均码率)的同时,能够最大程度的保证视频质量的稳定性。另外,基于存储容量(基于目标平均码率的码率控制方法)和基于传输带宽(基于码率上限的码率控制方法)协同的视频码率控制方法,解决了现有定码率和变码率控制方法只能选择其中一种码率控制的问题,使得两者有机的结合在一起。
图10是本发明的视频码率控制装置的结构示意图。
如图10所示,本发明的视频码率控制装置,用于通过对周期时段内的视频码流进行码率控制以进行视频编码,其包括:图像传感器、第一码率控制器1、第二码率控制器2和编码器3。
图像传感器1,用于获取图像信息并产生视频码流,输出给第一码率控制器和第二码率控制器。
第一码率控制器2与所述图像传感器1连接,用于根据预设的第一码率 值生成第一量化参数并输出给编码器。
第二码率控制器3与所述图像传感器1连接,用于根据预设的第二码率值生成第二量化参数并输出给编码器。
编码器4与所述第一码率控制器2和第二码率控制器3连接,用于根据所述第一量化参数和第二量化参数中的较大值对当前时段的图像帧进行编码。
在一实施方式中,所述第一码率控制器2还用于从编码器4接收前一时段产生的编码大小,并根据所述第一码率值和前一时段的编码大小计算得到第一量化参数。
所述第二码率控制器3还用于从编码器4接收前一时段产生的编码大小,并根据所述第二码率值和前一时段的编码大小计算得到第二量化参数。
图11是本发明的第一码率控制器的结构示意图。
如图11所示,所述第一码率控制器2将所述周期时段划分为N个分时段,N>1,其进一步包括码率初始分配单元21和码率调整单元22。
码率初始分配单元21用于对每个所述分时段进行初始分配,以得到每个分时段的第一平均码率,使得所述第一平均码率满足下式:
Figure PCTCN2015086688-appb-000007
码率调整单元22与所述码率初始分配单元21连接,用于对所述每个分时段的第一平均码率进行码率调整,以得到每个分时段的第二平均码率,使得所述第二平均码率满足下式:
Figure PCTCN2015086688-appb-000008
在一实施方式中,所述第一码率控制器2还包括码率获取单元23,与所述码率调整单元22连接,用于获取前一时段的对应分时段中实际产生的平 均码率,以作为第三平均码率;
所述码率调整单元22还包括差值计算单元22-3,与码率获取单元23连接,其用于计算每个分时段的第二平均码率与该分时段对应的第三平均码率的差值。
图12是本发明的码率初始分配单元和码率调整单元的结构示意图。
如图12所示,所述码率初始分配单元21包括第一初始分配单元21-1和/或第二初始分配单元21-2。
第一初始分配单元21-1用于根据预设的先验信息,对每个所述分时段的平均码率进行初始分配。
第二初始分配单元21-2将每个所述分时段的第一平均码率分配为与所述第一码率值相同。
如图12所示,所述码率调整单元22包括第一调整子单元22-1和/或第二调整子单元22-2。
第一调整子单元22-1,用于在每个分时段结束后,根据每个分时段的所述差值执行码率分配。
具体的,第一调整子单元22-1通过下述方式执行码率分配:将当前分时段的差值除以N得到第一差值平均值;将所述第一差值平均值叠加到该分时段后N个分时段中每个分时段的第二平均码率上。
第二调整子单元22-2,用于在全部N个分时段结束后,根据所有分时段的差值执行码率分配。
图13是本发明的第二调整子单元的结构示意图。
如图13所示,所述第二调整子单元22-2还包括存储器201、第一差值 分配单元202。
存储器201,用于存储节约的码率值。
第一差值分配单元202与所述差值计算单元22-3和存储器201连接,用于对码率调整单元22中计算出的差值为正值的每个正差值分时段,将其差值的至少一部分存储到存储器201中。
所述第二调整子单元22-2,对差值为负值的每个负差值分时段,将存储器201中总的节约码率值分配给每个负差值分时段。
具体的,所述第二调整子单元22-2将正差值分时段的第二平均码率进行再分配,使所述正差值分时段的第二平均码率减少该差值的至少一部分;所述第一差值分配单元202将存储器201的当前值增加所述差值的至少一部分。
具体的,所述第二调整子单元22-2通过下述方式将存储器201中总的节约码率值分配给每个负差值分时段:将节约池的总码率值除以负差值分时段的个数,以得到第二差值平均值;将该第二差值平均值叠加到每个负差值分时段的第二平均码率上。
具体的,所述第二调整子单元22-2还包括第二差值分配单元203,其用于计算每个负差值分时段的差值占所有负差值分时段的总差值的差值比例,将存储器201中总的节约码率值乘以每个负差值分时段的差值比例,以得到每个负差值分时段的节约码率分配值;所述第二调整子单元22-2将各个节约码率分配值分别叠加到其对应分时段的第二平均码率上。
在本发明中,所述第一码率值是预先确定的目标平均码率,其在每个所述周期时段内是固定值。所述第二码率值是预先确定的码率上限值。
本发明中,所述装置还包括带宽检测单元6,当未检测到传输带宽限制 条件时,使编码器4停止使用所述第二量化参数进行编码。
如上所述,详细介绍了本发明的视频码率控制装置,将长时间(如24小时)进行划分,并对第一码率值(即目标平均码率)进行初始分配得到第一平均码率,再对第一平均码率进行码率调整得到第二平均码率,每个分时段的码率反映了该分时段的场景复杂度,使得每个分时段的码率(即第二平均码率)在逼近第一码率值(即目标平均码率)的同时,能够最大程度的保证视频质量的稳定性。另外,基于存储容量(基于目标平均码率的码率控制方法))和基于传输带宽(基于码率上限的码率控制方法))协同的视频码率控制方法,解决了现有定码率和变码率控制方法只能选择其中一种码率控制的问题,使得两者有机的结合在一起。
如上所述,本发明提供了一种码率控制方法和视频编码装置,通过本发明的技术方案,能够实现长时间(如24小时)的目标平均码率控制,并能够最大程度的保证视频质量的稳定性。
应当理解的是,本发明的上述具体实施方式仅仅用于示例性说明或解释本发明的原理,而不构成对本发明的限制。因此,在不偏离本发明的精神和范围的情况下所做的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。此外,本发明所附权利要求旨在涵盖落入所附权利要求范围和边界、或者这种范围和边界的等同形式内的全部变化和修改例。

Claims (25)

  1. 一种视频码率控制方法,用于对周期时段内的视频码流进行码率控制,其特征在于,所述方法包括:
    根据预设的第一码率值,以及前一时段产生的编码大小,生成第一量化参数;
    根据预设的第二码率值,以及前一时段产生的所述编码大小,生成第二量化参数;
    比较所述第一量化参数和所述第二量化参数;
    若所述第一量化参数大于等于所述第二量化参数,则使用所述第一量化参数对当前时段的图像帧进行编码;
    若所述第一量化参数小于所述第二量化参数,则使用所述第二量化参数对所述当前时段的图像帧进行编码。
  2. 根据权利要求1所述的方法,其特征在于,所述根据预设的第一码率值,以及前一时段产生的编码大小,生成第一量化参数包括:
    将所述周期时段划分为N个分时段,N>1;
    对每个所述分时段进行初始分配,以得到每个所述分时段的第一平均码率,使得所述第一平均码率满足下式:
    Figure PCTCN2015086688-appb-100001
    对每个分时段的第一平均码率进行码率调整,以得到所述每个分时段的第二平均码率,使得所述第二平均码率满足下式:
    Figure PCTCN2015086688-appb-100002
  3. 根据权利要求2所述的方法,其特征在于,所述初始分配的步骤包括:
    根据预设的先验信息,对每个所述分时段的平均码率进行初始分配;或
    将每个所述分时段的第一平均码率分配为与所述第一码率值相同。
  4. 根据权利要求2所述的方法,其特征在于,所述码率调整的步骤包括:
    获取前一时段的对应分时段中实际产生的平均码率,以作为第三平均码率;
    计算每个所述分时段的所述第二平均码率与该分时段对应的所述第三平均码率的差值;
    在每个所述分时段结束后,根据每个所述分时段的所述差值执行码率调整;和/或
    在全部N个分时段结束后,根据所有分时段的差值执行码率调整。
  5. 根据权利要求4所述的方法,其特征在于,在每个所述分时段结束后,所述根据每个所述分时段的差值执行码率调整的步骤包括:
    将当前分时段的差值除以N得到第一差值平均值;
    将所述第一差值平均值叠加到该分时段后N个分时段中每个所述分时段的所述第二平均码率上。
  6. 根据权利要求4所述的方法,其特征在于,在全部N个分时段结束后,所述根据所有分时段的差值执行码率分配的步骤包括:
    对差值为正值的每个正差值分时段,将其差值的至少一部分放入到节 约池;
    对差值为负值的每个负差值分时段,将所述节约池的总码率值分配给所述每个负差值分时段。
  7. 根据权利要求6所述的方法,其特征在于,所述将差值的至少一部分放入到节约池的步骤包括:
    将正差值分时段的所述第二平均码率进行再分配,使所述正差值分时段的所述第二平均码率减少该差值的至少一部分;
    将所述节约池的当前值增加所述差值的至少一部分。
  8. 根据权利要求6所述的方法,其特征在于,所述将节约池的总码率值分配给每个负差值分时段的步骤包括:
    将所述节约池的所述总码率值平均分配给所述每个负差值分时段;或
    按照差值比例,将所述节约池的所述总码率值分配给所述每个负差值分时段。
  9. 根据权利要求8所述的方法,其特征在于,所述将所述节约池的所述总码率值平均分配给所述每个负差值分时段的步骤包括:
    将所述节约池的所述总码率值除以负差值分时段的个数,以得到第二差值平均值;
    将该第二差值平均值叠加到所述每个负差值分时段的所述第二平均码率上。
  10. 根据权利要求8所述的方法,其特征在于,所述按照差值比例,将所述节约池的所述总码率值分配给所述每个负差值分时段的步骤包括:
    计算所述每个负差值分时段的差值占所有负差值分时段的总差值的 差值比例;
    将所述节约池的所述总码率值乘以所述每个负差值分时段的差值比例,以得到所述每个负差值分时段的节约码率分配值;
    将各个节约码率分配值分别叠加到其对应分时段的所述第二平均码率上。
  11. 根据权利要求1-10中任一项所述的方法,其特征在于,
    所述第一码率值是预先确定的目标平均码率,其在每个所述周期时段内是固定值;
    所述第二码率值是预先确定的码率上限值。
  12. 根据权利要求11所述的方法,其特征在于,在所述计算得到第二量化参数的步骤之前,还包括:
    当未检测到传输带宽限制条件时,停止执行所述使用所述第二量化参数对图像帧进行编码的步骤。
  13. 一种视频编码装置,用于通过对周期时段内的视频码流进行码率控制以进行视频编码,其包括:
    图像传感器(1),用于获取图像信息并产生视频码流,输出给第一码率控制器和第二码率控制器;
    所述第一码率控制器(2),用于根据预设的第一码率值生成第一量化参数并输出给编码器;
    所述第二码率控制器(3),用于根据预设的第二码率值生成第二量化参数并输出给所述编码器;
    所述编码器(4),用于根据所述第一量化参数和所述第二量化参数中 的较大值对当前时段的图像帧进行编码。
  14. 根据权利要求13所述的装置,其特征在于,
    所述第一码率控制器(2),还用于从所述编码器(4)接收前一时段产生的编码大小,并根据所述第一码率值和前一时段的编码大小计算得到所述第一量化参数;
    所述第二码率控制器(3),还用于从所述编码器(4)接收前一时段产生的编码大小,并根据所述第二码率值和前一时段的编码大小计算得到所述第二量化参数。
  15. 根据权利要求13所述的装置,其特征在于,所述第一码率控制器(2)将所述周期时段划分为N个分时段,N>1,其进一步包括:
    码率初始分配单元(21),用于对每个所述分时段进行初始分配,以得到每个所述分时段的第一平均码率,使得所述第一平均码率满足下式:
    Figure PCTCN2015086688-appb-100003
    码率调整单元(22),用于对所述每个分时段的所述第一平均码率进行码率调整,以得到所述每个分时段的第二平均码率,使得所述第二平均码率满足下式:
    Figure PCTCN2015086688-appb-100004
  16. 根据权利要求15所述的装置,其特征在于,所述码率初始分配单元(21)包括:
    第一初始分配单元(21-1),用于根据预设的先验信息,对每个所述分时段的平均码率进行初始分配;和/或
    第二初始分配单元(21-2),将每个所述分时段的所述第一平均码率 分配为与所述第一码率值相同。
  17. 根据权利要求15所述的装置,其特征在于,
    所述第一码率控制器(2)还包括码率获取单元(23),用于获取前一时段的对应分时段中实际产生的平均码率,以作为第三平均码率;
    所述码率调整单元(22)还包括差值计算单元(22-3),其用于计算每个所述分时段的所述第二平均码率与该分时段对应的所述第三平均码率的差值。
  18. 根据权利要求17所述的装置,其特征在于,所述码率调整单元(22)包括:
    第一调整子单元(22-1),用于在每个所述分时段结束后,根据每个所述分时段的所述差值执行码率分配;和/或
    第二调整子单元(22-2),用于在全部N个分时段结束后,根据所有分时段的差值执行码率分配。
  19. 根据权利要求18所述的装置,其特征在于,所述第一调整子单元(22-1)通过下述方式执行码率分配:
    将当前分时段的差值除以N得到第一差值平均值;
    将所述第一差值平均值叠加到该分时段后N个分时段中每个所述分时段的所述第二平均码率上。
  20. 根据权利要求18所述的装置,其特征在于,所述第二调整子单元(22-2)还包括:
    存储器(201),用于存储节约的码率值;
    第一差值分配单元(202),用于对差值为正值的每个正差值分时段, 将其差值的至少一部分存储到存储器(201)中;
    所述第二调整子单元(22-2)对差值为负值的每个负差值分时段,将所述存储器(201)中总的节约码率值分配给所述每个负差值分时段。
  21. 根据权利要求20所述的装置,其特征在于,
    所述第二调整子单元(22-2)将正差值分时段的所述第二平均码率进行再分配,使所述正差值分时段的所述第二平均码率减少该差值的至少一部分;
    所述第一差值分配单元(202)将所述存储器(201)的当前值增加所述差值的至少一部分。
  22. 根据权利要求20所述的装置,其特征在于,所述第二调整子单元(22-2)通过下述方式将存储器(201)中总的节约码率值分配给每个负差值分时段:
    将节约池的总码率值除以负差值分时段的个数,以得到第二差值平均值;
    将该第二差值平均值叠加到每个负差值分时段的所述第二平均码率上。
  23. 根据权利要求20所述的装置,其特征在于,
    所述第二调整子单元(22-2)还包括第二差值分配单元(203),其用于计算所述每个负差值分时段的差值占所有负差值分时段的总差值的差值比例,将所述存储器(201)中总的节约码率值乘以所述每个负差值分时段的差值比例,以得到每个负差值分时段的节约码率分配值;
    所述第二调整子单元(22-2)将各个节约码率分配值分别叠加到其对 应分时段的所述第二平均码率上。
  24. 根据权利要求13-20中任一项所述的装置,其特征在于,
    所述第一码率值是预先确定的目标平均码率,其在每个所述周期时段内是固定值;
    所述第二码率值是预先确定的码率上限值。
  25. 根据权利要求24所述的装置,其特征在于,所述装置还包括带宽检测单元(6),当未检测到传输带宽限制条件时,使所述编码器(4)停止使用所述第二量化参数进行编码。
PCT/CN2015/086688 2015-07-07 2015-08-11 一种视频码率控制方法及视频编码装置 WO2017004863A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
US15/742,385 US10542254B2 (en) 2015-07-07 2015-08-11 Video bit rate control method and video coding device
EP15897519.3A EP3322185B1 (en) 2015-07-07 2015-08-11 Video code rate control method and video encoding apparatus

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510401526.5A CN106331704B (zh) 2015-07-07 2015-07-07 一种视频码率控制方法及视频编码装置
CN201510401526.5 2015-07-07

Publications (1)

Publication Number Publication Date
WO2017004863A1 true WO2017004863A1 (zh) 2017-01-12

Family

ID=57684791

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/086688 WO2017004863A1 (zh) 2015-07-07 2015-08-11 一种视频码率控制方法及视频编码装置

Country Status (4)

Country Link
US (1) US10542254B2 (zh)
EP (1) EP3322185B1 (zh)
CN (1) CN106331704B (zh)
WO (1) WO2017004863A1 (zh)

Families Citing this family (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6613842B2 (ja) * 2015-11-24 2019-12-04 富士通株式会社 画像符号化装置、画像符号化方法、及び画像符号化プログラム
CN107846590B (zh) * 2016-09-19 2020-09-08 阿里巴巴集团控股有限公司 一种视频编码的方法和视频编码器
CN109218724B (zh) * 2017-07-06 2020-08-04 腾讯科技(深圳)有限公司 一种数据编码方法、装置及存储设备和终端设备
CN107205150B (zh) * 2017-07-14 2019-05-24 西安万像电子科技有限公司 编码方法及装置
CN107659819B (zh) * 2017-10-30 2019-10-25 网宿科技股份有限公司 一种视频转码的方法和装置
CN109155849B (zh) * 2017-12-18 2021-09-24 深圳市大疆创新科技有限公司 码率控制方法、码率控制装置和无线通信设备
CN109348244B (zh) * 2018-11-20 2021-05-18 浙江齐聚科技有限公司 视频编码参数的配置方法、装置、设备和存储介质
CN111279697A (zh) * 2019-01-25 2020-06-12 深圳市大疆创新科技有限公司 码率分配的方法与装置
CN110312150B (zh) * 2019-04-24 2022-04-05 网宿科技股份有限公司 一种视频帧传输方法、系统及服务器
EP3742728B1 (en) * 2019-05-24 2022-09-21 Axis AB A method and bitrate controller for controlling output bitrate of a video encoder
CN110324708A (zh) * 2019-07-16 2019-10-11 浙江大华技术股份有限公司 视频处理方法、终端设备及计算机存储介质
CN111432210B (zh) * 2020-04-30 2021-10-19 中山大学 一种基于填充的点云属性压缩方法
CN113473125B (zh) * 2021-06-25 2023-08-15 咪咕互动娱乐有限公司 码率控制方法、设备、存储介质及产品
CN118214887A (zh) * 2024-05-20 2024-06-18 浙江大华技术股份有限公司 视频编码方法

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030152151A1 (en) * 2002-02-14 2003-08-14 Chao-Ho Hsieh Rate control method for real-time video communication by using a dynamic rate table
CN101127909A (zh) * 2007-09-29 2008-02-20 华为技术有限公司 一种图像码率控制方法及装置
CN101202912A (zh) * 2007-11-30 2008-06-18 上海广电(集团)有限公司中央研究院 一种平衡码率和图像质量的码率控制方法
CN102104778A (zh) * 2009-12-17 2011-06-22 北京三星通信技术研究有限公司 一种图像编码中码率控制的方法和装置
CN104159109A (zh) * 2014-05-28 2014-11-19 百视通网络电视技术发展有限责任公司 基于vbr视频编码的码率控制方法及系统

Family Cites Families (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5623424A (en) * 1995-05-08 1997-04-22 Kabushiki Kaisha Toshiba Rate-controlled digital video editing method and system which controls bit allocation of a video encoder by varying quantization levels
WO1999049664A1 (en) * 1998-03-20 1999-09-30 Sgs-Thomson Microelectronics Asia Pacific (Pte) Ltd. Moving pictures encoding with constant overall bit rate
US7856149B2 (en) * 2002-07-29 2010-12-21 Qualcomm Incorporated Digital image encoding
US20070160127A1 (en) * 2006-01-10 2007-07-12 International Business Machines Corporation Bandwidth adaptive stream selection
CN101222296B (zh) * 2008-01-31 2010-06-09 上海交通大学 上行蜂窝视频通信中自适应的传输方法及系统
EP2286595A1 (en) * 2008-06-16 2011-02-23 Dolby Laboratories Licensing Corporation Rate control model adaptation based on slice dependencies for video coding
IT1398196B1 (it) * 2009-06-25 2013-02-14 St Microelectronics Srl Controllore dinamico della velocita' di trasmissione indipendente dal gruppo di immagini
US8948241B2 (en) * 2009-08-07 2015-02-03 Qualcomm Incorporated Signaling characteristics of an MVC operation point
US8644383B2 (en) * 2011-03-10 2014-02-04 Microsoft Corporation Mean absolute difference prediction for video encoding rate control
EP2544450B1 (en) * 2011-07-07 2016-04-13 Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V. Model parameter estimation for a rate- or distortion-quantization model function
US20130142249A1 (en) * 2011-12-06 2013-06-06 Advanced Micro Devices, Inc. Method and apparatus for performing video and image compression using a video encoder
JP6037630B2 (ja) * 2012-03-16 2016-12-07 三菱電機株式会社 再生装置並びに再生装置の制御方法及び制御プログラム
CN102625106B (zh) * 2012-03-28 2014-08-27 上海交通大学 场景自适应的屏幕编码码率控制方法及其系统
CN104469367B (zh) * 2014-12-16 2017-11-14 北京金山云网络技术有限公司 基于丢帧和量化参数调整的视频码率控制方法

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030152151A1 (en) * 2002-02-14 2003-08-14 Chao-Ho Hsieh Rate control method for real-time video communication by using a dynamic rate table
CN101127909A (zh) * 2007-09-29 2008-02-20 华为技术有限公司 一种图像码率控制方法及装置
CN101202912A (zh) * 2007-11-30 2008-06-18 上海广电(集团)有限公司中央研究院 一种平衡码率和图像质量的码率控制方法
CN102104778A (zh) * 2009-12-17 2011-06-22 北京三星通信技术研究有限公司 一种图像编码中码率控制的方法和装置
CN104159109A (zh) * 2014-05-28 2014-11-19 百视通网络电视技术发展有限责任公司 基于vbr视频编码的码率控制方法及系统

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP3322185A4 *

Also Published As

Publication number Publication date
EP3322185A1 (en) 2018-05-16
EP3322185B1 (en) 2021-09-29
CN106331704B (zh) 2019-10-22
EP3322185A4 (en) 2019-01-02
US10542254B2 (en) 2020-01-21
CN106331704A (zh) 2017-01-11
US20180192049A1 (en) 2018-07-05

Similar Documents

Publication Publication Date Title
WO2017004863A1 (zh) 一种视频码率控制方法及视频编码装置
WO2018113191A1 (zh) 一种码率控制方法及装置
CN109413427B (zh) 一种视频帧编码方法及终端
CN106576081B (zh) 视频电话中由接收器驱动的向上切换
CN107846590B (zh) 一种视频编码的方法和视频编码器
US8135061B1 (en) Variable bit rate encoding
US20110243223A1 (en) Multiplexed video streaming
US8996713B2 (en) Video streaming
US8483272B2 (en) System and method for frame level bit rate control without pre-analysis
CN107920041B (zh) 一种直播视频数据编码比特率的调整方法和装置
EP3014445A1 (en) Allocating resources of a processor executing multiple media data processing components having a configurable complexity
US9167256B2 (en) Method and apparatus for encoding
US10205943B2 (en) Bitrate distribution
CN102724502B (zh) 一种视频编码中码率的控制方法及装置
CN102695058B (zh) 基于大尺度缓冲策略的音、视频编码流控方法
CN108124155B (zh) 一种码率控制方法、装置及电子设备
JP2009171339A (ja) 動画像符号化装置、方法及びプログラム
JP4579379B2 (ja) 制御装置及び制御方法
US10893308B2 (en) Hybrid statistical multiplexer
JP2012090039A (ja) データ多重化装置及びデータ多重化方法
JP2004040739A (ja) ハイポセティカルレファレンスデコーダモデルのための適切なビットストリーム制約条件の選択方法
Lee et al. Adaptive Streaming Scheme for Improving Quality of Virtualization Service

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: 15897519

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

WWE Wipo information: entry into national phase

Ref document number: 2015897519

Country of ref document: EP