diff options
31 files changed, 70 insertions, 2751 deletions
diff --git a/COPYRIGHT.txt b/COPYRIGHT.txt index 443e6fee97..7741573039 100644 --- a/COPYRIGHT.txt +++ b/COPYRIGHT.txt @@ -257,12 +257,6 @@ Comment: FastLZ Copyright: 2005-2020, Ariya Hidayat License: Expat -Files: ./thirdparty/misc/hq2x.cpp - ./thirdparty/misc/hq2x.h -Comment: hq2x implementation -Copyright: 2016, Bruno Ribeiro -License: Apache-2.0 - Files: ./thirdparty/misc/ifaddrs-android.cc ./thirdparty/misc/ifaddrs-android.h Comment: libjingle @@ -334,7 +328,7 @@ License: Zlib Files: ./thirdparty/rvo2/ Comment: RVO2 -Copyright: 2016, University of North Carolina at Chapel Hill +Copyright: 2016, University of North Carolina at Chapel Hill License: Apache 2.0 Files: ./thirdparty/squish/ diff --git a/core/SCsub b/core/SCsub index d53988fae7..80a5f6b623 100644 --- a/core/SCsub +++ b/core/SCsub @@ -52,7 +52,6 @@ thirdparty_misc_sources = [ "r128.c", "smaz.c", # C++ sources - "hq2x.cpp", "pcg.cpp", "triangulator.cpp", "clipper.cpp", diff --git a/core/image.cpp b/core/image.cpp index f99e8a636f..51216c8c31 100644 --- a/core/image.cpp +++ b/core/image.cpp @@ -37,8 +37,6 @@ #include "core/os/copymem.h" #include "core/print_string.h" -#include "thirdparty/misc/hq2x.h" - #include <stdio.h> const char *Image::format_names[Image::FORMAT_MAX] = { @@ -1445,47 +1443,6 @@ static void _generate_po2_mipmap(const Component *p_src, Component *p_dst, uint3 } } -void Image::expand_x2_hq2x() { - ERR_FAIL_COND(!_can_modify(format)); - - bool used_mipmaps = has_mipmaps(); - if (used_mipmaps) { - clear_mipmaps(); - } - - Format current = format; - - if (current != FORMAT_RGBA8) { - convert(FORMAT_RGBA8); - } - - Vector<uint8_t> dest; - dest.resize(width * 2 * height * 2 * 4); - - { - const uint8_t *r = data.ptr(); - uint8_t *w = dest.ptrw(); - - ERR_FAIL_COND(!r); - - hq2x_resize((const uint32_t *)r, width, height, (uint32_t *)w); - } - - width *= 2; - height *= 2; - data = dest; - - if (current != FORMAT_RGBA8) { - convert(current); - } - - // FIXME: This is likely meant to use "used_mipmaps" as defined above, but if we do, - // we end up with a regression: GH-22747 - if (mipmaps) { - generate_mipmaps(); - } -} - void Image::shrink_x2() { ERR_FAIL_COND(data.size() == 0); @@ -3047,7 +3004,6 @@ void Image::_bind_methods() { ClassDB::bind_method(D_METHOD("resize_to_po2", "square"), &Image::resize_to_po2, DEFVAL(false)); ClassDB::bind_method(D_METHOD("resize", "width", "height", "interpolation"), &Image::resize, DEFVAL(INTERPOLATE_BILINEAR)); ClassDB::bind_method(D_METHOD("shrink_x2"), &Image::shrink_x2); - ClassDB::bind_method(D_METHOD("expand_x2_hq2x"), &Image::expand_x2_hq2x); ClassDB::bind_method(D_METHOD("crop", "width", "height"), &Image::crop); ClassDB::bind_method(D_METHOD("flip_x"), &Image::flip_x); diff --git a/core/image.h b/core/image.h index dbdfaa917b..53c203998e 100644 --- a/core/image.h +++ b/core/image.h @@ -235,7 +235,6 @@ public: void resize_to_po2(bool p_square = false); void resize(int p_width, int p_height, Interpolation p_interpolation = INTERPOLATE_BILINEAR); void shrink_x2(); - void expand_x2_hq2x(); bool is_size_po2() const; /** * Crop the image to a specific size, if larger, then the image is filled by black diff --git a/doc/classes/Image.xml b/doc/classes/Image.xml index 99253e8840..55d2275194 100644 --- a/doc/classes/Image.xml +++ b/doc/classes/Image.xml @@ -190,13 +190,6 @@ <description> </description> </method> - <method name="expand_x2_hq2x"> - <return type="void"> - </return> - <description> - Stretches the image and enlarges it by a factor of 2. No interpolation is done. - </description> - </method> <method name="fill"> <return type="void"> </return> diff --git a/modules/gdnative/gdnative/aabb.cpp b/modules/gdnative/gdnative/aabb.cpp index 246e5d4e8d..7f22c7dfe3 100644 --- a/modules/gdnative/gdnative/aabb.cpp +++ b/modules/gdnative/gdnative/aabb.cpp @@ -37,6 +37,8 @@ extern "C" { #endif +static_assert(sizeof(godot_aabb) == sizeof(AABB), "AABB size mismatch"); + void GDAPI godot_aabb_new(godot_aabb *r_dest, const godot_vector3 *p_pos, const godot_vector3 *p_size) { const Vector3 *pos = (const Vector3 *)p_pos; const Vector3 *size = (const Vector3 *)p_size; diff --git a/modules/gdnative/gdnative/array.cpp b/modules/gdnative/gdnative/array.cpp index 0c764ab8fd..fb23863dc9 100644 --- a/modules/gdnative/gdnative/array.cpp +++ b/modules/gdnative/gdnative/array.cpp @@ -41,6 +41,8 @@ extern "C" { #endif +static_assert(sizeof(godot_array) == sizeof(Array), "Array size mismatch"); + void GDAPI godot_array_new(godot_array *r_dest) { Array *dest = (Array *)r_dest; memnew_placement(dest, Array); diff --git a/modules/gdnative/gdnative/basis.cpp b/modules/gdnative/gdnative/basis.cpp index 4f489287b9..990fd3795d 100644 --- a/modules/gdnative/gdnative/basis.cpp +++ b/modules/gdnative/gdnative/basis.cpp @@ -37,6 +37,8 @@ extern "C" { #endif +static_assert(sizeof(godot_basis) == sizeof(Basis), "Basis size mismatch"); + void GDAPI godot_basis_new_with_rows(godot_basis *r_dest, const godot_vector3 *p_x_axis, const godot_vector3 *p_y_axis, const godot_vector3 *p_z_axis) { const Vector3 *x_axis = (const Vector3 *)p_x_axis; const Vector3 *y_axis = (const Vector3 *)p_y_axis; diff --git a/modules/gdnative/gdnative/color.cpp b/modules/gdnative/gdnative/color.cpp index d79170771a..c75e74daba 100644 --- a/modules/gdnative/gdnative/color.cpp +++ b/modules/gdnative/gdnative/color.cpp @@ -37,6 +37,8 @@ extern "C" { #endif +static_assert(sizeof(godot_color) == sizeof(Color), "Color size mismatch"); + void GDAPI godot_color_new_rgba(godot_color *r_dest, const godot_real p_r, const godot_real p_g, const godot_real p_b, const godot_real p_a) { Color *dest = (Color *)r_dest; *dest = Color(p_r, p_g, p_b, p_a); diff --git a/modules/gdnative/gdnative/dictionary.cpp b/modules/gdnative/gdnative/dictionary.cpp index b145b88934..a126974815 100644 --- a/modules/gdnative/gdnative/dictionary.cpp +++ b/modules/gdnative/gdnative/dictionary.cpp @@ -39,6 +39,8 @@ extern "C" { #endif +static_assert(sizeof(godot_dictionary) == sizeof(Dictionary), "Dictionary size mismatch"); + void GDAPI godot_dictionary_new(godot_dictionary *r_dest) { Dictionary *dest = (Dictionary *)r_dest; memnew_placement(dest, Dictionary); diff --git a/modules/gdnative/gdnative/node_path.cpp b/modules/gdnative/gdnative/node_path.cpp index 93f43835c8..88ed650ebe 100644 --- a/modules/gdnative/gdnative/node_path.cpp +++ b/modules/gdnative/gdnative/node_path.cpp @@ -37,6 +37,8 @@ extern "C" { #endif +static_assert(sizeof(godot_node_path) == sizeof(NodePath), "NodePath size mismatch"); + void GDAPI godot_node_path_new(godot_node_path *r_dest, const godot_string *p_from) { NodePath *dest = (NodePath *)r_dest; const String *from = (const String *)p_from; diff --git a/modules/gdnative/gdnative/plane.cpp b/modules/gdnative/gdnative/plane.cpp index 923308dc34..663937f906 100644 --- a/modules/gdnative/gdnative/plane.cpp +++ b/modules/gdnative/gdnative/plane.cpp @@ -37,6 +37,8 @@ extern "C" { #endif +static_assert(sizeof(godot_plane) == sizeof(Plane), "Plane size mismatch"); + void GDAPI godot_plane_new_with_reals(godot_plane *r_dest, const godot_real p_a, const godot_real p_b, const godot_real p_c, const godot_real p_d) { Plane *dest = (Plane *)r_dest; *dest = Plane(p_a, p_b, p_c, p_d); diff --git a/modules/gdnative/gdnative/pool_arrays.cpp b/modules/gdnative/gdnative/pool_arrays.cpp index 589b4d4dfe..652f59cd07 100644 --- a/modules/gdnative/gdnative/pool_arrays.cpp +++ b/modules/gdnative/gdnative/pool_arrays.cpp @@ -42,6 +42,14 @@ extern "C" { #endif +static_assert(sizeof(godot_packed_byte_array) == sizeof(Vector<uint8_t>), "Vector<uint8_t> size mismatch"); +static_assert(sizeof(godot_packed_int_array) == sizeof(Vector<godot_int>), "Vector<godot_int> size mismatch"); +static_assert(sizeof(godot_packed_real_array) == sizeof(Vector<godot_real>), "Vector<godot_real> size mismatch"); +static_assert(sizeof(godot_packed_string_array) == sizeof(Vector<String>), "Vector<String> size mismatch"); +static_assert(sizeof(godot_packed_vector2_array) == sizeof(Vector<Vector2>), "Vector<Vector2> size mismatch"); +static_assert(sizeof(godot_packed_vector3_array) == sizeof(Vector<Vector3>), "Vector<Vector3> size mismatch"); +static_assert(sizeof(godot_packed_color_array) == sizeof(Vector<Color>), "Vector<Color> size mismatch"); + #define memnew_placement_custom(m_placement, m_class, m_constr) _post_initialize(new (m_placement, sizeof(m_class), "") m_constr) // byte diff --git a/modules/gdnative/gdnative/quat.cpp b/modules/gdnative/gdnative/quat.cpp index 15c04f7191..de6308ad2a 100644 --- a/modules/gdnative/gdnative/quat.cpp +++ b/modules/gdnative/gdnative/quat.cpp @@ -37,6 +37,8 @@ extern "C" { #endif +static_assert(sizeof(godot_quat) == sizeof(Quat), "Quat size mismatch"); + void GDAPI godot_quat_new(godot_quat *r_dest, const godot_real p_x, const godot_real p_y, const godot_real p_z, const godot_real p_w) { Quat *dest = (Quat *)r_dest; *dest = Quat(p_x, p_y, p_z, p_w); diff --git a/modules/gdnative/gdnative/rect2.cpp b/modules/gdnative/gdnative/rect2.cpp index a2f735172f..63cbbaa3cf 100644 --- a/modules/gdnative/gdnative/rect2.cpp +++ b/modules/gdnative/gdnative/rect2.cpp @@ -37,6 +37,8 @@ extern "C" { #endif +static_assert(sizeof(godot_rect2) == sizeof(Rect2), "Rect2 size mismatch"); + void GDAPI godot_rect2_new_with_position_and_size(godot_rect2 *r_dest, const godot_vector2 *p_pos, const godot_vector2 *p_size) { const Vector2 *position = (const Vector2 *)p_pos; const Vector2 *size = (const Vector2 *)p_size; diff --git a/modules/gdnative/gdnative/rid.cpp b/modules/gdnative/gdnative/rid.cpp index 7ea80123a3..d7a63f33a7 100644 --- a/modules/gdnative/gdnative/rid.cpp +++ b/modules/gdnative/gdnative/rid.cpp @@ -38,6 +38,8 @@ extern "C" { #endif +static_assert(sizeof(godot_rid) == sizeof(RID), "RID size mismatch"); + void GDAPI godot_rid_new(godot_rid *r_dest) { RID *dest = (RID *)r_dest; memnew_placement(dest, RID); diff --git a/modules/gdnative/gdnative/string.cpp b/modules/gdnative/gdnative/string.cpp index a22af89edc..724a4b56cb 100644 --- a/modules/gdnative/gdnative/string.cpp +++ b/modules/gdnative/gdnative/string.cpp @@ -40,6 +40,10 @@ extern "C" { #endif +static_assert(sizeof(godot_char_string) == sizeof(CharString), "CharString size mismatch"); +static_assert(sizeof(godot_string) == sizeof(String), "String size mismatch"); +static_assert(sizeof(godot_char_type) == sizeof(CharType), "CharType size mismatch"); + godot_int GDAPI godot_char_string_length(const godot_char_string *p_cs) { const CharString *cs = (const CharString *)p_cs; diff --git a/modules/gdnative/gdnative/string_name.cpp b/modules/gdnative/gdnative/string_name.cpp index 1abb4486b1..7bbaaeeaa0 100644 --- a/modules/gdnative/gdnative/string_name.cpp +++ b/modules/gdnative/gdnative/string_name.cpp @@ -39,6 +39,8 @@ extern "C" { #endif +static_assert(sizeof(godot_string_name) == sizeof(StringName), "StringName size mismatch"); + void GDAPI godot_string_name_new(godot_string_name *r_dest, const godot_string *p_name) { StringName *dest = (StringName *)r_dest; const String *name = (const String *)p_name; diff --git a/modules/gdnative/gdnative/transform.cpp b/modules/gdnative/gdnative/transform.cpp index c9b3e37fb2..d19de93e9b 100644 --- a/modules/gdnative/gdnative/transform.cpp +++ b/modules/gdnative/gdnative/transform.cpp @@ -37,6 +37,8 @@ extern "C" { #endif +static_assert(sizeof(godot_transform) == sizeof(Transform), "Transform size mismatch"); + void GDAPI godot_transform_new_with_axis_origin(godot_transform *r_dest, const godot_vector3 *p_x_axis, const godot_vector3 *p_y_axis, const godot_vector3 *p_z_axis, const godot_vector3 *p_origin) { const Vector3 *x_axis = (const Vector3 *)p_x_axis; const Vector3 *y_axis = (const Vector3 *)p_y_axis; diff --git a/modules/gdnative/gdnative/transform2d.cpp b/modules/gdnative/gdnative/transform2d.cpp index 26a71333b1..c0f7878eb0 100644 --- a/modules/gdnative/gdnative/transform2d.cpp +++ b/modules/gdnative/gdnative/transform2d.cpp @@ -37,6 +37,8 @@ extern "C" { #endif +static_assert(sizeof(godot_transform2d) == sizeof(Transform2D), "Transform2D size mismatch"); + void GDAPI godot_transform2d_new(godot_transform2d *r_dest, const godot_real p_rot, const godot_vector2 *p_pos) { const Vector2 *pos = (const Vector2 *)p_pos; Transform2D *dest = (Transform2D *)r_dest; diff --git a/modules/gdnative/gdnative/variant.cpp b/modules/gdnative/gdnative/variant.cpp index f0fc44ae8a..29d0f96b97 100644 --- a/modules/gdnative/gdnative/variant.cpp +++ b/modules/gdnative/gdnative/variant.cpp @@ -37,6 +37,8 @@ extern "C" { #endif +static_assert(sizeof(godot_variant) == sizeof(Variant), "Variant size mismatch"); + // Workaround GCC ICE on armv7hl which was affected GCC 6.0 up to 8.0 (GH-16100). // It was fixed upstream in 8.1, and a fix was backported to 7.4. // This can be removed once no supported distro ships with versions older than 7.4. diff --git a/modules/gdnative/gdnative/vector2.cpp b/modules/gdnative/gdnative/vector2.cpp index b6c3569f42..72c3c0ec35 100644 --- a/modules/gdnative/gdnative/vector2.cpp +++ b/modules/gdnative/gdnative/vector2.cpp @@ -37,6 +37,8 @@ extern "C" { #endif +static_assert(sizeof(godot_vector2) == sizeof(Vector2), "Vector2 size mismatch"); + void GDAPI godot_vector2_new(godot_vector2 *r_dest, const godot_real p_x, const godot_real p_y) { Vector2 *dest = (Vector2 *)r_dest; *dest = Vector2(p_x, p_y); diff --git a/modules/gdnative/gdnative/vector3.cpp b/modules/gdnative/gdnative/vector3.cpp index 3e272ae9df..16fbdf353a 100644 --- a/modules/gdnative/gdnative/vector3.cpp +++ b/modules/gdnative/gdnative/vector3.cpp @@ -37,6 +37,8 @@ extern "C" { #endif +static_assert(sizeof(godot_vector3) == sizeof(Vector3), "Vector3 size mismatch"); + void GDAPI godot_vector3_new(godot_vector3 *r_dest, const godot_real p_x, const godot_real p_y, const godot_real p_z) { Vector3 *dest = (Vector3 *)r_dest; *dest = Vector3(p_x, p_y, p_z); diff --git a/modules/gdnative/include/gdnative/pool_arrays.h b/modules/gdnative/include/gdnative/pool_arrays.h index c610377f54..652bd6ae1c 100644 --- a/modules/gdnative/include/gdnative/pool_arrays.h +++ b/modules/gdnative/include/gdnative/pool_arrays.h @@ -39,7 +39,7 @@ extern "C" { /////// PackedByteArray -#define GODOT_PACKED_BYTE_ARRAY_SIZE sizeof(void *) +#define GODOT_PACKED_BYTE_ARRAY_SIZE (2 * sizeof(void *)) #ifndef GODOT_CORE_API_GODOT_PACKED_BYTE_ARRAY_TYPE_DEFINED #define GODOT_CORE_API_GODOT_PACKED_BYTE_ARRAY_TYPE_DEFINED @@ -50,7 +50,7 @@ typedef struct { /////// PackedInt32Array -#define GODOT_PACKED_INT_ARRAY_SIZE sizeof(void *) +#define GODOT_PACKED_INT_ARRAY_SIZE (2 * sizeof(void *)) #ifndef GODOT_CORE_API_GODOT_PACKED_INT_ARRAY_TYPE_DEFINED #define GODOT_CORE_API_GODOT_PACKED_INT_ARRAY_TYPE_DEFINED @@ -61,7 +61,7 @@ typedef struct { /////// PackedFloat32Array -#define GODOT_PACKED_REAL_ARRAY_SIZE sizeof(void *) +#define GODOT_PACKED_REAL_ARRAY_SIZE (2 * sizeof(void *)) #ifndef GODOT_CORE_API_GODOT_PACKED_REAL_ARRAY_TYPE_DEFINED #define GODOT_CORE_API_GODOT_PACKED_REAL_ARRAY_TYPE_DEFINED @@ -72,7 +72,7 @@ typedef struct { /////// PackedStringArray -#define GODOT_PACKED_STRING_ARRAY_SIZE sizeof(void *) +#define GODOT_PACKED_STRING_ARRAY_SIZE (2 * sizeof(void *)) #ifndef GODOT_CORE_API_GODOT_PACKED_STRING_ARRAY_TYPE_DEFINED #define GODOT_CORE_API_GODOT_PACKED_STRING_ARRAY_TYPE_DEFINED @@ -83,7 +83,7 @@ typedef struct { /////// PackedVector2Array -#define GODOT_PACKED_VECTOR2_ARRAY_SIZE sizeof(void *) +#define GODOT_PACKED_VECTOR2_ARRAY_SIZE (2 * sizeof(void *)) #ifndef GODOT_CORE_API_GODOT_PACKED_VECTOR2_ARRAY_TYPE_DEFINED #define GODOT_CORE_API_GODOT_PACKED_VECTOR2_ARRAY_TYPE_DEFINED @@ -94,7 +94,7 @@ typedef struct { /////// PackedVector3Array -#define GODOT_PACKED_VECTOR3_ARRAY_SIZE sizeof(void *) +#define GODOT_PACKED_VECTOR3_ARRAY_SIZE (2 * sizeof(void *)) #ifndef GODOT_CORE_API_GODOT_PACKED_VECTOR3_ARRAY_TYPE_DEFINED #define GODOT_CORE_API_GODOT_PACKED_VECTOR3_ARRAY_TYPE_DEFINED @@ -105,7 +105,7 @@ typedef struct { /////// PackedColorArray -#define GODOT_PACKED_COLOR_ARRAY_SIZE sizeof(void *) +#define GODOT_PACKED_COLOR_ARRAY_SIZE (2 * sizeof(void *)) #ifndef GODOT_CORE_API_GODOT_PACKED_COLOR_ARRAY_TYPE_DEFINED #define GODOT_CORE_API_GODOT_PACKED_COLOR_ARRAY_TYPE_DEFINED diff --git a/modules/gdnative/include/gdnative/rid.h b/modules/gdnative/include/gdnative/rid.h index 04661cedc8..73b601dc04 100644 --- a/modules/gdnative/include/gdnative/rid.h +++ b/modules/gdnative/include/gdnative/rid.h @@ -37,7 +37,7 @@ extern "C" { #include <stdint.h> -#define GODOT_RID_SIZE sizeof(void *) +#define GODOT_RID_SIZE sizeof(uint64_t) #ifndef GODOT_CORE_API_GODOT_RID_TYPE_DEFINED #define GODOT_CORE_API_GODOT_RID_TYPE_DEFINED diff --git a/modules/gdnative/include/gdnative/variant.h b/modules/gdnative/include/gdnative/variant.h index 934e856fbf..682c3e3ba8 100644 --- a/modules/gdnative/include/gdnative/variant.h +++ b/modules/gdnative/include/gdnative/variant.h @@ -37,7 +37,7 @@ extern "C" { #include <stdint.h> -#define GODOT_VARIANT_SIZE (16 + sizeof(void *)) +#define GODOT_VARIANT_SIZE (16 + sizeof(int64_t)) #ifndef GODOT_CORE_API_GODOT_VARIANT_TYPE_DEFINED #define GODOT_CORE_API_GODOT_VARIANT_TYPE_DEFINED diff --git a/platform/windows/display_server_windows.cpp b/platform/windows/display_server_windows.cpp index 114b64855e..14116d6f23 100644 --- a/platform/windows/display_server_windows.cpp +++ b/platform/windows/display_server_windows.cpp @@ -1695,6 +1695,12 @@ void DisplayServerWindows::_dispatch_input_events(const Ref<InputEvent> &p_event } void DisplayServerWindows::_dispatch_input_event(const Ref<InputEvent> &p_event) { + _THREAD_SAFE_METHOD_ + if (in_dispatch_input_event) { + return; + } + + in_dispatch_input_event = true; Variant ev = p_event; Variant *evp = &ev; Variant ret; @@ -1706,6 +1712,7 @@ void DisplayServerWindows::_dispatch_input_event(const Ref<InputEvent> &p_event) ERR_FAIL_COND(!windows.has(event_from_window->get_window_id())); Callable callable = windows[event_from_window->get_window_id()].input_event_callback; if (callable.is_null()) { + in_dispatch_input_event = false; return; } callable.call((const Variant **)&evp, 1, ret, ce); @@ -1719,6 +1726,8 @@ void DisplayServerWindows::_dispatch_input_event(const Ref<InputEvent> &p_event) callable.call((const Variant **)&evp, 1, ret, ce); } } + + in_dispatch_input_event = false; } LRESULT DisplayServerWindows::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) { diff --git a/platform/windows/display_server_windows.h b/platform/windows/display_server_windows.h index ea08b1899f..f8606bb492 100644 --- a/platform/windows/display_server_windows.h +++ b/platform/windows/display_server_windows.h @@ -388,6 +388,7 @@ class DisplayServerWindows : public DisplayServer { uint32_t last_button_state = 0; bool use_raw_input = false; bool drop_events = false; + bool in_dispatch_input_event = false; bool console_visible = false; WNDCLASSEXW wc; diff --git a/scene/resources/default_theme/default_theme.cpp b/scene/resources/default_theme/default_theme.cpp index 67617a946f..f5b987e8df 100644 --- a/scene/resources/default_theme/default_theme.cpp +++ b/scene/resources/default_theme/default_theme.cpp @@ -52,20 +52,9 @@ static Ref<StyleBoxTexture> make_stylebox(T p_src, float p_left, float p_top, fl } else { texture = Ref<ImageTexture>(memnew(ImageTexture)); Ref<Image> img = memnew(Image(p_src)); - - if (scale > 1) { - Size2 orig_size = Size2(img->get_width(), img->get_height()); - - img->convert(Image::FORMAT_RGBA8); - img->expand_x2_hq2x(); - if (scale != 2.0) { - img->resize(orig_size.x * scale, orig_size.y * scale); - } - } else if (scale < 1) { - Size2 orig_size = Size2(img->get_width(), img->get_height()); - img->convert(Image::FORMAT_RGBA8); - img->resize(orig_size.x * scale, orig_size.y * scale); - } + const Size2 orig_size = Size2(img->get_width(), img->get_height()); + img->convert(Image::FORMAT_RGBA8); + img->resize(orig_size.x * scale, orig_size.y * scale); texture->create_from_image(img); (*tex_cache)[p_src] = texture; @@ -98,19 +87,9 @@ template <class T> static Ref<Texture2D> make_icon(T p_src) { Ref<ImageTexture> texture(memnew(ImageTexture)); Ref<Image> img = memnew(Image(p_src)); - if (scale > 1) { - Size2 orig_size = Size2(img->get_width(), img->get_height()); - - img->convert(Image::FORMAT_RGBA8); - img->expand_x2_hq2x(); - if (scale != 2.0) { - img->resize(orig_size.x * scale, orig_size.y * scale); - } - } else if (scale < 1) { - Size2 orig_size = Size2(img->get_width(), img->get_height()); - img->convert(Image::FORMAT_RGBA8); - img->resize(orig_size.x * scale, orig_size.y * scale); - } + const Size2 orig_size = Size2(img->get_width(), img->get_height()); + img->convert(Image::FORMAT_RGBA8); + img->resize(orig_size.x * scale, orig_size.y * scale); texture->create_from_image(img); return texture; diff --git a/thirdparty/misc/hq2x.cpp b/thirdparty/misc/hq2x.cpp deleted file mode 100644 index 9c089ba85c..0000000000 --- a/thirdparty/misc/hq2x.cpp +++ /dev/null @@ -1,2636 +0,0 @@ -/* - * Copyright 2016 Bruno Ribeiro - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - - -#include "hq2x.h" - -#include "core/math/math_funcs.h" - -static const uint32_t AMASK = 0xFF000000; -static const uint32_t YMASK = 0x00FF0000; -static const uint32_t UMASK = 0x0000FF00; -static const uint32_t VMASK = 0x000000FF; - -_FORCE_INLINE_ static uint32_t ARGBtoAYUV( - uint32_t value ) -{ - uint32_t A, R, G, B, Y, U, V; -//todo big endian check - A = value >> 24; - R = (value >> 16) & 0xFF; - G = (value >> 8) & 0xFF; - B = value & 0xFF; - - Y = Math::fast_ftoi( 0.299 * R + 0.587 * G + 0.114 * B); - U = Math::fast_ftoi(-0.169 * R - 0.331 * G + 0.5 * B) + 128; - V = Math::fast_ftoi( 0.5 * R - 0.419 * G - 0.081 * B) + 128; - return (A << 24) + (Y << 16) + (U << 8) + V; -} - - -/* - * Use this function for sharper images (good for cartoon style, used by DOSBOX) - */ - -_FORCE_INLINE_ static bool isDifferent( - uint32_t color1, - uint32_t color2, - uint32_t trY, - uint32_t trU, - uint32_t trV, - uint32_t trA ) -{ - color1 = ARGBtoAYUV(color1); - color2 = ARGBtoAYUV(color2); - - uint32_t value; - - value = ((color1 & YMASK) - (color2 & YMASK)); - value = (value ^ (value >> 31)) - (value >> 31); - if (value > trY) return true; - - value = ((color1 & UMASK) - (color2 & UMASK)); - value = (value ^ (value >> 31)) - (value >> 31); - if (value > trU) return true; - - value = ((color1 & VMASK) - (color2 & VMASK)); - value = (value ^ (value >> 31)) - (value >> 31); - if (value > trV) return true; - - value = ((color1 & AMASK) - (color2 & AMASK)); - value = (value ^ (value >> 31)) - (value >> 31); - if (value > trA) return true; - - return false; - -} - - - -#define MASK_RB 0x00FF00FF -#define MASK_G 0x0000FF00 -#define MASK_A 0xFF000000 - - -/** - * @brief Mixes two colors using the given weights. - */ -#define HQX_MIX_2(C0,C1,W0,W1) \ - ((((C0 & MASK_RB) * W0 + (C1 & MASK_RB) * W1) / (W0 + W1)) & MASK_RB) | \ - ((((C0 & MASK_G) * W0 + (C1 & MASK_G) * W1) / (W0 + W1)) & MASK_G) | \ - ((((((C0 & MASK_A) >> 8) * W0 + ((C1 & MASK_A) >> 8) * W1) / (W0 + W1)) << 8) & MASK_A) - -/** - * @brief Mixes three colors using the given weights. - */ -#define HQX_MIX_3(C0,C1,C2,W0,W1,W2) \ - ((((C0 & MASK_RB) * W0 + (C1 & MASK_RB) * W1 + (C2 & MASK_RB) * W2) / (W0 + W1 + W2)) & MASK_RB) | \ - ((((C0 & MASK_G) * W0 + (C1 & MASK_G) * W1 + (C2 & MASK_G) * W2) / (W0 + W1 + W2)) & MASK_G) | \ - ((((((C0 & MASK_A) >> 8) * W0 + ((C1 & MASK_A) >> 8) * W1 + ((C2 & MASK_A) >> 8) * W2) / (W0 + W1 + W2)) << 8) & MASK_A) - - -#define MIX_00_4 *output = w[4]; -#define MIX_00_MIX_00_4_0_3_1 *output = HQX_MIX_2(w[4],w[0],3U,1U); -#define MIX_00_4_3_3_1 *output = HQX_MIX_2(w[4],w[3],3U,1U); -#define MIX_00_4_1_3_1 *output = HQX_MIX_2(w[4],w[1],3U,1U); -#define MIX_00_3_1_1_1 *output = HQX_MIX_2(w[3],w[1],1U,1U); -#define MIX_00_4_3_1_2_1_1 *output = HQX_MIX_3(w[4],w[3],w[1],2U,1U,1U); -#define MIX_00_4_3_1_2_7_7 *output = HQX_MIX_3(w[4],w[3],w[1],2U,7U,7U); -#define MIX_00_4_0_1_2_1_1 *output = HQX_MIX_3(w[4],w[0],w[1],2U,1U,1U); -#define MIX_00_4_0_3_2_1_1 *output = HQX_MIX_3(w[4],w[0],w[3],2U,1U,1U); -#define MIX_00_4_1_3_5_2_1 *output = HQX_MIX_3(w[4],w[1],w[3],5U,2U,1U); -#define MIX_00_4_3_1_5_2_1 *output = HQX_MIX_3(w[4],w[3],w[1],5U,2U,1U); -#define MIX_00_4_3_1_6_1_1 *output = HQX_MIX_3(w[4],w[3],w[1],6U,1U,1U); -#define MIX_00_4_3_1_2_3_3 *output = HQX_MIX_3(w[4],w[3],w[1],2U,3U,3U); -#define MIX_00_MIX_00_4_0_3_10 *output = HQX_MIX_3(w[4],w[3],w[1],14U,1U,1U); - -#define MIX_01_4 *(output + 1) = w[4]; -#define MIX_01_4_2_3_1 *(output + 1) = HQX_MIX_2(w[4],w[2],3U,1U); -#define MIX_01_4_1_3_1 *(output + 1) = HQX_MIX_2(w[4],w[1],3U,1U); -#define MIX_01_1_4_3_1 *(output + 1) = HQX_MIX_2(w[1],w[4],3U,1U); -#define MIX_01_4_5_3_1 *(output + 1) = HQX_MIX_2(w[4],w[5],3U,1U); -#define MIX_01_4_1_7_1 *(output + 1) = HQX_MIX_2(w[4],w[1],7U,1U); -#define MIX_01_4_1_5_2_1_1 *(output + 1) = HQX_MIX_3(w[4],w[1],w[5],2U,1U,1U); -#define MIX_01_4_2_5_2_1_1 *(output + 1) = HQX_MIX_3(w[4],w[2],w[5],2U,1U,1U); -#define MIX_01_4_2_1_2_1_1 *(output + 1) = HQX_MIX_3(w[4],w[2],w[1],2U,1U,1U); -#define MIX_01_4_5_1_5_2_1 *(output + 1) = HQX_MIX_3(w[4],w[5],w[1],5U,2U,1U); -#define MIX_01_4_1_5_5_2_1 *(output + 1) = HQX_MIX_3(w[4],w[1],w[5],5U,2U,1U); -#define MIX_01_4_1_5_6_1_1 *(output + 1) = HQX_MIX_3(w[4],w[1],w[5],6U,1U,1U); -#define MIX_01_4_1_5_2_3_3 *(output + 1) = HQX_MIX_3(w[4],w[1],w[5],2U,3U,3U); -#define MIX_01_4_2_3_10 *(output + 1) = HQX_MIX_3(w[4],w[1],w[5],14U,1U,1U); - -#define MIX_02_4 *(output + 2) = w[4]; -#define MIX_02_4_2_3_1 *(output + 2) = HQX_MIX_2(w[4],w[2],3U,1U); -#define MIX_02_4_1_3_1 *(output + 2) = HQX_MIX_2(w[4],w[1],3U,1U); -#define MIX_02_4_5_3_1 *(output + 2) = HQX_MIX_2(w[4],w[5],3U,1U); -#define MIX_02_4_1_5_2_1_1 *(output + 2) = HQX_MIX_3(w[4],w[1],w[5],2U,1U,1U); -#define MIX_02_4_1_5_2_7_7 *(output + 2) = HQX_MIX_3(w[4],w[1],w[5],2U,7U,7U); -#define MIX_02_1_5_1_1 *(output + 2) = HQX_MIX_2(w[1],w[5],1U,1U); - -#define MIX_10_4 *(output + lineSize) = w[4]; -#define MIX_10_4_6_3_1 *(output + lineSize) = HQX_MIX_2(w[4],w[6],3U,1U); -#define MIX_10_4_7_3_1 *(output + lineSize) = HQX_MIX_2(w[4],w[7],3U,1U); -#define MIX_10_4_3_3_1 *(output + lineSize) = HQX_MIX_2(w[4],w[3],3U,1U); -#define MIX_10_4_7_3_2_1_1 *(output + lineSize) = HQX_MIX_3(w[4],w[7],w[3],2U,1U,1U); -#define MIX_10_4_6_3_2_1_1 *(output + lineSize) = HQX_MIX_3(w[4],w[6],w[3],2U,1U,1U); -#define MIX_10_4_6_7_2_1_1 *(output + lineSize) = HQX_MIX_3(w[4],w[6],w[7],2U,1U,1U); -#define MIX_10_4_3_7_5_2_1 *(output + lineSize) = HQX_MIX_3(w[4],w[3],w[7],5U,2U,1U); -#define MIX_10_4_7_3_5_2_1 *(output + lineSize) = HQX_MIX_3(w[4],w[7],w[3],5U,2U,1U); -#define MIX_10_4_7_3_6_1_1 *(output + lineSize) = HQX_MIX_3(w[4],w[7],w[3],6U,1U,1U); -#define MIX_10_4_7_3_2_3_3 *(output + lineSize) = HQX_MIX_3(w[4],w[7],w[3],2U,3U,3U); -#define MIX_10_4_6_3_10 *(output + lineSize) = HQX_MIX_3(w[4],w[7],w[3],14U,1U,1U); -#define MIX_10_4_3_7_1 *(output + lineSize) = HQX_MIX_2(w[4],w[3],7U,1U); -#define MIX_10_3_4_3_1 *(output + lineSize) = HQX_MIX_2(w[3],w[4],3U,1U); - -#define MIX_11_4 *(output + lineSize + 1) = w[4]; -#define MIX_11_4_8_3_1 *(output + lineSize + 1) = HQX_MIX_2(w[4],w[8],3U,1U); -#define MIX_11_4_5_3_1 *(output + lineSize + 1) = HQX_MIX_2(w[4],w[5],3U,1U); -#define MIX_11_4_7_3_1 *(output + lineSize + 1) = HQX_MIX_2(w[4],w[7],3U,1U); -#define MIX_11_4_5_7_2_1_1 *(output + lineSize + 1) = HQX_MIX_3(w[4],w[5],w[7],2U,1U,1U); -#define MIX_11_4_8_7_2_1_1 *(output + lineSize + 1) = HQX_MIX_3(w[4],w[8],w[7],2U,1U,1U); -#define MIX_11_4_8_5_2_1_1 *(output + lineSize + 1) = HQX_MIX_3(w[4],w[8],w[5],2U,1U,1U); -#define MIX_11_4_7_5_5_2_1 *(output + lineSize + 1) = HQX_MIX_3(w[4],w[7],w[5],5U,2U,1U); -#define MIX_11_4_5_7_5_2_1 *(output + lineSize + 1) = HQX_MIX_3(w[4],w[5],w[7],5U,2U,1U); -#define MIX_11_4_5_7_6_1_1 *(output + lineSize + 1) = HQX_MIX_3(w[4],w[5],w[7],6U,1U,1U); -#define MIX_11_4_5_7_2_3_3 *(output + lineSize + 1) = HQX_MIX_3(w[4],w[5],w[7],2U,3U,3U); -#define MIX_11_4_8_3_10 *(output + lineSize + 1) = HQX_MIX_3(w[4],w[5],w[7],14U,1U,1U); - -#define MIX_12_4 *(output + lineSize + 2) = w[4]; -#define MIX_12_4_5_3_1 *(output + lineSize + 2) = HQX_MIX_2(w[4],w[5],3U,1U); -#define MIX_12_4_5_7_1 *(output + lineSize + 2) = HQX_MIX_2(w[4],w[5],7U,1U); -#define MIX_12_5_4_3_1 *(output + lineSize + 2) = HQX_MIX_2(w[5],w[4],3U,1U); - -#define MIX_20_4 *(output + lineSize + lineSize) = w[4]; -#define MIX_20_4_6_3_1 *(output + lineSize + lineSize) = HQX_MIX_2(w[4],w[6],3U,1U); -#define MIX_20_4_7_3_1 *(output + lineSize + lineSize) = HQX_MIX_2(w[4],w[7],3U,1U); -#define MIX_20_4_3_3_1 *(output + lineSize + lineSize) = HQX_MIX_2(w[4],w[3],3U,1U); -#define MIX_20_4_7_3_2_1_1 *(output + lineSize + lineSize) = HQX_MIX_3(w[4],w[7],w[3],2U,1U,1U); -#define MIX_20_4_7_3_2_7_7 *(output + lineSize + lineSize) = HQX_MIX_3(w[4],w[7],w[3],2U,7U,7U); -#define MIX_20_7_3_1_1 *(output + lineSize + lineSize) = HQX_MIX_2(w[7],w[3],1U,1U); - -#define MIX_21_4 *(output + lineSize + lineSize + 1) = w[4]; -#define MIX_21_4_7_3_1 *(output + lineSize + lineSize + 1) = HQX_MIX_2(w[4],w[7],3U,1U); -#define MIX_21_4_7_7_1 *(output + lineSize + lineSize + 1) = HQX_MIX_2(w[4],w[7],7U,1U); -#define MIX_21_7_4_3_1 *(output + lineSize + lineSize + 1) = HQX_MIX_2(w[7],w[4],3U,1U); - -#define MIX_22_4 *(output + lineSize + lineSize + 2) = w[4]; -#define MIX_22_4_8_3_1 *(output + lineSize + lineSize + 2) = HQX_MIX_2(w[4],w[8],3U,1U); -#define MIX_22_4_7_3_1 *(output + lineSize + lineSize + 2) = HQX_MIX_2(w[4],w[7],3U,1U); -#define MIX_22_4_5_3_1 *(output + lineSize + lineSize + 2) = HQX_MIX_2(w[4],w[5],3U,1U); -#define MIX_22_4_5_7_2_1_1 *(output + lineSize + lineSize + 2) = HQX_MIX_3(w[4],w[5],w[7],2U,1U,1U); -#define MIX_22_4_5_7_2_7_7 *(output + lineSize + lineSize + 2) = HQX_MIX_3(w[4],w[5],w[7],2U,7U,7U); -#define MIX_22_5_7_1_1 *(output + lineSize + lineSize + 2) = HQX_MIX_2(w[5],w[7],1U,1U); - - - -uint32_t *hq2x_resize( - const uint32_t *image, - uint32_t width, - uint32_t height, - uint32_t *output, - uint32_t trY, - uint32_t trU, - uint32_t trV, - uint32_t trA, - bool wrapX, - bool wrapY ) -{ - int lineSize = width * 2; - - int previous, next; - uint32_t w[9]; - - trY <<= 16; - trU <<= 8; - trA <<= 24; - - // iterates between the lines - for (uint32_t row = 0; row < height; row++) - { - /* - * Note: this function uses a 3x3 sliding window over the original image. - * - * +----+----+----+ - * | | | | - * | w0 | w1 | w2 | - * +----+----+----+ - * | | | | - * | w3 | w4 | w5 | - * +----+----+----+ - * | | | | - * | w6 | w7 | w8 | - * +----+----+----+ - */ - - // adjusts the previous and next line pointers - if (row > 0) - previous = -width; - else - { - if (wrapY) - previous = width * (height - 1); - else - previous = 0; - } - if (row < height - 1) - next = width; - else - { - if (wrapY) - next = -(width * (height - 1)); - else - next = 0; - } - - // iterates between the columns - for (uint32_t col = 0; col < width; col++) - { - w[1] = *(image + previous); - w[4] = *image; - w[7] = *(image + next); - - if (col > 0) - { - w[0] = *(image + previous - 1); - w[3] = *(image - 1); - w[6] = *(image + next - 1); - } - else - { - if (wrapX) - { - w[0] = *(image + previous + width - 1); - w[3] = *(image + width - 1); - w[6] = *(image + next + width - 1); - } - else - { - w[0] = w[1]; - w[3] = w[4]; - w[6] = w[7]; - } - } - - if (col < width - 1) - { - w[2] = *(image + previous + 1); - w[5] = *(image + 1); - w[8] = *(image + next + 1); - } - else - { - if (wrapX) - { - w[2] = *(image + previous - width + 1); - w[5] = *(image - width + 1); - w[8] = *(image + next - width + 1); - } - else - { - w[2] = w[1]; - w[5] = w[4]; - w[8] = w[7]; - } - } - - int pattern = 0; - - // computes the pattern to be used considering the neighbor pixels - for (int k = 0, flag = 1; k < 9; k++) - { - // ignores the central pixel - if (k == 4) continue; - - if (w[k] != w[4]) - if (isDifferent(w[4], w[k], trY, trU, trV, trA)) pattern |= flag; - flag <<= 1; - } - - switch (pattern) - { - case 0: - case 1: - case 4: - case 32: - case 128: - case 5: - case 132: - case 160: - case 33: - case 129: - case 36: - case 133: - case 164: - case 161: - case 37: - case 165: - MIX_00_4_3_1_2_1_1 - MIX_01_4_1_5_2_1_1 - MIX_10_4_7_3_2_1_1 - MIX_11_4_5_7_2_1_1 - break; - case 2: - case 34: - case 130: - case 162: - MIX_00_4_0_3_2_1_1 - MIX_01_4_2_5_2_1_1 - MIX_10_4_7_3_2_1_1 - MIX_11_4_5_7_2_1_1 - break; - case 16: - case 17: - case 48: - case 49: - MIX_00_4_3_1_2_1_1 - MIX_01_4_2_1_2_1_1 - MIX_10_4_7_3_2_1_1 - MIX_11_4_8_7_2_1_1 - break; - case 64: - case 65: - case 68: - case 69: - MIX_00_4_3_1_2_1_1 - MIX_01_4_1_5_2_1_1 - MIX_10_4_6_3_2_1_1 - MIX_11_4_8_5_2_1_1 - break; - case 8: - case 12: - case 136: - case 140: - MIX_00_4_0_1_2_1_1 - MIX_01_4_1_5_2_1_1 - MIX_10_4_6_7_2_1_1 - MIX_11_4_5_7_2_1_1 - break; - case 3: - case 35: - case 131: - case 163: - MIX_00_4_3_3_1 - MIX_01_4_2_5_2_1_1 - MIX_10_4_7_3_2_1_1 - MIX_11_4_5_7_2_1_1 - break; - case 6: - case 38: - case 134: - case 166: - MIX_00_4_0_3_2_1_1 - MIX_01_4_5_3_1 - MIX_10_4_7_3_2_1_1 - MIX_11_4_5_7_2_1_1 - break; - case 20: - case 21: - case 52: - case 53: - MIX_00_4_3_1_2_1_1 - MIX_01_4_1_3_1 - MIX_10_4_7_3_2_1_1 - MIX_11_4_8_7_2_1_1 - break; - case 144: - case 145: - case 176: - case 177: - MIX_00_4_3_1_2_1_1 - MIX_01_4_2_1_2_1_1 - MIX_10_4_7_3_2_1_1 - MIX_11_4_7_3_1 - break; - case 192: - case 193: - case 196: - case 197: - MIX_00_4_3_1_2_1_1 - MIX_01_4_1_5_2_1_1 - MIX_10_4_6_3_2_1_1 - MIX_11_4_5_3_1 - break; - case 96: - case 97: - case 100: - case 101: - MIX_00_4_3_1_2_1_1 - MIX_01_4_1_5_2_1_1 - MIX_10_4_3_3_1 - MIX_11_4_8_5_2_1_1 - break; - case 40: - case 44: - case 168: - case 172: - MIX_00_4_0_1_2_1_1 - MIX_01_4_1_5_2_1_1 - MIX_10_4_7_3_1 - MIX_11_4_5_7_2_1_1 - break; - case 9: - case 13: - case 137: - case 141: - MIX_00_4_1_3_1 - MIX_01_4_1_5_2_1_1 - MIX_10_4_6_7_2_1_1 - MIX_11_4_5_7_2_1_1 - break; - case 18: - case 50: - MIX_00_4_0_3_2_1_1 - if (isDifferent(w[1], w[5], trY, trU, trV, trA)) - { - MIX_01_4_2_3_1 - } - else - { - MIX_01_4_1_5_2_1_1 - } - MIX_10_4_7_3_2_1_1 - MIX_11_4_8_7_2_1_1 - break; - case 80: - case 81: - MIX_00_4_3_1_2_1_1 - MIX_01_4_2_1_2_1_1 - MIX_10_4_6_3_2_1_1 - if (isDifferent(w[5], w[7], trY, trU, trV, trA)) - { - MIX_11_4_8_3_1 - } - else - { - MIX_11_4_5_7_2_1_1 - } - break; - case 72: - case 76: - MIX_00_4_0_1_2_1_1 - MIX_01_4_1_5_2_1_1 - if (isDifferent(w[7], w[3], trY, trU, trV, trA)) - { - MIX_10_4_6_3_1 - } - else - { - MIX_10_4_7_3_2_1_1 - } - MIX_11_4_8_5_2_1_1 - break; - case 10: - case 138: - if (isDifferent(w[3], w[1], trY, trU, trV, trA)) - { - MIX_00_MIX_00_4_0_3_1 - } - else - { - MIX_00_4_3_1_2_1_1 - } - MIX_01_4_2_5_2_1_1 - MIX_10_4_6_7_2_1_1 - MIX_11_4_5_7_2_1_1 - break; - case 66: - MIX_00_4_0_3_2_1_1 - MIX_01_4_2_5_2_1_1 - MIX_10_4_6_3_2_1_1 - MIX_11_4_8_5_2_1_1 - break; - case 24: - MIX_00_4_0_1_2_1_1 - MIX_01_4_2_1_2_1_1 - MIX_10_4_6_7_2_1_1 - MIX_11_4_8_7_2_1_1 - break; - case 7: - case 39: - case 135: - MIX_00_4_3_3_1 - MIX_01_4_5_3_1 - MIX_10_4_7_3_2_1_1 - MIX_11_4_5_7_2_1_1 - break; - case 148: - case 149: - case 180: - MIX_00_4_3_1_2_1_1 - MIX_01_4_1_3_1 - MIX_10_4_7_3_2_1_1 - MIX_11_4_7_3_1 - break; - case 224: - case 228: - case 225: - MIX_00_4_3_1_2_1_1 - MIX_01_4_1_5_2_1_1 - MIX_10_4_3_3_1 - MIX_11_4_5_3_1 - break; - case 41: - case 169: - case 45: - MIX_00_4_1_3_1 - MIX_01_4_1_5_2_1_1 - MIX_10_4_7_3_1 - MIX_11_4_5_7_2_1_1 - break; - case 22: - case 54: - MIX_00_4_0_3_2_1_1 - if (isDifferent(w[1], w[5], trY, trU, trV, trA)) - { - MIX_01_4 - } - else - { - MIX_01_4_1_5_2_1_1 - } - MIX_10_4_7_3_2_1_1 - MIX_11_4_8_7_2_1_1 - break; - case 208: - case 209: - MIX_00_4_3_1_2_1_1 - MIX_01_4_2_1_2_1_1 - MIX_10_4_6_3_2_1_1 - if (isDifferent(w[5], w[7], trY, trU, trV, trA)) - { - MIX_11_4 - } - else - { - MIX_11_4_5_7_2_1_1 - } - break; - case 104: - case 108: - MIX_00_4_0_1_2_1_1 - MIX_01_4_1_5_2_1_1 - if (isDifferent(w[7], w[3], trY, trU, trV, trA)) - { - MIX_10_4 - } - else - { - MIX_10_4_7_3_2_1_1 - } - MIX_11_4_8_5_2_1_1 - break; - case 11: - case 139: - if (isDifferent(w[3], w[1], trY, trU, trV, trA)) - { - MIX_00_4 - } - else - { - MIX_00_4_3_1_2_1_1 - } - MIX_01_4_2_5_2_1_1 - MIX_10_4_6_7_2_1_1 - MIX_11_4_5_7_2_1_1 - break; - case 19: - case 51: - if (isDifferent(w[1], w[5], trY, trU, trV, trA)) - { - MIX_00_4_3_3_1 - MIX_01_4_2_3_1 - } - else - { - MIX_00_4_1_3_5_2_1 - MIX_01_4_1_5_2_3_3 - } - MIX_10_4_7_3_2_1_1 - MIX_11_4_8_7_2_1_1 - break; - case 146: - case 178: - MIX_00_4_0_3_2_1_1 - if (isDifferent(w[1], w[5], trY, trU, trV, trA)) - { - MIX_01_4_2_3_1 - MIX_11_4_7_3_1 - } - else - { - MIX_01_4_1_5_2_3_3 - MIX_11_4_5_7_5_2_1 - } - MIX_10_4_7_3_2_1_1 - break; - case 84: - case 85: - MIX_00_4_3_1_2_1_1 - if (isDifferent(w[5], w[7], trY, trU, trV, trA)) - { - MIX_01_4_1_3_1 - MIX_11_4_8_3_1 - } - else - { - MIX_01_4_5_1_5_2_1 - MIX_11_4_5_7_2_3_3 - } - MIX_10_4_6_3_2_1_1 - break; - case 112: - case 113: - MIX_00_4_3_1_2_1_1 - MIX_01_4_2_1_2_1_1 - if (isDifferent(w[5], w[7], trY, trU, trV, trA)) - { - MIX_10_4_3_3_1 - MIX_11_4_8_3_1 - } - else - { - MIX_10_4_7_3_5_2_1 - MIX_11_4_5_7_2_3_3 - } - break; - case 200: - case 204: - MIX_00_4_0_1_2_1_1 - MIX_01_4_1_5_2_1_1 - if (isDifferent(w[7], w[3], trY, trU, trV, trA)) - { - MIX_10_4_6_3_1 - MIX_11_4_5_3_1 - } - else - { - MIX_10_4_7_3_2_3_3 - MIX_11_4_7_5_5_2_1 - } - break; - case 73: - case 77: - if (isDifferent(w[7], w[3], trY, trU, trV, trA)) - { - MIX_00_4_1_3_1 - MIX_10_4_6_3_1 - } - else - { - MIX_00_4_3_1_5_2_1 - MIX_10_4_7_3_2_3_3 - } - MIX_01_4_1_5_2_1_1 - MIX_11_4_8_5_2_1_1 - break; - case 42: - case 170: - if (isDifferent(w[3], w[1], trY, trU, trV, trA)) - { - MIX_00_MIX_00_4_0_3_1 - MIX_10_4_7_3_1 - } - else - { - MIX_00_4_3_1_2_3_3 - MIX_10_4_3_7_5_2_1 - } - MIX_01_4_2_5_2_1_1 - MIX_11_4_5_7_2_1_1 - break; - case 14: - case 142: - if (isDifferent(w[3], w[1], trY, trU, trV, trA)) - { - MIX_00_MIX_00_4_0_3_1 - MIX_01_4_5_3_1 - } - else - { - MIX_00_4_3_1_2_3_3 - MIX_01_4_1_5_5_2_1 - } - MIX_10_4_6_7_2_1_1 - MIX_11_4_5_7_2_1_1 - break; - case 67: - MIX_00_4_3_3_1 - MIX_01_4_2_5_2_1_1 - MIX_10_4_6_3_2_1_1 - MIX_11_4_8_5_2_1_1 - break; - case 70: - MIX_00_4_0_3_2_1_1 - MIX_01_4_5_3_1 - MIX_10_4_6_3_2_1_1 - MIX_11_4_8_5_2_1_1 - break; - case 28: - MIX_00_4_0_1_2_1_1 - MIX_01_4_1_3_1 - MIX_10_4_6_7_2_1_1 - MIX_11_4_8_7_2_1_1 - break; - case 152: - MIX_00_4_0_1_2_1_1 - MIX_01_4_2_1_2_1_1 - MIX_10_4_6_7_2_1_1 - MIX_11_4_7_3_1 - break; - case 194: - MIX_00_4_0_3_2_1_1 - MIX_01_4_2_5_2_1_1 - MIX_10_4_6_3_2_1_1 - MIX_11_4_5_3_1 - break; - case 98: - MIX_00_4_0_3_2_1_1 - MIX_01_4_2_5_2_1_1 - MIX_10_4_3_3_1 - MIX_11_4_8_5_2_1_1 - break; - case 56: - MIX_00_4_0_1_2_1_1 - MIX_01_4_2_1_2_1_1 - MIX_10_4_7_3_1 - MIX_11_4_8_7_2_1_1 - break; - case 25: - MIX_00_4_1_3_1 - MIX_01_4_2_1_2_1_1 - MIX_10_4_6_7_2_1_1 - MIX_11_4_8_7_2_1_1 - break; - case 26: - case 31: - if (isDifferent(w[3], w[1], trY, trU, trV, trA)) - { - MIX_00_4 - } - else - { - MIX_00_4_3_1_2_1_1 - } - if (isDifferent(w[1], w[5], trY, trU, trV, trA)) - { - MIX_01_4 - } - else - { - MIX_01_4_1_5_2_1_1 - } - MIX_10_4_6_7_2_1_1 - MIX_11_4_8_7_2_1_1 - break; - case 82: - case 214: - MIX_00_4_0_3_2_1_1 - if (isDifferent(w[1], w[5], trY, trU, trV, trA)) - { - MIX_01_4 - } - else - { - MIX_01_4_1_5_2_1_1 - } - MIX_10_4_6_3_2_1_1 - if (isDifferent(w[5], w[7], trY, trU, trV, trA)) - { - MIX_11_4 - } - else - { - MIX_11_4_5_7_2_1_1 - } - break; - case 88: - case 248: - MIX_00_4_0_1_2_1_1 - MIX_01_4_2_1_2_1_1 - if (isDifferent(w[7], w[3], trY, trU, trV, trA)) - { - MIX_10_4 - } - else - { - MIX_10_4_7_3_2_1_1 - } - if (isDifferent(w[5], w[7], trY, trU, trV, trA)) - { - MIX_11_4 - } - else - { - MIX_11_4_5_7_2_1_1 - } - break; - case 74: - case 107: - if (isDifferent(w[3], w[1], trY, trU, trV, trA)) - { - MIX_00_4 - } - else - { - MIX_00_4_3_1_2_1_1 - } - MIX_01_4_2_5_2_1_1 - if (isDifferent(w[7], w[3], trY, trU, trV, trA)) - { - MIX_10_4 - } - else - { - MIX_10_4_7_3_2_1_1 - } - MIX_11_4_8_5_2_1_1 - break; - case 27: - if (isDifferent(w[3], w[1], trY, trU, trV, trA)) - { - MIX_00_4 - } - else - { - MIX_00_4_3_1_2_1_1 - } - MIX_01_4_2_3_1 - MIX_10_4_6_7_2_1_1 - MIX_11_4_8_7_2_1_1 - break; - case 86: - MIX_00_4_0_3_2_1_1 - if (isDifferent(w[1], w[5], trY, trU, trV, trA)) - { - MIX_01_4 - } - else - { - MIX_01_4_1_5_2_1_1 - } - MIX_10_4_6_3_2_1_1 - MIX_11_4_8_3_1 - break; - case 216: - MIX_00_4_0_1_2_1_1 - MIX_01_4_2_1_2_1_1 - MIX_10_4_6_3_1 - if (isDifferent(w[5], w[7], trY, trU, trV, trA)) - { - MIX_11_4 - } - else - { - MIX_11_4_5_7_2_1_1 - } - break; - case 106: - MIX_00_MIX_00_4_0_3_1 - MIX_01_4_2_5_2_1_1 - if (isDifferent(w[7], w[3], trY, trU, trV, trA)) - { - MIX_10_4 - } - else - { - MIX_10_4_7_3_2_1_1 - } - MIX_11_4_8_5_2_1_1 - break; - case 30: - MIX_00_MIX_00_4_0_3_1 - if (isDifferent(w[1], w[5], trY, trU, trV, trA)) - { - MIX_01_4 - } - else - { - MIX_01_4_1_5_2_1_1 - } - MIX_10_4_6_7_2_1_1 - MIX_11_4_8_7_2_1_1 - break; - case 210: - MIX_00_4_0_3_2_1_1 - MIX_01_4_2_3_1 - MIX_10_4_6_3_2_1_1 - if (isDifferent(w[5], w[7], trY, trU, trV, trA)) - { - MIX_11_4 - } - else - { - MIX_11_4_5_7_2_1_1 - } - break; - case 120: - MIX_00_4_0_1_2_1_1 - MIX_01_4_2_1_2_1_1 - if (isDifferent(w[7], w[3], trY, trU, trV, trA)) - { - MIX_10_4 - } - else - { - MIX_10_4_7_3_2_1_1 - } - MIX_11_4_8_3_1 - break; - case 75: - if (isDifferent(w[3], w[1], trY, trU, trV, trA)) - { - MIX_00_4 - } - else - { - MIX_00_4_3_1_2_1_1 - } - MIX_01_4_2_5_2_1_1 - MIX_10_4_6_3_1 - MIX_11_4_8_5_2_1_1 - break; - case 29: - MIX_00_4_1_3_1 - MIX_01_4_1_3_1 - MIX_10_4_6_7_2_1_1 - MIX_11_4_8_7_2_1_1 - break; - case 198: - MIX_00_4_0_3_2_1_1 - MIX_01_4_5_3_1 - MIX_10_4_6_3_2_1_1 - MIX_11_4_5_3_1 - break; - case 184: - MIX_00_4_0_1_2_1_1 - MIX_01_4_2_1_2_1_1 - MIX_10_4_7_3_1 - MIX_11_4_7_3_1 - break; - case 99: - MIX_00_4_3_3_1 - MIX_01_4_2_5_2_1_1 - MIX_10_4_3_3_1 - MIX_11_4_8_5_2_1_1 - break; - case 57: - MIX_00_4_1_3_1 - MIX_01_4_2_1_2_1_1 - MIX_10_4_7_3_1 - MIX_11_4_8_7_2_1_1 - break; - case 71: - MIX_00_4_3_3_1 - MIX_01_4_5_3_1 - MIX_10_4_6_3_2_1_1 - MIX_11_4_8_5_2_1_1 - break; - case 156: - MIX_00_4_0_1_2_1_1 - MIX_01_4_1_3_1 - MIX_10_4_6_7_2_1_1 - MIX_11_4_7_3_1 - break; - case 226: - MIX_00_4_0_3_2_1_1 - MIX_01_4_2_5_2_1_1 - MIX_10_4_3_3_1 - MIX_11_4_5_3_1 - break; - case 60: - MIX_00_4_0_1_2_1_1 - MIX_01_4_1_3_1 - MIX_10_4_7_3_1 - MIX_11_4_8_7_2_1_1 - break; - case 195: - MIX_00_4_3_3_1 - MIX_01_4_2_5_2_1_1 - MIX_10_4_6_3_2_1_1 - MIX_11_4_5_3_1 - break; - case 102: - MIX_00_4_0_3_2_1_1 - MIX_01_4_5_3_1 - MIX_10_4_3_3_1 - MIX_11_4_8_5_2_1_1 - break; - case 153: - MIX_00_4_1_3_1 - MIX_01_4_2_1_2_1_1 - MIX_10_4_6_7_2_1_1 - MIX_11_4_7_3_1 - break; - case 58: - if (isDifferent(w[3], w[1], trY, trU, trV, trA)) - { - MIX_00_MIX_00_4_0_3_1 - } - else - { - MIX_00_4_3_1_6_1_1 - } - if (isDifferent(w[1], w[5], trY, trU, trV, trA)) - { - MIX_01_4_2_3_1 - } - else - { - MIX_01_4_1_5_6_1_1 - } - MIX_10_4_7_3_1 - MIX_11_4_8_7_2_1_1 - break; - case 83: - MIX_00_4_3_3_1 - if (isDifferent(w[1], w[5], trY, trU, trV, trA)) - { - MIX_01_4_2_3_1 - } - else - { - MIX_01_4_1_5_6_1_1 - } - MIX_10_4_6_3_2_1_1 - if (isDifferent(w[5], w[7], trY, trU, trV, trA)) - { - MIX_11_4_8_3_1 - } - else - { - MIX_11_4_5_7_6_1_1 - } - break; - case 92: - MIX_00_4_0_1_2_1_1 - MIX_01_4_1_3_1 - if (isDifferent(w[7], w[3], trY, trU, trV, trA)) - { - MIX_10_4_6_3_1 - } - else - { - MIX_10_4_7_3_6_1_1 - } - if (isDifferent(w[5], w[7], trY, trU, trV, trA)) - { - MIX_11_4_8_3_1 - } - else - { - MIX_11_4_5_7_6_1_1 - } - break; - case 202: - if (isDifferent(w[3], w[1], trY, trU, trV, trA)) - { - MIX_00_MIX_00_4_0_3_1 - } - else - { - MIX_00_4_3_1_6_1_1 - } - MIX_01_4_2_5_2_1_1 - if (isDifferent(w[7], w[3], trY, trU, trV, trA)) - { - MIX_10_4_6_3_1 - } - else - { - MIX_10_4_7_3_6_1_1 - } - MIX_11_4_5_3_1 - break; - case 78: - if (isDifferent(w[3], w[1], trY, trU, trV, trA)) - { - MIX_00_MIX_00_4_0_3_1 - } - else - { - MIX_00_4_3_1_6_1_1 - } - MIX_01_4_5_3_1 - if (isDifferent(w[7], w[3], trY, trU, trV, trA)) - { - MIX_10_4_6_3_1 - } - else - { - MIX_10_4_7_3_6_1_1 - } - MIX_11_4_8_5_2_1_1 - break; - case 154: - if (isDifferent(w[3], w[1], trY, trU, trV, trA)) - { - MIX_00_MIX_00_4_0_3_1 - } - else - { - MIX_00_4_3_1_6_1_1 - } - if (isDifferent(w[1], w[5], trY, trU, trV, trA)) - { - MIX_01_4_2_3_1 - } - else - { - MIX_01_4_1_5_6_1_1 - } - MIX_10_4_6_7_2_1_1 - MIX_11_4_7_3_1 - break; - case 114: - MIX_00_4_0_3_2_1_1 - if (isDifferent(w[1], w[5], trY, trU, trV, trA)) - { - MIX_01_4_2_3_1 - } - else - { - MIX_01_4_1_5_6_1_1 - } - MIX_10_4_3_3_1 - if (isDifferent(w[5], w[7], trY, trU, trV, trA)) - { - MIX_11_4_8_3_1 - } - else - { - MIX_11_4_5_7_6_1_1 - } - break; - case 89: - MIX_00_4_1_3_1 - MIX_01_4_2_1_2_1_1 - if (isDifferent(w[7], w[3], trY, trU, trV, trA)) - { - MIX_10_4_6_3_1 - } - else - { - MIX_10_4_7_3_6_1_1 - } - if (isDifferent(w[5], w[7], trY, trU, trV, trA)) - { - MIX_11_4_8_3_1 - } - else - { - MIX_11_4_5_7_6_1_1 - } - break; - case 90: - if (isDifferent(w[3], w[1], trY, trU, trV, trA)) - { - MIX_00_MIX_00_4_0_3_1 - } - else - { - MIX_00_4_3_1_6_1_1 - } - if (isDifferent(w[1], w[5], trY, trU, trV, trA)) - { - MIX_01_4_2_3_1 - } - else - { - MIX_01_4_1_5_6_1_1 - } - if (isDifferent(w[7], w[3], trY, trU, trV, trA)) - { - MIX_10_4_6_3_1 - } - else - { - MIX_10_4_7_3_6_1_1 - } - if (isDifferent(w[5], w[7], trY, trU, trV, trA)) - { - MIX_11_4_8_3_1 - } - else - { - MIX_11_4_5_7_6_1_1 - } - break; - case 55: - case 23: - if (isDifferent(w[1], w[5], trY, trU, trV, trA)) - { - MIX_00_4_3_3_1 - MIX_01_4 - } - else - { - MIX_00_4_1_3_5_2_1 - MIX_01_4_1_5_2_3_3 - } - MIX_10_4_7_3_2_1_1 - MIX_11_4_8_7_2_1_1 - break; - case 182: - case 150: - MIX_00_4_0_3_2_1_1 - if (isDifferent(w[1], w[5], trY, trU, trV, trA)) - { - MIX_01_4 - MIX_11_4_7_3_1 - } - else - { - MIX_01_4_1_5_2_3_3 - MIX_11_4_5_7_5_2_1 - } - MIX_10_4_7_3_2_1_1 - break; - case 213: - case 212: - MIX_00_4_3_1_2_1_1 - if (isDifferent(w[5], w[7], trY, trU, trV, trA)) - { - MIX_01_4_1_3_1 - MIX_11_4 - } - else - { - MIX_01_4_5_1_5_2_1 - MIX_11_4_5_7_2_3_3 - } - MIX_10_4_6_3_2_1_1 - break; - case 241: - case 240: - MIX_00_4_3_1_2_1_1 - MIX_01_4_2_1_2_1_1 - if (isDifferent(w[5], w[7], trY, trU, trV, trA)) - { - MIX_10_4_3_3_1 - MIX_11_4 - } - else - { - MIX_10_4_7_3_5_2_1 - MIX_11_4_5_7_2_3_3 - } - break; - case 236: - case 232: - MIX_00_4_0_1_2_1_1 - MIX_01_4_1_5_2_1_1 - if (isDifferent(w[7], w[3], trY, trU, trV, trA)) - { - MIX_10_4 - MIX_11_4_5_3_1 - } - else - { - MIX_10_4_7_3_2_3_3 - MIX_11_4_7_5_5_2_1 - } - break; - case 109: - case 105: - if (isDifferent(w[7], w[3], trY, trU, trV, trA)) - { - MIX_00_4_1_3_1 - MIX_10_4 - } - else - { - MIX_00_4_3_1_5_2_1 - MIX_10_4_7_3_2_3_3 - } - MIX_01_4_1_5_2_1_1 - MIX_11_4_8_5_2_1_1 - break; - case 171: - case 43: - if (isDifferent(w[3], w[1], trY, trU, trV, trA)) - { - MIX_00_4 - MIX_10_4_7_3_1 - } - else - { - MIX_00_4_3_1_2_3_3 - MIX_10_4_3_7_5_2_1 - } - MIX_01_4_2_5_2_1_1 - MIX_11_4_5_7_2_1_1 - break; - case 143: - case 15: - if (isDifferent(w[3], w[1], trY, trU, trV, trA)) - { - MIX_00_4 - MIX_01_4_5_3_1 - } - else - { - MIX_00_4_3_1_2_3_3 - MIX_01_4_1_5_5_2_1 - } - MIX_10_4_6_7_2_1_1 - MIX_11_4_5_7_2_1_1 - break; - case 124: - MIX_00_4_0_1_2_1_1 - MIX_01_4_1_3_1 - if (isDifferent(w[7], w[3], trY, trU, trV, trA)) - { - MIX_10_4 - } - else - { - MIX_10_4_7_3_2_1_1 - } - MIX_11_4_8_3_1 - break; - case 203: - if (isDifferent(w[3], w[1], trY, trU, trV, trA)) - { - MIX_00_4 - } - else - { - MIX_00_4_3_1_2_1_1 - } - MIX_01_4_2_5_2_1_1 - MIX_10_4_6_3_1 - MIX_11_4_5_3_1 - break; - case 62: - MIX_00_MIX_00_4_0_3_1 - if (isDifferent(w[1], w[5], trY, trU, trV, trA)) - { - MIX_01_4 - } - else - { - MIX_01_4_1_5_2_1_1 - } - MIX_10_4_7_3_1 - MIX_11_4_8_7_2_1_1 - break; - case 211: - MIX_00_4_3_3_1 - MIX_01_4_2_3_1 - MIX_10_4_6_3_2_1_1 - if (isDifferent(w[5], w[7], trY, trU, trV, trA)) - { - MIX_11_4 - } - else - { - MIX_11_4_5_7_2_1_1 - } - break; - case 118: - MIX_00_4_0_3_2_1_1 - if (isDifferent(w[1], w[5], trY, trU, trV, trA)) - { - MIX_01_4 - } - else - { - MIX_01_4_1_5_2_1_1 - } - MIX_10_4_3_3_1 - MIX_11_4_8_3_1 - break; - case 217: - MIX_00_4_1_3_1 - MIX_01_4_2_1_2_1_1 - MIX_10_4_6_3_1 - if (isDifferent(w[5], w[7], trY, trU, trV, trA)) - { - MIX_11_4 - } - else - { - MIX_11_4_5_7_2_1_1 - } - break; - case 110: - MIX_00_MIX_00_4_0_3_1 - MIX_01_4_5_3_1 - if (isDifferent(w[7], w[3], trY, trU, trV, trA)) - { - MIX_10_4 - } - else - { - MIX_10_4_7_3_2_1_1 - } - MIX_11_4_8_5_2_1_1 - break; - case 155: - if (isDifferent(w[3], w[1], trY, trU, trV, trA)) - { - MIX_00_4 - } - else - { - MIX_00_4_3_1_2_1_1 - } - MIX_01_4_2_3_1 - MIX_10_4_6_7_2_1_1 - MIX_11_4_7_3_1 - break; - case 188: - MIX_00_4_0_1_2_1_1 - MIX_01_4_1_3_1 - MIX_10_4_7_3_1 - MIX_11_4_7_3_1 - break; - case 185: - MIX_00_4_1_3_1 - MIX_01_4_2_1_2_1_1 - MIX_10_4_7_3_1 - MIX_11_4_7_3_1 - break; - case 61: - MIX_00_4_1_3_1 - MIX_01_4_1_3_1 - MIX_10_4_7_3_1 - MIX_11_4_8_7_2_1_1 - break; - case 157: - MIX_00_4_1_3_1 - MIX_01_4_1_3_1 - MIX_10_4_6_7_2_1_1 - MIX_11_4_7_3_1 - break; - case 103: - MIX_00_4_3_3_1 - MIX_01_4_5_3_1 - MIX_10_4_3_3_1 - MIX_11_4_8_5_2_1_1 - break; - case 227: - MIX_00_4_3_3_1 - MIX_01_4_2_5_2_1_1 - MIX_10_4_3_3_1 - MIX_11_4_5_3_1 - break; - case 230: - MIX_00_4_0_3_2_1_1 - MIX_01_4_5_3_1 - MIX_10_4_3_3_1 - MIX_11_4_5_3_1 - break; - case 199: - MIX_00_4_3_3_1 - MIX_01_4_5_3_1 - MIX_10_4_6_3_2_1_1 - MIX_11_4_5_3_1 - break; - case 220: - MIX_00_4_0_1_2_1_1 - MIX_01_4_1_3_1 - if (isDifferent(w[7], w[3], trY, trU, trV, trA)) - { - MIX_10_4_6_3_1 - } - else - { - MIX_10_4_7_3_6_1_1 - } - if (isDifferent(w[5], w[7], trY, trU, trV, trA)) - { - MIX_11_4 - } - else - { - MIX_11_4_5_7_2_1_1 - } - break; - case 158: - if (isDifferent(w[3], w[1], trY, trU, trV, trA)) - { - MIX_00_MIX_00_4_0_3_1 - } - else - { - MIX_00_4_3_1_6_1_1 - } - if (isDifferent(w[1], w[5], trY, trU, trV, trA)) - { - MIX_01_4 - } - else - { - MIX_01_4_1_5_2_1_1 - } - MIX_10_4_6_7_2_1_1 - MIX_11_4_7_3_1 - break; - case 234: - if (isDifferent(w[3], w[1], trY, trU, trV, trA)) - { - MIX_00_MIX_00_4_0_3_1 - } - else - { - MIX_00_4_3_1_6_1_1 - } - MIX_01_4_2_5_2_1_1 - if (isDifferent(w[7], w[3], trY, trU, trV, trA)) - { - MIX_10_4 - } - else - { - MIX_10_4_7_3_2_1_1 - } - MIX_11_4_5_3_1 - break; - case 242: - MIX_00_4_0_3_2_1_1 - if (isDifferent(w[1], w[5], trY, trU, trV, trA)) - { - MIX_01_4_2_3_1 - } - else - { - MIX_01_4_1_5_6_1_1 - } - MIX_10_4_3_3_1 - if (isDifferent(w[5], w[7], trY, trU, trV, trA)) - { - MIX_11_4 - } - else - { - MIX_11_4_5_7_2_1_1 - } - break; - case 59: - if (isDifferent(w[3], w[1], trY, trU, trV, trA)) - { - MIX_00_4 - } - else - { - MIX_00_4_3_1_2_1_1 - } - if (isDifferent(w[1], w[5], trY, trU, trV, trA)) - { - MIX_01_4_2_3_1 - } - else - { - MIX_01_4_1_5_6_1_1 - } - MIX_10_4_7_3_1 - MIX_11_4_8_7_2_1_1 - break; - case 121: - MIX_00_4_1_3_1 - MIX_01_4_2_1_2_1_1 - if (isDifferent(w[7], w[3], trY, trU, trV, trA)) - { - MIX_10_4 - } - else - { - MIX_10_4_7_3_2_1_1 - } - if (isDifferent(w[5], w[7], trY, trU, trV, trA)) - { - MIX_11_4_8_3_1 - } - else - { - MIX_11_4_5_7_6_1_1 - } - break; - case 87: - MIX_00_4_3_3_1 - if (isDifferent(w[1], w[5], trY, trU, trV, trA)) - { - MIX_01_4 - } - else - { - MIX_01_4_1_5_2_1_1 - } - MIX_10_4_6_3_2_1_1 - if (isDifferent(w[5], w[7], trY, trU, trV, trA)) - { - MIX_11_4_8_3_1 - } - else - { - MIX_11_4_5_7_6_1_1 - } - break; - case 79: - if (isDifferent(w[3], w[1], trY, trU, trV, trA)) - { - MIX_00_4 - } - else - { - MIX_00_4_3_1_2_1_1 - } - MIX_01_4_5_3_1 - if (isDifferent(w[7], w[3], trY, trU, trV, trA)) - { - MIX_10_4_6_3_1 - } - else - { - MIX_10_4_7_3_6_1_1 - } - MIX_11_4_8_5_2_1_1 - break; - case 122: - if (isDifferent(w[3], w[1], trY, trU, trV, trA)) - { - MIX_00_MIX_00_4_0_3_1 - } - else - { - MIX_00_4_3_1_6_1_1 - } - if (isDifferent(w[1], w[5], trY, trU, trV, trA)) - { - MIX_01_4_2_3_1 - } - else - { - MIX_01_4_1_5_6_1_1 - } - if (isDifferent(w[7], w[3], trY, trU, trV, trA)) - { - MIX_10_4 - } - else - { - MIX_10_4_7_3_2_1_1 - } - if (isDifferent(w[5], w[7], trY, trU, trV, trA)) - { - MIX_11_4_8_3_1 - } - else - { - MIX_11_4_5_7_6_1_1 - } - break; - case 94: - if (isDifferent(w[3], w[1], trY, trU, trV, trA)) - { - MIX_00_MIX_00_4_0_3_1 - } - else - { - MIX_00_4_3_1_6_1_1 - } - if (isDifferent(w[1], w[5], trY, trU, trV, trA)) - { - MIX_01_4 - } - else - { - MIX_01_4_1_5_2_1_1 - } - if (isDifferent(w[7], w[3], trY, trU, trV, trA)) - { - MIX_10_4_6_3_1 - } - else - { - MIX_10_4_7_3_6_1_1 - } - if (isDifferent(w[5], w[7], trY, trU, trV, trA)) - { - MIX_11_4_8_3_1 - } - else - { - MIX_11_4_5_7_6_1_1 - } - break; - case 218: - if (isDifferent(w[3], w[1], trY, trU, trV, trA)) - { - MIX_00_MIX_00_4_0_3_1 - } - else - { - MIX_00_4_3_1_6_1_1 - } - if (isDifferent(w[1], w[5], trY, trU, trV, trA)) - { - MIX_01_4_2_3_1 - } - else - { - MIX_01_4_1_5_6_1_1 - } - if (isDifferent(w[7], w[3], trY, trU, trV, trA)) - { - MIX_10_4_6_3_1 - } - else - { - MIX_10_4_7_3_6_1_1 - } - if (isDifferent(w[5], w[7], trY, trU, trV, trA)) - { - MIX_11_4 - } - else - { - MIX_11_4_5_7_2_1_1 - } - break; - case 91: - if (isDifferent(w[3], w[1], trY, trU, trV, trA)) - { - MIX_00_4 - } - else - { - MIX_00_4_3_1_2_1_1 - } - if (isDifferent(w[1], w[5], trY, trU, trV, trA)) - { - MIX_01_4_2_3_1 - } - else - { - MIX_01_4_1_5_6_1_1 - } - if (isDifferent(w[7], w[3], trY, trU, trV, trA)) - { - MIX_10_4_6_3_1 - } - else - { - MIX_10_4_7_3_6_1_1 - } - if (isDifferent(w[5], w[7], trY, trU, trV, trA)) - { - MIX_11_4_8_3_1 - } - else - { - MIX_11_4_5_7_6_1_1 - } - break; - case 229: - MIX_00_4_3_1_2_1_1 - MIX_01_4_1_5_2_1_1 - MIX_10_4_3_3_1 - MIX_11_4_5_3_1 - break; - case 167: - MIX_00_4_3_3_1 - MIX_01_4_5_3_1 - MIX_10_4_7_3_2_1_1 - MIX_11_4_5_7_2_1_1 - break; - case 173: - MIX_00_4_1_3_1 - MIX_01_4_1_5_2_1_1 - MIX_10_4_7_3_1 - MIX_11_4_5_7_2_1_1 - break; - case 181: - MIX_00_4_3_1_2_1_1 - MIX_01_4_1_3_1 - MIX_10_4_7_3_2_1_1 - MIX_11_4_7_3_1 - break; - case 186: - if (isDifferent(w[3], w[1], trY, trU, trV, trA)) - { - MIX_00_MIX_00_4_0_3_1 - } - else - { - MIX_00_4_3_1_6_1_1 - } - if (isDifferent(w[1], w[5], trY, trU, trV, trA)) - { - MIX_01_4_2_3_1 - } - else - { - MIX_01_4_1_5_6_1_1 - } - MIX_10_4_7_3_1 - MIX_11_4_7_3_1 - break; - case 115: - MIX_00_4_3_3_1 - if (isDifferent(w[1], w[5], trY, trU, trV, trA)) - { - MIX_01_4_2_3_1 - } - else - { - MIX_01_4_1_5_6_1_1 - } - MIX_10_4_3_3_1 - if (isDifferent(w[5], w[7], trY, trU, trV, trA)) - { - MIX_11_4_8_3_1 - } - else - { - MIX_11_4_5_7_6_1_1 - } - break; - case 93: - MIX_00_4_1_3_1 - MIX_01_4_1_3_1 - if (isDifferent(w[7], w[3], trY, trU, trV, trA)) - { - MIX_10_4_6_3_1 - } - else - { - MIX_10_4_7_3_6_1_1 - } - if (isDifferent(w[5], w[7], trY, trU, trV, trA)) - { - MIX_11_4_8_3_1 - } - else - { - MIX_11_4_5_7_6_1_1 - } - break; - case 206: - if (isDifferent(w[3], w[1], trY, trU, trV, trA)) - { - MIX_00_MIX_00_4_0_3_1 - } - else - { - MIX_00_4_3_1_6_1_1 - } - MIX_01_4_5_3_1 - if (isDifferent(w[7], w[3], trY, trU, trV, trA)) - { - MIX_10_4_6_3_1 - } - else - { - MIX_10_4_7_3_6_1_1 - } - MIX_11_4_5_3_1 - break; - case 205: - case 201: - MIX_00_4_1_3_1 - MIX_01_4_1_5_2_1_1 - if (isDifferent(w[7], w[3], trY, trU, trV, trA)) - { - MIX_10_4_6_3_1 - } - else - { - MIX_10_4_7_3_6_1_1 - } - MIX_11_4_5_3_1 - break; - case 174: - case 46: - if (isDifferent(w[3], w[1], trY, trU, trV, trA)) - { - MIX_00_MIX_00_4_0_3_1 - } - else - { - MIX_00_4_3_1_6_1_1 - } - MIX_01_4_5_3_1 - MIX_10_4_7_3_1 - MIX_11_4_5_7_2_1_1 - break; - case 179: - case 147: - MIX_00_4_3_3_1 - if (isDifferent(w[1], w[5], trY, trU, trV, trA)) - { - MIX_01_4_2_3_1 - } - else - { - MIX_01_4_1_5_6_1_1 - } - MIX_10_4_7_3_2_1_1 - MIX_11_4_7_3_1 - break; - case 117: - case 116: - MIX_00_4_3_1_2_1_1 - MIX_01_4_1_3_1 - MIX_10_4_3_3_1 - if (isDifferent(w[5], w[7], trY, trU, trV, trA)) - { - MIX_11_4_8_3_1 - } - else - { - MIX_11_4_5_7_6_1_1 - } - break; - case 189: - MIX_00_4_1_3_1 - MIX_01_4_1_3_1 - MIX_10_4_7_3_1 - MIX_11_4_7_3_1 - break; - case 231: - MIX_00_4_3_3_1 - MIX_01_4_5_3_1 - MIX_10_4_3_3_1 - MIX_11_4_5_3_1 - break; - case 126: - MIX_00_MIX_00_4_0_3_1 - if (isDifferent(w[1], w[5], trY, trU, trV, trA)) - { - MIX_01_4 - } - else - { - MIX_01_4_1_5_2_1_1 - } - if (isDifferent(w[7], w[3], trY, trU, trV, trA)) - { - MIX_10_4 - } - else - { - MIX_10_4_7_3_2_1_1 - } - MIX_11_4_8_3_1 - break; - case 219: - if (isDifferent(w[3], w[1], trY, trU, trV, trA)) - { - MIX_00_4 - } - else - { - MIX_00_4_3_1_2_1_1 - } - MIX_01_4_2_3_1 - MIX_10_4_6_3_1 - if (isDifferent(w[5], w[7], trY, trU, trV, trA)) - { - MIX_11_4 - } - else - { - MIX_11_4_5_7_2_1_1 - } - break; - case 125: - if (isDifferent(w[7], w[3], trY, trU, trV, trA)) - { - MIX_00_4_1_3_1 - MIX_10_4 - } - else - { - MIX_00_4_3_1_5_2_1 - MIX_10_4_7_3_2_3_3 - } - MIX_01_4_1_3_1 - MIX_11_4_8_3_1 - break; - case 221: - MIX_00_4_1_3_1 - if (isDifferent(w[5], w[7], trY, trU, trV, trA)) - { - MIX_01_4_1_3_1 - MIX_11_4 - } - else - { - MIX_01_4_5_1_5_2_1 - MIX_11_4_5_7_2_3_3 - } - MIX_10_4_6_3_1 - break; - case 207: - if (isDifferent(w[3], w[1], trY, trU, trV, trA)) - { - MIX_00_4 - MIX_01_4_5_3_1 - } - else - { - MIX_00_4_3_1_2_3_3 - MIX_01_4_1_5_5_2_1 - } - MIX_10_4_6_3_1 - MIX_11_4_5_3_1 - break; - case 238: - MIX_00_MIX_00_4_0_3_1 - MIX_01_4_5_3_1 - if (isDifferent(w[7], w[3], trY, trU, trV, trA)) - { - MIX_10_4 - MIX_11_4_5_3_1 - } - else - { - MIX_10_4_7_3_2_3_3 - MIX_11_4_7_5_5_2_1 - } - break; - case 190: - MIX_00_MIX_00_4_0_3_1 - if (isDifferent(w[1], w[5], trY, trU, trV, trA)) - { - MIX_01_4 - MIX_11_4_7_3_1 - } - else - { - MIX_01_4_1_5_2_3_3 - MIX_11_4_5_7_5_2_1 - } - MIX_10_4_7_3_1 - break; - case 187: - if (isDifferent(w[3], w[1], trY, trU, trV, trA)) - { - MIX_00_4 - MIX_10_4_7_3_1 - } - else - { - MIX_00_4_3_1_2_3_3 - MIX_10_4_3_7_5_2_1 - } - MIX_01_4_2_3_1 - MIX_11_4_7_3_1 - break; - case 243: - MIX_00_4_3_3_1 - MIX_01_4_2_3_1 - if (isDifferent(w[5], w[7], trY, trU, trV, trA)) - { - MIX_10_4_3_3_1 - MIX_11_4 - } - else - { - MIX_10_4_7_3_5_2_1 - MIX_11_4_5_7_2_3_3 - } - break; - case 119: - if (isDifferent(w[1], w[5], trY, trU, trV, trA)) - { - MIX_00_4_3_3_1 - MIX_01_4 - } - else - { - MIX_00_4_1_3_5_2_1 - MIX_01_4_1_5_2_3_3 - } - MIX_10_4_3_3_1 - MIX_11_4_8_3_1 - break; - case 237: - case 233: - MIX_00_4_1_3_1 - MIX_01_4_1_5_2_1_1 - if (isDifferent(w[7], w[3], trY, trU, trV, trA)) - { - MIX_10_4 - } - else - { - MIX_10_4_6_3_10 - } - MIX_11_4_5_3_1 - break; - case 175: - case 47: - if (isDifferent(w[3], w[1], trY, trU, trV, trA)) - { - MIX_00_4 - } - else - { - MIX_00_MIX_00_4_0_3_10 - } - MIX_01_4_5_3_1 - MIX_10_4_7_3_1 - MIX_11_4_5_7_2_1_1 - break; - case 183: - case 151: - MIX_00_4_3_3_1 - if (isDifferent(w[1], w[5], trY, trU, trV, trA)) - { - MIX_01_4 - } - else - { - MIX_01_4_2_3_10 - } - MIX_10_4_7_3_2_1_1 - MIX_11_4_7_3_1 - break; - case 245: - case 244: - MIX_00_4_3_1_2_1_1 - MIX_01_4_1_3_1 - MIX_10_4_3_3_1 - if (isDifferent(w[5], w[7], trY, trU, trV, trA)) - { - MIX_11_4 - } - else - { - MIX_11_4_8_3_10 - } - break; - case 250: - MIX_00_MIX_00_4_0_3_1 - MIX_01_4_2_3_1 - if (isDifferent(w[7], w[3], trY, trU, trV, trA)) - { - MIX_10_4 - } - else - { - MIX_10_4_7_3_2_1_1 - } - if (isDifferent(w[5], w[7], trY, trU, trV, trA)) - { - MIX_11_4 - } - else - { - MIX_11_4_5_7_2_1_1 - } - break; - case 123: - if (isDifferent(w[3], w[1], trY, trU, trV, trA)) - { - MIX_00_4 - } - else - { - MIX_00_4_3_1_2_1_1 - } - MIX_01_4_2_3_1 - if (isDifferent(w[7], w[3], trY, trU, trV, trA)) - { - MIX_10_4 - } - else - { - MIX_10_4_7_3_2_1_1 - } - MIX_11_4_8_3_1 - break; - case 95: - if (isDifferent(w[3], w[1], trY, trU, trV, trA)) - { - MIX_00_4 - } - else - { - MIX_00_4_3_1_2_1_1 - } - if (isDifferent(w[1], w[5], trY, trU, trV, trA)) - { - MIX_01_4 - } - else - { - MIX_01_4_1_5_2_1_1 - } - MIX_10_4_6_3_1 - MIX_11_4_8_3_1 - break; - case 222: - MIX_00_MIX_00_4_0_3_1 - if (isDifferent(w[1], w[5], trY, trU, trV, trA)) - { - MIX_01_4 - } - else - { - MIX_01_4_1_5_2_1_1 - } - MIX_10_4_6_3_1 - if (isDifferent(w[5], w[7], trY, trU, trV, trA)) - { - MIX_11_4 - } - else - { - MIX_11_4_5_7_2_1_1 - } - break; - case 252: - MIX_00_4_0_1_2_1_1 - MIX_01_4_1_3_1 - if (isDifferent(w[7], w[3], trY, trU, trV, trA)) - { - MIX_10_4 - } - else - { - MIX_10_4_7_3_2_1_1 - } - if (isDifferent(w[5], w[7], trY, trU, trV, trA)) - { - MIX_11_4 - } - else - { - MIX_11_4_8_3_10 - } - break; - case 249: - MIX_00_4_1_3_1 - MIX_01_4_2_1_2_1_1 - if (isDifferent(w[7], w[3], trY, trU, trV, trA)) - { - MIX_10_4 - } - else - { - MIX_10_4_6_3_10 - } - if (isDifferent(w[5], w[7], trY, trU, trV, trA)) - { - MIX_11_4 - } - else - { - MIX_11_4_5_7_2_1_1 - } - break; - case 235: - if (isDifferent(w[3], w[1], trY, trU, trV, trA)) - { - MIX_00_4 - } - else - { - MIX_00_4_3_1_2_1_1 - } - MIX_01_4_2_5_2_1_1 - if (isDifferent(w[7], w[3], trY, trU, trV, trA)) - { - MIX_10_4 - } - else - { - MIX_10_4_6_3_10 - } - MIX_11_4_5_3_1 - break; - case 111: - if (isDifferent(w[3], w[1], trY, trU, trV, trA)) - { - MIX_00_4 - } - else - { - MIX_00_MIX_00_4_0_3_10 - } - MIX_01_4_5_3_1 - if (isDifferent(w[7], w[3], trY, trU, trV, trA)) - { - MIX_10_4 - } - else - { - MIX_10_4_7_3_2_1_1 - } - MIX_11_4_8_5_2_1_1 - break; - case 63: - if (isDifferent(w[3], w[1], trY, trU, trV, trA)) - { - MIX_00_4 - } - else - { - MIX_00_MIX_00_4_0_3_10 - } - if (isDifferent(w[1], w[5], trY, trU, trV, trA)) - { - MIX_01_4 - } - else - { - MIX_01_4_1_5_2_1_1 - } - MIX_10_4_7_3_1 - MIX_11_4_8_7_2_1_1 - break; - case 159: - if (isDifferent(w[3], w[1], trY, trU, trV, trA)) - { - MIX_00_4 - } - else - { - MIX_00_4_3_1_2_1_1 - } - if (isDifferent(w[1], w[5], trY, trU, trV, trA)) - { - MIX_01_4 - } - else - { - MIX_01_4_2_3_10 - } - MIX_10_4_6_7_2_1_1 - MIX_11_4_7_3_1 - break; - case 215: - MIX_00_4_3_3_1 - if (isDifferent(w[1], w[5], trY, trU, trV, trA)) - { - MIX_01_4 - } - else - { - MIX_01_4_2_3_10 - } - MIX_10_4_6_3_2_1_1 - if (isDifferent(w[5], w[7], trY, trU, trV, trA)) - { - MIX_11_4 - } - else - { - MIX_11_4_5_7_2_1_1 - } - break; - case 246: - MIX_00_4_0_3_2_1_1 - if (isDifferent(w[1], w[5], trY, trU, trV, trA)) - { - MIX_01_4 - } - else - { - MIX_01_4_1_5_2_1_1 - } - MIX_10_4_3_3_1 - if (isDifferent(w[5], w[7], trY, trU, trV, trA)) - { - MIX_11_4 - } - else - { - MIX_11_4_8_3_10 - } - break; - case 254: - MIX_00_MIX_00_4_0_3_1 - if (isDifferent(w[1], w[5], trY, trU, trV, trA)) - { - MIX_01_4 - } - else - { - MIX_01_4_1_5_2_1_1 - } - if (isDifferent(w[7], w[3], trY, trU, trV, trA)) - { - MIX_10_4 - } - else - { - MIX_10_4_7_3_2_1_1 - } - if (isDifferent(w[5], w[7], trY, trU, trV, trA)) - { - MIX_11_4 - } - else - { - MIX_11_4_8_3_10 - } - break; - case 253: - MIX_00_4_1_3_1 - MIX_01_4_1_3_1 - if (isDifferent(w[7], w[3], trY, trU, trV, trA)) - { - MIX_10_4 - } - else - { - MIX_10_4_6_3_10 - } - if (isDifferent(w[5], w[7], trY, trU, trV, trA)) - { - MIX_11_4 - } - else - { - MIX_11_4_8_3_10 - } - break; - case 251: - if (isDifferent(w[3], w[1], trY, trU, trV, trA)) - { - MIX_00_4 - } - else - { - MIX_00_4_3_1_2_1_1 - } - MIX_01_4_2_3_1 - if (isDifferent(w[7], w[3], trY, trU, trV, trA)) - { - MIX_10_4 - } - else - { - MIX_10_4_6_3_10 - } - if (isDifferent(w[5], w[7], trY, trU, trV, trA)) - { - MIX_11_4 - } - else - { - MIX_11_4_5_7_2_1_1 - } - break; - case 239: - if (isDifferent(w[3], w[1], trY, trU, trV, trA)) - { - MIX_00_4 - } - else - { - MIX_00_MIX_00_4_0_3_10 - } - MIX_01_4_5_3_1 - if (isDifferent(w[7], w[3], trY, trU, trV, trA)) - { - MIX_10_4 - } - else - { - MIX_10_4_6_3_10 - } - MIX_11_4_5_3_1 - break; - case 127: - if (isDifferent(w[3], w[1], trY, trU, trV, trA)) - { - MIX_00_4 - } - else - { - MIX_00_MIX_00_4_0_3_10 - } - if (isDifferent(w[1], w[5], trY, trU, trV, trA)) - { - MIX_01_4 - } - else - { - MIX_01_4_1_5_2_1_1 - } - if (isDifferent(w[7], w[3], trY, trU, trV, trA)) - { - MIX_10_4 - } - else - { - MIX_10_4_7_3_2_1_1 - } - MIX_11_4_8_3_1 - break; - case 191: - if (isDifferent(w[3], w[1], trY, trU, trV, trA)) - { - MIX_00_4 - } - else - { - MIX_00_MIX_00_4_0_3_10 - } - if (isDifferent(w[1], w[5], trY, trU, trV, trA)) - { - MIX_01_4 - } - else - { - MIX_01_4_2_3_10 - } - MIX_10_4_7_3_1 - MIX_11_4_7_3_1 - break; - case 223: - if (isDifferent(w[3], w[1], trY, trU, trV, trA)) - { - MIX_00_4 - } - else - { - MIX_00_4_3_1_2_1_1 - } - if (isDifferent(w[1], w[5], trY, trU, trV, trA)) - { - MIX_01_4 - } - else - { - MIX_01_4_2_3_10 - } - MIX_10_4_6_3_1 - if (isDifferent(w[5], w[7], trY, trU, trV, trA)) - { - MIX_11_4 - } - else - { - MIX_11_4_5_7_2_1_1 - } - break; - case 247: - MIX_00_4_3_3_1 - if (isDifferent(w[1], w[5], trY, trU, trV, trA)) - { - MIX_01_4 - } - else - { - MIX_01_4_2_3_10 - } - MIX_10_4_3_3_1 - if (isDifferent(w[5], w[7], trY, trU, trV, trA)) - { - MIX_11_4 - } - else - { - MIX_11_4_8_3_10 - } - break; - case 255: - if (isDifferent(w[3], w[1], trY, trU, trV, trA)) - MIX_00_4 - else - MIX_00_MIX_00_4_0_3_10 - - if (isDifferent(w[1], w[5], trY, trU, trV, trA)) - MIX_01_4 - else - MIX_01_4_2_3_10 - - if (isDifferent(w[7], w[3], trY, trU, trV, trA)) - MIX_10_4 - else - MIX_10_4_6_3_10 - - if (isDifferent(w[5], w[7], trY, trU, trV, trA)) - MIX_11_4 - else - MIX_11_4_8_3_10 - break; - } - image++; - output += 2; - } - output += lineSize; - } - - return output; -} diff --git a/thirdparty/misc/hq2x.h b/thirdparty/misc/hq2x.h deleted file mode 100644 index bebd917950..0000000000 --- a/thirdparty/misc/hq2x.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef HQ2X_H -#define HQ2X_H - -#include "core/typedefs.h" - - -uint32_t *hq2x_resize( - const uint32_t *image, - uint32_t width, - uint32_t height, - uint32_t *output, - uint32_t trY = 0x30, - uint32_t trU = 0x07, - uint32_t trV = 0x06, - uint32_t trA = 0x50, - bool wrapX = false, - bool wrapY = false ); - -#endif // HQ2X_H |