AU696159B2

Control of video encoding by varying quantization levels

Abstract

A method and system for re-encoding frames of a digital video stream without changing the previously calculated bit length of the stream. A set of macroblocks at a time are re-encoded (292), the number of resulting bits is calculated (306, 368) and the deviation from an estimated number of bits is calculated (372), either set-by-set or cumulatively. Based on the accuracy (372), of the estimate (422) and the remaining number of sets of macroblocks (424) to re-encode, a correction factor (710) for the quantization level of the next set of macroblocks is chosen from a lookup table. The correction factor is added to the quantization level of the next set of macroblocks (712) and the results stored as the new quantization level of the set (706). This sequential process is done for all sets of macroblocks in the digital stream which are to be recorded according to changed image qualities (706, 708, 710, 712, 714).

AU696159B2, drawing sheet 1
Sheet 1 of 2

Term

Term ended

Expired 19 April 2016, 10.4 years ago.

  1. Priority
  2. Filed
  3. Granted
  4. Expired
  5. Today

116 claims: 11 independent, 105 dependent

  1. 1
    WHAT IS CLAIMED AS NEW AND IS DESIRED TO BE SECURED BY LETTERS PATENT OF THE UNITED STATE IS:1. A rate-controlled digital video editing system, comprising: 5 (a) means for dividing at least one video frame having an originally encoded length into a plurality of sets of macroblocks, MB(i), having respective quantization levels, q(i) ;(b) means for calculating an estimated number of bits, 10 EB(1), for a first set of macroblocks, MB(1);(c) means for re-encoding said first set of macroblocks into a first set of re-encoded macroblocks having a first reencoded length, GB(1);(d) means for computing a correction factor, Δ(ϊ), for 15 each succeeding set of macroblocks based on an estimated number of bits, EB(i), and a number of bits of a re-encoded length, GB(i), of at least one preceding set of macroblocks;(e) means for altering the quantization level of each succeeding set of macroblocks based on the correction factor 20 determined by said computing means;(f) means for re-encoding each succeeding set of macroblocks into a set of re-encoded macroblocks having a reencoded length using an altered quantization level produced by said altering means;and 25 (g) means for combining said plurality of sets of reencoded macroblocks into a digital video stream having a length equal to said originally encoded length. 169 WO 96/35998 PCT/US96/05210
  2. 20
    20 means for adding said correction factor to a succeeding quantization level;and means for storing a result of said addition as a modified succeeding quantization level.
  3. 25
    26. A rate-controlled digital video editing system, comprising:means for dividing an original digital video stream having an originally encoded length into a plurality of macroblocks including first and second sets of macroblocks having respective first and second quantization levels;means for calculating a first estimated number of bits for said first set of macroblocks, EB(i);means for re-encoding said first set of macroblocks into a first set of re-encoded macroblocks having a first reencoded length, GB(i);means for computing a correction factor, Δ(ί), based on said first estimated number of bits, EB(i), and said first reencoded length, GB(i);means for altering said second quantization level based on said correction factor;174 WO 9 6/35998 PCT/U896/052i0 means for re-encoding said second set of macroblocks into a second set of re-encoded macroblocks having a second reencoded length;and means for combining said first and second sets of re5 encoded macroblocks, along with any re-encoded macroblocks derived from macroblocks other than said first and second sets of macroblftks, into a reconstituted digital video stream having a length equal to said originally encoded length.
  4. 39
    40. The system of Claim
  5. 40
    41, wherein said means for computing further comprises:means for comparing said ratio, PB(i), to a plurality of values in a first table. 10 41. The system of Claim 40, wherein said means for computing further comprises: means for comparing said ratio, PB(i), to a plurality of values in a first table to determine a first index in said first table of a closest value to PB(i) that is greater than 15 PB(i), said first index being used as a second index into a second table which contains a plurality of correction factors, to select a correction factor from said second table.
  6. 46
    47. A system for controlled video re-encoding, comprising:a video source outputting an original video stream having 15 an original length and including at least first and second sets of macroblocks;a video encoder connected to said video source;a controller, which controls said video encoder, said controller determining a number of bits originally used to 20 encode said video source, calculating an estimated re-encoded length for said first set of macroblocks, commanding said encoder to re-encode said first set of macroblocks into a first re-encoded set of macroblocks resulting in a first length, calculating a correction factor based on said first 25 estimated re-encoded length and said first length, commanding said encoder to change quantization parameters for said second set of macroblocks based on said correction factor, commanding 178 WO 96/35998 PC17US96/O5210 said encoder to re-encode said second set of macroblocks into a second re-encoded set of macroblocks using the changed quantization parameters, and combining said first and second re-encoded sets of macroblocks, along with any re-encoded 5 macroblocks derived from macroblocks other than said first and second sets of macroblocks, into a digital video stream having a length equal to said original length.
  7. 49
    50. A method of editing a digital video signal, 15 comprising the steps of:(a) dividing at least one video frame of said digital video signal having an originally encoded length into a plurality of sets of macroblocks, MB(i), having respective quantization levels, q(i);20 (b) calculating an estimated number of bits, EB(1), for a first set of macroblocks, MB(1);(c) re-encoding said first set of macroblocks into a first set of re-encoded macroblocks having a first re-encoded length, GB(1);25 (d) computing a correction factor, Δ(ΐ), for a succeeding set of macroblocks based on said estimated number 179 WO 96/35998 I»Cr/US96/0S210 of bits, EB(i), and a number of bits of a re-encoded length, GB(i), of at least one preceding set of macroblocks;(e) altering the quantization level of the succeeding set of macroblocks based on the correction factor determined 5 from a preceding set of macroblocks;(f) re-encoding each succeeding set of macroblocks into a set of re-encoded macroblocks having a re-encoded length using the altered quantization level derived in step (e);and (g) combining said plurality of sets of re-encoded 10 macroblocks into a digital video stream having a length equal to said originally encoded length.
  8. 84
    85. A method of controlling a digital video editing 15 system rate-controller, comprising the steps of:dividing at least one video frame having an originally encoded length into a plurality of macroblocks, said plurality of macroblocks contains at least first and second sets of macroblocks having first and second quantization levels, 20 respectively;calculating a first estimated number of bits for said first set of macroblocks, EB(i);encoding said first set of macroblocks into a first set of re-encoded macroblocks having a first re-encoded length, 25 GB(i);190 WO 96/35998 1>CT/US96/OS2IO computing a correction factor, Δ(ϊ), based on a relation between said first estimated number of bits, EB(i), and said first re-encoded length, GB(i);altering said second quantization level based on said 5 correction factor;encoding said second set of macroblocks into a second set of re-encoded macroblocks having a second re-encoded length;and combining said first and second sets of re-encoded 10 macroblocks, along with any re-encoded macroblocks derived from macroblocks other than said first and second sets of macroblocks, into a reconstituted digital video stream having a length equal to said originally encoded length.
  9. 108
    109. A memory containing data structures for storing 20 video generated according to claim 85, audio signals, and file management information, comprising:a data structure for storing file management information, including: a file management table storing address and size 25 information of information in the memory;a sequence information table storing information describing an order in which cells are reproduced, a cell 196 WO 96/35998 PCT/US96/0521O being a unit of information, the sequence information table including a table entry for each sequence, each table entry including: a field storing whether a corresponding 5 sequence is a completion-type sequence which terminates after being reproduced, a head of a connection-type sequence which is part of sequences which are sequentially reproduced, a mid of a connection-type sequence, and an end of a connection-type sequence;10 a field storing a number of cells in the corresponding sequence;a field storing a reproduction time of the corresponding sequence;and a field storing a sequence which is reproduced 15 after the corresponding sequence;a cell information table storing information describing cells, the cell information table including a table entry for each cell, each table entry including: a field describing a reproduction time of a 20 corresponding cell;a field describing at least a portion of a system clock reference of the corresponding cell a field describing an address of the corresponding cell;and 25 a field describing a number of logical blocks of the corresponding cell;a data structure for storing encoded audio signals;and 197 WO 96/35998 PCT/US96/05210 a data structure for storing said video generated according to claim 85.
  10. 115
    116. Method substantially as described herein with reference to the accompanying drawings.
  11. 116
    117. Apparatus substantially as described herein with reference to the accompanying drawings.