Abstract:
A method of receiving video data comprising the steps of: receiving at least one chunk of video data comprising a number of sequential key video frames where the number is at least two and, constructing at least one delta frame between a nearest preceding key frame and a nearest subsequent key frame from data contained in the either or each of the nearest preceding and subsequent frames.

Description:
TECHNICAL FIELD AND BACKGROUND ART 
       [0001]    Visual recordings of moving things are generally made up of sequences of successive images. Each such image represents a scene at a different time or range of times. This invention relates to such sequences of images such as are found, for example, in video, film and animation. 
         [0002]    Video takes a large amount of memory, even when compressed. The result is that video is generally stored remotely from the main memory of the computer. In traditional video editing systems, this would be on hard discs or removable disc storage, which are generally fast enough to access the video at full quality and frame rate. It is foreseen that people will wish to access and edit video file content remotely, over the internet, in real time. 
         [0003]    This invention relates to the applications of video editing (important as much video content on the web will have been edited to some extent), video streaming, and video on demand. 
         [0004]    At present any media player editor implementing a method of transferring video data across the internet in real time suffers the technical problems that:
       (1) the internet connection speed available to internet users is, from moment to moment, variable and unpredictable; and   (2) that the CPU speed available to internet users is from moment to moment variable and unpredictable.       
 
         [0007]    For the application of video editing consistent image quality is very preferable, because many editing decisions are based on aspects of the image, for example, whether the image was taken in focus or out. 
       STATEMENT OF INVENTION 
       [0008]    It is an object of the present invention to alleviate at least some of the aforementioned technical problems. Accordingly the present invention provides a method of receiving video data comprising the steps of: receiving at least one chunk of video data comprising a number (n) of sequential key video frames where the number (n) is at least two and, constructing at least one delta frame between a nearest preceding key frame and a nearest subsequent key frame from data contained in either, or each, of the nearest preceding and subsequent frames. 
         [0009]    Preferably the delta frame is composed of a plurality of component blocks or pixels and each component of the delta frame is constructed according to data indicating it is one of: the same as the corresponding component in the nearest preceding key frame, or the same as the corresponding component in the nearest subsequent key frame, or a new value compressed using some or all of the spatial compression of the delta frame and information from the nearest preceding and subsequent frames. After the step of construction the delta frame may be treated as a key frame for the construction of one or more further delta frames. Delta frames may continue to be constructed in a chunk until either: a sufficiently good predetermined image playback quality criterion is met or the time constraints of playing the video in real time require the frames to be displayed. 
         [0010]    The number of key frames in a chunk is in the range from n=3 to n=10. 
         [0011]    Although the method may have other applications it is particularly advantageous when the video data is downloaded across the internet. In such a case it is convenient to download each key frame in a separate download slot, the number of said download slots equating to the maximum number of download slots supportable by the internet connection at any moment in time. Preferably each slot is implemented in a separate thread. 
         [0012]    Where it is desired to subsequently edit the video it is preferable that each frame, particularly the key frames are cached upon first viewing to enable subsequent video editing. 
         [0013]    According to another aspect of the present invention there is provided a media player having means to implement the method which preferably comprises a receiver to receive chunks of video data consisting of at least two key frames, and a processor adapted to construct a delta frame sequentially between a nearest preceding key frame and a nearest subsequent key frame. Preferably, a memory is also provided for caching frames as they are first viewed to reduce the subsequent requirements for downloading. 
         [0014]    According to a third aspect of the present invention there is provided a method of compressing video data so that the video can be streamed across a limited bandwidth connection with no loss of quality on displayed frames which entails storing video frames at various temporal resolutions which can be accessed in a pre-defined order, stopping at any point. Thus multiple simultaneous internet accesses can ensure a fairly stable frame rate over a connection by (within the resolution of the multitasking nature of the machine) simultaneously loading the first or subsequent temporal resolution groups of frames from each of a number of non-intersecting subsets of consecutive video frames until either all the frames in the group or downloaded, or there would probably not be time to download the group, in which case a new group is started. 
         [0015]    The invention described herein is a method for enabling accurate editing decisions to be made over a wide range of internet connection speeds, as well as video playback which uses available bandwidth efficiently to give a better experience to users with higher bandwidth. Traditional systems have a constant frame rate, but the present invention improves quality by adding extra delta frame data, where bandwidth allows. 
     
    
     
       DESCRIPTION 
         [0016]    A method of compressing video data and a media player for implementing the method will now be described, by way of example only, with reference to the accompanying drawings in which: 
           [0017]      FIG. 1  is a schematic diagram of a sequence of video frames; 
           [0018]      FIG. 2  is a schematic diagram illustrating construction of a delta frame; and 
           [0019]      FIG. 3  is a schematic diagram of a media player. 
       
    
    
       [0020]    A source which contains images making up a video, film, animation or other moving picture is available for the delivery of video over the internet. Images ( 2 ,  4 ,  6  . . . ) in the source are digitised and labelled with frame numbers (starting from zero) where later times correspond to bigger frame numbers and consecutive frames have consecutive frame numbers. The video also has audio content, which is split into sections. 
         [0021]    The video frames are split into chunks as follows: 
         [0022]    A value of n is chosen to be a small integer 0&lt;=n. In one implementation, n is chosen to be 5. A chunk is a set of consecutive frames of length 2n. All frames appear in at least one chunk, and the end of each chunk is always followed immediately by the beginning of another chunk. 
         [0023]    “f” represent the frame number in the chunk, where the earliest frame ( 2 ) in each chunk has f=0, and the last ( 8 ) has f=2n−1. 
         [0024]    All f=0 frames in a chunk are compressed as key frames—that is they can be recreated without using data from any other frames. All frames equidistant in time between previously compressed frames are compressed as delta frames recursively as follows: 
         [0025]    Let frame C ( FIG. 2 ) be the delta frame being compressed. Then there is a nearest key frame earlier than this frame, and a nearest key frame later than this frame, which have already been compressed. Let us call them E and L respectively. Each frame is converted into a spatially compressed representation, in one implementation consisting of rectangular blocks of various sizes with four Y or UV values representing the four corner values of each block in the luminance and chrominance respectively. 
         [0026]    Frame C is compressed as a delta frame using information from frames E and L (which are known to the decompressor), as well as information as it becomes available about frame C. 
         [0027]    In one implementation, the delta frame is reconstructed as follows: 
         [0028]    Each component ( 12 ) of the image (pixel or block) is represented as either: 
         [0029]    the same as the corresponding component ( 10 ) in frame E; or 
         [0030]    the same as the corresponding component ( 14 ) in frame L; or 
         [0031]    a new value compressed using some or all of spatial compression of frame C, and information from frames E and L. 
         [0032]    Compressing the video data in this way allows the second part of the invention to function. This is described next. 
         [0033]    When transferring data across the internet, using the HTTP protocol used by web browsers the described compression has advantages, for example enabling access through many firewalls. The two significant factors relevant to this invention are latency and bandwidth. The latency is the time taken between asking for the data and it starting to arrive. The bandwidth is the speed at which data arrives once it has started arriving. 
         [0034]    For a typical domestic broadband connection, the latency can be expected to be between 20 ms and 1 s, and the bandwidth can be expected to be between 256 kb/s and 8 Mb/s. 
         [0035]    The invention involves one compression step for all supported bandwidths of connection, so the player ( 16 ,  FIG. 3 ) has to determine the data to request which gives the best playback experience. This is done as follows: 
         [0036]    The player has a number of download slots ( 20 ,  22 ,  24  . . . ) for performing overlapping downloads, each running effectively simultaneously with the others. At any time, any of these may be blocked by waiting for the latency or by lost packets. Each download slot is used to download a key frame, and then subsequent files (if there is time) at each successive granularity. When all files pertaining to a particular section are downloaded, or when there would not be time to download a section before it is needed for decompression by the processor ( 18 ), the download slot is applied to the next unaccounted for key frame. 
         [0037]    In one implementation of the invention, each slot is implemented in a separate thread. 
         [0038]    A fast link means that all frames are downloaded, but slower links download variable frame rate at 1, ½, ¼ etc of the frame rate of the original source video for each chunk. This way the video can play back with in real time at full quality, possibly with some sections of the video at lower frame rate. 
         [0039]    In a further implementation of the invention, as used for video editing, frames downloaded in this way are cached in a memory ( 20 ) when they are first seen, so that on subsequent accesses, only the finer granularity videos need be downloaded. 
         [0040]    The number of slots depends on the latency and the bandwidth and the size of each file, but is chosen to be the smallest number which ensures the internet connection is fully busy substantially all of the time. 
         [0041]    In one implementation, when choosing what order to download or access the data in, the audio is given highest priority (with earlier audio having priority over later audio), then the key frames, and then the delta frames (within each chunk) in the order required for decompression with the earliest first.