Hits stream rewind

Schemes for rewinding a HITS stream in video recorder and playback systems are presented herein. Reference pictures are stored for a group of pictures, allowing subsequent pictures to be decoded from the reference pictures. The foregoing significantly reduces the number of picture decodes required to display a HITS stream in reverse order.

FEDERALLY SPONSORED RESEARCH OR DEVELOPMENT

Not Applicable

BACKGROUND OF THE INVENTION

The present invention relates to video recorder and playback systems, and more particularly to controlling the presentation of content.

Television (TV) content distribution is quickly migrating from analog formats to compressed digital formats. Currently, distribution of digital video content for TV display is dominated by use of the MPEG-2 video compression standard (ISO/IEC 13818-2). MPEG-2 and its predecessor MPEG-1 define the standards to compress video content using a combination of various techniques. An MPEG-encoded stream may have three types of pictures, Intra-coded (I), Predicted (P) and Bi-directionally predicted (B). I-pictures are not compressed using any temporal predictions and can be decoded without the need of any other picture. The P-pictures perform temporal predictions from a picture that comes before it in the display order. Thus, decode of P-pictures requires one picture (from the past) to be available with the decoder for performing temporal predictions. This prediction picture may be either an I-picture or another P-picture. The B-pictures are bi-directionally predicted and, hence, use two pictures for prediction, one from the past and another from the future (in display order).

During normal decode of MPEG streams, video decoders store the last two decompressed I/P pictures in memory. The last I/P picture is used for predicting an incoming P-picture and the last two I/P pictures are used for predicting an incoming B-picture. During a Rewind operation, the pictures have to be displayed in the reverse order. The video stream is itself fed to the decoder through a system that first recorded the stream on a recordable media such as a hard-disk. A Rewind operation is complex because B-pictures cannot be decoded from the previously decoded pictures in the rewind order. Rather, the last two prediction pictures in the forward decode order are needed by the decoder in order to decode a B-picture.

The foregoing can be accomplished by decoding pictures in the forward picture order starting from the last I-picture before the B-picture in the forward decoding order. The I-picture is used as a reference picture since I-pictures do not require any other picture to be decoded. Further, the intervening pictures between the reference picture and the current picture only need to be decoded but not displayed.

However, a special class of MPEG-2 streams, known as Headend In The Sky (HITS) streams, do not include I-pictures, in order to increase the video compression and reduce the bandwidth required to transmit a video stream. Instead, HITS streams use a progressive refresh mechanism to build reference pictures. The progressive refresh mechanism of HITS mandates that each P-picture have at least one intra-coded slice(s), where a slice is 16 horizontal lines of pictures. Furthermore, the intra-coded slice(s) in a P-picture will be just below the intra-coded slice(s) of the previous P-picture. The top slice is intra-coded for a P-picture following a P-picture with an intra-coded slice at the bottom of the picture. The number of intra-coded slices in a P-picture is called the “refresh-rate” of the stream. The streams also ensure that the slices above the intra-coded slice(s) predict only from those slices of the previous P-picture. The streams also ensure that the slices above the intra-coded slice(s) predict only from those slices of the previous P-picture that are above the current intra-coded slices. Thus, the slices are progressively refreshed from top to bottom. This scheme ensures that if a series of pictures is decoded starting from a P-picture whose first-slice is intra-coded, then a “clean” refreshed picture is built after all slices have been progressively refreshed. The picture whose first-slice is intra-coded is called an Entry Point (EP) picture. Typical values of slice refresh rates are 1 and 3 for a stream with a vertical size of 480 pixels (30 slices, each of 16-lines). Thus, a clean picture may be built by decoding 30 P-pictures when the refresh rate is 1, and 10 P-pictures when the refresh rate is 3.

To perform a Rewind operation on a HITS stream, a video decoder first builds a clean reference using the progressive refresh mechanism, and decodes the intervening pictures between the clean reference and the current picture in the rewind sequence, for each picture.

Thus, an existing decoder has to decode multiple pictures for displaying a single picture. If such a decoder is unable to decode multiple pictures in the given time limit for getting ready with a new picture for display, the video quality suffers.

Further limitations and disadvantages of conventional and traditional systems will become apparent to one of skill in the art through comparison of such systems with the invention as set forth in the remainder of the present application with reference to the drawings.

BRIEF SUMMARY OF THE INVENTION

A system, method, and apparatus for rewinding a HITS stream are described herein. A reference picture is selected for a given segment of pictures, from which each of the pictures in the segment are data-dependent. The pictures in the segment are displayed in reverse order by decoding each picture in the forward decode order between the reference picture and the picture to be displayed for each picture in the segment.

In another embodiment, the reference picture is a clean reference picture in a HITS stream. The pictures in an EP-EP segment are decoded by decoding and storing the clean reference picture immediately preceding the EP to EP segment in the forward order. The pictures in the EP to EP segment are decoded in reverse order by decoding each P-picture in the forward decode order between the clean reference picture and the picture to be displayed. Additionally, multiple B-pictures can be decoded together. As well, a picture can be displayed directly from the past prediction buffer.

In another embodiment, the reference picture includes P-pictures located at some point within an EP to EP segment, a midpoint picture, such as pictures towards the middle of the EP to EP segment. The pictures in the EP to EP segment that come after the midpoint picture are decoded using the midpoint picture as the reference picture. The pictures in the EP to EP segment that are before the midpoint picture are decoded using a clean reference picture.

In another embodiment, three reference pictures are used in an EP to EP segment.

These and other advantages and novel features of the present invention, as well as illustrated embodiments thereof will be more fully understood from the following description and drawings.

DETAILED DESCRIPTION OF THE INVENTION

FIG. 1is a system diagram illustrating an embodiment of a personal video recorder system100that is built in accordance with certain aspects of the present invention. The personal video recorder system100includes a decoder120that receives a data transport stream (TS)115from some source. The TS115may be received by the decoder120from a host processor110, or any other source105without departing from the scope and spirit of the invention. The host processor110or the any other source105is the device that controls the playback (including trick play playback) of the data. The host processor110or the any other source105and the decoder120may be included within a single device or separate devices.

The decoder120is operable to perform decoding of the TS115, as shown in a functional block122within the decoder120. Similarly, the decoder120is operable to perform decoding of the MPEG TS117, as shown in a functional block124within the decoder120. The now decoded TS135, is passed to an output device shown as a display140. Again, other output devices may be employed to accommodate various data types, including audio data types. The use of a display140is used to show the exemplary situation of video data TSs. The display140is operable to perform playback of the now decoded TS135. The decoded TS135maybe of various data types, including audio and video data types.

The decoded TS135is now operable for playback, trick play, and other operations within the output device. In one particular situation, the decoded TS may be a decoded MPEG TS137that is operable for playback, trick play, and other operations.

FIG. 2is a system diagram illustrating an embodiment of a simplified digital channel recording process200that is performed in accordance with certain aspects of the present invention. TheFIG. 2shows one embodiment where digital channel recording may be performed, in a simplified manner when compared to previous systems, using certain aspects of the present invention. The recording process of a digital video stream is given in theFIG. 1. In this embodiment, a personal video recorder (PVR) digital-channel-recording process can be employed as set forth below.

The selected video service is contained in a transport stream (TS) that is received as shown in a radio frequency (RF) signal, which is received by a tuner210. The tuner210is operable to down-convert the channel that contains the transport stream, from RF to intermediate frequency (IF). The Demodulation block, shown as a demodulator215, demodulates the IF to base-band digital data and outputs the transport stream (shown as an MPEG TS) and sends the data to the decryption block220.

The decryption block220decrypts the packets of the TS into clear data if the service is authorized. This output TS stream goes to the Data Transport Processor225. The Data Transport Processor selects the requested service and then re-multiplexes it into a new TS and stores the new TS data in a TS FIFO buffer232in synchronous dynamic random access memory (SDRAM)230.

This new TS is then transferred to a hard disk250. The data within the TS FIFO buffer232is operable to be communicated to the hard disk250. The CPU240controls the storing of the data from the TS FIFO232to the hard drive (hard disk250). This is done using DMA engines which send the data over the PCI bus241to the super I/O controller chip245containing the IDE interface to the hard drive (hard disk250) itself. If desired, the IDE ATA-3 Advanced Technology Attachment Interface with Extensions—AT Attachment 3 Interface protocol is employed between the super I/O controller chip245and the hard disk250. A Start Code Index Table (SCIT)251is also generated and stored in the hard disk250(see below for detailed description). A TS file252is then stored within the hard disk252.

The embodiment of the present invention shown in theFIG. 2shows how a TS may be generated and stored in a hard disk250.

FIG. 3is a system diagram illustrating an embodiment of a video playback process300that is performed in accordance with certain aspects of the present invention. The particular example of video data retrieval and playback is shown in theFIG. 3, but these aspects of the present invention are also extendible to retrieval and playback of other types of data, including audio data and other digital data types.

For a program recorded on the hard drive/hard disk310, a personal video recorder, or other operable system, can play back that program using that which is described below in the system diagram of theFIG. 3. A processor, that may include a CPU390, reads the TS data (shown as the TS file312) from the hard drive/hard disk310based on the user selected playback mode. The correct TS data (from the TS file312within the hard drive/hard disk310) is read into TS presentation buffer332within a SDRAM330using DMA engines.

Data may be read from the hard drive/hard disk310in a manner similar to the manner in which data is written into the hard drive/hard disk310, a super I/O controller chip320may communicatively couple with the hard disk310and perform data transfer using the IDE ATA-3protocol. The super I/O controller chip320then communicatively couples to the TS presentation buffer332within the SDRAM330via a PCI bus323and a PCI I/F325. The data is output from the TS presentation buffer332and is then passed to a data transport processor335. The data transport processor then de-multiplexes the TS into its PES constituents and passes the audio TS to an audio decoder360and the video TS to a video transport processor340and then to a MPEG video decoder345that is operable to decode and extract embedded, TS formatted command packets, which may include instructions to perform trick play functionality. The audio data is then sent to the output blocks, and the video is sent to a display engine350. The display engine350is responsible for and operable to perform scaling the video picture, rendering the graphics, and constructing the complete display, among other functions. Once the display is ready to be presented, it is passed to a video encoder355where it is converted to analog video using an internal digital to analog converter (DAC). The digital audio is converted to analog in the audio digital to analog converter (DAC)365while a Sony Philips Digital Inter-Face (SPDIF) output stream is also generated and transmitted.

The video TS comprises pictures that are compressed representations of individual images forming a video. The video decoder345decompresses the pictures, thereby recovering the individual images forming the video. Compression is achieved by taking advantage of both spatial and temporal redundancy in the image forming the video. Compression using temporal redundancy takes advantage of redundancies between video images recorded in substantially the same time period. Redundant features among the images are recorded in one picture referenced by other pictures. As a result, some pictures are data dependent on other pictures. The video decoder345includes reference picture frame buffers for storing reference pictures for use in decoding pictures.

Referring now toFIG. 4, there is illustrated a block diagram describing an exemplary HITS stream. A HITS stream is a special class of MPEG-2 streams that includes P-pictures, P, and B-pictures, B, but does not include I-pictures. There are usually a uniform number of B-pictures, for example B01and B02, between each of the P-pictures. HITS streams do not include I-pictures because I-pictures require the most memory and bandwidth. Instead, HITS streams use a progressive refresh mechanism to build reference pictures. In the progressive refresh mechanism, each P-picture, P, has at least one intra-coded slice(s), I, where a slice comprises 16 horizontal lines of pixels. Furthermore, the intra-coded slice(s) in a P-picture, e.g., P5will be just below the intra-coded slice(s) of the previous P-picture, e.g., P4. The top slice, I, is intracoded for a P-picture, P0, following a P-picture, P, with an intracoded slice, I, at the bottom of the picture. Additionally, the streams also ensure that the slices above the intra-coded slices, S, predict only from those slices of the previous P-picture that are above the current intracoded slice(s), I. The foregoing ensures that if a series of pictures is decoded starting from a P-picture whose first-slice is intra-coded, then a “clean” refreshed picture is built after all slices have been progressively refreshed. The P-picture whose first-slice is intra-coded is called an Entry Point (EP) picture, EP. The P-picture immediately before the EP picture, EP, i.e., the P-picture with the I-slice(s), I, at the bottom of the picture, RP, will be referred to as a clean reference picture.

The rewind operation on a HITS stream, starting from arbitrarily chosen picture, B5,2, can be achieved by building the clean reference picture, RP1, immediately preceding the arbitrarily chosen picture B5,2, and decoding each intervening P-picture in the forward decode order before the chosen picture, B5,2. Building the clean reference picture RP1involves decoding each P-pictures in the EP to EP segment comprising RP1, e.g., P0′ . . . P5′. While decoding the intervening P-pictures, the last two P-pictures are stored in memory. Upon decoding the last two P-pictures, P4, P5before the chosen picture, B5,2, the decoder can then decode the chosen picture. The foregoing is repeated for each picture in the rewind sequence. The decoded pictures for various pictures in the rewind sequence for the HITS stream illustrated inFIG. 3are shown in the table below.

(B+1)⁢Px=1P⁡(P+1)*1.5where B=# of B-pictures between P-pictureswhere P=# P-pictures in EP to EP segment

From the above formula, in the example where P=6, and B=2, 189 pictures are decoded to display 18 pictures in reverse order, or an average of 9.5 decoded pictures/displayed picture.

In order to reduce the processing requirements of the video decoder345, in accordance with the present invention, the clean reference pictures, e.g., RP0, RP1, are stored in a reference picture frame buffer. By storing the clean reference picture in the reference picture frame buffer, the video decoder345need only build the reference picture one time for an entire EP-EP segment. Each picture of the EP-EP segment can then be decoded by decoding only the intervening pictures between the clean picture and the picture in the rewind sequence. For example, by storing RP0in a reference picture frame buffer, RP0need only be decoded once for all the pictures, P0. . . P5.

Referring now toFIG. 5, there is illustrated a flow diagram for displaying pictures in a HITS stream during a rewind operation in accordance with an embodiment of the present invention. At700the EP-EP segment in the current rewind order is selected. At705, the clean reference picture preceding the EP-EP segment is decoded. At710, the clean reference picture is stored in a reference picture frame buffer. At715, each intervening P-picture between the clean picture and the picture to be displayed is decoded in the forward decode order. During decoding of the P-pictures the last two P-pictures in the forward decode order are stored in frame buffers. Upon decoding and storing the last two P-picture in the forward decode order that precede the picture to be displayed, the picture to be displayed can be decoded. Accordingly, at720, the picture to be displayed is decoded and displayed. At725, if there are remaining pictures in the EP to EP segment to be displayed, the next picture in the rewind sequence is selected, and715-720are repeated. If at725, there are no remaining pictures in the EP to EP segment, the next EP to EP segment is selected at700, and705-725are repeated.

By storing the clean reference picture in a frame buffer, the clean reference picture need only be decoded one time per EP to EP segment. Accordingly, the number of pictures required to decode an EP to EP segment is:

where B=# of B-pictures between P-pictures (B=2 in the example)

P=# of P-pictures per EP to EP segment (P=6 in the example)

The sequence of decoded pictures for the rewinding the pictures shown inFIG. 4is described in the table below:

As can be seen from the foregoing, an EP to EP segment with 2 B-pictures between the 6 P-pictures requires decoding 69 pictures, or 3.833 decoded pictures/displayed picture.

It is noted that both Bx1and Bx2are both dependent on Pxand Px+1. Bx1 and Bx2can be decoded and displayed by first decoding each of the P pictures between R and Px+1, and then decoding and displaying Bx2. After decoding and displaying Bx2, the P pictures including and between RP0and Px+1are decoded and then Bx1is decoded and displayed. However, after decoding and displaying Bx2, the pictures, Pxand Px+1are stored in the past prediction buffer and the future prediction buffer. Accordingly, Bx1can be decoded without decoding the P-pictures including and between RP0and Px+1.

Referring now toFIG. 6, there is illustrated a flow diagram for displaying pictures in a HITS stream during a rewind operation in accordance with an embodiment of the present invention. At800the EP to EP segment in the current rewind order is selected. At805, the clean reference-picture preceding the EP to EP segment is decoded. At810, the clean reference picture is stored in a reference picture frame buffer. At815, each intervening P-picture between the clean picture and the picture to be displayed is decoded in the forward decode order. During decoding of the P-pictures the last two P-pictures in the forward decode order are stored in frame buffers. Upon decoding and storing the last two P-picture in the forward decode order which precede the picture to be displayed, the picture to be displayed can be decoded. Accordingly, at820, the picture to be displayed is decoded and displayed.

At825, a determination is made whether there are any remaining pictures in the EP to EP segment. If there are no remaining pictures in the EP to EP segment, the next EP to EP segment is chosen at800, and805-825are repeated.

If during825, there are remaining pictures in the EP to EP segment, at830the next picture in the rewind sequence is selected. At832, a determination is made whether both the picture displayed during820and the next picture selected during830are both B-pictures. If both the picture displayed during820and the next picture selected during830are both B-pictures, the next picture selected during830can be decoded using the P-pictures that are stored in the frame buffers. Accordingly, the next picture is decoded from the P-pictures that are stored in the frame buffer at820and825is repeated. If both the picture displayed during820and the next picture selected during830are not both B-pictures,815-832are repeated.

For the exemplary HITS stream described inFIG. 4, the order of decodes and displays is shown in the table below.

The number of pictures that are decoded can be determines with the following formula:

P+2*∑X=0P⁢X+B*Pwhere B=# of B-pictures between P-picturesP=# of P-pictures per EP to EP segment

As can be seen from the foregoing, an EP to EP segment with 2 B-pictures between the P-pictures requires decoding 66 pictures, or 3.666 decoded pictures/displayed picture. The number of picture decodes for other P and B values is shown below.

B-pictures use two prediction pictures to decode. One of these prediction pictures comes before the B-picture in the forward display order (known as the past prediction picture) and one of the prediction pictures comes after the B-picture (future prediction picture). For example, with B-picture B3,1, the past prediction picture is P3and the future prediction picture is P4. Therefore, if all of the B-pictures that are dependent on P3and P4are decoded and displayed, one of the prediction buffers of the video decoder contains the past prediction picture, e.g., P3, that comes next in the rewind order. Accordingly, the past prediction picture can displayed directly from the past prediction buffer.

Referring now toFIG. 7there is illustrated a flow diagram for displaying pictures in a HITS stream during a rewind operation in accordance with an embodiment of the present invention. At900the EP to EP segment in the current rewind order is selected. At905, the clean reference picture preceding the EP to EP segment is decoded. At910, the clean reference picture is stored in a reference picture frame buffer. At915, each intervening P-picture between the clean picture and the picture to be displayed is decoded in the forward decode order. During decoding of the P-pictures the last two P-pictures in the forward decode order are stored in frame buffers. Upon decoding and storing the last two P-picture in the forward decode order which precede the picture to be displayed, the picture to be displayed can be decoded. Accordingly, at920, the picture to be displayed is decoded and displayed.

At925, a determination is made whether there are any remaining pictures in the EP to EP segment. If there are no remaining pictures in the EP to EP segment, the next EP to EP segment is chosen at900, and905-925are repeated.

If during925, there are remaining pictures in the EP to EP segment, at930the next picture in the rewind sequence is selected. At932, a determination is made whether both the picture displayed during920and the next picture selected during930are both B-pictures. If both the picture displayed during920and the next picture selected during930are both B-pictures, the next picture selected during930can be decoded using the P-pictures that are stored in the frame buffers. Accordingly, the next picture is decoded and displayed (934) from the P-pictures that are stored in the frame buffer at920and925is repeated. If both the picture displayed during920and the next picture selected during930are not both B-pictures, a determination935is made whether the next picture is a P-picture. If the next picture is a P-picture, the contents of the past prediction picture is displayed directly from the past prediction buffer and915-932are repeated. If during935, the next picture is not a P-picture,915to935are repeated.

For the exemplary HITS stream described inFIG. 4, the order of decodes and displays is shown in the table below.

The number of pictures that are decoded can be determines with the following formula:
(1.5+P/2+B)P

As can be seen from the foregoing, an EP to EP segment with 2 B-pictures between the P-pictures requires decoding 39 pictures, or 2.166 decoded pictures/displayed picture. The number of decodes for other values of P and B are shown below:

In the above strategy, after building a clean reference picture, the complete EP to EP segment following the clean picture is displayed. An alternative scheme is to build an additional reference picture within an EP to EP segment to minimize the number of pictures that need to be decoded. This additional reference picture is preferably at a midpoint of the P-pictures in an EP to EP segment, such as P3 in the HITS stream described inFIG. 4.

The sequence of decoded pictures for rewinding the pictures illustrated inFIG. 4is listed in the table below:

The number of pictures that are decoded can be determined with the following formula:
(3+P/4+B)P

As can be seen from the foregoing, an EP to EP segment with 2 B-pictures between the P-pictures requires decoding 39 pictures, or 2.166 decoded pictures/displayed picture. Although the foregoing requires the same number of picture decodes as the previous example, the benefits of additional reference pictures become more apparent with higher values for P and B. The number of decodes for other values of P and B are shown below:

The number of midpoint pictures that are stored can be further increased. The number of pictures required to decode a sequence where three reference pictures are used is described by the following formula:
(4.5+B+P/6)P

The number pictures that are decoded for different B's and P's are described in the table below:

It is also noted that, in general, B-pictures require less memory and bandwidth than P-pictures. Based on empirical statistical data, a B-picture consumes approximately 25% of the data and processing requirements as a P-picture. The foregoing can be factored into the formula by weighting the number of B-pictures by 0.25. The weighted and unweighted number of decodes for schemes presented herein for different P and B are shown below:

Referring now toFIG. 8, there is illustrated a block diagram of an exemplary video decoder345in accordance with an embodiment of the invention. The video decoder receives pictures form a presentation buffer and decodes the pictures for display. The decoded pictures for display are provided to the display engine. The video decoder345includes a decompression engine1151, a cache memory1152, and frame buffers1153. The decompression engine1151performs the requisite decompression of received pictures, transforming the pictures into frames for display. As noted above, the pictures are data dependent from other pictures. Accordingly, the decompression engine1151stores past prediction pictures, future prediction pictures, and reference pictures in the frame buffers1153. Additionally, the decompression engine1151can store reference pictures in the frame buffers as well. While decoding pictures for display that are data dependent on the pictures stored in the frame buffers, the decompression engine1151uses the pictures stored therein to decode and provide the picture for display to the display engine350. Additionally, the video decoder also includes a cache1152for storing pictures therein, to facilitate decoding pictures for display.

The personal video recorder system200as described herein may be implemented as a board level product, as a single chip, application specific integrated circuit (ASIC), or with varying levels of the system integrated on a single chip with other portions of the system as separate components. The degree of integration of the monitoring system may primarily be determined by speed of incoming MPEG packets, and cost considerations. Because of the sophisticated nature of modem processors, it is possible to utilize a commercially available processor, which may be implemented external to an ASIC implementation of the present system. Alternatively, if the processor is available as an ASIC core or logic block, then the commercially available processor can be implemented as part of an ASIC device wherein the memory storing instructions is implemented as firmware.

In one embodiment can be implemented by insertion of command packets within the MPEG TS with appropriate TS formatted trick play commands by a host processor, such as host processor described in “Command Packets for Personal Video Recorders”, application Ser. No. 09/951,693, by Demas et. al, which is incorporated herein by reference.