Commit 8c5ff7c6 authored by Jan Kiene's avatar Jan Kiene
Browse files

go back to br switching file creation

parent 93fc8044
Loading
Loading
Loading
Loading
+5 −7
Original line number Diff line number Diff line
@@ -55,9 +55,9 @@ def random_choice(
    """
    Generator for randomly picking from a list of values.
    """
    # create copy to be safe against external modifications
    assert len(values) > 1

    # create copy to be safe against external modifications
    values = list(values)
    last = last_init
    if seed is not None:
@@ -70,7 +70,7 @@ def random_choice(
        last = curr


def create_br_switching_pattern(
def create_br_switching_file(
    bitrates: np.ndarray,
    strategy: str,
    switch_time: int = 1,
@@ -141,12 +141,10 @@ def create_br_switching_pattern(
        brs += [x for x in rand_gen]

    brs = np.repeat(brs, switch_time).astype(np.int32)
    return brs

    # out_path = DUT_PATH.joinpath(fname)
    # brs.tofile(out_path)
    out_path = DUT_PATH.joinpath(fname)
    brs.tofile(out_path)

    # return out_path
    return out_path


def get_md(input_format, md_type=None):