GB2432985A - Encoder control system based on a target encoding value - Google Patents

Encoder control system based on a target encoding value Download PDF

Info

Publication number
GB2432985A
GB2432985A GB0524663A GB0524663A GB2432985A GB 2432985 A GB2432985 A GB 2432985A GB 0524663 A GB0524663 A GB 0524663A GB 0524663 A GB0524663 A GB 0524663A GB 2432985 A GB2432985 A GB 2432985A
Authority
GB
United Kingdom
Prior art keywords
coding unit
encoding
complexity
time
target
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
GB0524663A
Other versions
GB0524663D0 (en
Inventor
Chaminda Sampath Kannangara
Iain Richardson
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Robert Gordon University
Original Assignee
Robert Gordon University
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 Robert Gordon University filed Critical Robert Gordon University
Priority to GB0524663A priority Critical patent/GB2432985A/en
Publication of GB0524663D0 publication Critical patent/GB0524663D0/en
Priority to PCT/GB2006/004551 priority patent/WO2007066101A2/en
Publication of GB2432985A publication Critical patent/GB2432985A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/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/132Sampling, masking or truncation of coding units, e.g. adaptive resampling, frame skipping, frame interpolation or high-frequency transform coefficient masking
    • 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/136Incoming video signal characteristics or properties
    • H04N19/14Coding unit complexity, e.g. amount of activity or edge presence estimation
    • 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
    • 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/152Data rate or code amount at the encoder output by measuring the fullness of 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/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/156Availability of hardware or computational resources, e.g. encoding based on power-saving criteria
    • 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/172Methods 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 picture, frame or field
    • 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/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/19Methods 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 using optimisation based on Lagrange multipliers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/46Embedding additional information in the video signal during the compression process
    • H04N19/463Embedding additional information in the video signal during the compression process by compressing encoding parameters before transmission

Abstract

An encoder control system is provided to manage an encoder of a stream of video coding units. The encoder control system incorporates an encoding complexity function to enable variance of the complexity at which video coding units are encoded. The system comprises a complexity controller and, on the basis of an encoding target value, generates an encoding complexity value for input to the encoding complexity function that alters the complexity required to encode the video coding unit being encoded at that time and, thereby, the length of time the encoder takes to encode that video coding unit. The encoding target may be based on a target coding time, a target number of coded macroblocks, a target number of processor instructions or any other value affecting coding complexity. The complexity value of a coding unit may be based on a previous complexity value and a weighted current complexity value.

Description

<p>1 Encoder control system 3 The present invention relates to an encoder
control 4 system and particularly, but not exclusively, to an encoder control system for use in video streaming 6 systems.</p>
<p>8 When a real-time video encoder has insufficient 9 processing resources to maintain a particular frame</p>
<p>or field rate, the conventional approach is to</p>
<p>11 reduce the rate (drop frames or fields) . This can 12 lead to "jerky" video with poor reproduction of 13 movement.</p>
<p>Furthermore, battery powered devices have a finite 16 power which is dependent on the resources required 17 by the device. High processor usage requires 18 significant power levels and reduces the time 19 between battery charges.</p>
<p>21 Prior art systems, such as the one disclosed in</p>
<p>22 International Patent application number W004056125, 1 disclose methods of reducing the amount of 2 processing required. For example, the method of 3 W004056125 predicts which macroblocks in a frame or 4 field can be skipped prior to the computationally expensive step of motion estimation.</p>
<p>7 According to a first aspect of the present invention 8 there is provided an encoder control system for 9 controlling an encoder for encoding a stream of video coding units in accordance with an encoding 11 complexity function, the system comprising a 12 complexity controller, wherein the complexity 13 controller, on the basis of an encoding target 14 value, generates an encoding complexity value for input to the encoding complexity function that 16 alters the complexity required to encode the video 17 coding unit being encoded at that time and, thereby, 18 the length of time the encoder takes to encode that 19 video coding unit.</p>
<p>21 A video coding unit may be a complete video frame, 22 one or more interlaced fields, one or more slices or 23 a subset of one or more of these. Any derivation of 24 a video sequence which may require compression can be defined as a video coding unit or coding unit.</p>
<p>27 Preferably, an encoding complexity value is modified 28 for each video coding unit. The encoding complexity 29 value k may be a multiplier associated with Lagrangian optimisation.</p>
<p>1 Preferably, the encoding target value comprises a 2 coding unit target encoding time. The encoding 3 target value may alternatively be a target number of 4 coded macroblocks in each video coding unit, a target number of processor instructions or other 6 values which may affect the complexity required to 7 encode the video coding unit.</p>
<p>9 Preferably, the current encoding complexity value is a previous encoding complexity value added to an 11 encoding complexity weighting value, that is: 13 where k is the encoding complexity value, n is the 14 current coding unit and 82 is the encoding complexity weighting value.</p>
<p>17 Preferably, the system further comprises a coding 18 unit encoding time calculation means which 19 determines a coding unit encoding time, representing the length of time to encode a previous coding unit.</p>
<p>22 Preferably, the encoding complexity weighting value 23 is determined by a ratio of the change in encoding 24 complexity weighting value from a previous coding unit and the resultant change in the coding unit 26 encoding time.</p>
<p>28 Preferably, the encoding complexity weighting value 29 is: CTnI I 1 where 82is the encoding complexity weighting value, 2 n denotes the current coding unit and T is the 3 target coding unit encoding time.</p>
<p>Preferably, the encoding complexity value is limited 6 to avoid the reduction of complexity below a 7 predetermined level and, as such, limiting the 8 maximum distortion of the encoded coding unit.</p>
<p>Preferably, the system further comprises a buffer 11 having a buffer capacity and a buffer level 12 controller, wherein the buffer stores coding units 13 to be processed and the buffer level controller 14 monitors the buffer capacity, determines a buffer level, and determines the target coding unit 16 encoding time on the basis of the buffer level, the 17 coding unit encoding time and a predetermined target 18 coding unit rate.</p>
<p>Preferably, the target coding unit encoding time is 21 calculated as follows: 22 T'7 T i-th. IT, J T11uff 11 I, 23 where T' is the target coding unit encoding time, Tf 24 is the target coding unit interval, T is the time at the start of encoding the current coding unit, T 26 is the time that the last coding unit entered the 27 buffer, B is the buffer capacity and Buff is the 28 buffer level at the time of calculation.</p>
<p>1 Preferably, when the buffer level is zero, the 2 target coding unit encoding time is equal to the 3 target coding unit interval.</p>
<p>Preferably, where the target coding unit encoding 6 time is less than a predetermined minimum coding 7 unit encoding time, the buffer level controller 8 flushes the current coding unit from the buffer.</p>
<p>Preferably, the coding unit is a whole or subset of 11 one or more of the following: a video frame; an</p>
<p>12 interlaced field; or a slice.</p>
<p>14 According to a second aspect of the present invention there is provided a method of controlling 16 an encoder for encoding a stream of video coding 17 units in accordance with an encoding complexity 18 function, the method comprising the step of 19 generating an encoding complexity value for input to the encoding complexity function, on the basis of an 21 encoding target value, altering the complexity 22 required to encode the video coding unit being 23 encoded at that time and, thereby, the length of 24 time the encoder takes to encode that video coding unit.</p>
<p>27 Preferably, the step of modifying an encoding 28 complexity value is completed for each coding unit.</p>
<p>Preferably, the encoding target value comprises a 31 coding unit target encoding time. The encoding 32 target value may alternatively be a target number of 1 coded macroblocks in each video coding unit, a 2 target number of processor instructions or other 3 values which may affect the complexity required to 4 encode the video coding unit.</p>
<p>6 Preferably, the current encoding complexity value 7 is a previous coding unit's encoding complexity 8 value added to an encoding complexity weighting 9 value, that is: 11 where 2 is the encoding complexity value, n is the 12 current coding unit and & is the encoding 13 complexity weighting value.</p>
<p>Preferably, the method further comprises the step of 16 calculating a coding unit encoding time, 17 representing the length of time to encode a previous 18 coding unit.</p>
<p>Preferably, the encoding complexity weighting value 21 is determined by a ratio of the change in encoding 22 complexity weighting value from a previous coding 23 unit and the resultant change in the coding unit 24 encoding time.</p>
<p>26 Preferably, the encoding complexity weighting value 27 is: (II 28 T12h(T1d Cr I 1 where &%is the encoding complexity weighting value, 2 n denotes the current coding unit and T is the 3 target coding unit encoding time.</p>
<p>Preferably, the encoding complexity value is limited 6 to avoid the reduction of complexity below a 7 predetermined level and, as such, limiting the 8 maximum distortion of the encoded coding unit.</p>
<p>Preferably, the method further comprises the steps 11 of storing one or more coding units to be encoded in 12 a buffer having a buffer capacity and controlling 13 the amount of coding units stored by monitoring the 14 number of coding units stored, determining a buffer level, and determining the target coding unit 16 encoding time on the basis of the number of coding 17 units stored, the coding unit encoding time and a 18 predetermined target coding unit rate.</p>
<p>Preferably, calculating the target coding unit 21 encoding time as follows: 22 T"T1 C--i& u1JTjuffC1, 23 where T' is the target coding unit encoding time, Tf 24 is the target coding unit interval, T is the time at the start of encoding the current coding unit, T1 26 is the time that the last coding unit entered the 27 buffer, B is the buffer total capacity and Buff is 28 the buffer level.</p>
<p>1 Preferably, when the number of coding units stored 2 is zero, the target coding unit encoding time is 3 equal to the target coding unit interval.</p>
<p>Preferably, where the target coding unit encoding 6 time is less than a predetermined minimum coding 7 unit encoding time, the method performs the step of 8 flushing the current coding unit from the buffer.</p>
<p>Preferably, the coding unit is a whole or subset of 11 one or more of the following: a video frame; an</p>
<p>12 interlaced field; or a slice.</p>
<p>14 According to a third aspect of the present invention there is provided a device comprising a processor 16 and an encoder control system according to the first 17 aspect of the present invention.</p>
<p>19 Preferably, the device can alter the target coding unit encoding time to reduce the processor usage.</p>
<p>22 Optionally, the device is a battery powered device 23 and the processor usage is reduced to conserve 24 battery life.</p>
<p>26 Processor usage within the device may be restricted, 27 for example, due to other processes requiring to be 28 serviced by the processor and/or limited battery 29 power in mobile devices.</p>
<p>1 Embodiments of the present invention will now be 2 described, by way of example only, with reference to 3 the accompanying drawings, in which; Fig. 1 illustrates a device incorporating an encoder 6 control system according to the present invention; 8 Fig. 2 illustrates a table comparing video frame 9 rate and peak signal to noise ratio (PSNR) for a</p>
<p>prior art encoder and an encoder managed by an</p>
<p>11 encoder control system of the present invention; 13 Fig. 3 illustrates a graph of a degradation category 14 rating test comparing an encoder managed by an encoder control system of the present invention and 16 a standard encoder without management at various 17 levels of complexity and the same quantizer 18 parameter (QP) level; Fig. 4 illustrates a graph of a degradation category 21 rating test comparing an encoder managed by an 22 encoder control system of the present invention and 23 a standard encoder without management at various 24 levels of complexity and the same bit rate; and 26 Fig. 5 illustrates a graph of a pair comparison test 27 comparing an encoder managed by an encoder control 28 system of the present invention and a standard 29 encoder without management at the same levels of complexity and the same bit rate.</p>
<p>1 The present invention enables an acceptable video 2 coding unit rate in a situation where available 3 processing resources are reduced. A conventional 4 video encoder will typically choose to drop coding units in order to meet real-time encoding 6 constraints.</p>
<p>8 The remaining description refers specifically to</p>
<p>9 frames as the video coding unit and to other parameters in terms of frames rather than video 11 coding units. It should be understood that the video 12 coding unit could be any derivation of a video 13 sequence which requires to be encoded. For example, 14 the video coding unit could be one or more fields, one or more slices or a subset of one or more of 16 these.</p>
<p>18 Referring to Fig. 1, a video capture device 10 19 comprises a video camera or other video source 12, a encoder 14, a encoder control system 16 according to 21 the present invention and a means for setting a 22 target coding unit rate, which in this case is a 23 target frame rate 18.</p>
<p>The encoder control system 16 comprises a buffer 20, 26 a buffer level controller 22 and a complexity 27 controller 24.</p>
<p>29 The target frame rate 18 is passed to the video camera 12 and the buffer level controller 22. The 31 video camera 12 begins to capture video frames at 1 the target frame rate 18 and passes them to the 2 buffer 20.</p>
<p>4 The buffer 20 passes video frames to the encoder 14 as soon as the encoder 14 can accept them. If the 6 encoder 14 can encode frames faster than they are 7 passed to the buffer 20, the buffer 20 will remain 8 empty. Where the encoder 14 encodes frames slower 9 than they are passed to the buffer 20, the buffer 20 will store the unprocessed frames until the encoder 11 can accept them.</p>
<p>13 The rate that the encoder 14 can encode frames is 14 controlled by the complexity controller 24.</p>
<p>16 The encoder 14 comprises an encoding complexity 17 function which varies the level of complexity of the 18 current frame. In one example, the encoder 20 uses a 19 method that predicts which macroblocks in a frame can be skipped prior to the computationally 21 expensive step of motion estimation by deciding 22 whether the statistics of a macroblock are greater 23 than a particular threshold level, as disclosed in 24 W004056125.</p>
<p>26 The complexity controller 24 calculates encoding 27 complexity value k which is inputted to the encoder 28 14. In the example above, the encoding complexity 29 value k would be added to the statistics to increase the likelihood that the macroblock would be 31 skipped if the complexity of the frame required to 32 be reduced.</p>
<p>2 For example, an embodiment of the method of 3 W004056125 evaluates Lagrangian Rate-Distortion- 4 Complexity cost between coding and skipping a macroblock.</p>
<p>7 Let M1 be the coding mode chosen by the encoder for 8 the i-th macroblock and let M2=skip denote the 9 "skip" mode (note that the "skip" mode may be chosen by the encoder in the normal course of encoding) 11 The Lagrangian rate-distortion-complexity costs of 12 coding or skipping a macroblock may be defined as: 13 J(M)DJ2JAC,(M) 14 and J, ,kip D. , skip 16 respectively, where Xr and X, are Lagrange 17 multipliers associated with rate and complexity.</p>
<p>18 Note that the rate associated with a skipped 19 macroblock is effectively zero and the computational complexity associated with a macroblock identified 21 as "skipped" prior to coding is negligible, since no 22 further processing is carried out. It is assumed 23 that the computational complexity of all coded 24 macroblocks is roughly the same, hence C(M) = 1.</p>
<p>The th macroblock should be skipped (not coded) if: 26 D. /j /i j.x D. jkip 28 The complexity controller 24 chooses the encoding 29 complexity value X via an adaptive proportional feedback algorithm. A target coding unit encoding 31 time T, which in this case is a target frame 1 encoding time, is supplied by the buffer level 2 controller 22. The encoding complexity value X is 3 updated for the current frame (n) according to the 4 following formula: jn) II) J 6 where, : &(n) T12) 9 This adaptive proportional feed back mechanism allows for changing source statistics, that is, the 11 content of the video frames changing, for example, 12 due to a change in the amount of motion and/or 13 detail in the scene. The encoding complexity 14 weighting value &% is the ratio between the change in Lagrange multiplier and the resultant change in 16 encoding time. This ratio, representing the amount 17 of öA contribution to a change in unit time (for 18 the previous frame) as the estimated rate of change 19 of the next frame.</p>
<p>21 In the situation where &% equals zero for the 22 current frame, it is replaced by the corresponding 23 value used for the previous frame. Similarly, where 24 (T1 equals zero for the current frame, it is replaced by the corresponding value used for the 26 previous frame.</p>
<p>28 The encoding complexity value..% may be derived 29 from a complexity reduction target CT as follows, 1 where CT is the complexity reduction as a proportion 2 of full complexity.</p>
<p>4 The first encoding complexity value A is initialised to zero at the start of the encoding 6 process to be used for the first frame. The value 7 T1 (target frame encoding time for two frames 8 previous to now) is only available after encoding 9 the second frame. Therefore, for the second frame we use: 12 O.2(1 IC')2 I(T' IT) 13 where C-Ç/1OO.</p>
<p>In some instances, such as when there are large 16 changes in scene content, the feed back algorithm 17 may become destabilized. Therefore, in one 18 embodiment, the encoding complexity weighting value 19 8k. is bounded by the limits 1 and -2.</p>
<p>21 The encoding complexity value A" affects the 22 complexity of the current frame by controlling how 23 the encoder 14 analyses the current frame. For 24 example, in the method of W004056125, the encoding complexity value controls the number of skipped 26 macroblocks.</p>
<p>28 When available processing time decreases and the 29 buffer level controller 22 is controlling the target frame encoding time T, the buffer level controller 1 22 allocates a smaller target frame encoding time T' 2 for the current frame, as described below. This time 3 allocation is used to calculate the appropriate 4 encoding complexity value A so that its value is increased and the complexity of the encoding is 6 reduced. This results in an increase in the overall 7 distortion of the frame. Therefore, an upper limit 8 for the is introduced to limit the complexity 9 reduction and thereby limiting the maximum distortion. In this case, the encoding complexity 11 value X as follows: 12,%(n) min(Limit, A(1) J S2)) 14 In the embodiment of Fig. 1, the buffer level controller 22 calculates a target frame encoding 16 time T" for the next frame by considering the 17 overall encoding delay of the system.</p>
<p>19 To enable this, the buffer level controller 22 requires, in this example, to know the buffer 21 capacity B, the target frame rate T, the current 22 buffer level Buff, the time at the start of encoding 23 the current frame T and the time that the last 24 frame entered the frame buffer T. 26 The time at the start of encoding the current frame 27 T can be taken from the buffer 20 or the encoder 28 14.</p>
<p>When encoding of the video stream begins, the first 31 frame is inputted to the buffer 20, so Buff =1 1 When a new frame is inserted into a free buffer in 2 the buffer 20, the time T1 is passed to the buffer 3 level controller 22 and the buffer level Buff is 4 incremented. After a frame has been encoded, and, as such, at the start of the next frame, the time T is 6 passed to the buffer level controller 22 and the 7 buffer level Buff is decremented, before calculating 8 the target frame encoding time for the next frame.</p>
<p>Assuming that buffer space of the frame currently 11 being encoded will not be freed until the frame is 12 completely coded, the "total delay" in frame 13 processing at the beginning of encoding a frame can 14 be calculated as: Total Delay T CJJT1(Buff Cl). (1) 17 A linear model for the target frame encoding time T11 18 can be defined as follows: 19 T T1 CCITotal_delay, (2) where C is a proportionality constant.</p>
<p>22 When Total_delayO, JT1, which satisfies the 23 condition that when there are no buffer delays, the 24 target encoding frame rate should match the input frame rate.</p>
<p>27 Total delay reaches its theoretical maximum allowable 28 value when the buffer is about to overflow.</p>
<p>29 Therefore, the next frame has to be encoded almost instantaneously to make room for the incoming frame.</p>
<p>1 In this case, 7 IT,. T1 and Buff B. Therefore, 2 Total delay becomes: 3 Total_DelayT1JT1.(B (1)TIB (3) At this point the time available for the target 6 frame encoding time T,, is 0 and, therefore, a frame 7 has to be skipped. Now by substituting the values 8 from equation (3) into equation (2) we get: 9 OT1 (CITJ. lB. (4) and 11 C-. (5)</p>
<p>B</p>
<p>13 Therefore, we can calculate the time allocation for 14 the next frame by substituting values from equation (5) and equation (1) into equation (2) it becomes: 16 T,, T1 I[1 IT, J T (Buff Ii)]. (6) 18 When Total delayTrO, which is when all the buffers are 19 empty, the condition where 7',, T1 should be avoided because encoding can only start when the next frame 21 is available. Therefore, an additional constraint is 22 imposed, in that when BuffO, T,,TJ.</p>
<p>24 Where Total delay starts increasing because the complexity controller 24 is unable to keep up with 26 complexity allocations, it may be desirable to skip 27 frames rather than forcing frames to be encoded with 28 very low complexity. This is because, it is</p>
<p>S</p>
<p>1 perceptually and in a rate distortion sense, 2 desirable to skip frames, thereby dropping the 3 overall delay, rather than trying to encode at a 4 higher frame rate with lower frame quality. This would result in very low complexity encoding of 6 consecutive frames to make up for the lost time.</p>
<p>8 Therefore, a second constraint may be imposed after 9 calculating equation (6) as if ITMTHframeSkI where THfi.ame skip is a predetermined threshold level, then a 11 frame should be skipped by removing it from the 12 buffer and going to the next frame.</p>
<p>14 Once the time allocation for the next frame is set by the buffer level controller 22, the complexity 16 controller 24 can then control the computational 17 complexity of the next frame.</p>
<p>19 As such, Lim!tA and THframc$k act as control parameters affecting the compromise between frame 21 quality and frame rate. It should be noted than 22 Limit2 has a more significant effect than THfram,sk,.</p>
<p>24 Referring to Fig. 2, a table is shown containing a comparison of a prior art "normal" encoder with that 26 of an encoder controlled by the present invention 27 (under the heading "Managed Complexity Encoder") . In 28 this comparison, the basic coding unit is one video 29 frame. The table lists the achieved frame rate and the average Peak Signal-to-Noise Ratio (PSNR) of a 31 series of video stream with varying complexity. The 1 processing capabilities of the encoders being 2 limited in the test being limited. It can clearly be 3 seen that the frame rate achieved by the encoder 4 controlled by the present invention is superior to</p>
<p>that of a prior art encoder for a similar PSNR.</p>
<p>7 It is difficult to realistically assess the quality 8 of a video stream using PSNR, especially when 9 comparing video streams with different frame rates.</p>
<p>11 Subjective tests must be used to compare the 12 acceptability of different video streams. As such, 13 the results of subjective tests, using 15 14 participants, are shown in Fig. 3, Fig. 4 and Fig. 5. The results shown in Fig. 3, Fig. 4 and Fig. 5 16 have a sequence number on the x-axis which refers to 17 the video streams as numbered in Table 1. The y-axis 18 is labelled MOS, referring to Mean Opinion Score (as 19 defined by ITU-T Standard P.910) 21 The present invention was tested against a prior art 22 "normal" encoder as follows: 23 1. Degradation Category rating test comparing an 24 encoder controlled by the present invention and</p>
<p>a prior art encoder at various levels of</p>
<p>26 complexity and the same quantizer parameter 27 (QP) level (Fig. 3); 28 2. Degradation Category rating test comparing an 29 encoder controlled by the present invention and</p>
<p>a prior art encoder at various levels of</p>
<p>31 complexity and the same bit rate (QP of the</p>
<p>32 prior art encoder was decreased to achieve same</p>
<p>1 bit rate at different complexity levels) (Fig. 2 4); and 3 3. Pair Comparison test to asses the overall user 4 acceptability or preference between the encoder controlled by the present invention and a prior 6 art encoder at the same bit rate and complexity 7 levels (Fig. 5) 9 Results from Test 1 (Fig. 3) shows that the acceptability of video stream produced by the 11 encoder controlled by the present invention, which 12 has a higher frame rate, is higher than lower frame 13 rate video. However, at a particular complexity 14 level, for the same QP, the overall rate of the</p>
<p>prior art encoder is less than the managed</p>
<p>16 complexity encoder due to the large difference in 17 frame rate.</p>
<p>19 The prior art encoder was used at lower QP values than Managed complexity, so that both overall Bit 21 rate and Complexity were the same for both Normal 22 and Managed complexity encoders.</p>
<p>24 Both Fig. 4 and Fig. 5 show that even when per-frame</p>
<p>PSNR is significantly increased by the prior art</p>
<p>26 encoder, there is significant evidence that users 27 prefer higher frame rate video achieved by the 28 managed complexity encoder as opposed to lower frame 29 rate video with higher frame quality.</p>
<p>31 As such, the present invention allows a higher 32 encoding frame rate to be maintained through the use 1 of computational management techniques. This 2 provides a higher subjective quality and increased 3 user acceptability.</p>
<p>Improvements and modifications may be incorporated 6 without departing from the scope of the present 7 invention.</p>

Claims (1)

  1. <p>CLAIMS</p>
    <p>1. An encoder control system for controlling an encoder for encoding a stream of video coding units in accordance with an encoding complexity function, the system comprising a complexity controller, wherein the complexity controller, on the basis of an encoding target value, generates an encoding complexity value for input to the encoding complexity function that alters the complexity required to encode the video coding unit being encoded at that time and, thereby, the length of time the encoder takes to encode that video coding unit.</p>
    <p>2. A system as claimed in claim 1, wherein an encoding complexity value is modified for each video coding unit.</p>
    <p>S..... S...</p>
    <p>3. A system as claimed in claim 1 or claim 2, wherein the encoding S complexity value is a multiplier associated with Lagrangian optimisation. S. * * S S</p>
    <p>4. A system as claimed in any of claims 1 to 3, wherein the encoding S...</p>
    <p>target value is one, or a combination of, the following: a coding unit target.5,55. S..</p>
    <p>encoding time; a target number of coded macroblocks in each video..* : coding unit; a target number of processor instructions; or other values which affects the complexity required to encode the video coding unit.</p>
    <p>5. A system as claimed in any of claims 1 to 4, wherein the system further comprises a coding unit encoding time calculation means which determines a coding unit encoding time, representing the length of time to encode a previous video coding unit.</p>
    <p>6. A system as claimed in any of claims 1 to 5, wherein the current encoding complexity value is a previous encoding complexity value added to an encoding complexity weighting value, that is: = + 52, where A. is the encoding complexity value, n is the current coding unit and 82g. is the encoding complexity weighting value.</p>
    <p>7. A system as claimed in claim 6, wherein the encoding complexity weighting value is determined by a ratio of the change in encoding complexity weighting value from a previous coding unit and the resultant change in the coding unit encoding time.</p>
    <p>8. A system as claimed in claim 6, wherein the encoding complexity weighting value is: :...:.</p>
    <p>82' -1T'-T' -7(n-2) .(nl) ) where öA.is the encoding complexity weighting value, ndenotes the current coding unit and Tis the target coding unit encoding time.</p>
    <p>S S *5S*</p>
    <p>9. A system as claimed in any of claims 1 to 8, wherein the encoding complexity value is limited to avoid the reduction of complexity below a predetermined level and, as such, limiting the maximum distortion of the encoded coding unit.</p>
    <p>10. A system as claimed in any of claims 5 to 9, wherein the coding unit encoding time calculation means comprises a buffer having a buffer capacity and a buffer level controller, wherein the buffer stores coding units to be processed and the buffer level controller monitors the buffer capacity, determines a buffer level, and determines the target coding unit encoding time on the basis of the buffer level, the coding unit encoding time and a predetermined target coding unit rate.</p>
    <p>11. A system as claimed in claim 10, wherein the target coding unit encoding time is calculated as follows: T" =T1 _-!.[T( -1 +T,(Buff-1)], where T is the target coding unit encoding time, Tf is the target coding unit interval, T is the time at the start of encoding the current coding unit, T, is the time that the last coding unit entered the buffer, B is the buffer capacity and Buff is the buffer level at the time of calculation.</p>
    <p>12. A system as claimed in claim 11, wherein, when the buffer level is zero, the target coding unit encoding time is equal to the target coding unit interval. * S</p>
    <p>S.....</p>
    <p>S S...</p>
    <p>13. A system as claimed in claim 11 or claim 12, wherein, when the target coding unit encoding time is less than a predetermined minimum coding unit encoding time, the buffer level controller flushes the current coding * : : *: unit from the buffer. S... * S S...</p>
    <p>14. A system as claimed in any of claims ito 13, wherein the coding unit is a whole or subset of one or more of the following: a video frame; an</p>
    <p>interlaced field; or a slice.</p>
    <p>15. A method of controlling an encoder for encoding a stream of video coding units in accordance with an encoding complexity function, the method comprising the step of generating an encoding complexity value for input to the encoding complexity function, on the basis of an encoding target value, altering the complexity required to encode the video coding unit being encoded at that time and, thereby, the length of time the encoder takes to encode that video coding unit. -7$</p>
    <p>16. A method as claimed in claim 15, wherein the step of modifying an encoding complexity value is completed for each coding unit.</p>
    <p>17. A method as claimed in claim 15 or claim 16, wherein the encoding target value is one, or a combination of, the following: a coding unit target encoding time; a target number of coded macroblocks in each video coding unit; a target number of processor instructions; or other values which affects the complexity required to encode the video coding unit.</p>
    <p>18. A method as claimed in any of claims 15 to 17, wherein the current encoding complexity value is a previous coding unit's encoding complexity value added to an encoding complexity weighting value, that is: S...,.</p>
    <p>2 =2-' +52', :*:*.</p>
    <p>where A. is the encoding complexity value, n is the current coding unit and e..</p>
    <p>52( is the encoding complexity weighting value.</p>
    <p>19. A method as claimed in any of claims 15 to 18, wherein the method....</p>
    <p>further comprises the step of calculating a coding unit encoding time, .:.</p>
    <p>representing the length of time to encode a previous coding unit.</p>
    <p>20. A method as claimed in claim 19, wherein the encoding complexity weighting value is determined by a ratio of the change in encoding complexity weighting value from a previous coding unit and the resultant change in the coding unit encoding time.</p>
    <p>21. A method as claimed in claim 19, wherein the encoding complexity weighting value is: Lk' = e (i'('-' -T'7) T-2 -T'-' where 82(. is the encoding complexity weighting value, n denotes the current coding unit and Tis the target coding unit encoding time.</p>
    <p>22. A method as claimed in any of claims 19 to 21, wherein the encoding complexity value is limited to avoid the reduction of complexity below a predetermined level and, as such, limiting the maximum distortion of the encoded coding unit.</p>
    <p>23. A method as claimed in any of claims 19 to 22, wherein the method further comprises the steps of storing one or more coding units to be encoded in a buffer having a buffer capacity and controlling the amount of coding units stored by monitoring the number of coding units stored, *.</p>
    <p>determining a buffer level, and determining the target coding unit encoding *s0 time on the basis of the number of coding units stored, the coding unit encoding time and a predetermined target coding unit rate. "I.. S...</p>
    <p>S S...</p>
    <p>24. A method as claimed in claim 23, wherein calculating the target coding unit encoding time is performed according to the following equation: TF? =T. _ -.[T. -T, +T1(Butf-1)], where r is the target coding unit encoding time, Tf is the target coding unit interval, T is the time at the start of encoding the current coding unit, T,* is the time that the last coding unit entered the buffer, B is the buffer total capacity and Buff is the buffer level.</p>
    <p>25. A method as claimed in claim 23 or claim 24, wherein when the number of coding units stored is zero, the target coding unit encoding time is equal to the target coding unit interval. -i-i</p>
    <p>26. A method as claimed in any of claims 23 to 25, wherein where the target coding unit encoding time is less than a predetermined minimum coding unit encoding time, the method performs the step of flushing the current coding unit from the buffer.</p>
    <p>27. A method as claimed in any of claims 15 to 26, wherein the coding unit is a whole or subset of one or more of the following: a video frame; an</p>
    <p>interlaced field; or a slice.</p>
    <p>28. A device comprising a processor and an encoder control system according to claims 1 to 14. * *</p>
    <p>S.....</p>
    <p>29. A device as claimed in claim 28, wherein the device can alter the target coding unit encoding time to reduce the processor usage.</p>
    <p>S S..</p>
    <p>S</p>
    <p>30. A device as claimed in claim 29, wherein the device is a battery..</p>
    <p>powered device and the processor usage is reduced to conserve battery life. *SSS 20:</p>
GB0524663A 2005-12-05 2005-12-05 Encoder control system based on a target encoding value Pending GB2432985A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
GB0524663A GB2432985A (en) 2005-12-05 2005-12-05 Encoder control system based on a target encoding value
PCT/GB2006/004551 WO2007066101A2 (en) 2005-12-05 2006-12-05 Encoder control apparatus and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
GB0524663A GB2432985A (en) 2005-12-05 2005-12-05 Encoder control system based on a target encoding value

Publications (2)

Publication Number Publication Date
GB0524663D0 GB0524663D0 (en) 2006-01-11
GB2432985A true GB2432985A (en) 2007-06-06

Family

ID=35685993

Family Applications (1)

Application Number Title Priority Date Filing Date
GB0524663A Pending GB2432985A (en) 2005-12-05 2005-12-05 Encoder control system based on a target encoding value

Country Status (2)

Country Link
GB (1) GB2432985A (en)
WO (1) WO2007066101A2 (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5956430A (en) * 1996-02-19 1999-09-21 Fuji Xerox Co., Ltd. Image information coding apparatus and method using code amount of a selected pixel block for changing coding parameter
EP0984634A2 (en) * 1998-08-31 2000-03-08 Sharp Kabushiki Kaisha Moving picture coding apparatus
US6181742B1 (en) * 1998-01-26 2001-01-30 International Business Machines Corporation Single pass target allocation for video encoding
US20010006562A1 (en) * 1999-12-24 2001-07-05 Junji Tajime Compresses moving picture re-encoding apparatus and compressed moving picture re-encoding mehtod
JP2002027459A (en) * 2000-07-04 2002-01-25 Mitsubishi Electric Corp Apparatus and method for encoding dynamic image as well as recording medium for recording image encoding program
US6510176B1 (en) * 1998-09-29 2003-01-21 Matsushita Electric Industrial Co., Ltd. Variable-bit-rate coding apparatus
JP2003101793A (en) * 2001-09-19 2003-04-04 Canon Inc Picture processing system and method for controlling the same and computer program and storage medium

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1190081C (en) * 1997-03-17 2005-02-16 松下电器产业株式会社 Method and apparatus for processing, transmitting and receiving dynamic image data
JP3324556B2 (en) * 1999-04-13 2002-09-17 日本電気株式会社 Video recording method
US6904094B1 (en) * 2000-09-20 2005-06-07 General Instrument Corporation Processing mode selection for channels in a video multi-processor system
US20030112366A1 (en) * 2001-11-21 2003-06-19 General Instrument Corporation Apparatus and methods for improving video quality delivered to a display device
US20030123540A1 (en) * 2001-12-27 2003-07-03 Koninklijke Philips Electronics N.V. Dynamic control in complexity-constrained data compression
JP4151374B2 (en) * 2002-03-29 2008-09-17 セイコーエプソン株式会社 Moving picture coding apparatus and moving picture coding method
US7515634B2 (en) * 2002-06-28 2009-04-07 Qualcomm Incorporated Computationally constrained video encoding
WO2004030369A1 (en) * 2002-09-27 2004-04-08 Videosoft, Inc. Real-time video coding/decoding

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5956430A (en) * 1996-02-19 1999-09-21 Fuji Xerox Co., Ltd. Image information coding apparatus and method using code amount of a selected pixel block for changing coding parameter
US6181742B1 (en) * 1998-01-26 2001-01-30 International Business Machines Corporation Single pass target allocation for video encoding
EP0984634A2 (en) * 1998-08-31 2000-03-08 Sharp Kabushiki Kaisha Moving picture coding apparatus
US6510176B1 (en) * 1998-09-29 2003-01-21 Matsushita Electric Industrial Co., Ltd. Variable-bit-rate coding apparatus
US20010006562A1 (en) * 1999-12-24 2001-07-05 Junji Tajime Compresses moving picture re-encoding apparatus and compressed moving picture re-encoding mehtod
JP2002027459A (en) * 2000-07-04 2002-01-25 Mitsubishi Electric Corp Apparatus and method for encoding dynamic image as well as recording medium for recording image encoding program
JP2003101793A (en) * 2001-09-19 2003-04-04 Canon Inc Picture processing system and method for controlling the same and computer program and storage medium

Also Published As

Publication number Publication date
WO2007066101A3 (en) 2007-08-16
WO2007066101A2 (en) 2007-06-14
GB0524663D0 (en) 2006-01-11

Similar Documents

Publication Publication Date Title
US9516329B2 (en) Method for dual pass rate control video encoding
JP4390112B2 (en) Method and apparatus for controlling rate of video sequence and video encoding apparatus
JP2006509444A (en) Rate control with picture-based look-ahead window
JP2001169284A (en) Quantization step setting method in moving image encoder and moving image encoder using the method
JP2008504750A (en) Multi-pass video encoding
US20140092204A1 (en) Dynamic rate control algorithm for high definition video conferencing
WO2005064947A1 (en) Moving image encoding method and apparatus
Kannangara et al. Computational complexity management of a real-time H. 264/AVC encoder
JP2006295535A (en) Dynamic image coding apparatus, and method
CN100574442C (en) Bit rate control method based on image histogram
EP4333433A1 (en) Video coding method and apparatus, and electronic device
US6865224B1 (en) Bit rate control for video data compression
CN112788335B (en) H.264 frame-level code rate control method suitable for real-time video transmission
US8681857B2 (en) Macro-block quantization reactivity compensation
CA2524809C (en) Methods and apparatus for improving video quality in statistical multiplexing
CN111416978B (en) Video encoding and decoding method and system, and computer readable storage medium
JP2004328150A (en) Moving picture coding apparatus and method
GB2432985A (en) Encoder control system based on a target encoding value
JPH11355782A (en) Multi-channel encoder for video signal
Pan et al. Content adaptive frame skipping for low bit rate video coding
EP2458861A1 (en) Bit rate regulation module and method for regulating bit rate
CN114513664B (en) Video frame encoding method and device, intelligent terminal and computer readable storage medium
JP4142497B2 (en) Intra-frame rate control method, intra-frame rate control apparatus, moving picture encoding apparatus, and intra-frame rate control program in moving picture coding
CN109379593B (en) Code rate control method based on advanced prediction
Shafei et al. Fuzzy Video Rate Controller for Variable Bit Rate Applications Using ANFIS