def get_magnitude_dc(value):
    """Returns the 1 byte magnitude for a DC pixel."""
    if value < 1:
        value *= -1
    length = 0
    while value:
        value >>= 1
        length += 1
    return length