Moving picture experts group decoding apparatus and method for caption display

An MPEG decoder for caption display, and a decoding method for caption display are provided. The MPEG decoder demultiplexes an external-applied MPEG stream into an audio stream and a video stream and decodes the video stream and outputs the decoded video stream on a screen. The decoder includes a video decoder for decoding the video stream and extracting user data from the header information of the video stream. A header memory stores the user data. A central processing unit (CPU) produces caption data by decoding the user data and transforming the caption data into on-screen-display (OSD) object data. An OSD controller for transforms the OSD object data into pixel data in response to a predetermined enable signal and outputs the pixel data. A video mixer mixes the pixel data with the decoded video data. In this way, caption data is produced by extracting user information from the header of an MPEG video stream and decoding the user information. The caption data is transformed into OSD data using OSD modules, so that ordinary televisions can perform a caption function.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to a moving picture experts group (MPEG) decoder, and more particularly, to an MPEG decoder for caption display and a decoding method of the same.

2. Description of the Related Art

A video stream, which is decoded by an MPEG video decoder, has a structure in which a sequence header representing the start of a video sequence and a plurality of groups of pictures (GOPs) are consecutively arranged. Each GOP includes a GOP header and a plurality of pictures such as an I picture, a P picture, and a B picture.

The GOP header includes a user data area. For example, a twenty-first horizontal line in a video stream can be used as the user data area. This user data area is usually used to store caption information.

Generally, a caption function denotes a function of displaying, for example, a Korean or English-language caption on a display screen. In conventional systems, in order to perform a caption function, user data is extracted from the header information of the video stream. The extracted user data is applied as caption data to a video encoder, and generated as an internal caption signal.

FIG. 1is a schematic block diagram of a conventional MPEG decoder. Referring toFIG. 1, the conventional MPEG decoder includes an MPEG A/V demultiplexer100, an audio digital-to-analog converter (DAC)110, a video decoder120, a header first in first out (FIFO) memory130, a central processing unit (CPU)140, and a video mixer150. Also, the video encoder160is shown inFIG. 1for convenience of explanation.

The MPEG A/V demultiplexer100demultiplexes an M-PEG stream applied from an input terminal MIN into a digital audio stream and a video stream. The audio decoder105decodes the audio stream applied from the MPEG A/V demultiplexer100. The audio DAC110converts the decoded digital audio stream applied from the MPEG A/V demultiplexer100into an analog signal and outputs the analog signal via an audio output terminal A—OUT.

The video decoder120decodes the video stream applied from the MPEG A/V demultiplexer100and extracts user data USER—DATA from the GOP header of the video stream. The header FIFO memory130stores the user data USER—DATA extracted from the GOP header. The CPU140receives the user data USER—DATA from the header FIFO memory130and outputs the user data USER—DATA as caption information if the user data is determined to be caption information. The video mixer150mixes a video signal decoded by the video decoder120with on-screen-display (OSD) data applied from an OSD controller (not shown) and outputs the result to the video encoder160. The video encoder160encodes the output of the video mixer150and the user data USER—DATA, that is, caption data, output from the CPU140, and outputs the result of encoding via a video output terminal V—OUT.

In the conventional MPEG decoder shown inFIG. 1, user data USER—DATA extracted from the header of an MPEG video stream is directly output to the video encoder160in order to perform a caption function. The caption function is therefore achieved by expensive encoders or televisions which are specially manufactured to include the caption function. Thus, in the prior art, ordinary televisions cannot perform a caption function.

SUMMARY OF THE INVENTION

An object of the present invention is to provide a moving picture experts group (MPEG) decoder for caption display in which caption data is output using an on-screen-display (OSD) module, thus allowing ordinary televisions to perform a caption function.

Another object of the present invention is to provide a decoding method performed in the MPEG decoder.

Accordingly, to achieve the first object, the present invention provides a moving picture experts group (MPEG) decoder for demultiplexing an external-applied MPEG stream into an audio stream and a video stream and for decoding the video stream and outputting the decoded video stream on a screen. The device includes a video decoder for decoding the video stream and extracting user data from the header information of the video stream. A header memory stores the user data. A central processing unit (CPU) produces caption data by decoding the user data and transforms the caption data into on-screen-display (OSD) object data. An OSD controller transforms the OSD object data into pixel data in response to a predetermined enable signal and outputs the pixel data. A video mixer mixes the pixel data with the decoded video data.

To achieve the second object, the present invention provides a MPEG decoding method. An MPEG video stream is decoded, and user data is extracted from the header of the MPEG video stream. Caption data is produced by decoding the user data. The caption data is transformed into OSD object data, and the OSD object data is stored. The OSD object data is transformed into pixel data if an OSD enable signal has been applied. The pixel data is mixed with video data, and the resultant data is provided as output.

DESCRIPTION OF PREFERRED EMBODIMENTS OF THE INVENTION

Referring toFIG. 2, one embodiment of a moving picture experts group (MPEG) decoder for caption display according to the present invention includes an MPEG audio/video (A/V) demultiplexer200, an audio digital-to-analog converter (DAC)210, an input buffer220, a video decoder230, a header first in first out (FIFO) memory260, a central processing unit (CPU)270, an on-screen-display (OSD) controller280, and a video mixer250.FIG. 2also shows a video encoder290.

The MPEG A/V demultiplexer200receives an MPEG stream from an external source via an input terminal MIN and demultiplexes the received MPEG stream into a digital audio stream and a video stream. The MPEG stream can be applied from a data processor of an external device such as a compact disc player (CDP) or a digital versatile disc player (DVDP). Also, the MPEG stream is defined as a signal which can be applied to a hard disc or a compact disc when it is adapted to computers.

The audio decoder205decodes the audio stream applied from the MPEG A/V demultiplexer200. The audio DAC210converts the decoded digital audio stream into an analog audio signal and outputs the converted analog audio signal via an audio output terminal A—OUT. The input buffer220buffers the video stream and outputs the buffered video stream to the video decoder230. The video decoder230decodes the video stream buffered by the input buffer220and outputs the decoded result to the video mixer250.

The video decoder230includes an MPEG stream decoder232, an inverse quantizer234, an inverse discrete cosine transformer (IDCT)236, a frame memory237, a motion compensator238, and an adder239. The video decoder230decodes, inversely quantizes, and inversely discrete cosine transforms (IDCT) the video bit stream, compensates for the motion of the video bit stream, and outputs the result to the video mixer250. Also, the video decoder230extracts user data USER—DATA from the group of picture (GOP) header information of the video bit stream.

The header FIFO memory260stores the user data USER—DATA extracted by the video decoder230. The CPU270decodes the user data USER—DATA output from the header FIFO memory260and produces caption data. The caption data is transformed into OSD object data OSD—OBJ and is stored in the OSD buffer282of the OSD controller280. Here, the OSD object data is defined as data including information on the positions, sizes and colors of OSD characters to be displayed on a screen.

Also, the CPU270produces an OSD enable signal OSD—EN (not shown) for displaying caption data on a screen. Here, the OSD enable signal OSD—EN may use the start bit of the270. The OSD object data OSD—OBJ can be considered as data transformed by caption information when a caption function is performed. However, when an ordinary function is performed, the OSD object data is considered as data for displaying ordinary OSD characters.

The OSD processor284reads the OSD object data from the OSD buffer282, and transforms the OSD object data into pixel data. The OSD processor284includes a buffer interface unit32, a text OSD (T—OSD) module34, a bit map OSD (B—OSD) module36, a text color look-up table (T—CLUT)35, a bit map color look-up table (B—CLUT)39, and an OSD mixer37. The OSD processor284can be configured using one of T—OSD module34and B—OSD module36. In this case, OSD mixer37is not used, but one look-up table of T—CLUT35and B—CLUT39is used. The buffer interface unit32in the OSD processor284receives the OSD object data OSD—OBJ from the OSD buffer282and transmits the same to the internal block of the OSD processor284.

The T—OSD module34, for displaying text information, receives the OSD object data OSD—OBJ as text OSD information and transforms the text OSD information as pixel data. Also, the T—OSD module34includes a font look-up table for loading a bit map font. The B—OSD module36receives the OSD object data OSD—OBJ as bit map OSD information and transforms the bit map OSD information as pixel data.

The T—CLUT35stores color information for outputting text OSD information, and B—CLUT39stores color information for outputting bit map OSD information. The OSD mixer37receives text pixel data from the T—OSD module34and bit map pixel data from the B—OSD module36, mixes them, and outputs the result of mixing to the video mixer250via an output terminal OSD—OUT. As described above, the OSD object data OSD—OBJ transformed from caption data is transformed into pixel data by the T—OSD module34.

FIG. 4is a flowchart illustrating one embodiment of an MPEG decoding method for caption display according to the present invention. The MPEG decoding method includes steps400and410of decoding an MPEG video stream and of extracting user data from the header of the MPEG video stream, steps420and430of producing caption data by decoding the user data and of transforming the caption data into OSD object data, and steps440,460and470of determining whether an OSD enable signal has been applied, of transforming the OSD data into OSD object data OSD—OBJ, or a special enable signal may be produced and output to the OSD processor284. The CPU270can be a reduced instruction set computer (RISC) processor.

The OSD controller280includes an OSD buffer282and an OSD processor284. The OSD controller280transforms the OSD object data OSD—OBJ output from the CPU270into pixel data in response to the OSD enable signal OSD—EN and outputs the pixel data to the video mixer250. The video mixer250mixes a video signal decoded by the video decoder230with the pixel data output from the OSD controller280. The video encoder290encodes the data output from the video mixer250and outputs the encoded data via a video output terminal V—OUT. An audio signal output via the audio output terminal A—OUT and a video signal output via the video output terminal V—OUT are reproduced on a television monitor.

More specifically, in the video decoder230of the MPEG decoder shown inFIG. 2, the MPEG stream decoder232decodes a video stream received from the input buffer220and outputs a DCT coefficient DCT—CO and motion information MOT—INF. The motion information MOT—INF is information which can include a motion vector value for compensating for the motion of a video signal. The DCT coefficient DCT—CO is inversely quantized by the inverse quantizer234, and the inversely-quantized result is IDC transformed by the IDCT236.

The motion compensator238compensates for the motion between a present picture and a past picture which is stored in the frame memory237, using the motion information MOT—INF vector output from the MPEG stream decoder232. The adder239adds the compensated result of the motion compensator238to the output of the IDCT236and produces a decoded video signal. The video signal output from the adder239is stored as a past picture in the frame memory237. It is used to compensate for the motion of a picture which is applied later.

As described above, the MPEG decoder shown inFIG. 2extracts user data from the GOP header of an MPEG stream and decodes the user data. The decoded caption data is transformed into OSD data, and the OSD data is output via the OSD controller280, such that a caption function is performed.

FIG. 3illustrates an embodiment of the OSD controller280shown inFIG. 2. Referring toFIG. 3, the OSD controller280includes an OSD buffer282and an OSD processor284. The OSD buffer282is usually installed in a memory such as a dynamic random access memory (DRAM). The OSD buffer282stores the OSD object data OSD—OBJ received from the CPU pixel data if the OSD enable signal has been applied, and of mixing the pixel data with video data and outputting the result.

The method ofFIG. 4will now be described in detail. The video decoder230of the MPEG decoder decodes an MPEG video stream in step400. In this step, the MPEG stream decoder232decodes the MPEG video bit stream and produces a DCT coefficient DCT—CO and motion information MOT—INF. The DCT coefficient undergoes inverse quantization and IDCT processes. The resultant coefficient is added to motion-compensated video data, and the added result is applied to the video mixer250. After the MPEG bit stream is decoded in step400, the MPEG stream decoder232extracts user data USER—DATA from the header of the bit stream in step410. Then, the user data USER—DATA is transmitted to the CPU270via the header FIFO memory260. The CPU270decodes the user data USER—DATA and produces caption data in step420.

In step430, the CPU270transforms the received caption data into OSD object data OSD—OBJ and stores the OSD object data OSD—OBJ in the OSD buffer282. Then, in step440, a determination is made as to whether an OSD enable signal OSD—EN for displaying OSD data has been applied from the CPU270.

If it is determined in step440that the OSD enable signal OSD—EN has been applied, the OSD processor284reads OSD object data from the OSD buffer282and transforms the OSD object data into pixel data, in step460. That is, the T—OSD module34in the OSD processor284obtains pixel data corresponding to the OSD object data OSD—OBJ stored in the OSD buffer282. On the other hand, if it is determined in step440that the OSD enable signal OSD—EN has not been applied, the operation of the MPEG decoder remains in a waiting condition in step440.

When the OSD object data is transformed into pixel data in step460, the OSD processor284outputs the pixel data to the video mixer250. The video mixer250mixes the video data decoded by the MPEG video decoder236with the pixel data, in step470. The output data of the video mixer250is encoded by the video encoder290and can be displayed on a television screen. Accordingly, conventional televisions can also perform a caption function by decoding an MPEG stream through the above-described processes.

According to the present invention, caption data is produced by extracting user information from the header of an MPEG video stream and decoding the user information, and the caption data is transformed into OSD data using OSD modules, so that ordinary televisions can perform a caption function. Also, the MPEG decoding method for caption display according to the present invention can be applied to various systems adopting an MPEG decoder, so that a low-priced system having a caption function can be realized.