def internal_params_1D(
    pixels_per_clock: int,
    window_width: int,
    image_size: int,
    output_stride: int,
    origin: int
):
    """Calculate "internal" parameters of linebuffer based on user parameters.

    This includes the window_count (number of total windows outputted),
    the parallelism (width of the output bus in number of windows),
    and the valid_count (number of times valid should be asserted).

    Return as tuple (window_count, parallelism, valid_count).
    """
    stride = output_stride

    # Total number of windows outputted.
    window_count = image_size//stride

    # Number of parallel window outputs.
    parallelism = pixels_per_clock//stride
    if parallelism == 0:
        parallelism = 1
    else:
        assert parallelism*stride == pixels_per_clock, \
            "Expected integer throughput (stride evenly dividing px/clk)."

    # Number of times valid should be asserted.
    valid_count = window_count//parallelism
    assert valid_count * parallelism == window_count, \
        "Expected window count (img/stride) to be divisible by parallelism " \
        "(px/clk / stride)"

    return window_count, parallelism, valid_count