Patent ID: 8787448

Claim:
A coding method for coding a moving picture for allowing switching of moving image streams, the coding method comprising: assigning an exclusive continuous picture number to the current picture, the picture number being assigned to the current picture to identify the current picture, and a value of the picture number being incremented by 1 for a reference picture following the current picture; coding the picture number of the current picture; and judging whether or not (i) the current picture is a picture capable of switching the moving image streams and (ii) all reference picture release information is to be coded, the all reference picture release information instructing a decoder to release all reference pictures stored in a memory of the decoder, wherein, when said judging judges that the current picture is a picture capable of switching the moving image streams and judges that the all reference picture release information is to be coded, the coding method performs: coding the all reference picture release information; coding the current picture to obtain a coded picture; initializing the picture number of the current picture by assigning a new picture number of “0” to the current picture and assigning a picture number starting with the new picture number of the current picture to a following picture, which is continuous from the new picture number of the current picture and is to be coded; and outputting, as a coded stream, (i) a coded picture number, (ii) the coded picture according to the coded picture number, and (iii) the all reference picture release information, wherein, when said judging judges that the current picture is not a picture capable of switching the moving image streams and judges that the all reference picture release information is not to be coded, the coding method performs: coding the current picture to obtain a coded picture; outputting, as a coded stream, the coded picture number of the current picture and the coded picture according to the coded picture number; coding the picture number of the following picture, which is continuous from the picture number of the current picture; and coding the following picture, and wherein, when the current picture, which is a picture capable of switching moving image streams, is assigned the picture number of “0” and the picture number of the following picture to be coded is “0,” there is no error even though the picture numbers of the current picture and the following picture are not continuous.