A picture encoding method of the present invention is a picture encoding method of predictively encoding an input picture with reference to pictures stored in a picture buffer, decoding the encoded input picture, judging whether or not the decoded picture is a picture for reference and whether or not the decoded picture is a picture for output which needs to be stored until its display time, and storing, in the picture buffer, the picture for reference and the picture for output based on the determination result.
DESCRIPTION
PICTURE ENCODING METHOD AND PICTURE DECODING METHOD
Technical Field
The present invention relates to a picture encoding method for compressing efficiently a moving picture and a picture decoding method for decoding correctly the encoded picture and displaying it.
Background Art
Recently, with an arrival of the age of multimedia which handles integrally audio, video and pixel values of others, existing information media, i.e., newspapers, journals, TVs, radios and telephones and other means through which information is conveyed to people, has come under the scope of multimedia. Generally speaking, multimedia refers to something that is represented by associating not only with characters but also with graphics, audio and especially pictures and the like together. However, in order to include the aforementioned existing information media in the scope of multimedia, it appears as a prerequisite to represent such information in digital form.
However, when calculating the amount of information contained in each of the aforementioned information media as the amount of digital information, the information amount per character requires 1~2 bytes whereas the audio requires more than 64 Kbits (telephone quality) per second and when it comes to the moving picture, it requires more than 100Mbits (present television reception quality) per second. Therefore, it is not realistic to handle the vast information directly in the digital format via the information media mentioned above. For example, a videophone has already been put into practical use via Integrated'
Services Digital Network (ISDN) with a transmission rate of 64 Kbit/s ~ 1.5 Mbit/s, however, it is not practical to transmit video captured on the TV screen or shot by a TV camera. This therefore requires information compression techniques, and for instance, in the case of the videophone, video compression techniques compliant with H.261 and H.263 standards internationally standardized by ITU-T (International Telecommunication Union-Telecommunication Standardization Sector) are employed. According to information compression techniques compliant with the MPEG-1 standard, picture information as well as music information can be stored in an ordinary music CD (Compact Disc).
Here, MPEG (Moving Picture Experts Group) is an international standard for compression of moving picture signals and MPEG-1 is a standard that compresses video signals down to 1.5 Mbit/s, that is, to compress information of TV signals approximately down to a hundredth. The transmission rate within the scope of the MPEG-1 standard is limited primarily to about 1.5 Mbit/s, therefore, MPEG-2 which was standardized with the view to meet the requirements of high-quality picture allows data transmission of moving picture signals at a rate of 2^15'Mbit/s. In the present circumstances, a working group (ISO/I EC JTC1/SC29/WG11) in the charge of the standardization of the MPEG-1 and the MPEG-2 has achieved a compression rate which goes beyond what the MPEG-1 and the MPEG-2 have achieved, realized encoding/decoding operations on a per-object basis and standardized MPEG-4 in order to realize a new function required by the era of multi media. In the process of the standardization of the MPEG-4, the standardization of encoding method for a low bit rate was aimed, however, the aim is presently extended to a more versatile encoding of moving pictures at a high bit rate including interlaced pictures.
Recently, a new picture encoding as a next generation
encoding of the MPEG-4 called JVC is under the process of the standardization jointly worked by the ITU-T and the ISO/IEC.
Fig. 24 is a diagram showing a prediction structure, a decoding order and a display order of pictures. "Picture" is a term indicating either a frame or a field and the term "picture" here is used in stead of frame or field in the present specification. The hatched pictures in Fig. 24 present the pictures to be stored in the memory for reference when other pictures are encoded/decoded.
10 is an intra coded picture and P3, P6 and P9 are predictive coded pictures (P-picture). The predictive encoding in the scheme of the JVT standard differs from that of the conventional MPEG-1/2/4. An arbitrary picture is selected out of a plurality of encoded pictures as a reference picture and a predictive image can be generated from the reference picture. For example, a picture P9 may select an arbitrary picture out of three pictures of 10, P3 and P6 and generate a predictive image using the selected picture. Consequently, it heightens a possibility to select the more applicable predictive image than the conventional case of applying MPEG-1/2/4 and thereby improves a compression rate. Bl, B2, B4, B5, B7 and B8 are bi-directionally predictive coded pictures (B-picture), differing from inter-picture prediction, wherein a plurality of pictures (two pictures) are selected and a predictive image is generated using the selected pictures and then encoded. It is especially known that the accuracy of the predictive image can be greatly improved and so can be the compression rate by performing interpolation prediction using an average value of two pictures temporally previous and subsequent for generating a predictive image. The marks of "I" for an intra coded picture, "P" for a predictive coded picture and "B" for a bi-directionally predictive coded picture are used in order to differentiate encoding method of each picture.
In order to refer to the temporally previous and subsequent
pictures for the B-pictures, the temporally previous pictures shall be coded/decoded at first. This is called reordering of pictures and often takes place in the conventional MPEG-1/2/4. Therefore, in contrast with an encoding order (Stream Order), an order of displaying the pictures which are decoded (Display Order) is reordered as shown in Fig. 24 showing a prediction structure, a decoding order and a display order of pictures. B-pictures in the example of Fig. 24 are displayed at the moment when the stream is decoded, therefore, there is no need to store them when they are not referred to by other pictures. However, I-pictures and P-pictures have to be stored in a memory since they are displayed after being decoded when the decoding of the following B-picture is terminated.
The terms and the meanings of the hatched pictures in the diagram showing the prediction structure, the decoding order and the display order of the pictures are the same as those used in Fig. 24.
Fig. 26 is a block diagram showing a picture encoding apparatus for realizing a conventional picture encoding method. The following illustrates an operation of the picture encoding apparatus for realizing the conventional picture encoding method in Fig. 26.
A picture structure determination unit PicStruct determines an encoding type (I-picture, P-picture and B-picture) for each picture, notifies a reference picture control unit RefPicCtrl of the encoding type and the pictures that can be referred to in the encoding and informs also a reordering unit ReOrder of the encoding order of the pictures. The reordering unit ReOrder reorders the order of an input picture Picln into an encoding order and outputs the reordered pictures to a motion estimation unit ME and a subtraction unit Sub. The motion estimation unit ME refers to the reference pictures stored in a picture memory PicMeml;
determines an applicable reference picture and detects a motion vector indicating a pixel position of the reference picture and sends them to a variable length coding unit VLC, the picture memory PicMeml and a motion compensation unit MC. The picture memory PicMem1 outputs the pixels of the reference picture according to the motion vector MV to the motion compensation unit MC whereas the motion compensation unit MC generates a predictive image using the pixels in the reference picture gained from the picture memory PicMeml and the motion vector MV.
The subtraction unit Sub calculates a difference between the picture reordered by the reordering unit ReOrder and the predictive image. The difference is converted to frequency coefficients by an orthogonal transformation unit T and then the frequency coefficients are quantized by the quantization unit Q and outputted as quantized values Coef.
An inverse quantization unit IQ inverse quantizes the quantized values Coef and restores them as frequency coefficients. The inverse orthogonal transformation unit IT performs inverse frequency conversion for the frequency coefficients to be outputted as pixel differential values. An addition unit Add adds the predictive image to the pixel differential values and obtains a decoded picture.
The reference picture control unit RefPicCtrl, according to the encoding type of the picture, judges whether or not the decoded picture is to be stored in the picture memory PicMeml to be referred to as a reference picture and whether or not the decoded picture is to be removed from the picture memory PicMeml (no longer referred to as a reference picture) and notifies of the operation using a memory control command MMCO.
A switch SW is turned ON when the memory control command MMCO ordered a storage and thereby the decoded picture is stored in the picture memory PicMeml as a reference
picture. The picture memory PicMeml releases the area where the decoded picture is stored so that other decoded pictures can be stored when the picture memory PicMeml instructs that the decoded picture shall be removed from the picture memory PicMeml.
The variable length coding unit VLC encodes the quantized values Coef, the motion vector MV and the memory control command MMCO and outputs an encoded stream Str.
The case in which the encoding includes the frequency conversion and the quantization is shown, however, the encoding may be the one without them such as DPCM, ADPCM, and linear predictive encoding. The encoding may be the one in which the frequency conversion and the quantization are integrated or the one that is not accompanied by the quantization after the frequency conversion as in a bit-plane encoding.
Fig. 27 shows bit streams of the memory control command MMCO. The variable length coding unit VLC encodes "000" which means a release of a whole memory area so that the picture memory is initialized at the beginning of the encoding/decoding or in the head of the GOP (Group Of Picture). Also, the variable length coding unit VLC encodes "01" when the decoded picture is stored in the picture memory. When a picture stored in the picture memory is released at the same time, the variable length coding unit VLC encodes a picture number following the "001" since the picture number to be released has to be indicated. When a plurality of pictures are released, the command to release a picture needs to be encoded for a plural number of times, therefore, a command to store a picture is encoded in addition to the command to release a picture. The variable length coding unit VLC encodes sequentially a plurality of memory control commands MMCO and encodes lastly "1" indicating that the memory control command MMCO is complete. In this way, the memory control command
MMCO is encoded as an encoded stream Str.
Fig. 28 is a block diagram showing a picture decoding apparatus for realizing a conventional picture decoding method. The same numbers are put for the devices that operate in the same manner as the picture encoding apparatus for realizing the conventional picture encoding method shown in Fig. 26.
A variable length decoding unit VLD decodes an encoded stream Str and outputs a memory control command MMCO, a motion vector MV and quantized values Coef. A picture time Time is inputted from outside and is a signal for specifying a picture to be displayed. When a picture to be displayed is a decoded picture, an output from the adding unit Add is selected at a selector Sel and sent out to a display unit Disp. When a picture to be displayed is a picture stored in the picture memory PicMem1, it is read out from the picture memory PicMeml, selected at the selector Sel and outputted to a display unit Disp.
As described above, the picture memory PicMeml outputs, to the motion compensation unit MC, pixels according to the motion vector MV whereas the motion compensation unit MC generates a predictive image according to the pixels obtained from the picture memory PicMeml together with the motion vector MV.
The inverse quantization unit IQ inverse quantizes the quantized values Coef and restores them as frequency coefficients. Furthermore, the inverse orthogonal transformation IT performs inverse frequency conversion for the frequency coefficients to be outputted as pixel differential values. The addition unit Add adds the predictive image to the pixel differential values to generate a decoded picture.
The picture memory PicMeml releases the area in which the decoded picture is stored so that other decoded picture can be stored.
The example of the decoding including the inverse frequency
conversion and the inverse quantization is described above, however, the decoding may be the one without them such as DPCM, ADPCM and a linear predictive encoding. The decoding may be the one in which the inverse frequency conversion and the inverse quantization are integrated or the one that is not accompanied by the inverse quantization after the frequency conversion as in a bit-plane encoding.
With the use of the picture decoding apparatus for realizing the conventional picture decoding method shown in Fig. 28, it is obvious that the combination of the conventional picture encoding types shown in Figs. 24 and 25 allows a correct decoding of the encoded stream Str encoded by the picture encoding apparatus for realizing the conventional picture encoding method shown in Fig. 26.
The more flexible combination is considered here as a picture encoding type.
Fig. 1 is a diagram showing a prediction structure, a decoding order and a display order of the pictures, which do not exist in the related art. The prediction structure with respect to B-picture differs in the vicinity of Picture 4 in Fig. 1. Namely, Picture 2 that is a B-picture is stored in the picture memory to be referred to as a predictive image of Picture 1 and Picture 3. Consequently, the encoding order and the display order of each picture are as shown in Fig. 1.
Pictures B5 and B6 are B-pictures that are not stored since they are not referred to in a predictive coding. However, differing from Fig. 24, the display time for the pictures B5 and B6 has not yet come at the time when they are decoded since it is the time for other picture to be displayed. That is, at the time of decoding the picture B5, the picture P4 shall be displayed and at the time of decoding the picture B6, the picture B5 shall be displayed. Since the pictures B5 and B6 are not stored, they cannot be taken out
from the picture memory at the display time. Therefore, the pictures which are not referred to for predictive encoding are not stored in the picture memory, therefore, the pictures B5 and B6 cannot be displayed after being decoded with the use of the conventional encoding/decoding method. Namely in the case of not storing the pictures that are not referred to in predictive encoding as in the example shown in Fig. 24, only Pictures 1, 2, 4, and 7 can be displayed.
Thus, considering the more flexible combination as a picture encoding type, it is a problem that the pictures which cannot be displayed after being decoded occur. It is conceivable to add another picture memory for display and store the pictures that are not stored in the picture memory PicMeml in this picture memory for display so that they can be displayed; however, the weak point is that this picture memory requires a huge memory in this case.
Furthermore, there rises a new problem in the reproduction of a picture in the middle of the stream even if another picture memory for display is introduced. Fig. 2 is a diagram showing a prediction structure, a decoding order and a display order of pictures. The difference comparing with Fig. 25 is that the prediction structure in the vicinity of Picture 7 becomes completely independent. The pictures following a picture 17 are not referred to when the pictures with display time preceding the picture 17 are encoded/decoded. Therefore, the pictures following the picture 17 can be encoded correctly if the decoding starts from the picture 17 and the picture 17 can be reproduced independently. In this way, the insertion of I picture while streaming often takes place. This system to reproduce a picture in the middle of the stream, which complies with MPEG-2, is called GOP (Group Of Picture).
The correspondence of a reproduced picture of the picture decoding apparatus and that of the picture encoding apparatus in the case of reproducing the picture in the middle of the stream has
to be assured, and the easy method is to initialize the whole area of the picture memory. However, Picture 6 is not yet displayed and stored in the picture memory when Picture 7 is decoded, Picture 6 therefore cannot be displayed from the picture memory at its display time if the entire picture memory is initialized before the display of Picture 6 takes place.
The object of the present invention therefore is to allow the display of the pictures that cannot be displayed after being decoded by taking the memory amount necessary for encoding/decoding of the picture into consideration.
Disclosure of Invention
In order to achieve the above objects, a picture encoding method of the present invention of predictively encoding an input picture with reference to pictures stored in a picture buffer and decoding the encoded input picture, the picture encoding method comprising: judging whether or not the decoded picture is for reference and whether or not the decoded picture is for output, needing to be stored until display time of the decoded picture; and storing the decoded picture in the picture buffer as one of the following uses: for reference and for output, based on each result of the judgments.
Here, the picture encoding method may comprise the following steps: a first judgment step of judging whether or not the decoded picture is for reference; a second judgment step of judging whether or not the decoded picture is for output, needing to be stored until display time of the decoded picture; and a management step of managing the picture buffer so that the picture buffer stores the decoded picture judged to be for reference in the first judgment step and the decoded picture judged to be for output in the second judgment step.
With this structure, the judgment on whether the decoded'
picture is a picture for output in addition to the judgment on whether the decoded picture is a picture for reference allows a storage not only of a picture for reference but also of a picture that is not referred to in the predictive encoding but cannot be displayed or outputted as a picture for output at the time of decoding. Such judgment and buffer management take place in the picture encoding to simulate a decoding operation, therefore, a picture for output can surely be displayed or outputted at its display time by the decoding apparatus.
Here, the picture buffer may have a specified size,and the picture encoding method may further comprise: a third judgment step of judging whether or not the picture for reference stored in the picture buffer is no longer used as a reference picture; and a fourth judgment step of judging whether or not the picture for output stored in the picture buffer is already outputted. In the management step, an area storing a picture in the picture buffer is reused within a scope of the specified size based on each result of the judgments in the third and fourth judgment steps.
With this structure, an area storing a picture is reused in the scope of the specified size of the picture buffer for storing the picture for reference and the picture for output in the management step, therefore, the picture buffer may be adapted for the specified size of essentia! requirements without wasting the memory.
Furthermore, the picture encoding method may include an encoding step of encoding, for each sequence, information indicating the specified size for encoding said sequence including a plurality of encoded pictures.
With this structure, a picture structure to be used for predictive encoding can be defined flexibly for each sequence since the size is specified for each sequence.
Also, in the management step, one of the decoded picture judged to be for reference in the first judgment step and the
decoded picture judged to be for output in the second judgment step may be stored in an area storing a picture that is not for reference and is judged as already outputted in the fourth judgment step when the picture buffer doesn't have an area 5 capable of storing newly a picture.
With the structure described above, a new picture is stored in
an area storing the outputted picture out of areas allocated for a
picture for output in the picture buffer. Namely, the area storing
the outputted picture is reused so that the display of the decoded
) picture that is not yet outputted may be more assured.
Furthermore, in the management step, one of the decoded picture judged to be for reference in the first judgment step and the picture judged to be for output in the second judgment step may be stored in an area storing a picture whose display order is ; the earliest of the pictures that are not for reference and stored within the picture buffer when the picture buffer doesn't have an area capable of storing newly a picture.
With the structure described above, there is a high possibility that a decoded picture already outputted is stored in an > area storing a picture whose display order is the earliest of the pictures for output, therefore, the display of the decoded picture that is not yet outputted may be more assured although the structure does not allow a correct determination on the display time of respective decoded pictures.
The picture encoding method may further comprise a releasing step of releasing an area other than an area storing a picture which is stored before a size of the input picture is modified and is not partly or wholly damaged after being stored out of areas storing display pictures,when the size modification takes place in a sequence including a plurality of encoded pictures.
With the structure described above, the pictures that are not yet outputted at the time of size modification can be outputted as'
many as possible without being removed since decoded pictures for output can be left in the decoded picture buffer when the size modification takes place.
Thus, according to the present invention, the pictures that can not be displayed correctly in the related art can be displayed by making the most use of the released memory area without having unnecessary memory, therefore, its practical value is high.
A picture decoding method, a picture encoding apparatus, a picture decoding apparatus and a program according to the present invention have the same structure, operation, and effects as described above.
The picture encoding method or the picture decoding method can be any of the compositions described in (1) through (16) below.
(1) A picture encoding method of predictively encoding a picture signal with reference to a decoded picture stored in a memory after being decoded, the picture encoding method comprising the following steps: generating a predictive image with reference to the decoded picture in the memory and encoding a difference between the predictive image and the picture signal to obtain an encoded stream; decoding the encoded difference between the predictive image and the picture signal, adding the predictive image to the decoded difference to obtain a decoded picture and storing a predetermined decoded picture in the memory; and containing in the encoded stream instruction information indicating whether or not to release a whole area of the memory for making the area reusable.
(2) A picture encoding method of predictively encoding a picture signal with reference to a decoded picture in a memory, the picture encoding method comprising: generating a predictive image with reference to the decoded picture in the memory; encoding a difference between the predictive image and the picture
signal to obtain an encoded stream; decoding the encoded difference between the predictive image and the picture signal; adding the predictive image to the decoded difference to obtain a decoded picture; and storing the decoded picture in the memory when the decoded picture is one of i) a picture used for reference in order to generate a predictive image and ii) a picture that is not immediately dispiayable.
(3) A picture encoding method of predictively encoding a picture signal with reference to a decoded picture, the picture encoding method comprising: generating a predictive image with reference to the decoded picture in a memory; encoding a difference between the predictive image and the picture signal to obtain an encoded stream; decoding the encoded difference between the predictive image and the picture signal, adding the predictive image to the decoded difference to obtain a decoded picture; storing a predetermined decoded picture in the memory and releasing an unnecessary picture in the memory, wherein the predetermined decoded picture is stored in an area storing a picture already displayed in the released area within the memory.
(4) A picture decoding method of predictively decoding an encoded stream with reference to a decoded picture stored in a memory after being decoded, the picture decoding method comprising the following steps of: generating a predictive image with reference to the decoded picture in the memory, adding the predictive image to a picture signal obtained by decoding the encoded stream to obtain a decoded picture and storing a predetermined decoded picture in the memory; and a processing step of performing processing based on instruction information indicating whether or not to release a whole area of the memory obtained by decoding the encoded stream for making the area reusable.
(5) A picture decoding method of predictively decoding an'
encoded stream with reference to a decoded picture, the picture decoding method comprising: generating a predictive image with reference to the decoded picture in a memory; decoding the encoded stream; adding the predictive image to the decoded encoded stream to obtain a decoded picture; storing a predetermined decoded picture in the memory and releasing an unnecessary picture in the memory, wherein the predetermined decoded picture is stored in an area in which a picture already displayed has been stored in the released area within the memory.
(6) A picture encoding method of predictively encoding a picture signal with reference to a decoded picture, the picture encoding method comprising: generating a predictive image with reference to the decoded picture in a memory; encoding a difference between the predictive image and the picture signal to obtain an encoded stream; decoding the encoded difference between the predictive image and the picture signal, adding the predictive image to the decoded difference to obtain a decoded picture; storing a predetermined decoded picture in the memory and releasing an unnecessary picture in the memory, wherein the predetermined decoded picture is stored in an area in which a picture displayed at the earliest time has been stored in the released area within the memory.
(7) A picture decoding method of predictively decoding an encoded stream with reference to a decoded picture, the picture decoding method comprising: generating a predictive image with reference to the decoded picture in a memory; decoding the encoded stream; adding the predictive image to the decoded picture to obtain a decoded picture; storing a predetermined decoded picture in the memory and releasing an unnecessary picture in the memory, wherein the predetermined decoded picture is stored in an area in which a picture displayed at the earliest time has been stored in the released area within the memory.
(8) A picture encoding method of predictively encoding a
picture signal with reference to a decoded picture, the picture
encoding method comprising: generating a predictive image with
reference to the decoded picture in a memory; encoding a
5 difference between the predictive image and the picture signal to obtain an encoded stream; decoding the encoded difference between the predictive image and the picture signal, adding the predictive image to the decoded difference to obtain a decoded picture; storing a predetermined decoded picture in the memory
► and releasing an unnecessary picture in the memory, wherein the predetermined decoded picture is stored in an area that is capable of storing a picture and is firstly released in the memory.
(9) A picture decoding method for predictively decoding an
encoded stream with reference to a decoded picture, the picture
decoding method comprising: generating a predictive image with
reference to the decoded picture in the memory; decoding the
encoded stream; adding the predictive image to the decoded
encoded stream to obtain a decoded picture; storing a
predetermined decoded picture in the memory and releasing an
unnecessary picture in the memory, wherein the predetermined
decoded picture is stored in an area that is capable of storing a
picture and is released firstly in the memory.
(10) A picture encoding apparatus for predictively encoding
a picture signal with reference to a decoded picture, the picture
encoding apparatus comprising: a prediction unit operable to
generate a predictive image with reference to the decoded picture
in a memory; an encoding unit operable to encode a difference
between the predictive image predicted by the prediction unit and
the picture signal to obtain an encoded stream; a decoding unit
operable to decode the encoded difference; an addition unit
operable to add the predictive image to the difference decoded by
the decoding unit; a reference picture control unit operable to
determine to store one of i) a picture used for reference in order to generate a predictive image and ii) a picture that is not immediately displayable; and a memory unit operable to store the adding result obtained from the addition unit based on the determination made by the reference picture control unit.
(11) A picture encoding apparatus for predictively encoding a picture signal with reference to a decoded picture, the picture encoding apparatus comprising: a prediction unit operable to generate a predictive image with reference to the decoded picture in a memory; an encoding unit operable to encode a difference between the predictive image predicted by the prediction unit and the picture signal to obtain an encoded stream; a decoding unit operable to decode the encoded difference; an addition unit operable to add the predictive image to the difference decoded by the decoding unit; a reference picture control unit operable to determine whether or not to store an adding result obtained from the addition unit and whether or not to release an unnecessary picture in the memory; and a memory unit operable to store the adding result obtained from the addition unit in an area in which a picture already outputted as a decoded picture has been stored in the released area within the memory based on the determination made by the reference picture control unit.
(12) A picture decoding apparatus for predictively decoding an encoded stream with reference to a decoded picture, the picture decoding apparatus comprising: a decoding unit operable to decode the encoded stream; a prediction unit operable to generate a predictive image with reference to the decoded picture in a memory; an addition unit operable to add the predictive image to the difference between the predictive image and the picture signal decoded by the decoding unit; a reference picture control unit operable to determine whether or not to store the adding result obtained from the addition unit in the memory and whether or not
to release an unnecessary picture in the memory; and a memory unit operable to store an adding result obtained from the addition unit in an area in which a picture already outputted as a decoded picture has been stored in the released area in the memory based 5 on the determination made by the reference picture control unit.
(13) A picture encoding apparatus for predictively encoding
a picture signal with reference to a decoded picture, the picture
encoding apparatus comprising: a prediction unit operable to
generate a predictive image with reference to the decoded picture
I in a memory; an encoding unit operable to encode a difference between the predictive image predicted by the prediction unit and the picture signal to obtain an encoded stream, a decoding unit operable to decode the encoded difference; an addition unit operable to add the predictive image to the difference decoded by the decoding unit; a reference picture control unit operable to determine whether or not to store the adding result obtained from the addition unit in the memory and whether or not to release an unnecessary picture in the memory; and a memory unit operable to store the adding result obtained from the addition unit in an area in which a picture displayed at the earliest time has been stored in the released area within the memory based on the determination made by the reference picture control unit.
(14) A picture decoding apparatus for predictively decoding
an encoded stream with reference to a decoded picture, the picture
decoding apparatus comprising: a decoding unit operable to
decode the encoded stream; a prediction unit operable to generate
a predictive image with reference to the decoded picture in a
memory; an addition unit operable to add the predictive image to
the difference between the predictive image and the picture signal
decoded by the decoding unit; a reference picture control unit
operable to determine whether or not to store, in the memory, the
adding result obtained from the addition unit and whether or not to
release an unnecessary picture in the memory; and a memory unit operable to store the adding result obtained from the addition unit in an area in which a picture displayed at the earliest time has been stored in the released area within the memory based on the determination made by the reference picture control unit.
(15) A picture encoding apparatus for predictively encoding a picture signal with reference to a decoded picture, the picture decoding apparatus comprising: a prediction unit operable to generate a predictive image with reference to the decoded picture in a memory; an encoding unit operable to encode a difference between the predictive image predicted by the prediction unit and the picture signal to obtain an encoded stream; a decoding unit operable to decode the encoded difference between the predictive image and the picture signal decoded by the decoding unit; an addition unit operable to add the predictive image to the difference decoded by the decoding unit; a reference picture control unit operable to determine whether or not to store the adding result obtained from the addition unit in the memory and whether or not to release an unnecessary picture in the memory; and a memory unit operable to store the adding result obtained from the addition unit in an area that is released at the earliest time of the whole released area within the memory based on the determination made by the reference picture control unit.
(16) A picture decoding apparatus for predictively decoding an encoded stream with reference to a decoded picture, the picture decoding apparatus comprising: a decoding unit operable to decode an encoded stream; a prediction unit operable to generate a predictive image with reference to the decoded picture in a memory; an addition unit operable to add the predictive image to the difference between the predictive image and the picture signal decoded by the decoding unit; a reference picture control unit operable to determine whether or not to store, in the memory, the*
adding result obtained from the addition unit and whether or not to release an unnecessary picture in the memory; and a memory unit operable to store the adding result obtained from the addition unit in an area that is released at the earliest time of the whole released area within the memory based on the determination made by the reference picture control unit.
A storage medium for storing a program in which the picture encoding/decoding method of the present invention is executed by a computer may be any of (17) through (23) below.
(17) A storage medium employing a picture encoding method in which a computer is made to predictively encode a picture signal with reference to a decoded picture, the storage medium comprising: generating a predictive image with reference to a decoded picture in a memory; encoding a difference between the predictive image and the picture signal to obtain an encoded stream; decoding the encoded difference between the encoded predictive image and the picture signal, and adding the predictive image to the decoded difference and then outputting the adding result as a decoded picture, storing the decoded picture in the memory when the decoded picture is one of i) a picture used for reference in order to generate a predictive image and ii) a picture that is not immediately displayable.
(18) A storage medium employing a picture encoding method in which a computer is made to predictively encode a picture signal with reference to a decoded picture, the storage medium comprising: generating a predictive image with reference to the decoded picture in a memory; encoding a difference between the predictive image and the picture signal to obtain an encoded stream; decoding the encoded difference; adding the predictive image to the decoded difference to obtain a decoded picture; storing a predetermined decoded picture in the memory and releasing an unnecessary picture in the memory, wherein the
predetermined decoded picture is stored in an area in which a picture already displayed has been stored in the released area within the memory.
(19) A storage medium employing a picture decoding method in which a computer is made to predictively decode an encoded stream with reference to a decoded picture, the storage medium comprising: generating a predictive image with reference to the decoded picture in a memory; decoding the encoded stream; adding the predictive image to the decoded encoded stream to obtain a decoded picture; storing a predetermined decoded picture in the memory and releasing an unnecessary picture in the memory, wherein the predetermined decoded picture is stored in an area in which a picture already displayed has been stored in the released area within the memory.
(20) A storage medium employing a picture encoding method in which a computer is made to predictively encode a picture signal with reference to a decoded picture, the storage medium comprising: generating a predictive image with reference to the decoded picture in a memory; encoding a difference between the predictive image and the picture signal to obtain an encoded stream; decoding the encoded difference; adding the predictive image to the decoded difference to obtain a decoded picture; storing a predetermined decoded picture in the memory and releasing an unnecessary picture in the memory, wherein the predetermined decoded picture is stored in an area in which a picture displayed at the earliest time has been stored in the released area within the memory.
(21) A storage medium employing a picture decoding method in which a computer is made to predictively decode an encoded stream with reference to a decoded picture, the storage medium comprising: generating a predictive image with reference to the decoded picture; decoding the encoded stream; adding the
predictive image to the decoded encoded stream to obtain a decoded picture; storing a predetermined decoded picture in the memory and releasing an unnecessary picture in the memory, wherein the decoded picture is stored in an area in which a picture displayed at the earliest time has been stored in the released area within the memory.
(22) A storage medium employing a picture encoding method in which a computer is made to predictively encode a picture signal with reference to a decoded picture, the storage medium comprising: generating a predictive image with reference to the decoded picture in a memory; encoding a difference between the predictive image and the picture signal to obtain an encoded stream; decoding the encoded difference; adding the predictive image to the decoded difference to obtain a decoded picture; storing a predetermined decoded picture in the memory and releasing an unnecessary picture in the memory, wherein the predetermined decoded picture is stored in an area that is capable of storing a picture and is released firstly of the whole released area in the memory.
(23) A storage medium employing a picture encoding method in which a computer is made to predictively encode a picture signal with reference to a decoded picture, the storage medium comprising: generating a predictive image with reference to the decoded picture in a memory; encoding a difference between the predictive image and the picture signal to obtain an encoded stream; decoding the encoded difference; adding the predictive image to the decoded difference to obtain a decoded picture; storing a predetermined decoded picture in the memory and releasing an unnecessary picture in the memory, wherein the predetermined decoded picture is stored in an area in which a picture displayed at the earliest time has been stored in the released area within the memory.
A picture encoding method of defining memory constraint conditions for a stream and a picture decoding apparatus and encoding video for the picture encoding apparatus of the present invention may be any of (Al) through (A26) below.
(Al) A picture encoding method of defining memory constraint conditions for a stream and a picture decoding apparatus, the picture encoding method comprising the following steps: determining a first maximum number of reference pictures that can be used; setting a second maximum number of reference pictures used for backward prediction; entering the second maximum number in a header of the stream; generating a virtual display delay buffer; generating a display counter; allocating a sufficient memory space for the reference pictures; and encoding the video. Here, the virtual display delay buffer is a virtual buffer for each picture for display to be stored in an area for display retained in a memory in the picture encoding apparatus and stores information indicating an order of outputting the pictures for display (picture order number or the like). The display counter records or updates a picture order number of the picture to be outputted virtually on the display. The sufficient memory space indicates an area for storing both the reference pictures and the pictures for display.
(A2) The picture encoding method according to (Al), wherein the first maximum number is determined according to a level value indicating a capacity of the decoder.
(A3) The picture encoding method according to (Al) or (A2), wherein the second maximum number is smaller than the first maximum number of reference pictures.
(A4) The picture encoding method according to (Al), (A2) or (A3), wherein the backward prediction of the entire stream is limited by the second maximum number.
(A5) The picture encoding method according to (Al)/
wherein a size of the virtual display delay buffer is the second maximum number minus 1.
(A6) The picture encoding method according to (Al) or (A5), wherein a physical memory for the virtual display delay buffer includes only display order information of the pictures.
(A7) The picture encoding method according to (Al), wherein the display counter is used for storing display order information of the pictures to be removed from the virtual display delay buffer.
(A8) The picture encoding method according to (Al), comprising the following steps of: predicting a predictive image for a current picture to be coded with reference to usable reference pictures; encoding the current picture; determining whether or not the encoded picture can be used for prediction; decoding the encoded picture; storing the decoded picture in the reference picture buffer; updating the virtual display delay buffer; and updating the display counter.
(A9) The picture encoding method according to (Al) or (A8), wherein one or a plurality of reference pictures can be used for the prediction of the picture when the picture is predictively ehcoded.
(A10) The picture encoding method according to (Al) or (A8), wherein the reference picture can be used only when the reference picture buffer meets the memory constraint conditions.
(All) The picture encoding method according to (Al) or (A8), wherein the reference picture is decoded when the current picture is to be used as a reference picture.
(A12) The picture encoding method according to (Al), (A8) or (A10), further comprising the following steps of: determining memory constraint conditions of the number of reference pictures with respect to a following picture; removing an unused reference picture from the reference picture buffer; and adding the decoded picture to the reference picture buffer.
(A13) The picture encoding method according to (Al), (A8), (A10) or (A12), wherein a maximum number of the reference pictures with respect to the following picture equals to what the number of pictures in the virtual display delay buffer is subtracted from the first maximum number for the stream.
(A14) A picture encoding method according to (Al), (A8), (A10) or (A12), wherein the display order information for the display of the unused reference picture is moved to the virtual display delay buffer when the display order information for the display is greater than a value indicated at the display counter.
(A15) The picture encoding method according to (Al) or (A8), wherein the virtual display delay buffer stores the temporal information of the picture when a value indicated in the display order information is greater than a value indicated at the display :ounter.
(A16) The picture encoding method according to (Al), (A8) Dr (A15), wherein the virtual display delay buffer removes the display order information of the picture when the value indicated in :he display order information is smaller than or equal to the value ndicated at the display counter.
(A17) The picture encoding method according to (Al), (A8), A10), (A12) or (A13), wherein the number of pictures in the virtual display delay buffer is defined according to a total number ndicated in the display order information of the pictures that are )resent in the virtual display delay buffer.
(A18) The picture encoding method according to (Al) or A8), wherein the display counter starts updating the display order reformation in one of cases: when the virtual display delay buffer is ull and when the number of encoded pictures equals to the first naximum number.
(A19) The picture encoding method according to (Al), (A8) r (A18), wherein the display counter updates the display order
information based on the display order information of each encoded picture.
(A20) The picture encoding method according to (Al), wherein a picture decoding method employed by a picture decoding apparatus comprises the following steps of: determining a maximum post decoder buffer size according to a stream header; determining a minimum number of necessary reference pictures; allocating a sufficient physical memory space for the reference pictures; decoding the stream; and outputting the stream.
(A21) The picture encoding method according to (Al) or (A20), wherein the maximum post decoder buffer size is the second maximum number set by the picture encoding apparatus.
(A22) The picture encoding method according to (Al) or (A20), wherein the minimum number of necessary reference pictures is fixed according to a capacity level of a picture decoding apparatus that can decode the same stream.
(A23) The picture encoding method according to (Al) or (A20), wherein the physical memory space allocated by the picture decoding apparatus can be used for storing both reference pictures and post decoder pictures.
(A24) The picture encoding method according to (Al) or (A20), wherein a total number of reference pictures and post decoder pictures does not surpass the allocated physical memory space.
(A25) The picture encoding method according to (Al) or (A20), wherein a firstly decoded picture is outputted in one of following cases: when the number of decoded pictures equals to the maximum size of post decoder buffer minus 1 and when a total number of decoded pictures equals to the determined minimum number of reference pictures.
(A26) The picture encoding method according to (Al) or (A20), wherein the decoded picture is removed from the post
decoder buffer once the decoded picture is sent for output.
Also, a method of decoding a stream based on memory constraint conditions for a stream and a picture decoding apparatus employed by the picture decoding apparatus of the present invention may be any of (A27) through (A37) below.
(A27) A picture decoding method of decoding a stream based on memory constraint conditions for a stream and a picture decoding apparatus, the picture decoding method comprising the following steps of: determining a first maximum number of reference pictures used for a stream; determining a second maximum number of reference pictures used for backward prediction; calculating a minimum size of a post decoder buffer; allocating a sufficient physical memory space for the post reference picture buffer; allocating a sufficient physical memory space for the post decoder buffer; decoding the stream; storing the decoded picture in a reference picture buffer; storing the decoded picture in the post decoder buffer; outputting the decoded picture. Here, the post decoder buffer is an area for display in a reference picture memory in the picture decoding apparatus.
(A28) The picture decoding method according to' (A27), wherein the first maximum number is fixed for the picture decoding apparatus according to a capacity level to decode the stream.
(A29) The picture decoding method according to (A27), wherein the second maximum number is defined as the first maximum number minus 1.
(A30) The picture decoding method according to (A27), wherein the minimum size of the post decoder buffer is defined as the second maximum number minus 1.
(A31) The picture decoding method according to (A27) or (A30), wherein the minimum size of the post decoder buffer is obtained from the stream.
(A32) The picture decoding method according to (A27) or
,_/7 MMUCIII THEsecond maximum number is defined as the minimum size of the post decoder buffer plus 1.
(A33) The picture decoding method according to (A27), wherein the minimum size of the reference picture buffer is defined as the first maximum number.
(A34) The picture decoding method according to (A27) or (A33), wherein the reference picture buffer is used only for storing reference pictures.
(A35) The picture decoding method according to (A27), (A30) or (A31), wherein the post decoder buffer is used for storing non-reference pictures.
(A36) The picture decoding method according to (A27), (A32) or (A33), wherein a reference picture is removed from the reference picture buffer when the reference picture is judged as a non-reference picture.
(A37) The picture decoding method according to (A27), (A30), (A31) or (A35), wherein picture in the post decoder buffer is removed from the post decoder buffer when outputted.
With the structure described above, a correct decoding of the stream can be assured by operating both the stream and the picture decoding apparatus under the same memory constraint conditions. Otherwise, a memory space sufficient for the picture decoding apparatus to decode the stream in process of decoding cannot be assured.
Brief Description of Drawings
Fig. 1 is a diagram showing a prediction structure, a decoding order and a display order of pictures.
Fig. 2 is a diagram showing a prediction structure, a decoding order and a display order of the pictures.
Fig. 3 is a block diagram showing a picture encoding apparatus for realizing a picture encodina method of product
invention described in a first embodiment.
Fig. 4 is a flowchart showing an operation of a reference picture control unit of the present invention described in the first embodiment.
Fig. 5A, 5B and 5C are state diagrams showing a storage status of the pictures in the memory.
Fig. 6 is a flowchart showing an operation of the picture encoding apparatus of the present invention described in a second embodiment.
Fig. 7 is a flowchart showing an operation of the picture encoding apparatus of the present invention described in a third embodiment.
Fig. 8 is a flowchart showing an operation of the picture encoding apparatus of the present invention described in a fourth embodiment.
Fig. 9 is a block diagram showing a picture decoding apparatus for realizing a picture decoding method of the present invention described in a fifth embodiment.
Fig. 10 is a flowchart showing an operation of the picture decoding apparatus of the present invention described in the fifth embodiment.
Fig. 11 is a flowchart showing another operation of the picture decoding apparatus of the present invention described in the fifth embodiment.
Fig. 12 is a flowchart showing yet another operation of the picture decoding apparatus of the present invention described in the fifth embodiment.
Fig. 13 is a flowchart showing another operation of the picture decoding apparatus of the present invention described in the fifth embodiment.
Fig. 14 is a block diagram showing a usage of a virtual display delay buffer of a picture encoding apparatus
Fig. 15 is a block diagram showing a processing of post decoder buffer operation for encoding according to the present invention.
Fig. 16 is a block diagram showing a processing of post decoder buffer operation for decoding according to the present invention.
Fig. 17 is an example of using the virtual display delay buffer of the picture encoding apparatus for limiting the maximum number of the reference pictures.
Fig. 18 is an example of using the virtual display delay buffer for deciding the time to display a first picture.
Fig. 19 is an illustration of a storage medium in order to store a program for realizing the picture encoding method and the picture decoding method of each embodiment in a computing system, described in a seventh embodiment.
Fig. 20 is a block diagram showing an overall structure of a content supply system described in a eighth embodiment.
Fig. 21 is an outline view showing an example of a cell phone using the picture encoding/decoding method of the present invention described in the eighth embodiment.
Fig. 22 is a block diagram of the cell phone.
Fig. 23 is a block diagram showing an example of digital broadcasting system described in the eighth embodiment.
Fig. 24 is a diagram showing a prediction structure, a decoding order and a display order of the pictures.
Fig. 25 is a diagram showing a prediction structure, a decoding order and a display order of the pictures.
Fig. 26 is a block diagram of the picture decoding apparatus for realizing the conventional picture encoding method.
Fig. 27 is a mapping diagram showing examples of codes for a memory control commands MMCO.
Fig. 28 is a block diagram of the picture decoding apparatus
for realizing the conventional picture decoding method.
Best Mode for Carrying Out the Invention
The following describes a first embodiment of the present invention.
(First Embodiment)
Fig. 3 is a block diagram showing a picture encoding apparatus for realizing a picture encoding method of the present invention. The same referential numbers are put for the devices that operate in the same manner as described in the block showing a picture encoding apparatus for realizing a conventional encoding method shown in Fig. 26 and the explanation is thereby abbreviated.
Differences between the block diagram in Fig. 26 showing the picture encoding apparatus for realizing the conventional picture encoding method and the block diagram in Fig. 3 showing the picture encoding apparatus for realizing the picture encoding method according to the present invention are that a display picture control unit DisPicCtrl is added to Fig. 3 and that instructions sent from the display picture control unit DisPicCtrl are outputted to a reference picture control unit RefPicCtrl and a picture memory PicMem2.
In the picture encoding apparatus 100 shown in Fig. 3, a picture size modification unit PicSize for obtaining a picture size modified by external operations as well as an encoding type of each picture (I-picture, P-picture and B-picture) from the picture structure determination unit PicStruct and outputting information indicating the picture size to be modified to a reference picture control unit RefPicCtrl is newly set.
The operation of the picture memory PicMem2 is almost same as that of the picture memory PicMeml, therefore, only different operations will be explained.
The display picture control unit DispPicCtrl obtains a picture time Time and judges whether a picture, which is not stored as it is not for reference, can be displayed immediately or not (whether it is necessary to store the picture in the picture memory until its display time). The picture time Time, a signal for specifying a picture to be displayed, is inputted from outside. The picture time can be obtained in the following ways: from the time information outputted from the system for transmitting pictures via a transmission line such as a packet, from the time information in process of formatting a video stream and audio stream for multiplexing them; or from the time information in process of formatting a video stream. The picture time may be either an absolute time which informs of the time for each picture or a relative time which informs of the order of the pictures. Moreover, the intervals of displaying pictures is normally fixed, therefore, the order of displaying pictures may be considered as the display time.
Now, the case in which the picture is immediately displayable is a case in which the picture gained after the calculation in the adder Add corresponds with the picture to be displayed indicated by the picture time Time. In this case, a picture to be displayed before the picture that is not yet displayed and outputted for encoding is not found in the picture memory PicMem2. When the picture is not immediately displayable, the display picture control unit DispPicCtrl instructs the reference picture control unit RefPicCtrl to store the picture, even though it is not for reference, in the picture memory PicMem2 . Consequently, the picture which is not displayed immediately is stored in the picture memory PicMem2 without fail regardless of whether it is for reference or not and can be displayed out of the picture memory PicMem2 in the decoding apparatus.
Fig. 4 is a flowchart showing an operation of the reference picture control unit RefPicCtrl of the present invention.
The reference picture control unit RefPicCtrl judges whether or not a decoded picture (picture) is to be stored for reference for a predictive image (Step 10). When the decoded picture is to be used for reference, the operation proceeds to Step 12, otherwise to Step 11.
In Step 11, the reference picture control unit RefPicCtrl judges whether or not the decoded picture is immediately dispiayable. "Immediately displayable" here means that the decoded picture can be displayed at the time of being decoded (see for example Picture 1 in Fig. 1). The decoded picture which is not immediately displayable means that it needs to be displayed later (for instance, B5 shown in Fig. 1). When the picture is immediately displayable, the operation is terminated, otherwise, goes on to Step 12.
In Step 12, the reference picture control unit RefPicCtrl obtains an area capable of storing a picture in the picture memory PicMem2 and instructs to store the decoded picture in the area obtained in the picture memory PicMem2 using a memory control command MMCO in Step 13.
In this way, the picture which is not displayed immediately is stored in the picture memory PicMem2 and can be outputted for display from the picture memory PicMem2 when the time has come for its display. This does not require an unnecessary picture memory assigned for a picture for display and a picture that needs to be stored for display can be stored in the picture memory assigned for a picture for reference.
The picture memory PicMem2 includes an area for reference in which a reference picture is stored for generating a predictive image and an area for display in which a picture for display is stored.
Meanwhile, a picture size can be modified for each GOP (Group Of Picture) mentioned before. The modification of the
picture size takes place only when a whole area for reference in the memory storing an unnecessary reference picture is released (make the status of the memory reusable).
However, when the modification of the picture size takes place as described above, the picture for display that is not yet displayed is stored in the memory area, and it is necessary to determine explicitly a coping strategy of how to handle this picture for display but not yet displayed (whether to delete it or to store it until it is displayed).
Here, a storing state of pictures in the memory when the change of the picture size takes place is explained in stages.
Figs. 5A, 5B and 5C are state diagrams showing the storing status of the pictures in the memory in stages.
In 5A, pictures 200a, 200b and 200c are the pictures for reference (the pictures to be used for reference in order to generate a predictive image) whereas pictures 201a, 201b, 201c, 20Id, and 20le are the pictures for display (pictures to be displayed and not displayed yet).
The pictures 201a, 201b, 201c, 201d and 201e will be displayed in the numeric order as shown in Fig. 5A.
Fig. 5A illustrates'the status in which the whole memory areas assigned for the reference pictures 200a, 200b and 200c are released for the reusability.
Fig. 5B shows that the picture size is modified following the status shown in Fig. 5A. A reference picture 202a being modified to a bigger size is stored in the memory area in which the reference picture 200a has been stored. Furthermore, the picture for display 201a is outputted for display and its memory area is released.
Fig. 5C shows a status in which the memory area storing the picture for display 201b is released after the status shown in Fig. 5B. A reference picture 202b being modified into a bigger size is
stored in the memory area in which the pictures for display 201a and 201b have been stored and a small memory area 203 is left. Even though the memory area storing the picture for display 201c is released, the reference picture (whose picture size is enlarged) cannot be newly stored.
Thus, when the picture size is modified, the pictures of different picture sizes are mixed in the memory (the reference pictures whose picture sizes are enlarged and the pictures for display which are not yet displayed and whose sizes are not yet modified).
Consequently, the memory is used fragmentarily, which produces a small memory area that cannot be used, and the usability is thereby deteriorated. When the data in the memory is repositioned so that the small memory area caused by the modification of the picture size disappears, the memory access increases greatly and thereby it is difficult to realize encoding and decoding operations in actual time.
When the picture size is modified, two methods are conceivable. The first method is to release the area for display in which the pictures for display that are not yet displayed are stored and the area for reference in which the reference pictures are stored (as a reusable state) and gives up the display of the pictures for display that are not yet displayed. This can prevent the fragmentary use of the memory caused by the mixture of the pictures of different sizes and thereby the deterioration in the usability of the memory can be reduced.
The modification in the picture size described above takes place as described in the following. The picture size modification unit PicSize shown in Fig. 3 receives the encoding type (I-picture, P-picture and B-picture) of each picture determined by the picture structure determination unit PicStruct and the picture size for the modification inputted from outside and outputs to the reference
picture control unit RefPicCtrl an instruction to modify the picture size with the timing to start encoding I-picture. The I-picture is a special I-picture (IDR (Instantaneous Decoding Refresh) picture) to be inserted, for example, in the beginning of the GOP.
The second method is to switch a method to release the whole area of the memory and discard the pictures for display that are not yet displayed and a method to release only the area for reference in which the reference pictures are stored and display the pictures for display that are not yet displayed before the size modification takes place with a judgment made by a picture decoding apparatus (decoder) for decoding an encoded signal (stream) that is referred to later on so that the display of the pictures for display that are not yet displayed is not obligatory. In this case, the picture decoding apparatus displays the displayable pictures, for instance, the undamaged pictures according to the display order.
For operating such switching, instruction information (flag) indicating one of the following methods: the method to release the whole area of the memory; and the method to release only the area for reference in which the reference picture is stored, or other identifiable information is contained in the stream Str outputted from the picture encoding apparatus 100.
On the side of the picture decoding apparatus, the processing is operated based on the instruction information placed in the stream.
The following examples are conceivable for the judging criteria in order to switch the two methods indicated by the instruction information: a content creator may decide the method according to an application; only the area for reference is released but not the area for display storing a picture for display that is not yet displayed (not releasing the whole area of the memory) when memory can afford to provide the space.
With the above construction, the picture encoding apparatus can be realized to solve the existing problems.
(Second Embodiment)
The following describes a second embodiment of the present invention.
In the present embodiment, the display picture control unit DispPicCtrl shown in Fig. 3 instructs the picture memory PicMem2 not to store a picture newly in the area storing the picture that is not yet displayed, when a picture is stored in the released memory area. Normally, even an area for picture is released, a picture stored right before can be reproduced as long as a picture is not newly stored (overwritten) in the area. Even if a memory area in which the picture that is not yet displayed is released, the picture that is not yet displayed and is released at the time of display but is left without being overwritten can be displayed by storing a picture newly not in the memory area but in the area where the picture that is already displayed is stored. The picture in the released picture area of the picture memory is called picture for display. "Already displayed" here is practically synonymous with "already outputted to a display device".
Fig. 6 is a flowchart showing an operation of the picture encoding apparatus 100 of the present embodiment. The present embodiment characterizes in determining the storage of the picture by judging whether the picture stored in the released area in the memory is already displayed or not.
Firstly, in Step 20, the picture encoding apparatus 100 judges whether or not the decoded picture is to be stored in the picture memory PicMem2 based on the instructions indicated in the memory control command MMCO.
In the case of storing the decoded picture in the picture memory, the released picture area is obtained (Step 21) and whether a picture stored in the released picture area is already
displayed or not is verified (Step 22). When it is not yet displayed, the operation goes back to Step 21 and the processing continues until the released area in which the picture already displayed has been stored is found.
When such released area is found, the decoded picture is stored in the area (Step 23).
Thus, when the picture to be displayed is displayed, the picture that is not yet displayed is stored in the memory without being overwritten until its display time since the area storing the displayed picture is reused.
Whether a picture stored in the memory is already displayed or not can be judged by the display picture control unit DispPicCtrl managing information on whether or not the picture is displayed.
Whether a picture area is a released area or not can be judged by referring to the information on whether or not each picture area is released, for instance, "used (usable as a reference picture)" or "unused (no longer used as a reference picture)" stored in the picture memory PicMem2 according to the memory control command MMCO.
With the above structure, the picture encoding apparatus of the present invention can be realized so as to overcome the existing problems.
Thus, overwriting of a picture newly to the picture that is not yet displayed can be prevented so that the latter picture can be outputted for display from the area that is already released but not overwritten at the display time. The picture that needs to be stored for display can be stored without requiring an unnecessary memory.
As the operation in the case which requires the modification in the picture size is same as in the first embodiment, the explanation is abbreviated.
(Third Embodiment)
The following describes a third embodiment of the present invention.
Fig. 7 is a flowchart of an operation of the picture encoding . apparatus 100 of the third embodiment of the present invention. The present embodiment characterizes in determining the storage of the picture according to the time when the memory is released.
Firstly, in Step 30, the picture encoding apparatus 100 judges whether or not the decoded picture is to be stored in the picture memory PicMem2 based on the instruction indicated in the memory control command MMCO.
In the case of storing the decoded picture in the picture memory, the released picture memory area whose display time is the earliest within released area is obtained (Step 31) and the decoded picture is stored in the obtained area (Step 32).
The memory area in which the picture is decoded and stored at the earliest time instead of the memory area released at the earliest display time may be allocated as an area to store the picture. For, there is a high possibility that the pictures stored in these memory areas are already displayed.
These earliest times are not necessarily based on time and may be the earliest time according to an order, for instance, it may be the earliest time according to a display order. For example, it is highly possible that a picture whose display order is the earliest is already displayed and a memory area storing such picture can be reused in turn as a storing area in the memory regardless of whether it is already displayed or not. Normally, the intervals of displaying pictures is regular, therefore, the order of displaying pictures may be considered as the display time.
Thus, overwriting of a picture newly onto the picture that is not yet displayed can be prevented so that the latter picture can be outputted for display from the area that is already released but not
overwritten at the display time. The picture that needs to be stored for display can be stored without requiring an unnecessary memory. The processing of storing the picture which needs to be stored for display can be carried out regardless of whether the picture stored in the picture memory PicMem2 is already displayed or not. When the earliest time indicates the earliest time in display time, whether or not the picture is stored at the earliest time can be judged by the display picture control unit DispPicCtrl managing the information on whether or not the picture is displayed.
As an operation in a case in which a modification of a picture size is required is same as the one described in the first embodiment, the explanation is abbreviated.
(Fourth Embodiment)
The following illustrates a fourth embodiment of the present invention.
Fig. 8 is a flowchart showing an operation of the picture encoding apparatus 100 according to the fourth embodiment of the present invention. The present embodiment characterizes in determining a storage of the picture according to an order of releasing the memory.
Firstly, in Step 40, the picture encoding apparatus 100 judges whether or not the decoded picture is to be stored in the picture memory PicMem2 based on the instruction indicated in the memory control command MMCO.
In the case of storing the decoded picture in the picture memory, the picture memory area released at the earliest time within released area is obtained (Step 41) and the decoded picture is stored in the obtained area (Step 42).
Since it is a system who manages the information on display time, it is difficult to obtain the display time depending on a
method to fabricate a video decoding apparatus. It is highly possible that the picture with the earliest display time is stored in the area firstly released than the area released at the later time. Namely, it is with high possibility that the picture firstly released is . already displayed. Therefore, there is a high possibility that the picture that is not yet displayed is not overwritten when the decoded picture is stored in the picture area firstly released.
Whether the picture area is a released area or not can be judged by referring to the information on whether or not each picture area is released, for instance, "used (usable as a reference picture)" or "unused (no longer used as a reference picture)"' that is stored in the picture memory PicMem2 according to the memory control command MMCO. Or, the usage of the picture area can be fixed beforehand to a predetermined procedure in order to judge whether the picture area is the one that is firstly released according to the procedure. For example, this can be judged by the picture memory PicMem2 functioning as a memory using a first-in first-out (FIFO) method by which the contents of record whose time records that picture is to be stored newly is 1 sequentially discarded in turn and the latest pictures of• a fixed number of frames (or number of pictures) are always stored. Thus, overwriting a picture newly to a picture that is not yet displayed can be prevented so that the latter picture can be outputted for display from the area that is already released but not overwritten at the display time.
As an operation in the case in which the modification of the picture size is required is same as the one described in the first embodiment, the explanation is abbreviated.
(Fifth Embodiment)
The following illustrates a fifth embodiment of the present invention.
Fig. 9 is a block diagram of a picture decoding apparatus for realizing the picture decoding method of the present invention. The same referential numbers are put for the devices that operate in the same manner as a picture encoding apparatus for realizing the picture encoding method according to the present invention shown in the block diagram of Fig. 3 and a picture decoding apparatus for realizing the conventional picture decoding method shown in the block diagram of Fig. 28 and the explanation is thereby abbreviated.
The difference between the picture decoding apparatus 150 shown in Fig. 9 and the example of conventional apparatus shown in Fig. 28 is that a picture size modification detection unit PicSizeDet and a display picture control unit DispPicCtri are newly set. The picture size modification detection unit PicSizDet outputs a command to modify the picture size in the timing of starting encoding of a special I-picture (IDR picture) based on the picture size for the modification obtained from outside and the memory control command MM CO obtained from the variable length decoding unit VLD.
The display picture control unit DispPicCtri instructs the picture memory PicMem2 not to store a picture newly in the area for the picture that is not yet displayed when storing the new picture in the released area. Normally, even though an area for a picture is released, data of a picture that is stored right before is left in the memory and can be reproduced as long as a picture is not newly stored (overwritten) in the area. The picture that is released at the time of display but left without being overwritten can be displayed by storing a picture newly in the area where the picture that is already displayed is stored even if the memory area in which the picture that is not yet displayed is released. "Already displayed" here is practically synonymous with "already outputted to a display device".
Thus, when the picture to be displayed is displayed, the picture that is not yet displayed is stored in the memory without being overwritten until its display time since the area storing the displayed picture is reused.
With the above structure, the picture decoding apparatus of the present invention can be realized in order to overcome the existing problems. The picture decoding apparatus 150 may decode an encoded signal that is encoded by the picture encoding apparatus 100 shown in the third and fourth embodiments. In this case, the operation for the use of the picture memory is as same as the one described for the picture encoding apparatus shown in the third and fourth embodiments. Namely, for the reusability of the picture area that is released (no longer used for reference) in the picture memory, either method of deciding the area for the picture to be newly stored described in the first through third embodiments may be employed.
The following describes methods of storing the picture in the memory when decoding the encoded signal encoded by the picture encoding apparatus shown in the third and fourth embodiments.
Firstly, the method of storing the picture in the memory at the time of decoding the encoded signal encoded by the picture encoding apparatus shown in the third embodiment is explained.
The picture decoding apparatus 150 judges whether or not the decoded picture outputted from the addition unit Add in the picture decoding apparatus 150 is to be stored in the picture memory PicMem2 based on the instruction indicated in the memory control command MMCO.
When storing the decoded picture in the picture memory, the picture memory area firstly released is obtained and the decoded picture is stored in the obtained area.
Here, the memory area in which the picture is decoded and stored at the earliest time or the memory area in which the picture
with the earliest display time is stored instead of the memory area that is released at the earliest time may be allocated as an area to store the picture. For there is a high possibility that the pictures stored in these memory areas are already displayed.
Since it is a system that manages the information on display time, it is difficult to obtain the display time depending on a method to fabricate a picture decoding apparatus. It is highly possible that the picture with the earliest display time is stored in the area in which the picture is stored at the earliest time than the one in which the picture is stored at the later time. It is with high possibility that the picture stored at the earliest time is already displayed since it is natural that the picture with early display time is already displayed. Therefore, there is a high possibility that the picture that is not displayed yet is not overwritten when the decoded picture is stored in the area in which the picture stored at the earliest time has been stored. When the earliest time corresponds with the earliest time when the picture is encoded, whether the picture is encoded at the earliest time, for instance, can be judged by the prediction structure and the decoding order of the picture.
These earliest times are not necessarily based on time and may be the earliest time according to an order, for instance, it may be the earliest time according to a display order. For example, it is highly possible that a picture whose display order is the earliest is already displayed and a memory area storing such picture can be reused in turn as a storing area in the memory regardless of whether it is already displayed or not. Normally, the intervals of displaying pictures is regular, therefore, the order of displaying pictures may be considered as the display time.
Thus, overwriting of a picture newly onto the picture that is not yet displayed can be prevented so that the latter picture can be outputted for display from the area that is already released but not
overwritten at the display time. Also, the picture that needs to be stored for display can be stored without requiring an unnecessary memory.
The processing of storing the picture which needs to be -stored for display can be carried out regardless of whether the picture stored in the picture memory PicMem2 is already displayed or not. When the earliest time indicates the earliest time in display time, whether or not the picture is stored at the earliest time can be judged by the display picture control unit DispPicCtrl managing the information on whether or not the picture is displayed.
The following describes a method of storing a picture in the memory when decoding the encoded signal encoded by the picture encoding apparatus shown in the fourth embodiment.
The picture decoding apparatus 150 judges whether or not the decoded picture outputted from the addition unit Add mentioned above of the picture decoding method 150 is to be stored in the picture memory PicMem2 based on the instruction indicated in the memory control command MMCO.
In the case of storing the decoded picture in the'picture memory, the picture memory firstly released is obtained and the decoded picture is stored in the obtained area.
Since it is a system that manages the information on display time, it is difficult to obtain the display time depending on a method to fabricate a video decoding apparatus. It is highly possible that the picture with the earliest display time is stored in the area firstly released than the area released at the later time. Namely, it is likely that the picture firstly released is already displayed. Therefore, there is a high possibility that the picture that is not yet displayed is not overwritten by storing the decoded picture in the picture area firstly released.
Whether the picture area is a firstly released picture area or
not can be judged by referring to the information on whether or not each picture area is released, for instance, "used (usable as a reference picture)" or "unused (no longer used as a reference picture)", that is stored in the picture memory PicMem2 according . to the memory control command MMCO, including the order of releasing the pictures. Or, the usage of the picture area can be fixed beforehand to a predetermined procedure in order to judge whether the picture area is the one that is firstly released according to the procedure. For example, this can be judged by the picture memory PicMem2 functioning as a memory using a first-in first-out (FIFO) method by which the contents of record with old recording time is sequentially discarded when the new data is recorded so that the latest pictures of a fixed number of frames (or number of pictures) are always stored.
Thus, overwriting of a picture newly to a picture that is not yet displayed can be prevented and the picture can be outputted for display from the area that is already released but not overwritten at the display time.
The display unit Disp may be installed in the exterior of the picture decoding apparatus 150 in stead of being included in it so that the picture decoding apparatus 150 may send only the data necessary for displaying a picture at the display unit Disp.
Here, an operation of the picture decoding apparatus 150 when the picture size is modified, as already explained in the second embodiment, is illustrated. However, the operation is as same as the one described in the third and the fourth embodiments, therefore, the explanation is abbreviated.
A method corresponding to the first method in the case in which the picture size is modified shown in the second embodiment is that the picture decoding apparatus 150 releases a whole area in the memory including the area for reference in which the reference picture is stored and the area for display in which the picture for
display is stored and performs initialization when receiving a command to modify the picture size.
Fig. 10 is a flowchart showing an operation of the picture encoding apparatus 150.
The picture encoding apparatus 150 judges whether or not a signal outputted from the picture size modification detection unit PicSizeDet indicates a modification of a picture size (Step 100). When it does (Yes in Step 100), the picture encoding apparatus 150 releases a whole memory area of the picture memory PicMem2 (as a reusable state), initializes it (Step 102) and ends the processing.
When the picture size is not modified (No in Step 100), the picture decoding apparatus 150 judges whether or not the memory control command MM CO outputted from the variable length decoding unit VLD indicates the release (initialization) of the whole memory area in the picture memory PicMem2 (Step 101) and if it does (Yes in Step 101), releases the whole memory area (Step 102), if not (No in Step 101), release only the area for reference in which the reference picture is stored (Step 103) and ends the processing.
Thus releasing the whole area of the memory prevents the fragmentary use of the memory caused by the mixture of the pictures of different sizes and thereby the deterioration in the usability of the memory can be reduced.
Next, an operation of the picture decoding apparatus 150 corresponding to the second method in the case of the modification of the picture size shown in the second embodiment is explained.
In the case of modifying the picture size, the methods are switched from one to the other: a method of releasing the whole area of the memory or a method of releasing only the area for reference in which the reference picture is stored and displaying the displayable picture out of the pictures that are not yet displayed with the judgment made by the picture decoding
apparatus 150.
As described in the second embodiment, the instruction information (flag) indicating either to release the whole memory area or to release only the area for reference is contained in the memory control command MMCO in the stream Str outputted from the picture encoding apparatus 100.
The picture decoding apparatus 150 determines either of the two methods described above based on the instruction information contained in the memory control command MMCO.
Fig. 11 is a flowchart showing a determination operation.
Firstly, the picture decoding apparatus 150 judges whether or not the instruction information (flag) indicates the initialization of the whole area of the memory (Step 150). When it indicates the initialization of the whole area (Yes in Step 150), the picture decoding apparatus 150 releases the whole area, for initialization, including the area for display storing the picture for display that is not yet displayed (Step 151), otherwise (No in Step 150), releases only the area for reference for initialization (Step 152).
When the instruction information (flag) does not indicate the initialization of the whole area, the picture decoding apparatus 150 releases only the area for reference. As for the picture that is not displayed yet and stored in an area other than the area for reference, the picture decoding apparatus 150 judges the picture and displays the displayable.
The following describes the operation of the picture decoding apparatus 150 in the case of initializing only the area for reference, with reference to a flowchart.
Fig. 12 is a flowchart showing an operation of the picture decoding apparatus 150 (decoder).
The picture decoding apparatus 150 judges whether or not the signal outputted from the picture size modification detection unit PicSizeDet indicates a modification of a picture size (Step 200).
Unless it indicates the modification of the picture size (No in Step 200), the picture decoding apparatus 150 displays the picture to be displayed that is not yet displayed stored in the area for display (Step 203).
Meanwhile, when the signal indicates the modification of the picture size (Yes in Step 200) the picture decoding apparatus 150 determines whether or not the picture for display stored in the area for display is the one before the modification of the size takes place (Step 201). When it is not the case (No in Step 201), the picture decoding apparatus 150 displays the picture to be displayed that is not yet displayed (Step 203). When it is the case (Yes in Step 201), the picture decoding apparatus 150 judges whether or not the picture for display is displayable or not and display it based on the judgment (Step 202)
The following describes an operation of the picture decoding apparatus 150 for a judgment on whether the picture can be displayed or not.
Fig. 13 is a flowchart showing the operation of the picture decoding apparatus 150 with regards to a display of the picture.
In Fig. 13, the same marks are put for the same processing as described in Fig. 12.
The picture decoding apparatus 150 judges whether or not the picture for display stored in the area for display is the one before the modification of the size takes place (Step 201). When the picture is not the one before the modification takes place (No in Step 201), the picture decoding apparatus 150 displays the picture. On the other hand, when the picture is the one before the modification takes place (Yes in Step 201), the picture decoding apparatus 150 determines whether the picture to be displayed is damaged or not (Step 211)- When the picture is not damaged (No in Step 211) the picture is considered as displayable and thereby displayed (Step 210). When it is damaged (Yes in Step 211), the
preceding picture, for instance, is displayed instead. Here, not being damaged means that the picture to be displayed is not overwritten so that a new picture data is stored even the picture is a part of a picture being stored. In this way, the picture decoding apparatus 150 judges whether or not the picture to be displayed is damaged, determines the undamaged picture as displayable and displays it.
Thus, as explained in the flowcharts of Figs. 11, 12 and 13, the picture decoding apparatus 150 displays the picture that is not displayed yet according to the instruction information (flag) indicating whether or not to initialize the whole area of the memory when the modification of the picture size takes place.
Owing to the picture decoding method of the picture decoding apparatus 150 as described above, an appropriate decoding is realized by switching either to initialize the whole area of the memory or to initialize only the area for reference and display the picture for display that is not yet displayed even when the modification of the picture size is performed. Namely, when the free area in the memory is small, for instance, the whole area in the memory is initialized for reuse whereas when it is large, the case can be handled flexibly by allowing the display of the picture that is not yet displayed after initializing only the area for reference.
(Sixth Embodiment)
The following terms are used in a sixth embodiment. Namely, a reference picture buffer is an area combining an area for reference and the one for display in the picture memory PicMem2 in a picture encoding apparatus. A virtual display delay buffer is a virtual buffer for each picture for display to be stored in the area for display that is retained in the picture memory PicMem2 in the picture encoding apparatus and stores temporal reference
numbers of the pictures for display (picture numbers or the like). A reference memory buffer is an area for reference in the picture memory PicMem2 in a picture decoding apparatus. A post decoder buffer is an area for display in the picture memory PicMem2 in the picture decoding apparatus. The temporal reference numbers are the numbers that are assigned for the pictures according to the order of display time and may be an equivalent of the picture time Time.
Firstly, the explanation starts with the picture encoding apparatus. The virtual display delay buffer is used to limit the maximum number of the reference pictures used for predictive encoding performed by the picture encoding apparatus.
Fig. 14 shows processing of determining a relationship between the virtual display delay buffer and the maximum number of the backward reference pictures. Each module in Fig. 14 presents a function block or a processing step of a picture structure determination unit PicStruct, a reference picture control unit RefPicCtrl and a display picture control unit DispPicCtrl. As shown in the diagram, the maximum number of the reference pictures allowed, NR for this profile and level is determined in module 401. This value is defined for each profile and level and thereby the encoder encodes the value of profile/level, an equivalent of NR/ as information on a stream and a decoder obtains NR according to the value of profile/level in the stream. The picture encoding apparatus, then set the maximum number of backward reference pictures, NB, optimal for encoding a video sequence in module 402. The size of the virtual display delay buffer can be determined based on this NB value. When the NB is less than 2, the virtual display delay buffer is not required. However when NB is greater than or equal to 2, a virtual display delay buffer that can store NB-1 number of pictures is created in module 404. The information on the picture stored in the virtual display delay buffer is retained in
the memory or in any register. This virtual display delay buffer does not require a large physical memory space in the picture encoding apparatus. This is because only the descriptions of the reference pictures (picture numbers or the like) for identifying not a whole part of the reconstructed (decoded) picture but which reconstructed picture are stored in the virtual display delay buffer since the judgment to see which picture is stored in the virtual display delay buffer for its display unless the picture decoded by the picture decoding apparatus needs to be displayed (outputted). Besides the virtual display delay buffer, a display counter is created in module 405 and the value is retained either in the memory or in any register. The display counter is used to judge whether to remove an unnecessary picture from the virtual display delay buffer. The picture encoding apparatus then generates a picture size for NR number of reference pictures in the memory space based on the profile and level definition.
Maximum virtual display delay buffer size= NB-1 (1),
where NB
| # | Name | Date |
|---|---|---|
| 1 | 523-chenp-2004 form-18 05-07-2007.pdf | 2007-07-05 |
| 2 | 523-chenp-2004 form-13 05-07-2007.pdf | 2007-07-05 |
| 3 | 523-chenp-2004 form-13 05-05-2009.pdf | 2009-05-05 |
| 4 | 523-CHENP-2004 CORRESPONDENCE OTHERS 12-07-2011.pdf | 2011-07-12 |
| 5 | 523-CHENP-2004 EXAMINATION REPORT REPLY RECEIVED 25-08-2011.pdf | 2011-08-25 |
| 6 | 523-CHENP-2004 OTHER PATENT DOCUMENT 25-08-2011.pdf | 2011-08-25 |
| 7 | 523-chenp-2004 form-3 25-08-2011.pdf | 2011-08-25 |
| 8 | 523-chenp-2004 form-1 25-08-2011.pdf | 2011-08-25 |
| 9 | 523-CHENP-2004 AMENDED CLAIMS 25-08-2011.pdf | 2011-08-25 |
| 10 | 523-CHENP-2004 AMENDED PAGES OF SPECIFICATION 25-08-2011.pdf | 2011-08-25 |
| 11 | 523-chenp-2004-pct.pdf | 2011-09-03 |
| 12 | 523-chenp-2004-form 5.pdf | 2011-09-03 |
| 13 | 523-chenp-2004-form 3.pdf | 2011-09-03 |
| 14 | 523-chenp-2004-form 26.pdf | 2011-09-03 |
| 15 | 523-chenp-2004-form 1.pdf | 2011-09-03 |
| 16 | 523-chenp-2004-drawings.pdf | 2011-09-03 |
| 17 | 523-chenp-2004-description(complete).pdf | 2011-09-03 |
| 18 | 523-chenp-2004-correspondnece-po.pdf | 2011-09-03 |
| 19 | 523-chenp-2004-correspondnece-others.pdf | 2011-09-03 |
| 20 | 523-chenp-2004-claims.pdf | 2011-09-03 |
| 21 | 523-chenp-2004-abstract.pdf | 2011-09-03 |
| 22 | 523-chenp-2004 others.pdf | 2011-09-03 |
| 23 | 523-CHENP-2004 OTHER PATENT DOCUMENT 14-05-2012.pdf | 2012-05-14 |
| 24 | 523-CHENP-2004 CORRESPONDENCE OTHERS 14-05-2012.pdf | 2012-05-14 |
| 25 | 523-CHENP-2004 CORRESPONDENCE OTHERS 26-11-2012.pdf | 2012-11-26 |
| 26 | Petition Under Rule 137 [11-07-2016(online)].pdf | 2016-07-11 |
| 27 | Form 27 [18-07-2016(online)].pdf | 2016-07-18 |
| 28 | Form 27 [27-03-2017(online)].pdf | 2017-03-27 |
| 29 | 523-CHENP-2004-RELEVANT DOCUMENTS [16-02-2018(online)].pdf | 2018-02-16 |
| 30 | 523-CHENP-2004-RELEVANT DOCUMENTS [21-02-2019(online)].pdf | 2019-02-21 |
| 31 | 523-CHENP-2004-RELEVANT DOCUMENTS [04-03-2020(online)].pdf | 2020-03-04 |
| 32 | 523-CHENP-2004-RELEVANT DOCUMENTS [13-08-2021(online)].pdf | 2021-08-13 |
| 33 | 523-CHENP-2004-RELEVANT DOCUMENTS [20-09-2022(online)].pdf | 2022-09-20 |
| 34 | 523-CHENP-2004-RELEVANT DOCUMENTS [22-09-2023(online)].pdf | 2023-09-22 |