VIDEO STREAM DECODING METHOD AND VIDEO STREAM DECODING SYSTEM

A video stream decoding system includes a video decoder, a frame encoder, a buffer and a frame decoder. The video decoder receives a video stream, and decodes an encoded frame in the video stream to generate a frame. The frame includes a plurality of coding blocks. The frame encoder includes a first compressor, a second compressor and a selector. The first compressor compresses an image data group in a coding block according to a first compression algorithm to generate a first compressed image data group. The second compressor compresses the image data group in the coding block according to a second compression algorithm to generate a second compressed image data group. The first compression algorithm is different from the second compression algorithm.

This application claims the benefit of Taiwan application Serial No. 105100711, filed Jan. 11, 2016, the subject matter of which is incorporated herein by reference.

BACKGROUND OF THE INVENTION

Field of the Invention

The invention relates in general to a video stream processing method and a video stream processing system, and more particularly to a video stream decoding method and a video stream decoding system.

Description of the Related Art

FIG. 1shows a schematic diagram of a conventional video stream decoding system100. For example, the video stream decoding system100is disposed in a television or a computer. The video stream decoding system100includes a video decoder110, a frame encoder120, a buffer130and a frame decoder140. The frame encoder120includes a compressor122, and the frame decoder140includes a decompressor142. The video decoder110receives a video stream that includes a plurality of encoded frames. The video decoder110decodes the encoded frame to generate a frame that includes a plurality of coding blocks. A coding block is a smallest unit that can be independently encoded or decoded. The frame encoder120encodes the frame by a unit of one coding block. The compressor122in the frame encoder120compresses an image data group in a coding block in the frame to generate a compressed image data group. For example, the compressor122is a fixed length encoder, or a variable length encoder. The compressor122then outputs the compressed video data group to the buffer130via a bus B1. The compressed image data group is temporarily stored in the buffer130as a reference for the video decoder110in a decoding process. When the video decoder110needs to refer to the compressed image data group in the decoding process, the buffer130outputs the compressed image data group to the frame decoder140via the bus B1. The decompressor142in the frame decoder140decompresses the compressed image data group to generate the image data group, and outputs the image data group to the video decoder110as a reference for the video decoder110in the decoding process.

Generally speaking, the compression efficiency of the variable length encoding algorithm is higher. However, for an image data group having small changes in pixel values, the compression efficiency of the variable length encoding algorithm may be lower than that of the fixed length encoding algorithm. When the compressor122is a fixed length encoder or a variable length encoder, the amount of bandwidth usage of the bus B1cannot be reduced as an appropriate encoder cannot be selected for different image data groups.

SUMMARY OF THE INVENTION

The invention is directed to a video stream decoding method and a video stream decoding system capable of selecting an appropriate encoder for different image data groups to enhance the compression efficiency and to accordingly reduce the amount of bandwidth usage of a bus.

According to an aspect of the present invention, a video stream decoding system is provided. The system includes a decoder, a frame encoder, a buffer and a frame decoder. The video decoder receives a video stream, and decodes an encoded frame in the video stream to generate a frame. The frame includes a plurality of coding blocks. The frame encoder includes a first compressor, a second compressor and a selector. The first compressor compresses an image data group in a coding block according to a first compression algorithm to generate a first compressed image data group. The second compressor compresses the image data group in the coding block according to a second compression algorithm to generate a second compressed image data group. The first compression algorithm is different from the second compression algorithm. The selector outputs one of the first compressed image data group and the second compressed image data group to the buffer according to the first compressed image data group and the second compressed image data group. The buffer temporarily stores the outputted compressed image data group. The frame decoder receives the outputted compressed image data from the buffer, decompresses the first compressed image data to generate the image data group, and outputs the image data group to the video decoder. The video decoder decodes another encoded frame in the video stream by referring to the image data group.

According to another aspect of the present invention, a video stream decoding method is provided. The method includes following steps. A video stream including a plurality of encoded frames is received. An encoded frame in the video stream is decoded to generate a frame, which includes a plurality of coding blocks. An image data group in a coding block is compressed according to a first compression algorithm to generate a first compressed image data group. The image data group in the coding block is compressed according to a second compression algorithm to generate a second compressed image data group. The first compression algorithm is different from the second compression algorithm. One of the first compressed image data group and the second compressed image data group is outputted to a buffer according to the first compressed image data group and the second compressed image data group. The outputted compressed image data group is received from the buffer, and is decompressed to generate the image data group. Another encoded frame in the video stream is decoded by referring to the image data group.

DETAILED DESCRIPTION OF THE INVENTION

In the present invention, the same image data is compressed according to different compression algorithms by two or more different compressors to generate two or more compressed image data groups, and the compressed image data group with the best compression efficiency is outputted to a buffer, thereby reducing the amount of bandwidth usage.

FIG. 2shows a schematic diagram of a video stream decoding system200according to an embodiment of the present invention. For example, the video stream decoding system200may be disposed in a television or a computer. The video stream decoding system200includes a video decoder210, a frame encoder220, a buffer230and a frame decoder240. The frame encoder220includes a first compressor222, a second compressor224and a selector226. The video decoder210, the frame encoder220, the buffer230and the frame decoder240are realized by hardware circuits.

The video decoder210receives a video stream, which includes a plurality of encoded frames. The video decoder210decodes an encoded frame in the video stream to generate a frame that includes a plurality of coding blocks. A coding block is a smallest unit that can be independently encoded or decoded by the frame encoder220and the frame decoder240.

The frame encoder220encodes the frame in a unit of one coding block, and outputs a compressed image data group to the buffer230. More specifically, the first compressor222in the frame encoder220compressed an image data group in a coding block in the frame according to a first compression algorithm to generate a first compressed image data group CIDG1, and outputs the first compressed image data group CIDG1to the selector226in the frame encoder220. The second compressor224in the frame encoder220compresses the image data group in the coding block in the frame to generate a second compressed image data group CIDG2, and outputs the second compressed image data group CIDG2to the selector226. The first compression algorithm of the first compressor222is different from the second compression algorithm of the second compressor224. For example, the first compressor222is a fixed length encoder, and the first compression algorithm is a fixed length encoding method; the second compressor224is a variable length encoder, and the second compression algorithm is a variable length encoding method.

The selector226outputs one of the first compressed image data group CIDG1and the second compressed image data group CIDG2according to the first compressed image data group CIDG1and the second compressed image data group CIDG2. For example, the selector226may learn the amount of compressed data of the first compressed image data group CIDG1according to the first compressed image data group CIDG1, and the amount of compressed data of the second compressed image data group CIDG2according to the second compressed image data group CIDG2. The selector226then compares the amount of compressed data of the first compressed image data group CIDG1and the amount of compressed data of the second compressed image data group CIDG2to determine respective compression efficiencies of the first compressor222and the second compressor224. If the amount of compressed data of the first compressed image data group CIDG1is smaller than the amount of compressed data of the second compressed image data group CIDG2, the selector226determines that the compression efficiency of the first compressor222is greater than the compression efficiency of the second compressor224for the image data group in the coding block. Thus, the selector226outputs the first compressed image data group CIDG1to the buffer230via a bus B2. If the amount of compressed data of the second compressed image data group CIDG2is smaller than the amount of compressed data of the first compressed image data group CIDG1, the selector226accordingly determines that the compression efficiency of the second compressor224is greater than the compression efficiency of the first compressor222. Thus, the selector226outputs the second compressed image data group CIDG2to the buffer230via a bus B2. The first compressed image data group CIDG1(or the second compressed image data group CIDG2) is temporarily stored in the buffer230.

When the video decoder210needs to refer to the image data group in the coding block in a decoding process, the frame decoder240receives the first compressed image data group CIDG1(or the second compressed image data group CIDG2) temporarily stored in the buffer230via bus B2, decompresses the first compressed image data group CIDG1(or the second compressed image data group CIDG2) to generate the image data group, and outputs the image data group to the video decoder210. The video decoder210decodes another encoded frame in the frame according to the image data group.

As such, the frame encoder220may select an appropriate encoder for different image data groups to enhance the compression efficiency and to reduce the amount of bandwidth usage of the bus B2.

In one embodiment, for the same image data, if the compression efficiencies of a fixed length encoder (e.g., the first compressor222) and a variable length encoder (e.g., the second compressor224) are equal (e.g., the amount of data of the first compressed image data group CIDG1is equal to the amount of data of the second compressed image data group CIDG2), the selector226may select to output the compressed image data of the fixed length encoder (e.g., the first compressed image data group CIDG1) to the buffer for the decoder210to refer to in a subsequent decoding process. Because the decompression speed of the compressed image data group obtained through the fixed length compression algorithm is greater than the decompression speed of the compressed image data group obtained through the variable length compression algorithm, the decoding speed of the video decoder210can be increased.

FIG. 3shows a flowchart of a video stream decoding method according to an embodiment of the present invention. Referring toFIG. 3, the video stream decoding method300includes following steps.

In step S310, a video stream is received.

In step S320, an encoded frame in the video stream is decoded to generate a frame.

In step S330, an image data group in a coding block in the frame is compressed according to a first compression algorithm to generate a first compressed image data group.

In step S340, the image data group in the coding block in the frame is compressed according to a second compression algorithm to generate a second compressed image data group.

In step S350, it is determined that the compression efficiency of the first compression algorithm is greater than the compression efficiency of the second compression algorithm according to the first compressed image data group and the second compressed image data group.

In step S360, the first compressed image data group is outputted to a buffer.

In step S370, the first compressed image data group is received from the buffer.

In step S380, the first compressed image data group is decompressed to generate the image data group.

In step S390, another encoded frame in the video stream is decoded by referring to the image data group.

The video stream decoding method300may be performed by the video stream decoding system200. Steps S310, S320and S390may be performed by the video decoder210, step S330may be performed by the first compressor222in the frame encoder220, step S340may be performed by the second compressor224in the frame encoder220, steps S350and S360may be performed by the selector226in the frame encoder220, and steps S370and S380may be performed by the decompressor242in the frame decoder240. One person skilled in the art can easily understand details for performing the video stream decoding method300by the video stream decoding system200with reference to the description associated with the video stream decoding system200Such details are omitted herein.

Steps S330and S340may be simultaneously performed. For example, while the first compressor122in the frame encoder120compresses an image data group in a coding block in the frame according to a first compression algorithm, the second compressor124in the frame encoder120may at the same time compress the image data group in the coding block in the frame according to a second compression algorithm.

In one embodiment, the first compression algorithm is a fixed length encoding method, and the second compression algorithm is a variable length encoding method. For example, the first compressor222is a fixed length encoder, and the second compressor224is a variable length encoder. In another embodiment, the first compression algorithm is a variable length encoding method, and the second compression algorithm is a fixed length encoding method. For example, the first compressor222is a variable length encoder, and the second compressor224is a fixed length encoder.

It should be noted that, in the above embodiments, although the video decoder210, the frame encoder220and the frame decoder240are realized by hardware circuits, such examples are not to be construed as limitations to the present invention. In other words, the video decoder210, the frame encoder220and the frame decoder24may also be realized by a processor in conjunction with software programs.