def get_spec(in_colorspace, out_colorspace):
    validate_in_out(in_colorspace, out_colorspace)
    global selected_device_cpu_cost, selected_device_gpu_cost, selected_device_setup_cost, selected_device_max_size
    max_w, max_h = selected_device_max_size
    return csc_spec(ColorspaceConverter, codec_type=get_type(),
                      speed=100,
                      setup_cost=selected_device_setup_cost,
                      cpu_cost=selected_device_cpu_cost, gpu_cost=selected_device_gpu_cost, min_w=128, min_h=128, can_scale=True, max_w=max_w, max_h=max_h)
def get_spec(in_colorspace, out_colorspace):
    validate_in_out(in_colorspace, out_colorspace)
    global selected_device_cpu_cost, selected_device_gpu_cost, selected_device_setup_cost, selected_device_max_size
    max_w, max_h = selected_device_max_size
    return csc_spec(ColorspaceConverter, codec_type=get_type(),
                      speed=100,
                      setup_cost=selected_device_setup_cost,
                      cpu_cost=selected_device_cpu_cost, gpu_cost=selected_device_gpu_cost, min_w=128, min_h=128, can_scale=True, max_w=max_w, max_h=max_h)
Exemple #3
0
def get_spec(in_colorspace, out_colorspace):
    assert in_colorspace in CONVERSIONS, "invalid input colorspace: %s (must be one of %s)" % (
        in_colorspace, get_input_colorspaces())
    out_cs = CONVERSIONS[in_colorspace]
    assert out_colorspace in out_cs, "invalid output colorspace: %s (must be one of %s)" % (
        out_colorspace, out_cs)
    #low score as this should be used as fallback only:
    return csc_spec(ColorspaceConverter,
                    codec_type=get_type(),
                    quality=50,
                    speed=0,
                    setup_cost=40,
                    min_w=2,
                    min_h=2,
                    max_w=16 * 1024,
                    max_h=16 * 1024,
                    can_scale=False)
def get_spec(in_colorspace, out_colorspace):
    assert in_colorspace in CONVERSIONS, "invalid input colorspace: %s (must be one of %s)" % (in_colorspace, get_input_colorspaces())
    out_cs = CONVERSIONS[in_colorspace]
    assert out_colorspace in out_cs, "invalid output colorspace: %s (must be one of %s)" % (out_colorspace, out_cs)
    #low score as this should be used as fallback only:
    return csc_spec(ColorspaceConverter, codec_type=get_type(), quality=50, speed=0, setup_cost=40, min_w=2, min_h=2, max_w=16*1024, max_h=16*1024, can_scale=False)