1. A method comprising: encoding a bitstream comprising a base layer, a first enhancement layer and a second enhancement layer; encoding an indication of both the base layer and the first enhancement layer used for prediction for the second enhancement layer in the bitstream; encoding, in the bitstream, an indication of a first set of prediction types that is applicable from the base layer to the second enhancement layer, wherein the first set of prediction types is a subset of all prediction types available for prediction between layers, and encoding, in the bitstream, an indication of a second set of prediction types that is applicable from the base layer or the first enhancement layer to the second enhancement layer, wherein the second set of prediction types is a subset of all prediction types available for prediction between layers.