def compute_sample_length(clip_length, step_size):
    """Compute the number of frames to be sampled for a clip.

     Clip is of length ``clip_length`` with frame step size of ``step_size``
     to be generated.

    Args:
        clip_length: Number of frames to sample
        step_size: Number of frames to skip in between adjacent frames in the output

    Returns:
        Number of frames to sample to read a clip of length ``clip_length`` while
        skipping ``step_size - 1`` frames.

    """
    return 1 + step_size * (clip_length - 1)