An image coding method for coding an image using inter-prediction on a block-by-block basis to generate a bitstream, the method comprising: determining, on a slice-by-slice basis, a predetermined number as a maximum number of merging block candidates each of which has a combination of a prediction direction, a motion vector, and a reference picture index for use in coding of a current block, wherein the maximum number is an integer greater than two; deriving (S101, S601, S602) a plurality of merging block candidates based on prediction directions, motion vectors, and reference picture indexes used in coding of blocks each of which is a spatially neighboring block or a co-located block of the current block, the derived plurality of merging block candidates including at least a first merging block candidate and a second merging block candidate, the first merging block candidate having at least a first motion vector and a first reference picture index value to identify a first reference picture corresponding to the first motion vector, wherein the first motion vector and the first reference picture index correspond to a first prediction direction used to code a first block, and the second merging block candidate having at least a second motion vector, and a second reference picture index value to identify a second reference picture corresponding to the second motion vector, wherein the second motion vector and the second reference picture index correspond to a second prediction direction used to code a second block; determining (S131, S604) that a total number of the derived merging block candidates is smaller than the maximum number; deriving at least one combined merging block candidate for bi-directional prediction by assigning the first motion vector and the first reference picture index for the first prediction direction of the combined merging block candidate and by assigning the second motion vector and the second reference picture index for the second prediction direction of the combined merging block candidate in response to determining that the total number of the derived merging block candidates is smaller than the maximum number, wherein the first and the second prediction directions of the combined merging block candidate are indicated by the first and second prediction direction of the first and second merging block candidate respectively, thereby a combination is selected from the derived plurality of merging block candidates; selecting (S203, S606) a merging block candidate to be used for the coding of the current block from the derived plurality of merging block candidates and the derived combined merging block candidate; and coding (S105, S505, S607), using the determined maximum number, an index for identifying the selected merging block candidate, and attaching the coded index to the bitstream. determining, on a slice-by-slice basis, a predetermined number as a maximum number of merging block candidates each of which has a combination of a prediction direction, a motion vector, and a reference picture index for use in coding of a current block, wherein the maximum number is an integer greater than two; deriving (S101, S601, S602) a plurality of merging block candidates based on prediction directions, motion vectors, and reference picture indexes used in coding of blocks each of which is a spatially neighboring block or a co-located block of the current block, the derived plurality of merging block candidates including at least a first merging block candidate and a second merging block candidate, the first merging block candidate having at least a first motion vector and a first reference picture index value to identify a first reference picture corresponding to the first motion vector, wherein the first motion vector and the first reference picture index correspond to a first prediction direction used to code a first block, and the second merging block candidate having at least a second motion vector, and a second reference picture index value to identify a second reference picture corresponding to the second motion vector, wherein the second motion vector and the second reference picture index correspond to a second prediction direction used to code a second block; determining (S131, S604) that a total number of the derived merging block candidates is smaller than the maximum number; deriving at least one combined merging block candidate for bi-directional prediction by assigning the first motion vector and the first reference picture index for the first prediction direction of the combined merging block candidate and by assigning the second motion vector and the second reference picture index for the second prediction direction of the combined merging block candidate in response to determining that the total number of the derived merging block candidates is smaller than the maximum number, wherein the first and the second prediction directions of the combined merging block candidate are indicated by the first and second prediction direction of the first and second merging block candidate respectively, thereby a combination is selected from the derived plurality of merging block candidates; selecting (S203, S606) a merging block candidate to be used for the coding of the current block from the derived plurality of merging block candidates and the derived combined merging block candidate; and coding (S105, S505, S607), using the determined maximum number, an index for identifying the selected merging block candidate, and attaching the coded index to the bitstream.