def read_decorrelation_weights(block_header, decorrelation_terms_count,
    sub_block_size, actual_size_1_less, sub_block_data):
    """returns one tuple of decorrelation weights per decorrelation pass
    the number of weights in each tuple equals the number of channels

    weight[pass][channel]
    """
    if actual_size_1_less == 0:
        weight_count = sub_block_size * 2
    else:
        weight_count = sub_block_size * 2 - 1
    weight_values = []
    for i in range(weight_count):
        value_i = sub_block_data.read_signed(8)
        if value_i > 0:
            weight_values.append(value_i * 2 ** 3 + (value_i * 2 ** 3 + 2 **
                6) // 2 ** 7)
        elif value_i == 0:
            weight_values.append(0)
        else:
            weight_values.append(value_i * 2 ** 3)
    weights = []
    if block_header.mono_output == 0 and block_header.false_stereo == 0:
        if weight_count // 2 > decorrelation_terms_count:
            raise ValueError('invalid number of decorrelation weights')
        for i in range(weight_count // 2):
            weights.append((weight_values[i * 2], weight_values[i * 2 + 1]))
        for i in range(weight_count // 2, decorrelation_terms_count):
            weights.append((0, 0))
        weights.reverse()
    else:
        if weight_count > decorrelation_terms_count:
            raise ValueError('invalid number of decorrelation weights')
        for i in range(weight_count):
            weights.append((weight_values[i],))
        for i in range(weight_count, decorrelation_terms_count):
            weights.append((0, 0))
        weights.reverse()
    return weights
