def get_depth_gop(GOP_struct):
    """
    Return the maximal depth (i.e. the maximal coding order) of a GOP
    """

    depth_max = 0
    for f in GOP_struct:
        cur_coding_order = GOP_struct.get(f).get('coding_order')
        if cur_coding_order > depth_max:
            depth_max = cur_coding_order
    return depth_max