Control strategy for dynamically encoding multiple streams of video data in parallel for multiplexing onto a constant bit rate channel

A control strategy is provided for dynamically encoding multiple streams of video data in parallel for multiplexing onto a constant bit rate channel. The control strategy is a single pass strategy which allows individual encode bit rates to be dynamically adjusted for each video data stream based on part in relative complexity of the multiple streams of video data, as well as fullness of compressed video data buffers and a channel buffer coupled between the encoders and the constant bit rate channel. The control strategy includes encoding the multiple streams of video frames in parallel, and dynamically adapting encoding of at least one stream of the video frames based on relative complexity of the video frames. The bit rate for each stream of video frames is only changed at GOP boundaries, or if a scene change occurs. The calculated bit rate is preferably further modified based upon buffer fullness.

TECHNICAL FIELD

This invention relates in general to compression of digital visual images, and more particularly, to a control strategy for dynamically encoding multiple streams of video data in parallel for multiplexing onto a constant bit rate channel. The control strategy comprises a single pass strategy which allows individual encode bit rates to be dynamically adjusted within each video data stream based in part on relative complexity of the multiple streams of video data.

BACKGROUND OF THE INVENTION

The emergence of various digital video technologies in industries such as broadcast television, communications networks, consumer electronics, and multimedia computers continues to increase at a remarkable rate. This widespread use of digital video applications is motivated by the fact that signal processing, editing and data transfer of digital information is much easier compared with processing of analog representations. But as importantly, digital video owes its popularity to the several standards that have been created for digital video compression in recent years.

Digital video compression solutions are arguably the most important component of any digital video platform. Since digital video is known to contain an enormous amount of information in uncompressed format, its manipulation, storage, and transmission can be very time consuming and expensive, if not impossible. As a result, digital video compression techniques have been devised to reduce the overwhelming volume of data while preserving the perceptual quality of its content. A compatible video decompression scheme is then used to uncompress the data for playback.

The MPEG-2 International Standard formed by the Moving Pictures and Expert Group, and described in ISO/IEC 13818-2, “Information Technology—Generic Coding of Moving Pictures and Associated Audio Information: Video 1996,” which is hereby incorporated herein by reference in its entirety, is intended to standardize compression for the industries noted above. The ISO MPEG-2 standard specifies the syntax of the encoded bitstream and semantics of the decoding process. The choice of coding parameters and tradeoffs in performance versus complexity, however, are left to the encoder developer.

The efficiency of the MPEG-2 encoding system is assessed by the fidelity of the perceived video transmitted over a fixed communication bandwidth or stored into a digital medium. For some applications, such as digital satellite systems, multiple programs are multiplexed into a single large stream for broadcasting, and a bank of MPEG-2 encoders is used to monitor and encode all programs, while attempting to maintain the quality of the received channels. The MPEG-2 stream is sent over either a fixed communications bandwidth or a dynamic bandwidth as in asynchronous transfer mode (ATM) networks.

In typical statistical multiplexing systems, such as direct broadcast satellite (DBS) applications, several video bitstreams (or programs) are multiplexed onto one single constant bit rate channel. Unfortunately, encoding of each program at a predefined constant bit rate can lead to picture quality degradation due to changes of scene content in the programs over time. The problem becomes more complex if the operation of the encoders is not aligned in time, such as when the video sources have different coding carried out and/or different group of picture (GOP) structures.

A need thus exists in the art for a multi-program compression technique which dynamically distributes available bandwidth among programs in order to optimize overall video quality of the system. The present invention provides such a technique by employing a joint rate control strategy which guides the individual encoders dynamically during the encoding process.

SUMMARY OF THE INVENTION

Briefly described, in one aspect a method is presented in accordance with the principles of this invention for processing multiple streams of video frames. This method includes: encoding the multiple streams of video frames in parallel; and dynamically adapting encoding of at least one stream of video frames of the multiple streams of video frames based on relative complexity of video frames comprising the multiple streams of video frames. In an enhanced embodiment, the dynamically adapting of encoding includes adjusting a controllable encode parameter based on complexity of the video frames comprising the multiple streams. The adjusting preferably occurs upon detection of a scene change in the at least one stream of video frames, or upon initiation of a new group of pictures.

In another aspect, a method for processing multiple streams of video frames is presented which includes: encoding the multiple streams of video frames employing at least one controllable encode parameter for each stream of video frames; during the encoding, analyzing each stream of video frames to derive information on at least one characteristic thereof, the at least one characteristic comprising at least one of an intraframe characteristic or an interframe characteristic; and dynamically adapting the encoding of each stream of video frames using relative information on the at least one characteristic obtained from each stream of the multiple streams of video frames. The dynamically adapting includes for each stream of video frames adjusting the at least one controllable encode parameter employed in the encoding, wherein the encoding of the video frames is dynamically adaptive to relative changes in the at least one characteristic obtained from the multiple streams of video frames.

In a further aspect, a system is provided for processing multiple streams of video frames. This system includes multiple encoders for encoding the multiple streams of video frames in parallel. Each encoder is coupled to receive one stream of video frames of the multiple streams of video frames. A joint controller is connected to each encoder for dynamically adapting encoding of at least one stream of video frames of the multiple streams of video frames based on relative complexity of the video frames comprising the multiple streams of video frames.

In still another aspect, this invention comprises a system for processing multiple streams of video frames. The system includes multiple encoders for encoding the multiple streams of video frames. Each encoder employs at least one controllable encode parameter for encoding one stream of video frames. An analyzer is provided for analyzing each stream of video frames to derive information on at least one characteristic thereof. The at least one characteristic comprises at least one of an intraframe characteristic or an interframe characteristic. Means are also provided for dynamically adapting the encoding of each stream of video frames using relative information on the at least one characteristic obtained from each stream of video frames. The means for dynamically adapting encoding includes for each stream of video frames means for adjusting the at least one controllable encode parameter employed in the encoding thereof. The encoding of each stream of video frames is thus dynamically adaptive to relative changes in the at least one characteristic obtained from the multiple streams of video frames.

In a still further aspect, an article of manufacture is provided which includes at least one computer usable medium having computer readable program code means embodied therein for causing the processing of multiple streams of video frames. The computer readable program code means in the article of manufacture includes: computer readable program code means for causing a computer to encode the multiple streams of video frames; and computer readable program code means for causing a computer to dynamically adapt encoding of at least one stream of video frames of the multiple streams of video frames based on relative complexity of the video frames.

In yet another aspect, an article of manufacture is provided which includes at least one computer usable medium having computer readable program code means embodied therein for causing the processing of multiple streams of video frames. The computer readable program code means in the article of manufacture includes: computer readable program code means for causing a computer to encode the multiple streams of video frames, the encoding including employing at least one controllable encode parameter for each stream of video frames; computer readable program code means for causing a computer to analyze each stream of video frames to derive information on at least one characteristic thereof, the at least one characteristic comprising at least one of an intraframe characteristic or an interframe characteristic; and computer readable program code means for causing a computer to dynamically adapt the encoding of the stream of video frames using relative information on the at least one characteristic obtained from each stream of video frames. The dynamically adapting of encoding includes for each stream of video frames adjusting the at least one controllable encode parameter employed in the encoding thereof. Thus, the encoding of each stream of video frames is dynamically adaptive to relative changes in the at least one characteristic obtained from the multiple streams of video frames.

To restate, presented herein is a system solution for statistical multiplexing (stat-mux) which encodes several video programs in parallel using, for example, MPEG-2 compatible video encoders. A joint rate control strategy is presented which dynamically allocates bit rates among the encoders. The bit rate of each encoder is determined based on relative complexities of the programs and scene changes occurring within the programs being encoded. The technique requires no external pre-processing of the input video signals. Furthermore, the encoding of video sources is not restricted to requiring the same GOP structure and GOP length in each encoder. Advantageously, each encoder can change its bit rate at GOP boundaries, while still operating at constant bit rate inside the GOPs. Overall, this strategy results in a piece-wise constant, but variable bit rate compression. The encoders can operate with different GOP-lengths and structures, and can be encoding at different times. Thus, there can be time intervals when the sum of the individual bit rates is larger or smaller than the predefined channel bit rate. Further, a strategy is proposed for scene changes which ensures quick reaction of the system to scene changes, thereby resulting in improved picture quality.

BEST MODE FOR CARRYING OUT THE INVENTION

As briefly noted above, this invention relates to a statistical multiplexing control strategy for encoding multiple streams (e.g., channels) of video programs in parallel using multiple video encoders. An external joint rate control strategy is employed which dynamically allocates bit rates among the encoders (which may comprise MPEG compliant encoders and encoding processes such as described in the above-incorporated MPEG-2 International Standard). The bit rate of each encoder is determined based on relative complexities of the programs and adjustments are made at scene changes and GOP boundaries inside the programs. The proposed technique does not require any external pre-processing of the input sources.FIGS. 1 & 2depict the operation of a single video encoder to be employed in a control strategy in accordance with this invention.

For purposes of illustration, a generalized flowchart of MPEG compliant encoding is shown in FIG.1. In the flowchart the images of the ithpicture and the i+1thpicture are processed to generate motion vectors. The motion vectors predict where a macroblock of pixels will be in a prior and/or subsequent picture. The use of motion vectors is a key aspect of temporal compression in the MPEG standard. As shown inFIG. 1, once generated, motion vectors are used for the translation of the macroblocks of pixels, from the ithpicture to the i+1thpicture.

In the encoding process ofFIG. 1, the images of the ithpicture and the i+1thpicture are processed in encoder11to generate motion vectors. An input image111of a subsequent picture goes to the motion estimation unit43of the encoder. Motion vectors113are formed as the output of the motion estimation unit43. These vectors are used by the motion compensation unit41to retrieve macroblock data from previous and/or future pictures, referred to as “reference” data, for output by this unit. One output of the motion compensation unit41is negatively summed with the output from the motion estimation unit43and goes to the input of the discrete cosine transformer (DCT)21. The output of the discrete cosine transformer21is quantized in a quantizer23. The output of the quantizer23is split into two outputs,121and131; one output121goes to a downstream element25for further compression and processing before transmission, such as to a run length encoder; the other output131goes through reconstruction of the encoded macroblock of pixels for storage in frame memory42. In the encoder shown for purposes of illustration, this second output131goes through an inverse quantization29and an inverse discrete cosine transform31to return a lossy version of the difference macroblock. This data is summed with the output of the motion compensation unit41and returns a lossy version of the original picture to the frame memory42.

As shown inFIG. 2, there are three types of pictures. There are “Intra pictures” or “I” pictures which are encoded and transmitted whole, and do not require motion vectors to be defined. These “I” pictures serve as a reference image for motion estimation. There are “Predicted pictures” or “P” pictures which are formed by motion vectors from a previous picture and can serve as a reference image for motion estimation for further pictures. Finally, there are “Bidirectional pictures” or “B” pictures which are formed using motion vectors from two other pictures, one past and one future, and can not serve as a reference image for motion estimation.

The various picture types are quantized by encoder11in several steps. First, a quantization matrix, unique to a picture type, is applied to an 8×8 DCT block. The elements (weights) of the matrix are chosen such that importance is given to low frequency coefficients. These coefficients contain more information and contribute more to the perceptual quality of the picture. Then, a quantization scaling factor is computed based on the local image activity, complexity of the picture type, and a measure of buffer fullness. This index is directly related to the number of bits allocated to a picture and its perceived quality. The actual number of bits is obtained by first scanning each DCT block and then grouping the quantized coefficients together, according to the procedures defined in the MPEG-2 standard. Each group is entropy coded with a unique variable length code (VLC), using a Huffman lookup table. DC coefficients are encoded, employing differential pulse code modulation (DPCM) (similar to encoding of motion vectors) and uniform quantization.

The output of the entropy coder is input to an entropy decoder. The output of the decoder goes through an inverse scan, inverse quantization and inverse discrete cosine transformation to return a lossy version of the difference macroblock. The decoded picture is then passed through a delay to motion estimation and/or motion compensation, as is known in the art.

The operational functions of an MPEG-2 encoder are discussed in greater detail in commonly assigned, co-pending U.S. patent application Ser. No. 08/831,157, by Carr et al., filed Apr. 1, 1997, entitled “Control Scheme For Shared-Use Dual-Port Predicted Error Array,” which is hereby incorporated herein by reference in its entirety. The fundamentals of constant bit rate (CBR) and variable bit rate (VBR) encoding schemes are described with reference to groups of pictures (GOPs) or frames in detail in commonly assigned, co-pending U.S. patent application Ser. No. 09/044,642, by N. Mohsenian, filed Mar. 19, 1998, entitled “Real-Time Single Pass Variable Bit Rate Control Strategy And Encoder,” which is hereby incorporated herein by reference in its entirety. Adaptive encoding of a sequence of frames using image statistics such as described herein below, is described in additional detail in commonly assigned, co-pending U.S. patent application Ser. No. 09/046,118, by Boice et al., filed Mar. 20, 1998, entitled “Adaptive Encoding Of A Sequence Of Still Frames Or Partially Still Frames Within Motion Video,” which is also hereby incorporated herein by reference in its entirety.

With the above information as background, statistical multiplexing and rate control strategy in accordance with the principles of the present invention is described below with reference toFIGS. 3-12.

In typical statistical multiplexing systems, several video bitstreams are multiplexed onto one single constant bit rate channel. Unfortunately, encoding of each program at a predefined constant bit rate can lead to picture quality degradation due to changes in scene content over time. Thus, the underlying objective of multi-program compression in accordance with the present invention is to dynamically distribute the available bandwidth among the programs in order to maximize the overall video quality of the system. This corresponds to equalizing the picture quality of all programs using a joint rate control algorithm that guides the individual coders. The invention allocates bit rates among the encoders according to the relative scene content of the video sources, while still meeting the requirement of a fixed channel bit rate.

More particularly, a system solution for statistical multiplexing is presented for encoding several video programs in parallel using MPEG-2 compatible video encoders. An external joint rate control algorithm that dynamically allocates bit rates among the encoders is described. The bit rate of each encoder is determined based on relative complexities of the programs and scene changes inside the programs. A system/method in accordance with the present invention does not require any external preprocessing of the input sources. Furthermore, the encoding of video sources is not restricted to having the same GOP structure or GOP length in each encoder. Each encoder changes its bit rate at GOP boundaries according to the joint rate control, while it operates at constant bit rate inside the GOPs. Overall, this strategy results in a piece-wise constant, variable bit rate compression. Experimental results show that a multi-program video compression system in accordance with the present invention results in good picture quality without external preprocessing, despite its relative simplicity. Furthermore, commercially available MPEG-2 encoder chips can be used successfully in this system.

Basically, two different approaches are possible for joint rate control, a feedback-approach or a look-ahead approach. In a feedback approach, statistics are generated by the encoders as a by-product of the encoding process. These statistics are then used to control the bit-allocation for the subsequent pictures. In a look-ahead approach, statistics are computed by a preprocessor prior to encoding, with these statistics then being used to adjust the bit rates before encoding the pictures. With either approach, finding the optimum statistics which describe the complexity of a program can be challenging. In the feedback approach, the statistics are mostly limited to coding related quantities. The look-ahead approach can have more freedom but the price is extra computational complexity and/or additional devices.

In both approaches, a joint rate control algorithm would calculate the bit rate for each picture and carry out the entire rate control for each of the individual encoders. This results in variable bit rate encoding. Conventionally, such a rate control algorithm would require mostly identical GOP structure in each encoder, which is, however, far from reality. Encoders can and do operate in different GOP lengths and structures.

Pursuant to this invention, a solution is disclosed for statistical multiplexing by dynamically allocating bit rates for the encoders using a feedback-approach. The rate control strategy distributes the channel bit rate among the encoders based on the relative complexity of the programs. The complexity of the programs is determined using coding statistics that are generated by the encoders along with the compressed bitstreams.

Instead of calculating the target bit rate for each picture by the joint rate control algorithm, the bit rates are changed at GOP boundaries, or if a scene change occurs. This strategy allows the encoders to operate at constant bit rate inside the GOPs, resulting in a piece-wise constant, but variable bit rate compression. The encoders do not have to have identical GOP structures, that is, GOP boundaries can occur in each encoder at different times. Due to the different GOP structures of the encoders, a channel buffer and a corresponding buffer control feedback loop are incorporated into a system in accordance with the present invention. At scene changes, quick reactions are assured by changing GOP structures dynamically and allowing adequate bit rate changes. The present system/method may be implemented using, for example, International Business Machines' single chip MPEG-2 video encoders, part number IBM39 MPEGS422 PBA 17C.

Section 1 below describes a multi-program video compression system in accordance with the present invention. The joint rate control strategy of this invention is then presented in detail in Section 2. The strategy for joint rate control in the case of scene change is described in Section 3. Determination of the minimum size of the channel buffer and the corresponding channel buffer control is given in Section 4. A possible use of commercially available single chip MPEG-2 encoders in the present system is highlighted in Section 5. Experimental results are then given in Section 6.

1. Multi-Program Video Compression System

FIG. 3shows a multi-program video compression system200to encode several programs (Source1, Source2, . . . Source n) in parallel using the feedback approach of the present invention. The example system200consists of several MPEG-2 video encoders210, individual buffers220connected to the encoders210, a joint rate controller230, a multiplexer240, and a channel buffer250. Each encoder generates statistics about the picture that has just been encoded. These statistics are input parameters to the joint rate control algorithm230, which calculates the bit rate of each individual encoder dynamically as described herein below.

In the proposed system200the bit rate of each encoder210is determined based on the relative complexities of the programs (Source1, Source2. . . Source n), and upon occurrence of a scene change inside the corresponding program. The encoders preferably produce bitstreams compatible with the MPEG-2 standard. No additional preprocessing of the input sources is required, with the exception of scene change detection, which can be conventionally done either inside or outside of the encoders210. Each encoder changes its bit rate at GOP boundaries or at scene changes according to the joint rate control230. This allows the encoders to operate at a constant bit rate (CBR) inside the GOPs using the CBR video buffer verifier model according to the MPEG-2 standard. Overall, this strategy results in a piece-wise constant, but still variable bit rate compression.

The encoding of video sources is not restricted to having identical GOP structures or GOP lengths in each encoder. Since GOP boundaries can occur in each encoder at different times and bit rate changes take effect only at GOP boundaries, channel buffer250is employed to compensate possible overflow or underflow of the channel rate. A channel buffer control feedback255is also incorporated into the joint rate control algorithm230in order to prevent channel buffer250overflow or underflow.

In the following description of the present invention, the joint rate control strategy, determination of the minimum size of the channel buffer, and the corresponding channel buffer control are discussed in more detail.

2. Joint Rate Control

The joint rate control strategy presented herein is based on a feedback concept wherein statistics produced by the encoders (along with the compressed bitstream) are fed into the joint rate controller230, together with the information on channel buffer250fullness. The bit rate of a program being encoded is assumed proportional to the ratio between the complexity of that program and the sum of the complexities of all programs being encoded in parallel:
Ri=Rc·Xi/(∑i⁢Xi),(1)
where Riis the bit rate of program i, Rcis the channel rate and Xiis the complexity of program i.

Determination of picture complexity is based on the used bit production model that is similar to the one suggested in MPEG-2 Test Model 5 (See ISO/IEC JTCI/SC29/WG11 N0400, “Test Model 5,” April, 1993):bj=cjQj,(2)
where the model parameter cjis such that to produce a target number of bits bjin a picture, a certain quantization scale Qjhas to be set. Based on Equation (2), the bit rate of program i can be calculated for a time interval of displaying a GOP as:Ri=∑j⁢(Cij/Qij)Ni/fi,(3)
where cijis the bit production model parameter for picture j, Qijis the quantization parameter for picture j, Niis the number of pictures in a GOP, and fiis the frame rate of program i. In a stat-mux system, the goal is to distribute the channel bandwidth among the programs such that:∑i⁢Ri≤RC(4)
To achieve the goal of equalizing the picture quality of all programs, an ideal quantization parameter can be derived using Equations (3) and (4):Qideal=1Rc·∑i⁢((fi/Ni)·∑j⁢cij)(5)
This ideal quantization parameter can result in equal picture quality for all pictures in each program. Using Qidealin Equation (3), the bit rate of each program is calculated as:Ri=Rc·[(fi/Ni)·∑j⁢cij]/[∑i⁢((fi/Ni)·∑j⁢cij)](6)
In a stat-mux system in accordance with this invention, cijis equal to bij·Qij, where bijis bits used for encoding a picture and Qijis the average quantization parameter. Furthermore, the complexity of a program is estimated as the average of the picture complexities using a sliding window of the GOP size.

Due to the relationship of the program complexities, bit rate changes may occur in a program at any of the GOP boundaries, even if a scene change did not take place in that program. If bit rate changes are too abrupt in a program with no scene cut, the picture quality may vary from GOP to GOP significantly, even if the total quality of the system is improved. To prevent this situation, the bit rate changes will be limited on GOP boundaries, but not at scene changes, where no restrictions are preferably imposed. For example, 10% changes relative to the previous bit rate at the GOP boundaries might be allowed if no scene change occurs. If a scene cut takes place, then there is no limitation on bit rate changes.

3. Joint Rate Control at Scene Changes

In a stream of video data, scene changes can occur at any time. They may happen at any picture type and at any GOP position. In the above discussion, it has been assumed that bit rate changes will be effective only at GOP boundaries and the encoders run in constant bit rate (CBR) mode inside the GOPs. A drawback to this approach is that the strategy prevents a quick reaction of the system to complexity changes of the programs. To overcome this problem, special processing is preferably employed in scene change situations.

Scene change detection analysis is carried out between consecutive pictures of each program, either inside the encoders or externally, so that a scene change is known prior to encoding the first picture in a new scene. If a scene change occurs, the current GOP will be finished prematurely. In one embodiment, the first picture in the new-scene is encoded as the last picture of the prematurely-finished GOP and its statistics are then used to predict the complexity of the new scene, and consequently to calculate the bit rate for the subsequent GOP using Equation (6).FIG. 4shows an example of original GOP structures, along with new ones if scene changes occur. Three cases are distinguished depending at which picture type the scene change takes place.

The prediction of the new-scene complexity is based on empirically determined relative complexities of different picture types. If the first picture of the new-scene, which is the last picture of the finishing GOP, is a P picture and every macroblock is encoded as intra, then the complexity of this picture is considered as an I complexity. Based on this I complexity the average complexity of the new scene, Xi, is estimated as:Xi=XI·(1+rP·nP+rB·nB)Ni/fi,(7)
where X1is the complexity of the I picture, nP, nBare the number of P and B pictures in a GOP, and rP, rBare the ratio of the P and B picture complexities with respect to the I picture complexity, respectively. Typical values of rPand rBare 0.5 and 0.25, respectively. The complexity Xiis used in Equation (6) for the bit rate calculation. As more pictures are encoded in the new GOP, the complexity is preferably updated continuously by applying the actual bits used and average quantization parameters used to encode the pictures. As encoding of the GOP continues, the prediction of the complexity of the new scene will change by using the actual coding statistics.

Previously it was stated that the encoders are running in CBR mode inside the GOPs and that each encoder uses a CBR video buffer verifier model. No buffer under- or overflow is allowed. For example, a goal in the CBR rate control algorithm may be to ensure that buffer fullness at the end of the GOP will be the same as the initial buffer fullness (e.g. 80% of the buffer size). This may not always be the case, however, due to mismatch of the target bit budget and of the actual bits used per picture. Because of the over- or underproduction of bits in a GOP, the buffer fullness will be under or over the initial level, respectively. A considerably large buffer fullness error can accumulate. This error is carried over and tried to be compensated for in the next GOP. This rate control works fine if little or no bit rate changes take place at GOP boundaries. If bit rate changes are abrupt, however, such as at scene changes, a buffer fullness error (BFE) strategy in accordance with the present invention is applied to further improve the picture quality.

If scene change occurs, the buffer fullness error is considered to be zero at the beginning of the new GOP after a scene change. To prevent under- or overflow of the buffers connected to each encoder, the bit rate calculated by Equation (6) is modified as:
Rimod=Ri+E·fi/Ni,  (8)
where Riis the calculated bit rate for program i according to Equation (6), E is the buffer fullness error bits, Niis the number of pictures in a GOP and fiis the frame rate for program i. The bit rate of the program will be increased if the buffer fullness error is positive (the buffer fullness in the beginning of the GOP was less than the initial), or it will be decreased if E is negative. For rate control inside the GOP, the initial buffer fullness is considered as the buffer fullness at the end of the previous GOP instead of using, for e.g., 80% of the buffer size. The BFE strategy results in enhanced picture quality after scene changes.

4. Channel Buffer Size and Feedback Control

Due to the fact that the encoders can operate at different GOP-lengths and structures, or may start to encode at different times, there can be time intervals when the sum of the individual bit rates is larger or smaller than the predefined channel bit rate. To remedy this, a channel buffer is required, which will output the bitstream at exactly the channel bit rate. Two issues have to be considered in relation to this buffer. These are the determination of the minimum size of the buffer and the control strategy to prevent channel buffer under- and overflow.

Assume that the maximum total deviation from the channel bit rate is ΔRmaxand, as a worst case, that the maximum duration of this deviation can be as large as the longest GOP-time among the encoders. For this case, the required minimum size of the channel buffer is determined as:
Bs=2·ΔRmax·tgopmax,  (9)
where ΔRmax=ΣRi−Rc, and tgopmaxis the maximum GOP time.

In Equation (9), a factor of 2 is used because under- as well as overproduction of the channel bit rate is assumed and the buffer filled at first until half of this size, Bs, after which it continuously outputs bits at the rate of Rc. In this case, the initial delay corresponds to the time required to fill the buffer until half of its size. As an example, if the channel buffer rate is 16 Mbits/s, ΔRmaxis 8 Mbits/s and tgopmax=0.5 s, the minimum buffer size is 8 Mbits, and the corresponding initial delay is 0.25s at the frame rate of 30 frames/s. Note that if a smaller channel buffer than the one determined by Equation (9) is desired for use in the stat-mux system, then the maximum total deviation from the channel bit rate has to be limited accordingly.

To prevent channel buffer under- or overflow, a buffer model (shown inFIG. 5) is preferably used. The channel buffer model includes predefined guard bands at the top and the bottom of the buffer. These guard bands are used to regulate the distribution of the bit rates. To prevent under- and overflow, the buffer fullness Bfat any time has to fulfill:
0<Bf(t)<Bs(10)
The parameter ‘a’ determines the size of the guard band and it can be chosen, for example, as 0.25.

Depending on the actual buffer fullness, Bf, there are three cases, which can be distinguished. These cases together with the corresponding modification of the bit rates are listed below:

This is the case when the buffer fullness is between the guard bands, that is:
a·Bs≦Bf≦(1−a)·Bs(11)

In this case, the calculated bit rates for the programs are not modified generally, except at extreme circumstances.
if ΣRi>Rcand ΣRi−Rc>(Bs−Bf)/tgopmax
thenRi=Ri·[Rc+((1−a)Bs−Bf)/tgopmax]/(ΣRi)  (12)

otherwise: no action

This is the case when the buffer fullness is in the upper guard band:
Bf>(1−a)·Bs(14)

In this case only bit rate changes are allowed which will decrease buffer fullness or stay at Bf.
if ΣRi>Rc
thenRi=Ri·(Rc/(ΣRi))  (15)

otherwise: no action

This is the case when the buffer fullness is in the lower guard band:
Bf<a·Bs(17)

In this case only bit rate changes are allowed which will increase the buffer fullness or stay at Bf.
if ΣRi<Rc
thenRi=Ri·(Rc/(ΣRi))  (18)

otherwise: no action

5. Using an MPEG-2 Encoder in the Stat-mux System

All MPEG-2 encoders used in a multi-program video compression system in accordance with the principles of the present invention must be capable of providing at least the necessary statistics required by the joint rate control algorithm discussed above. Encoders must also have the ability to change bit rates at GOP boundaries. To further exploit the advantages of this invention, in the event of scene changes encoders must be able to change GOP structure dynamically, provide quantities for calculating the buffer fullness error and carry out scene change detection and reaction either internally or externally.

6. Experimental Results

In order to demonstrate the performance of a system constructed in accordance with the present invention, several experiments were carried out via simulation, using image sequences of different scene contents. The developed multi-program video compression system has been simulated using four MPEG-2 encoders (Enc.1, Enc.2, Enc.3and Enc.4). Each of the encoders had the capability of outputting the required image statistics. The scene change detection was carried out inside the encoders. The video sources were chosen in such a way that each of them represented different scene contents, e.g., sport scenes, nature, head-and-shoulder picture scenes, etc., and each included scene changes.

The first set of video sources were Japan IBM Commercial, Table Tennis, Flower Garden & Mobile Calendar (Flower Garden followed by Mobile and Calendar) and a Care with MTV logo in 4:2:2 chroma format. The sources were encoded in 4:2:0 chroma format. Two B pictures were located between anchor pictures. Closed GOP-length was chosen as 16 in Enc.1and2and as 13 in Enc.3and4. The frame rate was 29.97 frames/s at each encoder. Channel rate was 16 Mbits/s and the channel buffer size was 8 Mbits according to Equation (9). Each encoder started encoding at a bit rate of 4 Mbits/s. This initial bit rate was changed dynamically according to the joint rate control strategy of the present invention.

FIG. 6shows the bit rates allocated dynamically to each encoder using the joint rate controller. It can be seen that the Japan IBM Commercial and MTV sequence had lower bit rates with respect to the other two sources.

The total bit rate generated by the four encoders using the first set of video sources is given in FIG.7. The graph indicates the under- or overproduction of the channel bit rate at 16 Mbits/s demonstrating the necessity of the channel buffer and feedback control.

The performance of the proposed system was compared to a scheme where each encoder codes its source at a fixed bit rate. These encoders carried out scene change detection themselves. Table 1 shows the average PSNR values achieved by the present system and by fixed bit rate (4 Mbits/s) in CBR mode for the first set of video sequences. As the table indicates, the easy sources (Japan IBM, MTV) were encoded at a slightly lower quality in the stat-mux system than at a fixed 4 Mbits/s rate. However, this allows the more complex sources (Table Tennis, FG & MC) to be encoded at higher quality in the proposed system than in the fixed CBR mode. Thus, the stat-mux system in accordance with the present invention provided a better overall picture quality than the fixed bit rate one.

Table 2 shows the average PSNR values for channel bit rate at 32 Mbits/s with channel buffer of 16 Mbits, and for fixed bit rate at 8 Mbits/s CBR mode, using the same video sources.

To demonstrate the effectiveness of the channel buffer model and feedback control,FIG. 8shows the buffer channel fullness during encode of the sequences at a channel bit rate of 32 Mbits/s. As the figure indicates, no buffer under- or overflow occurred during encoding.

For channel bit rate at 16 Mbits/s, Table 3 includes the PSNR values for the first pictures after scene changes using the proposed buffer fullness error (BFE) strategy and without it. As the table indicates, about 0.64-2.17 dB PSNR improvements were achieved using the BFE strategy described herein as compared to the algorithm without it.

For a second set of experiments, IBM WorldBook Commercial (Enc.1), Mixd (Enc.2), Football (Enc.3) and Mixe (Enc.4) were used as input sources. Mixd consists of the Bike, Skyscraper and Basketball sequences, while in Mixe the Susie sequence is followed by a Forest with Cottage scene. These sources are somewhat more complex than the first set of video sources, thus the channel bit rate was chosen as 24 Mbits/s and the channel buffer was 12 Mbits. The coding parameters were the same as in the first set of experiments, except the closed GOP-length was 13 for Enc.1and2, while it was 16 for Enc.3and4. In the CBR case, the bit rate was fixed at 6 Mbits/s.FIG. 9shows the dynamic bit rate changes for the encoders according to the joint rate control strategy of this invention. The total bit rate for encoding the second set of video sources is given inFIG. 10, which indicates the under- and overproduction of the channel bit rate at 24 Mbits/s.

Table 4 includes the average PSNR values achieved by the proposed system and by fixed bit rate (6 Mbits/s) in CBR mode. This table indicates the same trend in visual quality as achieved for the first set of experiments. The stat-mux system of the present invention has resulted in a slightly lower picture quality for simple sources (IBM Worldbook, Mixe), while it improved the quality of the more complex sources (Mixd, Football) in comparison to the CBR mode.

The channel buffer fullness for encoding this second set of video sources at 24 Mbits/s channel bit rate is given inFIG. 11, indicating no buffer under- or overflow.

7. Process Overview

FIG. 12depicts an overview of encode processing in accordance with the present invention. Statistics are fed from the individual encoders as feedback to the rate controller. These statistics can include bits used, average MQUANT, and buffer fullness300. Additionally, information is provided on scene change occurring at each stream of video frames, channel buffer fullness and a maximum GOP length occurring in the system as described above. The channel buffer fullness is received as a feedback signal from the channel buffer itself. The bit rate controller initially determines whether a scene change flag has been set310, indicative of a scene change. If YES, then the first frame of the new scene is either encoded as the last frame of the prior scene or as the first picture of a new one picture GOP320. This first picture of the new scene is then employed to predict complexity of the new scene330.

A bit rate Riis calculated for each encoder340. Processing then again determines whether the scene change flag had been set350, and if so, a buffer fullness error strategy360is employed to modify the bit rate Rifor the encoder. A channel buffer control strategy370is implemented as described above, and processing determines whether the current frame is at a GOP boundary of the stream of video frames being encoded at encoder ENC.i380. If NO, processing returns to collect a next set of input parameters300. If the current frame is at a GOP boundary, then the new bit rate Riis communicated to the encoder ENC.i390.

To again summarize in accordance with this invention, a joint rate control strategy is presented which dynamically allocates bit rates among multiple encoders for encoding video streams in parallel for multiplexing onto a common channel. The channel bit rate is distributed among the encoders based on relative complexity of the programs and scene changes occurring with the programs. The method described herein does not require external preprocessing of the input sources. The complexity of the programs is determined based on coding statistics and scene change detection, which are generated by the encoders along with the compressed bitstreams. Instead of calculating the target bit rate for each picture, the bit rates are changed at GOP boundaries or if a scene change occurs. This allows the encoders to operate in constant bit rate (CBR) inside the GOPs.

Changing bit rate only at GOP boundaries limits reaction time of the joint rate controller for complexity changes of the programs. To address this issue, the scene change detection is assumed to be carried out between each consecutive picture in a stream of video frames, and it is assumed known prior to encoding the first frame in the new scene. Furthermore, an assumption is made that the encoders are capable of changing GOP structure dynamically, which is a capability available on commercially available encoders. If a scene change occurs, the current GOP is prematurely finished and the first picture of the new scene is encoded. The statistics from this first picture of the new scene are then used to predict the complexity of the new scene, and consequently, to calculate the bit rate for the subsequent GOP.

In order to improve picture quality in case of scene change, a further modification was developed. Specifically, the buffer fullness error, resulting from the over- or under-production of bits in a GOP, is considered to be zero at the beginning of a new GOP after a scene change. In order to prevent under- or overflow in the buffers connected to each encoder, the bit rate calculated by the joint rate controller is modified. The bit rate of the program will be increased if the buffer fullness error is positive (the buffer fullness in the beginning of the GOP was less than the initial buffer fullness, (e.g., 80% of buffer size)) or it will be decreased if it is negative. This strategy results in a better picture quality after scene change. The concept can also be extended for encoders without dynamic GOP structure capability, and with the scene change detection being carried out externally.

The encoders operate preferably at the same frame rate, but may have different GOP-lengths and structures or begin encoding at different times. Thus, there can be time intervals when the sum of the individual bit rates is larger or smaller than the pre-defined channel bit rate. A channel buffer is incorporated in the system, which will output the multiplexed bit stream exactly at the channel bit rate. A method to determine the minimum size of the channel has also been developed. It is based on the allowable total deviation from the channel bit rate, and maximum GOP time occurring in the system. In order to prevent channel buffer under- or overflow, a buffer feedback is also incorporated into the joint rate controller.

The present invention can be included, for example, in an article of manufacture (e.g., one or more computer program products) having, for instance, computer usable media. This media has embodied therein, for instance, computer readable program code means for providing and facilitating the capabilities of the present invention. The articles of manufacture can be included as part of the computer system or sold separately.

Additionally, at least one program storage device readable by machine, tangibly embodying at least one program of instructions executable by the machine, to perform the capabilities of the present invention can be provided.

The flow diagrams depicted herein are provided by way of example. There may be variations to these diagrams or the steps (or operations) described herein without departing from the spirit of the invention. For instance, in certain cases, the steps may be performed in differing order, or steps may be added, deleted or modified. All of these variations are considered to comprise part of the present invention as recited in the appended claims.

While the invention has been described in detail herein in accordance with certain preferred embodiments thereof, many modifications and changes therein may be affected by those skilled in the art. Accordingly, it is intended by the appended claims to cover all such modifications and changes as fall within the true spirit and scope of the invention.