import math


def min_auto_border_size(extreme_frame_corners):
    """Calc minimum border size to accommodate most extreme transforms

    :param extreme_frame_corners: extreme_frame_corners attribute of vidstab object
    :return: minimum border size as int
    """
    abs_extreme_corners = [abs(x) for x in extreme_frame_corners.values()]
    return math.ceil(max(abs_extreme_corners))