IMPROVEMENTS IN OR RELATING TO VIDEO INSERTION IN COMPRESSEDDIGITAL SIGNALSThis invention relates to the insertion of video into a compressed digital signal. In particular the invention is concerned with the insertion of logo, text, video etc.
The superposition or substitution of small areas of a video signal within a picture is a common requirement in television broadcasting. The added video signals may simply consist of station identification logos and/or messages or may consist of more complex signals such as video (e. g. picture in picture). In most cases only a small portion of the original video signal is affected. However, if the video signal is in compressed form the coded bitstream has to be decoded before the new video section can be added and then has to be re-coded again immediately afterwards.
This is not only very costly, particularly if the compressed bitstream represents an encoded HDTV signal, it can also degrade the picture quality due to the additional decode and re-code processing.
It is easy to see how in block-based compression algorithms the picture can be segmented, on a block-by-block basis, into those areas (blocks) that are affected by the added video signal and those which are not. If the compression algorithm does not make use of motion compensation then it is possible to re-code only those blocks in which the video signal has changed. However, if motion compensation is used, this simple approach no longer works because motion compensation from the changed blocks would lead to prediction errors. Worse still, these errors will propagate through the entire image if predictions are made frorv previous predictions. Therefore, existing video insertion circuits decode the entire image and add the video (overlay) signal in the uncompressed domain. Consequently, the entire image has to be re-coded if the signal is required in compressed form.
One object of the present invention is to provide a system which overcomes at least some of the problems of the known systems.
According to one aspect of the present invention there is provided a method of introducing a signal into a first area in an image, which image is represented as a block-based compressed bitstream comprising the steps of decoding only the or each block in the first area and in a second are of the image which relies on motion estimation predictions from the first area; combining the signal with the decoded blocks from the first area; and re-coding the or each block in the first and second areas.
This means that the picture is only re-coded in the area where insertion occurs and other areas of the picture are not changed in any way. A further advantage is the avoidance of error propagation without the need for decoding and re-coding the entire picture.
According to a second aspect of the present invention there is provided apparatus for introducing a signal into a first area in an image, which image is represented as a block-based compressed bitstream comprising a decoder for decoding only the or each block in the first area and in a second are of the image which relies on motion estimation predictions from the first area; a combiner for combining the signal with the decoded blocks from the first area; and a re-coder for re-coding the or each block in the first and second areas.
Reference will now be made, by way of example, to the accompanying drawings, in which:Figure 1 is a block diagram of the video insertion system of the present invention; and,Figure 2 is a diagram representing the spatial position of three signal paths.
A compressed video input signal 10 splits into processing paths 12,14 and 16. The first path 12 passes through a header decoder 18 that analyses header information in the compressed video signal to provide spatial position information of the input video signal to the decision logic 60. The second or decoding path 14 consists of aVariable Length Decoding process (VLD) 20, Inverse Quantisation (Q-') 22, inverseDCT 24 and Motion Compensation (MC) 26. The second path decodes the compressed signal to provide the decompressed video signal'28 for further processing, as well as the motion vectors ZMV"30 to be analyse in the decision logic 60. This second path also provides quantisation information to the rate control.
The third path 16 merely provides of a compensating delay.
After decoding in the second path 14, the video signal 28 splits further into two parallel sub-paths 28 (a) and 28 (b) for re-coding. The first sub-path 28 (a) re-codes the original signal, i. e., without an inserted video signal, but this time avoiding predictions from the insertion area (which will be described in greater detail below).
In the second sub-path 28 (b) the insertion signal 32, e. g., the station logo, is added or inserted before re-coding takes place. Both these processing sub-paths consist of a forward DCT transformation 34 (a) and 34 (b), quantisation 36 (a) and 36 (b) and variable length coding 38 (a) and 38 (b). Motion compensation may also be applied in these paths but is not shown in Figure 1.
The result of splitting the signal in this way is that there are three possible ways in which the input can be processed. These respectively result in outputs A, B and C, as shown in Figure 1. Which of these outputs is selected depends on the decision logic 60, which operates switch 40.
The output signals A, B and C are generated along paths 16,14 and 28 (a) and 14 and 28 (b) respectively. The effect of path 16 (output A) is a mere delay. The effect of path 14 and 28 (a) (output B) is a decoded and re-coded signal without motion  compensation from the area of the picture where the video signal is inserted. The effect of path 14 and 28 (b) is insertion of the relevant video signal which is added to or replaces the decoded video signal before re-coding.
The reason behind having these three paths can be illustrated with respect to Figure 2. Figure 2 shows a picture or image 48 having three areas 42,44 and 46. Area 42 is referred to as the bypass area. If the decoded video signal is in this area and does not take predictions from the insertion area 46 then the switch 40 in Figure 1 is set to A and the compressed signal is input directly into the output buffer 50. If the decoded video signal is in area 44 and takes predictions from the insertion area 46 the switch 40 in Figure 1 is set to B and the decoded signal is re-coded without motion predictions for the insertion area 46. Finally, if the decoded video signal is inside the insertion area 46 and the switch 40 in Figure 1 is switched to C, the insertion signal is added to or replaces the decoded video signal before re-coding.
The video signal selected by switch 40 is put into the output rate buffer 50. The rate buffer is used to provide the compressed video output signal at a data rate that is similar, but not necessarily identical, to the input data rate. The rate control monitors the occupancy of the rate buffer and controls the forward quantisation QP2. If the rate buffer is not in danger of overflowing, Qu'ils set to the same value as the decoded quantisation QP'. If the rate buffer occupancy increases above a certain threshold, forward quantisation Qu'ils increased thus reducing the data generated by the re-coding processes and avoiding buffer overflow.
It will be appreciated that the shapes and sizes of the areas in the picture-may vary for different types of insertion. The processing steps carried out in each path or subpath may vary dependant on the type of input signal and the nature of the compressed bitstream.
The present invention offers the greatest advantages for the insertion of video in a picture, but those skilled in the art will see the application of the invention to other situations.