Patent ID: 7505518

Claim:
A decoding method for decoding a coded signal which contains a picture number to identify a reference picture stored in a memory, said method comprising: obtaining a first picture number from a first coded picture included in the coded signal; judging if all picture release information is included in the first coded picture, the all picture release information being an instruction to release all pictures stored in the memory; decoding the first coded picture to obtain a first decoded picture, the first decoded picture having the first picture number; and storing the first decoded picture into the memory; wherein in a case where it is judged that the all picture release information is not included in the first coded picture, the following steps are performed: holding the first picture number of the first decoded picture unchanged after said decoding of the first coded picture, and decoding subsequent coded pictures following the first coded picture, the subsequent coded pictures containing continuous picture numbers following the first picture number; and wherein in a case where it is judged that the all picture release information is included in the first coded picture, the following steps are performed: releasing all pictures except for the first decoded picture, which are stored in the memory, after the decoding of the first coded picture, and prohibiting from using, as a reference picture, the all pictures except for the first decoded picture in the decoding of subsequent coded pictures, changing the first picture number of the first decoded picture to a second picture number after said decoding of the first coded picture and after said releasing of the all pictures except for the first decoded picture, and decoding subsequent coded pictures following the first coded picture, the subsequent coded pictures containing continuous picture numbers following the second picture number.