summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore9
-rw-r--r--SConstruct2
-rw-r--r--core/bind/core_bind.cpp13
-rw-r--r--core/bind/core_bind.h2
-rw-r--r--core/image_quantize.cpp5
-rw-r--r--core/io/marshalls.cpp3
-rw-r--r--core/io/resource_format_xml.cpp2
-rw-r--r--core/io/resource_loader.cpp1
-rw-r--r--core/io/translation_loader_po.cpp3
-rw-r--r--core/math/triangle_mesh.cpp14
-rw-r--r--core/object.cpp2
-rw-r--r--core/os/input.cpp1
-rw-r--r--core/os/input.h1
-rw-r--r--core/path_db.cpp2
-rw-r--r--core/pool_allocator.cpp1
-rw-r--r--core/ustring.cpp1
-rw-r--r--core/variant_call.cpp8
-rw-r--r--core/variant_op.cpp24
-rw-r--r--doc/base/classes.xml7763
-rw-r--r--drivers/builtin_openssl2/openssl/opensslconf.h9
-rw-r--r--drivers/webpold/SCsub63
-rw-r--r--drivers/webpold/dec/alpha.c140
-rw-r--r--drivers/webpold/dec/buffer.c215
-rw-r--r--drivers/webpold/dec/decode_vp8.h182
-rw-r--r--drivers/webpold/dec/frame.c679
-rw-r--r--drivers/webpold/dec/idec.c785
-rw-r--r--drivers/webpold/dec/io.c633
-rw-r--r--drivers/webpold/dec/layer.c35
-rw-r--r--drivers/webpold/dec/quant.c113
-rw-r--r--drivers/webpold/dec/tree.c589
-rw-r--r--drivers/webpold/dec/vp8.c787
-rw-r--r--drivers/webpold/dec/vp8i.h335
-rw-r--r--drivers/webpold/dec/vp8l.c1200
-rw-r--r--drivers/webpold/dec/vp8li.h121
-rw-r--r--drivers/webpold/dec/webp.c771
-rw-r--r--drivers/webpold/dec/webpi.h114
-rw-r--r--drivers/webpold/decode.h454
-rw-r--r--drivers/webpold/dsp/cpu.c85
-rw-r--r--drivers/webpold/dsp/dec.c732
-rw-r--r--drivers/webpold/dsp/dec_neon.c329
-rw-r--r--drivers/webpold/dsp/dec_sse2.c903
-rw-r--r--drivers/webpold/dsp/dsp.h210
-rw-r--r--drivers/webpold/dsp/enc.c743
-rw-r--r--drivers/webpold/dsp/enc_sse2.c837
-rw-r--r--drivers/webpold/dsp/lossless.c1138
-rw-r--r--drivers/webpold/dsp/lossless.h82
-rw-r--r--drivers/webpold/dsp/upsampling.c357
-rw-r--r--drivers/webpold/dsp/upsampling_sse2.c209
-rw-r--r--drivers/webpold/dsp/yuv.c52
-rw-r--r--drivers/webpold/dsp/yuv.h128
-rw-r--r--drivers/webpold/enc/alpha.c330
-rw-r--r--drivers/webpold/enc/analysis.c364
-rw-r--r--drivers/webpold/enc/backward_references.c874
-rw-r--r--drivers/webpold/enc/backward_references.h212
-rw-r--r--drivers/webpold/enc/config.c132
-rw-r--r--drivers/webpold/enc/cost.c494
-rw-r--r--drivers/webpold/enc/cost.h48
-rw-r--r--drivers/webpold/enc/filter.c409
-rw-r--r--drivers/webpold/enc/frame.c939
-rw-r--r--drivers/webpold/enc/histogram.c406
-rw-r--r--drivers/webpold/enc/histogram.h115
-rw-r--r--drivers/webpold/enc/iterator.c422
-rw-r--r--drivers/webpold/enc/layer.c49
-rw-r--r--drivers/webpold/enc/picture.c1041
-rw-r--r--drivers/webpold/enc/quant.c930
-rw-r--r--drivers/webpold/enc/syntax.c437
-rw-r--r--drivers/webpold/enc/tree.c510
-rw-r--r--drivers/webpold/enc/vp8enci.h525
-rw-r--r--drivers/webpold/enc/vp8l.c1150
-rw-r--r--drivers/webpold/enc/vp8li.h68
-rw-r--r--drivers/webpold/enc/webpenc.c389
-rw-r--r--drivers/webpold/encode.h463
-rw-r--r--drivers/webpold/format_constants.h90
-rw-r--r--drivers/webpold/image_loader_webp.cpp182
-rw-r--r--drivers/webpold/image_loader_webp.h49
-rw-r--r--drivers/webpold/mux.h604
-rw-r--r--drivers/webpold/mux/demux.c902
-rw-r--r--drivers/webpold/mux/muxedit.c712
-rw-r--r--drivers/webpold/mux/muxi.h271
-rw-r--r--drivers/webpold/mux/muxinternal.c576
-rw-r--r--drivers/webpold/mux/muxread.c411
-rw-r--r--drivers/webpold/types.h45
-rw-r--r--drivers/webpold/utils/bit_reader.c229
-rw-r--r--drivers/webpold/utils/bit_reader.h198
-rw-r--r--drivers/webpold/utils/bit_writer.c284
-rw-r--r--drivers/webpold/utils/bit_writer.h123
-rw-r--r--drivers/webpold/utils/color_cache.c44
-rw-r--r--drivers/webpold/utils/color_cache.h68
-rw-r--r--drivers/webpold/utils/filters.c229
-rw-r--r--drivers/webpold/utils/filters.h54
-rw-r--r--drivers/webpold/utils/huffman.c238
-rw-r--r--drivers/webpold/utils/huffman.h78
-rw-r--r--drivers/webpold/utils/huffman_encode.c439
-rw-r--r--drivers/webpold/utils/huffman_encode.h47
-rw-r--r--drivers/webpold/utils/quant_levels.c154
-rw-r--r--drivers/webpold/utils/quant_levels.h39
-rw-r--r--drivers/webpold/utils/rescaler.c152
-rw-r--r--drivers/webpold/utils/rescaler.h76
-rw-r--r--drivers/webpold/utils/thread.c247
-rw-r--r--drivers/webpold/utils/thread.h86
-rw-r--r--drivers/webpold/utils/utils.c44
-rw-r--r--drivers/webpold/utils/utils.h44
-rw-r--r--main/input_default.cpp23
-rw-r--r--main/input_default.h3
-rw-r--r--main/main.cpp14
-rw-r--r--main/splash.h1390
-rwxr-xr-xmethods.py4
-rw-r--r--modules/gdscript/gd_parser.cpp5
-rw-r--r--platform/android/SCsub26
-rw-r--r--platform/android/build.gradle.template23
-rw-r--r--platform/android/detect.py2
-rw-r--r--platform/android/export/export.cpp2
-rw-r--r--platform/android/file_access_jandroid.cpp4
-rw-r--r--platform/android/java/gradle/wrapper/gradle-wrapper.properties2
-rw-r--r--platform/javascript/os_javascript.cpp3
-rw-r--r--platform/osx/export/export.cpp48
-rw-r--r--platform/windows/os_windows.cpp62
-rw-r--r--platform/windows/os_windows.h1
-rw-r--r--platform/winrt/include/FunctionDiscoveryKeys_devpkey.h213
-rw-r--r--platform/winrt/include/LICENSE.ANGLE.txt32
-rw-r--r--platform/x11/os_x11.cpp5
-rw-r--r--scene/2d/camera_2d.cpp32
-rw-r--r--scene/2d/camera_2d.h2
-rw-r--r--scene/2d/canvas_item.cpp11
-rw-r--r--scene/2d/canvas_item.h1
-rw-r--r--scene/2d/navigation2d.cpp7
-rw-r--r--scene/2d/tile_map.cpp36
-rw-r--r--scene/2d/tile_map.h3
-rw-r--r--scene/2d/visibility_notifier_2d.cpp12
-rw-r--r--scene/3d/physics_joint.cpp6
-rw-r--r--scene/3d/vehicle_body.cpp12
-rw-r--r--scene/3d/visibility_notifier.cpp17
-rw-r--r--scene/animation/animation_tree_player.cpp170
-rw-r--r--scene/animation/animation_tree_player.h5
-rw-r--r--scene/gui/label.cpp4
-rw-r--r--scene/gui/line_edit.cpp3
-rw-r--r--scene/gui/rich_text_label.cpp30
-rw-r--r--scene/gui/rich_text_label.h1
-rw-r--r--scene/gui/text_edit.cpp28
-rw-r--r--scene/gui/text_edit.h3
-rw-r--r--scene/gui/tree.cpp10
-rw-r--r--scene/gui/tree.h2
-rw-r--r--scene/main/viewport.cpp2
-rw-r--r--scene/resources/animation.cpp3
-rw-r--r--scene/resources/default_theme/default_theme.cpp6
-rw-r--r--scene/resources/dynamic_font.cpp2
-rw-r--r--scene/resources/material.cpp2
-rw-r--r--scene/resources/mesh.cpp4
-rw-r--r--scene/resources/packed_scene.cpp22
-rw-r--r--scene/resources/sample_library.cpp19
-rw-r--r--scene/resources/sample_library.h4
-rw-r--r--servers/audio/audio_mixer_sw.cpp6
-rw-r--r--servers/physics/body_pair_sw.cpp4
-rw-r--r--servers/physics/collision_solver_sat.cpp1
-rw-r--r--servers/physics/shape_sw.cpp4
-rw-r--r--servers/physics/space_sw.cpp4
-rw-r--r--servers/physics_2d/shape_2d_sw.cpp3
-rw-r--r--servers/physics_2d/space_2d_sw.cpp4
-rw-r--r--servers/spatial_sound_2d/spatial_sound_2d_server_sw.cpp17
-rw-r--r--servers/visual/shader_language.cpp16
-rw-r--r--servers/visual/visual_server_raster.cpp20
-rw-r--r--servers/visual/visual_server_raster.h4
-rw-r--r--servers/visual/visual_server_wrap_mt.h2
-rw-r--r--servers/visual_server.cpp1
-rw-r--r--servers/visual_server.h2
-rw-r--r--tools/doc/doc_data.cpp8
-rw-r--r--tools/editor/animation_editor.cpp357
-rw-r--r--tools/editor/animation_editor.h9
-rw-r--r--tools/editor/asset_library_editor_plugin.cpp29
-rw-r--r--tools/editor/asset_library_editor_plugin.h5
-rw-r--r--tools/editor/code_editor.cpp5
-rw-r--r--tools/editor/create_dialog.cpp14
-rw-r--r--tools/editor/dependency_editor.cpp1
-rw-r--r--tools/editor/editor_asset_installer.cpp6
-rw-r--r--tools/editor/editor_autoload_settings.cpp618
-rw-r--r--tools/editor/editor_autoload_settings.h (renamed from tools/editor/import_settings.h)88
-rw-r--r--tools/editor/editor_data.cpp38
-rw-r--r--tools/editor/editor_data.h7
-rw-r--r--tools/editor/editor_help.cpp3
-rw-r--r--tools/editor/editor_node.cpp84
-rw-r--r--tools/editor/editor_node.h8
-rw-r--r--tools/editor/editor_resource_preview.cpp132
-rw-r--r--tools/editor/editor_run_native.cpp4
-rw-r--r--tools/editor/editor_settings.cpp5
-rw-r--r--tools/editor/import_settings.cpp220
-rw-r--r--tools/editor/io_plugins/editor_import_collada.cpp1
-rw-r--r--tools/editor/io_plugins/editor_mesh_import_plugin.cpp2
-rw-r--r--tools/editor/plugins/collision_polygon_editor_plugin.cpp2
-rw-r--r--tools/editor/plugins/script_editor_plugin.cpp11
-rw-r--r--tools/editor/plugins/shader_editor_plugin.cpp2
-rw-r--r--tools/editor/plugins/spatial_editor_plugin.cpp11
-rw-r--r--tools/editor/plugins/tile_map_editor_plugin.cpp18
-rw-r--r--tools/editor/plugins/tile_set_editor_plugin.cpp22
-rw-r--r--tools/editor/project_manager.cpp220
-rw-r--r--tools/editor/project_manager.h2
-rw-r--r--tools/editor/project_settings.cpp429
-rw-r--r--tools/editor/project_settings.h19
-rw-r--r--tools/editor/property_editor.cpp2
-rw-r--r--tools/editor/scene_tree_dock.cpp4
-rw-r--r--tools/editor/spatial_editor_gizmos.cpp5
-rw-r--r--tools/export/blender25/godot_export_manager.py472
-rw-r--r--tools/export/blender25/install.txt11
-rw-r--r--tools/export/blender25/io_scene_dae/__init__.py193
-rw-r--r--tools/export/blender25/io_scene_dae/export_dae.py1724
-rw-r--r--version.py2
205 files changed, 7319 insertions, 37792 deletions
diff --git a/.gitignore b/.gitignore
index e1941b18df..f3a4e9714c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -37,17 +37,10 @@ platform/android/java/.gradle
platform/android/java/.gradletasknamecache
platform/android/java/local.properties
platform/android/java/project.properties
+platform/android/java/build.gradle
platform/android/java/AndroidManifest.xml
-platform/android/java/bin/*
platform/android/java/libs/*
-platform/android/java/gen/*
platform/android/java/assets
-platform/android/libs/apk_expansion/bin/*
-platform/android/libs/apk_expansion/gen/*
-platform/android/libs/google_play_services/bin/*
-platform/android/libs/google_play_services/gen/*
-platform/android/libs/play_licensing/bin/*
-platform/android/libs/play_licensing/gen/*
# General c++ generated files
*.lib
diff --git a/SConstruct b/SConstruct
index 01b1f2ce8e..d168820f66 100644
--- a/SConstruct
+++ b/SConstruct
@@ -73,6 +73,7 @@ env_base.android_java_dirs=[]
env_base.android_res_dirs=[]
env_base.android_aidl_dirs=[]
env_base.android_jni_dirs=[]
+env_base.android_default_config=[]
env_base.android_manifest_chunk=""
env_base.android_permission_chunk=""
env_base.android_appattributes_chunk=""
@@ -88,6 +89,7 @@ env_base.__class__.android_add_java_dir=methods.android_add_java_dir
env_base.__class__.android_add_res_dir=methods.android_add_res_dir
env_base.__class__.android_add_aidl_dir=methods.android_add_aidl_dir
env_base.__class__.android_add_jni_dir=methods.android_add_jni_dir
+env_base.__class__.android_add_default_config=methods.android_add_default_config
env_base.__class__.android_add_to_manifest = methods.android_add_to_manifest
env_base.__class__.android_add_to_permissions = methods.android_add_to_permissions
env_base.__class__.android_add_to_attributes = methods.android_add_to_attributes
diff --git a/core/bind/core_bind.cpp b/core/bind/core_bind.cpp
index ace7e7c7b7..6edc292b62 100644
--- a/core/bind/core_bind.cpp
+++ b/core/bind/core_bind.cpp
@@ -435,6 +435,18 @@ String _OS::get_locale() const {
return OS::get_singleton()->get_locale();
}
+String _OS::get_latin_keyboard_variant() const {
+ switch( OS::get_singleton()->get_latin_keyboard_variant() ) {
+ case OS::LATIN_KEYBOARD_QWERTY: return "QWERTY";
+ case OS::LATIN_KEYBOARD_QWERTZ: return "QWERTZ";
+ case OS::LATIN_KEYBOARD_AZERTY: return "AZERTY";
+ case OS::LATIN_KEYBOARD_QZERTY: return "QZERTY";
+ case OS::LATIN_KEYBOARD_DVORAK: return "DVORAK";
+ case OS::LATIN_KEYBOARD_NEO : return "NEO";
+ default: return "ERROR";
+ }
+}
+
String _OS::get_model_name() const {
return OS::get_singleton()->get_model_name();
@@ -1097,6 +1109,7 @@ void _OS::_bind_methods() {
ObjectTypeDB::bind_method(_MD("get_ticks_msec"),&_OS::get_ticks_msec);
ObjectTypeDB::bind_method(_MD("get_splash_tick_msec"),&_OS::get_splash_tick_msec);
ObjectTypeDB::bind_method(_MD("get_locale"),&_OS::get_locale);
+ ObjectTypeDB::bind_method(_MD("get_latin_keyboard_variant"),&_OS::get_latin_keyboard_variant);
ObjectTypeDB::bind_method(_MD("get_model_name"),&_OS::get_model_name);
ObjectTypeDB::bind_method(_MD("get_custom_level"),&_OS::get_custom_level);
diff --git a/core/bind/core_bind.h b/core/bind/core_bind.h
index 856d942d02..5bd427578a 100644
--- a/core/bind/core_bind.h
+++ b/core/bind/core_bind.h
@@ -192,6 +192,8 @@ public:
Vector<String> get_cmdline_args();
String get_locale() const;
+ String get_latin_keyboard_variant() const;
+
String get_model_name() const;
MainLoop *get_main_loop() const;
diff --git a/core/image_quantize.cpp b/core/image_quantize.cpp
index b8d4658fda..f6fe7a88a0 100644
--- a/core/image_quantize.cpp
+++ b/core/image_quantize.cpp
@@ -59,7 +59,6 @@ int Image::MCBlock::get_longest_axis_index() const {
for(int i=0;i<4;i++) {
int d = max_color.color.col[i]-min_color.color.col[i];
- //printf(" ai:%i - %i\n",i,d);
if (d>max_dist) {
max_index=i;
max_dist=d;
@@ -71,13 +70,11 @@ int Image::MCBlock::get_longest_axis_index() const {
int Image::MCBlock::get_longest_axis_length() const {
int max_dist=-1;
- int max_index=0;
for(int i=0;i<4;i++) {
int d = max_color.color.col[i]-min_color.color.col[i];
if (d>max_dist) {
- max_index=i;
max_dist=d;
}
}
@@ -117,8 +114,6 @@ void Image::MCBlock::shrink() {
void Image::quantize() {
- Image::Format orig_format=format;
-
bool has_alpha = detect_alpha()!=ALPHA_NONE;
bool quantize_fast=OS::get_singleton()->has_environment("QUANTIZE_FAST");
diff --git a/core/io/marshalls.cpp b/core/io/marshalls.cpp
index 60617e1237..c9bd38c654 100644
--- a/core/io/marshalls.cpp
+++ b/core/io/marshalls.cpp
@@ -685,7 +685,6 @@ Error decode_variant(Variant& r_variant,const uint8_t *p_buffer, int p_len,int *
if (count) {
varray.resize(count);
DVector<Vector2>::Write w = varray.write();
- const float *r = (const float*)buf;
for(int i=0;i<(int)count;i++) {
@@ -724,7 +723,6 @@ Error decode_variant(Variant& r_variant,const uint8_t *p_buffer, int p_len,int *
if (count) {
varray.resize(count);
DVector<Vector3>::Write w = varray.write();
- const float *r = (const float*)buf;
for(int i=0;i<(int)count;i++) {
@@ -764,7 +762,6 @@ Error decode_variant(Variant& r_variant,const uint8_t *p_buffer, int p_len,int *
if (count) {
carray.resize(count);
DVector<Color>::Write w = carray.write();
- const float *r = (const float*)buf;
for(int i=0;i<(int)count;i++) {
diff --git a/core/io/resource_format_xml.cpp b/core/io/resource_format_xml.cpp
index a42a922baf..0d545b16f5 100644
--- a/core/io/resource_format_xml.cpp
+++ b/core/io/resource_format_xml.cpp
@@ -1862,8 +1862,6 @@ void ResourceInteractiveLoaderXML::open(FileAccess *p_f) {
}
int major = version.get_slicec('.',0).to_int();
- int minor = version.get_slicec('.',1).to_int();
-
if (major>VERSION_MAJOR) {
error=ERR_FILE_UNRECOGNIZED;
diff --git a/core/io/resource_loader.cpp b/core/io/resource_loader.cpp
index 1bb80e74eb..f414f85df8 100644
--- a/core/io/resource_loader.cpp
+++ b/core/io/resource_loader.cpp
@@ -443,7 +443,6 @@ String ResourceLoader::get_resource_type(const String &p_path) {
String remapped_path = PathRemap::get_singleton()->get_remap(local_path);
String extension=remapped_path.extension();
- bool found=false;
for (int i=0;i<loader_count;i++) {
String result = loader[i]->get_resource_type(local_path);
diff --git a/core/io/translation_loader_po.cpp b/core/io/translation_loader_po.cpp
index 4ddb276a27..a22c57b941 100644
--- a/core/io/translation_loader_po.cpp
+++ b/core/io/translation_loader_po.cpp
@@ -47,7 +47,6 @@ RES TranslationLoaderPO::load_translation(FileAccess *f, Error *r_error, const S
String msg_id;
String msg_str;
String config;
- int msg_line=0;
if (r_error)
*r_error=ERR_FILE_CORRUPT;
@@ -97,7 +96,6 @@ RES TranslationLoaderPO::load_translation(FileAccess *f, Error *r_error, const S
status=STATUS_READING_ID;
msg_id="";
msg_str="";
- msg_line=line;
}
if (l.begins_with("msgstr")) {
@@ -111,7 +109,6 @@ RES TranslationLoaderPO::load_translation(FileAccess *f, Error *r_error, const S
l=l.substr(6,l.length()).strip_edges();
status=STATUS_READING_STRING;
- msg_line=line;
}
if (l=="" || l.begins_with("#")) {
diff --git a/core/math/triangle_mesh.cpp b/core/math/triangle_mesh.cpp
index adb9861092..7aea32a8a0 100644
--- a/core/math/triangle_mesh.cpp
+++ b/core/math/triangle_mesh.cpp
@@ -195,9 +195,6 @@ Vector3 TriangleMesh::get_area_normal(const AABB& p_aabb) const {
int n_count=0;
Vector3 n;
- //for(int i=0;i<max_depth;i++)
- // stack[i]=0;
-
int level=0;
DVector<Triangle>::Read trianglesr = triangles.read();
@@ -205,7 +202,6 @@ Vector3 TriangleMesh::get_area_normal(const AABB& p_aabb) const {
DVector<BVH>::Read bvhr=bvh.read();
const Triangle *triangleptr=trianglesr.ptr();
- const Vector3 *vertexptr=verticesr.ptr();
int pos=bvh.size()-1;
const BVH *bvhptr = bvhr.ptr();
@@ -301,14 +297,7 @@ bool TriangleMesh::intersect_segment(const Vector3& p_begin,const Vector3& p_end
real_t d=1e10;
bool inters=false;
- //for(int i=0;i<max_depth;i++)
- // stack[i]=0;
-
int level=0;
- //AABB ray_aabb;
- //ray_aabb.pos=p_begin;
- //ray_aabb.expand_to(p_end);
-
DVector<Triangle>::Read trianglesr = triangles.read();
DVector<Vector3>::Read verticesr=vertices.read();
@@ -431,9 +420,6 @@ bool TriangleMesh::intersect_ray(const Vector3& p_begin,const Vector3& p_dir,Vec
real_t d=1e20;
bool inters=false;
- //for(int i=0;i<max_depth;i++)
- // stack[i]=0;
-
int level=0;
DVector<Triangle>::Read trianglesr = triangles.read();
diff --git a/core/object.cpp b/core/object.cpp
index 99d4a1f46a..dc3d531927 100644
--- a/core/object.cpp
+++ b/core/object.cpp
@@ -1495,7 +1495,7 @@ void Object::disconnect(const StringName& p_signal, Object *p_to_object, const S
ERR_EXPLAIN("Disconnecting nonexistent signal '"+p_signal+"', slot: "+itos(target._id)+":"+target.method);
ERR_FAIL();
}
- int prev = p_to_object->connections.size();
+
p_to_object->connections.erase(s->slot_map[target].cE);
s->slot_map.erase(target);
diff --git a/core/os/input.cpp b/core/os/input.cpp
index dacddc0928..efbae57950 100644
--- a/core/os/input.cpp
+++ b/core/os/input.cpp
@@ -59,6 +59,7 @@ void Input::_bind_methods() {
ObjectTypeDB::bind_method(_MD("get_joy_axis","device","axis"),&Input::get_joy_axis);
ObjectTypeDB::bind_method(_MD("get_joy_name","device"),&Input::get_joy_name);
ObjectTypeDB::bind_method(_MD("get_joy_guid","device"),&Input::get_joy_guid);
+ ObjectTypeDB::bind_method(_MD("get_connected_joysticks"),&Input::get_connected_joysticks);
ObjectTypeDB::bind_method(_MD("get_joy_vibration_strength", "device"), &Input::get_joy_vibration_strength);
ObjectTypeDB::bind_method(_MD("get_joy_vibration_duration", "device"), &Input::get_joy_vibration_duration);
ObjectTypeDB::bind_method(_MD("start_joy_vibration", "device", "weak_magnitude", "strong_magnitude", "duration"), &Input::start_joy_vibration, DEFVAL(0));
diff --git a/core/os/input.h b/core/os/input.h
index fa2cef5467..d11703470b 100644
--- a/core/os/input.h
+++ b/core/os/input.h
@@ -62,6 +62,7 @@ public:
virtual float get_joy_axis(int p_device,int p_axis)=0;
virtual String get_joy_name(int p_idx)=0;
+ virtual Array get_connected_joysticks()=0;
virtual void joy_connection_changed(int p_idx, bool p_connected, String p_name, String p_guid)=0;
virtual void add_joy_mapping(String p_mapping, bool p_update_existing=false)=0;
virtual void remove_joy_mapping(String p_guid)=0;
diff --git a/core/path_db.cpp b/core/path_db.cpp
index 7545088978..0956c4cd3f 100644
--- a/core/path_db.cpp
+++ b/core/path_db.cpp
@@ -329,7 +329,6 @@ NodePath::NodePath(const String& p_path) {
Vector<StringName> subpath;
int absolute=(path[0]=='/')?1:0;;
- bool valid=false;
bool last_is_slash=true;
int slices=0;
int subpath_pos=path.find(":");
@@ -373,7 +372,6 @@ NodePath::NodePath(const String& p_path) {
if (last_is_slash)
slices++;
- valid=true;
last_is_slash=false;
}
}
diff --git a/core/pool_allocator.cpp b/core/pool_allocator.cpp
index 849fd75f50..9f5fcf5f50 100644
--- a/core/pool_allocator.cpp
+++ b/core/pool_allocator.cpp
@@ -372,7 +372,6 @@ Error PoolAllocator::resize(ID p_mem,int p_new_size) {
}
//p_new_size = align(p_new_size)
- int _total = pool_size; // - static_area_size;
int _free = free_mem; // - static_area_size;
if ((_free + aligned(e->len)) - alloc_size < 0) {
diff --git a/core/ustring.cpp b/core/ustring.cpp
index 3c22de35f1..6788ada1bb 100644
--- a/core/ustring.cpp
+++ b/core/ustring.cpp
@@ -3836,7 +3836,6 @@ String String::lpad(int min_length, const String& character) const {
String String::sprintf(const Array& values, bool* error) const {
String formatted;
CharType* self = (CharType*)c_str();
- int num_items = values.size();
bool in_format = false;
int value_index = 0;
int min_chars;
diff --git a/core/variant_call.cpp b/core/variant_call.cpp
index a5927bb6f8..7da4cef115 100644
--- a/core/variant_call.cpp
+++ b/core/variant_call.cpp
@@ -1667,10 +1667,10 @@ _VariantCall::addfunc(Variant::m_vtype,Variant::m_ret,_SCS(#m_method),VCALL(m_cl
ADDFUNC0(INPUT_EVENT,BOOL,InputEvent,is_pressed,varray());
ADDFUNC1(INPUT_EVENT,BOOL,InputEvent,is_action,STRING,"action",varray());
- ADDFUNC1(INPUT_EVENT,BOOL,InputEvent,is_action_pressed,STRING,"is_action_pressed",varray());
- ADDFUNC1(INPUT_EVENT,BOOL,InputEvent,is_action_released,STRING,"is_action_released",varray());
+ ADDFUNC1(INPUT_EVENT,BOOL,InputEvent,is_action_pressed,STRING,"action",varray());
+ ADDFUNC1(INPUT_EVENT,BOOL,InputEvent,is_action_released,STRING,"action",varray());
ADDFUNC0(INPUT_EVENT,BOOL,InputEvent,is_echo,varray());
- ADDFUNC2(INPUT_EVENT,NIL,InputEvent,set_as_action,STRING,"action",BOOL,"pressed",varray());
+ ADDFUNC2(INPUT_EVENT,NIL,InputEvent,set_as_action,STRING,"action",BOOL,"pressed",varray());
/* REGISTER CONSTRUCTORS */
@@ -1689,7 +1689,7 @@ _VariantCall::addfunc(Variant::m_vtype,Variant::m_ret,_SCS(#m_method),VCALL(m_cl
_VariantCall::add_constructor(_VariantCall::Plane_init3,Variant::PLANE,"normal",Variant::VECTOR3,"d",Variant::REAL);
_VariantCall::add_constructor(_VariantCall::Quat_init1,Variant::QUAT,"x",Variant::REAL,"y",Variant::REAL,"z",Variant::REAL,"w",Variant::REAL);
- _VariantCall::add_constructor(_VariantCall::Quat_init2,Variant::QUAT,"axis",Variant::VECTOR3,"angle",Variant::REAL);
+ _VariantCall::add_constructor(_VariantCall::Quat_init2,Variant::QUAT,"axis",Variant::VECTOR3,"angle",Variant::REAL);
_VariantCall::add_constructor(_VariantCall::Color_init1,Variant::COLOR,"r",Variant::REAL,"g",Variant::REAL,"b",Variant::REAL,"a",Variant::REAL);
_VariantCall::add_constructor(_VariantCall::Color_init2,Variant::COLOR,"r",Variant::REAL,"g",Variant::REAL,"b",Variant::REAL);
diff --git a/core/variant_op.cpp b/core/variant_op.cpp
index e549161de9..9182dcde1a 100644
--- a/core/variant_op.cpp
+++ b/core/variant_op.cpp
@@ -2911,6 +2911,14 @@ bool Variant::iter_init(Variant& r_iter,bool &valid) const {
return ret;
} break;
+ case STRING: {
+
+ const String *str=reinterpret_cast<const String*>(_data._mem);
+ if (str->empty())
+ return false;
+ r_iter = 0;
+ return true;
+ } break;
case DICTIONARY: {
const Dictionary *dic=reinterpret_cast<const Dictionary*>(_data._mem);
@@ -3028,6 +3036,17 @@ bool Variant::iter_next(Variant& r_iter,bool &valid) const {
return ret;
} break;
+
+ case STRING: {
+
+ const String *str=reinterpret_cast<const String*>(_data._mem);
+ int idx = r_iter;
+ idx++;
+ if (idx >= str->size())
+ return false;
+ r_iter = idx;
+ return true;
+ } break;
case DICTIONARY: {
const Dictionary *dic=reinterpret_cast<const Dictionary*>(_data._mem);
@@ -3158,6 +3177,11 @@ Variant Variant::iter_get(const Variant& r_iter,bool &r_valid) const {
return ret;
} break;
+ case STRING: {
+
+ const String *str=reinterpret_cast<const String*>(_data._mem);
+ return str->substr(r_iter,1);
+ } break;
case DICTIONARY: {
return r_iter; //iterator is the same as the key
diff --git a/doc/base/classes.xml b/doc/base/classes.xml
index b04d4cfe16..ae5438c430 100644
--- a/doc/base/classes.xml
+++ b/doc/base/classes.xml
@@ -2,10 +2,10 @@
<doc version="2.1.alpha.custom_build" name="Engine Types">
<class name="@GDScript" category="Core">
<brief_description>
- Built-in GDScript functions.
+ Built-in GDScript functions.
</brief_description>
<description>
- This contains the list of built-in gdscript functions. Mostly math functions and other utilities. Everything else is expanded by objects.
+ This contains the list of built-in gdscript functions. Mostly math functions and other utilities. Everything else is expanded by objects.
</description>
<methods>
<method name="Color8">
@@ -20,7 +20,7 @@
<argument index="3" name="a8" type="int">
</argument>
<description>
- Make a color from red, green, blue and alpha. Arguments can range from 0 to 255.
+ Make a color from red, green, blue and alpha. Arguments can range from 0 to 255.
</description>
</method>
<method name="abs">
@@ -29,7 +29,7 @@
<argument index="0" name="s" type="float">
</argument>
<description>
- Remove sign (works for integer and float).
+ Remove sign (works for integer and float).
</description>
</method>
<method name="acos">
@@ -38,7 +38,7 @@
<argument index="0" name="s" type="float">
</argument>
<description>
- Arc-cosine.
+ Arc-cosine.
</description>
</method>
<method name="asin">
@@ -47,7 +47,7 @@
<argument index="0" name="s" type="float">
</argument>
<description>
- Arc-sine.
+ Arc-sine.
</description>
</method>
<method name="assert">
@@ -56,7 +56,7 @@
<argument index="0" name="condition" type="bool">
</argument>
<description>
- Assert that the condition is true. If the condition is false, generates an error.
+ Assert that the condition is true. If the condition is false, generates an error.
</description>
</method>
<method name="atan">
@@ -65,7 +65,7 @@
<argument index="0" name="s" type="float">
</argument>
<description>
- Arc-tangent.
+ Arc-tangent.
</description>
</method>
<method name="atan2">
@@ -76,7 +76,7 @@
<argument index="1" name="y" type="float">
</argument>
<description>
- Arc-tangent that takes a 2D vector as argument, returns the full -pi to +pi range.
+ Arc-tangent that takes a 2D vector as argument, returns the full -pi to +pi range.
</description>
</method>
<method name="bytes2var">
@@ -85,7 +85,7 @@
<argument index="0" name="bytes" type="RawArray">
</argument>
<description>
- Decode a byte array back to a value.
+ Decode a byte array back to a value.
</description>
</method>
<method name="ceil">
@@ -94,7 +94,7 @@
<argument index="0" name="s" type="float">
</argument>
<description>
- Ceiling (rounds up to nearest integer).
+ Ceiling (rounds up to nearest integer).
</description>
</method>
<method name="clamp">
@@ -107,7 +107,7 @@
<argument index="2" name="max" type="float">
</argument>
<description>
- Clamp both values to a range.
+ Clamp both values to a range.
</description>
</method>
<method name="convert">
@@ -118,7 +118,7 @@
<argument index="1" name="type" type="int">
</argument>
<description>
- Convert from a type to another in the best way possible. The "type" parameter uses the enum TYPE_* in [@Global Scope].
+ Convert from a type to another in the best way possible. The "type" parameter uses the enum TYPE_* in [@Global Scope].
</description>
</method>
<method name="cos">
@@ -127,7 +127,7 @@
<argument index="0" name="s" type="float">
</argument>
<description>
- Standard cosine function.
+ Standard cosine function.
</description>
</method>
<method name="cosh">
@@ -136,7 +136,7 @@
<argument index="0" name="s" type="float">
</argument>
<description>
- Hyperbolic cosine.
+ Hyperbolic cosine.
</description>
</method>
<method name="db2linear">
@@ -145,7 +145,7 @@
<argument index="0" name="db" type="float">
</argument>
<description>
- Convert from decibels to linear energy (audio).
+ Convert from decibels to linear energy (audio).
</description>
</method>
<method name="decimals">
@@ -154,7 +154,7 @@
<argument index="0" name="step" type="float">
</argument>
<description>
- Return the amount of decimals in the floating point value.
+ Return the amount of decimals in the floating point value.
</description>
</method>
<method name="dectime">
@@ -167,7 +167,7 @@
<argument index="2" name="step" type="float">
</argument>
<description>
- Decreases time by a specified amount.
+ Decreases time by a specified amount.
</description>
</method>
<method name="deg2rad">
@@ -176,7 +176,7 @@
<argument index="0" name="deg" type="float">
</argument>
<description>
- Convert from degrees to radians.
+ Convert from degrees to radians.
</description>
</method>
<method name="dict2inst">
@@ -185,7 +185,7 @@
<argument index="0" name="dict" type="Dictionary">
</argument>
<description>
- Convert a previously converted instances to dictionary back into an instance. Useful for deserializing.
+ Convert a previously converted instances to dictionary back into an instance. Useful for deserializing.
</description>
</method>
<method name="ease">
@@ -196,7 +196,7 @@
<argument index="1" name="curve" type="float">
</argument>
<description>
- Easing function, based on exponent. 0 is constant, 1 is linear, 0 to 1 is ease-in, 1+ is ease out. Negative values are in-out/out in.
+ Easing function, based on exponent. 0 is constant, 1 is linear, 0 to 1 is ease-in, 1+ is ease out. Negative values are in-out/out in.
</description>
</method>
<method name="exp">
@@ -205,7 +205,7 @@
<argument index="0" name="s" type="float">
</argument>
<description>
- Exponential logarithm.
+ Exponential logarithm.
</description>
</method>
<method name="floor">
@@ -214,7 +214,7 @@
<argument index="0" name="s" type="float">
</argument>
<description>
- Floor (rounds down to nearest integer).
+ Floor (rounds down to nearest integer).
</description>
</method>
<method name="fmod">
@@ -225,7 +225,7 @@
<argument index="1" name="y" type="float">
</argument>
<description>
- Module (remainder of x/y).
+ Module (remainder of x/y).
</description>
</method>
<method name="fposmod">
@@ -236,7 +236,7 @@
<argument index="1" name="y" type="float">
</argument>
<description>
- Module (remainder of x/y) that wraps equally in positive and negative.
+ Module (remainder of x/y) that wraps equally in positive and negative.
</description>
</method>
<method name="funcref">
@@ -247,7 +247,7 @@
<argument index="1" name="funcname" type="String">
</argument>
<description>
- Return a reference to the specified function.
+ Return a reference to the specified function.
</description>
</method>
<method name="hash">
@@ -256,7 +256,7 @@
<argument index="0" name="var:Variant" type="Variant">
</argument>
<description>
- Hash the variable passed and return an integer.
+ Hash the variable passed and return an integer.
</description>
</method>
<method name="inst2dict">
@@ -265,7 +265,7 @@
<argument index="0" name="inst" type="Object">
</argument>
<description>
- Convert a script class instance to a dictionary (useful for serializing).
+ Convert a script class instance to a dictionary (useful for serializing).
</description>
</method>
<method name="instance_from_id">
@@ -274,7 +274,7 @@
<argument index="0" name="instance_id" type="int">
</argument>
<description>
- Get an object by its ID.
+ Get an object by its ID.
</description>
</method>
<method name="is_inf">
@@ -303,7 +303,7 @@
<argument index="2" name="weight" type="float">
</argument>
<description>
- Linear interpolates between two values by a normalized value.
+ Linear interpolates between two values by a normalized value.
</description>
</method>
<method name="linear2db">
@@ -312,7 +312,7 @@
<argument index="0" name="nrg" type="float">
</argument>
<description>
- Convert from linear energy to decibels (audio).
+ Convert from linear energy to decibels (audio).
</description>
</method>
<method name="load">
@@ -321,7 +321,7 @@
<argument index="0" name="path" type="String">
</argument>
<description>
- Load a resource from the filesystem, pass a valid path as argument.
+ Load a resource from the filesystem, pass a valid path as argument.
</description>
</method>
<method name="log">
@@ -330,7 +330,7 @@
<argument index="0" name="s" type="float">
</argument>
<description>
- Natural logarithm.
+ Natural logarithm.
</description>
</method>
<method name="max">
@@ -341,7 +341,7 @@
<argument index="1" name="b" type="float">
</argument>
<description>
- Return the maximum of two values.
+ Return the maximum of two values.
</description>
</method>
<method name="min">
@@ -352,7 +352,7 @@
<argument index="1" name="b" type="float">
</argument>
<description>
- Return the minimum of two values.
+ Return the minimum of two values.
</description>
</method>
<method name="nearest_po2">
@@ -361,7 +361,7 @@
<argument index="0" name="val" type="int">
</argument>
<description>
- Return the nearest larger power of 2 for an integer.
+ Return the nearest larger power of 2 for an integer.
</description>
</method>
<method name="pow">
@@ -372,7 +372,7 @@
<argument index="1" name="y" type="float">
</argument>
<description>
- Power function, x elevate to y.
+ Power function, x elevate to y.
</description>
</method>
<method name="preload">
@@ -381,7 +381,7 @@
<argument index="0" name="path" type="String">
</argument>
<description>
- Preload a resource from the filesystem. The resource is loaded during script parsing.
+ Preload a resource from the filesystem. The resource is loaded during script parsing.
</description>
</method>
<method name="print">
@@ -392,14 +392,14 @@
<argument index="1" name="..." type="Variant">
</argument>
<description>
- Print one or more arguments to strings in the best way possible to a console line.
+ Print one or more arguments to strings in the best way possible to a console line.
</description>
</method>
<method name="print_stack">
<return type="Nil">
</return>
<description>
- Print a stack track at code location, only works when running with debugger turned on.
+ Print a stack track at code location, only works when running with debugger turned on.
</description>
</method>
<method name="printerr">
@@ -410,7 +410,7 @@
<argument index="1" name="..." type="Variant">
</argument>
<description>
- Print one or more arguments to strings in the best way possible to standard error line.
+ Print one or more arguments to strings in the best way possible to standard error line.
</description>
</method>
<method name="printraw">
@@ -421,7 +421,7 @@
<argument index="1" name="..." type="Variant">
</argument>
<description>
- Print one or more arguments to strings in the best way possible to console. No newline is added at the end.
+ Print one or more arguments to strings in the best way possible to console. No newline is added at the end.
</description>
</method>
<method name="prints">
@@ -432,7 +432,7 @@
<argument index="1" name="..." type="Variant">
</argument>
<description>
- Print one or more arguments to the console with a space between each argument.
+ Print one or more arguments to the console with a space between each argument.
</description>
</method>
<method name="printt">
@@ -443,7 +443,7 @@
<argument index="1" name="..." type="Variant">
</argument>
<description>
- Print one or more arguments to the console with a tab between each argument.
+ Print one or more arguments to the console with a tab between each argument.
</description>
</method>
<method name="rad2deg">
@@ -452,7 +452,7 @@
<argument index="0" name="rad" type="float">
</argument>
<description>
- Convert from radians to degrees.
+ Convert from radians to degrees.
</description>
</method>
<method name="rand_range">
@@ -463,7 +463,7 @@
<argument index="1" name="to" type="float">
</argument>
<description>
- Random range, any floating point value between 'from' and 'to'
+ Random range, any floating point value between 'from' and 'to'
</description>
</method>
<method name="rand_seed">
@@ -472,28 +472,28 @@
<argument index="0" name="seed" type="int">
</argument>
<description>
- Random from seed, pass a seed and an array with both number and new seed is returned.
+ Random from seed, pass a seed and an array with both number and new seed is returned.
</description>
</method>
<method name="randf">
<return type="float">
</return>
<description>
- Random value (0 to 1 float).
+ Random value (0 to 1 float).
</description>
</method>
<method name="randi">
<return type="int">
</return>
<description>
- Random 32 bits value (integer). To obtain a value from 0 to N, you can use remainder, like (for random from 0 to 19): randi() % 20.
+ Random 32 bits value (integer). To obtain a value from 0 to N, you can use remainder, like (for random from 0 to 19): randi() % 20.
</description>
</method>
<method name="randomize">
<return type="Nil">
</return>
<description>
- Reset the seed of the random number generator with a new, different one.
+ Reset the seed of the random number generator with a new, different one.
</description>
</method>
<method name="range">
@@ -502,7 +502,7 @@
<argument index="0" name="..." type="Variant">
</argument>
<description>
- Return an array with the given range. Range can be 1 argument N (0 to N-1), two arguments (initial, final-1) or three arguments (initial, final-1, increment).
+ Return an array with the given range. Range can be 1 argument N (0 to N-1), two arguments (initial, final-1) or three arguments (initial, final-1, increment).
</description>
</method>
<method name="round">
@@ -511,7 +511,7 @@
<argument index="0" name="s" type="float">
</argument>
<description>
- Round to nearest integer.
+ Round to nearest integer.
</description>
</method>
<method name="seed">
@@ -520,7 +520,7 @@
<argument index="0" name="seed" type="int">
</argument>
<description>
- Set seed for the random number generator.
+ Set seed for the random number generator.
</description>
</method>
<method name="sign">
@@ -529,7 +529,7 @@
<argument index="0" name="s" type="float">
</argument>
<description>
- Return sign (-1 or +1).
+ Return sign (-1 or +1).
</description>
</method>
<method name="sin">
@@ -538,7 +538,7 @@
<argument index="0" name="s" type="float">
</argument>
<description>
- Standard sine function.
+ Standard sine function.
</description>
</method>
<method name="sinh">
@@ -547,7 +547,7 @@
<argument index="0" name="s" type="float">
</argument>
<description>
- Hyperbolic sine.
+ Hyperbolic sine.
</description>
</method>
<method name="sqrt">
@@ -556,7 +556,7 @@
<argument index="0" name="s" type="float">
</argument>
<description>
- Square root.
+ Square root.
</description>
</method>
<method name="stepify">
@@ -567,7 +567,7 @@
<argument index="1" name="step" type="float">
</argument>
<description>
- Snap float value to a given step.
+ Snap float value to a given step.
</description>
</method>
<method name="str">
@@ -578,7 +578,7 @@
<argument index="1" name="..." type="Variant">
</argument>
<description>
- Convert one or more arguments to strings in the best way possible.
+ Convert one or more arguments to strings in the best way possible.
</description>
</method>
<method name="str2var">
@@ -587,7 +587,7 @@
<argument index="0" name="string" type="String">
</argument>
<description>
- Convert a formatted string that was returned by [method var2str] to the original value.
+ Convert a formatted string that was returned by [method var2str] to the original value.
</description>
</method>
<method name="tan">
@@ -596,7 +596,7 @@
<argument index="0" name="s" type="float">
</argument>
<description>
- Standard tangent function.
+ Standard tangent function.
</description>
</method>
<method name="tanh">
@@ -605,7 +605,7 @@
<argument index="0" name="s" type="float">
</argument>
<description>
- Hyperbolic tangent.
+ Hyperbolic tangent.
</description>
</method>
<method name="type_exists">
@@ -622,7 +622,7 @@
<argument index="0" name="what" type="Variant">
</argument>
<description>
- Return the internal type of the given Variant object, using the TYPE_* enum in [@Global Scope].
+ Return the internal type of the given Variant object, using the TYPE_* enum in [@Global Scope].
</description>
</method>
<method name="var2bytes">
@@ -631,7 +631,7 @@
<argument index="0" name="var" type="Variant">
</argument>
<description>
- Encode a variable value to a byte array.
+ Encode a variable value to a byte array.
</description>
</method>
<method name="var2str">
@@ -640,7 +640,7 @@
<argument index="0" name="var" type="Variant">
</argument>
<description>
- Convert a value to a formatted string that can later be parsed using [method str2var].
+ Convert a value to a formatted string that can later be parsed using [method str2var].
</description>
</method>
<method name="weakref">
@@ -649,7 +649,7 @@
<argument index="0" name="obj" type="Object">
</argument>
<description>
- Return a weak reference to an object.
+ Return a weak reference to an object.
</description>
</method>
<method name="yield">
@@ -660,9 +660,8 @@
<argument index="1" name="signal" type="String">
</argument>
<description>
- Stop the function execution and return the current state. Call resume on the state to resume execution. This makes the state invalid.
- Returns anything that was passed to the resume function call.
- If passed an object and a signal, the execution is resumed when the object's signal is emmited.
+ Stop the function execution and return the current state. Call resume on the state to resume execution. This makes the state invalid.
+ Returns anything that was passed to the resume function call. If passed an object and a signal, the execution is resumed when the object's signal is emmited.
</description>
</method>
</methods>
@@ -674,11 +673,11 @@
</class>
<class name="@Global Scope" category="Core">
<brief_description>
- Global scope constants and variables.
+ Global scope constants and variables.
</brief_description>
<description>
- Global scope constants and variables. This is all that resides in the globals, constants regarding error codes, scancodes, property hints, etc. It's not much.
- Singletons are also documented here, since they can be accessed from anywhere.
+ Global scope constants and variables. This is all that resides in the globals, constants regarding error codes, scancodes, property hints, etc. It's not much.
+ Singletons are also documented here, since they can be accessed from anywhere.
</description>
<methods>
</methods>
@@ -1948,10 +1947,10 @@
</class>
<class name="AABB" category="Built-In Types">
<brief_description>
- Axis-Aligned Bounding Box.
+ Axis-Aligned Bounding Box.
</brief_description>
<description>
- AABB provides an 3D Axis-Aligned Bounding Box. It consists of a position, a size, and several utility functions. It is typically used for simple (fast) overlap tests.
+ AABB provides an 3D Axis-Aligned Bounding Box. It consists of a position, a size, and several utility functions. It is typically used for simple (fast) overlap tests.
</description>
<methods>
<method name="AABB">
@@ -1962,7 +1961,7 @@
<argument index="1" name="size" type="Vector3">
</argument>
<description>
- Optional constructor, accepts position and size.
+ Optional constructor, accepts position and size.
</description>
</method>
<method name="encloses">
@@ -1971,7 +1970,7 @@
<argument index="0" name="with" type="AABB">
</argument>
<description>
- Return true if this [AABB] completely encloses another one.
+ Return true if this [AABB] completely encloses another one.
</description>
</method>
<method name="expand">
@@ -1980,14 +1979,14 @@
<argument index="0" name="to_point" type="Vector3">
</argument>
<description>
- Return this [AABB] expanded to include a given point.
+ Return this [AABB] expanded to include a given point.
</description>
</method>
<method name="get_area">
<return type="float">
</return>
<description>
- Get the area of the [AABB].
+ Get the area of the [AABB].
</description>
</method>
<method name="get_endpoint">
@@ -1996,49 +1995,49 @@
<argument index="0" name="idx" type="int">
</argument>
<description>
- Get the position of the 8 endpoints of the [AABB] in space.
+ Get the position of the 8 endpoints of the [AABB] in space.
</description>
</method>
<method name="get_longest_axis">
<return type="Vector3">
</return>
<description>
- Return the normalized longest axis of the [AABB].
+ Return the normalized longest axis of the [AABB].
</description>
</method>
<method name="get_longest_axis_index">
<return type="int">
</return>
<description>
- Return the index of the longest axis of the [AABB] (according to [Vector3]::AXIS* enum).
+ Return the index of the longest axis of the [AABB] (according to [Vector3]::AXIS* enum).
</description>
</method>
<method name="get_longest_axis_size">
<return type="float">
</return>
<description>
- Return the scalar length of the longest axis of the [AABB].
+ Return the scalar length of the longest axis of the [AABB].
</description>
</method>
<method name="get_shortest_axis">
<return type="Vector3">
</return>
<description>
- Return the normalized shortest axis of the [AABB].
+ Return the normalized shortest axis of the [AABB].
</description>
</method>
<method name="get_shortest_axis_index">
<return type="int">
</return>
<description>
- Return the index of the shortest axis of the [AABB] (according to [Vector3]::AXIS* enum).
+ Return the index of the shortest axis of the [AABB] (according to [Vector3]::AXIS* enum).
</description>
</method>
<method name="get_shortest_axis_size">
<return type="float">
</return>
<description>
- Return the scalar length of the shortest axis of the [AABB].
+ Return the scalar length of the shortest axis of the [AABB].
</description>
</method>
<method name="get_support">
@@ -2047,7 +2046,7 @@
<argument index="0" name="dir" type="Vector3">
</argument>
<description>
- Return the support point in a given direction. This is useful for collision detection algorithms.
+ Return the support point in a given direction. This is useful for collision detection algorithms.
</description>
</method>
<method name="grow">
@@ -2056,21 +2055,21 @@
<argument index="0" name="by" type="float">
</argument>
<description>
- Return a copy of the [AABB] grown a given amount of units towards all the sides.
+ Return a copy of the [AABB] grown a given amount of units towards all the sides.
</description>
</method>
<method name="has_no_area">
<return type="bool">
</return>
<description>
- Return true if the [AABB] is flat or empty.
+ Return true if the [AABB] is flat or empty.
</description>
</method>
<method name="has_no_surface">
<return type="bool">
</return>
<description>
- Return true if the [AABB] is empty.
+ Return true if the [AABB] is empty.
</description>
</method>
<method name="has_point">
@@ -2079,7 +2078,7 @@
<argument index="0" name="point" type="Vector3">
</argument>
<description>
- Return true if the [AABB] contains a point.
+ Return true if the [AABB] contains a point.
</description>
</method>
<method name="intersection">
@@ -2088,7 +2087,7 @@
<argument index="0" name="with" type="AABB">
</argument>
<description>
- Return the intersection between two [AABB]. An empty AABB (size 0,0,0) is returned on failure.
+ Return the intersection between two [AABB]. An empty AABB (size 0,0,0) is returned on failure.
</description>
</method>
<method name="intersects">
@@ -2097,7 +2096,7 @@
<argument index="0" name="with" type="AABB">
</argument>
<description>
- Return true if the [AABB] overlaps with another.
+ Return true if the [AABB] overlaps with another.
</description>
</method>
<method name="intersects_plane">
@@ -2106,7 +2105,7 @@
<argument index="0" name="plane" type="Plane">
</argument>
<description>
- Return true if the [AABB] is at both sides of a plane.
+ Return true if the [AABB] is at both sides of a plane.
</description>
</method>
<method name="intersects_segment">
@@ -2117,7 +2116,7 @@
<argument index="1" name="to" type="Vector3">
</argument>
<description>
- Return true if the [AABB] intersects the line segment between from and to
+ Return true if the [AABB] intersects the line segment between from and to
</description>
</method>
<method name="merge">
@@ -2126,7 +2125,7 @@
<argument index="0" name="with" type="AABB">
</argument>
<description>
- Combine this [AABB] with another, a larger one is returned that contains both.
+ Combine this [AABB] with another, a larger one is returned that contains both.
</description>
</method>
</methods>
@@ -2146,10 +2145,10 @@
</class>
<class name="AcceptDialog" inherits="WindowDialog" category="Core">
<brief_description>
- Base dialog for user notification.
+ Base dialog for user notification.
</brief_description>
<description>
- This dialog is useful for small notifications to the user about an event. It can only be accepted or closed, with the same result.
+ This dialog is useful for small notifications to the user about an event. It can only be accepted or closed, with the same result.
</description>
<methods>
<method name="add_button">
@@ -2162,8 +2161,8 @@
<argument index="2" name="action" type="String" default="&quot;&quot;">
</argument>
<description>
- Add custom button to the dialog and return the created button.
- The button titled with [i]text[/i] and the [i]action[/i] will be passed to [custom_action] signal when it is pressed.
+ Add custom button to the dialog and return the created button.
+ The button titled with [i]text[/i] and the [i]action[/i] will be passed to [custom_action] signal when it is pressed.
</description>
</method>
<method name="add_cancel">
@@ -2172,35 +2171,35 @@
<argument index="0" name="name" type="String">
</argument>
<description>
- Add custom cancel button to the dialog and return the created button.
+ Add custom cancel button to the dialog and return the created button.
</description>
</method>
<method name="get_hide_on_ok" qualifiers="const">
<return type="bool">
</return>
<description>
- Return true if the dialog will be hidden when accepted (default true).
+ Return true if the dialog will be hidden when accepted (default true).
</description>
</method>
<method name="get_label">
<return type="Object">
</return>
<description>
- Return the label used for built-in text.
+ Return the label used for built-in text.
</description>
</method>
<method name="get_ok">
<return type="Object">
</return>
<description>
- Return the OK Button.
+ Return the OK Button.
</description>
</method>
<method name="get_text" qualifiers="const">
<return type="String">
</return>
<description>
- Return the built-in label text.
+ Return the built-in label text.
</description>
</method>
<method name="register_text_enter">
@@ -2209,35 +2208,35 @@
<argument index="0" name="line_edit" type="Object">
</argument>
<description>
- Register a [LineEdit] in the dialog. When the enter key is pressed, the dialog will be accepted.
+ Register a [LineEdit] in the dialog. When the enter key is pressed, the dialog will be accepted.
</description>
</method>
<method name="set_hide_on_ok">
<argument index="0" name="enabled" type="bool">
</argument>
<description>
- Set whether the dialog is hidden when accepted (default true).
+ Set whether the dialog is hidden when accepted (default true).
</description>
</method>
<method name="set_text">
<argument index="0" name="text" type="String">
</argument>
<description>
- Set the built-in label text.
+ Set the built-in label text.
</description>
</method>
</methods>
<signals>
<signal name="confirmed">
<description>
- Emitted when accepted.
+ Emitted when accepted.
</description>
</signal>
<signal name="custom_action">
<argument index="0" name="action" type="String">
</argument>
<description>
- Emitted with a custom button is added.
+ Emitted with a custom button is added.
</description>
</signal>
</signals>
@@ -2246,10 +2245,10 @@
</class>
<class name="AnimatedSprite" inherits="Node2D" category="Core">
<brief_description>
- Sprite node that can use multiple textures for animation.
+ Sprite node that can use multiple textures for animation.
</brief_description>
<description>
- Sprite node that can use multiple textures for animation.
+ Sprite node that can use multiple textures for animation.
</description>
<methods>
<method name="get_animation" qualifiers="const">
@@ -2262,49 +2261,49 @@
<return type="int">
</return>
<description>
- Return the visible frame index.
+ Return the visible frame index.
</description>
</method>
<method name="get_modulate" qualifiers="const">
<return type="Color">
</return>
<description>
- Return the color modulation for this sprite.
+ Return the color modulation for this sprite.
</description>
</method>
<method name="get_offset" qualifiers="const">
<return type="Vector2">
</return>
<description>
- Return the offset of the sprite in the node origin.
+ Return the offset of the sprite in the node origin.
</description>
</method>
<method name="get_sprite_frames" qualifiers="const">
<return type="SpriteFrames">
</return>
<description>
- Get the [SpriteFrames] resource, which contains all frames.
+ Get the [SpriteFrames] resource, which contains all frames.
</description>
</method>
<method name="is_centered" qualifiers="const">
<return type="bool">
</return>
<description>
- Return true when centered. See [method set_centered].
+ Return true when centered. See [method set_centered].
</description>
</method>
<method name="is_flipped_h" qualifiers="const">
<return type="bool">
</return>
<description>
- Return true if sprite is flipped horizontally.
+ Return true if sprite is flipped horizontally.
</description>
</method>
<method name="is_flipped_v" qualifiers="const">
<return type="bool">
</return>
<description>
- Return true if sprite is flipped vertically.
+ Return true if sprite is flipped vertically.
</description>
</method>
<method name="is_playing" qualifiers="const">
@@ -2329,49 +2328,49 @@
<argument index="0" name="centered" type="bool">
</argument>
<description>
- When turned on, offset at (0,0) is the center of the sprite, when off, the top-left corner is.
+ When turned on, offset at (0,0) is the center of the sprite, when off, the top-left corner is.
</description>
</method>
<method name="set_flip_h">
<argument index="0" name="flip_h" type="bool">
</argument>
<description>
- If true, sprite is flipped horizontally.
+ If true, sprite is flipped horizontally.
</description>
</method>
<method name="set_flip_v">
<argument index="0" name="flip_v" type="bool">
</argument>
<description>
- If true, sprite is flipped vertically.
+ If true, sprite is flipped vertically.
</description>
</method>
<method name="set_frame">
<argument index="0" name="frame" type="int">
</argument>
<description>
- Set the visible sprite frame index (from the list of frames inside the [SpriteFrames] resource).
+ Set the visible sprite frame index (from the list of frames inside the [SpriteFrames] resource).
</description>
</method>
<method name="set_modulate">
<argument index="0" name="modulate" type="Color">
</argument>
<description>
- Change the color modulation (multiplication) for this sprite.
+ Change the color modulation (multiplication) for this sprite.
</description>
</method>
<method name="set_offset">
<argument index="0" name="offset" type="Vector2">
</argument>
<description>
- Set the offset of the sprite in the node origin. Position varies depending on whether it is centered or not.
+ Set the offset of the sprite in the node origin. Position varies depending on whether it is centered or not.
</description>
</method>
<method name="set_sprite_frames">
<argument index="0" name="sprite_frames" type="SpriteFrames">
</argument>
<description>
- Set the [SpriteFrames] resource, which contains all frames.
+ Set the [SpriteFrames] resource, which contains all frames.
</description>
</method>
<method name="stop">
@@ -2382,7 +2381,7 @@
<signals>
<signal name="frame_changed">
<description>
- Emmited when frame is changed.
+ Emmited when frame is changed.
</description>
</signal>
</signals>
@@ -2459,11 +2458,11 @@
</class>
<class name="Animation" inherits="Resource" category="Core">
<brief_description>
- Contains data used to animate everything in the engine.
+ Contains data used to animate everything in the engine.
</brief_description>
<description>
- An Animation resource contains data used to animate everything in the engine. Animations are divided into tracks, and each track must be linked to a node. The state of that node can be changed through time, by adding timed keys (events) to the track.
- Animations are just data containers, and must be added to odes such as an [AnimationPlayer] or [AnimationTreePlayer] to be played back.
+ An Animation resource contains data used to animate everything in the engine. Animations are divided into tracks, and each track must be linked to a node. The state of that node can be changed through time, by adding timed keys (events) to the track.
+ Animations are just data containers, and must be added to odes such as an [AnimationPlayer] or [AnimationTreePlayer] to be played back.
</description>
<methods>
<method name="add_track">
@@ -2474,12 +2473,12 @@
<argument index="1" name="at_pos" type="int" default="-1">
</argument>
<description>
- Add a track to the Animation. The track type must be specified as any of the values in the TYPE_* enumeration.
+ Add a track to the Animation. The track type must be specified as any of the values in the TYPE_* enumeration.
</description>
</method>
<method name="clear">
<description>
- Clear the animation (clear all tracks and reset all).
+ Clear the animation (clear all tracks and reset all).
</description>
</method>
<method name="find_track" qualifiers="const">
@@ -2494,7 +2493,7 @@
<return type="float">
</return>
<description>
- Return the total length of the animation (in seconds).
+ Return the total length of the animation (in seconds).
</description>
</method>
<method name="get_step" qualifiers="const">
@@ -2507,14 +2506,14 @@
<return type="int">
</return>
<description>
- Return the amount of tracks in the animation.
+ Return the amount of tracks in the animation.
</description>
</method>
<method name="has_loop" qualifiers="const">
<return type="bool">
</return>
<description>
- Return whether the animation has the loop flag set.
+ Return whether the animation has the loop flag set.
</description>
</method>
<method name="method_track_get_key_indices" qualifiers="const">
@@ -2527,7 +2526,7 @@
<argument index="2" name="delta" type="float">
</argument>
<description>
- Return all the key indices of a method track, given a position and delta time.
+ Return all the key indices of a method track, given a position and delta time.
</description>
</method>
<method name="method_track_get_name" qualifiers="const">
@@ -2538,7 +2537,7 @@
<argument index="1" name="key_idx" type="int">
</argument>
<description>
- Return the method name of a method track.
+ Return the method name of a method track.
</description>
</method>
<method name="method_track_get_params" qualifiers="const">
@@ -2549,28 +2548,28 @@
<argument index="1" name="key_idx" type="int">
</argument>
<description>
- Return the arguments values to be called on a method track for a given key in a given track.
+ Return the arguments values to be called on a method track for a given key in a given track.
</description>
</method>
<method name="remove_track">
<argument index="0" name="idx" type="int">
</argument>
<description>
- Remove a track by specifying the track index.
+ Remove a track by specifying the track index.
</description>
</method>
<method name="set_length">
<argument index="0" name="time_sec" type="float">
</argument>
<description>
- Set the total length of the animation (in seconds). Note that length is not delimited by the last key, as this one may be before or after the end to ensure correct interpolation and looping.
+ Set the total length of the animation (in seconds). Note that length is not delimited by the last key, as this one may be before or after the end to ensure correct interpolation and looping.
</description>
</method>
<method name="set_loop">
<argument index="0" name="enabled" type="bool">
</argument>
<description>
- Set a flag indicating that the animation must loop. This is uses for correct interpolation of animation cycles, and for hinting the player that it must restart the animation.
+ Set a flag indicating that the animation must loop. This is uses for correct interpolation of animation cycles, and for hinting the player that it must restart the animation.
</description>
</method>
<method name="set_step">
@@ -2589,7 +2588,7 @@
<argument index="2" name="exact" type="bool" default="false">
</argument>
<description>
- Find the key index by time in a given track. Optionally, only find it if the exact time is given.
+ Find the key index by time in a given track. Optionally, only find it if the exact time is given.
</description>
</method>
<method name="track_get_interpolation_type" qualifiers="const">
@@ -2598,7 +2597,7 @@
<argument index="0" name="idx" type="int">
</argument>
<description>
- Return the interpolation type of a given track, from the INTERPOLATION_* enum.
+ Return the interpolation type of a given track, from the INTERPOLATION_* enum.
</description>
</method>
<method name="track_get_key_count" qualifiers="const">
@@ -2607,7 +2606,7 @@
<argument index="0" name="idx" type="int">
</argument>
<description>
- Return the amount of keys in a given track.
+ Return the amount of keys in a given track.
</description>
</method>
<method name="track_get_key_time" qualifiers="const">
@@ -2618,7 +2617,7 @@
<argument index="1" name="key_idx" type="int">
</argument>
<description>
- Return the time at which the key is located.
+ Return the time at which the key is located.
</description>
</method>
<method name="track_get_key_transition" qualifiers="const">
@@ -2629,7 +2628,7 @@
<argument index="1" name="key_idx" type="int">
</argument>
<description>
- Return the transition curve (easing) for a specific key (see built-in math function "ease").
+ Return the transition curve (easing) for a specific key (see built-in math function "ease").
</description>
</method>
<method name="track_get_key_value" qualifiers="const">
@@ -2638,7 +2637,7 @@
<argument index="1" name="key_idx" type="int">
</argument>
<description>
- Return the value of a given key in a given track.
+ Return the value of a given key in a given track.
</description>
</method>
<method name="track_get_path" qualifiers="const">
@@ -2647,7 +2646,7 @@
<argument index="0" name="idx" type="int">
</argument>
<description>
- Get the path of a track. for more information on the path format, see [method track_set_path]
+ Get the path of a track. for more information on the path format, see [method track_set_path]
</description>
</method>
<method name="track_get_type" qualifiers="const">
@@ -2656,7 +2655,7 @@
<argument index="0" name="idx" type="int">
</argument>
<description>
- Get the type of a track.
+ Get the type of a track.
</description>
</method>
<method name="track_insert_key">
@@ -2669,7 +2668,7 @@
<argument index="3" name="transition" type="float" default="1">
</argument>
<description>
- Insert a generic key in a given track.
+ Insert a generic key in a given track.
</description>
</method>
<method name="track_is_imported" qualifiers="const">
@@ -2684,14 +2683,14 @@
<argument index="0" name="idx" type="int">
</argument>
<description>
- Move a track down.
+ Move a track down.
</description>
</method>
<method name="track_move_up">
<argument index="0" name="idx" type="int">
</argument>
<description>
- Move a track up.
+ Move a track up.
</description>
</method>
<method name="track_remove_key">
@@ -2700,7 +2699,7 @@
<argument index="1" name="key_idx" type="int">
</argument>
<description>
- Remove a key by index in a given track.
+ Remove a key by index in a given track.
</description>
</method>
<method name="track_remove_key_at_pos">
@@ -2709,7 +2708,7 @@
<argument index="1" name="pos" type="float">
</argument>
<description>
- Remove a key by position (seconds) in a given track.
+ Remove a key by position (seconds) in a given track.
</description>
</method>
<method name="track_set_imported">
@@ -2726,7 +2725,7 @@
<argument index="1" name="interpolation" type="int">
</argument>
<description>
- Set the interpolation type of a given track, from the INTERPOLATION_* enum.
+ Set the interpolation type of a given track, from the INTERPOLATION_* enum.
</description>
</method>
<method name="track_set_key_transition">
@@ -2737,7 +2736,7 @@
<argument index="2" name="transition" type="float">
</argument>
<description>
- Set the transition curve (easing) for a specific key (see built-in math function "ease").
+ Set the transition curve (easing) for a specific key (see built-in math function "ease").
</description>
</method>
<method name="track_set_key_value">
@@ -2748,7 +2747,7 @@
<argument index="2" name="value" type="Variant">
</argument>
<description>
- Set the value of an existing key.
+ Set the value of an existing key.
</description>
</method>
<method name="track_set_path">
@@ -2757,7 +2756,7 @@
<argument index="1" name="path" type="NodePath">
</argument>
<description>
- Set the path of a track. Paths must be valid scene-tree paths to a node, and must be specified starting from the parent node of the node that will reproduce the animation. Tracks that control properties or bones must append their name after the path, separated by ":". Example: "character/skeleton:ankle" or "character/mesh:transform/local"
+ Set the path of a track. Paths must be valid scene-tree paths to a node, and must be specified starting from the parent node of the node that will reproduce the animation. Tracks that control properties or bones must append their name after the path, separated by ":". Example: "character/skeleton:ankle" or "character/mesh:transform/local"
</description>
</method>
<method name="transform_track_insert_key">
@@ -2774,7 +2773,7 @@
<argument index="4" name="scale" type="Vector3">
</argument>
<description>
- Insert a transform key for a transform track.
+ Insert a transform key for a transform track.
</description>
</method>
<method name="transform_track_interpolate" qualifiers="const">
@@ -2785,7 +2784,7 @@
<argument index="1" name="time_sec" type="float">
</argument>
<description>
- Return the interpolated value of a transform track at a given time (in seconds). An array consisting of 3 elements: position ([Vector3]), rotation ([Quat]) and scale ([Vector3]).
+ Return the interpolated value of a transform track at a given time (in seconds). An array consisting of 3 elements: position ([Vector3]), rotation ([Quat]) and scale ([Vector3]).
</description>
</method>
<method name="value_track_get_key_indices" qualifiers="const">
@@ -2798,7 +2797,7 @@
<argument index="2" name="delta" type="float">
</argument>
<description>
- Return all the key indices of a value track, given a position and delta time.
+ Return all the key indices of a value track, given a position and delta time.
</description>
</method>
<method name="value_track_get_update_mode" qualifiers="const">
@@ -2847,10 +2846,10 @@
</class>
<class name="AnimationPlayer" inherits="Node" category="Core">
<brief_description>
- Container and player of [Animation] resources.
+ Container and player of [Animation] resources.
</brief_description>
<description>
- An animation player is used for general purpose playback of [Animation] resources. It contains a dictionary of animations (referenced by name) and custom blend times between their transitions. Additionally, animations can be played and blended in different channels.
+ An animation player is used for general purpose playback of [Animation] resources. It contains a dictionary of animations (referenced by name) and custom blend times between their transitions. Additionally, animations can be played and blended in different channels.
</description>
<methods>
<method name="add_animation">
@@ -2861,14 +2860,14 @@
<argument index="1" name="animation" type="Animation">
</argument>
<description>
- Add an animation resource to the player, which will be later referenced by the "name" argument.
+ Add an animation resource to the player, which will be later referenced by the "name" argument.
</description>
</method>
<method name="advance">
<argument index="0" name="delta" type="float">
</argument>
<description>
- Used to skip ahead or skip back in an animation. Delta is the time in seconds to skip.
+ Used to skip ahead or skip back in an animation. Delta is the time in seconds to skip.
</description>
</method>
<method name="animation_get_next" qualifiers="const">
@@ -2889,12 +2888,12 @@
</method>
<method name="clear_caches">
<description>
- The animation player creates caches for faster access to the nodes it will animate. However, if a specific node is removed, it may not notice it, so clear_caches will force the player to search for the nodes again.
+ The animation player creates caches for faster access to the nodes it will animate. However, if a specific node is removed, it may not notice it, so clear_caches will force the player to search for the nodes again.
</description>
</method>
<method name="clear_queue">
<description>
- If animations are queued to play, clear them.
+ If animations are queued to play, clear them.
</description>
</method>
<method name="find_animation" qualifiers="const">
@@ -2903,7 +2902,7 @@
<argument index="0" name="animation" type="Animation">
</argument>
<description>
- Find an animation name by resource.
+ Find an animation name by resource.
</description>
</method>
<method name="get_animation" qualifiers="const">
@@ -2912,28 +2911,28 @@
<argument index="0" name="name" type="String">
</argument>
<description>
- Get an [Animation] resource by requesting a name.
+ Get an [Animation] resource by requesting a name.
</description>
</method>
<method name="get_animation_list" qualifiers="const">
<return type="StringArray">
</return>
<description>
- Get the list of names of the animations stored in the player.
+ Get the list of names of the animations stored in the player.
</description>
</method>
<method name="get_animation_process_mode" qualifiers="const">
<return type="int">
</return>
<description>
- Return the mode in which the animation player processes. See [method set_animation_process_mode].
+ Return the mode in which the animation player processes. See [method set_animation_process_mode].
</description>
</method>
<method name="get_autoplay" qualifiers="const">
<return type="String">
</return>
<description>
- Return the name of the animation that will be automatically played when the scene is loaded.
+ Return the name of the animation that will be automatically played when the scene is loaded.
</description>
</method>
<method name="get_blend_time" qualifiers="const">
@@ -2944,56 +2943,56 @@
<argument index="1" name="anim_to" type="String">
</argument>
<description>
- Get the blend time between two animations, referenced by their names.
+ Get the blend time between two animations, referenced by their names.
</description>
</method>
<method name="get_current_animation" qualifiers="const">
<return type="String">
</return>
<description>
- Return the name of the animation being played.
+ Return the name of the animation being played.
</description>
</method>
<method name="get_current_animation_length" qualifiers="const">
<return type="float">
</return>
<description>
- Get the length (in seconds) of the currently being played animation.
+ Get the length (in seconds) of the currently being played animation.
</description>
</method>
<method name="get_current_animation_pos" qualifiers="const">
<return type="float">
</return>
<description>
- Get the position (in seconds) of the currently being played animation.
+ Get the position (in seconds) of the currently being played animation.
</description>
</method>
<method name="get_default_blend_time" qualifiers="const">
<return type="float">
</return>
<description>
- Return the default blend time between animations.
+ Return the default blend time between animations.
</description>
</method>
<method name="get_pos" qualifiers="const">
<return type="float">
</return>
<description>
- Return the playback position (in seconds) in an animation channel (or channel 0 if none is provided).
+ Return the playback position (in seconds) in an animation channel (or channel 0 if none is provided).
</description>
</method>
<method name="get_root" qualifiers="const">
<return type="NodePath">
</return>
<description>
- Return path to root node (see [method set_root]).
+ Return path to root node (see [method set_root]).
</description>
</method>
<method name="get_speed" qualifiers="const">
<return type="float">
</return>
<description>
- Get the speed scaling ratio in a given animation channel (or channel 0 if none is provided). Default ratio is [i]1[/i] (no scaling).
+ Get the speed scaling ratio in a given animation channel (or channel 0 if none is provided). Default ratio is [i]1[/i] (no scaling).
</description>
</method>
<method name="has_animation" qualifiers="const">
@@ -3002,21 +3001,21 @@
<argument index="0" name="name" type="String">
</argument>
<description>
- Request whether an [Animation] name exist within the player.
+ Request whether an [Animation] name exist within the player.
</description>
</method>
<method name="is_active" qualifiers="const">
<return type="bool">
</return>
<description>
- Return true if the player is active.
+ Return true if the player is active.
</description>
</method>
<method name="is_playing" qualifiers="const">
<return type="bool">
</return>
<description>
- Return whether an animation is playing.
+ Return whether an animation is playing.
</description>
</method>
<method name="play">
@@ -3029,7 +3028,7 @@
<argument index="3" name="from_end" type="bool" default="false">
</argument>
<description>
- Play a given animation by the animation name. Custom speed and blend times can be set. If custom speed is negative (-1), 'from_end' being true can play the animation backwards.
+ Play a given animation by the animation name. Custom speed and blend times can be set. If custom speed is negative (-1), 'from_end' being true can play the animation backwards.
</description>
</method>
<method name="play_backwards">
@@ -3038,21 +3037,21 @@
<argument index="1" name="custom_blend" type="float" default="-1">
</argument>
<description>
- Play a given animation by the animation name in reverse.
+ Play a given animation by the animation name in reverse.
</description>
</method>
<method name="queue">
<argument index="0" name="name" type="String">
</argument>
<description>
- Queue an animation for playback once the current one is done.
+ Queue an animation for playback once the current one is done.
</description>
</method>
<method name="remove_animation">
<argument index="0" name="name" type="String">
</argument>
<description>
- Remove an animation from the player (by supplying the same name used to add it).
+ Remove an animation from the player (by supplying the same name used to add it).
</description>
</method>
<method name="rename_animation">
@@ -3061,7 +3060,7 @@
<argument index="1" name="newname" type="String">
</argument>
<description>
- Rename an existing animation.
+ Rename an existing animation.
</description>
</method>
<method name="seek">
@@ -3070,29 +3069,28 @@
<argument index="1" name="update" type="bool" default="false">
</argument>
<description>
- Seek the animation to a given position in time (in seconds). If 'update' is true, the animation will be updated too, otherwise it will be updated at process time.
+ Seek the animation to a given position in time (in seconds). If 'update' is true, the animation will be updated too, otherwise it will be updated at process time.
</description>
</method>
<method name="set_active">
<argument index="0" name="active" type="bool">
</argument>
<description>
- Set the player as active (playing). If false, it
- will do nothing.
+ Set the player as active (playing). If false, it will do nothing.
</description>
</method>
<method name="set_animation_process_mode">
<argument index="0" name="mode" type="int">
</argument>
<description>
- Set the mode in which the animation player processes. By default, it processes on idle time (framerate dependent), but using fixed time works well for animating static collision bodies in 2D and 3D. See enum ANIMATION_PROCESS_*.
+ Set the mode in which the animation player processes. By default, it processes on idle time (framerate dependent), but using fixed time works well for animating static collision bodies in 2D and 3D. See enum ANIMATION_PROCESS_*.
</description>
</method>
<method name="set_autoplay">
<argument index="0" name="name" type="String">
</argument>
<description>
- Set the name of the animation that will be automatically played when the scene is loaded.
+ Set the name of the animation that will be automatically played when the scene is loaded.
</description>
</method>
<method name="set_blend_time">
@@ -3103,47 +3101,47 @@
<argument index="2" name="sec" type="float">
</argument>
<description>
- Specify a blend time (in seconds) between two animations, referenced by their names.
+ Specify a blend time (in seconds) between two animations, referenced by their names.
</description>
</method>
<method name="set_current_animation">
<argument index="0" name="anim" type="String">
</argument>
<description>
- Set the current animation (even if no playback occurs). Using set_current_animation() and set_active() are similar to calling play().
+ Set the current animation (even if no playback occurs). Using set_current_animation() and set_active() are similar to calling play().
</description>
</method>
<method name="set_default_blend_time">
<argument index="0" name="sec" type="float">
</argument>
<description>
- Set the default blend time between animations.
+ Set the default blend time between animations.
</description>
</method>
<method name="set_root">
<argument index="0" name="path" type="NodePath">
</argument>
<description>
- AnimationPlayer resolves animation track paths from this node (which is relative to itself), by default root is "..", but it can be changed.
+ AnimationPlayer resolves animation track paths from this node (which is relative to itself), by default root is "..", but it can be changed.
</description>
</method>
<method name="set_speed">
<argument index="0" name="speed" type="float">
</argument>
<description>
- Set a speed scaling ratio in a given animation channel (or channel 0 if none is provided). Default ratio is [i]1[/i] (no scaling).
+ Set a speed scaling ratio in a given animation channel (or channel 0 if none is provided). Default ratio is [i]1[/i] (no scaling).
</description>
</method>
<method name="stop">
<argument index="0" name="reset" type="bool" default="true">
</argument>
<description>
- Stop the currently playing animation.
+ Stop the currently playing animation.
</description>
</method>
<method name="stop_all">
<description>
- Stop playback of animations (deprecated).
+ Stop playback of animations (deprecated).
</description>
</method>
</methods>
@@ -3154,19 +3152,19 @@
<argument index="1" name="new_name" type="String">
</argument>
<description>
- If the currently being played animation changes, this signal will notify of such change.
+ If the currently being played animation changes, this signal will notify of such change.
</description>
</signal>
<signal name="animation_started">
<argument index="0" name="name" type="String">
</argument>
<description>
- Notifies when an animation starts playing.
+ Notifies when an animation starts playing.
</description>
</signal>
<signal name="finished">
<description>
- Notifies when an animation finished playing.
+ Notifies when an animation finished playing.
</description>
</signal>
</signals>
@@ -3181,10 +3179,10 @@
</class>
<class name="AnimationTreePlayer" inherits="Node" category="Core">
<brief_description>
- Animation Player that uses a node graph for the blending.
+ Animation Player that uses a node graph for the blending.
</brief_description>
<description>
- Animation Player that uses a node graph for the blending. This kind of player is very useful when animating character or other skeleton based rigs, because it can combine several animations to form a desired pose.
+ Animation Player that uses a node graph for the blending. This kind of player is very useful when animating character or other skeleton based rigs, because it can combine several animations to form a desired pose.
</description>
<methods>
<method name="add_node">
@@ -3193,7 +3191,7 @@
<argument index="1" name="id" type="String">
</argument>
<description>
- Add a node of a given type in the graph with given id.
+ Add a node of a given type in the graph with given id.
</description>
</method>
<method name="advance">
@@ -3224,7 +3222,7 @@
<argument index="1" name="animation" type="Animation">
</argument>
<description>
- Set the animation for an animation node.
+ Set the animation for an animation node.
</description>
</method>
<method name="animation_node_set_filter_path">
@@ -3387,7 +3385,7 @@
<argument index="0" name="node" type="String">
</argument>
<description>
- Check if a node exists (by name).
+ Check if a node exists (by name).
</description>
</method>
<method name="node_get_input_count" qualifiers="const">
@@ -3396,7 +3394,7 @@
<argument index="0" name="id" type="String">
</argument>
<description>
- Return the input count for a given node. Different types of nodes have different amount of inputs.
+ Return the input count for a given node. Different types of nodes have different amount of inputs.
</description>
</method>
<method name="node_get_input_source" qualifiers="const">
@@ -3407,7 +3405,7 @@
<argument index="1" name="idx" type="int">
</argument>
<description>
- Return the input source for a given node input.
+ Return the input source for a given node input.
</description>
</method>
<method name="node_get_pos" qualifiers="const">
@@ -3424,7 +3422,7 @@
<argument index="0" name="id" type="String">
</argument>
<description>
- Get the node type, will return from NODE_* enum.
+ Get the node type, will return from NODE_* enum.
</description>
</method>
<method name="node_rename">
@@ -3435,7 +3433,7 @@
<argument index="1" name="new_name" type="String">
</argument>
<description>
- Rename a node in the graph.
+ Rename a node in the graph.
</description>
</method>
<method name="node_set_pos">
@@ -3720,24 +3718,24 @@
</class>
<class name="Area" inherits="CollisionObject" category="Core">
<brief_description>
- General purpose area detection and influence for 3D physics.
+ General purpose area detection and influence for 3D physics.
</brief_description>
<description>
- General purpose area detection for 3D physics. Areas can be used for detection of objects that enter/exit them, as well as overriding space parameters (changing gravity, damping, etc). For this, use any space override different from AREA_SPACE_OVERRIDE_DISABLE and point gravity at the center of mass.
+ General purpose area detection for 3D physics. Areas can be used for detection of objects that enter/exit them, as well as overriding space parameters (changing gravity, damping, etc). For this, use any space override different from AREA_SPACE_OVERRIDE_DISABLE and point gravity at the center of mass.
</description>
<methods>
<method name="get_angular_damp" qualifiers="const">
<return type="float">
</return>
<description>
- Return the angular damp rate.
+ Return the angular damp rate.
</description>
</method>
<method name="get_collision_mask" qualifiers="const">
<return type="int">
</return>
<description>
- Return the physics layers this area can scan for collisions.
+ Return the physics layers this area can scan for collisions.
</description>
</method>
<method name="get_collision_mask_bit" qualifiers="const">
@@ -3746,35 +3744,35 @@
<argument index="0" name="bit" type="int">
</argument>
<description>
- Return an individual bit on the collision mask.
+ Return an individual bit on the collision mask.
</description>
</method>
<method name="get_gravity" qualifiers="const">
<return type="float">
</return>
<description>
- Return the gravity intensity.
+ Return the gravity intensity.
</description>
</method>
<method name="get_gravity_distance_scale" qualifiers="const">
<return type="float">
</return>
<description>
- Return the falloff factor for point gravity.
+ Return the falloff factor for point gravity.
</description>
</method>
<method name="get_gravity_vector" qualifiers="const">
<return type="Vector3">
</return>
<description>
- Return the gravity vector. If gravity is a point (see [method is_gravity_a_point]), this will be the attraction center.
+ Return the gravity vector. If gravity is a point (see [method is_gravity_a_point]), this will be the attraction center.
</description>
</method>
<method name="get_layer_mask" qualifiers="const">
<return type="int">
</return>
<description>
- Return the physics layer this area is in.
+ Return the physics layer this area is in.
</description>
</method>
<method name="get_layer_mask_bit" qualifiers="const">
@@ -3783,63 +3781,63 @@
<argument index="0" name="bit" type="int">
</argument>
<description>
- Return an individual bit on the layer mask.
+ Return an individual bit on the layer mask.
</description>
</method>
<method name="get_linear_damp" qualifiers="const">
<return type="float">
</return>
<description>
- Return the linear damp rate.
+ Return the linear damp rate.
</description>
</method>
<method name="get_overlapping_areas" qualifiers="const">
<return type="Array">
</return>
<description>
- Return a list of the areas that are totally or partially inside this area.
+ Return a list of the areas that are totally or partially inside this area.
</description>
</method>
<method name="get_overlapping_bodies" qualifiers="const">
<return type="Array">
</return>
<description>
- Return a list of the bodies ([PhysicsBody]) that are totally or partially inside this area.
+ Return a list of the bodies ([PhysicsBody]) that are totally or partially inside this area.
</description>
</method>
<method name="get_priority" qualifiers="const">
<return type="float">
</return>
<description>
- Return the processing order of this area.
+ Return the processing order of this area.
</description>
</method>
<method name="get_space_override_mode" qualifiers="const">
<return type="int">
</return>
<description>
- Return the space override mode.
+ Return the space override mode.
</description>
</method>
<method name="is_gravity_a_point" qualifiers="const">
<return type="bool">
</return>
<description>
- Return whether gravity is a point. A point gravity will attract objects towards it, as opposed to a gravity vector, which moves them in a given direction.
+ Return whether gravity is a point. A point gravity will attract objects towards it, as opposed to a gravity vector, which moves them in a given direction.
</description>
</method>
<method name="is_monitorable" qualifiers="const">
<return type="bool">
</return>
<description>
- Return whether this area can be detected by other, monitoring, areas.
+ Return whether this area can be detected by other, monitoring, areas.
</description>
</method>
<method name="is_monitoring_enabled" qualifiers="const">
<return type="bool">
</return>
<description>
- Return whether this area detects bodies/areas entering/exiting it.
+ Return whether this area detects bodies/areas entering/exiting it.
</description>
</method>
<method name="overlaps_area" qualifiers="const">
@@ -3848,7 +3846,7 @@
<argument index="0" name="area" type="Object">
</argument>
<description>
- Return whether the area passed is totally or partially inside this area.
+ Return whether the area passed is totally or partially inside this area.
</description>
</method>
<method name="overlaps_body" qualifiers="const">
@@ -3857,22 +3855,22 @@
<argument index="0" name="body" type="Object">
</argument>
<description>
- Return whether the body passed is totally or partially inside this area.
+ Return whether the body passed is totally or partially inside this area.
</description>
</method>
<method name="set_angular_damp">
<argument index="0" name="angular_damp" type="float">
</argument>
<description>
- Set the rate at which objects stop spinning in this area, if there are not any other forces making it spin. The value is a fraction of its current speed, lost per second. Thus, a value of 1.0 should mean stopping immediately, and 0.0 means the object never stops.
- In practice, as the fraction of speed lost gets smaller with each frame, a value of 1.0 does not mean the object will stop in exactly one second. Only when the physics calculations are done at 1 frame per second, it does stop in a second.
+ Set the rate at which objects stop spinning in this area, if there are not any other forces making it spin. The value is a fraction of its current speed, lost per second. Thus, a value of 1.0 should mean stopping immediately, and 0.0 means the object never stops.
+ In practice, as the fraction of speed lost gets smaller with each frame, a value of 1.0 does not mean the object will stop in exactly one second. Only when the physics calculations are done at 1 frame per second, it does stop in a second.
</description>
</method>
<method name="set_collision_mask">
<argument index="0" name="collision_mask" type="int">
</argument>
<description>
- Set the physics layers this area can scan for collisions.
+ Set the physics layers this area can scan for collisions.
</description>
</method>
<method name="set_collision_mask_bit">
@@ -3881,53 +3879,53 @@
<argument index="1" name="value" type="bool">
</argument>
<description>
- Set/clear individual bits on the collision mask. This makes selecting the areas scanned easier.
+ Set/clear individual bits on the collision mask. This makes selecting the areas scanned easier.
</description>
</method>
<method name="set_enable_monitoring">
<argument index="0" name="enable" type="bool">
</argument>
<description>
- Set whether this area can detect bodies/areas entering/exiting it.
+ Set whether this area can detect bodies/areas entering/exiting it.
</description>
</method>
<method name="set_gravity">
<argument index="0" name="gravity" type="float">
</argument>
<description>
- Set the gravity intensity. This is useful to alter the force of gravity without altering its direction.
- This value multiplies the gravity vector, whether it is the given vector ([method set_gravity_vector]), or a calculated one (when using a center of gravity).
+ Set the gravity intensity. This is useful to alter the force of gravity without altering its direction.
+ This value multiplies the gravity vector, whether it is the given vector ([method set_gravity_vector]), or a calculated one (when using a center of gravity).
</description>
</method>
<method name="set_gravity_distance_scale">
<argument index="0" name="distance_scale" type="float">
</argument>
<description>
- Set the falloff factor for point gravity. The greater this value is, the faster the strength of gravity decreases with the square of distance.
+ Set the falloff factor for point gravity. The greater this value is, the faster the strength of gravity decreases with the square of distance.
</description>
</method>
<method name="set_gravity_is_point">
<argument index="0" name="enable" type="bool">
</argument>
<description>
- When overriding space parameters, this method sets whether this area has a center of gravity. To set/get the location of the center of gravity, use [method set_gravity_vector]/[method get_gravity_vector].
+ When overriding space parameters, this method sets whether this area has a center of gravity. To set/get the location of the center of gravity, use [method set_gravity_vector]/[method get_gravity_vector].
</description>
</method>
<method name="set_gravity_vector">
<argument index="0" name="vector" type="Vector3">
</argument>
<description>
- Set the gravity vector. This vector does not have to be normalized.
- If gravity is a point (see [method is_gravity_a_point]), this will be the attraction center.
+ Set the gravity vector. This vector does not have to be normalized.
+ If gravity is a point (see [method is_gravity_a_point]), this will be the attraction center.
</description>
</method>
<method name="set_layer_mask">
<argument index="0" name="layer_mask" type="int">
</argument>
<description>
- Set the physics layers this area is in.
- Collidable objects can exist in any of 32 different layers. These layers are not visual, but more of a tagging system instead. A collidable can use these layers/tags to select with which objects it can collide, using [method set_collision_mask].
- A contact is detected if object A is in any of the layers that object B scans, or object B is in any layer scanned by object A.
+ Set the physics layers this area is in.
+ Collidable objects can exist in any of 32 different layers. These layers are not visual, but more of a tagging system instead. A collidable can use these layers/tags to select with which objects it can collide, using [method set_collision_mask].
+ A contact is detected if object A is in any of the layers that object B scans, or object B is in any layer scanned by object A.
</description>
</method>
<method name="set_layer_mask_bit">
@@ -3936,42 +3934,42 @@
<argument index="1" name="value" type="bool">
</argument>
<description>
- Set/clear individual bits on the layer mask. This makes getting an area in/out of only one layer easier.
+ Set/clear individual bits on the layer mask. This makes getting an area in/out of only one layer easier.
</description>
</method>
<method name="set_linear_damp">
<argument index="0" name="linear_damp" type="float">
</argument>
<description>
- Set the rate at which objects stop moving in this area, if there are not any other forces moving it. The value is a fraction of its current speed, lost per second. Thus, a value of 1.0 should mean stopping immediately, and 0.0 means the object never stops.
- In practice, as the fraction of speed lost gets smaller with each frame, a value of 1.0 does not mean the object will stop in exactly one second. Only when the physics calculations are done at 1 frame per second, it does stop in a second.
+ Set the rate at which objects stop moving in this area, if there are not any other forces moving it. The value is a fraction of its current speed, lost per second. Thus, a value of 1.0 should mean stopping immediately, and 0.0 means the object never stops.
+ In practice, as the fraction of speed lost gets smaller with each frame, a value of 1.0 does not mean the object will stop in exactly one second. Only when the physics calculations are done at 1 frame per second, it does stop in a second.
</description>
</method>
<method name="set_monitorable">
<argument index="0" name="enable" type="bool">
</argument>
<description>
- Set whether this area can be detected by other, monitoring, areas. Only areas need to be marked as monitorable. Bodies are always so.
+ Set whether this area can be detected by other, monitoring, areas. Only areas need to be marked as monitorable. Bodies are always so.
</description>
</method>
<method name="set_priority">
<argument index="0" name="priority" type="float">
</argument>
<description>
- Set the order in which the area is processed. Greater values mean the area gets processed first. This is useful for areas which have an space override different from AREA_SPACE_OVERRIDE_DISABLED or AREA_SPACE_OVERRIDE_COMBINE, as they replace values, and are thus order-dependent.
- Areas with the same priority value get evaluated in an unpredictable order, and should be differentiated if evaluation order is to be important.
+ Set the order in which the area is processed. Greater values mean the area gets processed first. This is useful for areas which have an space override different from AREA_SPACE_OVERRIDE_DISABLED or AREA_SPACE_OVERRIDE_COMBINE, as they replace values, and are thus order-dependent.
+ Areas with the same priority value get evaluated in an unpredictable order, and should be differentiated if evaluation order is to be important.
</description>
</method>
<method name="set_space_override_mode">
<argument index="0" name="enable" type="int">
</argument>
<description>
- Set the space override mode. This mode controls how an area affects gravity and damp.
- AREA_SPACE_OVERRIDE_DISABLED: This area does not affect gravity/damp. These are generally areas that exist only to detect collisions, and objects entering or exiting them.
- AREA_SPACE_OVERRIDE_COMBINE: This area adds its gravity/damp values to whatever has been calculated so far. This way, many overlapping areas can combine their physics to make interesting effects.
- AREA_SPACE_OVERRIDE_COMBINE_REPLACE: This area adds its gravity/damp values to whatever has been calculated so far. Then stops taking into account the rest of the areas, even the default one.
- AREA_SPACE_OVERRIDE_REPLACE: This area replaces any gravity/damp, even the default one, and stops taking into account the rest of the areas.
- AREA_SPACE_OVERRIDE_REPLACE_COMBINE: This area replaces any gravity/damp calculated so far, but keeps calculating the rest of the areas, down to the default one.
+ Set the space override mode. This mode controls how an area affects gravity and damp.
+ AREA_SPACE_OVERRIDE_DISABLED: This area does not affect gravity/damp. These are generally areas that exist only to detect collisions, and objects entering or exiting them.
+ AREA_SPACE_OVERRIDE_COMBINE: This area adds its gravity/damp values to whatever has been calculated so far. This way, many overlapping areas can combine their physics to make interesting effects.
+ AREA_SPACE_OVERRIDE_COMBINE_REPLACE: This area adds its gravity/damp values to whatever has been calculated so far. Then stops taking into account the rest of the areas, even the default one.
+ AREA_SPACE_OVERRIDE_REPLACE: This area replaces any gravity/damp, even the default one, and stops taking into account the rest of the areas.
+ AREA_SPACE_OVERRIDE_REPLACE_COMBINE: This area replaces any gravity/damp calculated so far, but keeps calculating the rest of the areas, down to the default one.
</description>
</method>
</methods>
@@ -3980,7 +3978,7 @@
<argument index="0" name="area" type="Object">
</argument>
<description>
- This signal is triggered only once when an area enters this area. The only parameter passed is the area that entered this area.
+ This signal is triggered only once when an area enters this area. The only parameter passed is the area that entered this area.
</description>
</signal>
<signal name="area_enter_shape">
@@ -3993,14 +3991,14 @@
<argument index="3" name="area_shape" type="int">
</argument>
<description>
- This signal triggers only once when an area enters this area. The first parameter is the area's [RID]. The second one is the area as an object. The third one is the index of the shape entering this area, and the fourth one is the index of the shape in this area that reported the entering.
+ This signal triggers only once when an area enters this area. The first parameter is the area's [RID]. The second one is the area as an object. The third one is the index of the shape entering this area, and the fourth one is the index of the shape in this area that reported the entering.
</description>
</signal>
<signal name="area_exit">
<argument index="0" name="area" type="Object">
</argument>
<description>
- This signal is triggered only once when an area exits this area. The only parameter passed is the area that exited this area.
+ This signal is triggered only once when an area exits this area. The only parameter passed is the area that exited this area.
</description>
</signal>
<signal name="area_exit_shape">
@@ -4013,14 +4011,14 @@
<argument index="3" name="area_shape" type="int">
</argument>
<description>
- This signal triggers only once when an area exits this area. The first parameter is the area's [RID]. The second one is the area as an object. The third one is the index of the shape entering this area, and the fourth one is the index of the shape in this area that reported the entering.
+ This signal triggers only once when an area exits this area. The first parameter is the area's [RID]. The second one is the area as an object. The third one is the index of the shape entering this area, and the fourth one is the index of the shape in this area that reported the entering.
</description>
</signal>
<signal name="body_enter">
<argument index="0" name="body" type="Object">
</argument>
<description>
- This signal is triggered only once when a body enters this area. The only parameter passed is the body that entered this area.
+ This signal is triggered only once when a body enters this area. The only parameter passed is the body that entered this area.
</description>
</signal>
<signal name="body_enter_shape">
@@ -4033,14 +4031,14 @@
<argument index="3" name="area_shape" type="int">
</argument>
<description>
- This signal triggers only once when a body enters this area. The first parameter is the body's [RID]. The second one is the body as an object. The third one is the index of the shape of the body that entered this area, and the fourth one is the index of the shape in this area that reported the entering.
+ This signal triggers only once when a body enters this area. The first parameter is the body's [RID]. The second one is the body as an object. The third one is the index of the shape of the body that entered this area, and the fourth one is the index of the shape in this area that reported the entering.
</description>
</signal>
<signal name="body_exit">
<argument index="0" name="body" type="Object">
</argument>
<description>
- This signal is triggered only once when a body exits this area. The only parameter passed is the body that exited this area.
+ This signal is triggered only once when a body exits this area. The only parameter passed is the body that exited this area.
</description>
</signal>
<signal name="body_exit_shape">
@@ -4053,7 +4051,7 @@
<argument index="3" name="area_shape" type="int">
</argument>
<description>
- This signal triggers only once when a body exits this area. The first parameter is the body's [RID]. The second one is the body as an object. The third one is the index of the shape exiting this area, and the fourth one is the index of the shape in this area that reported the exit.
+ This signal triggers only once when a body exits this area. The first parameter is the body's [RID]. The second one is the body as an object. The third one is the index of the shape exiting this area, and the fourth one is the index of the shape in this area that reported the exit.
</description>
</signal>
</signals>
@@ -4062,24 +4060,24 @@
</class>
<class name="Area2D" inherits="CollisionObject2D" category="Core">
<brief_description>
- General purpose area detection and influence for 2D physics.
+ General purpose area detection and influence for 2D physics.
</brief_description>
<description>
- General purpose area detection for 2D physics. Areas can be used for detection of objects that enter/exit them, as well as overriding space parameters (changing gravity, damping, etc). For this, use any space override different from AREA_SPACE_OVERRIDE_DISABLE and point gravity at the center of mass.
+ General purpose area detection for 2D physics. Areas can be used for detection of objects that enter/exit them, as well as overriding space parameters (changing gravity, damping, etc). For this, use any space override different from AREA_SPACE_OVERRIDE_DISABLE and point gravity at the center of mass.
</description>
<methods>
<method name="get_angular_damp" qualifiers="const">
<return type="float">
</return>
<description>
- Return the angular damp rate.
+ Return the angular damp rate.
</description>
</method>
<method name="get_collision_mask" qualifiers="const">
<return type="int">
</return>
<description>
- Return the physics layers this area can scan for collisions.
+ Return the physics layers this area can scan for collisions.
</description>
</method>
<method name="get_collision_mask_bit" qualifiers="const">
@@ -4088,35 +4086,35 @@
<argument index="0" name="bit" type="int">
</argument>
<description>
- Return an individual bit on the collision mask.
+ Return an individual bit on the collision mask.
</description>
</method>
<method name="get_gravity" qualifiers="const">
<return type="float">
</return>
<description>
- Return the gravity intensity.
+ Return the gravity intensity.
</description>
</method>
<method name="get_gravity_distance_scale" qualifiers="const">
<return type="float">
</return>
<description>
- Return the falloff factor for point gravity.
+ Return the falloff factor for point gravity.
</description>
</method>
<method name="get_gravity_vector" qualifiers="const">
<return type="Vector2">
</return>
<description>
- Return the gravity vector. If gravity is a point (see [method is_gravity_a_point]), this will be the attraction center.
+ Return the gravity vector. If gravity is a point (see [method is_gravity_a_point]), this will be the attraction center.
</description>
</method>
<method name="get_layer_mask" qualifiers="const">
<return type="int">
</return>
<description>
- Return the physics layer this area is in.
+ Return the physics layer this area is in.
</description>
</method>
<method name="get_layer_mask_bit" qualifiers="const">
@@ -4125,63 +4123,63 @@
<argument index="0" name="bit" type="int">
</argument>
<description>
- Return an individual bit on the layer mask.
+ Return an individual bit on the layer mask.
</description>
</method>
<method name="get_linear_damp" qualifiers="const">
<return type="float">
</return>
<description>
- Return the linear damp rate.
+ Return the linear damp rate.
</description>
</method>
<method name="get_overlapping_areas" qualifiers="const">
<return type="Array">
</return>
<description>
- Return a list of the areas that are totally or partially inside this area.
+ Return a list of the areas that are totally or partially inside this area.
</description>
</method>
<method name="get_overlapping_bodies" qualifiers="const">
<return type="Array">
</return>
<description>
- Return a list of the bodies ([PhysicsBody2D]) that are totally or partially inside this area.
+ Return a list of the bodies ([PhysicsBody2D]) that are totally or partially inside this area.
</description>
</method>
<method name="get_priority" qualifiers="const">
<return type="float">
</return>
<description>
- Return the processing order of this area.
+ Return the processing order of this area.
</description>
</method>
<method name="get_space_override_mode" qualifiers="const">
<return type="int">
</return>
<description>
- Return the space override mode.
+ Return the space override mode.
</description>
</method>
<method name="is_gravity_a_point" qualifiers="const">
<return type="bool">
</return>
<description>
- Return whether gravity is a point. A point gravity will attract objects towards it, as opposed to a gravity vector, which moves them in a given direction.
+ Return whether gravity is a point. A point gravity will attract objects towards it, as opposed to a gravity vector, which moves them in a given direction.
</description>
</method>
<method name="is_monitorable" qualifiers="const">
<return type="bool">
</return>
<description>
- Return whether this area can be detected by other, monitoring, areas.
+ Return whether this area can be detected by other, monitoring, areas.
</description>
</method>
<method name="is_monitoring_enabled" qualifiers="const">
<return type="bool">
</return>
<description>
- Return whether this area detects bodies/areas entering/exiting it.
+ Return whether this area detects bodies/areas entering/exiting it.
</description>
</method>
<method name="overlaps_area" qualifiers="const">
@@ -4190,7 +4188,7 @@
<argument index="0" name="area" type="Object">
</argument>
<description>
- Return whether the area passed is totally or partially inside this area.
+ Return whether the area passed is totally or partially inside this area.
</description>
</method>
<method name="overlaps_body" qualifiers="const">
@@ -4199,22 +4197,22 @@
<argument index="0" name="body" type="Object">
</argument>
<description>
- Return whether the body passed is totally or partially inside this area.
+ Return whether the body passed is totally or partially inside this area.
</description>
</method>
<method name="set_angular_damp">
<argument index="0" name="angular_damp" type="float">
</argument>
<description>
- Set the rate at which objects stop spinning in this area, if there are not any other forces making it spin. The value is a fraction of its current speed, lost per second. Thus, a value of 1.0 should mean stopping immediately, and 0.0 means the object never stops.
- In practice, as the fraction of speed lost gets smaller with each frame, a value of 1.0 does not mean the object will stop in exactly one second. Only when the physics calculations are done at 1 frame per second, it does stop in a second.
+ Set the rate at which objects stop spinning in this area, if there are not any other forces making it spin. The value is a fraction of its current speed, lost per second. Thus, a value of 1.0 should mean stopping immediately, and 0.0 means the object never stops.
+ In practice, as the fraction of speed lost gets smaller with each frame, a value of 1.0 does not mean the object will stop in exactly one second. Only when the physics calculations are done at 1 frame per second, it does stop in a second.
</description>
</method>
<method name="set_collision_mask">
<argument index="0" name="collision_mask" type="int">
</argument>
<description>
- Set the physics layers this area can scan for collisions.
+ Set the physics layers this area can scan for collisions.
</description>
</method>
<method name="set_collision_mask_bit">
@@ -4223,53 +4221,53 @@
<argument index="1" name="value" type="bool">
</argument>
<description>
- Set/clear individual bits on the collision mask. This makes selecting the areas scanned easier.
+ Set/clear individual bits on the collision mask. This makes selecting the areas scanned easier.
</description>
</method>
<method name="set_enable_monitoring">
<argument index="0" name="enable" type="bool">
</argument>
<description>
- Set whether this area can detect bodies/areas entering/exiting it.
+ Set whether this area can detect bodies/areas entering/exiting it.
</description>
</method>
<method name="set_gravity">
<argument index="0" name="gravity" type="float">
</argument>
<description>
- Set the gravity intensity. This is useful to alter the force of gravity without altering its direction.
- This value multiplies the gravity vector, whether it is the given vector ([method set_gravity_vector]), or a calculated one (when using a center of gravity).
+ Set the gravity intensity. This is useful to alter the force of gravity without altering its direction.
+ This value multiplies the gravity vector, whether it is the given vector ([method set_gravity_vector]), or a calculated one (when using a center of gravity).
</description>
</method>
<method name="set_gravity_distance_scale">
<argument index="0" name="distance_scale" type="float">
</argument>
<description>
- Set the falloff factor for point gravity. The greater this value is, the faster the strength of gravity decreases with the square of distance.
+ Set the falloff factor for point gravity. The greater this value is, the faster the strength of gravity decreases with the square of distance.
</description>
</method>
<method name="set_gravity_is_point">
<argument index="0" name="enable" type="bool">
</argument>
<description>
- When overriding space parameters, this method sets whether this area has a center of gravity. To set/get the location of the center of gravity, use [method set_gravity_vector]/[method get_gravity_vector].
+ When overriding space parameters, this method sets whether this area has a center of gravity. To set/get the location of the center of gravity, use [method set_gravity_vector]/[method get_gravity_vector].
</description>
</method>
<method name="set_gravity_vector">
<argument index="0" name="vector" type="Vector2">
</argument>
<description>
- Set the gravity vector. This vector does not have to be normalized.
- If gravity is a point (see [method is_gravity_a_point]), this will be the attraction center.
+ Set the gravity vector. This vector does not have to be normalized.
+ If gravity is a point (see [method is_gravity_a_point]), this will be the attraction center.
</description>
</method>
<method name="set_layer_mask">
<argument index="0" name="layer_mask" type="int">
</argument>
<description>
- Set the physics layers this area is in.
- Collidable objects can exist in any of 32 different layers. These layers are not visual, but more of a tagging system instead. A collidable can use these layers/tags to select with which objects it can collide, using [method set_collision_mask].
- A contact is detected if object A is in any of the layers that object B scans, or object B is in any layer scanned by object A.
+ Set the physics layers this area is in.
+ Collidable objects can exist in any of 32 different layers. These layers are not visual, but more of a tagging system instead. A collidable can use these layers/tags to select with which objects it can collide, using [method set_collision_mask].
+ A contact is detected if object A is in any of the layers that object B scans, or object B is in any layer scanned by object A.
</description>
</method>
<method name="set_layer_mask_bit">
@@ -4278,42 +4276,42 @@
<argument index="1" name="value" type="bool">
</argument>
<description>
- Set/clear individual bits on the layer mask. This makes getting an area in/out of only one layer easier.
+ Set/clear individual bits on the layer mask. This makes getting an area in/out of only one layer easier.
</description>
</method>
<method name="set_linear_damp">
<argument index="0" name="linear_damp" type="float">
</argument>
<description>
- Set the rate at which objects stop moving in this area, if there are not any other forces moving it. The value is a fraction of its current speed, lost per second. Thus, a value of 1.0 should mean stopping immediately, and 0.0 means the object never stops.
- In practice, as the fraction of speed lost gets smaller with each frame, a value of 1.0 does not mean the object will stop in exactly one second. Only when the physics calculations are done at 1 frame per second, it does stop in a second.
+ Set the rate at which objects stop moving in this area, if there are not any other forces moving it. The value is a fraction of its current speed, lost per second. Thus, a value of 1.0 should mean stopping immediately, and 0.0 means the object never stops.
+ In practice, as the fraction of speed lost gets smaller with each frame, a value of 1.0 does not mean the object will stop in exactly one second. Only when the physics calculations are done at 1 frame per second, it does stop in a second.
</description>
</method>
<method name="set_monitorable">
<argument index="0" name="enable" type="bool">
</argument>
<description>
- Set whether this area can be detected by other, monitoring, areas. Only areas need to be marked as monitorable. Bodies are always so.
+ Set whether this area can be detected by other, monitoring, areas. Only areas need to be marked as monitorable. Bodies are always so.
</description>
</method>
<method name="set_priority">
<argument index="0" name="priority" type="float">
</argument>
<description>
- Set the order in which the area is processed. Greater values mean the area gets processed first. This is useful for areas which have an space override different from AREA_SPACE_OVERRIDE_DISABLED or AREA_SPACE_OVERRIDE_COMBINE, as they replace values, and are thus order-dependent.
- Areas with the same priority value get evaluated in an unpredictable order, and should be differentiated if evaluation order is to be important.
+ Set the order in which the area is processed. Greater values mean the area gets processed first. This is useful for areas which have an space override different from AREA_SPACE_OVERRIDE_DISABLED or AREA_SPACE_OVERRIDE_COMBINE, as they replace values, and are thus order-dependent.
+ Areas with the same priority value get evaluated in an unpredictable order, and should be differentiated if evaluation order is to be important.
</description>
</method>
<method name="set_space_override_mode">
<argument index="0" name="enable" type="int">
</argument>
<description>
- Set the space override mode. This mode controls how an area affects gravity and damp.
- AREA_SPACE_OVERRIDE_DISABLED: This area does not affect gravity/damp. These are generally areas that exist only to detect collisions, and objects entering or exiting them.
- AREA_SPACE_OVERRIDE_COMBINE: This area adds its gravity/damp values to whatever has been calculated so far. This way, many overlapping areas can combine their physics to make interesting effects.
- AREA_SPACE_OVERRIDE_COMBINE_REPLACE: This area adds its gravity/damp values to whatever has been calculated so far. Then stops taking into account the rest of the areas, even the default one.
- AREA_SPACE_OVERRIDE_REPLACE: This area replaces any gravity/damp, even the default one, and stops taking into account the rest of the areas.
- AREA_SPACE_OVERRIDE_REPLACE_COMBINE: This area replaces any gravity/damp calculated so far, but keeps calculating the rest of the areas, down to the default one.
+ Set the space override mode. This mode controls how an area affects gravity and damp.
+ AREA_SPACE_OVERRIDE_DISABLED: This area does not affect gravity/damp. These are generally areas that exist only to detect collisions, and objects entering or exiting them.
+ AREA_SPACE_OVERRIDE_COMBINE: This area adds its gravity/damp values to whatever has been calculated so far. This way, many overlapping areas can combine their physics to make interesting effects.
+ AREA_SPACE_OVERRIDE_COMBINE_REPLACE: This area adds its gravity/damp values to whatever has been calculated so far. Then stops taking into account the rest of the areas, even the default one.
+ AREA_SPACE_OVERRIDE_REPLACE: This area replaces any gravity/damp, even the default one, and stops taking into account the rest of the areas.
+ AREA_SPACE_OVERRIDE_REPLACE_COMBINE: This area replaces any gravity/damp calculated so far, but keeps calculating the rest of the areas, down to the default one.
</description>
</method>
</methods>
@@ -4322,7 +4320,7 @@
<argument index="0" name="area" type="Object">
</argument>
<description>
- This signal is triggered only once when an area enters this area. The only parameter passed is the area that entered this area.
+ This signal is triggered only once when an area enters this area. The only parameter passed is the area that entered this area.
</description>
</signal>
<signal name="area_enter_shape">
@@ -4335,14 +4333,14 @@
<argument index="3" name="area_shape" type="int">
</argument>
<description>
- This signal triggers only once when an area enters this area. The first parameter is the area's [RID]. The second one is the area as an object. The third one is the index of the shape entering this area, and the fourth one is the index of the shape in this area that reported the entering.
+ This signal triggers only once when an area enters this area. The first parameter is the area's [RID]. The second one is the area as an object. The third one is the index of the shape entering this area, and the fourth one is the index of the shape in this area that reported the entering.
</description>
</signal>
<signal name="area_exit">
<argument index="0" name="area" type="Object">
</argument>
<description>
- This signal is triggered only once when an area exits this area. The only parameter passed is the area that exited this area.
+ This signal is triggered only once when an area exits this area. The only parameter passed is the area that exited this area.
</description>
</signal>
<signal name="area_exit_shape">
@@ -4355,14 +4353,14 @@
<argument index="3" name="area_shape" type="int">
</argument>
<description>
- This signal triggers only once when an area exits this area. The first parameter is the area's [RID]. The second one is the area as an object. The third one is the index of the shape entering this area, and the fourth one is the index of the shape in this area that reported the entering.
+ This signal triggers only once when an area exits this area. The first parameter is the area's [RID]. The second one is the area as an object. The third one is the index of the shape entering this area, and the fourth one is the index of the shape in this area that reported the entering.
</description>
</signal>
<signal name="body_enter">
<argument index="0" name="body" type="Object">
</argument>
<description>
- This signal is triggered only once when a body enters this area. The only parameter passed is the body that entered this area.
+ This signal is triggered only once when a body enters this area. The only parameter passed is the body that entered this area.
</description>
</signal>
<signal name="body_enter_shape">
@@ -4375,14 +4373,14 @@
<argument index="3" name="area_shape" type="int">
</argument>
<description>
- This signal triggers only once when a body enters this area. The first parameter is the body's [RID]. The second one is the body as an object. The third one is the index of the shape of the body that entered this area, and the fourth one is the index of the shape in this area that reported the entering.
+ This signal triggers only once when a body enters this area. The first parameter is the body's [RID]. The second one is the body as an object. The third one is the index of the shape of the body that entered this area, and the fourth one is the index of the shape in this area that reported the entering.
</description>
</signal>
<signal name="body_exit">
<argument index="0" name="body" type="Object">
</argument>
<description>
- This signal is triggered only once when a body exits this area. The only parameter passed is the body that exited this area.
+ This signal is triggered only once when a body exits this area. The only parameter passed is the body that exited this area.
</description>
</signal>
<signal name="body_exit_shape">
@@ -4395,7 +4393,7 @@
<argument index="3" name="area_shape" type="int">
</argument>
<description>
- This signal triggers only once when a body exits this area. The first parameter is the body's [RID]. The second one is the body as an object. The third one is the index of the shape exiting this area, and the fourth one is the index of the shape in this area that reported the exit.
+ This signal triggers only once when a body exits this area. The first parameter is the body's [RID]. The second one is the body as an object. The third one is the index of the shape exiting this area, and the fourth one is the index of the shape in this area that reported the exit.
</description>
</signal>
</signals>
@@ -4404,10 +4402,10 @@
</class>
<class name="Array" category="Built-In Types">
<brief_description>
- Generic array datatype.
+ Generic array datatype.
</brief_description>
<description>
- Generic array, contains several elements of any type, accessible by numerical index starting at 0. Negative indices can be used to count from the right, like in Python. Arrays are always passed by reference.
+ Generic array, contains several elements of any type, accessible by numerical index starting at 0. Negative indices can be used to count from the right, like in Python. Arrays are always passed by reference.
</description>
<methods>
<method name="Array">
@@ -4416,7 +4414,7 @@
<argument index="0" name="from" type="ColorArray">
</argument>
<description>
- Construct an array from a [RawArray].
+ Construct an array from a [RawArray].
</description>
</method>
<method name="Array">
@@ -4425,7 +4423,7 @@
<argument index="0" name="from" type="Vector3Array">
</argument>
<description>
- Construct an array from a [RawArray].
+ Construct an array from a [RawArray].
</description>
</method>
<method name="Array">
@@ -4434,7 +4432,7 @@
<argument index="0" name="from" type="Vector2Array">
</argument>
<description>
- Construct an array from a [RawArray].
+ Construct an array from a [RawArray].
</description>
</method>
<method name="Array">
@@ -4443,7 +4441,7 @@
<argument index="0" name="from" type="StringArray">
</argument>
<description>
- Construct an array from a [RawArray].
+ Construct an array from a [RawArray].
</description>
</method>
<method name="Array">
@@ -4452,7 +4450,7 @@
<argument index="0" name="from" type="RealArray">
</argument>
<description>
- Construct an array from a [RawArray].
+ Construct an array from a [RawArray].
</description>
</method>
<method name="Array">
@@ -4461,7 +4459,7 @@
<argument index="0" name="from" type="IntArray">
</argument>
<description>
- Construct an array from a [RawArray].
+ Construct an array from a [RawArray].
</description>
</method>
<method name="Array">
@@ -4470,19 +4468,19 @@
<argument index="0" name="from" type="RawArray">
</argument>
<description>
- Construct an array from a [RawArray].
+ Construct an array from a [RawArray].
</description>
</method>
<method name="append">
<argument index="0" name="value" type="var">
</argument>
<description>
- Append an element at the end of the array (alias of [method push_back]).
+ Append an element at the end of the array (alias of [method push_back]).
</description>
</method>
<method name="clear">
<description>
- Clear the array (resize to 0).
+ Clear the array (resize to 0).
</description>
</method>
<method name="count">
@@ -4491,21 +4489,21 @@
<argument index="0" name="value" type="var">
</argument>
<description>
- Return the amount of times an element is in the array.
+ Return the amount of times an element is in the array.
</description>
</method>
<method name="empty">
<return type="bool">
</return>
<description>
- Return true if the array is empty (size==0).
+ Return true if the array is empty (size==0).
</description>
</method>
<method name="erase">
<argument index="0" name="value" type="var">
</argument>
<description>
- Remove the first occurrence of a value from the array.
+ Remove the first occurrence of a value from the array.
</description>
</method>
<method name="find">
@@ -4516,7 +4514,7 @@
<argument index="1" name="from" type="int" default="0">
</argument>
<description>
- Searches the array for a value and returns its index or -1 if not found. Optionally, the initial search index can be passed.
+ Searches the array for a value and returns its index or -1 if not found. Optionally, the initial search index can be passed.
</description>
</method>
<method name="find_last">
@@ -4525,14 +4523,14 @@
<argument index="0" name="value" type="var">
</argument>
<description>
- Searches the array in reverse order for a value and returns its index or -1 if not found.
+ Searches the array in reverse order for a value and returns its index or -1 if not found.
</description>
</method>
<method name="hash">
<return type="int">
</return>
<description>
- Return a hashed integer value representing the array contents.
+ Return a hashed integer value representing the array contents.
</description>
</method>
<method name="insert">
@@ -4541,57 +4539,57 @@
<argument index="1" name="value" type="var">
</argument>
<description>
- Insert a new element at a given position in the array. The position must be valid, or at the end of the array (pos==size()).
+ Insert a new element at a given position in the array. The position must be valid, or at the end of the array (pos==size()).
</description>
</method>
<method name="invert">
<description>
- Reverse the order of the elements in the array (so first element will now be the last).
+ Reverse the order of the elements in the array (so first element will now be the last).
</description>
</method>
<method name="is_shared">
<return type="bool">
</return>
<description>
- Get whether this is a shared array instance.
+ Get whether this is a shared array instance.
</description>
</method>
<method name="pop_back">
<description>
- Remove the last element of the array.
+ Remove the last element of the array.
</description>
</method>
<method name="pop_front">
<description>
- Remove the first element of the array.
+ Remove the first element of the array.
</description>
</method>
<method name="push_back">
<argument index="0" name="value" type="var">
</argument>
<description>
- Append an element at the end of the array.
+ Append an element at the end of the array.
</description>
</method>
<method name="push_front">
<argument index="0" name="value" type="var">
</argument>
<description>
- Add an element at the beginning of the array.
+ Add an element at the beginning of the array.
</description>
</method>
<method name="remove">
<argument index="0" name="pos" type="int">
</argument>
<description>
- Remove an element from the array by index.
+ Remove an element from the array by index.
</description>
</method>
<method name="resize">
<argument index="0" name="pos" type="int">
</argument>
<description>
- Resize the array to contain a different number of elements. If the array size is smaller, elements are cleared, if bigger, new elements are Null.
+ Resize the array to contain a different number of elements. If the array size is smaller, elements are cleared, if bigger, new elements are Null.
</description>
</method>
<method name="rfind">
@@ -4602,19 +4600,19 @@
<argument index="1" name="from" type="int" default="-1">
</argument>
<description>
- Searches the array in reverse order. Optionally, a start search index can be passed. If negative, the start index is considered relative to the end of the array.
+ Searches the array in reverse order. Optionally, a start search index can be passed. If negative, the start index is considered relative to the end of the array.
</description>
</method>
<method name="size">
<return type="int">
</return>
<description>
- Return the amount of elements in the array.
+ Return the amount of elements in the array.
</description>
</method>
<method name="sort">
<description>
- Sort the array using natural order.
+ Sort the array using natural order.
</description>
</method>
<method name="sort_custom">
@@ -4623,7 +4621,7 @@
<argument index="1" name="func" type="String">
</argument>
<description>
- Sort the array using a custom method. The arguments are an object that holds the method and the name of such method. The custom method receives two arguments (a pair of elements from the array) and must return true if the first argument is less than the second, and return false otherwise.
+ Sort the array using a custom method. The arguments are an object that holds the method and the name of such method. The custom method receives two arguments (a pair of elements from the array) and must return true if the first argument is less than the second, and return false otherwise.
</description>
</method>
</methods>
@@ -4684,38 +4682,38 @@
</class>
<class name="AudioServer" inherits="Object" category="Core">
<brief_description>
- Server interface for low level audio access.
+ Server interface for low level audio access.
</brief_description>
<description>
- AudioServer is a low level server interface for audio access. It is in charge of creating sample data (playable audio) as well as its playback via a voice interface.
+ AudioServer is a low level server interface for audio access. It is in charge of creating sample data (playable audio) as well as its playback via a voice interface.
</description>
<methods>
<method name="free_rid">
<argument index="0" name="rid" type="RID">
</argument>
<description>
- Free a [RID] resource.
+ Free a [RID] resource.
</description>
</method>
<method name="get_event_voice_global_volume_scale" qualifiers="const">
<return type="float">
</return>
<description>
- Return the global scale for event-based stream playback.
+ Return the global scale for event-based stream playback.
</description>
</method>
<method name="get_fx_global_volume_scale" qualifiers="const">
<return type="float">
</return>
<description>
- Return the global scale for all voices.
+ Return the global scale for all voices.
</description>
</method>
<method name="get_stream_global_volume_scale" qualifiers="const">
<return type="float">
</return>
<description>
- Return the global scale for stream playback.
+ Return the global scale for stream playback.
</description>
</method>
<method name="sample_create">
@@ -4728,8 +4726,8 @@
<argument index="2" name="length" type="int">
</argument>
<description>
- Create an audio sample, return a [RID] referencing it. The sample will be created with a given format (from the SAMPLE_FORMAT_* enum), a total length (in samples, not bytes), in either stereo or mono.
- Even if a stereo sample consists of a left sample and a right sample, it still counts as one sample for length purposes.
+ Create an audio sample, return a [RID] referencing it. The sample will be created with a given format (from the SAMPLE_FORMAT_* enum), a total length (in samples, not bytes), in either stereo or mono.
+ Even if a stereo sample consists of a left sample and a right sample, it still counts as one sample for length purposes.
</description>
</method>
<method name="sample_get_data" qualifiers="const">
@@ -4738,7 +4736,7 @@
<argument index="0" name="sample" type="RID">
</argument>
<description>
- Return the sample data as an array of bytes. The length will be the expected length in bytes.
+ Return the sample data as an array of bytes. The length will be the expected length in bytes.
</description>
</method>
<method name="sample_get_description" qualifiers="const">
@@ -4747,7 +4745,7 @@
<argument index="0" name="sample" type="RID">
</argument>
<description>
- Return the description of an audio sample. Mainly used for organization.
+ Return the description of an audio sample. Mainly used for organization.
</description>
</method>
<method name="sample_get_format" qualifiers="const">
@@ -4756,7 +4754,7 @@
<argument index="0" name="sample" type="RID">
</argument>
<description>
- Return the format of the audio sample, in the form of the SAMPLE_FORMAT_* enum.
+ Return the format of the audio sample, in the form of the SAMPLE_FORMAT_* enum.
</description>
</method>
<method name="sample_get_length" qualifiers="const">
@@ -4765,7 +4763,7 @@
<argument index="0" name="sample" type="RID">
</argument>
<description>
- Return the length in samples (not bytes) of the audio sample. Even if a stereo sample consists of a left sample and a right sample, it still counts as one sample for length purposes.
+ Return the length in samples (not bytes) of the audio sample. Even if a stereo sample consists of a left sample and a right sample, it still counts as one sample for length purposes.
</description>
</method>
<method name="sample_get_loop_begin" qualifiers="const">
@@ -4774,7 +4772,7 @@
<argument index="0" name="sample" type="RID">
</argument>
<description>
- Return the initial loop point of a sample. Only has effect if sample loop is enabled. See [method sample_set_loop_format].
+ Return the initial loop point of a sample. Only has effect if sample loop is enabled. See [method sample_set_loop_format].
</description>
</method>
<method name="sample_get_loop_end" qualifiers="const">
@@ -4783,7 +4781,7 @@
<argument index="0" name="sample" type="RID">
</argument>
<description>
- Return the final loop point of a sample. Only has effect if sample loop is enabled. See [method sample_set_loop_format].
+ Return the final loop point of a sample. Only has effect if sample loop is enabled. See [method sample_set_loop_format].
</description>
</method>
<method name="sample_get_loop_format" qualifiers="const">
@@ -4792,7 +4790,7 @@
<argument index="0" name="sample" type="RID">
</argument>
<description>
- Return the loop format for a sample, as a value from the SAMPLE_LOOP_* enum.
+ Return the loop format for a sample, as a value from the SAMPLE_LOOP_* enum.
</description>
</method>
<method name="sample_get_mix_rate" qualifiers="const">
@@ -4801,7 +4799,7 @@
<argument index="0" name="sample" type="RID">
</argument>
<description>
- Return the mix rate of the given sample.
+ Return the mix rate of the given sample.
</description>
</method>
<method name="sample_is_stereo" qualifiers="const">
@@ -4810,7 +4808,7 @@
<argument index="0" name="sample" type="RID">
</argument>
<description>
- Return whether the sample is stereo (2 channels).
+ Return whether the sample is stereo (2 channels).
</description>
</method>
<method name="sample_set_data">
@@ -4819,11 +4817,11 @@
<argument index="1" name="data" type="RawArray">
</argument>
<description>
- Set the sample data for a given sample as an array of bytes. The length must be equal to the sample length expected in bytes or an error will be produced. The byte length can be calculated as follows:
- Get the sample length ([method sample_get_length]).
- If the sample format is SAMPLE_FORMAT_PCM16, multiply it by 2.
- If the sample format is SAMPLE_FORMAT_IMA_ADPCM, divide it by 2 (rounding any fraction up), then add 4.
- If the sample is stereo ([method sample_is_stereo]), multiply it by 2.
+ Set the sample data for a given sample as an array of bytes. The length must be equal to the sample length expected in bytes or an error will be produced. The byte length can be calculated as follows:
+ Get the sample length ([method sample_get_length]).
+ If the sample format is SAMPLE_FORMAT_PCM16, multiply it by 2.
+ If the sample format is SAMPLE_FORMAT_IMA_ADPCM, divide it by 2 (rounding any fraction up), then add 4.
+ If the sample is stereo ([method sample_is_stereo]), multiply it by 2.
</description>
</method>
<method name="sample_set_description">
@@ -4832,7 +4830,7 @@
<argument index="1" name="description" type="String">
</argument>
<description>
- Set the description of an audio sample. Mainly used for organization.
+ Set the description of an audio sample. Mainly used for organization.
</description>
</method>
<method name="sample_set_loop_begin">
@@ -4841,7 +4839,7 @@
<argument index="1" name="pos" type="int">
</argument>
<description>
- Set the initial loop point of a sample. Only has effect if sample loop is enabled. See [method sample_set_loop_format].
+ Set the initial loop point of a sample. Only has effect if sample loop is enabled. See [method sample_set_loop_format].
</description>
</method>
<method name="sample_set_loop_end">
@@ -4850,7 +4848,7 @@
<argument index="1" name="pos" type="int">
</argument>
<description>
- Set the final loop point of a sample. Only has effect if sample loop is enabled. See [method sample_set_loop_format].
+ Set the final loop point of a sample. Only has effect if sample loop is enabled. See [method sample_set_loop_format].
</description>
</method>
<method name="sample_set_loop_format">
@@ -4859,7 +4857,7 @@
<argument index="1" name="loop_format" type="int">
</argument>
<description>
- Set the loop format for a sample from the SAMPLE_LOOP_* enum. As a warning, Ping Pong loops may not be available on some hardware-mixing platforms.
+ Set the loop format for a sample from the SAMPLE_LOOP_* enum. As a warning, Ping Pong loops may not be available on some hardware-mixing platforms.
</description>
</method>
<method name="sample_set_mix_rate">
@@ -4868,7 +4866,7 @@
<argument index="1" name="mix_rate" type="int">
</argument>
<description>
- Change the default mix rate of a given sample.
+ Change the default mix rate of a given sample.
</description>
</method>
<method name="sample_set_signed_data">
@@ -4877,37 +4875,37 @@
<argument index="1" name="data" type="RealArray">
</argument>
<description>
- Set the sample data for a given sample as an array of floats. The length must be equal to the sample length or an error will be produced.
- For this method, a stereo sample is made from two samples. Thus, in case of a stereo sample, the array length must be twice the length returned by [method sample_get_length].
- Trying to alter a SAMPLE_FORMAT_IMA_ADPCM sample is not supported. It will throw an error to the console, but will not alter the sample data.
+ Set the sample data for a given sample as an array of floats. The length must be equal to the sample length or an error will be produced.
+ For this method, a stereo sample is made from two samples. Thus, in case of a stereo sample, the array length must be twice the length returned by [method sample_get_length].
+ Trying to alter a SAMPLE_FORMAT_IMA_ADPCM sample is not supported. It will throw an error to the console, but will not alter the sample data.
</description>
</method>
<method name="set_event_voice_global_volume_scale">
<argument index="0" name="scale" type="float">
</argument>
<description>
- Set global scale for event-based stream ([EventStream]) playback. Default is 1.0.
+ Set global scale for event-based stream ([EventStream]) playback. Default is 1.0.
</description>
</method>
<method name="set_fx_global_volume_scale">
<argument index="0" name="scale" type="float">
</argument>
<description>
- Set global scale for all voices (not including streams). Default is 1.0.
+ Set global scale for all voices (not including streams). Default is 1.0.
</description>
</method>
<method name="set_stream_global_volume_scale">
<argument index="0" name="scale" type="float">
</argument>
<description>
- Set global scale for stream playback. Default is 1.0.
+ Set global scale for stream playback. Default is 1.0.
</description>
</method>
<method name="voice_create">
<return type="RID">
</return>
<description>
- Allocate a voice for playback. Voices are persistent. A voice can play a single sample at the same time. See [method sample_create].
+ Allocate a voice for playback. Voices are persistent. A voice can play a single sample at the same time. See [method sample_create].
</description>
</method>
<method name="voice_get_chorus" qualifiers="const">
@@ -4916,7 +4914,7 @@
<argument index="0" name="voice" type="RID">
</argument>
<description>
- Return the current chorus send for a given voice (0 to 1).
+ Return the current chorus send for a given voice (0 to 1).
</description>
</method>
<method name="voice_get_filter_cutoff" qualifiers="const">
@@ -4925,7 +4923,7 @@
<argument index="0" name="voice" type="RID">
</argument>
<description>
- Return the current filter cutoff (in hz) for a given voice.
+ Return the current filter cutoff (in hz) for a given voice.
</description>
</method>
<method name="voice_get_filter_resonance" qualifiers="const">
@@ -4934,7 +4932,7 @@
<argument index="0" name="voice" type="RID">
</argument>
<description>
- Return the current filter resonance for a given voice.
+ Return the current filter resonance for a given voice.
</description>
</method>
<method name="voice_get_filter_type" qualifiers="const">
@@ -4943,7 +4941,7 @@
<argument index="0" name="voice" type="RID">
</argument>
<description>
- Return the current selected filter type for a given voice, from the FILTER_* enum.
+ Return the current selected filter type for a given voice, from the FILTER_* enum.
</description>
</method>
<method name="voice_get_mix_rate" qualifiers="const">
@@ -4952,7 +4950,7 @@
<argument index="0" name="voice" type="RID">
</argument>
<description>
- Return the current mix rate for a given voice.
+ Return the current mix rate for a given voice.
</description>
</method>
<method name="voice_get_pan" qualifiers="const">
@@ -4961,7 +4959,7 @@
<argument index="0" name="voice" type="RID">
</argument>
<description>
- Return the current pan for a given voice (-1 to +1 range).
+ Return the current pan for a given voice (-1 to +1 range).
</description>
</method>
<method name="voice_get_pan_depth" qualifiers="const">
@@ -4970,7 +4968,7 @@
<argument index="0" name="voice" type="RID">
</argument>
<description>
- Return the current pan depth for a given voice (-1 to +1 range).
+ Return the current pan depth for a given voice (-1 to +1 range).
</description>
</method>
<method name="voice_get_pan_height" qualifiers="const">
@@ -4979,7 +4977,7 @@
<argument index="0" name="voice" type="RID">
</argument>
<description>
- Return the current pan height for a given voice (-1 to +1 range).
+ Return the current pan height for a given voice (-1 to +1 range).
</description>
</method>
<method name="voice_get_reverb" qualifiers="const">
@@ -4988,7 +4986,7 @@
<argument index="0" name="voice" type="RID">
</argument>
<description>
- Return the current reverb send for a given voice (0 to 1).
+ Return the current reverb send for a given voice (0 to 1).
</description>
</method>
<method name="voice_get_reverb_type" qualifiers="const">
@@ -4997,7 +4995,7 @@
<argument index="0" name="voice" type="RID">
</argument>
<description>
- Return the current reverb type for a given voice from the REVERB_* enum.
+ Return the current reverb type for a given voice from the REVERB_* enum.
</description>
</method>
<method name="voice_get_volume" qualifiers="const">
@@ -5006,7 +5004,7 @@
<argument index="0" name="voice" type="RID">
</argument>
<description>
- Return the current volume for a given voice.
+ Return the current volume for a given voice.
</description>
</method>
<method name="voice_is_positional" qualifiers="const">
@@ -5015,7 +5013,7 @@
<argument index="0" name="voice" type="RID">
</argument>
<description>
- Return whether the current voice is positional. See [method voice_set_positional].
+ Return whether the current voice is positional. See [method voice_set_positional].
</description>
</method>
<method name="voice_play">
@@ -5024,7 +5022,7 @@
<argument index="1" name="sample" type="RID">
</argument>
<description>
- Start playback of a given voice using a given sample. If the voice was already playing it will be restarted.
+ Start playback of a given voice using a given sample. If the voice was already playing it will be restarted.
</description>
</method>
<method name="voice_set_chorus">
@@ -5033,7 +5031,7 @@
<argument index="1" name="chorus" type="float">
</argument>
<description>
- Set chorus send post processing for the voice (from 0 to 1).
+ Set chorus send post processing for the voice (from 0 to 1).
</description>
</method>
<method name="voice_set_filter">
@@ -5048,7 +5046,7 @@
<argument index="4" name="gain" type="float" default="0">
</argument>
<description>
- Set a resonant filter post processing for the voice. Filter type is a value from the FILTER_* enum.
+ Set a resonant filter post processing for the voice. Filter type is a value from the FILTER_* enum.
</description>
</method>
<method name="voice_set_mix_rate">
@@ -5057,7 +5055,7 @@
<argument index="1" name="rate" type="int">
</argument>
<description>
- Set a different playback mix rate for the given voice.
+ Set a different playback mix rate for the given voice.
</description>
</method>
<method name="voice_set_pan">
@@ -5070,7 +5068,7 @@
<argument index="3" name="height" type="float" default="0">
</argument>
<description>
- Change the pan of a currently playing voice and, optionally, the depth and height for a positional/3D sound. Panning values are expressed within the -1 to +1 range.
+ Change the pan of a currently playing voice and, optionally, the depth and height for a positional/3D sound. Panning values are expressed within the -1 to +1 range.
</description>
</method>
<method name="voice_set_positional">
@@ -5079,7 +5077,7 @@
<argument index="1" name="enabled" type="bool">
</argument>
<description>
- Set whether a given voice is positional. This is only interpreted as a hint and used for backends that may support binaural encoding.
+ Set whether a given voice is positional. This is only interpreted as a hint and used for backends that may support binaural encoding.
</description>
</method>
<method name="voice_set_reverb">
@@ -5090,7 +5088,7 @@
<argument index="2" name="reverb" type="float">
</argument>
<description>
- Set the reverb send post processing for the voice (from 0 to 1) and the reverb type, from the REVERB_* enum.
+ Set the reverb send post processing for the voice (from 0 to 1) and the reverb type, from the REVERB_* enum.
</description>
</method>
<method name="voice_set_volume">
@@ -5099,14 +5097,14 @@
<argument index="1" name="volume" type="float">
</argument>
<description>
- Change the volume of a currently playing voice. Volume is expressed as linear gain where 0.0 is mute and 1.0 is default.
+ Change the volume of a currently playing voice. Volume is expressed as linear gain where 0.0 is mute and 1.0 is default.
</description>
</method>
<method name="voice_stop">
<argument index="0" name="voice" type="RID">
</argument>
<description>
- Stop a given voice.
+ Stop a given voice.
</description>
</method>
</methods>
@@ -5163,11 +5161,11 @@
</class>
<class name="AudioServerSW" inherits="AudioServer" category="Core">
<brief_description>
- Software implementation of [AudioServer].
+ Software implementation of [AudioServer].
</brief_description>
<description>
- This is a software audio server. It does not use any kind of hardware acceleration.
- This class does not expose any new method.
+ This is a software audio server. It does not use any kind of hardware acceleration.
+ This class does not expose any new method.
</description>
<methods>
</methods>
@@ -5176,10 +5174,10 @@
</class>
<class name="AudioStream" inherits="Resource" category="Core">
<brief_description>
- Base class for audio streams.
+ Base class for audio streams.
</brief_description>
<description>
- Base class for audio streams. Audio streams are used for music playback, or other types of streamed sounds that don't fit or require more flexibility than a [Sample].
+ Base class for audio streams. Audio streams are used for music playback, or other types of streamed sounds that don't fit or require more flexibility than a [Sample].
</description>
<methods>
</methods>
@@ -5188,10 +5186,10 @@
</class>
<class name="AudioStreamMPC" inherits="AudioStream" category="Core">
<brief_description>
- MusePack audio stream driver.
+ MusePack audio stream driver.
</brief_description>
<description>
- MusePack audio stream driver.
+ MusePack audio stream driver.
</description>
<methods>
</methods>
@@ -5200,10 +5198,10 @@
</class>
<class name="AudioStreamOGGVorbis" inherits="AudioStream" category="Core">
<brief_description>
- OGG Vorbis audio stream driver.
+ OGG Vorbis audio stream driver.
</brief_description>
<description>
- OGG Vorbis audio stream driver.
+ OGG Vorbis audio stream driver.
</description>
<methods>
</methods>
@@ -5212,10 +5210,10 @@
</class>
<class name="AudioStreamOpus" inherits="AudioStream" category="Core">
<brief_description>
- Opus Codec audio stream driver.
+ Opus Codec audio stream driver.
</brief_description>
<description>
- Opus Codec audio stream driver.
+ Opus Codec audio stream driver.
</description>
<methods>
</methods>
@@ -5304,10 +5302,10 @@
</class>
<class name="AudioStreamSpeex" inherits="AudioStream" category="Core">
<brief_description>
- Speex audio stream driver.
+ Speex audio stream driver.
</brief_description>
<description>
- Speex audio stream driver. Speex is very useful for compressed speech. It allows loading a very large amount of speech in memory at little IO/latency cost.
+ Speex audio stream driver. Speex is very useful for compressed speech. It allows loading a very large amount of speech in memory at little IO/latency cost.
</description>
<methods>
</methods>
@@ -5316,38 +5314,38 @@
</class>
<class name="BackBufferCopy" inherits="Node2D" category="Core">
<brief_description>
- Copies a region of the screen (or the whole screen) to a buffer so it can be accessed with the texscreen() shader instruction.
+ Copies a region of the screen (or the whole screen) to a buffer so it can be accessed with the texscreen() shader instruction.
</brief_description>
<description>
- Node for back-buffering the currently displayed screen. The region defined in the BackBufferCopy node is bufferized with the content of the screen it covers, or the entire screen according to the copy mode set. Accessing this buffer is done with the texscreen() shader instruction.
+ Node for back-buffering the currently displayed screen. The region defined in the BackBufferCopy node is bufferized with the content of the screen it covers, or the entire screen according to the copy mode set. Accessing this buffer is done with the texscreen() shader instruction.
</description>
<methods>
<method name="get_copy_mode" qualifiers="const">
<return type="int">
</return>
<description>
- Return the copy mode currently applied to the BackBufferCopy (refer to constants section).
+ Return the copy mode currently applied to the BackBufferCopy (refer to constants section).
</description>
</method>
<method name="get_rect" qualifiers="const">
<return type="Rect2">
</return>
<description>
- Return the area covered by the BackBufferCopy.
+ Return the area covered by the BackBufferCopy.
</description>
</method>
<method name="set_copy_mode">
<argument index="0" name="copy_mode" type="int">
</argument>
<description>
- Set the copy mode of the BackBufferCopy (refer to constants section).
+ Set the copy mode of the BackBufferCopy (refer to constants section).
</description>
</method>
<method name="set_rect">
<argument index="0" name="rect" type="Rect2">
</argument>
<description>
- Defines the area covered by the BackBufferCopy.
+ Defines the area covered by the BackBufferCopy.
</description>
</method>
</methods>
@@ -5769,43 +5767,43 @@
</class>
<class name="BaseButton" inherits="Control" category="Core">
<brief_description>
- Provides a base class for different kinds of buttons.
+ Provides a base class for different kinds of buttons.
</brief_description>
<description>
- BaseButton is the abstract base class for buttons, so it shouldn't be used directly (It doesn't display anything). Other types of buttons inherit from it.
+ BaseButton is the abstract base class for buttons, so it shouldn't be used directly (It doesn't display anything). Other types of buttons inherit from it.
</description>
<methods>
<method name="_pressed" qualifiers="virtual">
<description>
- Called when button is pressed.
+ Called when button is pressed.
</description>
</method>
<method name="_toggled" qualifiers="virtual">
<argument index="0" name="pressed" type="bool">
</argument>
<description>
- Called when button is toggled (only if toggle_mode is active).
+ Called when button is toggled (only if toggle_mode is active).
</description>
</method>
<method name="get_click_on_press" qualifiers="const">
<return type="bool">
</return>
<description>
- Return the state of the click_on_press property (see [method set_click_on_press]).
+ Return the state of the click_on_press property (see [method set_click_on_press]).
</description>
</method>
<method name="get_draw_mode" qualifiers="const">
<return type="int">
</return>
<description>
- Return the visual state used to draw the button. This is useful mainly when implementing your own draw code by either overriding _draw() or connecting to "draw" signal. The visual state of the button is defined by the DRAW_* enum.
+ Return the visual state used to draw the button. This is useful mainly when implementing your own draw code by either overriding _draw() or connecting to "draw" signal. The visual state of the button is defined by the DRAW_* enum.
</description>
</method>
<method name="get_enabled_focus_mode" qualifiers="const">
<return type="int">
</return>
<description>
- Returns focus access mode used when switching between enabled/disabled (see [method Control.set_focus_mode] and [method set_disabled]).
+ Returns focus access mode used when switching between enabled/disabled (see [method Control.set_focus_mode] and [method set_disabled]).
</description>
</method>
<method name="get_shortcut" qualifiers="const">
@@ -5818,56 +5816,56 @@
<return type="bool">
</return>
<description>
- Return whether the button is in disabled state (see [method set_disabled]).
+ Return whether the button is in disabled state (see [method set_disabled]).
</description>
</method>
<method name="is_hovered" qualifiers="const">
<return type="bool">
</return>
<description>
- Return true if mouse entered the button before it exit.
+ Return true if mouse entered the button before it exit.
</description>
</method>
<method name="is_pressed" qualifiers="const">
<return type="bool">
</return>
<description>
- If toggle_mode is active, return whether the button is toggled. If toggle_mode is not active, return whether the button is pressed down.
+ If toggle_mode is active, return whether the button is toggled. If toggle_mode is not active, return whether the button is pressed down.
</description>
</method>
<method name="is_toggle_mode" qualifiers="const">
<return type="bool">
</return>
<description>
- Return the toggle_mode property (see [method set_toggle_mode]).
+ Return the toggle_mode property (see [method set_toggle_mode]).
</description>
</method>
<method name="set_click_on_press">
<argument index="0" name="enable" type="bool">
</argument>
<description>
- Set the button click_on_press mode. This mode generates click events when a mouse button or key is just pressed (by default events are generated when the button/keys are released and both press and release occur in the visual area of the Button).
+ Set the button click_on_press mode. This mode generates click events when a mouse button or key is just pressed (by default events are generated when the button/keys are released and both press and release occur in the visual area of the Button).
</description>
</method>
<method name="set_disabled">
<argument index="0" name="disabled" type="bool">
</argument>
<description>
- Set the button into disabled state. When a button is disabled, it can't be clicked or toggled.
+ Set the button into disabled state. When a button is disabled, it can't be clicked or toggled.
</description>
</method>
<method name="set_enabled_focus_mode">
<argument index="0" name="mode" type="int">
</argument>
<description>
- Sets the focus access mode to use when switching between enabled/disabled (see [method Control.set_focus_mode] and [method set_disabled]).
+ Sets the focus access mode to use when switching between enabled/disabled (see [method Control.set_focus_mode] and [method set_disabled]).
</description>
</method>
<method name="set_pressed">
<argument index="0" name="pressed" type="bool">
</argument>
<description>
- Set the button to pressed state (only if toggle_mode is active).
+ Set the button to pressed state (only if toggle_mode is active).
</description>
</method>
<method name="set_shortcut">
@@ -5880,26 +5878,26 @@
<argument index="0" name="enabled" type="bool">
</argument>
<description>
- Set the button toggle_mode property. Toggle mode makes the button flip state between pressed and unpressed each time its area is clicked.
+ Set the button toggle_mode property. Toggle mode makes the button flip state between pressed and unpressed each time its area is clicked.
</description>
</method>
</methods>
<signals>
<signal name="pressed">
<description>
- This signal is emitted every time the button is pressed or toggled.
+ This signal is emitted every time the button is pressed or toggled.
</description>
</signal>
<signal name="released">
<description>
- This signal is emitted when the button was released.
+ This signal is emitted when the button was released.
</description>
</signal>
<signal name="toggled">
<argument index="0" name="pressed" type="bool">
</argument>
<description>
- This signal is emitted when the button was just toggled between pressed and normal states (only if toggle_mode is active). The new state is contained in the [i]pressed[/i] argument.
+ This signal is emitted when the button was just toggled between pressed and normal states (only if toggle_mode is active). The new state is contained in the [i]pressed[/i] argument.
</description>
</signal>
</signals>
@@ -5994,7 +5992,7 @@
<argument index="4" name="advance" type="float" default="-1">
</argument>
<description>
- Add a character to the font, where [i]character[/i] is the unicode value, [i]texture[/i] is the texture index, [i]rect[/i] is the region in the texture (in pixels!), [i]align[/i] is the (optional) alignment for the character and [i]advance[/i] is the (optional) advance.
+ Add a character to the font, where [i]character[/i] is the unicode value, [i]texture[/i] is the texture index, [i]rect[/i] is the region in the texture (in pixels!), [i]align[/i] is the (optional) alignment for the character and [i]advance[/i] is the (optional) advance.
</description>
</method>
<method name="add_kerning_pair">
@@ -6005,19 +6003,19 @@
<argument index="2" name="kerning" type="int">
</argument>
<description>
- Add a kerning pair to the [BitmapFont] as a difference. Kerning pairs are special cases where a typeface advance is determined by the next character.
+ Add a kerning pair to the [BitmapFont] as a difference. Kerning pairs are special cases where a typeface advance is determined by the next character.
</description>
</method>
<method name="add_texture">
<argument index="0" name="texture" type="Texture">
</argument>
<description>
- Add a texture to the [BitmapFont].
+ Add a texture to the [BitmapFont].
</description>
</method>
<method name="clear">
<description>
- Clear all the font data.
+ Clear all the font data.
</description>
</method>
<method name="create_from_fnt">
@@ -6036,7 +6034,7 @@
<argument index="1" name="next" type="int" default="0">
</argument>
<description>
- Return the size of a character, optionally taking kerning into account if the next character is provided.
+ Return the size of a character, optionally taking kerning into account if the next character is provided.
</description>
</method>
<method name="get_fallback" qualifiers="const">
@@ -6053,7 +6051,7 @@
<argument index="1" name="char_b" type="int">
</argument>
<description>
- Return a kerning pair as a difference.
+ Return a kerning pair as a difference.
</description>
</method>
<method name="get_texture" qualifiers="const">
@@ -6074,7 +6072,7 @@
<argument index="0" name="px" type="float">
</argument>
<description>
- Set the font ascent (number of pixels above the baseline).
+ Set the font ascent (number of pixels above the baseline).
</description>
</method>
<method name="set_distance_field_hint">
@@ -6093,7 +6091,7 @@
<argument index="0" name="px" type="float">
</argument>
<description>
- Set the total font height (ascent plus descent) in pixels.
+ Set the total font height (ascent plus descent) in pixels.
</description>
</method>
</methods>
@@ -6102,10 +6100,10 @@
</class>
<class name="BoneAttachment" inherits="Spatial" category="Core">
<brief_description>
- A node that will attach to a bone.
+ A node that will attach to a bone.
</brief_description>
<description>
- This node must be the child of a [Skeleton] node. You can then select a bone for this node to attach to. The BoneAttachment node will copy the transform of the selected bone.
+ This node must be the child of a [Skeleton] node. You can then select a bone for this node to attach to. The BoneAttachment node will copy the transform of the selected bone.
</description>
<methods>
</methods>
@@ -6114,32 +6112,32 @@
</class>
<class name="BoxContainer" inherits="Container" category="Core">
<brief_description>
- Base class for Box containers.
+ Base class for Box containers.
</brief_description>
<description>
- Base class for Box containers. It arranges children controls vertically or horizontally, and rearranges them automatically when their minimum size changes.
+ Base class for Box containers. It arranges children controls vertically or horizontally, and rearranges them automatically when their minimum size changes.
</description>
<methods>
<method name="add_spacer">
<argument index="0" name="begin" type="bool">
</argument>
<description>
- Add a control to the box as a spacer.
- If [i]begin[/i] is true the spacer control will be inserted in front of other children.
+ Add a control to the box as a spacer.
+ If [i]begin[/i] is true the spacer control will be inserted in front of other children.
</description>
</method>
<method name="get_alignment" qualifiers="const">
<return type="int">
</return>
<description>
- Return the alignment of children in the container.
+ Return the alignment of children in the container.
</description>
</method>
<method name="set_alignment">
<argument index="0" name="alignment" type="int">
</argument>
<description>
- Set the alignment of children in the container(Must be one of ALIGN_BEGIN, ALIGN_CENTER or ALIGN_END).
+ Set the alignment of children in the container(Must be one of ALIGN_BEGIN, ALIGN_CENTER or ALIGN_END).
</description>
</method>
</methods>
@@ -6157,24 +6155,24 @@
</class>
<class name="BoxShape" inherits="Shape" category="Core">
<brief_description>
- Box shape resource.
+ Box shape resource.
</brief_description>
<description>
- Box shape resource, which can be set into a [PhysicsBody] or area.
+ Box shape resource, which can be set into a [PhysicsBody] or area.
</description>
<methods>
<method name="get_extents" qualifiers="const">
<return type="Vector3">
</return>
<description>
- Return the half extents of the shape.
+ Return the half extents of the shape.
</description>
</method>
<method name="set_extents">
<argument index="0" name="extents" type="Vector3">
</argument>
<description>
- Set the half extents for the shape.
+ Set the half extents for the shape.
</description>
</method>
</methods>
@@ -6183,80 +6181,80 @@
</class>
<class name="Button" inherits="BaseButton" category="Core">
<brief_description>
- Standard themed Button.
+ Standard themed Button.
</brief_description>
<description>
- Button is the standard themed button. It can contain text and an icon, and will display them according to the current [Theme].
+ Button is the standard themed button. It can contain text and an icon, and will display them according to the current [Theme].
</description>
<methods>
<method name="get_button_icon" qualifiers="const">
<return type="Texture">
</return>
<description>
- Return the button icon.
+ Return the button icon.
</description>
</method>
<method name="get_clip_text" qualifiers="const">
<return type="bool">
</return>
<description>
- Return the state of the [i]clip_text[/i] property (see [method set_clip_text])
+ Return the state of the [i]clip_text[/i] property (see [method set_clip_text])
</description>
</method>
<method name="get_text" qualifiers="const">
<return type="String">
</return>
<description>
- Return the button text.
+ Return the button text.
</description>
</method>
<method name="get_text_align" qualifiers="const">
<return type="int">
</return>
<description>
- Return the text alignment policy.
+ Return the text alignment policy.
</description>
</method>
<method name="is_flat" qualifiers="const">
<return type="bool">
</return>
<description>
- Return the state of the [i]flat[/i] property (see [method set_flat]).
+ Return the state of the [i]flat[/i] property (see [method set_flat]).
</description>
</method>
<method name="set_button_icon">
<argument index="0" name="texture" type="Texture">
</argument>
<description>
- Set the icon that will be displayed next to the text inside the button area.
+ Set the icon that will be displayed next to the text inside the button area.
</description>
</method>
<method name="set_clip_text">
<argument index="0" name="enabled" type="bool">
</argument>
<description>
- Set the [i]clip_text[/i] property of a Button. When this property is enabled, text that is too large to fit the button is clipped, when disabled (default) the Button will always be wide enough to hold the text.
+ Set the [i]clip_text[/i] property of a Button. When this property is enabled, text that is too large to fit the button is clipped, when disabled (default) the Button will always be wide enough to hold the text.
</description>
</method>
<method name="set_flat">
<argument index="0" name="enabled" type="bool">
</argument>
<description>
- Set the [i]flat[/i] property of a Button. Flat buttons don't display decoration unless hovered or pressed.
+ Set the [i]flat[/i] property of a Button. Flat buttons don't display decoration unless hovered or pressed.
</description>
</method>
<method name="set_text">
<argument index="0" name="text" type="String">
</argument>
<description>
- Set the button text, which will be displayed inside the button area.
+ Set the button text, which will be displayed inside the button area.
</description>
</method>
<method name="set_text_align">
<argument index="0" name="align" type="int">
</argument>
<description>
- Set the text alignment policy, using one of the ALIGN_* constants.
+ Set the text alignment policy, using one of the ALIGN_* constants.
</description>
</method>
</methods>
@@ -6298,18 +6296,18 @@
</class>
<class name="ButtonArray" inherits="Control" category="Core">
<brief_description>
- Array of Buttons.
+ Array of Buttons.
</brief_description>
<description>
- Array of Buttons. A ButtonArray is useful to have an array of buttons laid out vertically or horizontally. Only one button can be selected, and is referenced by its index in the array (first button is 0, second button is 1, etc.).
- This is useful [i]e.g.[/i] for joypad-friendly interfaces and option menus.
+ Array of Buttons. A ButtonArray is useful to have an array of buttons laid out vertically or horizontally. Only one button can be selected, and is referenced by its index in the array (first button is 0, second button is 1, etc.).
+ This is useful [i]e.g.[/i] for joypad-friendly interfaces and option menus.
</description>
<methods>
<method name="add_button">
<argument index="0" name="text" type="String">
</argument>
<description>
- Append a new button to the array, with the specified text.
+ Append a new button to the array, with the specified text.
</description>
</method>
<method name="add_icon_button">
@@ -6318,26 +6316,26 @@
<argument index="1" name="text" type="String" default="&quot;&quot;">
</argument>
<description>
- Append a new button to the array, with the specified icon and text.
+ Append a new button to the array, with the specified icon and text.
</description>
</method>
<method name="clear">
<description>
- Remove all buttons from the array.
+ Remove all buttons from the array.
</description>
</method>
<method name="erase_button">
<argument index="0" name="button_idx" type="int">
</argument>
<description>
- Remove the specified button in the array.
+ Remove the specified button in the array.
</description>
</method>
<method name="get_button_count" qualifiers="const">
<return type="int">
</return>
<description>
- Return the amount of buttons in the array.
+ Return the amount of buttons in the array.
</description>
</method>
<method name="get_button_icon" qualifiers="const">
@@ -6346,7 +6344,7 @@
<argument index="0" name="button_idx" type="int">
</argument>
<description>
- Return the icon of the specified button.
+ Return the icon of the specified button.
</description>
</method>
<method name="get_button_text" qualifiers="const">
@@ -6355,21 +6353,21 @@
<argument index="0" name="button_idx" type="int">
</argument>
<description>
- Return the text of the specified button.
+ Return the text of the specified button.
</description>
</method>
<method name="get_hovered" qualifiers="const">
<return type="int">
</return>
<description>
- Return the index of the currently hovered button in the array.
+ Return the index of the currently hovered button in the array.
</description>
</method>
<method name="get_selected" qualifiers="const">
<return type="int">
</return>
<description>
- Return the index of the currently selected button in the array.
+ Return the index of the currently selected button in the array.
</description>
</method>
<method name="set_button_icon">
@@ -6378,7 +6376,7 @@
<argument index="1" name="icon" type="Texture">
</argument>
<description>
- Set the icon of the specified button.
+ Set the icon of the specified button.
</description>
</method>
<method name="set_button_text">
@@ -6387,14 +6385,14 @@
<argument index="1" name="text" type="String">
</argument>
<description>
- Define the text of the specified button.
+ Define the text of the specified button.
</description>
</method>
<method name="set_selected">
<argument index="0" name="button_idx" type="int">
</argument>
<description>
- Select a button in the array based on the given index.
+ Select a button in the array based on the given index.
</description>
</method>
</methods>
@@ -6403,7 +6401,7 @@
<argument index="0" name="button_idx" type="int">
</argument>
<description>
- A button has been selected, its index is given as the argument.
+ A button has been selected, its index is given as the argument.
</description>
</signal>
</signals>
@@ -6427,45 +6425,45 @@
</class>
<class name="ButtonGroup" inherits="BoxContainer" category="Core">
<brief_description>
- Group of Buttons.
+ Group of Buttons.
</brief_description>
<description>
- Group of [Button]. All direct and indirect children buttons become radios. Only one allows being pressed.
+ Group of [Button]. All direct and indirect children buttons become radios. Only one allows being pressed.
</description>
<methods>
<method name="get_button_list" qualifiers="const">
<return type="Array">
</return>
<description>
- Return the list of all the buttons in the group.
+ Return the list of all the buttons in the group.
</description>
</method>
<method name="get_focused_button" qualifiers="const">
<return type="BaseButton">
</return>
<description>
- Return the focused button.
+ Return the focused button.
</description>
</method>
<method name="get_pressed_button" qualifiers="const">
<return type="BaseButton">
</return>
<description>
- Return the pressed button.
+ Return the pressed button.
</description>
</method>
<method name="get_pressed_button_index" qualifiers="const">
<return type="int">
</return>
<description>
- Return the index of the pressed button (by tree order).
+ Return the index of the pressed button (by tree order).
</description>
</method>
<method name="set_pressed_button">
<argument index="0" name="button" type="BaseButton">
</argument>
<description>
- Set the button to be pressed.
+ Set the button to be pressed.
</description>
</method>
</methods>
@@ -6478,10 +6476,10 @@
</class>
<class name="Camera" inherits="Spatial" category="Core">
<brief_description>
- Camera node, displays from a point of view.
+ Camera node, displays from a point of view.
</brief_description>
<description>
- Camera is a special node that displays what is visible from its current location. Cameras register themselves in the nearest [Viewport] node (when ascending the tree). Only one camera can be active per viewport. If no viewport is available ascending the tree, the Camera will register in the global viewport. In other words, a Camera just provides [i]3D[/i] display capabilities to a [Viewport], and, without one, a scene registered in that [Viewport] (or higher viewports) can't be displayed.
+ Camera is a special node that displays what is visible from its current location. Cameras register themselves in the nearest [Viewport] node (when ascending the tree). Only one camera can be active per viewport. If no viewport is available ascending the tree, the Camera will register in the global viewport. In other words, a Camera just provides [i]3D[/i] display capabilities to a [Viewport], and, without one, a scene registered in that [Viewport] (or higher viewports) can't be displayed.
</description>
<methods>
<method name="clear_current">
@@ -6492,7 +6490,7 @@
<return type="Transform">
</return>
<description>
- Get the camera transform. Subclassed cameras (such as CharacterCamera) may provide different transforms than the [Node] transform.
+ Get the camera transform. Subclassed cameras (such as CharacterCamera) may provide different transforms than the [Node] transform.
</description>
</method>
<method name="get_environment" qualifiers="const">
@@ -6547,7 +6545,7 @@
<return type="bool">
</return>
<description>
- Return whether the Camera is the current one in the [Viewport], or plans to become current (if outside the scene tree).
+ Return whether the Camera is the current one in the [Viewport], or plans to become current (if outside the scene tree).
</description>
</method>
<method name="is_position_behind" qualifiers="const">
@@ -6560,7 +6558,7 @@
</method>
<method name="make_current">
<description>
- Make this camera the current Camera for the [Viewport] (see class description). If the Camera Node is outside the scene tree, it will attempt to become current once it's added.
+ Make this camera the current Camera for the [Viewport] (see class description). If the Camera Node is outside the scene tree, it will attempt to become current once it's added.
</description>
</method>
<method name="project_local_ray_normal" qualifiers="const">
@@ -6585,7 +6583,7 @@
<argument index="0" name="screen_point" type="Vector2">
</argument>
<description>
- Return a normal vector in worldspace, that is the result of projecting a point on the [Viewport] rectangle by the camera projection. This is useful for casting rays in the form of (origin,normal) for object intersection or picking.
+ Return a normal vector in worldspace, that is the result of projecting a point on the [Viewport] rectangle by the camera projection. This is useful for casting rays in the form of (origin,normal) for object intersection or picking.
</description>
</method>
<method name="project_ray_origin" qualifiers="const">
@@ -6594,7 +6592,7 @@
<argument index="0" name="screen_point" type="Vector2">
</argument>
<description>
- Return a 3D position in worldspace, that is the result of projecting a point on the [Viewport] rectangle by the camera projection. This is useful for casting rays in the form of (origin,normal) for object intersection or picking.
+ Return a 3D position in worldspace, that is the result of projecting a point on the [Viewport] rectangle by the camera projection. This is useful for casting rays in the form of (origin,normal) for object intersection or picking.
</description>
</method>
<method name="set_environment">
@@ -6617,7 +6615,7 @@
<argument index="2" name="z_far" type="float">
</argument>
<description>
- Set the camera projection to orthogonal mode, by specifying a width and the [i]near[/i] and [i]far[/i] clip planes in worldspace units. (As a hint, 2D games often use this projection, with values specified in pixels)
+ Set the camera projection to orthogonal mode, by specifying a width and the [i]near[/i] and [i]far[/i] clip planes in worldspace units. (As a hint, 2D games often use this projection, with values specified in pixels)
</description>
</method>
<method name="set_perspective">
@@ -6628,7 +6626,7 @@
<argument index="2" name="z_far" type="float">
</argument>
<description>
- Set the camera projection to perspective mode, by specifying a [i]FOV[/i] Y angle in degrees (FOV means Field of View), and the [i]near[/i] and [i]far[/i] clip planes in worldspace units.
+ Set the camera projection to perspective mode, by specifying a [i]FOV[/i] Y angle in degrees (FOV means Field of View), and the [i]near[/i] and [i]far[/i] clip planes in worldspace units.
</description>
</method>
<method name="set_visible_layers">
@@ -6643,7 +6641,7 @@
<argument index="0" name="world_point" type="Vector3">
</argument>
<description>
- Return how a 3D point in worldspace maps to a 2D coordinate in the [Viewport] rectangle.
+ Return how a 3D point in worldspace maps to a 2D coordinate in the [Viewport] rectangle.
</description>
</method>
</methods>
@@ -6662,11 +6660,11 @@
</class>
<class name="Camera2D" inherits="Node2D" category="Core">
<brief_description>
- Camera node for 2D scenes.
+ Camera node for 2D scenes.
</brief_description>
<description>
- Camera node for 2D scenes. It forces the screen (current layer) to scroll following this node. This makes it easier (and faster) to program scrollable scenes than manually changing the position of [CanvasItem] based nodes.
- This node is intended to be a simple helper get get things going quickly and it may happen often that more functionality is desired to change how the camera works. To make your own custom camera node, simply inherit from [Node2D] and change the transform of the canvas by calling get_viewport().set_canvas_transform(m) in [Viewport].
+ Camera node for 2D scenes. It forces the screen (current layer) to scroll following this node. This makes it easier (and faster) to program scrollable scenes than manually changing the position of [CanvasItem] based nodes.
+ This node is intended to be a simple helper get get things going quickly and it may happen often that more functionality is desired to change how the camera works. To make your own custom camera node, simply inherit from [Node2D] and change the transform of the canvas by calling get_viewport().set_canvas_transform(m) in [Viewport].
</description>
<methods>
<method name="clear_current">
@@ -6675,7 +6673,18 @@
</method>
<method name="force_update_scroll">
<description>
- Force the camera to update scroll immediately.
+ Force the camera to update scroll immediately.
+ </description>
+ </method>
+ <method name="reset_smoothing">
+ <description>
+ Set the camera's position immediately to its current smoothing destination.
+ This has no effect if smoothing is disabled.
+ </description>
+ </method>
+ <method name="align">
+ <description>
+ Align the camera to the tracked node
</description>
</method>
<method name="get_anchor_mode" qualifiers="const">
@@ -6688,7 +6697,7 @@
<return type="Vector2">
</return>
<description>
- Return the camera position.
+ Return the camera position.
</description>
</method>
<method name="get_camera_screen_center" qualifiers="const">
@@ -6703,7 +6712,7 @@
<argument index="0" name="margin" type="int">
</argument>
<description>
- Return the margins needed to drag the camera (see [method set_drag_margin]).
+ Return the margins needed to drag the camera (see [method set_drag_margin]).
</description>
</method>
<method name="get_follow_smoothing" qualifiers="const">
@@ -6724,14 +6733,14 @@
<argument index="0" name="margin" type="int">
</argument>
<description>
- Return the scrolling limit in pixels.
+ Return the scrolling limit in pixels.
</description>
</method>
<method name="get_offset" qualifiers="const">
<return type="Vector2">
</return>
<description>
- Return the scroll offset.
+ Return the scroll offset.
</description>
</method>
<method name="get_v_offset" qualifiers="const">
@@ -6750,7 +6759,7 @@
<return type="bool">
</return>
<description>
- Return true of this is the current camera (see [method make_current]).
+ Return true of this is the current camera (see [method make_current]).
</description>
</method>
<method name="is_follow_smoothing_enabled" qualifiers="const">
@@ -6779,7 +6788,7 @@
</method>
<method name="make_current">
<description>
- Make this the current 2D camera for the scene (viewport and layer), in case there's many cameras in the scene.
+ Make this the current 2D camera for the scene (viewport and layer), in case there's many cameras in the scene.
</description>
</method>
<method name="set_anchor_mode">
@@ -6794,7 +6803,7 @@
<argument index="1" name="drag_margin" type="float">
</argument>
<description>
- Set the margins needed to drag the camera (relative to the screen size). Margin uses the MARGIN_* enum. Drag margins of 0,0,0,0 will keep the camera at the center of the screen, while drag margins of 1,1,1,1 will only move when the camera is at the edges.
+ Set the margins needed to drag the camera (relative to the screen size). Margin uses the MARGIN_* enum. Drag margins of 0,0,0,0 will keep the camera at the center of the screen, while drag margins of 1,1,1,1 will only move when the camera is at the edges.
</description>
</method>
<method name="set_enable_follow_smoothing">
@@ -6827,14 +6836,14 @@
<argument index="1" name="limit" type="int">
</argument>
<description>
- Set the scrolling limit in pixels.
+ Set the scrolling limit in pixels.
</description>
</method>
<method name="set_offset">
<argument index="0" name="offset" type="Vector2">
</argument>
<description>
- Set the scroll offset. Useful for looking around or camera shake animations.
+ Set the scroll offset. Useful for looking around or camera shake animations.
</description>
</method>
<method name="set_rotating">
@@ -6871,19 +6880,19 @@
</class>
<class name="CanvasItem" inherits="Node" category="Core">
<brief_description>
- Base class of anything 2D.
+ Base class of anything 2D.
</brief_description>
<description>
- Base class of anything 2D. Canvas items are laid out in a tree and children inherit and extend the transform of their parent. CanvasItem is extended by [Control], for anything GUI related, and by [Node2D] for anything 2D engine related.
- Any CanvasItem can draw. For this, the "update" function must be called, then NOTIFICATION_DRAW will be received on idle time to request redraw. Because of this, canvas items don't need to be redraw on every frame, improving the performance significantly. Several functions for drawing on the CanvasItem are provided (see draw_* functions). They can only be used inside the notification, signal or _draw() overrides function, though.
- Canvas items are draw in tree order. By default, children are on top of their parents so a root CanvasItem will be drawn behind everything (this can be changed per item though).
- Canvas items can also be hidden (hiding also their subtree). They provide many means for changing standard parameters such as opacity (for it and the subtree) and self opacity, blend mode.
- Ultimately, a transform notification can be requested, which will notify the node that its global position changed in case the parent tree changed.
+ Base class of anything 2D. Canvas items are laid out in a tree and children inherit and extend the transform of their parent. CanvasItem is extended by [Control], for anything GUI related, and by [Node2D] for anything 2D engine related.
+ Any CanvasItem can draw. For this, the "update" function must be called, then NOTIFICATION_DRAW will be received on idle time to request redraw. Because of this, canvas items don't need to be redraw on every frame, improving the performance significantly. Several functions for drawing on the CanvasItem are provided (see draw_* functions). They can only be used inside the notification, signal or _draw() overrides function, though.
+ Canvas items are draw in tree order. By default, children are on top of their parents so a root CanvasItem will be drawn behind everything (this can be changed per item though).
+ Canvas items can also be hidden (hiding also their subtree). They provide many means for changing standard parameters such as opacity (for it and the subtree) and self opacity, blend mode.
+ Ultimately, a transform notification can be requested, which will notify the node that its global position changed in case the parent tree changed.
</description>
<methods>
<method name="_draw" qualifiers="virtual">
<description>
- Called (if exists) to draw the canvas item.
+ Called (if exists) to draw the canvas item.
</description>
</method>
<method name="draw_char">
@@ -6900,7 +6909,7 @@
<argument index="4" name="modulate" type="Color" default="Color(1,1,1,1)">
</argument>
<description>
- Draw a string character using a custom font. Returns the advance, depending on the char width and kerning with an optional next char.
+ Draw a string character using a custom font. Returns the advance, depending on the char width and kerning with an optional next char.
</description>
</method>
<method name="draw_circle">
@@ -6911,7 +6920,7 @@
<argument index="2" name="color" type="Color">
</argument>
<description>
- Draw a colored circle.
+ Draw a colored circle.
</description>
</method>
<method name="draw_colored_polygon">
@@ -6924,7 +6933,7 @@
<argument index="3" name="texture" type="Texture" default="NULL">
</argument>
<description>
- Draw a colored polygon of any amount of points, convex or concave.
+ Draw a colored polygon of any amount of points, convex or concave.
</description>
</method>
<method name="draw_line">
@@ -6937,7 +6946,7 @@
<argument index="3" name="width" type="float" default="1">
</argument>
<description>
- Draw a line from a 2D point to another, with a given color and width.
+ Draw a line from a 2D point to another, with a given color and width.
</description>
</method>
<method name="draw_polygon">
@@ -6950,7 +6959,7 @@
<argument index="3" name="texture" type="Texture" default="NULL">
</argument>
<description>
- Draw a polygon of any amount of points, convex or concave.
+ Draw a polygon of any amount of points, convex or concave.
</description>
</method>
<method name="draw_primitive">
@@ -6965,7 +6974,7 @@
<argument index="4" name="width" type="float" default="1">
</argument>
<description>
- Draw a custom primitive, 1 point for a point, 2 points for a line, 3 points for a triangle and 4 points for a quad.
+ Draw a custom primitive, 1 point for a point, 2 points for a line, 3 points for a triangle and 4 points for a quad.
</description>
</method>
<method name="draw_rect">
@@ -6974,7 +6983,7 @@
<argument index="1" name="color" type="Color">
</argument>
<description>
- Draw a colored rectangle.
+ Draw a colored rectangle.
</description>
</method>
<method name="draw_set_transform">
@@ -6985,7 +6994,7 @@
<argument index="2" name="scale" type="Vector2">
</argument>
<description>
- Set a custom transform for drawing. Anything drawn afterwards will be transformed by this.
+ Set a custom transform for drawing. Anything drawn afterwards will be transformed by this.
</description>
</method>
<method name="draw_set_transform_matrix">
@@ -7006,7 +7015,7 @@
<argument index="4" name="clip_w" type="int" default="-1">
</argument>
<description>
- Draw a string using a custom font.
+ Draw a string using a custom font.
</description>
</method>
<method name="draw_style_box">
@@ -7015,7 +7024,7 @@
<argument index="1" name="rect" type="Rect2">
</argument>
<description>
- Draw a styled rectangle.
+ Draw a styled rectangle.
</description>
</method>
<method name="draw_texture">
@@ -7026,7 +7035,7 @@
<argument index="2" name="modulate" type="Color" default="Color(1,1,1,1)">
</argument>
<description>
- Draw a texture at a given position.
+ Draw a texture at a given position.
</description>
</method>
<method name="draw_texture_rect">
@@ -7041,7 +7050,7 @@
<argument index="4" name="transpose" type="bool" default="false">
</argument>
<description>
- Draw a textured rectangle at a given position, optionally modulated by a color. Transpose swaps the x and y coordinates when reading the texture.
+ Draw a textured rectangle at a given position, optionally modulated by a color. Transpose swaps the x and y coordinates when reading the texture.
</description>
</method>
<method name="draw_texture_rect_region">
@@ -7056,21 +7065,21 @@
<argument index="4" name="transpose" type="bool" default="false">
</argument>
<description>
- Draw a textured rectangle region at a given position, optionally modulated by a color. Transpose swaps the x and y coordinates when reading the texture.
+ Draw a textured rectangle region at a given position, optionally modulated by a color. Transpose swaps the x and y coordinates when reading the texture.
</description>
</method>
<method name="edit_get_state" qualifiers="const">
<return type="Variant">
</return>
<description>
- Used for editing, returns an opaque value representing the transform state.
+ Used for editing, returns an opaque value representing the transform state.
</description>
</method>
<method name="edit_rotate">
<argument index="0" name="degrees" type="float">
</argument>
<description>
- Used for editing, handle rotation.
+ Used for editing, handle rotation.
</description>
</method>
<method name="edit_set_rect">
@@ -7083,173 +7092,173 @@
<argument index="0" name="state" type="Variant">
</argument>
<description>
- Set the transform state of this CanvasItem. For [Node2D], this is an [Array] with (in order) a [Vector2] for position, a float for rotation and another [Vector2] for scale. For [Control] this is a [Rect2] with the position and size.
+ Set the transform state of this CanvasItem. For [Node2D], this is an [Array] with (in order) a [Vector2] for position, a float for rotation and another [Vector2] for scale. For [Control] this is a [Rect2] with the position and size.
</description>
</method>
<method name="get_blend_mode" qualifiers="const">
<return type="int">
</return>
<description>
- Return the current blending mode from enum BLEND_MODE_*.
+ Return the current blending mode from enum BLEND_MODE_*.
</description>
</method>
<method name="get_canvas" qualifiers="const">
<return type="RID">
</return>
<description>
- Return the [RID] of the [World2D] canvas where this item is in.
+ Return the [RID] of the [World2D] canvas where this item is in.
</description>
</method>
<method name="get_canvas_item" qualifiers="const">
<return type="RID">
</return>
<description>
- Return the canvas item RID used by [VisualServer] for this item.
+ Return the canvas item RID used by [VisualServer] for this item.
</description>
</method>
<method name="get_canvas_transform" qualifiers="const">
<return type="Matrix32">
</return>
<description>
- Get the transform matrix of this item's canvas.
+ Get the transform matrix of this item's canvas.
</description>
</method>
<method name="get_global_mouse_pos" qualifiers="const">
<return type="Vector2">
</return>
<description>
- Get the global position of the mouse.
+ Get the global position of the mouse.
</description>
</method>
<method name="get_global_transform" qualifiers="const">
<return type="Matrix32">
</return>
<description>
- Get the global transform matrix of this item.
+ Get the global transform matrix of this item.
</description>
</method>
<method name="get_global_transform_with_canvas" qualifiers="const">
<return type="Matrix32">
</return>
<description>
- Get the global transform matrix of this item in relation to the canvas.
+ Get the global transform matrix of this item in relation to the canvas.
</description>
</method>
<method name="get_item_and_children_rect" qualifiers="const">
<return type="Rect2">
</return>
<description>
- Get a [Rect2] with the boundaries of this item and its children.
+ Get a [Rect2] with the boundaries of this item and its children.
</description>
</method>
<method name="get_item_rect" qualifiers="const">
<return type="Rect2">
</return>
<description>
- Return a rect containing the editable boundaries of the item.
+ Return a rect containing the editable boundaries of the item.
</description>
</method>
<method name="get_light_mask" qualifiers="const">
<return type="int">
</return>
<description>
- Get this item's light mask number.
+ Get this item's light mask number.
</description>
</method>
<method name="get_local_mouse_pos" qualifiers="const">
<return type="Vector2">
</return>
<description>
- Get the mouse position relative to this item's position.
+ Get the mouse position relative to this item's position.
</description>
</method>
<method name="get_material" qualifiers="const">
<return type="CanvasItemMaterial">
</return>
<description>
- Get the material of this item.
+ Get the material of this item.
</description>
</method>
<method name="get_opacity" qualifiers="const">
<return type="float">
</return>
<description>
- Return the canvas item opacity. This affects the canvas item and all the children.
+ Return the canvas item opacity. This affects the canvas item and all the children.
</description>
</method>
<method name="get_self_opacity" qualifiers="const">
<return type="float">
</return>
<description>
- Return the canvas item self-opacity.
+ Return the canvas item self-opacity.
</description>
</method>
<method name="get_transform" qualifiers="const">
<return type="Matrix32">
</return>
<description>
- Get the transform matrix of this item.
+ Get the transform matrix of this item.
</description>
</method>
<method name="get_use_parent_material" qualifiers="const">
<return type="bool">
</return>
<description>
- Get whether this item uses its parent's material.
+ Get whether this item uses its parent's material.
</description>
</method>
<method name="get_viewport_rect" qualifiers="const">
<return type="Rect2">
</return>
<description>
- Get the viewport's boundaries as a [Rect2].
+ Get the viewport's boundaries as a [Rect2].
</description>
</method>
<method name="get_viewport_transform" qualifiers="const">
<return type="Matrix32">
</return>
<description>
- Get this item's transform in relation to the viewport.
+ Get this item's transform in relation to the viewport.
</description>
</method>
<method name="get_world_2d" qualifiers="const">
<return type="Object">
</return>
<description>
- Get the [World2D] where this item is in.
+ Get the [World2D] where this item is in.
</description>
</method>
<method name="hide">
<description>
- Hide the CanvasItem currently visible.
+ Hide the CanvasItem currently visible.
</description>
</method>
<method name="is_draw_behind_parent_enabled" qualifiers="const">
<return type="bool">
</return>
<description>
- Return whether the item is drawn behind its parent.
+ Return whether the item is drawn behind its parent.
</description>
</method>
<method name="is_hidden" qualifiers="const">
<return type="bool">
</return>
<description>
- Return true if this CanvasItem is hidden. Note that the CanvasItem may not be visible, but as long as it's not hidden ([method hide] called) the function will return false.
+ Return true if this CanvasItem is hidden. Note that the CanvasItem may not be visible, but as long as it's not hidden ([method hide] called) the function will return false.
</description>
</method>
<method name="is_set_as_toplevel" qualifiers="const">
<return type="bool">
</return>
<description>
- Return if set as toplevel. See [method set_as_toplevel].
+ Return if set as toplevel. See [method set_as_toplevel].
</description>
</method>
<method name="is_visible" qualifiers="const">
<return type="bool">
</return>
<description>
- Return true if this CanvasItem is visible. It may be invisible because itself or a parent canvas item is hidden.
+ Return true if this CanvasItem is visible. It may be invisible because itself or a parent canvas item is hidden.
</description>
</method>
<method name="make_input_local" qualifiers="const">
@@ -7258,102 +7267,118 @@
<argument index="0" name="event" type="InputEvent">
</argument>
<description>
- Takes a global input event and convert to this item's coordinate system.
+ Takes a global input event and convert to this item's coordinate system.
</description>
</method>
<method name="set_as_toplevel">
<argument index="0" name="enable" type="bool">
</argument>
<description>
- Set as top level. This means that it will not inherit transform from parent canvas items.
+ Set as top level. This means that it will not inherit transform from parent canvas items.
</description>
</method>
<method name="set_blend_mode">
<argument index="0" name="blend_mode" type="int">
</argument>
<description>
- Set the blending mode from enum BLEND_MODE_*.
+ Set the blending mode from enum BLEND_MODE_*.
</description>
</method>
<method name="set_draw_behind_parent">
<argument index="0" name="enable" type="bool">
</argument>
<description>
- Set whether the canvas item is drawn behind its parent.
+ Set whether the canvas item is drawn behind its parent.
</description>
</method>
<method name="set_hidden">
<argument index="0" name="hidden" type="bool">
</argument>
<description>
- Set whether this item should be hidden or not. Note that no matter what is set here this item won't be shown if its parent or grandparents nodes are also hidden. A hidden CanvasItem make all children hidden too.
+ Set whether this item should be hidden or not. Note that no matter what is set here this item won't be shown if its parent or grandparents nodes are also hidden. A hidden CanvasItem make all children hidden too.
</description>
</method>
<method name="set_light_mask">
<argument index="0" name="light_mask" type="int">
</argument>
<description>
- Set the ligtht mask number of this item.
+ Set the ligtht mask number of this item.
</description>
</method>
<method name="set_material">
<argument index="0" name="material" type="CanvasItemMaterial">
</argument>
<description>
- Set the material of this item.
+ Set the material of this item.
</description>
</method>
<method name="set_opacity">
<argument index="0" name="opacity" type="float">
</argument>
<description>
- Set canvas item opacity. This will affect the canvas item and all the children.
+ Set canvas item opacity. This will affect the canvas item and all the children.
</description>
</method>
<method name="set_self_opacity">
<argument index="0" name="self_opacity" type="float">
</argument>
<description>
- Set canvas item self-opacity. This does not affect the opacity of children items.
+ Set canvas item self-opacity. This does not affect the opacity of children items.
</description>
</method>
<method name="set_use_parent_material">
<argument index="0" name="enable" type="bool">
</argument>
<description>
- Set whether or not this item should use its parent's material.
+ Set whether or not this item should use its parent's material.
</description>
</method>
<method name="show">
<description>
- Show the CanvasItem currently hidden.
+ Show the CanvasItem currently hidden.
</description>
</method>
<method name="update">
+ <method name="make_screen_coord_local" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <argument index="0" name="screen_point" type="Vector2">
+ </argument>
+ <description>
+ Take a 2d screen point and convert to 2D local coords relative to this Canvas
+ item. If this CanvasItem is the root of a Scene, its essentially the
+ world coords for that scene.
+ </description>
+ </method>
+ <method name="make_input_local" qualifiers="const">
+ <return type="InputEvent">
+ </return>
+ <argument index="0" name="event" type="InputEvent">
+ </argument>
<description>
- Queue the CanvasItem for update. [code]NOTIFICATION_DRAW[/code] will be called on idle time to request redraw.
+ Queue the CanvasItem for update. [code]NOTIFICATION_DRAW[/code] will be called on idle time to request redraw.
</description>
</method>
</methods>
<signals>
<signal name="draw">
<description>
- Emitted when the CanvasItem must redraw. This can only be connected realtime, as deferred will not allow drawing.
+ Emitted when the CanvasItem must redraw. This can only be connected realtime, as deferred will not allow drawing.
</description>
</signal>
<signal name="hide">
<description>
- Emitted when becoming hidden.
+ Emitted when becoming hidden.
</description>
</signal>
<signal name="item_rect_changed">
<description>
- Emitted when the item rect has changed.
+ Emitted when the item rect has changed.
</description>
</signal>
<signal name="visibility_changed">
<description>
- Emitted when the visibility (hidden/visible) changes.
+ Emitted when the visibility (hidden/visible) changes.
</description>
</signal>
</signals>
@@ -7466,108 +7491,108 @@
</class>
<class name="CanvasLayer" inherits="Node" category="Core">
<brief_description>
- Canvas Item layer.
+ Canvas Item layer.
</brief_description>
<description>
- Canvas Item layer. [CanvasItem] nodes that are direct or indirect children of a [CanvasLayer] will be drawn in that layer. The layer is a numeric index that defines the draw order. The default 2D scene renders with index 0, so a [CanvasLayer] with index -1 will be drawn below, and one with index 1 will be drawn above. This is very useful for HUDs (in layer 1+ or above), or backgrounds (in layer -1 or below).
+ Canvas Item layer. [CanvasItem] nodes that are direct or indirect children of a [CanvasLayer] will be drawn in that layer. The layer is a numeric index that defines the draw order. The default 2D scene renders with index 0, so a [CanvasLayer] with index -1 will be drawn below, and one with index 1 will be drawn above. This is very useful for HUDs (in layer 1+ or above), or backgrounds (in layer -1 or below).
</description>
<methods>
<method name="get_layer" qualifiers="const">
<return type="int">
</return>
<description>
- Return the layer index, determines the draw order, a lower value will be below a higher one.
+ Return the layer index, determines the draw order, a lower value will be below a higher one.
</description>
</method>
<method name="get_offset" qualifiers="const">
<return type="Vector2">
</return>
<description>
- Return the base offset for this layer (helper).
+ Return the base offset for this layer (helper).
</description>
</method>
<method name="get_rotation" qualifiers="const">
<return type="float">
</return>
<description>
- Return the base rotation for this layer (helper).
+ Return the base rotation for this layer (helper).
</description>
</method>
<method name="get_rotationd" qualifiers="const">
<return type="float">
</return>
<description>
- Get rotation of the layer in degree.
+ Get rotation of the layer in degree.
</description>
</method>
<method name="get_scale" qualifiers="const">
<return type="Vector2">
</return>
<description>
- Return the base scale for this layer (helper).
+ Return the base scale for this layer (helper).
</description>
</method>
<method name="get_transform" qualifiers="const">
<return type="Matrix32">
</return>
<description>
- Return the base transform for this layer.
+ Return the base transform for this layer.
</description>
</method>
<method name="get_viewport" qualifiers="const">
<return type="RID">
</return>
<description>
- Return the viewport RID for this layer.
+ Return the viewport RID for this layer.
</description>
</method>
<method name="get_world_2d" qualifiers="const">
<return type="World2D">
</return>
<description>
- Return the [World2D] used by this layer.
+ Return the [World2D] used by this layer.
</description>
</method>
<method name="set_layer">
<argument index="0" name="layer" type="int">
</argument>
<description>
- Set the layer index, determines the draw order, a lower value will be below a higher one.
+ Set the layer index, determines the draw order, a lower value will be below a higher one.
</description>
</method>
<method name="set_offset">
<argument index="0" name="offset" type="Vector2">
</argument>
<description>
- Set the base offset for this layer (helper).
+ Set the base offset for this layer (helper).
</description>
</method>
<method name="set_rotation">
<argument index="0" name="radians" type="float">
</argument>
<description>
- Set the base rotation for this layer (helper).
+ Set the base rotation for this layer (helper).
</description>
</method>
<method name="set_rotationd">
<argument index="0" name="degrees" type="float">
</argument>
<description>
- Set rotation of the layer in degree.
+ Set rotation of the layer in degree.
</description>
</method>
<method name="set_scale">
<argument index="0" name="scale" type="Vector2">
</argument>
<description>
- Set the base scale for this layer (helper).
+ Set the base scale for this layer (helper).
</description>
</method>
<method name="set_transform">
<argument index="0" name="transform" type="Matrix32">
</argument>
<description>
- Set the base transform for this layer.
+ Set the base transform for this layer.
</description>
</method>
</methods>
@@ -7576,24 +7601,24 @@
</class>
<class name="CanvasModulate" inherits="Node2D" category="Core">
<brief_description>
- Tint the entire canvas
+ Tint the entire canvas
</brief_description>
<description>
- CanvasModulate tints the canvas elements using its asigned color
+ CanvasModulate tints the canvas elements using its asigned color
</description>
<methods>
<method name="get_color" qualifiers="const">
<return type="Color">
</return>
<description>
- Gets the canvas tint color
+ Gets the canvas tint color
</description>
</method>
<method name="set_color">
<argument index="0" name="color" type="Color">
</argument>
<description>
- Sets the canvas tint color
+ Sets the canvas tint color
</description>
</method>
</methods>
@@ -7602,38 +7627,38 @@
</class>
<class name="CapsuleShape" inherits="Shape" category="Core">
<brief_description>
- Capsule shape resource.
+ Capsule shape resource.
</brief_description>
<description>
- Capsule shape resource, which can be set into a [PhysicsBody] or area.
+ Capsule shape resource, which can be set into a [PhysicsBody] or area.
</description>
<methods>
<method name="get_height" qualifiers="const">
<return type="float">
</return>
<description>
- Return the capsule height.
+ Return the capsule height.
</description>
</method>
<method name="get_radius" qualifiers="const">
<return type="float">
</return>
<description>
- Return the capsule radius.
+ Return the capsule radius.
</description>
</method>
<method name="set_height">
<argument index="0" name="height" type="float">
</argument>
<description>
- Set the capsule height.
+ Set the capsule height.
</description>
</method>
<method name="set_radius">
<argument index="0" name="radius" type="float">
</argument>
<description>
- Set the capsule radius.
+ Set the capsule radius.
</description>
</method>
</methods>
@@ -7642,38 +7667,38 @@
</class>
<class name="CapsuleShape2D" inherits="Shape2D" category="Core">
<brief_description>
- Capsule 2D shape resource for physics.
+ Capsule 2D shape resource for physics.
</brief_description>
<description>
- Capsule 2D shape resource for physics. A capsule (or sometimes called "pill") is like a line grown in all directions. It has a radius and a height, and is often useful for modeling biped characters.
+ Capsule 2D shape resource for physics. A capsule (or sometimes called "pill") is like a line grown in all directions. It has a radius and a height, and is often useful for modeling biped characters.
</description>
<methods>
<method name="get_height" qualifiers="const">
<return type="float">
</return>
<description>
- Return the height of the [CapsuleShape2D].
+ Return the height of the [CapsuleShape2D].
</description>
</method>
<method name="get_radius" qualifiers="const">
<return type="float">
</return>
<description>
- Return the radius of the [CapsuleShape2D].
+ Return the radius of the [CapsuleShape2D].
</description>
</method>
<method name="set_height">
<argument index="0" name="height" type="float">
</argument>
<description>
- Set the height of the [CapsuleShape2D].
+ Set the height of the [CapsuleShape2D].
</description>
</method>
<method name="set_radius">
<argument index="0" name="radius" type="float">
</argument>
<description>
- Set the radius of the [CapsuleShape2D].
+ Set the radius of the [CapsuleShape2D].
</description>
</method>
</methods>
@@ -7682,24 +7707,24 @@
</class>
<class name="CenterContainer" inherits="Container" category="Core">
<brief_description>
- Keeps children controls centered.
+ Keeps children controls centered.
</brief_description>
<description>
- CenterContainer Keeps children controls centered. This container keeps all children to their minimum size, in the center.
+ CenterContainer Keeps children controls centered. This container keeps all children to their minimum size, in the center.
</description>
<methods>
<method name="is_using_top_left" qualifiers="const">
<return type="bool">
</return>
<description>
- Should put children to the top left corner instead of center of the container.
+ Should put children to the top left corner instead of center of the container.
</description>
</method>
<method name="set_use_top_left">
<argument index="0" name="enable" type="bool">
</argument>
<description>
- This function will anchor the container children to the top left corner of the the container boundaries, moving all its children to that position, (the children new center will be the top left corner of the container).
+ This function will anchor the container children to the top left corner of the the container boundaries, moving all its children to that position, (the children new center will be the top left corner of the container).
</description>
</method>
</methods>
@@ -7708,10 +7733,10 @@
</class>
<class name="CheckBox" inherits="Button" category="Core">
<brief_description>
- Binary choice user interface widget
+ Binary choice user interface widget
</brief_description>
<description>
- A checkbox allows the user to make a binary choice (choosing only one of two posible options), for example Answer 'yes' or 'no'.
+ A checkbox allows the user to make a binary choice (choosing only one of two posible options), for example Answer 'yes' or 'no'.
</description>
<methods>
</methods>
@@ -7754,10 +7779,10 @@
</class>
<class name="CheckButton" inherits="Button" category="Core">
<brief_description>
- Checkable button.
+ Checkable button.
</brief_description>
<description>
- CheckButton is a toggle button displayed as a check field.
+ CheckButton is a toggle button displayed as a check field.
</description>
<methods>
</methods>
@@ -7796,24 +7821,24 @@
</class>
<class name="CircleShape2D" inherits="Shape2D" category="Core">
<brief_description>
- Circular Shape for 2D Physics.
+ Circular Shape for 2D Physics.
</brief_description>
<description>
- Circular Shape for 2D Physics. This shape is useful for modeling balls or small characters and it's collision detection with everything else is very fast.
+ Circular Shape for 2D Physics. This shape is useful for modeling balls or small characters and it's collision detection with everything else is very fast.
</description>
<methods>
<method name="get_radius" qualifiers="const">
<return type="float">
</return>
<description>
- Return the radius of the circle shape.
+ Return the radius of the circle shape.
</description>
</method>
<method name="set_radius">
<argument index="0" name="radius" type="float">
</argument>
<description>
- Set the radius of the circle shape.
+ Set the radius of the circle shape.
</description>
</method>
</methods>
@@ -7972,10 +7997,10 @@
</class>
<class name="CollisionObject2D" inherits="Node2D" category="Core">
<brief_description>
- Base node for 2D collisionables.
+ Base node for 2D collisionables.
</brief_description>
<description>
- CollisionObject2D is the base class for 2D physics collisionables. They can hold any number of 2D collision shapes. Usually, they are edited by placing [CollisionShape2D] and/or [CollisionPolygon2D] nodes as children. Such nodes are for reference and not present outside the editor, so code should use the regular shape API.
+ CollisionObject2D is the base class for 2D physics collisionables. They can hold any number of 2D collision shapes. Usually, they are edited by placing [CollisionShape2D] and/or [CollisionPolygon2D] nodes as children. Such nodes are for reference and not present outside the editor, so code should use the regular shape API.
</description>
<methods>
<method name="_input_event" qualifiers="virtual">
@@ -7986,7 +8011,7 @@
<argument index="2" name="shape_idx" type="int">
</argument>
<description>
- This method can be used to override normal input processing. The first parameter is the viewport where the event took place. The second holds the input event received, and the third the shape of this object where it happened.
+ This method can be used to override normal input processing. The first parameter is the viewport where the event took place. The second holds the input event received, and the third the shape of this object where it happened.
</description>
</method>
<method name="add_shape">
@@ -7995,19 +8020,19 @@
<argument index="1" name="transform" type="Matrix32" default="1,0, 0,1, 0,0">
</argument>
<description>
- Add a [Shape2D] to the collision body, with a given custom transform.
+ Add a [Shape2D] to the collision body, with a given custom transform.
</description>
</method>
<method name="clear_shapes">
<description>
- Remove all shapes.
+ Remove all shapes.
</description>
</method>
<method name="get_rid" qualifiers="const">
<return type="RID">
</return>
<description>
- Return the RID of this object.
+ Return the RID of this object.
</description>
</method>
<method name="get_shape" qualifiers="const">
@@ -8016,14 +8041,14 @@
<argument index="0" name="shape_idx" type="int">
</argument>
<description>
- Return the shape in the given index.
+ Return the shape in the given index.
</description>
</method>
<method name="get_shape_count" qualifiers="const">
<return type="int">
</return>
<description>
- Return the amount of shapes in the collision body. Because a [CollisionPolygon2D] can generate more than one [Shape2D], the amount returned does not have to match the sum of [CollisionShape2D] and [CollisionPolygon2D].
+ Return the amount of shapes in the collision body. Because a [CollisionPolygon2D] can generate more than one [Shape2D], the amount returned does not have to match the sum of [CollisionShape2D] and [CollisionPolygon2D].
</description>
</method>
<method name="get_shape_transform" qualifiers="const">
@@ -8032,14 +8057,14 @@
<argument index="0" name="shape_idx" type="int">
</argument>
<description>
- Return the shape transform in the given index.
+ Return the shape transform in the given index.
</description>
</method>
<method name="is_pickable" qualifiers="const">
<return type="bool">
</return>
<description>
- Return whether this object is pickable.
+ Return whether this object is pickable.
</description>
</method>
<method name="is_shape_set_as_trigger" qualifiers="const">
@@ -8048,21 +8073,21 @@
<argument index="0" name="shape_idx" type="int">
</argument>
<description>
- Return whether a shape is a trigger. A trigger shape detects collisions, but is otherwise unaffected by physics (i.e. colliding objects will not get blocked).
+ Return whether a shape is a trigger. A trigger shape detects collisions, but is otherwise unaffected by physics (i.e. colliding objects will not get blocked).
</description>
</method>
<method name="remove_shape">
<argument index="0" name="shape_idx" type="int">
</argument>
<description>
- Remove the shape in the given index.
+ Remove the shape in the given index.
</description>
</method>
<method name="set_pickable">
<argument index="0" name="enabled" type="bool">
</argument>
<description>
- Set whether this object is pickable. A pickable object can detect the mouse pointer enter/leave it and, if the mouse is inside it, report input events.
+ Set whether this object is pickable. A pickable object can detect the mouse pointer enter/leave it and, if the mouse is inside it, report input events.
</description>
</method>
<method name="set_shape">
@@ -8071,7 +8096,7 @@
<argument index="1" name="shape" type="Shape">
</argument>
<description>
- Change a shape in the collision body.
+ Change a shape in the collision body.
</description>
</method>
<method name="set_shape_as_trigger">
@@ -8080,7 +8105,7 @@
<argument index="1" name="enable" type="bool">
</argument>
<description>
- Set whether a shape is a trigger. A trigger shape detects collisions, but is otherwise unaffected by physics (i.e. colliding objects will not get blocked).
+ Set whether a shape is a trigger. A trigger shape detects collisions, but is otherwise unaffected by physics (i.e. colliding objects will not get blocked).
</description>
</method>
<method name="set_shape_transform">
@@ -8089,7 +8114,7 @@
<argument index="1" name="transform" type="Matrix32">
</argument>
<description>
- Change the shape transform in the collision body.
+ Change the shape transform in the collision body.
</description>
</method>
</methods>
@@ -8102,17 +8127,17 @@
<argument index="2" name="shape_idx" type="int">
</argument>
<description>
- This signal triggers when an input event fires over a shape. The first parameter is the viewport where the event took place. The second holds the input event received, and the third the shape of this object where it happened.
+ This signal triggers when an input event fires over a shape. The first parameter is the viewport where the event took place. The second holds the input event received, and the third the shape of this object where it happened.
</description>
</signal>
<signal name="mouse_enter">
<description>
- This event fires only once when the mouse pointer enters any shape of this object.
+ This event fires only once when the mouse pointer enters any shape of this object.
</description>
</signal>
<signal name="mouse_exit">
<description>
- This event fires only once when the mouse pointer exits all shapes of this object.
+ This event fires only once when the mouse pointer exits all shapes of this object.
</description>
</signal>
</signals>
@@ -8179,69 +8204,69 @@
</class>
<class name="CollisionPolygon2D" inherits="Node2D" category="Core">
<brief_description>
- Editor-only class for easy editing of collision polygons.
+ Editor-only class for easy editing of collision polygons.
</brief_description>
<description>
- Editor-only class. This is not present when running the game. It's used in the editor to properly edit and position collision shapes in [CollisionObject2D]. This is not accessible from regular code. This class is for editing custom shape polygons.
+ Editor-only class. This is not present when running the game. It's used in the editor to properly edit and position collision shapes in [CollisionObject2D]. This is not accessible from regular code. This class is for editing custom shape polygons.
</description>
<methods>
<method name="get_build_mode" qualifiers="const">
<return type="int">
</return>
<description>
- Return whether the polygon is a [ConvexPolygonShape2D] ([code]build_mode==0[/code]), or a [ConcavePolygonShape2D] ([code]build_mode==1[/code]).
+ Return whether the polygon is a [ConvexPolygonShape2D] ([code]build_mode==0[/code]), or a [ConcavePolygonShape2D] ([code]build_mode==1[/code]).
</description>
</method>
<method name="get_collision_object_first_shape" qualifiers="const">
<return type="int">
</return>
<description>
- Return the index of the first shape generated by the editor.
- When [code]build_mode[/code] is set to generate convex polygons, the shape shown in the editor may be decomposed into many convex polygons. In that case, a range of indexes is needed to directly access the [Shape2D].
- When [code]build_mode[/code] is set to generate concave polygons, there is only one [Shape2D] generated, so the start index and the end index are the same.
+ Return the index of the first shape generated by the editor.
+ When [code]build_mode[/code] is set to generate convex polygons, the shape shown in the editor may be decomposed into many convex polygons. In that case, a range of indexes is needed to directly access the [Shape2D].
+ When [code]build_mode[/code] is set to generate concave polygons, there is only one [Shape2D] generated, so the start index and the end index are the same.
</description>
</method>
<method name="get_collision_object_last_shape" qualifiers="const">
<return type="int">
</return>
<description>
- Return the index of the last shape generated by the editor.
+ Return the index of the last shape generated by the editor.
</description>
</method>
<method name="get_polygon" qualifiers="const">
<return type="Vector2Array">
</return>
<description>
- Return the list of points that define the polygon.
+ Return the list of points that define the polygon.
</description>
</method>
<method name="is_trigger" qualifiers="const">
<return type="bool">
</return>
<description>
- Return whether this polygon is a trigger.
+ Return whether this polygon is a trigger.
</description>
</method>
<method name="set_build_mode">
<argument index="0" name="build_mode" type="int">
</argument>
<description>
- Set whether the polygon is to be a [ConvexPolygonShape2D] ([code]build_mode==0[/code]), or a [ConcavePolygonShape2D] ([code]build_mode==1[/code]).
+ Set whether the polygon is to be a [ConvexPolygonShape2D] ([code]build_mode==0[/code]), or a [ConcavePolygonShape2D] ([code]build_mode==1[/code]).
</description>
</method>
<method name="set_polygon">
<argument index="0" name="polygon" type="Vector2Array">
</argument>
<description>
- Set the array of points forming the polygon.
- When editing the point list via the editor, depending on [method get_build_mode], it has to be a list of points (for [code]build_mode==0[/code]), or a list of lines (for [code]build_mode==1[/code]). In the second case, the even elements of the array define the start point of the line, and the odd elements the end point.
+ Set the array of points forming the polygon.
+ When editing the point list via the editor, depending on [method get_build_mode], it has to be a list of points (for [code]build_mode==0[/code]), or a list of lines (for [code]build_mode==1[/code]). In the second case, the even elements of the array define the start point of the line, and the odd elements the end point.
</description>
</method>
<method name="set_trigger">
<argument index="0" name="trigger" type="bool">
</argument>
<description>
- Set whether this polygon is a trigger. A trigger polygon detects collisions, but is otherwise unaffected by physics (i.e. colliding objects will not get blocked).
+ Set whether this polygon is a trigger. A trigger polygon detects collisions, but is otherwise unaffected by physics (i.e. colliding objects will not get blocked).
</description>
</method>
</methods>
@@ -8300,45 +8325,45 @@
</class>
<class name="CollisionShape2D" inherits="Node2D" category="Core">
<brief_description>
- Editor-only class for easy editing of shapes.
+ Editor-only class for easy editing of shapes.
</brief_description>
<description>
- Editor-only class. This is not present when running the game. It's used in the editor to properly edit and position collision shapes in [CollisionObject2D]. This is not accessible from regular code.
+ Editor-only class. This is not present when running the game. It's used in the editor to properly edit and position collision shapes in [CollisionObject2D]. This is not accessible from regular code.
</description>
<methods>
<method name="get_collision_object_shape_index" qualifiers="const">
<return type="int">
</return>
<description>
- Return the index of this shape inside its container [CollisionObject2D]. This can be used to directly access the underlying [Shape2D].
+ Return the index of this shape inside its container [CollisionObject2D]. This can be used to directly access the underlying [Shape2D].
</description>
</method>
<method name="get_shape" qualifiers="const">
<return type="Object">
</return>
<description>
- Return this shape's [Shape2D].
+ Return this shape's [Shape2D].
</description>
</method>
<method name="is_trigger" qualifiers="const">
<return type="bool">
</return>
<description>
- Return whether this shape is a trigger.
+ Return whether this shape is a trigger.
</description>
</method>
<method name="set_shape">
<argument index="0" name="shape" type="Object">
</argument>
<description>
- Set this shape's [Shape2D]. This will not appear as a node, but can be directly edited as a property.
+ Set this shape's [Shape2D]. This will not appear as a node, but can be directly edited as a property.
</description>
</method>
<method name="set_trigger">
<argument index="0" name="enable" type="bool">
</argument>
<description>
- Set whether this shape is a trigger. A trigger shape detects collisions, but is otherwise unaffected by physics (i.e. will not block movement of colliding objects).
+ Set whether this shape is a trigger. A trigger shape detects collisions, but is otherwise unaffected by physics (i.e. will not block movement of colliding objects).
</description>
</method>
</methods>
@@ -8347,10 +8372,10 @@
</class>
<class name="Color" category="Built-In Types">
<brief_description>
- Color in RGBA format.
+ Color in RGBA format.
</brief_description>
<description>
- A color is represented as red, green and blue (r,g,b) components. Additionally, "a" represents the alpha component, often used for transparency. Values are in floating point and usually range from 0 to 1. Some methods (such as set_modulate() ) may accept values &gt; 1.
+ A color is represented as red, green and blue (r,g,b) components. Additionally, "a" represents the alpha component, often used for transparency. Values are in floating point and usually range from 0 to 1. Some methods (such as set_modulate() ) may accept values &gt; 1.
</description>
<methods>
<method name="Color">
@@ -8365,7 +8390,7 @@
<argument index="3" name="a" type="float">
</argument>
<description>
- Construct the color from an RGBA profile.
+ Construct the color from an RGBA profile.
</description>
</method>
<method name="Color">
@@ -8378,7 +8403,7 @@
<argument index="2" name="b" type="float">
</argument>
<description>
- Construct the color from an RGBA profile.
+ Construct the color from an RGBA profile.
</description>
</method>
<method name="Color">
@@ -8387,7 +8412,7 @@
<argument index="0" name="from" type="int">
</argument>
<description>
- Construct the color from an RGBA profile.
+ Construct the color from an RGBA profile.
</description>
</method>
<method name="Color">
@@ -8396,7 +8421,7 @@
<argument index="0" name="from" type="String">
</argument>
<description>
- Construct the color from an RGBA profile.
+ Construct the color from an RGBA profile.
</description>
</method>
<method name="blend">
@@ -8405,28 +8430,28 @@
<argument index="0" name="over" type="Color">
</argument>
<description>
- Return a new color blended with anothor one.
+ Return a new color blended with anothor one.
</description>
</method>
<method name="contrasted">
<return type="Color">
</return>
<description>
- Return the most contrasting color with this one.
+ Return the most contrasting color with this one.
</description>
</method>
<method name="gray">
<return type="float">
</return>
<description>
- Convert the color to gray.
+ Convert the color to gray.
</description>
</method>
<method name="inverted">
<return type="Color">
</return>
<description>
- Return the inverted color (1-r, 1-g, 1-b, 1-a).
+ Return the inverted color (1-r, 1-g, 1-b, 1-a).
</description>
</method>
<method name="linear_interpolate">
@@ -8437,21 +8462,21 @@
<argument index="1" name="t" type="float">
</argument>
<description>
- Return the linear interpolation with another color.
+ Return the linear interpolation with another color.
</description>
</method>
<method name="to_32">
<return type="int">
</return>
<description>
- Convert the color to a 32 its integer (each byte represents a RGBA).
+ Convert the color to a 32 its integer (each byte represents a RGBA).
</description>
</method>
<method name="to_ARGB32">
<return type="int">
</return>
<description>
- Convert color to ARGB32, more compatible with DirectX.
+ Convert color to ARGB32, more compatible with DirectX.
</description>
</method>
<method name="to_html">
@@ -8460,7 +8485,7 @@
<argument index="0" name="with_alpha" type="bool" default="True">
</argument>
<description>
- Return the HTML hexadecimal color string.
+ Return the HTML hexadecimal color string.
</description>
</method>
</methods>
@@ -8504,10 +8529,10 @@
</class>
<class name="ColorArray" category="Built-In Types">
<brief_description>
- Array of Colors
+ Array of Colors
</brief_description>
<description>
- Array of Color, can only contains colors. Optimized for memory usage, can't fragment the memory.
+ Array of Color, can only contains colors. Optimized for memory usage, can't fragment the memory.
</description>
<methods>
<method name="ColorArray">
@@ -8516,21 +8541,21 @@
<argument index="0" name="from" type="Array">
</argument>
<description>
- Create from a generic array.
+ Create from a generic array.
</description>
</method>
<method name="append">
<argument index="0" name="color" type="Color">
</argument>
<description>
- Append an element at the end of the array (alias of [method push_back]).
+ Append an element at the end of the array (alias of [method push_back]).
</description>
</method>
<method name="append_array">
<argument index="0" name="array" type="ColorArray">
</argument>
<description>
- Append an [ColorArray] at the end of this array.
+ Append an [ColorArray] at the end of this array.
</description>
</method>
<method name="insert">
@@ -8541,33 +8566,33 @@
<argument index="1" name="color" type="Color">
</argument>
<description>
- Insert a new element at a given position in the array. The position must be valid, or at the end of the array (pos==size()).
+ Insert a new element at a given position in the array. The position must be valid, or at the end of the array (pos==size()).
</description>
</method>
<method name="invert">
<description>
- Reverse the order of the elements in the array (so first element will now be the last).
+ Reverse the order of the elements in the array (so first element will now be the last).
</description>
</method>
<method name="push_back">
<argument index="0" name="color" type="Color">
</argument>
<description>
- Append a value to the array.
+ Append a value to the array.
</description>
</method>
<method name="remove">
<argument index="0" name="idx" type="int">
</argument>
<description>
- Remove an element from the array by index.
+ Remove an element from the array by index.
</description>
</method>
<method name="resize">
<argument index="0" name="idx" type="int">
</argument>
<description>
- Set the size of the [ColorArray]. If larger than the current size it will reserve some space beforehand, and if it is smaller it will cut off the array.
+ Set the size of the [ColorArray]. If larger than the current size it will reserve some space beforehand, and if it is smaller it will cut off the array.
</description>
</method>
<method name="set">
@@ -8576,14 +8601,14 @@
<argument index="1" name="color" type="Color">
</argument>
<description>
- Change the [Color] at the given index.
+ Change the [Color] at the given index.
</description>
</method>
<method name="size">
<return type="int">
</return>
<description>
- Return the array size.
+ Return the array size.
</description>
</method>
</methods>
@@ -8592,59 +8617,59 @@
</class>
<class name="ColorPicker" inherits="BoxContainer" category="Core">
<brief_description>
- Color picker control.
+ Color picker control.
</brief_description>
<description>
- This is a simple color picker [Control]. It's useful for selecting a color from an RGB/RGBA colorspace.
+ This is a simple color picker [Control]. It's useful for selecting a color from an RGB/RGBA colorspace.
</description>
<methods>
<method name="add_preset">
<argument index="0" name="arg0" type="Color">
</argument>
<description>
- Adds the current selected to color to a list of colors (presets), the presets will be displayed in the color picker and the user will be able to select them, notice that the presets list is only for this color picker.
+ Adds the current selected to color to a list of colors (presets), the presets will be displayed in the color picker and the user will be able to select them, notice that the presets list is only for this color picker.
</description>
</method>
<method name="get_color" qualifiers="const">
<return type="Color">
</return>
<description>
- Return the current (edited) color.
+ Return the current (edited) color.
</description>
</method>
<method name="is_editing_alpha" qualifiers="const">
<return type="bool">
</return>
<description>
- Returns whether the color has transparency or not.
+ Returns whether the color has transparency or not.
</description>
</method>
<method name="is_raw_mode" qualifiers="const">
<return type="bool">
</return>
<description>
- Returns whether this color picker is in raw mode or not
+ Returns whether this color picker is in raw mode or not
</description>
</method>
<method name="set_color">
<argument index="0" name="color" type="Color">
</argument>
<description>
- Select the current color.
+ Select the current color.
</description>
</method>
<method name="set_edit_alpha">
<argument index="0" name="show" type="bool">
</argument>
<description>
- Set true if you want the color to have an alpha channel (transparency), or false if you want a solid color.
+ Set true if you want the color to have an alpha channel (transparency), or false if you want a solid color.
</description>
</method>
<method name="set_raw_mode">
<argument index="0" name="mode" type="bool">
</argument>
<description>
- When set to true, every color channel will be represented as a value from 0 to 1, insetead of 0, 255.
+ When set to true, every color channel will be represented as a value from 0 to 1, insetead of 0, 255.
</description>
</method>
</methods>
@@ -8653,7 +8678,7 @@
<argument index="0" name="color" type="Color">
</argument>
<description>
- Emitted when the color is changed.
+ Emitted when the color is changed.
</description>
</signal>
</signals>
@@ -8678,17 +8703,17 @@
</class>
<class name="ColorPickerButton" inherits="Button" category="Core">
<brief_description>
- Button that pops out a [ColorPicker]
+ Button that pops out a [ColorPicker]
</brief_description>
<description>
- Encapsulates a [ColorPicker] making it accesible by pressing a button, pressing the button will toggle the [ColorPicker] visibility
+ Encapsulates a [ColorPicker] making it accesible by pressing a button, pressing the button will toggle the [ColorPicker] visibility
</description>
<methods>
<method name="get_color" qualifiers="const">
<return type="Color">
</return>
<description>
- Gets the current color
+ Gets the current color
</description>
</method>
<method name="get_picker">
@@ -8701,21 +8726,21 @@
<return type="bool">
</return>
<description>
- See [method ColorPicker.is_edit_alpha]
+ See [method ColorPicker.is_edit_alpha]
</description>
</method>
<method name="set_color">
<argument index="0" name="color" type="Color">
</argument>
<description>
- Sets the current color
+ Sets the current color
</description>
</method>
<method name="set_edit_alpha">
<argument index="0" name="show" type="bool">
</argument>
<description>
- See [method ColorPicker.set_edit_alpha]
+ See [method ColorPicker.set_edit_alpha]
</description>
</method>
</methods>
@@ -8724,7 +8749,7 @@
<argument index="0" name="color" type="Color">
</argument>
<description>
- Emitted when the color is changed.
+ Emitted when the color is changed.
</description>
</signal>
</signals>
@@ -8757,10 +8782,10 @@
</class>
<class name="ColorRamp" inherits="Resource" category="Core">
<brief_description>
- Color interpolator node
+ Color interpolator node
</brief_description>
<description>
- Given a set of colors, this node will interpolate them in order, meaning, that if you have color 1, color 2 and color3, the ramp will interpolate (generate the colors between two colors) from color 1 to color 2 and from color 2 to color 3. Initially the ramp will have 2 colors (black and white), one (black) at ramp lower offset offset 0 and the other (white) at the ramp higher offset 1.
+ Given a set of colors, this node will interpolate them in order, meaning, that if you have color 1, color 2 and color3, the ramp will interpolate (generate the colors between two colors) from color 1 to color 2 and from color 2 to color 3. Initially the ramp will have 2 colors (black and white), one (black) at ramp lower offset offset 0 and the other (white) at the ramp higher offset 1.
</description>
<methods>
<method name="add_point">
@@ -8769,7 +8794,7 @@
<argument index="1" name="color" type="Color">
</argument>
<description>
- Adds the specified color to the end of the ramp, with the specified offset
+ Adds the specified color to the end of the ramp, with the specified offset
</description>
</method>
<method name="get_color" qualifiers="const">
@@ -8778,14 +8803,14 @@
<argument index="0" name="point" type="int">
</argument>
<description>
- Returns the color of the ramp color at index [i]point[/i]
+ Returns the color of the ramp color at index [i]point[/i]
</description>
</method>
<method name="get_colors" qualifiers="const">
<return type="ColorArray">
</return>
<description>
- Returns the colors in the ramp
+ Returns the colors in the ramp
</description>
</method>
<method name="get_offset" qualifiers="const">
@@ -8794,21 +8819,21 @@
<argument index="0" name="point" type="int">
</argument>
<description>
- Returns the offset of the ramp color at index [i]point[/i]
+ Returns the offset of the ramp color at index [i]point[/i]
</description>
</method>
<method name="get_offsets" qualifiers="const">
<return type="RealArray">
</return>
<description>
- Returns the offsets for the colors in this ramp
+ Returns the offsets for the colors in this ramp
</description>
</method>
<method name="get_point_count" qualifiers="const">
<return type="int">
</return>
<description>
- Returns the number of colors in the ramp
+ Returns the number of colors in the ramp
</description>
</method>
<method name="interpolate">
@@ -8817,14 +8842,14 @@
<argument index="0" name="offset" type="float">
</argument>
<description>
- Returns the interpolated color specified by [i]offset[/i]
+ Returns the interpolated color specified by [i]offset[/i]
</description>
</method>
<method name="remove_point">
<argument index="0" name="offset" type="int">
</argument>
<description>
- Removes the color at the index [i]offset[/i]
+ Removes the color at the index [i]offset[/i]
</description>
</method>
<method name="set_color">
@@ -8833,14 +8858,14 @@
<argument index="1" name="color" type="Color">
</argument>
<description>
- Sets the color of the ramp color at index [i]point[/i]
+ Sets the color of the ramp color at index [i]point[/i]
</description>
</method>
<method name="set_colors">
<argument index="0" name="colors" type="ColorArray">
</argument>
<description>
- Sets the colors for the specified amount of elements. Calling this function with a different number of elements than previously defined causes the ramp to resize its colors and offsets array to accomodate the new elements.
+ Sets the colors for the specified amount of elements. Calling this function with a different number of elements than previously defined causes the ramp to resize its colors and offsets array to accomodate the new elements.
</description>
</method>
<method name="set_offset">
@@ -8849,14 +8874,14 @@
<argument index="1" name="offset" type="float">
</argument>
<description>
- Sets the offset for the ramp color at index [i]point[/i]
+ Sets the offset for the ramp color at index [i]point[/i]
</description>
</method>
<method name="set_offsets">
<argument index="0" name="offsets" type="RealArray">
</argument>
<description>
- Sets the offset for the specified amount of elements. Calling this function with a different number of elements than previously defined causes the ramp to resize its colors and offsets array to accomodate the new elements, all new colors will be black by default.
+ Sets the offset for the specified amount of elements. Calling this function with a different number of elements than previously defined causes the ramp to resize its colors and offsets array to accomodate the new elements, all new colors will be black by default.
</description>
</method>
</methods>
@@ -8865,24 +8890,24 @@
</class>
<class name="ConcavePolygonShape" inherits="Shape" category="Core">
<brief_description>
- Concave polygon shape.
+ Concave polygon shape.
</brief_description>
<description>
- Concave polygon shape resource, which can be set into a [PhysicsBody] or area. This shape is created by feeding a list of triangles.
+ Concave polygon shape resource, which can be set into a [PhysicsBody] or area. This shape is created by feeding a list of triangles.
</description>
<methods>
<method name="get_faces" qualifiers="const">
<return type="Vector3Array">
</return>
<description>
- Return the faces (an array of triangles).
+ Return the faces (an array of triangles).
</description>
</method>
<method name="set_faces">
<argument index="0" name="faces" type="Vector3Array">
</argument>
<description>
- Set the faces (an array of triangles).
+ Set the faces (an array of triangles).
</description>
</method>
</methods>
@@ -8891,25 +8916,25 @@
</class>
<class name="ConcavePolygonShape2D" inherits="Shape2D" category="Core">
<brief_description>
- Concave polygon 2D shape resource for physics.
+ Concave polygon 2D shape resource for physics.
</brief_description>
<description>
- Concave polygon 2D shape resource for physics. It is made out of segments and is very optimal for complex polygonal concave collisions. It is really not advised to use for [RigidBody2D] nodes. A CollisionPolygon2D in convex decomposition mode (solids) or several convex objects are advised for that instead. Otherwise, a concave polygon 2D shape is better for static collisions.
- The main difference between a [ConvexPolygonShape2D] and a [ConcavePolygonShape2D] is that a concave polygon assumes it is concave and uses a more complex method of collision detection, and a convex one forces itself to be convex in order to speed up collision detection.
+ Concave polygon 2D shape resource for physics. It is made out of segments and is very optimal for complex polygonal concave collisions. It is really not advised to use for [RigidBody2D] nodes. A CollisionPolygon2D in convex decomposition mode (solids) or several convex objects are advised for that instead. Otherwise, a concave polygon 2D shape is better for static collisions.
+ The main difference between a [ConvexPolygonShape2D] and a [ConcavePolygonShape2D] is that a concave polygon assumes it is concave and uses a more complex method of collision detection, and a convex one forces itself to be convex in order to speed up collision detection.
</description>
<methods>
<method name="get_segments" qualifiers="const">
<return type="Vector2Array">
</return>
<description>
- Return the array of segments.
+ Return the array of segments.
</description>
</method>
<method name="set_segments">
<argument index="0" name="segments" type="Vector2Array">
</argument>
<description>
- Set the array of segments.
+ Set the array of segments.
</description>
</method>
</methods>
@@ -8956,23 +8981,23 @@
</class>
<class name="ConfigFile" inherits="Reference" category="Core">
<brief_description>
- Helper class to handle INI-style files.
+ Helper class to handle INI-style files.
</brief_description>
<description>
- This helper class can be used to store [Variant] values on the filesystem using an INI-style formatting. The stored values as referenced by a section and a key. The stored data can be saved to or parsed from a file, though ConfigFile objects can also be used directly with accessing the filesystem.
- The following example shows how to parse a INI-style file from the system, read its contents and store new values in it:
- [codeblock]
- var config = ConfigFile.new()
- var err = config.load("user://settings.cfg")
- if err == OK: # if not, something went wrong with the file loading
- # Look for the display/width pair, and default to 1024 if missing
- var screen_width = get_value("display", "width", 1024)
- # Store a variable if and only it hasn't been defined yet
- if not config.has_section_key("audio", "mute"):
- config.set_value("audio", "mute", false)
- # Save the changes by overwriting the previous file
- config.save("user://settings.cfg")
- [/codeblock]
+ This helper class can be used to store [Variant] values on the filesystem using an INI-style formatting. The stored values as referenced by a section and a key. The stored data can be saved to or parsed from a file, though ConfigFile objects can also be used directly with accessing the filesystem.
+ The following example shows how to parse a INI-style file from the system, read its contents and store new values in it:
+ [codeblock]
+ var config = ConfigFile.new()
+ var err = config.load("user://settings.cfg")
+ if err == OK: # if not, something went wrong with the file loading
+ # Look for the display/width pair, and default to 1024 if missing
+ var screen_width = get_value("display", "width", 1024)
+ # Store a variable if and only it hasn't been defined yet
+ if not config.has_section_key("audio", "mute"):
+ config.set_value("audio", "mute", false)
+ # Save the changes by overwriting the previous file
+ config.save("user://settings.cfg")
+ [/codeblock]
</description>
<methods>
<method name="get_section_keys" qualifiers="const">
@@ -8981,14 +9006,14 @@
<argument index="0" name="section" type="String">
</argument>
<description>
- Return an array of all defined key identifiers in the specified section.
+ Return an array of all defined key identifiers in the specified section.
</description>
</method>
<method name="get_sections" qualifiers="const">
<return type="StringArray">
</return>
<description>
- Return an array of all defined section identifiers.
+ Return an array of all defined section identifiers.
</description>
</method>
<method name="get_value" qualifiers="const">
@@ -9001,7 +9026,7 @@
<argument index="2" name="default" type="Variant" default="NULL">
</argument>
<description>
- Return the current value for the specified section and key. If the section and/or the key do not exist, the method returns the value of the optional [i]default[/i] argument (and thus [code]NULL[/code] if not specified).
+ Return the current value for the specified section and key. If the section and/or the key do not exist, the method returns the value of the optional [i]default[/i] argument (and thus [code]NULL[/code] if not specified).
</description>
</method>
<method name="has_section" qualifiers="const">
@@ -9010,7 +9035,7 @@
<argument index="0" name="section" type="String">
</argument>
<description>
- Check if the specified section exists.
+ Check if the specified section exists.
</description>
</method>
<method name="has_section_key" qualifiers="const">
@@ -9021,7 +9046,7 @@
<argument index="1" name="key" type="String">
</argument>
<description>
- Check if the specified section-key pair exists.
+ Check if the specified section-key pair exists.
</description>
</method>
<method name="load">
@@ -9030,7 +9055,7 @@
<argument index="0" name="path" type="String">
</argument>
<description>
- Load the config file specified as a parameter. The file's contents are parsed and loaded in the ConfigFile object from which the method was called. The return value is one of the OK, FAILED or ERR_* constants listed in [@Global Scope] (if the load was successful, it returns OK).
+ Load the config file specified as a parameter. The file's contents are parsed and loaded in the ConfigFile object from which the method was called. The return value is one of the OK, FAILED or ERR_* constants listed in [@Global Scope] (if the load was successful, it returns OK).
</description>
</method>
<method name="save">
@@ -9039,8 +9064,8 @@
<argument index="0" name="path" type="String">
</argument>
<description>
- Save the contents of the ConfigFile object to the file specified as a parameter. The output file uses an INI-style structure.
- The return value is one of the OK, FAILED or ERR_* constants listed in [@Global Scope] (if the save was successful, it returns OK).
+ Save the contents of the ConfigFile object to the file specified as a parameter. The output file uses an INI-style structure.
+ The return value is one of the OK, FAILED or ERR_* constants listed in [@Global Scope] (if the save was successful, it returns OK).
</description>
</method>
<method name="set_value">
@@ -9051,7 +9076,7 @@
<argument index="2" name="value" type="Variant">
</argument>
<description>
- Assign a value to the specified key of the the specified section. If the section and/or the key do not exist, they are created. Passing a [code]NULL[/code] value deletes the specified key if it exists (and deletes the section if it ends up empty once the key has been removed).
+ Assign a value to the specified key of the the specified section. If the section and/or the key do not exist, they are created. Passing a [code]NULL[/code] value deletes the specified key if it exists (and deletes the section if it ends up empty once the key has been removed).
</description>
</method>
</methods>
@@ -9060,17 +9085,17 @@
</class>
<class name="ConfirmationDialog" inherits="AcceptDialog" category="Core">
<brief_description>
- Dialog for confirmation of actions.
+ Dialog for confirmation of actions.
</brief_description>
<description>
- Dialog for confirmation of actions. This dialog inherits from [AcceptDialog], but has by default an OK and Cancel button (in host OS order).
+ Dialog for confirmation of actions. This dialog inherits from [AcceptDialog], but has by default an OK and Cancel button (in host OS order).
</description>
<methods>
<method name="get_cancel">
<return type="Button">
</return>
<description>
- Return the cancel button.
+ Return the cancel button.
</description>
</method>
</methods>
@@ -9079,11 +9104,11 @@
</class>
<class name="Container" inherits="Control" category="Core">
<brief_description>
- Base node for containers.
+ Base node for containers.
</brief_description>
<description>
- Base node for containers. A [Container] contains other controls and automatically arranges them in a certain way.
- A Control can inherit this to create custom container classes.
+ Base node for containers. A [Container] contains other controls and automatically arranges them in a certain way.
+ A Control can inherit this to create custom container classes.
</description>
<methods>
<method name="fit_child_in_rect">
@@ -9092,19 +9117,19 @@
<argument index="1" name="rect" type="Rect2">
</argument>
<description>
- Fit a child control in a given rect. This is mainly a helper for creating custom container classes.
+ Fit a child control in a given rect. This is mainly a helper for creating custom container classes.
</description>
</method>
<method name="queue_sort">
<description>
- Queue resort of the contained children. This is called automatically anyway, but can be called upon request.
+ Queue resort of the contained children. This is called automatically anyway, but can be called upon request.
</description>
</method>
</methods>
<signals>
<signal name="sort_children">
<description>
- Emitted when sorting the children is needed.
+ Emitted when sorting the children is needed.
</description>
</signal>
</signals>
@@ -9116,28 +9141,28 @@
</class>
<class name="Control" inherits="CanvasItem" category="Core">
<brief_description>
- Control is the base node for all the GUI components.
+ Control is the base node for all the GUI components.
</brief_description>
<description>
- Control is the base class Node for all the GUI components. Every GUI component inherits from it, directly or indirectly. In this way, sections of the scene tree made of contiguous control nodes, become user interfaces.
- Controls are relative to the parent position and size by using anchors and margins. This ensures that they can adapt easily in most situation to changing dialog and screen sizes. When more flexibility is desired, [Container] derived nodes can be used.
- Anchors work by defining which margin do they follow, and a value relative to it. Allowed anchoring modes are ANCHOR_BEGIN, where the margin is relative to the top or left margins of the parent (in pixels), ANCHOR_END for the right and bottom margins of the parent and ANCHOR_RATIO, which is a ratio from 0 to 1 in the parent range.
- Input device events ([InputEvent]) are first sent to the root controls via the [method Node._input], which distribute it through the tree, then delivers them to the adequate one (under cursor or keyboard focus based) by calling [method MainLoop._input_event]. There is no need to enable input processing on controls to receive such events. To ensure that no one else will receive the event (not even [method Node._unhandled_input]), the control can accept it by calling [method accept_event].
- Only one control can hold the keyboard focus (receiving keyboard events), for that the control must define the focus mode with [method set_focus_mode]. Focus is lost when another control gains it, or the current focus owner is hidden.
- It is sometimes desired for a control to ignore mouse/pointer events. This is often the case when placing other controls on top of a button, in such cases. Calling [method set_ignore_mouse] enables this function.
- Finally, controls are skinned according to a [Theme]. Setting a [Theme] on a control will propagate all the skinning down the tree. Optionally, skinning can be overridden per each control by calling the add_*_override functions, or from the editor.
+ Control is the base class Node for all the GUI components. Every GUI component inherits from it, directly or indirectly. In this way, sections of the scene tree made of contiguous control nodes, become user interfaces.
+ Controls are relative to the parent position and size by using anchors and margins. This ensures that they can adapt easily in most situation to changing dialog and screen sizes. When more flexibility is desired, [Container] derived nodes can be used.
+ Anchors work by defining which margin do they follow, and a value relative to it. Allowed anchoring modes are ANCHOR_BEGIN, where the margin is relative to the top or left margins of the parent (in pixels), ANCHOR_END for the right and bottom margins of the parent and ANCHOR_RATIO, which is a ratio from 0 to 1 in the parent range.
+ Input device events ([InputEvent]) are first sent to the root controls via the [method Node._input], which distribute it through the tree, then delivers them to the adequate one (under cursor or keyboard focus based) by calling [method MainLoop._input_event]. There is no need to enable input processing on controls to receive such events. To ensure that no one else will receive the event (not even [method Node._unhandled_input]), the control can accept it by calling [method accept_event].
+ Only one control can hold the keyboard focus (receiving keyboard events), for that the control must define the focus mode with [method set_focus_mode]. Focus is lost when another control gains it, or the current focus owner is hidden.
+ It is sometimes desired for a control to ignore mouse/pointer events. This is often the case when placing other controls on top of a button, in such cases. Calling [method set_ignore_mouse] enables this function.
+ Finally, controls are skinned according to a [Theme]. Setting a [Theme] on a control will propagate all the skinning down the tree. Optionally, skinning can be overridden per each control by calling the add_*_override functions, or from the editor.
</description>
<methods>
<method name="_input_event" qualifiers="virtual">
<argument index="0" name="event" type="InputEvent">
</argument>
<description>
- Called when an input event reaches the control.
+ Called when an input event reaches the control.
</description>
</method>
<method name="accept_event">
<description>
- Handles the event, no other control will receive it and it will not be sent to nodes waiting on [method Node._unhandled_input] or [method Node._unhandled_key_input].
+ Handles the event, no other control will receive it and it will not be sent to nodes waiting on [method Node._unhandled_input] or [method Node._unhandled_key_input].
</description>
</method>
<method name="add_color_override">
@@ -9154,7 +9179,7 @@
<argument index="1" name="constant" type="int">
</argument>
<description>
- Override a single constant (integer) in the theme of this Control. If constant equals Theme.INVALID_CONSTANT, override is cleared.
+ Override a single constant (integer) in the theme of this Control. If constant equals Theme.INVALID_CONSTANT, override is cleared.
</description>
</method>
<method name="add_font_override">
@@ -9163,7 +9188,7 @@
<argument index="1" name="font" type="Font">
</argument>
<description>
- Override a single font (font) in the theme of this Control. If font is empty, override is cleared.
+ Override a single font (font) in the theme of this Control. If font is empty, override is cleared.
</description>
</method>
<method name="add_icon_override">
@@ -9172,7 +9197,7 @@
<argument index="1" name="texture" type="Texture">
</argument>
<description>
- Override a single icon ([Texture]) in the theme of this Control. If texture is empty, override is cleared.
+ Override a single icon ([Texture]) in the theme of this Control. If texture is empty, override is cleared.
</description>
</method>
<method name="add_shader_override">
@@ -9189,7 +9214,7 @@
<argument index="1" name="stylebox" type="StyleBox">
</argument>
<description>
- Override a single stylebox ([Stylebox]) in the theme of this Control. If stylebox is empty, override is cleared.
+ Override a single stylebox ([Stylebox]) in the theme of this Control. If stylebox is empty, override is cleared.
</description>
</method>
<method name="can_drop_data" qualifiers="virtual">
@@ -9224,7 +9249,7 @@
<argument index="0" name="margin" type="int">
</argument>
<description>
- Return the anchor type (ANCHOR_BEGIN, ANCHOR_END, ANCHOR_RATIO) for a given margin (MARGIN_LEFT, MARGIN_TOP, MARGIN_RIGHT, MARGIN_BOTTOM).
+ Return the anchor type (ANCHOR_BEGIN, ANCHOR_END, ANCHOR_RATIO) for a given margin (MARGIN_LEFT, MARGIN_TOP, MARGIN_RIGHT, MARGIN_BOTTOM).
</description>
</method>
<method name="get_begin" qualifiers="const">
@@ -9265,7 +9290,7 @@
<argument index="0" name="pos" type="Vector2" default="Vector2(0,0)">
</argument>
<description>
- Return the cursor shape at a certain position in the control.
+ Return the cursor shape at a certain position in the control.
</description>
</method>
<method name="get_custom_minimum_size" qualifiers="const">
@@ -9278,7 +9303,7 @@
<return type="int">
</return>
<description>
- Return the default cursor shape for this control. See enum CURSOR_* for the list of shapes.
+ Return the default cursor shape for this control. See enum CURSOR_* for the list of shapes.
</description>
</method>
<method name="get_drag_data" qualifiers="virtual">
@@ -9293,14 +9318,14 @@
<return type="Vector2">
</return>
<description>
- Returns MARGIN_LEFT and MARGIN_TOP at the same time. This is a helper (see [method set_margin]).
+ Returns MARGIN_LEFT and MARGIN_TOP at the same time. This is a helper (see [method set_margin]).
</description>
</method>
<method name="get_focus_mode" qualifiers="const">
<return type="int">
</return>
<description>
- Returns the focus access mode for the control (FOCUS_NONE, FOCUS_CLICK, FOCUS_ALL) (see [method set_focus_mode]).
+ Returns the focus access mode for the control (FOCUS_NONE, FOCUS_CLICK, FOCUS_ALL) (see [method set_focus_mode]).
</description>
</method>
<method name="get_focus_neighbour" qualifiers="const">
@@ -9309,14 +9334,14 @@
<argument index="0" name="margin" type="int">
</argument>
<description>
- Return the forced neighbour for moving the input focus to. When pressing TAB or directional/joypad directions focus is moved to the next control in that direction. However, the neighbour to move to can be forced with this function.
+ Return the forced neighbour for moving the input focus to. When pressing TAB or directional/joypad directions focus is moved to the next control in that direction. However, the neighbour to move to can be forced with this function.
</description>
</method>
<method name="get_focus_owner" qualifiers="const">
<return type="Control">
</return>
<description>
- Return which control is owning the keyboard focus, or null if no one.
+ Return which control is owning the keyboard focus, or null if no one.
</description>
</method>
<method name="get_font" qualifiers="const">
@@ -9333,21 +9358,21 @@
<return type="Vector2">
</return>
<description>
- Returns the Control position, relative to the top-left corner of the parent Control and independent of the anchor mode.
+ Returns the Control position, relative to the top-left corner of the parent Control and independent of the anchor mode.
</description>
</method>
<method name="get_global_rect" qualifiers="const">
<return type="Rect2">
</return>
<description>
- Return position and size of the Control, relative to the top-left corner of the [i]window[/i] Control. This is a helper (see [method get_global_pos], [method get_size]).
+ Return position and size of the Control, relative to the top-left corner of the [i]window[/i] Control. This is a helper (see [method get_global_pos], [method get_size]).
</description>
</method>
<method name="get_h_size_flags" qualifiers="const">
<return type="int">
</return>
<description>
- Hint for containers, return horizontal positioning flags.
+ Hint for containers, return horizontal positioning flags.
</description>
</method>
<method name="get_icon" qualifiers="const">
@@ -9366,21 +9391,21 @@
<argument index="0" name="margin" type="int">
</argument>
<description>
- Return a margin offset. Margin can be one of (MARGIN_LEFT, MARGIN_TOP, MARGIN_RIGHT, MARGIN_BOTTOM). Offset value being returned depends on the anchor mode.
+ Return a margin offset. Margin can be one of (MARGIN_LEFT, MARGIN_TOP, MARGIN_RIGHT, MARGIN_BOTTOM). Offset value being returned depends on the anchor mode.
</description>
</method>
<method name="get_minimum_size" qualifiers="const">
<return type="Vector2">
</return>
<description>
- Return the minimum size this Control can shrink to. A control will never be displayed or resized smaller than its minimum size.
+ Return the minimum size this Control can shrink to. A control will never be displayed or resized smaller than its minimum size.
</description>
</method>
<method name="get_minimum_size" qualifiers="virtual">
<return type="Vector2">
</return>
<description>
- Return the minimum size this Control can shrink to. A control will never be displayed or resized smaller than its minimum size.
+ Return the minimum size this Control can shrink to. A control will never be displayed or resized smaller than its minimum size.
</description>
</method>
<method name="get_parent_area_size" qualifiers="const">
@@ -9399,14 +9424,14 @@
<return type="Vector2">
</return>
<description>
- Returns the Control position, relative to the top-left corner of the parent Control and independent of the anchor mode.
+ Returns the Control position, relative to the top-left corner of the parent Control and independent of the anchor mode.
</description>
</method>
<method name="get_rect" qualifiers="const">
<return type="Rect2">
</return>
<description>
- Return position and size of the Control, relative to the top-left corner of the parent Control. This is a helper (see [method get_pos], [method get_size]).
+ Return position and size of the Control, relative to the top-left corner of the parent Control. This is a helper (see [method get_pos], [method get_size]).
</description>
</method>
<method name="get_rotation" qualifiers="const">
@@ -9431,14 +9456,14 @@
<return type="Vector2">
</return>
<description>
- Returns the size of the Control, computed from all margins, however the size returned will [b]never be smaller than the minimum size reported by [method get_minimum_size][/b]. This means that even if end position of the Control rectangle is smaller than the begin position, the Control will still display and interact correctly. (see description, [method get_minimum_size], [method set_margin], [method set_anchor]).
+ Returns the size of the Control, computed from all margins, however the size returned will [b]never be smaller than the minimum size reported by [method get_minimum_size][/b]. This means that even if end position of the Control rectangle is smaller than the begin position, the Control will still display and interact correctly. (see description, [method get_minimum_size], [method set_margin], [method set_anchor]).
</description>
</method>
<method name="get_stretch_ratio" qualifiers="const">
<return type="float">
</return>
<description>
- Hint for containers, return the stretch ratio. This value is relative to other stretch ratio, so if this control has 2 and another has 1, this one will be twice as big.
+ Hint for containers, return the stretch ratio. This value is relative to other stretch ratio, so if this control has 2 and another has 1, this one will be twice as big.
</description>
</method>
<method name="get_stylebox" qualifiers="const">
@@ -9455,7 +9480,7 @@
<return type="Theme">
</return>
<description>
- Return a [Theme] override, if one exists (see [method set_theme]).
+ Return a [Theme] override, if one exists (see [method set_theme]).
</description>
</method>
<method name="get_tooltip" qualifiers="const">
@@ -9464,14 +9489,14 @@
<argument index="0" name="atpos" type="Vector2" default="Vector2(0,0)">
</argument>
<description>
- Return the tooltip, which will appear when the cursor is resting over this control.
+ Return the tooltip, which will appear when the cursor is resting over this control.
</description>
</method>
<method name="get_v_size_flags" qualifiers="const">
<return type="int">
</return>
<description>
- Hint for containers, return vertical positioning flags.
+ Hint for containers, return vertical positioning flags.
</description>
</method>
<method name="grab_click_focus">
@@ -9480,7 +9505,7 @@
</method>
<method name="grab_focus">
<description>
- Steal the focus from another control and become the focused control (see [method set_focus_mode]).
+ Steal the focus from another control and become the focused control (see [method set_focus_mode]).
</description>
</method>
<method name="has_color" qualifiers="const">
@@ -9523,7 +9548,7 @@
<return type="bool">
</return>
<description>
- Return whether the Control is the current focused control (see [method set_focus_mode]).
+ Return whether the Control is the current focused control (see [method set_focus_mode]).
</description>
</method>
<method name="has_font" qualifiers="const">
@@ -9584,7 +9609,7 @@
<return type="bool">
</return>
<description>
- Return if the control is ignoring mouse events (even touchpad events send mouse events).
+ Return if the control is ignoring mouse events (even touchpad events send mouse events).
</description>
</method>
<method name="is_stopping_mouse" qualifiers="const">
@@ -9599,7 +9624,7 @@
</method>
<method name="release_focus">
<description>
- Give up the focus, no other control will be able to receive keyboard input.
+ Give up the focus, no other control will be able to receive keyboard input.
</description>
</method>
<method name="set_anchor">
@@ -9610,9 +9635,8 @@
<argument index="2" name="keep_margin" type="bool" default="false">
</argument>
<description>
- Change the anchor (ANCHOR_BEGIN, ANCHOR_END, ANCHOR_RATIO) type for a margin (MARGIN_LEFT, MARGIN_TOP, MARGIN_RIGHT, MARGIN_BOTTOM). Changing the anchor mode converts the current margin offset from the previous anchor mode to the new one, so margin offsets ([method set_margin]) must be done after setting anchors, or at the same time ([method set_anchor_and_margin])
-
- Additionally, [code]keep_margin[/code] controls whether margins should be left the same, or changed to keep the same position and size on-screen.
+ Change the anchor (ANCHOR_BEGIN, ANCHOR_END, ANCHOR_RATIO) type for a margin (MARGIN_LEFT, MARGIN_TOP, MARGIN_RIGHT, MARGIN_BOTTOM). Changing the anchor mode converts the current margin offset from the previous anchor mode to the new one, so margin offsets ([method set_margin]) must be done after setting anchors, or at the same time ([method set_anchor_and_margin])
+ Additionally, [code]keep_margin[/code] controls whether margins should be left the same, or changed to keep the same position and size on-screen.
</description>
</method>
<method name="set_anchor_and_margin">
@@ -9623,21 +9647,21 @@
<argument index="2" name="offset" type="float">
</argument>
<description>
- Change the anchor (ANCHOR_BEGIN, ANCHOR_END, ANCHOR_RATIO) type for a margin (MARGIN_LEFT, MARGIN_TOP, MARGIN_RIGHT, MARGIN_BOTTOM), and also set its offset. This is a helper (see [method set_anchor] and [method set_margin]).
+ Change the anchor (ANCHOR_BEGIN, ANCHOR_END, ANCHOR_RATIO) type for a margin (MARGIN_LEFT, MARGIN_TOP, MARGIN_RIGHT, MARGIN_BOTTOM), and also set its offset. This is a helper (see [method set_anchor] and [method set_margin]).
</description>
</method>
<method name="set_area_as_parent_rect">
<argument index="0" name="margin" type="int" default="0">
</argument>
<description>
- Change all margins and anchors, so this Control always takes up the same area as the parent Control. This is a helper (see [method set_anchor], [method set_margin]).
+ Change all margins and anchors, so this Control always takes up the same area as the parent Control. This is a helper (see [method set_anchor], [method set_margin]).
</description>
</method>
<method name="set_begin">
<argument index="0" name="pos" type="Vector2">
</argument>
<description>
- Sets MARGIN_LEFT and MARGIN_TOP at the same time. This is a helper (see [method set_margin]).
+ Sets MARGIN_LEFT and MARGIN_TOP at the same time. This is a helper (see [method set_margin]).
</description>
</method>
<method name="set_custom_minimum_size">
@@ -9650,7 +9674,7 @@
<argument index="0" name="shape" type="int">
</argument>
<description>
- Set the default cursor shape for this control. See enum CURSOR_* for the list of shapes.
+ Set the default cursor shape for this control. See enum CURSOR_* for the list of shapes.
</description>
</method>
<method name="set_drag_forwarding">
@@ -9669,14 +9693,14 @@
<argument index="0" name="pos" type="Vector2">
</argument>
<description>
- Sets MARGIN_RIGHT and MARGIN_BOTTOM at the same time. This is a helper (see [method set_margin]).
+ Sets MARGIN_RIGHT and MARGIN_BOTTOM at the same time. This is a helper (see [method set_margin]).
</description>
</method>
<method name="set_focus_mode">
<argument index="0" name="mode" type="int">
</argument>
<description>
- Set the focus access mode for the control (FOCUS_NONE, FOCUS_CLICK, FOCUS_ALL). Only one Control can be focused at the same time, and it will receive keyboard signals.
+ Set the focus access mode for the control (FOCUS_NONE, FOCUS_CLICK, FOCUS_ALL). Only one Control can be focused at the same time, and it will receive keyboard signals.
</description>
</method>
<method name="set_focus_neighbour">
@@ -9685,28 +9709,28 @@
<argument index="1" name="neighbour" type="NodePath">
</argument>
<description>
- Force a neighbour for moving the input focus to. When pressing TAB or directional/joypad directions focus is moved to the next control in that direction. However, the neighbour to move to can be forced with this function.
+ Force a neighbour for moving the input focus to. When pressing TAB or directional/joypad directions focus is moved to the next control in that direction. However, the neighbour to move to can be forced with this function.
</description>
</method>
<method name="set_global_pos">
<argument index="0" name="pos" type="Vector2">
</argument>
<description>
- Move the Control to a new position, relative to the top-left corner of the [i]window[/i] Control, and without changing current anchor mode. (see [method set_margin]).
+ Move the Control to a new position, relative to the top-left corner of the [i]window[/i] Control, and without changing current anchor mode. (see [method set_margin]).
</description>
</method>
<method name="set_h_size_flags">
<argument index="0" name="flags" type="int">
</argument>
<description>
- Hint for containers, set horizontal positioning flags.
+ Hint for containers, set horizontal positioning flags.
</description>
</method>
<method name="set_ignore_mouse">
<argument index="0" name="ignore" type="bool">
</argument>
<description>
- Ignore mouse events on this control (even touchpad events send mouse events).
+ Ignore mouse events on this control (even touchpad events send mouse events).
</description>
</method>
<method name="set_margin">
@@ -9715,14 +9739,14 @@
<argument index="1" name="offset" type="float">
</argument>
<description>
- Set a margin offset. Margin can be one of (MARGIN_LEFT, MARGIN_TOP, MARGIN_RIGHT, MARGIN_BOTTOM). Offset value being set depends on the anchor mode.
+ Set a margin offset. Margin can be one of (MARGIN_LEFT, MARGIN_TOP, MARGIN_RIGHT, MARGIN_BOTTOM). Offset value being set depends on the anchor mode.
</description>
</method>
<method name="set_pos">
<argument index="0" name="pos" type="Vector2">
</argument>
<description>
- Move the Control to a new position, relative to the top-left corner of the parent Control, changing all margins if needed and without changing current anchor mode. This is a helper (see [method set_margin]).
+ Move the Control to a new position, relative to the top-left corner of the parent Control, changing all margins if needed and without changing current anchor mode. This is a helper (see [method set_margin]).
</description>
</method>
<method name="set_rotation">
@@ -9747,7 +9771,7 @@
<argument index="0" name="size" type="Vector2">
</argument>
<description>
- Changes MARGIN_RIGHT and MARGIN_BOTTOM to fit a given size. This is a helper (see [method set_margin]).
+ Changes MARGIN_RIGHT and MARGIN_BOTTOM to fit a given size. This is a helper (see [method set_margin]).
</description>
</method>
<method name="set_stop_mouse">
@@ -9760,35 +9784,35 @@
<argument index="0" name="ratio" type="float">
</argument>
<description>
- Hint for containers, set the stretch ratio. This value is relative to other stretch ratio, so if this control has 2 and another has 1, this one will be twice as big.
+ Hint for containers, set the stretch ratio. This value is relative to other stretch ratio, so if this control has 2 and another has 1, this one will be twice as big.
</description>
</method>
<method name="set_theme">
<argument index="0" name="theme" type="Theme">
</argument>
<description>
- Override whole the [Theme] for this Control and all its children controls.
+ Override whole the [Theme] for this Control and all its children controls.
</description>
</method>
<method name="set_tooltip">
<argument index="0" name="tooltip" type="String">
</argument>
<description>
- Set a tooltip, which will appear when the cursor is resting over this control.
+ Set a tooltip, which will appear when the cursor is resting over this control.
</description>
</method>
<method name="set_v_size_flags">
<argument index="0" name="flags" type="int">
</argument>
<description>
- Hint for containers, set vertical positioning flags.
+ Hint for containers, set vertical positioning flags.
</description>
</method>
<method name="show_modal">
<argument index="0" name="exclusive" type="bool" default="false">
</argument>
<description>
- Display a Control as modal. Control must be a subwindow. Modal controls capture the input signals until closed or the area outside them is accessed. When a modal control loses focus, or the ESC key is pressed, they automatically hide. Modal controls are used extensively for popup dialogs and menus.
+ Display a Control as modal. Control must be a subwindow. Modal controls capture the input signals until closed or the area outside them is accessed. When a modal control loses focus, or the ESC key is pressed, they automatically hide. Modal controls are used extensively for popup dialogs and menus.
</description>
</method>
<method name="warp_mouse">
@@ -9801,24 +9825,24 @@
<signals>
<signal name="focus_enter">
<description>
- Emitted when keyboard focus is gained.
+ Emitted when keyboard focus is gained.
</description>
</signal>
<signal name="focus_exit">
<description>
- Emitted when the keyboard focus is lost.
+ Emitted when the keyboard focus is lost.
</description>
</signal>
<signal name="input_event">
<argument index="0" name="ev" type="InputEvent">
</argument>
<description>
- Emitted when an input event is received. Connecting in realtime is recommended for accepting the events.
+ Emitted when an input event is received. Connecting in realtime is recommended for accepting the events.
</description>
</signal>
<signal name="minimum_size_changed">
<description>
- Emitted when the minimum size of the control changed.
+ Emitted when the minimum size of the control changed.
</description>
</signal>
<signal name="modal_close">
@@ -9827,22 +9851,22 @@
</signal>
<signal name="mouse_enter">
<description>
- Emitted when the mouse enters the control area.
+ Emitted when the mouse enters the control area.
</description>
</signal>
<signal name="mouse_exit">
<description>
- Emitted when the mouse left the control area.
+ Emitted when the mouse left the control area.
</description>
</signal>
<signal name="resized">
<description>
- Emitted when the control changed size.
+ Emitted when the control changed size.
</description>
</signal>
<signal name="size_flags_changed">
<description>
- Emitted when the size flags changed.
+ Emitted when the size flags changed.
</description>
</signal>
</signals>
@@ -9932,10 +9956,10 @@
</class>
<class name="ConvexPolygonShape" inherits="Shape" category="Core">
<brief_description>
- Convex Polygon Shape.
+ Convex Polygon Shape.
</brief_description>
<description>
- Convex polygon shape resource, which can be set into a [PhysicsBody] or area.
+ Convex polygon shape resource, which can be set into a [PhysicsBody] or area.
</description>
<methods>
<method name="get_points" qualifiers="const">
@@ -9956,32 +9980,32 @@
</class>
<class name="ConvexPolygonShape2D" inherits="Shape2D" category="Core">
<brief_description>
- Convex Polygon Shape for 2D physics.
+ Convex Polygon Shape for 2D physics.
</brief_description>
<description>
- Convex Polygon Shape for 2D physics. A convex polygon, whatever its shape, is internally decomposed into as many convex polygons as needed to ensure all collision checks against it are always done on convex polygons (which are faster to check).
- The main difference between a [ConvexPolygonShape2D] and a [ConcavePolygonShape2D] is that a concave polygon assumes it is concave and uses a more complex method of collision detection, and a convex one forces itself to be convex in order to speed up collision detection.
+ Convex Polygon Shape for 2D physics. A convex polygon, whatever its shape, is internally decomposed into as many convex polygons as needed to ensure all collision checks against it are always done on convex polygons (which are faster to check).
+ The main difference between a [ConvexPolygonShape2D] and a [ConcavePolygonShape2D] is that a concave polygon assumes it is concave and uses a more complex method of collision detection, and a convex one forces itself to be convex in order to speed up collision detection.
</description>
<methods>
<method name="get_points" qualifiers="const">
<return type="Vector2Array">
</return>
<description>
- Return a list of points in either clockwise or counter clockwise order, forming a convex polygon.
+ Return a list of points in either clockwise or counter clockwise order, forming a convex polygon.
</description>
</method>
<method name="set_point_cloud">
<argument index="0" name="point_cloud" type="Vector2Array">
</argument>
<description>
- Currently, this method does nothing.
+ Currently, this method does nothing.
</description>
</method>
<method name="set_points">
<argument index="0" name="points" type="Vector2Array">
</argument>
<description>
- Set a list of points in either clockwise or counter clockwise order, forming a convex polygon.
+ Set a list of points in either clockwise or counter clockwise order, forming a convex polygon.
</description>
</method>
</methods>
@@ -10096,11 +10120,11 @@
</class>
<class name="Curve2D" inherits="Resource" category="Core">
<brief_description>
- Describes a Bezier curve in 2D space.
+ Describes a Bezier curve in 2D space.
</brief_description>
<description>
- This class describes a Bezier curve in 2D space. It is mainly used to give a shape to a [Path2D], but can be manually sampled for other purposes.
-It keeps a cache of precalculated points along the curve, to speed further calculations up.
+ This class describes a Bezier curve in 2D space. It is mainly used to give a shape to a [Path2D], but can be manually sampled for other purposes.
+ It keeps a cache of precalculated points along the curve, to speed further calculations up.
</description>
<methods>
<method name="add_point">
@@ -10113,36 +10137,36 @@ It keeps a cache of precalculated points along the curve, to speed further calcu
<argument index="3" name="atpos" type="int" default="-1">
</argument>
<description>
- Adds a point to a curve, at position "pos", with control points "in" and "out".
-If "atpos" is given, the point is inserted before the point number "atpos", moving that point (and every point after) after the inserted point. If "atpos" is not given, or is an illegal value (atpos &lt;0 or atpos &gt;= [method get_point_count]), the point will be appended at the end of the point list.
+ Adds a point to a curve, at position "pos", with control points "in" and "out".
+ If "atpos" is given, the point is inserted before the point number "atpos", moving that point (and every point after) after the inserted point. If "atpos" is not given, or is an illegal value (atpos &lt;0 or atpos &gt;= [method get_point_count]), the point will be appended at the end of the point list.
</description>
</method>
<method name="get_bake_interval" qualifiers="const">
<return type="float">
</return>
<description>
- Returns the distance between two adjacent cached points.
+ Returns the distance between two adjacent cached points.
</description>
</method>
<method name="get_baked_length" qualifiers="const">
<return type="float">
</return>
<description>
- Returns the total length of the curve, based on the cached points. Given enough density (see [method set_bake_interval]), it should be approximate enough.
+ Returns the total length of the curve, based on the cached points. Given enough density (see [method set_bake_interval]), it should be approximate enough.
</description>
</method>
<method name="get_baked_points" qualifiers="const">
<return type="Vector2Array">
</return>
<description>
- Returns the cache of points as a [Vector2Array].
+ Returns the cache of points as a [Vector2Array].
</description>
</method>
<method name="get_point_count" qualifiers="const">
<return type="int">
</return>
<description>
- Returns the number of points describing the curve.
+ Returns the number of points describing the curve.
</description>
</method>
<method name="get_point_in" qualifiers="const">
@@ -10151,7 +10175,7 @@ If "atpos" is given, the point is inserted before the point number "atpos", movi
<argument index="0" name="idx" type="int">
</argument>
<description>
- Returns the position of the control point leading to the vertex "idx". If the index is out of bounds, the function sends an error to the console, and returns (0, 0).
+ Returns the position of the control point leading to the vertex "idx". If the index is out of bounds, the function sends an error to the console, and returns (0, 0).
</description>
</method>
<method name="get_point_out" qualifiers="const">
@@ -10160,7 +10184,7 @@ If "atpos" is given, the point is inserted before the point number "atpos", movi
<argument index="0" name="idx" type="int">
</argument>
<description>
- Returns the position of the control point leading out of the vertex "idx". If the index is out of bounds, the function sends an error to the console, and returns (0, 0).
+ Returns the position of the control point leading out of the vertex "idx". If the index is out of bounds, the function sends an error to the console, and returns (0, 0).
</description>
</method>
<method name="get_point_pos" qualifiers="const">
@@ -10169,7 +10193,7 @@ If "atpos" is given, the point is inserted before the point number "atpos", movi
<argument index="0" name="idx" type="int">
</argument>
<description>
- Returns the position of the vertex "idx". If the index is out of bounds, the function sends an error to the console, and returns (0, 0).
+ Returns the position of the vertex "idx". If the index is out of bounds, the function sends an error to the console, and returns (0, 0).
</description>
</method>
<method name="interpolate" qualifiers="const">
@@ -10180,8 +10204,8 @@ If "atpos" is given, the point is inserted before the point number "atpos", movi
<argument index="1" name="t" type="float">
</argument>
<description>
- Returns the position between the vertex "idx" and the vertex "idx"+1, where "t" controls if the point is the first vertex (t = 0.0), the last vertex (t = 1.0), or in between. Values of "t" outside the range (0.0 &gt;= t &lt;=1) give strange, but predictable results.
-If "idx" is out of bounds it is truncated to the first or last vertex, and "t" is ignored. If the curve has no points, the function sends an error to the console, and returns (0, 0).
+ Returns the position between the vertex "idx" and the vertex "idx"+1, where "t" controls if the point is the first vertex (t = 0.0), the last vertex (t = 1.0), or in between. Values of "t" outside the range (0.0 &gt;= t &lt;=1) give strange, but predictable results.
+ If "idx" is out of bounds it is truncated to the first or last vertex, and "t" is ignored. If the curve has no points, the function sends an error to the console, and returns (0, 0).
</description>
</method>
<method name="interpolate_baked" qualifiers="const">
@@ -10192,9 +10216,9 @@ If "idx" is out of bounds it is truncated to the first or last vertex, and "t" i
<argument index="1" name="cubic" type="bool" default="false">
</argument>
<description>
- Returns a point within the curve at position "offset", where "offset" is measured as a pixel distance along the curve.
-To do that, it finds the two cached points where the "offset" lies between, then interpolates the values. This interpolation is cubic if "cubic" is set to true, or linear if set to false.
-Cubic interpolation tends to follow the curves better, but linear is faster (and often, precise enough).
+ Returns a point within the curve at position "offset", where "offset" is measured as a pixel distance along the curve.
+ To do that, it finds the two cached points where the "offset" lies between, then interpolates the values. This interpolation is cubic if "cubic" is set to true, or linear if set to false.
+ Cubic interpolation tends to follow the curves better, but linear is faster (and often, precise enough).
</description>
</method>
<method name="interpolatef" qualifiers="const">
@@ -10203,21 +10227,21 @@ Cubic interpolation tends to follow the curves better, but linear is faster (and
<argument index="0" name="fofs" type="float">
</argument>
<description>
- Returns the position at the vertex "fofs". It calls [method interpolate] using the integer part of fofs as "idx", and its fractional part as "t".
+ Returns the position at the vertex "fofs". It calls [method interpolate] using the integer part of fofs as "idx", and its fractional part as "t".
</description>
</method>
<method name="remove_point">
<argument index="0" name="idx" type="int">
</argument>
<description>
- Deletes the point "idx" from the curve. Sends an error to the console if "idx" is out of bounds.
+ Deletes the point "idx" from the curve. Sends an error to the console if "idx" is out of bounds.
</description>
</method>
<method name="set_bake_interval">
<argument index="0" name="distance" type="float">
</argument>
<description>
- Sets the distance in pixels between two adjacent cached points. Changing it forces the cache to be recomputed the next time a xxx_baked_xxx function is called. The less distance, the more points the cache will have, and the more memory it will consume, so use with care.
+ Sets the distance in pixels between two adjacent cached points. Changing it forces the cache to be recomputed the next time a xxx_baked_xxx function is called. The less distance, the more points the cache will have, and the more memory it will consume, so use with care.
</description>
</method>
<method name="set_point_in">
@@ -10226,7 +10250,7 @@ Cubic interpolation tends to follow the curves better, but linear is faster (and
<argument index="1" name="pos" type="Vector2">
</argument>
<description>
- Sets the position of the control point leading to the vertex "idx". If the index is out of bounds, the function sends an error to the console.
+ Sets the position of the control point leading to the vertex "idx". If the index is out of bounds, the function sends an error to the console.
</description>
</method>
<method name="set_point_out">
@@ -10235,7 +10259,7 @@ Cubic interpolation tends to follow the curves better, but linear is faster (and
<argument index="1" name="pos" type="Vector2">
</argument>
<description>
- Sets the position of the control point leading out of the vertex "idx". If the index is out of bounds, the function sends an error to the console.
+ Sets the position of the control point leading out of the vertex "idx". If the index is out of bounds, the function sends an error to the console.
</description>
</method>
<method name="set_point_pos">
@@ -10244,7 +10268,7 @@ Cubic interpolation tends to follow the curves better, but linear is faster (and
<argument index="1" name="pos" type="Vector2">
</argument>
<description>
- Sets the position for the vertex "idx". If the index is out of bounds, the function sends an error to the console.
+ Sets the position for the vertex "idx". If the index is out of bounds, the function sends an error to the console.
</description>
</method>
<method name="tesselate" qualifiers="const">
@@ -10255,10 +10279,10 @@ Cubic interpolation tends to follow the curves better, but linear is faster (and
<argument index="1" name="tolerance_degrees" type="float" default="4">
</argument>
<description>
- Returns a list of points along the curve, with a curvature controlled point density. That is, the curvier parts will have more points than the straighter parts.
-This approximation makes straight segments between each point, then subdivides those segments until the resulting shape is similar enough.
-"max_stages" controls how many subdivisions a curve segment may face before it is considered approximate enough. Each subdivision splits the segment in half, so the default 5 stages may mean up to 32 subdivisions per curve segment. Increase with care!
-"tolerance_degrees" controls how many degrees the midpoint of a segment may deviate from the real curve, before the segment has to be subdivided.
+ Returns a list of points along the curve, with a curvature controlled point density. That is, the curvier parts will have more points than the straighter parts.
+ This approximation makes straight segments between each point, then subdivides those segments until the resulting shape is similar enough.
+ "max_stages" controls how many subdivisions a curve segment may face before it is considered approximate enough. Each subdivision splits the segment in half, so the default 5 stages may mean up to 32 subdivisions per curve segment. Increase with care!
+ "tolerance_degrees" controls how many degrees the midpoint of a segment may deviate from the real curve, before the segment has to be subdivided.
</description>
</method>
</methods>
@@ -10267,11 +10291,11 @@ This approximation makes straight segments between each point, then subdivides t
</class>
<class name="Curve3D" inherits="Resource" category="Core">
<brief_description>
- Describes a Bezier curve in 3D space.
+ Describes a Bezier curve in 3D space.
</brief_description>
<description>
- This class describes a Bezier curve in 3D space. It is mainly used to give a shape to a [Path], but can be manually sampled for other purposes.
-It keeps a cache of precalculated points along the curve, to speed further calculations up.
+ This class describes a Bezier curve in 3D space. It is mainly used to give a shape to a [Path], but can be manually sampled for other purposes.
+ It keeps a cache of precalculated points along the curve, to speed further calculations up.
</description>
<methods>
<method name="add_point">
@@ -10284,43 +10308,43 @@ It keeps a cache of precalculated points along the curve, to speed further calcu
<argument index="3" name="atpos" type="int" default="-1">
</argument>
<description>
- Adds a point to a curve, at position "pos", with control points "in" and "out".
-If "atpos" is given, the point is inserted before the point number "atpos", moving that point (and every point after) after the inserted point. If "atpos" is not given, or is an illegal value (atpos &lt;0 or atpos &gt;= [method get_point_count]), the point will be appended at the end of the point list.
+ Adds a point to a curve, at position "pos", with control points "in" and "out".
+ If "atpos" is given, the point is inserted before the point number "atpos", moving that point (and every point after) after the inserted point. If "atpos" is not given, or is an illegal value (atpos &lt;0 or atpos &gt;= [method get_point_count]), the point will be appended at the end of the point list.
</description>
</method>
<method name="get_bake_interval" qualifiers="const">
<return type="float">
</return>
<description>
- Returns the distance between two adjacent cached points.
+ Returns the distance between two adjacent cached points.
</description>
</method>
<method name="get_baked_length" qualifiers="const">
<return type="float">
</return>
<description>
- Returns the total length of the curve, based on the cached points. Given enough density (see [method set_bake_interval]), it should be approximate enough.
+ Returns the total length of the curve, based on the cached points. Given enough density (see [method set_bake_interval]), it should be approximate enough.
</description>
</method>
<method name="get_baked_points" qualifiers="const">
<return type="Vector3Array">
</return>
<description>
- Returns the cache of points as a [Vector3Array].
+ Returns the cache of points as a [Vector3Array].
</description>
</method>
<method name="get_baked_tilts" qualifiers="const">
<return type="RealArray">
</return>
<description>
- Returns the cache of tilts as a [RealArray].
+ Returns the cache of tilts as a [RealArray].
</description>
</method>
<method name="get_point_count" qualifiers="const">
<return type="int">
</return>
<description>
- Returns the number of points describing the curve.
+ Returns the number of points describing the curve.
</description>
</method>
<method name="get_point_in" qualifiers="const">
@@ -10329,7 +10353,7 @@ If "atpos" is given, the point is inserted before the point number "atpos", movi
<argument index="0" name="idx" type="int">
</argument>
<description>
- Returns the position of the control point leading to the vertex "idx". If the index is out of bounds, the function sends an error to the console, and returns (0, 0, 0).
+ Returns the position of the control point leading to the vertex "idx". If the index is out of bounds, the function sends an error to the console, and returns (0, 0, 0).
</description>
</method>
<method name="get_point_out" qualifiers="const">
@@ -10338,7 +10362,7 @@ If "atpos" is given, the point is inserted before the point number "atpos", movi
<argument index="0" name="idx" type="int">
</argument>
<description>
- Returns the position of the control point leading out of the vertex "idx". If the index is out of bounds, the function sends an error to the console, and returns (0, 0, 0).
+ Returns the position of the control point leading out of the vertex "idx". If the index is out of bounds, the function sends an error to the console, and returns (0, 0, 0).
</description>
</method>
<method name="get_point_pos" qualifiers="const">
@@ -10347,7 +10371,7 @@ If "atpos" is given, the point is inserted before the point number "atpos", movi
<argument index="0" name="idx" type="int">
</argument>
<description>
- Returns the position of the vertex "idx". If the index is out of bounds, the function sends an error to the console, and returns (0, 0, 0).
+ Returns the position of the vertex "idx". If the index is out of bounds, the function sends an error to the console, and returns (0, 0, 0).
</description>
</method>
<method name="get_point_tilt" qualifiers="const">
@@ -10356,7 +10380,7 @@ If "atpos" is given, the point is inserted before the point number "atpos", movi
<argument index="0" name="idx" type="int">
</argument>
<description>
- Returns the tilt angle in radians for the point "idx". If the index is out of bounds, the function sends an error to the console, and returns 0.
+ Returns the tilt angle in radians for the point "idx". If the index is out of bounds, the function sends an error to the console, and returns 0.
</description>
</method>
<method name="interpolate" qualifiers="const">
@@ -10367,8 +10391,8 @@ If "atpos" is given, the point is inserted before the point number "atpos", movi
<argument index="1" name="t" type="float">
</argument>
<description>
- Returns the position between the vertex "idx" and the vertex "idx"+1, where "t" controls if the point is the first vertex (t = 0.0), the last vertex (t = 1.0), or in between. Values of "t" outside the range (0.0 &gt;= t &lt;=1) give strange, but predictable results.
-If "idx" is out of bounds it is truncated to the first or last vertex, and "t" is ignored. If the curve has no points, the function sends an error to the console, and returns (0, 0, 0).
+ Returns the position between the vertex "idx" and the vertex "idx"+1, where "t" controls if the point is the first vertex (t = 0.0), the last vertex (t = 1.0), or in between. Values of "t" outside the range (0.0 &gt;= t &lt;=1) give strange, but predictable results.
+ If "idx" is out of bounds it is truncated to the first or last vertex, and "t" is ignored. If the curve has no points, the function sends an error to the console, and returns (0, 0, 0).
</description>
</method>
<method name="interpolate_baked" qualifiers="const">
@@ -10379,9 +10403,9 @@ If "idx" is out of bounds it is truncated to the first or last vertex, and "t" i
<argument index="1" name="cubic" type="bool" default="false">
</argument>
<description>
- Returns a point within the curve at position "offset", where "offset" is measured as a distance in 3D units along the curve.
-To do that, it finds the two cached points where the "offset" lies between, then interpolates the values. This interpolation is cubic if "cubic" is set to true, or linear if set to false.
-Cubic interpolation tends to follow the curves better, but linear is faster (and often, precise enough).
+ Returns a point within the curve at position "offset", where "offset" is measured as a distance in 3D units along the curve.
+ To do that, it finds the two cached points where the "offset" lies between, then interpolates the values. This interpolation is cubic if "cubic" is set to true, or linear if set to false.
+ Cubic interpolation tends to follow the curves better, but linear is faster (and often, precise enough).
</description>
</method>
<method name="interpolatef" qualifiers="const">
@@ -10390,21 +10414,21 @@ Cubic interpolation tends to follow the curves better, but linear is faster (and
<argument index="0" name="fofs" type="float">
</argument>
<description>
- Returns the position at the vertex "fofs". It calls [method interpolate] using the integer part of fofs as "idx", and its fractional part as "t".
+ Returns the position at the vertex "fofs". It calls [method interpolate] using the integer part of fofs as "idx", and its fractional part as "t".
</description>
</method>
<method name="remove_point">
<argument index="0" name="idx" type="int">
</argument>
<description>
- Deletes the point "idx" from the curve. Sends an error to the console if "idx" is out of bounds.
+ Deletes the point "idx" from the curve. Sends an error to the console if "idx" is out of bounds.
</description>
</method>
<method name="set_bake_interval">
<argument index="0" name="distance" type="float">
</argument>
<description>
- Sets the distance in 3D units between two adjacent cached points. Changing it forces the cache to be recomputed the next time a xxx_baked_xxx function is called. The less distance, the more points the cache will have, and the more memory it will consume, so use with care.
+ Sets the distance in 3D units between two adjacent cached points. Changing it forces the cache to be recomputed the next time a xxx_baked_xxx function is called. The less distance, the more points the cache will have, and the more memory it will consume, so use with care.
</description>
</method>
<method name="set_point_in">
@@ -10413,7 +10437,7 @@ Cubic interpolation tends to follow the curves better, but linear is faster (and
<argument index="1" name="pos" type="Vector3">
</argument>
<description>
- Sets the position of the control point leading to the vertex "idx". If the index is out of bounds, the function sends an error to the console.
+ Sets the position of the control point leading to the vertex "idx". If the index is out of bounds, the function sends an error to the console.
</description>
</method>
<method name="set_point_out">
@@ -10422,7 +10446,7 @@ Cubic interpolation tends to follow the curves better, but linear is faster (and
<argument index="1" name="pos" type="Vector3">
</argument>
<description>
- Sets the position of the control point leading out of the vertex "idx". If the index is out of bounds, the function sends an error to the console.
+ Sets the position of the control point leading out of the vertex "idx". If the index is out of bounds, the function sends an error to the console.
</description>
</method>
<method name="set_point_pos">
@@ -10431,7 +10455,7 @@ Cubic interpolation tends to follow the curves better, but linear is faster (and
<argument index="1" name="pos" type="Vector3">
</argument>
<description>
- Sets the position for the vertex "idx". If the index is out of bounds, the function sends an error to the console.
+ Sets the position for the vertex "idx". If the index is out of bounds, the function sends an error to the console.
</description>
</method>
<method name="set_point_tilt">
@@ -10440,8 +10464,8 @@ Cubic interpolation tends to follow the curves better, but linear is faster (and
<argument index="1" name="tilt" type="float">
</argument>
<description>
- Sets the tilt angle in radians for the point "idx". If the index is out of bounds, the function sends an error to the console.
-The tilt controls the rotation along the look-at axis an object traveling the path would have. In the case of a curve controlling a [PathFollow], this tilt is an offset over the natural tilt the PathFollow calculates.
+ Sets the tilt angle in radians for the point "idx". If the index is out of bounds, the function sends an error to the console.
+ The tilt controls the rotation along the look-at axis an object traveling the path would have. In the case of a curve controlling a [PathFollow], this tilt is an offset over the natural tilt the PathFollow calculates.
</description>
</method>
<method name="tesselate" qualifiers="const">
@@ -10452,10 +10476,10 @@ The tilt controls the rotation along the look-at axis an object traveling the pa
<argument index="1" name="tolerance_degrees" type="float" default="4">
</argument>
<description>
- Returns a list of points along the curve, with a curvature controlled point density. That is, the curvier parts will have more points than the straighter parts.
-This approximation makes straight segments between each point, then subdivides those segments until the resulting shape is similar enough.
-"max_stages" controls how many subdivisions a curve segment may face before it is considered approximate enough. Each subdivision splits the segment in half, so the default 5 stages may mean up to 32 subdivisions per curve segment. Increase with care!
-"tolerance_degrees" controls how many degrees the midpoint of a segment may deviate from the real curve, before the segment has to be subdivided.
+ Returns a list of points along the curve, with a curvature controlled point density. That is, the curvier parts will have more points than the straighter parts.
+ This approximation makes straight segments between each point, then subdivides those segments until the resulting shape is similar enough.
+ "max_stages" controls how many subdivisions a curve segment may face before it is considered approximate enough. Each subdivision splits the segment in half, so the default 5 stages may mean up to 32 subdivisions per curve segment. Increase with care!
+ "tolerance_degrees" controls how many degrees the midpoint of a segment may deviate from the real curve, before the segment has to be subdivided.
</description>
</method>
</methods>
@@ -10464,66 +10488,66 @@ This approximation makes straight segments between each point, then subdivides t
</class>
<class name="DampedSpringJoint2D" inherits="Joint2D" category="Core">
<brief_description>
- Damped spring constraint for 2D physics.
+ Damped spring constraint for 2D physics.
</brief_description>
<description>
- Damped spring constraint for 2D physics. This resembles a spring joint that always wants to go back to a given length.
+ Damped spring constraint for 2D physics. This resembles a spring joint that always wants to go back to a given length.
</description>
<methods>
<method name="get_damping" qualifiers="const">
<return type="float">
</return>
<description>
- Return the damping ratio of the spring joint. A value of 0 indicates an undamped spring, while 1 causes the system to reach equilibrium as fast as possible (critical damping).
+ Return the damping ratio of the spring joint. A value of 0 indicates an undamped spring, while 1 causes the system to reach equilibrium as fast as possible (critical damping).
</description>
</method>
<method name="get_length" qualifiers="const">
<return type="float">
</return>
<description>
- Return the maximum length of the spring joint.
+ Return the maximum length of the spring joint.
</description>
</method>
<method name="get_rest_length" qualifiers="const">
<return type="float">
</return>
<description>
- Return the resting length of the spring joint. The joint will always try to go to back this length when pulled apart.
+ Return the resting length of the spring joint. The joint will always try to go to back this length when pulled apart.
</description>
</method>
<method name="get_stiffness" qualifiers="const">
<return type="float">
</return>
<description>
- Return the stiffness of the spring joint. The joint applies a force equal to the stiffness times the distance from its resting length.
+ Return the stiffness of the spring joint. The joint applies a force equal to the stiffness times the distance from its resting length.
</description>
</method>
<method name="set_damping">
<argument index="0" name="damping" type="float">
</argument>
<description>
- Set the damping ratio of the spring joint. A value of 0 indicates an undamped spring, while 1 causes the system to reach equilibrium as fast as possible (critical damping).
+ Set the damping ratio of the spring joint. A value of 0 indicates an undamped spring, while 1 causes the system to reach equilibrium as fast as possible (critical damping).
</description>
</method>
<method name="set_length">
<argument index="0" name="length" type="float">
</argument>
<description>
- Set the maximum length of the spring joint.
+ Set the maximum length of the spring joint.
</description>
</method>
<method name="set_rest_length">
<argument index="0" name="rest_length" type="float">
</argument>
<description>
- Set the resting length of the spring joint. The joint will always try to go to back this length when pulled apart.
+ Set the resting length of the spring joint. The joint will always try to go to back this length when pulled apart.
</description>
</method>
<method name="set_stiffness">
<argument index="0" name="stiffness" type="float">
</argument>
<description>
- Set the stiffness of the spring joint. The joint applies a force equal to the stiffness times the distance from its resting length.
+ Set the stiffness of the spring joint. The joint applies a force equal to the stiffness times the distance from its resting length.
</description>
</method>
</methods>
@@ -10532,29 +10556,29 @@ This approximation makes straight segments between each point, then subdivides t
</class>
<class name="Dictionary" category="Built-In Types">
<brief_description>
- Dictionary type.
+ Dictionary type.
</brief_description>
<description>
- Dictionary type. Associative container which contains values referenced by unique keys. Dictionaries are always passed by reference.
+ Dictionary type. Associative container which contains values referenced by unique keys. Dictionaries are always passed by reference.
</description>
<methods>
<method name="clear">
<description>
- Clear the dictionary, removing all key/value pairs.
+ Clear the dictionary, removing all key/value pairs.
</description>
</method>
<method name="empty">
<return type="bool">
</return>
<description>
- Return true if the dictionary is empty.
+ Return true if the dictionary is empty.
</description>
</method>
<method name="erase">
<argument index="0" name="key" type="var">
</argument>
<description>
- Erase a dictionary key/value pair by key.
+ Erase a dictionary key/value pair by key.
</description>
</method>
<method name="has">
@@ -10563,7 +10587,7 @@ This approximation makes straight segments between each point, then subdivides t
<argument index="0" name="key" type="var">
</argument>
<description>
- Return true if the dictionary has a given key.
+ Return true if the dictionary has a given key.
</description>
</method>
<method name="has_all">
@@ -10572,21 +10596,21 @@ This approximation makes straight segments between each point, then subdivides t
<argument index="0" name="keys" type="Array">
</argument>
<description>
- Return true if the dictionary has all of the keys in the given array.
+ Return true if the dictionary has all of the keys in the given array.
</description>
</method>
<method name="hash">
<return type="int">
</return>
<description>
- Return a hashed integer value representing the dictionary contents.
+ Return a hashed integer value representing the dictionary contents.
</description>
</method>
<method name="keys">
<return type="Array">
</return>
<description>
- Return the list of keys in the [Dictionary].
+ Return the list of keys in the [Dictionary].
</description>
</method>
<method name="parse_json">
@@ -10595,28 +10619,28 @@ This approximation makes straight segments between each point, then subdivides t
<argument index="0" name="json" type="String">
</argument>
<description>
- Parse json text to the dictionary. Return OK when successed or the error code when failed.
+ Parse json text to the dictionary. Return OK when successed or the error code when failed.
</description>
</method>
<method name="size">
<return type="int">
</return>
<description>
- Return the size of the dictionary (in pairs).
+ Return the size of the dictionary (in pairs).
</description>
</method>
<method name="to_json">
<return type="String">
</return>
<description>
- Return the dictionary as json text.
+ Return the dictionary as json text.
</description>
</method>
<method name="values">
<return type="Array">
</return>
<description>
- Return the list of values in the [Dictionary].
+ Return the list of values in the [Dictionary].
</description>
</method>
</methods>
@@ -10625,10 +10649,10 @@ This approximation makes straight segments between each point, then subdivides t
</class>
<class name="DirectionalLight" inherits="Light" category="Core">
<brief_description>
- Directional Light, such as the Sun or the Moon.
+ Directional Light, such as the Sun or the Moon.
</brief_description>
<description>
- A DirectionalLight is a type of [Light] node that emits light constantly in one direction (the negative z axis of the node). It is used lights with strong intensity that are located far away from the scene to model sunlight or moonlight. The worldspace location of the DirectionalLight transform (origin) is ignored, only the basis is used do determine light direction.
+ A DirectionalLight is a type of [Light] node that emits light constantly in one direction (the negative z axis of the node). It is used lights with strong intensity that are located far away from the scene to model sunlight or moonlight. The worldspace location of the DirectionalLight transform (origin) is ignored, only the basis is used do determine light direction.
</description>
<methods>
<method name="get_shadow_mode" qualifiers="const">
@@ -10679,26 +10703,26 @@ This approximation makes straight segments between each point, then subdivides t
</class>
<class name="Directory" inherits="Reference" category="Core">
<brief_description>
- Type used to handle the filesystem.
+ Type used to handle the filesystem.
</brief_description>
<description>
- Directory type. It is used to manage directories and their content (not restricted to the project folder).
- Here is an example on how to iterate through the files of a directory:
- [codeblock]
- func dir_contents(path):
- var dir = Directory.new()
- if dir.open(path) == OK:
- dir.list_dir_begin()
- var file_name = dir.get_next()
- while (file_name != ""):
- if dir.current_is_dir():
- print("Found directory: " + file_name)
- else:
- print("Found file: " + file_name)
- file_name = dir.get_next()
- else:
- print("An error occurred when trying to access the path.")
- [/codeblock]
+ Directory type. It is used to manage directories and their content (not restricted to the project folder).
+ Here is an example on how to iterate through the files of a directory:
+ [codeblock]
+ func dir_contents(path):
+ var dir = Directory.new()
+ if dir.open(path) == OK:
+ dir.list_dir_begin()
+ var file_name = dir.get_next()
+ while (file_name != ""):
+ if dir.current_is_dir():
+ print("Found directory: " + file_name)
+ else:
+ print("Found file: " + file_name)
+ file_name = dir.get_next()
+ else:
+ print("An error occurred when trying to access the path.")
+ [/codeblock]
</description>
<methods>
<method name="change_dir">
@@ -10707,8 +10731,8 @@ This approximation makes straight segments between each point, then subdivides t
<argument index="0" name="todir" type="String">
</argument>
<description>
- Change the currently opened directory to the one passed as an argument. The argument can be relative to the current directory (e.g. [code]newdir[/code] or [code]../newdir[/code]), or an absolute path (e.g. [code]/tmp/newdir[/code] or [code]res://somedir/newdir[/code]).
- The method returns one of the error code constants defined in [@Global Scope] (OK or ERR_*).
+ Change the currently opened directory to the one passed as an argument. The argument can be relative to the current directory (e.g. [code]newdir[/code] or [code]../newdir[/code]), or an absolute path (e.g. [code]/tmp/newdir[/code] or [code]res://somedir/newdir[/code]).
+ The method returns one of the error code constants defined in [@Global Scope] (OK or ERR_*).
</description>
</method>
<method name="copy">
@@ -10719,15 +10743,15 @@ This approximation makes straight segments between each point, then subdivides t
<argument index="1" name="to" type="String">
</argument>
<description>
- Copy the [i]from[/i] file to the [i]to[/i] destination. Both arguments should be paths to files, either relative or absolute. If the destination file exists and is not access-protected, it will be overwritten.
- Returns one of the error code constants defined in [@Global Scope] (OK, FAILED or ERR_*).
+ Copy the [i]from[/i] file to the [i]to[/i] destination. Both arguments should be paths to files, either relative or absolute. If the destination file exists and is not access-protected, it will be overwritten.
+ Returns one of the error code constants defined in [@Global Scope] (OK, FAILED or ERR_*).
</description>
</method>
<method name="current_is_dir" qualifiers="const">
<return type="bool">
</return>
<description>
- Return whether the current item processed with the last [method get_next] call is a directory ([code].[/code] and [code]..[/code] are considered directories).
+ Return whether the current item processed with the last [method get_next] call is a directory ([code].[/code] and [code]..[/code] are considered directories).
</description>
</method>
<method name="dir_exists">
@@ -10736,7 +10760,7 @@ This approximation makes straight segments between each point, then subdivides t
<argument index="0" name="path" type="String">
</argument>
<description>
- Return whether the target directory exists. The argument can be relative to the current directory, or an absolute path.
+ Return whether the target directory exists. The argument can be relative to the current directory, or an absolute path.
</description>
</method>
<method name="file_exists">
@@ -10745,14 +10769,14 @@ This approximation makes straight segments between each point, then subdivides t
<argument index="0" name="path" type="String">
</argument>
<description>
- Return whether the target file exists. The argument can be relative to the current directory, or an absolute path.
+ Return whether the target file exists. The argument can be relative to the current directory, or an absolute path.
</description>
</method>
<method name="get_current_dir">
<return type="String">
</return>
<description>
- Return the absolute path to the currently opened directory (e.g. [code]res://folder[/code] or [code]C:\tmp\folder[/code]).
+ Return the absolute path to the currently opened directory (e.g. [code]res://folder[/code] or [code]C:\tmp\folder[/code]).
</description>
</method>
<method name="get_drive">
@@ -10761,41 +10785,41 @@ This approximation makes straight segments between each point, then subdivides t
<argument index="0" name="idx" type="int">
</argument>
<description>
- On Windows, return the name of the drive (partition) passed as an argument (e.g. [code]C:[/code]). On other platforms, or if the requested drive does not existed, the method returns an empty String.
+ On Windows, return the name of the drive (partition) passed as an argument (e.g. [code]C:[/code]). On other platforms, or if the requested drive does not existed, the method returns an empty String.
</description>
</method>
<method name="get_drive_count">
<return type="int">
</return>
<description>
- On Windows, return the number of drives (partitions) mounted on the current filesystem. On other platforms, the method returns 0.
+ On Windows, return the number of drives (partitions) mounted on the current filesystem. On other platforms, the method returns 0.
</description>
</method>
<method name="get_next">
<return type="String">
</return>
<description>
- Return the next element (file or directory) in the current directory (including [code].[/code] and [code]..[/code]). The name of the file or directory is returned (and not its full path). Once the stream has been fully processed, the method returns an empty String and closes the stream automatically (i.e. [method list_dir_end] would not be mandatory in such a case).
+ Return the next element (file or directory) in the current directory (including [code].[/code] and [code]..[/code]). The name of the file or directory is returned (and not its full path). Once the stream has been fully processed, the method returns an empty String and closes the stream automatically (i.e. [method list_dir_end] would not be mandatory in such a case).
</description>
</method>
<method name="get_space_left">
<return type="int">
</return>
<description>
- On Unix desktop systems, return the available space on the current directory's disk. On other platforms, this information is not available and the method returns 0 or -1.
+ On Unix desktop systems, return the available space on the current directory's disk. On other platforms, this information is not available and the method returns 0 or -1.
</description>
</method>
<method name="list_dir_begin">
<return type="bool">
</return>
<description>
- Initialise the stream used to list all files and directories using the [method get_next] function, closing the current opened stream if needed. Once the stream has been processed, it should typically be closed with [method list_dir_end].
- Return false if the stream could not be initialised.
+ Initialise the stream used to list all files and directories using the [method get_next] function, closing the current opened stream if needed. Once the stream has been processed, it should typically be closed with [method list_dir_end].
+ Return false if the stream could not be initialised.
</description>
</method>
<method name="list_dir_end">
<description>
- Close the current stream opened with [method list_dir_begin] (whether it has been fully processed with [method get_next] or not does not matter).
+ Close the current stream opened with [method list_dir_begin] (whether it has been fully processed with [method get_next] or not does not matter).
</description>
</method>
<method name="make_dir">
@@ -10804,8 +10828,8 @@ This approximation makes straight segments between each point, then subdivides t
<argument index="0" name="path" type="String">
</argument>
<description>
- Create a directory. The argument can be relative to the current directory, or an absolute path. The target directory should be placed in an already existing directory (to create the full path recursively, see [method make_dir_recursive]).
- The method returns one of the error code constants defined in [@Global Scope] (OK, FAILED or ERR_*).
+ Create a directory. The argument can be relative to the current directory, or an absolute path. The target directory should be placed in an already existing directory (to create the full path recursively, see [method make_dir_recursive]).
+ The method returns one of the error code constants defined in [@Global Scope] (OK, FAILED or ERR_*).
</description>
</method>
<method name="make_dir_recursive">
@@ -10814,8 +10838,8 @@ This approximation makes straight segments between each point, then subdivides t
<argument index="0" name="path" type="String">
</argument>
<description>
- Create a target directory and all necessary intermediate directories in its path, by calling [method make_dir] recursively. The argument can be relative to the current directory, or an absolute path.
- Returns one of the error code constants defined in [@Global Scope] (OK, FAILED or ERR_*).
+ Create a target directory and all necessary intermediate directories in its path, by calling [method make_dir] recursively. The argument can be relative to the current directory, or an absolute path.
+ Return one of the error code constants defined in [@Global Scope] (OK, FAILED or ERR_*).
</description>
</method>
<method name="open">
@@ -10824,8 +10848,8 @@ This approximation makes straight segments between each point, then subdivides t
<argument index="0" name="path" type="String">
</argument>
<description>
- Open an existing directory of the filesystem. The [i]path[/i] argument can be within the project tree ([code]res://folder[/code]), the user directory ([code]user://folder[/code]) or an absolute path of the user filesystem (e.g. [code]/tmp/folder[/code] or [code]C:\tmp\folder[/code]).
- The method returns one of the error code constants defined in [@Global Scope] (OK or ERR_*).
+ Open an existing directory of the filesystem. The [i]path[/i] argument can be within the project tree ([code]res://folder[/code]), the user directory ([code]user://folder[/code]) or an absolute path of the user filesystem (e.g. [code]/tmp/folder[/code] or [code]C:\tmp\folder[/code]).
+ The method returns one of the error code constants defined in [@Global Scope] (OK or ERR_*).
</description>
</method>
<method name="remove">
@@ -10834,8 +10858,8 @@ This approximation makes straight segments between each point, then subdivides t
<argument index="0" name="path" type="String">
</argument>
<description>
- Delete the target file or an empty directory. The argument can be relative to the current directory, or an absolute path. If the target directory is not empty, the operation will fail.
- Returns one of the error code constants defined in [@Global Scope] (OK or FAILED).
+ Delete the target file or an empty directory. The argument can be relative to the current directory, or an absolute path. If the target directory is not empty, the operation will fail.
+ Return one of the error code constants defined in [@Global Scope] (OK or FAILED).
</description>
</method>
<method name="rename">
@@ -10846,8 +10870,8 @@ This approximation makes straight segments between each point, then subdivides t
<argument index="1" name="to" type="String">
</argument>
<description>
- Rename (move) the [i]from[/i] file to the [i]to[/i] destination. Both arguments should be paths to files, either relative or absolute. If the destination file exists and is not access-protected, it will be overwritten.
- Returns one of the error code constants defined in [@Global Scope] (OK or FAILED).
+ Rename (move) the [i]from[/i] file to the [i]to[/i] destination. Both arguments should be paths to files, either relative or absolute. If the destination file exists and is not access-protected, it will be overwritten.
+ Return one of the error code constants defined in [@Global Scope] (OK or FAILED).
</description>
</method>
</methods>
@@ -10946,11 +10970,10 @@ This approximation makes straight segments between each point, then subdivides t
</class>
<class name="EditorExportPlugin" inherits="Reference" category="Core">
<brief_description>
- Editor plugin to control the export process.
+ Editor plugin to control the export process.
</brief_description>
<description>
- This plugin is added into EditorImportExport and allows to modify
- the behavior of the export process for individual files.
+ This plugin is added into EditorImportExport and allows to modify the behavior of the export process for individual files.
</description>
<methods>
<method name="custom_export" qualifiers="virtual">
@@ -10961,24 +10984,10 @@ This approximation makes straight segments between each point, then subdivides t
<argument index="1" name="platform" type="EditorExportPlatform">
</argument>
<description>
- This function is called for each file exported and
- depending from the return value one of many things
- might happen.
-
- 1) If returned value is null, the file is exported
- as is.
-
- 2) If the returned value is a RawAray (array of
- bytes), the content of that array becomes the new
- file being exported.
-
- 3) If the file must also change it's name when
- exported, then a [Dictionary] must be returned with
- two fields: 'name' with the new filename and 'data'
- with a [RawArray] containing the raw contents of the
- file. Even if the name is changed, the run-time will
- redirect the old file to the new file automatically
- when accessed.
+ This function is called for each file exported and depending from the return value one of many things might happen.
+ 1) If returned value is null, the file is exported as is.
+ 2) If the returned value is a RawAray (array of bytes), the content of that array becomes the new file being exported.
+ 3) If the file must also change it's name when exported, then a [Dictionary] must be returned with two fields: 'name' with the new filename and 'data' with a [RawArray] containing the raw contents of the file. Even if the name is changed, the run-time will redirect the old file to the new file automatically when accessed.
</description>
</method>
</methods>
@@ -11149,14 +11158,10 @@ This approximation makes straight segments between each point, then subdivides t
</class>
<class name="EditorImportPlugin" inherits="Reference" category="Core">
<brief_description>
- Import plugin for editor
+ Import plugin for editor
</brief_description>
<description>
- Import plugins make it easy to handle importing of external assets
- into a project.
-
- They way they work is not that obvious though, so please make sure
- to read the documentation, tutorials and examples.
+ Import plugins make it easy to handle importing of external assets into a project. They way they work is not that obvious though, so please make sure to read the documentation, tutorials and examples.
</description>
<methods>
<method name="can_reimport_multiple_files" qualifiers="virtual">
@@ -11173,14 +11178,8 @@ This approximation makes straight segments between each point, then subdivides t
<argument index="1" name="platform" type="EditorExportPlatform">
</argument>
<description>
- Generally, files that are imported stay the same
- when exported. The only exception is in some cases
- when the file must be re-imported for different
- platforms (ie. texture compression).
-
- If you want to customize the export process, it's
- recommended to use [EditorExportPlugin.custom_export]
- instead.
+ Generally, files that are imported stay the same when exported. The only exception is in some cases when the file must be re-imported for different platforms (ie. texture compression).
+ If you want to customize the export process, it's recommended to use [method EditorExportPlugin.custom_export] instead.
</description>
</method>
<method name="expand_source_path">
@@ -11195,18 +11194,14 @@ This approximation makes straight segments between each point, then subdivides t
<return type="String">
</return>
<description>
- Get the name of the import plugin, which will be
- used to identify content imported by this plugin.
-
- Try to use lowecase and underscores if possible.
+ Get the name of the import plugin, which will be used to identify content imported by this plugin. Try to use lowercase and underscores if possible.
</description>
</method>
<method name="get_visible_name" qualifiers="virtual">
<return type="String">
</return>
<description>
- Visible name for this plugin, which will be shown on
- the import menu.
+ Visible name for this plugin, which will be shown on the import menu.
</description>
</method>
<method name="import" qualifiers="virtual">
@@ -11217,51 +11212,21 @@ This approximation makes straight segments between each point, then subdivides t
<argument index="1" name="from" type="ResourceImportMetadata">
</argument>
<description>
- Perform an import of an external resources into the
- project. This function is both called on import
- (from the dialog) or re-import
- (manual or automatic when external source files
- changed).
-
- An import process generally works like this:
-
- 1) Check the metadata for source files and options.
- Metadata is either generated in the import dialog or
- taken from an existing resource upon reimport.
-
- 2) Perform the import process into a new resource.
- Some times the resource being re-imported may be already loaded
- and in use, so checking for this by using
- [ResourceLoader.has] is recommended. Otherwise
- create a new resource.
-
- 3) Set the metadata from the argument into the existing or new
- resource being created using
- [Resource.set_import_metadata].
-
- 4) Save the resource into 'path' (function argument)
+ Perform an import of an external resources into the project. This function is both called on import (from the dialog) or re-import (manual or automatic when external source files changed).
+ An import process generally works like this:
+ 1) Check the metadata for source files and options. Metadata is either generated in the import dialog or taken from an existing resource upon reimport.
+ 2) Perform the import process into a new resource. Some times the resource being re-imported may be already loaded and in use, so checking for this by using [method ResourceLoader.has] is recommended. Otherwise create a new resource.
+ 3) Set the metadata from the argument into the existing or new resource being created using [method Resource.set_import_metadata].
+ 4) Save the resource into 'path' (function argument)
</description>
</method>
<method name="import_dialog" qualifiers="virtual">
<argument index="0" name="from" type="String">
</argument>
<description>
- This function is called when either the user chooses
- to import a resource of this type (Import menu), or
- when the user chooses to re-import the resource
- (from filesystem). In the later case, the path for
- the existing file is supplied in the argument.
-
- If the path is supplied, it is recommended to read
- the import metadata with
- [ResourceLoader.load_import_metadata] and fill in
- the fields with the values contained there.
-
- The dialog can be shown in any way (just use a
- ConfirmationDialog and pop it up). Upon
- confirmation, fill up a ResourceImportMetadata and
- call the [EditorImportPlugin.import] function with
- this information.
+ This function is called when either the user chooses to import a resource of this type (Import menu), or when the user chooses to re-import the resource (from filesystem). In the later case, the path for the existing file is supplied in the argument.
+ If the path is supplied, it is recommended to read the import metadata with [method ResourceLoader.load_import_metadata] and fill in the fields with the values contained there.
+ The dialog can be shown in any way (just use a ConfirmationDialog and pop it up). Upon confirmation, fill up a ResourceImportMetadata and call the [method EditorImportPlugin.import] function with this information.
</description>
</method>
<method name="import_from_drop" qualifiers="virtual">
@@ -11292,12 +11257,10 @@ This approximation makes straight segments between each point, then subdivides t
</class>
<class name="EditorPlugin" inherits="Node" category="Core">
<brief_description>
- Used by the editor to extend it's functionality.
+ Used by the editor to extend it's functionality.
</brief_description>
<description>
- Plugins are used by the editor to extend functionality. The most
- common types of plugins are those which edit a given node or
- resource type, import plugins and export plugins.
+ Plugins are used by the editor to extend functionality. The most common types of plugins are those which edit a given node or resource type, import plugins and export plugins.
</description>
<methods>
<method name="add_control_to_bottom_panel">
@@ -11306,12 +11269,7 @@ This approximation makes straight segments between each point, then subdivides t
<argument index="1" name="title" type="String">
</argument>
<description>
- Add a control to the bottom panel (together with
- Output, Debug, Animation, etc).
-
- If your plugin is being removed, also make sure to
- remove your control by calling [method
- remove_control_from_bottom_panel].
+ Add a control to the bottom panel (together with Output, Debug, Animation, etc). If your plugin is being removed, also make sure to remove your control by calling [method remove_control_from_bottom_panel].
</description>
</method>
<method name="add_control_to_container">
@@ -11320,16 +11278,9 @@ This approximation makes straight segments between each point, then subdivides t
<argument index="1" name="control" type="Control">
</argument>
<description>
- Add a custom control to a container (see
- CONTAINER_* enum). There are many locations where
- custom controls can be added in the editor UI.
-
- Please remember that you have to manage the
- visibility of your custom controls yourself (and likely
- hide it after adding it).
-
- If your plugin is being removed, also make sure to
- remove your custom controls too.
+ Add a custom control to a container (see CONTAINER_* enum). There are many locations where custom controls can be added in the editor UI.
+ Please remember that you have to manage the visibility of your custom controls yourself (and likely hide it after adding it).
+ If your plugin is being removed, also make sure to remove your custom controls too.
</description>
</method>
<method name="add_control_to_dock">
@@ -11338,16 +11289,9 @@ This approximation makes straight segments between each point, then subdivides t
<argument index="1" name="control" type="Control">
</argument>
<description>
- Add the control to a specific dock slot (see DOCK_*
- enum for options).
-
- If the dock is repositioned and as long as the
- plugin is active, the editor will save the dock
- position on further sessions.
-
- If your plugin is being removed, also make sure to
- remove your control by calling [method
- remove_control_from_docks].
+ Add the control to a specific dock slot (see DOCK_* enum for options).
+ If the dock is repositioned and as long as the plugin is active, the editor will save the dock position on further sessions.
+ If your plugin is being removed, also make sure to remove your control by calling [method remove_control_from_docks].
</description>
</method>
<method name="add_custom_type">
@@ -11360,63 +11304,36 @@ This approximation makes straight segments between each point, then subdivides t
<argument index="3" name="icon" type="Texture">
</argument>
<description>
- Add a custom type, which will appear in the list of
- nodes or resources. An icon can be optionally
- passed.
-
- When given node or resource is selected, the base
- type will be instanced (ie, "Spatial", "Control",
- "Resource"), then the script will be loaded and set
- to this object.
-
- You can use the [EditorPlugin.handles] to check if
- your custom object is being edited by checking the
- script or using 'extends' keyword.
-
- During run-time, this will be a simple object with a
- script so this function does not need to be called
- then.
+ Add a custom type, which will appear in the list of nodes or resources. An icon can be optionally passed.
+ When given node or resource is selected, the base type will be instanced (ie, "Spatial", "Control", "Resource"), then the script will be loaded and set to this object.
+ You can use the [method EditorPlugin.handles] to check if your custom object is being edited by checking the script or using 'extends' keyword.
+ During run-time, this will be a simple object with a script so this function does not need to be called then.
</description>
</method>
<method name="add_export_plugin">
<argument index="0" name="plugin" type="EditorExportPlugin">
</argument>
<description>
- Add an export plugin. Plugins of this kind can
- change files being exported. On exit don't forget to
- call [method remove_export_plugin].
+ Add an export plugin. Plugins of this kind can change files being exported. On exit don't forget to call [method remove_export_plugin].
</description>
</method>
<method name="add_import_plugin">
<argument index="0" name="plugin" type="EditorImportPlugin">
</argument>
<description>
- Add an import plugin. These plugins manage importing
- external content (from outside the project) into
- formats the engine can understand.
-
- On exit, don't forget to remove the plugin by
- calling [method remove_import_plugin]
+ Add an import plugin. These plugins manage importing external content (from outside the project) into formats the engine can understand.
+ On exit, don't forget to remove the plugin by calling [method remove_import_plugin]
</description>
</method>
<method name="apply_changes" qualifiers="virtual">
<description>
- This method is called when the editor is about to
- save the project, switch to another tab, etc. It
- asks the plugin to apply any pending state changes
- to ensure consistency.
-
- This is used, for example, in shader editors to let
- the plugin know that it must apply the shader code
- being written by the user to the object.
+ This method is called when the editor is about to save the project, switch to another tab, etc. It asks the plugin to apply any pending state changes to ensure consistency.
+ This is used, for example, in shader editors to let the plugin know that it must apply the shader code being written by the user to the object.
</description>
</method>
<method name="clear" qualifiers="virtual">
<description>
- Clear all the state and reset the object being
- edited to zero. This ensures your plugin does not
- keep editing a currently existing node, or a node
- fromt the wrong scene.
+ Clear all the state and reset the object being edited to zero. This ensures your plugin does not keep editing a currently existing node, or a node from the wrong scene.
</description>
</method>
<method name="create_spatial_gizmo" qualifiers="virtual">
@@ -11425,18 +11342,14 @@ This approximation makes straight segments between each point, then subdivides t
<argument index="0" name="for_spatial" type="Spatial">
</argument>
<description>
- This is used for plugins that create gizmos used by
- the spatial editor. Just check that the node passed
- in the "for_spatial" argument matches your plugin.
+ This is used for plugins that create gizmos used by the spatial editor. Just check that the node passed in the "for_spatial" argument matches your plugin.
</description>
</method>
<method name="edit" qualifiers="virtual">
<argument index="0" name="object" type="Object">
</argument>
<description>
- This function is used for plugins that edit specific
- object types (nodes or resources). It requests the
- editor to edit the given object.
+ This function is used for plugins that edit specific object types (nodes or resources). It requests the editor to edit the given object.
</description>
</method>
<method name="forward_input_event" qualifiers="virtual">
@@ -11445,13 +11358,8 @@ This approximation makes straight segments between each point, then subdivides t
<argument index="0" name="event" type="InputEvent">
</argument>
<description>
- This is a low level function for plugins that edit a given
- object type derived from CanvasItem to capture the input in the 2D editor
- viewport. The function is only being called if your
- object is being edited.
-
- Return true if you want to capture the input,
- otherwise false.
+ This is a low level function for plugins that edit a given object type derived from CanvasItem to capture the input in the 2D editor viewport. The function is only being called if your object is being edited.
+ Return true if you want to capture the input, otherwise false.
</description>
</method>
<method name="forward_spatial_input_event" qualifiers="virtual">
@@ -11462,80 +11370,58 @@ This approximation makes straight segments between each point, then subdivides t
<argument index="1" name="event" type="InputEvent">
</argument>
<description>
- This is a low level function for plugins that edit a
- given objet type derived from Spatial to capture the
- input of the viewport. The function is only being
- called if your object is being edited.
-
- By using the [InputEvent] and the [Camera] arguments
- it's pretty easy to do raycasts into space using
- Camera functions.
-
- Return true if you want to capture the input,
- otherwise false.
+ This is a low level function for plugins that edit a given objet type derived from Spatial to capture the input of the viewport. The function is only being called if your object is being edited.
+ By using the [InputEvent] and the [Camera] arguments it's pretty easy to do raycasts into space using Camera functions.
+ Return true if you want to capture the input, otherwise false.
</description>
</method>
<method name="get_base_control">
<return type="Control">
</return>
<description>
- Get a base control where it's safe to place dialogs.
- Many plugins open dialogs and they need a control as
- a base to make sure they use the editor icons and
- theme.
+ Get a base control where it's safe to place dialogs. Many plugins open dialogs and they need a control as a base to make sure they use the editor icons and theme.
</description>
</method>
<method name="get_breakpoints" qualifiers="virtual">
<return type="StringArray">
</return>
<description>
- This is for editors that edit script based objects.
- You can return a list of breakpoints in the format
- (script:line), for example: res://path_to_script.gd:25
+ This is for editors that edit script based objects. You can return a list of breakpoints in the format (script:line), for example: res://path_to_script.gd:25
</description>
</method>
<method name="get_editor_settings">
<return type="EditorSettings">
</return>
<description>
- Get the general settings for the editor (the same
- window that appears in the Settings menu).
+ Get the general settings for the editor (the same window that appears in the Settings menu).
</description>
</method>
<method name="get_name" qualifiers="virtual">
<return type="String">
</return>
<description>
- Get the name of the editor plugin. For main scren
- plugins this is what will appear in the selector
- (which by default is 2D, 3D, Script).
+ Get the name of the editor plugin. For main scren plugins this is what will appear in the selector (which by default is 2D, 3D, Script).
</description>
</method>
<method name="get_selection">
<return type="EditorSelection">
</return>
<description>
- Get the object that handles the selection of nodes
- in the Scene Tree editor.
+ Get the object that handles the selection of nodes in the Scene Tree editor.
</description>
</method>
<method name="get_state" qualifiers="virtual">
<return type="Dictionary">
</return>
<description>
- Get the state of your plugin editor. This is used
- when saving the scene (so state is kept when opening
- it again) and for switching tabs (so state can be
- restored when the tab returns).
+ Get the state of your plugin editor. This is used when saving the scene (so state is kept when opening it again) and for switching tabs (so state can be restored when the tab returns).
</description>
</method>
<method name="get_undo_redo">
<return type="UndoRedo">
</return>
<description>
- Get the undo/redo object. Most actions in the editor
- can be undoable, so use this object to make sure
- this happens when it's worth it.
+ Get the undo/redo object. Most actions in the editor can be undoable, so use this object to make sure this happens when it's worth it.
</description>
</method>
<method name="handles" qualifiers="virtual">
@@ -11544,81 +11430,64 @@ This approximation makes straight segments between each point, then subdivides t
<argument index="0" name="object" type="Object">
</argument>
<description>
- Implement this function if your plugin edits a
- specific type of object (Resource or Node). If you
- return true, then you will get the functions
- [EditorPlugin.edit] and [EditorPlugin.make_visible]
- called when the editor requests them.
+ Implement this function if your plugin edits a specific type of object (Resource or Node). If you return true, then you will get the functions [method EditorPlugin.edit] and [method EditorPlugin.make_visible] called when the editor requests them.
</description>
</method>
<method name="has_main_screen" qualifiers="virtual">
<return type="bool">
</return>
<description>
- Return true if this is a main screen editor plugin
- (it goes in the main screen selector together with
- 2D, 3D, Script).
+ Return true if this is a main screen editor plugin (it goes in the main screen selector together with 2D, 3D, Script).
</description>
</method>
<method name="make_visible" qualifiers="virtual">
<argument index="0" name="visible" type="bool">
</argument>
<description>
- This function will be called when the editor is
- requested to become visible. It is used for plugins
- that edit a specific object type.
-
- Remember that you have to manage the visibility of
- all your editor controls manually.
+ This function will be called when the editor is requested to become visible. It is used for plugins that edit a specific object type.
+ Remember that you have to manage the visibility of all your editor controls manually.
</description>
</method>
<method name="remove_control_from_bottom_panel">
<argument index="0" name="control" type="Control">
</argument>
<description>
- Remove the control from the bottom panel. Don't forget
- to call this if you added one, so the editor can
- remove it cleanly.
+ Remove the control from the bottom panel. Don't forget to call this if you added one, so the editor can remove it cleanly.
</description>
</method>
<method name="remove_control_from_docks">
<argument index="0" name="control" type="Control">
</argument>
<description>
- Remove the control from the dock. Don't forget to
- call this if you added one, so the editor can save
- the layout and remove it cleanly.
+ Remove the control from the dock. Don't forget to call this if you added one, so the editor can save the layout and remove it cleanly.
</description>
</method>
<method name="remove_custom_type">
<argument index="0" name="type" type="String">
</argument>
<description>
- Remove a custom type added by
- [EditorPlugin.add_custom_type]
+ Remove a custom type added by [method EditorPlugin.add_custom_type]
</description>
</method>
<method name="remove_export_plugin">
<argument index="0" name="plugin" type="EditorExportPlugin">
</argument>
<description>
- Remove the export plugin, don't forget to call this
- on exit.
+ Remove the export plugin, don't forget to call this on exit.
</description>
</method>
<method name="remove_import_plugin">
<argument index="0" name="plugin" type="EditorImportPlugin">
</argument>
<description>
- Remove the import plugin, don't forget to call this
- on exit.
+ Remove the import plugin, don't forget to call this on exit.
</description>
</method>
<method name="set_state" qualifiers="virtual">
<argument index="0" name="state" type="Dictionary">
</argument>
<description>
- Restore the state saved by [EditorPlugin.get_state].
+ Restore the state saved by [method EditorPlugin.get_state].
</description>
</method>
</methods>
@@ -11659,23 +11528,18 @@ This approximation makes straight segments between each point, then subdivides t
</class>
<class name="EditorScenePostImport" inherits="Reference" category="Core">
<brief_description>
- Base script for post-processing scenes being imported.
+ Base script for post-processing scenes being imported.
</brief_description>
<description>
- These scripts can modify scenes after being imported by the 3D Scene
- import option of the Import menu.
+ These scripts can modify scenes after being imported by the 3D Scene import option of the Import menu.
</description>
<methods>
<method name="post_import" qualifiers="virtual">
<argument index="0" name="scene" type="Object">
</argument>
<description>
- This function is called upon import with the
- imported scene.
-
- Just do any changes desired to the scene and return
- it. If null is returned, import will fail and throw
- an error to the user.
+ This function is called upon import with the imported scene.
+ Just do any changes desired to the scene and return it. If null is returned, import will fail and throw an error to the user.
</description>
</method>
</methods>
@@ -11684,10 +11548,10 @@ This approximation makes straight segments between each point, then subdivides t
</class>
<class name="EditorScript" inherits="Reference" category="Core">
<brief_description>
- Simple script to perform changes in the currently edited scene.
+ Simple script to perform changes in the currently edited scene.
</brief_description>
<description>
- This script can be run from the Scene -&gt; Run Script menu option.
+ This script can be run from the Scene -&gt; Run Script menu option.
</description>
<methods>
<method name="_run" qualifiers="virtual">
@@ -11712,43 +11576,43 @@ This approximation makes straight segments between each point, then subdivides t
</class>
<class name="EditorSelection" inherits="Object" category="Core">
<brief_description>
- Manages the SceneTree selection in the editor.
+ Manages the SceneTree selection in the editor.
</brief_description>
<description>
- This object manages the SceneTree selection in the editor.
+ This object manages the SceneTree selection in the editor.
</description>
<methods>
<method name="add_node">
<argument index="0" name="node" type="Node">
</argument>
<description>
- Add a node to the selection.
+ Add a node to the selection.
</description>
</method>
<method name="clear">
<description>
- Clear the selection.
+ Clear the selection.
</description>
</method>
<method name="get_selected_nodes">
<return type="Array">
</return>
<description>
- Get the list of selectes nodes.
+ Get the list of selectes nodes.
</description>
</method>
<method name="remove_node">
<argument index="0" name="node" type="Node">
</argument>
<description>
- Remove a node from the selection.
+ Remove a node from the selection.
</description>
</method>
</methods>
<signals>
<signal name="selection_changed">
<description>
- Emitted when the selection changes.
+ Emitted when the selection changes.
</description>
</signal>
</signals>
@@ -11757,81 +11621,67 @@ This approximation makes straight segments between each point, then subdivides t
</class>
<class name="EditorSettings" inherits="Resource" category="Core">
<brief_description>
- Object that holds the project-independent editor settings.
+ Object that holds the project-independent editor settings.
</brief_description>
<description>
- Object that holds the project-independent editor settings. These
- settings are generally visible in the Editor Settings menu.
-
- Accessing the settings is done by using the regular [Object] API,
- such as.
-
- settings.set(prop,value)
-
- settings.get(prop)
-
- list_of_settings = settings.get_property_list()
+ Object that holds the project-independent editor settings. These settings are generally visible in the Editor Settings menu.
+ Accessing the settings is done by using the regular [Object] API, such as:
+ [codeblock]
+ settings.set(prop,value)
+ settings.get(prop)
+ list_of_settings = settings.get_property_list()
+ [/codeblock]
</description>
<methods>
<method name="erase">
<argument index="0" name="property" type="String">
</argument>
<description>
- Erase a given setting (pass full property path).
+ Erase a given setting (pass full property path).
</description>
</method>
<method name="get_favorite_dirs" qualifiers="const">
<return type="StringArray">
</return>
<description>
- Get the list of favorite directories for this
- project.
+ Get the list of favorite directories for this project.
</description>
</method>
<method name="get_project_settings_path" qualifiers="const">
<return type="String">
</return>
<description>
- Get the specific project settings path. Projects all
- have an unique sub-directory inside the settings
- path where project specific settings are saved.
+ Get the specific project settings path. Projects all have an unique sub-directory inside the settings path where project specific settings are saved.
</description>
</method>
<method name="get_recent_dirs" qualifiers="const">
<return type="StringArray">
</return>
<description>
- Get the list of recently visited folders in the file
- dialog for this project.
+ Get the list of recently visited folders in the file dialog for this project.
</description>
</method>
<method name="get_settings_path" qualifiers="const">
<return type="String">
</return>
<description>
- Get the global settings path for the engine. Inside
- this path you can find some standard paths such as:
-
- settings/tmp - used for temporary storage of files
-
- settings/templates - where export templates are
- located
+ Get the global settings path for the engine. Inside this path you can find some standard paths such as:
+ settings/tmp - used for temporary storage of files
+ settings/templates - where export templates are located
</description>
</method>
<method name="set_favorite_dirs">
<argument index="0" name="dirs" type="StringArray">
</argument>
<description>
- Set the list of favorite directories for this
- project.
+ Set the list of favorite directories for this project.
</description>
</method>
<method name="set_recent_dirs">
<argument index="0" name="dirs" type="StringArray">
</argument>
<description>
- Set the list of recently visited folders in the file
- dialog for this project.
+ Set the list of recently visited folders in the file dialog for this project.
</description>
</method>
</methods>
@@ -11846,12 +11696,10 @@ This approximation makes straight segments between each point, then subdivides t
</class>
<class name="EditorSpatialGizmo" inherits="SpatialGizmo" category="Core">
<brief_description>
- Custom gizmo for editing Spatial objects.
+ Custom gizmo for editing Spatial objects.
</brief_description>
<description>
- Custom gizmo that is used for providing custom visualization and
- editing (handles) for 3D Spatial objects. These are created by
- [method EditorPlugin.create_spatial_gizmo].
+ Custom gizmo that is used for providing custom visualization and editing (handles) for 3D Spatial objects. These are created by [method EditorPlugin.create_spatial_gizmo].
</description>
<methods>
<method name="add_collision_segments">
@@ -11864,11 +11712,7 @@ This approximation makes straight segments between each point, then subdivides t
<argument index="0" name="triangles" type="TriangleMesh">
</argument>
<description>
- Add collision triangles to the gizmo for picking. A
- [TriangleMesh] can be generated from a regular
- [Mesh] too.
-
- Call this function during [method redraw].
+ Add collision triangles to the gizmo for picking. A [TriangleMesh] can be generated from a regular [Mesh] too. Call this function during [method redraw].
</description>
</method>
<method name="add_handles">
@@ -11879,13 +11723,8 @@ This approximation makes straight segments between each point, then subdivides t
<argument index="2" name="secondary" type="bool" default="false">
</argument>
<description>
- Add a list of handles (points) which can be used to
- deform the object being edited.
-
- There are virtual functions which will be called
- upon editing of these handles.
-
- Call this function during [method redraw].
+ Add a list of handles (points) which can be used to deform the object being edited.
+ There are virtual functions which will be called upon editing of these handles. Call this function during [method redraw].
</description>
</method>
<method name="add_lines">
@@ -11896,11 +11735,7 @@ This approximation makes straight segments between each point, then subdivides t
<argument index="2" name="billboard" type="bool" default="false">
</argument>
<description>
- Add lines to the gizmo (as sets of 2 points), with a
- given material. The lines are used for visualizing
- the gizmo.
-
- Call this function during [method redraw].
+ Add lines to the gizmo (as sets of 2 points), with a given material. The lines are used for visualizing the gizmo. Call this function during [method redraw].
</description>
</method>
<method name="add_mesh">
@@ -11911,10 +11746,7 @@ This approximation makes straight segments between each point, then subdivides t
<argument index="2" name="skeleton" type="RID" default="RID()">
</argument>
<description>
- Add a mesh to the gizmo, this is used for
- visualization.
-
- Call this function during [method redraw].
+ Add a mesh to the gizmo, this is used for visualization. Call this function during [method redraw].
</description>
</method>
<method name="add_unscaled_billboard">
@@ -11923,9 +11755,7 @@ This approximation makes straight segments between each point, then subdivides t
<argument index="1" name="default_scale" type="float" default="1">
</argument>
<description>
- Add an unscaled billboard for visualization.
-
- Call this function during [method redraw].
+ Add an unscaled billboard for visualization. Call this function during [method redraw].
</description>
</method>
<method name="commit_handle" qualifiers="virtual">
@@ -11936,12 +11766,8 @@ This approximation makes straight segments between each point, then subdivides t
<argument index="2" name="cancel" type="bool">
</argument>
<description>
- Commit a handle being edited (handles must have been
- prevously added by [method add_handles]).
-
- If the cancel parameter is true, an option to
- restore the edited value to the original is
- provided.
+ Commit a handle being edited (handles must have been prevously added by [method add_handles]).
+ If the cancel parameter is true, an option to restore the edited value to the original is provided.
</description>
</method>
<method name="get_handle_name" qualifiers="virtual">
@@ -11950,10 +11776,8 @@ This approximation makes straight segments between each point, then subdivides t
<argument index="0" name="index" type="int">
</argument>
<description>
- Get the name of an edited handle (handles must have
- been previously added by [method add_handles]).
-
- Handles can be named for reference to the user when editing.
+ Get the name of an edited handle (handles must have been previously added by [method add_handles]).
+ Handles can be named for reference to the user when editing.
</description>
</method>
<method name="get_handle_value" qualifiers="virtual">
@@ -11962,16 +11786,12 @@ This approximation makes straight segments between each point, then subdivides t
<argument index="0" name="index" type="int">
</argument>
<description>
- Get actual value of a handle. This value can be
- anything and used for eventually undoing the motion
- when calling [method commit_handle]
+ Get actual value of a handle. This value can be anything and used for eventually undoing the motion when calling [method commit_handle]
</description>
</method>
<method name="redraw" qualifiers="virtual">
<description>
- This function is called when the Spatial this gizmo
- refers to changes (the [method Spatial.update_gizmo]
- is called).
+ This function is called when the Spatial this gizmo refers to changes (the [method Spatial.update_gizmo] is called).
</description>
</method>
<method name="set_handle" qualifiers="virtual">
@@ -11982,22 +11802,15 @@ This approximation makes straight segments between each point, then subdivides t
<argument index="2" name="point" type="Vector2">
</argument>
<description>
- This function is used when the user drags a gizmo
- handle (previously added with [method add_handles])
- in screen coordinates.
-
- The [Camera] is also provided
- so screen coordinates can be converted to raycasts.
+ This function is used when the user drags a gizmo handle (previously added with [method add_handles]) in screen coordinates.
+ The [Camera] is also provided so screen coordinates can be converted to raycasts.
</description>
</method>
<method name="set_spatial_node">
<argument index="0" name="node" type="Spatial">
</argument>
<description>
- Call this function once and upon creation of the
- gizmo, otherwise no other function will work.
-
- The argument is the node being edited by the gizmo.
+ Call this function once and upon creation of the gizmo, otherwise no other function will work. The argument is the node being edited by the gizmo.
</description>
</method>
</methods>
@@ -12188,11 +12001,11 @@ This approximation makes straight segments between each point, then subdivides t
</class>
<class name="EventPlayer" inherits="Node" category="Core">
<brief_description>
- Class for event stream playback.
+ Class for event stream playback.
</brief_description>
<description>
- Class for event stream playback. Event streams are music expressed as a series of events (note on, note off, instrument change...), as opposed to audio streams, which are just audio data. Examples of event-based streams are MIDI files, or MOD music.
- Currently, only MOD, S3M, IT, and XM music is supported.
+ Class for event stream playback. Event streams are music expressed as a series of events (note on, note off, instrument change...), as opposed to audio streams, which are just audio data. Examples of event-based streams are MIDI files, or MOD music.
+ Currently, only MOD, S3M, IT, and XM music is supported.
</description>
<methods>
<method name="get_channel_last_note_time" qualifiers="const">
@@ -12201,7 +12014,7 @@ This approximation makes straight segments between each point, then subdivides t
<argument index="0" name="channel" type="int">
</argument>
<description>
- Return the time at which the last note of a given channel in the stream plays.
+ Return the time at which the last note of a given channel in the stream plays.
</description>
</method>
<method name="get_channel_volume" qualifiers="const">
@@ -12210,117 +12023,117 @@ This approximation makes straight segments between each point, then subdivides t
<argument index="0" name="channel" type="int">
</argument>
<description>
- Return the volume scale for an individual channel of the stream.
+ Return the volume scale for an individual channel of the stream.
</description>
</method>
<method name="get_length" qualifiers="const">
<return type="float">
</return>
<description>
- Return the song length. May be in seconds, but depends on the stream type.
+ Return the song length. May be in seconds, but depends on the stream type.
</description>
</method>
<method name="get_loop_count" qualifiers="const">
<return type="int">
</return>
<description>
- Return the number of times the playback has looped.
+ Return the number of times the playback has looped.
</description>
</method>
<method name="get_pitch_scale" qualifiers="const">
<return type="float">
</return>
<description>
- Return the pitch scale factor for this player.
+ Return the pitch scale factor for this player.
</description>
</method>
<method name="get_pos" qualifiers="const">
<return type="float">
</return>
<description>
- Return the playback position. May be in seconds, but depends on the stream type.
+ Return the playback position. May be in seconds, but depends on the stream type.
</description>
</method>
<method name="get_stream" qualifiers="const">
<return type="EventStream">
</return>
<description>
- Return the currently assigned stream.
+ Return the currently assigned stream.
</description>
</method>
<method name="get_stream_name" qualifiers="const">
<return type="String">
</return>
<description>
- Return the name of the currently assigned stream. This is not the file name, but a field inside the file. If no stream is assigned, if returns "&lt;No Stream&gt;".
+ Return the name of the currently assigned stream. This is not the file name, but a field inside the file. If no stream is assigned, if returns "&lt;No Stream&gt;".
</description>
</method>
<method name="get_tempo_scale" qualifiers="const">
<return type="float">
</return>
<description>
- Return the tempo multiplier.
+ Return the tempo multiplier.
</description>
</method>
<method name="get_volume" qualifiers="const">
<return type="float">
</return>
<description>
- Return the playback volume for this player.
+ Return the playback volume for this player.
</description>
</method>
<method name="get_volume_db" qualifiers="const">
<return type="float">
</return>
<description>
- Return the playback volume for this player, in decibels.
+ Return the playback volume for this player, in decibels.
</description>
</method>
<method name="has_autoplay" qualifiers="const">
<return type="bool">
</return>
<description>
- Return whether this player will start playing as soon as it enters the scene tree.
+ Return whether this player will start playing as soon as it enters the scene tree.
</description>
</method>
<method name="has_loop" qualifiers="const">
<return type="bool">
</return>
<description>
- Return whether this player will be restart the playback at the end.
+ Return whether this player will be restart the playback at the end.
</description>
</method>
<method name="is_paused" qualifiers="const">
<return type="bool">
</return>
<description>
- Return whether the playback is currently paused.
+ Return whether the playback is currently paused.
</description>
</method>
<method name="is_playing" qualifiers="const">
<return type="bool">
</return>
<description>
- Return whether this player is playing.
+ Return whether this player is playing.
</description>
</method>
<method name="play">
<description>
- Play the currently assigned stream.
+ Play the currently assigned stream.
</description>
</method>
<method name="seek_pos">
<argument index="0" name="time" type="float">
</argument>
<description>
- Set the playback position. May be in seconds, but depends on the stream type.
+ Set the playback position. May be in seconds, but depends on the stream type.
</description>
</method>
<method name="set_autoplay">
<argument index="0" name="enabled" type="bool">
</argument>
<description>
- Set whether this player will start playing as soon as it enters the scene tree.
+ Set whether this player will start playing as soon as it enters the scene tree.
</description>
</method>
<method name="set_channel_volume">
@@ -12329,63 +12142,63 @@ This approximation makes straight segments between each point, then subdivides t
<argument index="1" name="channel_volume" type="float">
</argument>
<description>
- Set the volume scale for an individual channel of the stream, with the same value range as [method set_volume]. The channel number depends on the stream format. For example, MIDIs range from 0 to 15, and MODs from 0 to 63.
- Many stream formats are multichannel, so this allows to affect only a part of the music.
+ Set the volume scale for an individual channel of the stream, with the same value range as [method set_volume]. The channel number depends on the stream format. For example, MIDIs range from 0 to 15, and MODs from 0 to 63.
+ Many stream formats are multichannel, so this allows to affect only a part of the music.
</description>
</method>
<method name="set_loop">
<argument index="0" name="enabled" type="bool">
</argument>
<description>
- Set whether the stream will be restarted at the end.
+ Set whether the stream will be restarted at the end.
</description>
</method>
<method name="set_paused">
<argument index="0" name="paused" type="bool">
</argument>
<description>
- Pause stream playback.
+ Pause stream playback.
</description>
</method>
<method name="set_pitch_scale">
<argument index="0" name="pitch_scale" type="float">
</argument>
<description>
- Set the pitch multiplier for all sounds coming from this stream. A value of 2.0 shifts all pitches one octave up, and a value of 0.5 shifts pitches one octave down.
+ Set the pitch multiplier for all sounds coming from this stream. A value of 2.0 shifts all pitches one octave up, and a value of 0.5 shifts pitches one octave down.
</description>
</method>
<method name="set_stream">
<argument index="0" name="stream" type="EventStream">
</argument>
<description>
- Set the [EventStream] this player will play.
+ Set the [EventStream] this player will play.
</description>
</method>
<method name="set_tempo_scale">
<argument index="0" name="tempo_scale" type="float">
</argument>
<description>
- Set the tempo multiplier. This allows to slow down or speed up the music, without affecting its pitch.
+ Set the tempo multiplier. This allows to slow down or speed up the music, without affecting its pitch.
</description>
</method>
<method name="set_volume">
<argument index="0" name="volume" type="float">
</argument>
<description>
- Set the playback volume for this player. This is a float between 0.0 (silent) and 1.0 (full volume). Values over 1.0 may amplify sound even more, but may introduce distortion. Negative values may just invert the output waveform, which produces no audible difference.
- The effect of these special values ultimately depends on the low-level implementation of the file format being played.
+ Set the playback volume for this player. This is a float between 0.0 (silent) and 1.0 (full volume). Values over 1.0 may amplify sound even more, but may introduce distortion. Negative values may just invert the output waveform, which produces no audible difference.
+ The effect of these special values ultimately depends on the low-level implementation of the file format being played.
</description>
</method>
<method name="set_volume_db">
<argument index="0" name="db" type="float">
</argument>
<description>
- Set the playback volume for this player, in decibels. This is a float between -80.0 (silent) and 0.0 (full volume). Values under -79.0 get truncated to -80, but values over 0.0 do not, so the warnings for over amplifying (see [method set_volume]) still apply.
+ Set the playback volume for this player, in decibels. This is a float between -80.0 (silent) and 0.0 (full volume). Values under -79.0 get truncated to -80, but values over 0.0 do not, so the warnings for over amplifying (see [method set_volume]) still apply.
</description>
</method>
<method name="stop">
<description>
- Stop playing.
+ Stop playing.
</description>
</method>
</methods>
@@ -12394,11 +12207,11 @@ This approximation makes straight segments between each point, then subdivides t
</class>
<class name="EventStream" inherits="Resource" category="Core">
<brief_description>
- Base class for all event-based stream drivers.
+ Base class for all event-based stream drivers.
</brief_description>
<description>
- Base class for all event-based stream drivers. Event streams are music expressed as a series of events (note on, note off, instrument change...), as opposed to audio streams, which are just audio data. Examples of event-based streams are MIDI files, of MOD music.
- This class exposes no methods.
+ Base class for all event-based stream drivers. Event streams are music expressed as a series of events (note on, note off, instrument change...), as opposed to audio streams, which are just audio data. Examples of event-based streams are MIDI files, of MOD music.
+ This class exposes no methods.
</description>
<methods>
</methods>
@@ -12407,15 +12220,15 @@ This approximation makes straight segments between each point, then subdivides t
</class>
<class name="EventStreamChibi" inherits="EventStream" category="Core">
<brief_description>
- Driver for MOD playback.
+ Driver for MOD playback.
</brief_description>
<description>
- This driver plays MOD music. MOD music, as all event-based streams, is a music format defined by note events occurring at defined moments, instead of a stream of audio samples.
- Currently, this driver supports the MOD, S3M, IT, and XM formats.
- This class exposes no methods.
- This class can return its playback position in seconds, but does not allow to set it, failing with only a console warning.
- This class can not return its song length, returning 1.0 when queried.
- This class does not limit its volume settings, allowing for overflow/distortion and wave inversion.
+ This driver plays MOD music. MOD music, as all event-based streams, is a music format defined by note events occurring at defined moments, instead of a stream of audio samples.
+ Currently, this driver supports the MOD, S3M, IT, and XM formats.
+ This class exposes no methods.
+ This class can return its playback position in seconds, but does not allow to set it, failing with only a console warning.
+ This class can not return its song length, returning 1.0 when queried.
+ This class does not limit its volume settings, allowing for overflow/distortion and wave inversion.
</description>
<methods>
</methods>
@@ -12424,39 +12237,37 @@ This approximation makes straight segments between each point, then subdivides t
</class>
<class name="File" inherits="Reference" category="Core">
<brief_description>
- Type to handle file reading and writing operations.
- </brief_description>
- <description>
- File type. This is used to permanently store data into the user device's file system and to read from it. This can be used to store game save data or player configuration files, for example.
-
- Here's a sample on how to write and read from a file:
-
- [codeblock]
- func save(content):
- var file = File.new()
- file.open("user://save_game.dat", file.WRITE)
- file.store_string(content)
- file.close()
-
- func load():
- var file = File.new()
- file.open("user://save_game.dat", file.READ)
- var content = file.get_as_text()
- file.close()
- return content
- [/codeblock]
+ Type to handle file reading and writing operations.
+ </brief_description>
+ <description>
+ File type. This is used to permanently store data into the user device's file system and to read from it. This can be used to store game save data or player configuration files, for example.
+ Here's a sample on how to write and read from a file:
+ [codeblock]
+ func save(content):
+ var file = File.new()
+ file.open("user://save_game.dat", file.WRITE)
+ file.store_string(content)
+ file.close()
+
+ func load():
+ var file = File.new()
+ file.open("user://save_game.dat", file.READ)
+ var content = file.get_as_text()
+ file.close()
+ return content
+ [/codeblock]
</description>
<methods>
<method name="close">
<description>
- Close the currently opened file.
+ Close the currently opened file.
</description>
</method>
<method name="eof_reached" qualifiers="const">
<return type="bool">
</return>
<description>
- Return whether the file cursor reached the end of the file.
+ Return whether the file cursor reached the end of the file.
</description>
</method>
<method name="file_exists" qualifiers="const">
@@ -12465,42 +12276,42 @@ This approximation makes straight segments between each point, then subdivides t
<argument index="0" name="path" type="String">
</argument>
<description>
- Get whether or not the file in the specified path exists.
+ Get whether or not the file in the specified path exists.
</description>
</method>
<method name="get_16" qualifiers="const">
<return type="int">
</return>
<description>
- Get the next 16 bits from the file as an integer.
+ Get the next 16 bits from the file as an integer.
</description>
</method>
<method name="get_32" qualifiers="const">
<return type="int">
</return>
<description>
- Get the next 32 bits from the file as an integer.
+ Get the next 32 bits from the file as an integer.
</description>
</method>
<method name="get_64" qualifiers="const">
<return type="int">
</return>
<description>
- Get the next 64 bits from the file as an integer.
+ Get the next 64 bits from the file as an integer.
</description>
</method>
<method name="get_8" qualifiers="const">
<return type="int">
</return>
<description>
- Get the next 8 bits from the file as an integer.
+ Get the next 8 bits from the file as an integer.
</description>
</method>
<method name="get_as_text" qualifiers="const">
<return type="String">
</return>
<description>
- Get the whole file as a [String].
+ Get the whole file as a [String].
</description>
</method>
<method name="get_buffer" qualifiers="const">
@@ -12509,7 +12320,7 @@ This approximation makes straight segments between each point, then subdivides t
<argument index="0" name="len" type="int">
</argument>
<description>
- Get next len bytes of the file as a [RawArray].
+ Get next len bytes of the file as a [RawArray].
</description>
</method>
<method name="get_csv_line" qualifiers="const">
@@ -12518,49 +12329,49 @@ This approximation makes straight segments between each point, then subdivides t
<argument index="0" name="delim" type="String" default="&quot;,&quot;">
</argument>
<description>
- Get the next value of the file in CSV (Comma Separated Values) format. You can pass a different delimiter to use other than the default "," (comma).
+ Get the next value of the file in CSV (Comma Separated Values) format. You can pass a different delimiter to use other than the default "," (comma).
</description>
</method>
<method name="get_double" qualifiers="const">
<return type="float">
</return>
<description>
- Get the next 64 bits from the file as a floating point number.
+ Get the next 64 bits from the file as a floating point number.
</description>
</method>
<method name="get_endian_swap">
<return type="bool">
</return>
<description>
- Get whether endian swap is enabled for this file.
+ Get whether endian swap is enabled for this file.
</description>
</method>
<method name="get_error" qualifiers="const">
<return type="Error">
</return>
<description>
- Get the last error that happened when trying to perform operations. Compare with the [code]ERR_FILE_*[/code] constants from [@Global Scope].
+ Get the last error that happened when trying to perform operations. Compare with the [code]ERR_FILE_*[/code] constants from [@Global Scope].
</description>
</method>
<method name="get_float" qualifiers="const">
<return type="float">
</return>
<description>
- Get the next 32 bits from the file as a floating point number.
+ Get the next 32 bits from the file as a floating point number.
</description>
</method>
<method name="get_len" qualifiers="const">
<return type="int">
</return>
<description>
- Return the size of the file in bytes.
+ Return the size of the file in bytes.
</description>
</method>
<method name="get_line" qualifiers="const">
<return type="String">
</return>
<description>
- Get the next line of the file as a [String].
+ Get the next line of the file as a [String].
</description>
</method>
<method name="get_md5" qualifiers="const">
@@ -12569,28 +12380,28 @@ This approximation makes straight segments between each point, then subdivides t
<argument index="0" name="path" type="String">
</argument>
<description>
- Return a md5 String representing the file at the given path or an empty [String] on failure.
+ Return a md5 String representing the file at the given path or an empty [String] on failure.
</description>
</method>
<method name="get_pascal_string">
<return type="String">
</return>
<description>
- Get a [String] saved in Pascal format from the file.
+ Get a [String] saved in Pascal format from the file.
</description>
</method>
<method name="get_pos" qualifiers="const">
<return type="int">
</return>
<description>
- Return the file cursor position.
+ Return the file cursor position.
</description>
</method>
<method name="get_real" qualifiers="const">
<return type="float">
</return>
<description>
- Get the next bits from the file as a floating point number.
+ Get the next bits from the file as a floating point number.
</description>
</method>
<method name="get_sha256" qualifiers="const">
@@ -12599,19 +12410,19 @@ This approximation makes straight segments between each point, then subdivides t
<argument index="0" name="path" type="String">
</argument>
<description>
- Return a sha256 String representing the file at the given path or an empty [String] on failure.
+ Return a sha256 String representing the file at the given path or an empty [String] on failure.
</description>
</method>
<method name="get_var" qualifiers="const">
<description>
- Get the next Variant value from the file.
+ Get the next Variant value from the file.
</description>
</method>
<method name="is_open" qualifiers="const">
<return type="bool">
</return>
<description>
- Return whether the file is currently opened.
+ Return whether the file is currently opened.
</description>
</method>
<method name="open">
@@ -12622,7 +12433,7 @@ This approximation makes straight segments between each point, then subdivides t
<argument index="1" name="flags" type="int">
</argument>
<description>
- Open the file for writing or reading, depending on the flags.
+ Open the file for writing or reading, depending on the flags.
</description>
</method>
<method name="open_encrypted">
@@ -12635,7 +12446,7 @@ This approximation makes straight segments between each point, then subdivides t
<argument index="2" name="key" type="RawArray">
</argument>
<description>
- Open an encrypted file in write or read mode. You need to pass a binary key to encrypt/decrypt it.
+ Open an encrypted file in write or read mode. You need to pass a binary key to encrypt/decrypt it.
</description>
</method>
<method name="open_encrypted_with_pass">
@@ -12648,114 +12459,113 @@ This approximation makes straight segments between each point, then subdivides t
<argument index="2" name="pass" type="String">
</argument>
<description>
- Open an encrypted file in write or read mode. You need to pass a password to encrypt/decrypt it.
+ Open an encrypted file in write or read mode. You need to pass a password to encrypt/decrypt it.
</description>
</method>
<method name="seek">
<argument index="0" name="pos" type="int">
</argument>
<description>
- Change the file reading/writing cursor to the specified position (in bytes from the beginning of the file).
+ Change the file reading/writing cursor to the specified position (in bytes from the beginning of the file).
</description>
</method>
<method name="seek_end">
<argument index="0" name="pos" type="int" default="0">
</argument>
<description>
- Change the file reading/writing cursor to the specified position (in bytes from the end of the file). Note that this is an offset, so you should use negative numbers or the cursor will be at the end of the file.
+ Change the file reading/writing cursor to the specified position (in bytes from the end of the file). Note that this is an offset, so you should use negative numbers or the cursor will be at the end of the file.
</description>
</method>
<method name="set_endian_swap">
<argument index="0" name="enable" type="bool">
</argument>
<description>
- Set whether to swap the endianess of the file. Enable this if you're dealing with files written in big endian machines.
-
- Note that this is about the file format, not CPU type. This is always reseted to [code]false[/code] whenever you open the file.
+ Set whether to swap the endianess of the file. Enable this if you're dealing with files written in big endian machines.
+ Note that this is about the file format, not CPU type. This is always reseted to [code]false[/code] whenever you open the file.
</description>
</method>
<method name="store_16">
<argument index="0" name="value" type="int">
</argument>
<description>
- Store an integer as 16 bits in the file.
+ Store an integer as 16 bits in the file.
</description>
</method>
<method name="store_32">
<argument index="0" name="value" type="int">
</argument>
<description>
- Store an integer as 32 bits in the file.
+ Store an integer as 32 bits in the file.
</description>
</method>
<method name="store_64">
<argument index="0" name="value" type="int">
</argument>
<description>
- Store an integer as 64 bits in the file.
+ Store an integer as 64 bits in the file.
</description>
</method>
<method name="store_8">
<argument index="0" name="value" type="int">
</argument>
<description>
- Store an integer as 8 bits in the file.
+ Store an integer as 8 bits in the file.
</description>
</method>
<method name="store_buffer">
<argument index="0" name="buffer" type="RawArray">
</argument>
<description>
- Store the given array of bytes in the file.
+ Store the given array of bytes in the file.
</description>
</method>
<method name="store_double">
<argument index="0" name="value" type="float">
</argument>
<description>
- Store a floating point number as 64 bits in the file.
+ Store a floating point number as 64 bits in the file.
</description>
</method>
<method name="store_float">
<argument index="0" name="value" type="float">
</argument>
<description>
- Store a floating point number as 32 bits in the file.
+ Store a floating point number as 32 bits in the file.
</description>
</method>
<method name="store_line">
<argument index="0" name="line" type="String">
</argument>
<description>
- Store the given [String] as a line in the file.
+ Store the given [String] as a line in the file.
</description>
</method>
<method name="store_pascal_string">
<argument index="0" name="string" type="String">
</argument>
<description>
- Store the given [String] as a line in the file in Pascal format (i.e. also store the length of the string).
+ Store the given [String] as a line in the file in Pascal format (i.e. also store the length of the string).
</description>
</method>
<method name="store_real">
<argument index="0" name="value" type="float">
</argument>
<description>
- Store a floating point number in the file.
+ Store a floating point number in the file.
</description>
</method>
<method name="store_string">
<argument index="0" name="string" type="String">
</argument>
<description>
- Store the given [String] in the file.
+ Store the given [String] in the file.
</description>
</method>
<method name="store_var">
<argument index="0" name="value" type="Variant">
</argument>
<description>
- Store any Variant value in the file.
+ Store any Variant value in the file.
</description>
</method>
</methods>
@@ -12776,118 +12586,118 @@ This approximation makes straight segments between each point, then subdivides t
</class>
<class name="FileDialog" inherits="ConfirmationDialog" category="Core">
<brief_description>
- Dialog for selecting files or directories in the filesystem.
+ Dialog for selecting files or directories in the filesystem.
</brief_description>
<description>
- FileDialog is a preset dialog used to choose files and directories in the filesystem. It supports filter masks.
+ FileDialog is a preset dialog used to choose files and directories in the filesystem. It supports filter masks.
</description>
<methods>
<method name="add_filter">
<argument index="0" name="filter" type="String">
</argument>
<description>
- Add a custom filter. Filter format is: "mask ; description", example (C++): dialog-&gt;add_filter("*.png ; PNG Images");
+ Add a custom filter. Filter format is: "mask ; description", example (C++): dialog-&gt;add_filter("*.png ; PNG Images");
</description>
</method>
<method name="clear_filters">
<description>
- Clear all the added filters in the dialog.
+ Clear all the added filters in the dialog.
</description>
</method>
<method name="get_access" qualifiers="const">
<return type="int">
</return>
<description>
- Return the file access permission of the dialog.
+ Return the file access permission of the dialog.
</description>
</method>
<method name="get_current_dir" qualifiers="const">
<return type="String">
</return>
<description>
- Get the current working directory of the file dialog.
+ Get the current working directory of the file dialog.
</description>
</method>
<method name="get_current_file" qualifiers="const">
<return type="String">
</return>
<description>
- Get the current selected file of the file dialog (empty if none).
+ Get the current selected file of the file dialog (empty if none).
</description>
</method>
<method name="get_current_path" qualifiers="const">
<return type="String">
</return>
<description>
- Get the current selected path (directory and file) of the file dialog (empty if none).
+ Get the current selected path (directory and file) of the file dialog (empty if none).
</description>
</method>
<method name="get_mode" qualifiers="const">
<return type="int">
</return>
<description>
- Get the file dialog mode from the MODE_* enum.
+ Get the file dialog mode from the MODE_* enum.
</description>
</method>
<method name="get_vbox">
<return type="VBoxContainer">
</return>
<description>
- Return the vertical box container of the dialog, custom controls can be added to it.
+ Return the vertical box container of the dialog, custom controls can be added to it.
</description>
</method>
<method name="invalidate">
<description>
- Invalidate and update the current dialog content list.
+ Invalidate and update the current dialog content list.
</description>
</method>
<method name="is_showing_hidden_files" qualifiers="const">
<return type="bool">
</return>
<description>
- Return true if the diaog allows show hidden files.
+ Return true if the diaog allows show hidden files.
</description>
</method>
<method name="set_access">
<argument index="0" name="access" type="int">
</argument>
<description>
- Set the file access permission of the dialog(Must be one of [ACCESS_RESOURCES], [ACCESS_USERDATA] or [ACCESS_FILESYSTEM]).
+ Set the file access permission of the dialog(Must be one of [ACCESS_RESOURCES], [ACCESS_USERDATA] or [ACCESS_FILESYSTEM]).
</description>
</method>
<method name="set_current_dir">
<argument index="0" name="dir" type="String">
</argument>
<description>
- Set the current working directory of the file dialog.
+ Set the current working directory of the file dialog.
</description>
</method>
<method name="set_current_file">
<argument index="0" name="file" type="String">
</argument>
<description>
- Set the current selected file name of the file dialog.
+ Set the current selected file name of the file dialog.
</description>
</method>
<method name="set_current_path">
<argument index="0" name="path" type="String">
</argument>
<description>
- Set the current selected file path of the file dialog.
+ Set the current selected file path of the file dialog.
</description>
</method>
<method name="set_mode">
<argument index="0" name="mode" type="int">
</argument>
<description>
- Set the file dialog mode from the MODE_* enum.
+ Set the file dialog mode from the MODE_* enum.
</description>
</method>
<method name="set_show_hidden_files">
<argument index="0" name="show" type="bool">
</argument>
<description>
- Set the dialog should show hidden files.
+ Set the dialog should show hidden files.
</description>
</method>
</methods>
@@ -12896,21 +12706,21 @@ This approximation makes straight segments between each point, then subdivides t
<argument index="0" name="dir" type="String">
</argument>
<description>
- Event emitted when the user selects a directory.
+ Event emitted when the user selects a directory.
</description>
</signal>
<signal name="file_selected">
<argument index="0" name="path" type="String">
</argument>
<description>
- Event emitted when the user selects a file (double clicks it or presses the OK button).
+ Event emitted when the user selects a file (double clicks it or presses the OK button).
</description>
</signal>
<signal name="files_selected">
<argument index="0" name="paths" type="StringArray">
</argument>
<description>
- Event emitted when the user selects multiple files.
+ Event emitted when the user selects multiple files.
</description>
</signal>
</signals>
@@ -12951,10 +12761,10 @@ This approximation makes straight segments between each point, then subdivides t
</class>
<class name="FixedMaterial" inherits="Material" category="Core">
<brief_description>
- Simple Material with a fixed parameter set.
+ Simple Material with a fixed parameter set.
</brief_description>
<description>
- FixedMaterial is a simple type of material [Resource], which contains a fixed amount of parameters. It is the only type of material supported in fixed-pipeline devices and APIs. It is also an often a better alternative to [ShaderMaterial] for most simple use cases.
+ FixedMaterial is a simple type of material [Resource], which contains a fixed amount of parameters. It is the only type of material supported in fixed-pipeline devices and APIs. It is also an often a better alternative to [ShaderMaterial] for most simple use cases.
</description>
<methods>
<method name="get_fixed_flag" qualifiers="const">
@@ -12975,7 +12785,7 @@ This approximation makes straight segments between each point, then subdivides t
<argument index="0" name="param" type="int">
</argument>
<description>
- Return a parameter, parameters are defined in the PARAM_* enum. The type of each parameter may change, so it's best to check the enum.
+ Return a parameter, parameters are defined in the PARAM_* enum. The type of each parameter may change, so it's best to check the enum.
</description>
</method>
<method name="get_point_size" qualifiers="const">
@@ -12990,7 +12800,7 @@ This approximation makes straight segments between each point, then subdivides t
<argument index="0" name="param" type="int">
</argument>
<description>
- Return the texture coordinate mode. Each texture param (from the PARAM_* enum) has one. It defines how the textures are mapped to the object.
+ Return the texture coordinate mode. Each texture param (from the PARAM_* enum) has one. It defines how the textures are mapped to the object.
</description>
</method>
<method name="get_texture" qualifiers="const">
@@ -12999,14 +12809,14 @@ This approximation makes straight segments between each point, then subdivides t
<argument index="0" name="param" type="int">
</argument>
<description>
- Return a texture. Textures change parameters per texel and are mapped to the model depending on the texcoord mode (see [method set_texcoord_mode]).
+ Return a texture. Textures change parameters per texel and are mapped to the model depending on the texcoord mode (see [method set_texcoord_mode]).
</description>
</method>
<method name="get_uv_transform" qualifiers="const">
<return type="Transform">
</return>
<description>
- Returns the special transform used to post-transform UV coordinates of the uv_xform texcoord mode: TEXCOORD_UV_TRANSFORM.
+ Returns the special transform used to post-transform UV coordinates of the uv_xform texcoord mode: TEXCOORD_UV_TRANSFORM.
</description>
</method>
<method name="set_fixed_flag">
@@ -13029,7 +12839,7 @@ This approximation makes straight segments between each point, then subdivides t
<argument index="1" name="value" type="Variant">
</argument>
<description>
- Set a parameter, parameters are defined in the PARAM_* enum. The type of each parameter may change, so it's best to check the enum.
+ Set a parameter, parameters are defined in the PARAM_* enum. The type of each parameter may change, so it's best to check the enum.
</description>
</method>
<method name="set_point_size">
@@ -13044,7 +12854,7 @@ This approximation makes straight segments between each point, then subdivides t
<argument index="1" name="mode" type="int">
</argument>
<description>
- Set the texture coordinate mode. Each texture param (from the PARAM_* enum) has one. It defines how the textures are mapped to the object.
+ Set the texture coordinate mode. Each texture param (from the PARAM_* enum) has one. It defines how the textures are mapped to the object.
</description>
</method>
<method name="set_texture">
@@ -13053,14 +12863,14 @@ This approximation makes straight segments between each point, then subdivides t
<argument index="1" name="texture" type="Texture">
</argument>
<description>
- Set a texture. Textures change parameters per texel and are mapped to the model depending on the texcoord mode (see [method set_texcoord_mode]).
+ Set a texture. Textures change parameters per texel and are mapped to the model depending on the texcoord mode (see [method set_texcoord_mode]).
</description>
</method>
<method name="set_uv_transform">
<argument index="0" name="transform" type="Transform">
</argument>
<description>
- Sets a special transform used to post-transform UV coordinates of the uv_xform texcoord mode: TEXCOORD_UV_TRANSFORM.
+ Sets a special transform used to post-transform UV coordinates of the uv_xform texcoord mode: TEXCOORD_UV_TRANSFORM.
</description>
</method>
</methods>
@@ -13091,8 +12901,6 @@ This approximation makes straight segments between each point, then subdivides t
<constant name="PARAM_MAX" value="8">
Maximum amount of parameters.
</constant>
- <constant name="TEXCOORD_SPHERE" value="3">
- </constant>
<constant name="TEXCOORD_UV" value="0">
Read texture coordinates from the UV array.
</constant>
@@ -13102,6 +12910,8 @@ This approximation makes straight segments between each point, then subdivides t
<constant name="TEXCOORD_UV2" value="2">
Read texture coordinates from the UV2 array.
</constant>
+ <constant name="TEXCOORD_SPHERE" value="3">
+ </constant>
<constant name="FLAG_USE_ALPHA" value="0">
</constant>
<constant name="FLAG_USE_COLOR_ARRAY" value="1">
@@ -13122,10 +12932,10 @@ This approximation makes straight segments between each point, then subdivides t
</class>
<class name="Font" inherits="Resource" category="Core">
<brief_description>
- Internationalized font and text drawing support.
+ Internationalized font and text drawing support.
</brief_description>
<description>
- Font contains an unicode compatible character set, as well as the ability to draw it with variable width, ascent, descent and kerning. For creating fonts from TTF files (or other font formats), see the editor support for fonts. TODO check wikipedia for graph of ascent/baseline/descent/height/etc.
+ Font contains an unicode compatible character set, as well as the ability to draw it with variable width, ascent, descent and kerning. For creating fonts from TTF files (or other font formats), see the editor support for fonts. TODO check wikipedia for graph of ascent/baseline/descent/height/etc.
</description>
<methods>
<method name="draw" qualifiers="const">
@@ -13140,7 +12950,7 @@ This approximation makes straight segments between each point, then subdivides t
<argument index="4" name="clip_w" type="int" default="-1">
</argument>
<description>
- Draw "string" into a canvas item using the font at a given "pos" position, with "modulate" color, and optionally clipping the width. "pos" specifies the baseline, not the top. To draw from the top, [i]ascent[/i] must be added to the Y axis.
+ Draw "string" into a canvas item using the font at a given "pos" position, with "modulate" color, and optionally clipping the width. "pos" specifies the baseline, not the top. To draw from the top, [i]ascent[/i] must be added to the Y axis.
</description>
</method>
<method name="draw_char" qualifiers="const">
@@ -13157,28 +12967,28 @@ This approximation makes straight segments between each point, then subdivides t
<argument index="4" name="modulate" type="Color" default="Color(1,1,1,1)">
</argument>
<description>
- Draw character "char" into a canvas item using the font at a given "pos" position, with "modulate" color, and optionally kerning if "next" is passed. clipping the width. "pos" specifies the baseline, not the top. To draw from the top, [i]ascent[/i] must be added to the Y axis. The width used by the character is returned, making this function useful for drawing strings character by character.
+ Draw character "char" into a canvas item using the font at a given "pos" position, with "modulate" color, and optionally kerning if "next" is passed. clipping the width. "pos" specifies the baseline, not the top. To draw from the top, [i]ascent[/i] must be added to the Y axis. The width used by the character is returned, making this function useful for drawing strings character by character.
</description>
</method>
<method name="get_ascent" qualifiers="const">
<return type="float">
</return>
<description>
- Return the font ascent (number of pixels above the baseline).
+ Return the font ascent (number of pixels above the baseline).
</description>
</method>
<method name="get_descent" qualifiers="const">
<return type="float">
</return>
<description>
- Return the font descent (number of pixels below the baseline).
+ Return the font descent (number of pixels below the baseline).
</description>
</method>
<method name="get_height" qualifiers="const">
<return type="float">
</return>
<description>
- Return the total font height (ascent plus descent) in pixels.
+ Return the total font height (ascent plus descent) in pixels.
</description>
</method>
<method name="get_string_size" qualifiers="const">
@@ -13187,7 +12997,7 @@ This approximation makes straight segments between each point, then subdivides t
<argument index="0" name="string" type="String">
</argument>
<description>
- Return the size of a string, taking kerning and advance into account.
+ Return the size of a string, taking kerning and advance into account.
</description>
</method>
<method name="is_distance_field_hint" qualifiers="const">
@@ -13256,7 +13066,7 @@ This approximation makes straight segments between each point, then subdivides t
<return type="bool">
</return>
<description>
- Should put children to the top left corner instead of center of the container.
+ Should put children to the top left corner instead of center of the container.
</description>
</method>
<method name="resume">
@@ -13671,10 +13481,10 @@ This approximation makes straight segments between each point, then subdivides t
</class>
<class name="GeometryInstance" inherits="VisualInstance" category="Core">
<brief_description>
- Base node for geometry based visual instances.
+ Base node for geometry based visual instances.
</brief_description>
<description>
- Base node for geometry based visual instances. Shares some common functionality like visibility and custom materials.
+ Base node for geometry based visual instances. Shares some common functionality like visibility and custom materials.
</description>
<methods>
<method name="get_baked_light_texture_id" qualifiers="const">
@@ -13719,7 +13529,7 @@ This approximation makes straight segments between each point, then subdivides t
<return type="Object">
</return>
<description>
- Return the material override for the whole geometry.
+ Return the material override for the whole geometry.
</description>
</method>
<method name="set_baked_light_texture_id">
@@ -13764,7 +13574,7 @@ This approximation makes straight segments between each point, then subdivides t
<argument index="0" name="material" type="Object">
</argument>
<description>
- Set the material override for the whole geometry.
+ Set the material override for the whole geometry.
</description>
</method>
</methods>
@@ -13797,17 +13607,17 @@ This approximation makes straight segments between each point, then subdivides t
</class>
<class name="Globals" inherits="Object" category="Core">
<brief_description>
- Contains global variables accessible from everywhere.
+ Contains global variables accessible from everywhere.
</brief_description>
<description>
- Contains global variables accessible from everywhere. Use the normal [Object] API, such as "Globals.get(variable)", "Globals.set(variable,value)" or "Globals.has(variable)" to access them. Variables stored in engine.cfg are also loaded into globals, making this object very useful for reading custom game configuration options.
+ Contains global variables accessible from everywhere. Use the normal [Object] API, such as "Globals.get(variable)", "Globals.set(variable,value)" or "Globals.has(variable)" to access them. Variables stored in engine.cfg are also loaded into globals, making this object very useful for reading custom game configuration options.
</description>
<methods>
<method name="clear">
<argument index="0" name="name" type="String">
</argument>
<description>
- Clear the whole configuration (not recommended, may break things).
+ Clear the whole configuration (not recommended, may break things).
</description>
</method>
<method name="get_order" qualifiers="const">
@@ -13816,7 +13626,7 @@ This approximation makes straight segments between each point, then subdivides t
<argument index="0" name="name" type="String">
</argument>
<description>
- Return the order of a configuration value (influences when saved to the config file).
+ Return the order of a configuration value (influences when saved to the config file).
</description>
</method>
<method name="get_singleton" qualifiers="const">
@@ -13833,7 +13643,7 @@ This approximation makes straight segments between each point, then subdivides t
<argument index="0" name="path" type="String">
</argument>
<description>
- Convert a localized path (res://) to a full native OS path.
+ Convert a localized path (res://) to a full native OS path.
</description>
</method>
<method name="has" qualifiers="const">
@@ -13842,7 +13652,7 @@ This approximation makes straight segments between each point, then subdivides t
<argument index="0" name="name" type="String">
</argument>
<description>
- Return true if a configuration value is present.
+ Return true if a configuration value is present.
</description>
</method>
<method name="has_singleton" qualifiers="const">
@@ -13859,7 +13669,7 @@ This approximation makes straight segments between each point, then subdivides t
<argument index="0" name="name" type="String">
</argument>
<description>
- If returns true, this value can be saved to the configuration file. This is useful for editors.
+ If returns true, this value can be saved to the configuration file. This is useful for editors.
</description>
</method>
<method name="load_resource_pack">
@@ -13876,7 +13686,7 @@ This approximation makes straight segments between each point, then subdivides t
<argument index="0" name="path" type="String">
</argument>
<description>
- Convert a path to a localized path (res:// path).
+ Convert a path to a localized path (res:// path).
</description>
</method>
<method name="save">
@@ -13899,7 +13709,7 @@ This approximation makes straight segments between each point, then subdivides t
<argument index="1" name="pos" type="int">
</argument>
<description>
- Set the order of a configuration value (influences when saved to the config file).
+ Set the order of a configuration value (influences when saved to the config file).
</description>
</method>
<method name="set_persisting">
@@ -13908,7 +13718,7 @@ This approximation makes straight segments between each point, then subdivides t
<argument index="1" name="enable" type="bool">
</argument>
<description>
- If set to true, this value can be saved to the configuration file. This is useful for editors.
+ If set to true, this value can be saved to the configuration file. This is useful for editors.
</description>
</method>
</methods>
@@ -13917,11 +13727,11 @@ This approximation makes straight segments between each point, then subdivides t
</class>
<class name="GraphEdit" inherits="Control" category="Core">
<brief_description>
- GraphEdit is an area capable of showing various GraphNodes. It manages connection events between them.
+ GraphEdit is an area capable of showing various GraphNodes. It manages connection events between them.
</brief_description>
<description>
- GraphEdit manages the showing of GraphNodes it contains, as well as connections an disconnections between them. Signals are sent for each of these two events. Disconnection between GraphNodes slots is disabled by default.
- It is greatly advised to enable low processor usage mode (see [method OS.set_low_processor_usage_mode]) when using GraphEdits.
+ GraphEdit manages the showing of GraphNodes it contains, as well as connections an disconnections between them. Signals are sent for each of these two events. Disconnection between GraphNodes slots is disabled by default.
+ It is greatly advised to enable low processor usage mode (see [method OS.set_low_processor_usage_mode]) when using GraphEdits.
</description>
<methods>
<method name="connect_node">
@@ -13936,7 +13746,7 @@ This approximation makes straight segments between each point, then subdivides t
<argument index="3" name="to_port" type="int">
</argument>
<description>
- Create a connection between 'from_port' slot of 'from' GraphNode and 'to_port' slot of 'to' GraphNode. If the connection already exists, no connection is created.
+ Create a connection between 'from_port' slot of 'from' GraphNode and 'to_port' slot of 'to' GraphNode. If the connection already exists, no connection is created.
</description>
</method>
<method name="disconnect_node">
@@ -13949,28 +13759,28 @@ This approximation makes straight segments between each point, then subdivides t
<argument index="3" name="to_port" type="int">
</argument>
<description>
- Remove the connection between 'from_port' slot of 'from' GraphNode and 'to_port' slot of 'to' GraphNode, if connection exists.
+ Remove the connection between 'from_port' slot of 'from' GraphNode and 'to_port' slot of 'to' GraphNode, if connection exists.
</description>
</method>
<method name="get_connection_list" qualifiers="const">
<return type="Array">
</return>
<description>
- Return an Array containing the list of connections. A connection consists in a structure of the form {from_slot: 0, from: "GraphNode name 0", to_slot: 1, to: "GraphNode name 1" }
+ Return an Array containing the list of connections. A connection consists in a structure of the form {from_slot: 0, from: "GraphNode name 0", to_slot: 1, to: "GraphNode name 1" }
</description>
</method>
<method name="get_scroll_ofs" qualifiers="const">
<return type="Vector2">
</return>
<description>
- Return the scroll offset.
+ Return the scroll offset.
</description>
</method>
<method name="get_zoom" qualifiers="const">
<return type="float">
</return>
<description>
- Return the current zoom value.
+ Return the current zoom value.
</description>
</method>
<method name="is_node_connected">
@@ -13985,40 +13795,40 @@ This approximation makes straight segments between each point, then subdivides t
<argument index="3" name="to_port" type="int">
</argument>
<description>
- Return true if the 'from_port' slot of 'from' GraphNode is connected to the 'to_port' slot of 'to' GraphNode.
+ Return true if the 'from_port' slot of 'from' GraphNode is connected to the 'to_port' slot of 'to' GraphNode.
</description>
</method>
<method name="is_right_disconnects_enabled" qualifiers="const">
<return type="bool">
</return>
<description>
- Return true is the disconnection of connections is enable in the visual GraphEdit. False otherwise.
+ Return true is the disconnection of connections is enable in the visual GraphEdit. False otherwise.
</description>
</method>
<method name="set_right_disconnects">
<argument index="0" name="enable" type="bool">
</argument>
<description>
- Enable the disconnection of existing connections in the visual GraphEdit by left-clicking a connection and releasing into the void.
+ Enable the disconnection of existing connections in the visual GraphEdit by left-clicking a connection and releasing into the void.
</description>
</method>
<method name="set_zoom">
<argument index="0" name="p_zoom" type="float">
</argument>
<description>
- Set the zoom value of the GraphEdit. Zoom value is between [0.01; 1.728].
+ Set the zoom value of the GraphEdit. Zoom value is between [0.01; 1.728].
</description>
</method>
</methods>
<signals>
<signal name="_begin_node_move">
<description>
- Signal sent at the beginning of a GraphNode movement.
+ Signal sent at the beginning of a GraphNode movement.
</description>
</signal>
<signal name="_end_node_move">
<description>
- Signal sent at the end of a GraphNode movement.
+ Signal sent at the end of a GraphNode movement.
</description>
</signal>
<signal name="connection_request">
@@ -14031,12 +13841,12 @@ This approximation makes straight segments between each point, then subdivides t
<argument index="3" name="to_slot" type="int">
</argument>
<description>
- Signal sent to the GraphEdit when the connection between 'from_slot' slot of 'from' GraphNode and 'to_slot' slot of 'to' GraphNode is attempted to be created.
+ Signal sent to the GraphEdit when the connection between 'from_slot' slot of 'from' GraphNode and 'to_slot' slot of 'to' GraphNode is attempted to be created.
</description>
</signal>
<signal name="delete_nodes_request">
<description>
- Signal sent when a GraphNode is attempted to be removed from the GraphEdit.
+ Signal sent when a GraphNode is attempted to be removed from the GraphEdit.
</description>
</signal>
<signal name="disconnection_request">
@@ -14049,19 +13859,19 @@ This approximation makes straight segments between each point, then subdivides t
<argument index="3" name="to_slot" type="int">
</argument>
<description>
- Signal sent to the GraphEdit when the connection between 'from_slot' slot of 'from' GraphNode and 'to_slot' slot of 'to' GraphNode is attempted to be removed.
+ Signal sent to the GraphEdit when the connection between 'from_slot' slot of 'from' GraphNode and 'to_slot' slot of 'to' GraphNode is attempted to be removed.
</description>
</signal>
<signal name="duplicate_nodes_request">
<description>
- Signal sent when a GraphNode is attempted to be duplicated in the GraphEdit.
+ Signal sent when a GraphNode is attempted to be duplicated in the GraphEdit.
</description>
</signal>
<signal name="popup_request">
<argument index="0" name="p_position" type="Vector2">
</argument>
<description>
- Signal sent when a popup is requested. Happens on right-clicking in the GraphEdit. 'p_position' is the position of the mouse pointer when the signal is sent.
+ Signal sent when a popup is requested. Happens on right-clicking in the GraphEdit. 'p_position' is the position of the mouse pointer when the signal is sent.
</description>
</signal>
</signals>
@@ -14080,22 +13890,22 @@ This approximation makes straight segments between each point, then subdivides t
</class>
<class name="GraphNode" inherits="Container" category="Core">
<brief_description>
- A GraphNode is a container with several input and output slots allowing connections between GraphNodes. Slots can have different, incompatible types.
+ A GraphNode is a container with several input and output slots allowing connections between GraphNodes. Slots can have different, incompatible types.
</brief_description>
<description>
- A GraphNode is a container defined by a title. It can have 1 or more input and output slots, which can be enabled (shown) or disabled (not shown) and have different (incompatible) types. Colors can also be assigned to slots. A tuple of input and output slots is defined for each GUI element included in the GraphNode. Input and output connections are left and right slots, but only enabled slots are counted as connections.
+ A GraphNode is a container defined by a title. It can have 1 or more input and output slots, which can be enabled (shown) or disabled (not shown) and have different (incompatible) types. Colors can also be assigned to slots. A tuple of input and output slots is defined for each GUI element included in the GraphNode. Input and output connections are left and right slots, but only enabled slots are counted as connections.
</description>
<methods>
<method name="clear_all_slots">
<description>
- Disable all input and output slots of the GraphNode.
+ Disable all input and output slots of the GraphNode.
</description>
</method>
<method name="clear_slot">
<argument index="0" name="idx" type="int">
</argument>
<description>
- Disable input and output slot whose index is 'idx'.
+ Disable input and output slot whose index is 'idx'.
</description>
</method>
<method name="get_connection_input_color">
@@ -14104,14 +13914,14 @@ This approximation makes straight segments between each point, then subdivides t
<argument index="0" name="idx" type="int">
</argument>
<description>
- Return the color of the input connection 'idx'.
+ Return the color of the input connection 'idx'.
</description>
</method>
<method name="get_connection_input_count">
<return type="int">
</return>
<description>
- Return the number of enabled input slots (connections) to the GraphNode.
+ Return the number of enabled input slots (connections) to the GraphNode.
</description>
</method>
<method name="get_connection_input_pos">
@@ -14120,7 +13930,7 @@ This approximation makes straight segments between each point, then subdivides t
<argument index="0" name="idx" type="int">
</argument>
<description>
- Return the position of the input connection 'idx'.
+ Return the position of the input connection 'idx'.
</description>
</method>
<method name="get_connection_input_type">
@@ -14129,7 +13939,7 @@ This approximation makes straight segments between each point, then subdivides t
<argument index="0" name="idx" type="int">
</argument>
<description>
- Return the type of the input connection 'idx'.
+ Return the type of the input connection 'idx'.
</description>
</method>
<method name="get_connection_output_color">
@@ -14138,14 +13948,14 @@ This approximation makes straight segments between each point, then subdivides t
<argument index="0" name="idx" type="int">
</argument>
<description>
- Return the color of the output connection 'idx'.
+ Return the color of the output connection 'idx'.
</description>
</method>
<method name="get_connection_output_count">
<return type="int">
</return>
<description>
- Return the number of enabled output slots (connections) of the GraphNode.
+ Return the number of enabled output slots (connections) of the GraphNode.
</description>
</method>
<method name="get_connection_output_pos">
@@ -14154,7 +13964,7 @@ This approximation makes straight segments between each point, then subdivides t
<argument index="0" name="idx" type="int">
</argument>
<description>
- Return the position of the output connection 'idx'.
+ Return the position of the output connection 'idx'.
</description>
</method>
<method name="get_connection_output_type">
@@ -14163,14 +13973,14 @@ This approximation makes straight segments between each point, then subdivides t
<argument index="0" name="idx" type="int">
</argument>
<description>
- Return the type of the output connection 'idx'.
+ Return the type of the output connection 'idx'.
</description>
</method>
<method name="get_offset" qualifiers="const">
<return type="Vector2">
</return>
<description>
- Return the offset of the GraphNode.
+ Return the offset of the GraphNode.
</description>
</method>
<method name="get_slot_color_left" qualifiers="const">
@@ -14179,7 +13989,7 @@ This approximation makes straight segments between each point, then subdivides t
<argument index="0" name="idx" type="int">
</argument>
<description>
- Return the color set to 'idx' left (input) slot.
+ Return the color set to 'idx' left (input) slot.
</description>
</method>
<method name="get_slot_color_right" qualifiers="const">
@@ -14188,7 +13998,7 @@ This approximation makes straight segments between each point, then subdivides t
<argument index="0" name="idx" type="int">
</argument>
<description>
- Return the color set to 'idx' right (output) slot.
+ Return the color set to 'idx' right (output) slot.
</description>
</method>
<method name="get_slot_type_left" qualifiers="const">
@@ -14197,7 +14007,7 @@ This approximation makes straight segments between each point, then subdivides t
<argument index="0" name="idx" type="int">
</argument>
<description>
- Return the (integer) type of left (input) 'idx' slot.
+ Return the (integer) type of left (input) 'idx' slot.
</description>
</method>
<method name="get_slot_type_right" qualifiers="const">
@@ -14206,21 +14016,21 @@ This approximation makes straight segments between each point, then subdivides t
<argument index="0" name="idx" type="int">
</argument>
<description>
- Return the (integer) type of right (output) 'idx' slot.
+ Return the (integer) type of right (output) 'idx' slot.
</description>
</method>
<method name="get_title" qualifiers="const">
<return type="String">
</return>
<description>
- Return the title of the GraphNode.
+ Return the title of the GraphNode.
</description>
</method>
<method name="is_close_button_visible" qualifiers="const">
<return type="bool">
</return>
<description>
- Returns true if the close button is shown. False otherwise.
+ Returns true if the close button is shown. False otherwise.
</description>
</method>
<method name="is_slot_enabled_left" qualifiers="const">
@@ -14229,7 +14039,7 @@ This approximation makes straight segments between each point, then subdivides t
<argument index="0" name="idx" type="int">
</argument>
<description>
- Return true if left (input) slot 'idx' is enabled. False otherwise.
+ Return true if left (input) slot 'idx' is enabled. False otherwise.
</description>
</method>
<method name="is_slot_enabled_right" qualifiers="const">
@@ -14238,21 +14048,21 @@ This approximation makes straight segments between each point, then subdivides t
<argument index="0" name="idx" type="int">
</argument>
<description>
- Return true if right (output) slot 'idx' is enabled. False otherwise.
+ Return true if right (output) slot 'idx' is enabled. False otherwise.
</description>
</method>
<method name="set_offset">
<argument index="0" name="offset" type="Vector2">
</argument>
<description>
- Set the offset of the GraphNode.
+ Set the offset of the GraphNode.
</description>
</method>
<method name="set_show_close_button">
<argument index="0" name="show" type="bool">
</argument>
<description>
- Show the close button on the GraphNode if 'show' is true (disabled by default). If enabled, a connection on the signal close_request is needed for the close button to work.
+ Show the close button on the GraphNode if 'show' is true (disabled by default). If enabled, a connection on the signal close_request is needed for the close button to work.
</description>
</method>
<method name="set_slot">
@@ -14271,21 +14081,21 @@ This approximation makes straight segments between each point, then subdivides t
<argument index="6" name="color_right" type="Color">
</argument>
<description>
- Set the tuple of input/output slots defined by 'idx' ID. 'left' slots are input, 'right' are output. 'type' is an integer defining the type of the slot. Refer to description for the compatibility between slot types.
+ Set the tuple of input/output slots defined by 'idx' ID. 'left' slots are input, 'right' are output. 'type' is an integer defining the type of the slot. Refer to description for the compatibility between slot types.
</description>
</method>
<method name="set_title">
<argument index="0" name="title" type="String">
</argument>
<description>
- Set the title of the GraphNode.
+ Set the title of the GraphNode.
</description>
</method>
</methods>
<signals>
<signal name="close_request">
<description>
- Signal sent on closing the GraphNode.
+ Signal sent on closing the GraphNode.
</description>
</signal>
<signal name="dragged">
@@ -14294,17 +14104,17 @@ This approximation makes straight segments between each point, then subdivides t
<argument index="1" name="to" type="Vector2">
</argument>
<description>
- Signal sent when the GraphNode is dragged.
+ Signal sent when the GraphNode is dragged.
</description>
</signal>
<signal name="offset_changed">
<description>
- Signal sent when the GraphNode is moved.
+ Signal sent when the GraphNode is moved.
</description>
</signal>
<signal name="raise_request">
<description>
- Signal sent when the GraphNode is requested to be displayed over other ones. Happens on focusing (clicking into) the GraphNode.
+ Signal sent when the GraphNode is requested to be displayed over other ones. Happens on focusing (clicking into) the GraphNode.
</description>
</signal>
</signals>
@@ -14339,24 +14149,24 @@ This approximation makes straight segments between each point, then subdivides t
</class>
<class name="GridContainer" inherits="Container" category="Core">
<brief_description>
- Grid container used to arrange elements in a grid like layout
+ Grid container used to arrange elements in a grid like layout
</brief_description>
<description>
- Grid container will arrange its children in a grid like structure, the grid columns are specified using the [method set_columns] method and the number of rows will be equal to the number of children in the container divided by the number of columns, for example: if the container has 5 children, and 2 columns, there will be 3 rows in the container. Notice that grid layout will preserve the columns and rows for every size of the container.
+ Grid container will arrange its children in a grid like structure, the grid columns are specified using the [method set_columns] method and the number of rows will be equal to the number of children in the container divided by the number of columns, for example: if the container has 5 children, and 2 columns, there will be 3 rows in the container. Notice that grid layout will preserve the columns and rows for every size of the container.
</description>
<methods>
<method name="get_columns" qualifiers="const">
<return type="int">
</return>
<description>
- Returns the number of columns in this container
+ Returns the number of columns in this container
</description>
</method>
<method name="set_columns">
<argument index="0" name="columns" type="int">
</argument>
<description>
- Sets the numbers of columns in the container, then reorder its children to accommodate the new layout
+ Sets the numbers of columns in the container, then reorder its children to accommodate the new layout
</description>
</method>
</methods>
@@ -14637,38 +14447,38 @@ This approximation makes straight segments between each point, then subdivides t
</class>
<class name="GrooveJoint2D" inherits="Joint2D" category="Core">
<brief_description>
- Groove constraint for 2D physics.
+ Groove constraint for 2D physics.
</brief_description>
<description>
- Groove constraint for 2D physics. This is useful for making a body "slide" through a segment placed in another.
+ Groove constraint for 2D physics. This is useful for making a body "slide" through a segment placed in another.
</description>
<methods>
<method name="get_initial_offset" qualifiers="const">
<return type="float">
</return>
<description>
- Set the final offset of the groove on body A.
+ Set the final offset of the groove on body A.
</description>
</method>
<method name="get_length" qualifiers="const">
<return type="float">
</return>
<description>
- Return the length of the groove.
+ Return the length of the groove.
</description>
</method>
<method name="set_initial_offset">
<argument index="0" name="offset" type="float">
</argument>
<description>
- Set the initial offset of the groove on body A.
+ Set the initial offset of the groove on body A.
</description>
</method>
<method name="set_length">
<argument index="0" name="length" type="float">
</argument>
<description>
- Set the length of the groove.
+ Set the length of the groove.
</description>
</method>
</methods>
@@ -14677,10 +14487,10 @@ This approximation makes straight segments between each point, then subdivides t
</class>
<class name="HBoxContainer" inherits="BoxContainer" category="Core">
<brief_description>
- Horizontal box container.
+ Horizontal box container.
</brief_description>
<description>
- Horizontal box container. See [BoxContainer].
+ Horizontal box container. See [BoxContainer].
</description>
<methods>
</methods>
@@ -14693,10 +14503,10 @@ This approximation makes straight segments between each point, then subdivides t
</class>
<class name="HButtonArray" inherits="ButtonArray" category="Core">
<brief_description>
- Horizontal button array.
+ Horizontal button array.
</brief_description>
<description>
- Horizontal button array. See [ButtonArray].
+ Horizontal button array. See [ButtonArray].
</description>
<methods>
</methods>
@@ -14727,10 +14537,10 @@ This approximation makes straight segments between each point, then subdivides t
</class>
<class name="HScrollBar" inherits="ScrollBar" category="Core">
<brief_description>
- Horizontal scroll bar.
+ Horizontal scroll bar.
</brief_description>
<description>
- Horizontal scroll bar. See [ScrollBar]. This one goes from left (min) to right (max).
+ Horizontal scroll bar. See [ScrollBar]. This one goes from left (min) to right (max).
</description>
<methods>
</methods>
@@ -14757,10 +14567,10 @@ This approximation makes straight segments between each point, then subdivides t
</class>
<class name="HSeparator" inherits="Separator" category="Core">
<brief_description>
- Horizontal separator.
+ Horizontal separator.
</brief_description>
<description>
- Horizontal separator. See [Separator]. It is used to separate objects vertically, though (but it looks horizontal!).
+ Horizontal separator. See [Separator]. It is used to separate objects vertically, though (but it looks horizontal!).
</description>
<methods>
</methods>
@@ -14775,10 +14585,10 @@ This approximation makes straight segments between each point, then subdivides t
</class>
<class name="HSlider" inherits="Slider" category="Core">
<brief_description>
- Horizontal slider.
+ Horizontal slider.
</brief_description>
<description>
- Horizontal slider. See [Slider]. This one goes from left (min) to right (max).
+ Horizontal slider. See [Slider]. This one goes from left (min) to right (max).
</description>
<methods>
</methods>
@@ -14801,10 +14611,10 @@ This approximation makes straight segments between each point, then subdivides t
</class>
<class name="HSplitContainer" inherits="SplitContainer" category="Core">
<brief_description>
- Horizontal split container.
+ Horizontal split container.
</brief_description>
<description>
- Horizontal split container. See [SplitContainer]. This goes from left to right.
+ Horizontal split container. See [SplitContainer]. This goes from left to right.
</description>
<methods>
</methods>
@@ -14823,16 +14633,16 @@ This approximation makes straight segments between each point, then subdivides t
</class>
<class name="HTTPClient" inherits="Reference" category="Core">
<brief_description>
- Hyper-text transfer protocol client.
+ Hyper-text transfer protocol client.
</brief_description>
<description>
- Hyper-text transfer protocol client. Supports SSL and SSL server certificate verification.
- Can be reused to connect to different hosts and make many requests.
+ Hyper-text transfer protocol client. Supports SSL and SSL server certificate verification.
+ Can be reused to connect to different hosts and make many requests.
</description>
<methods>
<method name="close">
<description>
- Cloces the current connection, allows for reusal of [HTTPClient].
+ Cloces the current connection, allows for reusal of [HTTPClient].
</description>
</method>
<method name="connect">
@@ -14847,81 +14657,81 @@ This approximation makes straight segments between each point, then subdivides t
<argument index="3" name="verify_host" type="bool" default="true">
</argument>
<description>
- Connect to a host. This needs to be done before any requests are sent.
- The host should not have http:// prepended but will strip the protocol identifier if provided.
- verify_host will check the SSL identity of the host if set to true.
+ Connect to a host. This needs to be done before any requests are sent.
+ The host should not have http:// prepended but will strip the protocol identifier if provided.
+ verify_host will check the SSL identity of the host if set to true.
</description>
</method>
<method name="get_connection" qualifiers="const">
<return type="StreamPeer">
</return>
<description>
- Return current connection.
+ Return current connection.
</description>
</method>
<method name="get_response_body_length" qualifiers="const">
<return type="int">
</return>
<description>
- Return the response's body length.
+ Return the response's body length.
</description>
</method>
<method name="get_response_code" qualifiers="const">
<return type="int">
</return>
<description>
- Return the HTTP status code of the response.
+ Return the HTTP status code of the response.
</description>
</method>
<method name="get_response_headers">
<return type="StringArray">
</return>
<description>
- Return the response headers.
+ Return the response headers.
</description>
</method>
<method name="get_response_headers_as_dictionary">
<return type="Dictionary">
</return>
<description>
- Returns all response headers as dictionary where the case-sensitivity of the keys and values is kept like the server delivers it. A value is a simple String, this string can have more than one value where "; " is used as separator.
-Structure: ("key":"value1; value2")
-Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
+ Returns all response headers as dictionary where the case-sensitivity of the keys and values is kept like the server delivers it. A value is a simple String, this string can have more than one value where "; " is used as separator.
+ Structure: ("key":"value1; value2")
+ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
</description>
</method>
<method name="get_status" qualifiers="const">
<return type="int">
</return>
<description>
- Returns a status string like STATUS_REQUESTING. Need to call [method poll] in order to get status updates.
+ Returns a status string like STATUS_REQUESTING. Need to call [method poll] in order to get status updates.
</description>
</method>
<method name="has_response" qualifiers="const">
<return type="bool">
</return>
<description>
- Return whether this [HTTPClient] has a response available.
+ Return whether this [HTTPClient] has a response available.
</description>
</method>
<method name="is_blocking_mode_enabled" qualifiers="const">
<return type="bool">
</return>
<description>
- Return whether blocking mode is enabled.
+ Return whether blocking mode is enabled.
</description>
</method>
<method name="is_response_chunked" qualifiers="const">
<return type="bool">
</return>
<description>
- Return whether this [HTTPClient] has a response that is chunked.
+ Return whether this [HTTPClient] has a response that is chunked.
</description>
</method>
<method name="poll">
<return type="Error">
</return>
<description>
- This needs to be called in order to have any request processed. Check results with [method get_status]
+ This needs to be called in order to have any request processed. Check results with [method get_status]
</description>
</method>
<method name="query_string_from_dict">
@@ -14930,19 +14740,19 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="0" name="fields" type="Dictionary">
</argument>
<description>
- Generates a GET/POST application/x-www-form-urlencoded style query string from a provided dictionary, e.g.:
- [codeblock]
- var fields = {"username": "user", "password": "pass"}
- String queryString = httpClient.query_string_from_dict(fields)
- returns:= "username=user&amp;password=pass"
- [/codeblock]
+ Generates a GET/POST application/x-www-form-urlencoded style query string from a provided dictionary, e.g.:
+ [codeblock]
+ var fields = {"username": "user", "password": "pass"}
+ String queryString = httpClient.query_string_from_dict(fields)
+ returns:= "username=user&amp;password=pass"
+ [/codeblock]
</description>
</method>
<method name="read_response_body_chunk">
<return type="RawArray">
</return>
<description>
- Reads one chunk from the response.
+ Reads one chunk from the response.
</description>
</method>
<method name="request">
@@ -14957,15 +14767,15 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="3" name="body" type="String" default="&quot;&quot;">
</argument>
<description>
- Sends a request to the connected host. The url is what is normally behind the hostname, i.e. in [code]http://somehost.com/index.php[/code], url would be "index.php".
- Headers are HTTP request headers.
- To create a POST request with query strings to push to the server, do:
- [codeblock]
- var fields = {"username" : "user", "password" : "pass"}
- var queryString = httpClient.query_string_from_dict(fields)
- var headers = ["Content-Type: application/x-www-form-urlencoded", "Content-Length: " + str(queryString.length())]
- var result = httpClient.request(httpClient.METHOD_POST, "index.php", headers, queryString)
- [/codeblock]
+ Sends a request to the connected host. The url is what is normally behind the hostname, i.e. in [code]http://somehost.com/index.php[/code], url would be "index.php".
+ Headers are HTTP request headers.
+ To create a POST request with query strings to push to the server, do:
+ [codeblock]
+ var fields = {"username" : "user", "password" : "pass"}
+ var queryString = httpClient.query_string_from_dict(fields)
+ var headers = ["Content-Type: application/x-www-form-urlencoded", "Content-Length: " + str(queryString.length())]
+ var result = httpClient.request(httpClient.METHOD_POST, "index.php", headers, queryString)
+ [/codeblock]
</description>
</method>
<method name="request_raw">
@@ -14980,9 +14790,9 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="3" name="body" type="RawArray">
</argument>
<description>
- Sends a raw request to the connected host. The url is what is normally behind the hostname, i.e. in [code]http://somehost.com/index.php[/code], url would be "index.php".
- Headers are HTTP request headers.
- Sends body raw, as a byte array, does not encode it in any way.
+ Sends a raw request to the connected host. The url is what is normally behind the hostname, i.e. in [code]http://somehost.com/index.php[/code], url would be "index.php".
+ Headers are HTTP request headers.
+ Sends body raw, as a byte array, does not encode it in any way.
</description>
</method>
<method name="send_body_data">
@@ -14991,7 +14801,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="0" name="body" type="RawArray">
</argument>
<description>
- Stub function
+ Stub function
</description>
</method>
<method name="send_body_text">
@@ -15000,28 +14810,28 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="0" name="body" type="String">
</argument>
<description>
- Stub function
+ Stub function
</description>
</method>
<method name="set_blocking_mode">
<argument index="0" name="enabled" type="bool">
</argument>
<description>
- If set to true, execution will block until all data is read from the response.
+ If set to true, execution will block until all data is read from the response.
</description>
</method>
<method name="set_connection">
<argument index="0" name="connection" type="StreamPeer">
</argument>
<description>
- Set connection to use, for this client.
+ Set connection to use, for this client.
</description>
</method>
<method name="set_read_chunk_size">
<argument index="0" name="bytes" type="int">
</argument>
<description>
- Sets the size of the buffer used and maximum bytes to read per iteration. see [method read_response_body_chunk]
+ Sets the size of the buffer used and maximum bytes to read per iteration. see [method read_response_body_chunk]
</description>
</method>
</methods>
@@ -15166,65 +14976,65 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
</class>
<class name="HTTPRequest" inherits="Node" category="Core">
<brief_description>
- A Node with the ability to send HTTP requests.
+ A Node with the ability to send HTTP requests.
</brief_description>
<description>
- A Node with the ability to send HTTP requests. Uses a [HTTPClient] internally, supports HTTPS.
- Can be used to make HTTP requests or download files via HTTP.
+ A Node with the ability to send HTTP requests. Uses a [HTTPClient] internally, supports HTTPS.
+ Can be used to make HTTP requests or download files via HTTP.
</description>
<methods>
<method name="cancel_request">
<description>
- Cancel the current request.
+ Cancel the current request.
</description>
</method>
<method name="get_body_size" qualifiers="const">
<return type="int">
</return>
<description>
- Return the response body length.
+ Return the response body length.
</description>
</method>
<method name="get_body_size_limit" qualifiers="const">
<return type="int">
</return>
<description>
- Return current body size limit.
+ Return current body size limit.
</description>
</method>
<method name="get_download_file" qualifiers="const">
<return type="String">
</return>
<description>
- Return the file this request will download into.
+ Return the file this request will download into.
</description>
</method>
<method name="get_downloaded_bytes" qualifiers="const">
<return type="int">
</return>
<description>
- Return the amount of bytes this HTTPRequest downloaded.
+ Return the amount of bytes this HTTPRequest downloaded.
</description>
</method>
<method name="get_http_client_status" qualifiers="const">
<return type="int">
</return>
<description>
- Return the current status of the underlying [HTTPClient].
+ Return the current status of the underlying [HTTPClient].
</description>
</method>
<method name="get_max_redirects" qualifiers="const">
<return type="int">
</return>
<description>
- Return the maximum amount of redirects that will be followed.
+ Return the maximum amount of redirects that will be followed.
</description>
</method>
<method name="is_using_threads" qualifiers="const">
<return type="bool">
</return>
<description>
- Whether this request is using threads.
+ Whether this request is using threads.
</description>
</method>
<method name="request">
@@ -15237,37 +15047,37 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="2" name="ssl_validate_domain" type="bool" default="true">
</argument>
<description>
- Make a HTTP GET request. The url is the complete url including "http://" or "https://" which will be parsed for a host and a port.
- The custom_headers are HTTP request headers which will be used. If User-Agent is not specified a Godot specific will be used.
- The ssl_validate_domain specifies if in case of HTTPS the server certificate should be verified.
+ Make a HTTP GET request. The url is the complete url including "http://" or "https://" which will be parsed for a host and a port.
+ The custom_headers are HTTP request headers which will be used. If User-Agent is not specified a Godot specific will be used.
+ The ssl_validate_domain specifies if in case of HTTPS the server certificate should be verified.
</description>
</method>
<method name="set_body_size_limit">
<argument index="0" name="bytes" type="int">
</argument>
<description>
- Set the response body size limit.
+ Set the response body size limit.
</description>
</method>
<method name="set_download_file">
<argument index="0" name="path" type="String">
</argument>
<description>
- Set the file to download into. Outputs the response body into the file.
+ Set the file to download into. Outputs the response body into the file.
</description>
</method>
<method name="set_max_redirects">
<argument index="0" name="amount" type="int">
</argument>
<description>
- Set the maximum amount of redirects the request will follow.
+ Set the maximum amount of redirects the request will follow.
</description>
</method>
<method name="set_use_threads">
<argument index="0" name="enable" type="bool">
</argument>
<description>
- Make this HTTPRequest use threads.
+ Make this HTTPRequest use threads.
</description>
</method>
</methods>
@@ -15282,7 +15092,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="3" name="body" type="RawArray">
</argument>
<description>
- This signal is emitted upon request completion.
+ This signal is emitted upon request completion.
</description>
</signal>
</signals>
@@ -15392,17 +15202,17 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
</class>
<class name="IP" inherits="Object" category="Core">
<brief_description>
- IP Protocol support functions.
+ IP Protocol support functions.
</brief_description>
<description>
- IP contains some support functions for the IPv4 protocol. TCP/IP support is in different classes (see [StreamPeerTCP] and [TCP_Server]). IP provides hostname resolution support, both blocking and threaded.
+ IP contains some support functions for the IPv4 protocol. TCP/IP support is in different classes (see [StreamPeerTCP] and [TCP_Server]). IP provides hostname resolution support, both blocking and threaded.
</description>
<methods>
<method name="erase_resolve_item">
<argument index="0" name="id" type="int">
</argument>
<description>
- Erase a queue ID, removing it from the queue if needed. This should be used after a queue is completed to free it and enable more queries to happen.
+ Erase a queue ID, removing it from the queue if needed. This should be used after a queue is completed to free it and enable more queries to happen.
</description>
</method>
<method name="get_local_addresses" qualifiers="const">
@@ -15417,7 +15227,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="0" name="id" type="int">
</argument>
<description>
- Return a resolved item address, or an empty string if an error happened or resolution didn't happen yet (see [method get_resolve_item_status]).
+ Return a resolved item address, or an empty string if an error happened or resolution didn't happen yet (see [method get_resolve_item_status]).
</description>
</method>
<method name="get_resolve_item_status" qualifiers="const">
@@ -15426,7 +15236,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="0" name="id" type="int">
</argument>
<description>
- Return the status of hostname queued for resolving, given it's queue ID. Returned status can be any of the RESOLVER_STATUS_* enumeration.
+ Return the status of hostname queued for resolving, given it's queue ID. Returned status can be any of the RESOLVER_STATUS_* enumeration.
</description>
</method>
<method name="resolve_hostname">
@@ -15435,7 +15245,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="0" name="host" type="String">
</argument>
<description>
- Resolve a given hostname, blocking. Resolved hostname is returned as an IP.
+ Resolve a given hostname, blocking. Resolved hostname is returned as an IP.
</description>
</method>
<method name="resolve_hostname_queue_item">
@@ -15444,7 +15254,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="0" name="host" type="String">
</argument>
<description>
- Create a queue item for resolving a given hostname. The queue ID is returned, or RESOLVER_INVALID_ID on error.
+ Create a queue item for resolving a given hostname. The queue ID is returned, or RESOLVER_INVALID_ID on error.
</description>
</method>
</methods>
@@ -15475,10 +15285,10 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
</class>
<class name="Image" category="Built-In Types">
<brief_description>
- Image datatype.
+ Image datatype.
</brief_description>
<description>
- Built in native image datatype. Contains image data, which can be converted to a texture, and several functions to interact with it.
+ Built in native image datatype. Contains image data, which can be converted to a texture, and several functions to interact with it.
</description>
<methods>
<method name="Image">
@@ -15493,7 +15303,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="3" name="format" type="int">
</argument>
<description>
- Create an empty image of a specific size and format.
+ Create an empty image of a specific size and format.
</description>
</method>
<method name="blit_rect">
@@ -15504,7 +15314,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="2" name="dest" type="Vector2" default="0">
</argument>
<description>
- Copy a "src_rect" [Rect2] from "src" [Image] to this [Image] on coordinates "dest".
+ Copy a "src_rect" [Rect2] from "src" [Image] to this [Image] on coordinates "dest".
</description>
</method>
<method name="brush_transfer">
@@ -15515,7 +15325,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="2" name="pos" type="Vector2" default="0">
</argument>
<description>
- Transfer data from "src" to this [Image] using a "brush" as a mask/brush on coordinates "pos".
+ Transfer data from "src" to this [Image] using a "brush" as a mask/brush on coordinates "pos".
</description>
</method>
<method name="brushed">
@@ -15528,7 +15338,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="2" name="pos" type="Vector2" default="0">
</argument>
<description>
- Return a new [Image] from this [Image] that is created by brushhing see [method brush_transfer].
+ Return a new [Image] from this [Image] that is created by brushhing see [method brush_transfer].
</description>
</method>
<method name="compressed">
@@ -15537,7 +15347,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="0" name="format" type="int" default="0">
</argument>
<description>
- Return a new compressed [Image] from this [Image] using one of [Image].COMPRESS_*.
+ Return a new compressed [Image] from this [Image] using one of [Image].COMPRESS_*.
</description>
</method>
<method name="converted">
@@ -15546,21 +15356,21 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="0" name="format" type="int" default="0">
</argument>
<description>
- Return a new [Image] from this [Image] with a different format.
+ Return a new [Image] from this [Image] with a different format.
</description>
</method>
<method name="decompressed">
<return type="Image">
</return>
<description>
- Return a new decompressed [Image].
+ Return a new decompressed [Image].
</description>
</method>
<method name="empty">
<return type="bool">
</return>
<description>
- Return whether this [Image] is empty(no data).
+ Return whether this [Image] is empty(no data).
</description>
</method>
<method name="fix_alpha_edges">
@@ -15571,21 +15381,21 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<return type="RawArray">
</return>
<description>
- Return the raw data of the [Image].
+ Return the raw data of the [Image].
</description>
</method>
<method name="get_format">
<return type="int">
</return>
<description>
- Return the format of the [Image], one of [Image].FORMAT_*.
+ Return the format of the [Image], one of [Image].FORMAT_*.
</description>
</method>
<method name="get_height">
<return type="int">
</return>
<description>
- Return the height of the [Image].
+ Return the height of the [Image].
</description>
</method>
<method name="get_pixel">
@@ -15598,7 +15408,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="2" name="mipmap_level" type="int" default="0">
</argument>
<description>
- Return the color of the pixel in the [Image] on coordinates "x,y" on mipmap level "mipmap_level".
+ Return the color of the pixel in the [Image] on coordinates "x,y" on mipmap level "mipmap_level".
</description>
</method>
<method name="get_rect">
@@ -15607,21 +15417,21 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="0" name="area" type="Rect2" default="0">
</argument>
<description>
- Return a new [Image] that is a copy of "area" in this [Image].
+ Return a new [Image] that is a copy of "area" in this [Image].
</description>
</method>
<method name="get_used_rect">
<return type="Rect2">
</return>
<description>
- Return the area of this [Image] that is used/visibly colored/opaque.
+ Return the area of this [Image] that is used/visibly colored/opaque.
</description>
</method>
<method name="get_width">
<return type="int">
</return>
<description>
- Return the width of the [Image].
+ Return the width of the [Image].
</description>
</method>
<method name="load">
@@ -15630,7 +15440,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="0" name="path" type="String" default="0">
</argument>
<description>
- Load an [Image].
+ Load an [Image].
</description>
</method>
<method name="put_pixel">
@@ -15643,7 +15453,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="3" name="mipmap_level" type="int" default="0">
</argument>
<description>
- Put a pixel of "color" on coordinates "x,y" on mipmap level "mipmap_level".
+ Put a pixel of "color" on coordinates "x,y" on mipmap level "mipmap_level".
</description>
</method>
<method name="resized">
@@ -15656,7 +15466,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="2" name="interpolation" type="int" default="1">
</argument>
<description>
- Return a new [Image] from this [Image] that is resized to size "x,y" using [Image].INTERPOLATE_*.
+ Return a new [Image] from this [Image] that is resized to size "x,y" using [Image].INTERPOLATE_*.
</description>
</method>
<method name="save_png">
@@ -15665,7 +15475,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="0" name="path" type="String" default="0">
</argument>
<description>
- Save this [Image] as a png.
+ Save this [Image] as a png.
</description>
</method>
</methods>
@@ -15734,10 +15544,10 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
</class>
<class name="ImageTexture" inherits="Texture" category="Core">
<brief_description>
- A [Texture] based on an [Image].
+ A [Texture] based on an [Image].
</brief_description>
<description>
- A [Texture] based on an [Image]. Can be created from an [Image].
+ A [Texture] based on an [Image]. Can be created from an [Image].
</description>
<methods>
<method name="create">
@@ -15750,9 +15560,9 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="3" name="flags" type="int" default="7">
</argument>
<description>
- Create a new [ImageTexture] with "width" and "height".
- "format" one of [Image].FORMAT_*.
- "flags" one or more of [Texture].FLAG_*.
+ Create a new [ImageTexture] with "width" and "height".
+ "format" one of [Image].FORMAT_*.
+ "flags" one or more of [Texture].FLAG_*.
</description>
</method>
<method name="create_from_image">
@@ -15761,7 +15571,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="1" name="flags" type="int" default="7">
</argument>
<description>
- Create a new [ImageTexture] from an [Image] with "flags" from [Texture].FLAG_*.
+ Create a new [ImageTexture] from an [Image] with "flags" from [Texture].FLAG_*.
</description>
</method>
<method name="fix_alpha_edges">
@@ -15772,35 +15582,35 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<return type="Image">
</return>
<description>
- Return the [Image] of this [ImageTexture].
+ Return the [Image] of this [ImageTexture].
</description>
</method>
<method name="get_format" qualifiers="const">
<return type="int">
</return>
<description>
- Return the format of the [ImageTexture], one of [Image].FORMAT_*.
+ Return the format of the [ImageTexture], one of [Image].FORMAT_*.
</description>
</method>
<method name="get_lossy_storage_quality" qualifiers="const">
<return type="float">
</return>
<description>
- Return the storage quality for [ImageTexture].STORAGE_COMPRESS_LOSSY.
+ Return the storage quality for [ImageTexture].STORAGE_COMPRESS_LOSSY.
</description>
</method>
<method name="get_storage" qualifiers="const">
<return type="int">
</return>
<description>
- Return the storage type. One of [ImageTexture].STORAGE_*.
+ Return the storage type. One of [ImageTexture].STORAGE_*.
</description>
</method>
<method name="load">
<argument index="0" name="path" type="String">
</argument>
<description>
- Load an [ImageTexure].
+ Load an [ImageTexure].
</description>
</method>
<method name="normal_to_xy">
@@ -15815,14 +15625,14 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="0" name="image" type="Image">
</argument>
<description>
- Set the [Image] of this [ImageTexture].
+ Set the [Image] of this [ImageTexture].
</description>
</method>
<method name="set_lossy_storage_quality">
<argument index="0" name="quality" type="float">
</argument>
<description>
- Set the storage quality in case of [ImageTexture].STORAGE_COMPRESS_LOSSY.
+ Set the storage quality in case of [ImageTexture].STORAGE_COMPRESS_LOSSY.
</description>
</method>
<method name="set_size_override">
@@ -15835,7 +15645,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="0" name="mode" type="int">
</argument>
<description>
- Set the storage type. One of [ImageTexture].STORAGE_*.
+ Set the storage type. One of [ImageTexture].STORAGE_*.
</description>
</method>
<method name="shrink_x2_and_keep_size">
@@ -15929,24 +15739,24 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
</class>
<class name="Input" inherits="Object" category="Core">
<brief_description>
- A Singleton that deals with inputs.
+ A Singleton that deals with inputs.
</brief_description>
<description>
- A Singleton that deals with inputs. This includes key presses, mouse buttons and movement, joysticks, and input actions.
+ A Singleton that deals with inputs. This includes key presses, mouse buttons and movement, joysticks, and input actions.
</description>
<methods>
<method name="action_press">
<argument index="0" name="action" type="String">
</argument>
<description>
- This will simulate pressing the specificed action.
+ This will simulate pressing the specificed action.
</description>
</method>
<method name="action_release">
<argument index="0" name="action" type="String">
</argument>
<description>
- If the specified action is already pressed, this will release it.
+ If the specified action is already pressed, this will release it.
</description>
</method>
<method name="add_joy_mapping">
@@ -15955,14 +15765,21 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="1" name="update_existing" type="bool" default="false">
</argument>
<description>
- Add a new mapping entry (in SDL2 format) to the mapping database. Optionally update already connected devices.
+ Add a new mapping entry (in SDL2 format) to the mapping database. Optionally update already connected devices.
</description>
</method>
<method name="get_accelerometer">
<return type="Vector3">
</return>
<description>
- If the device has an accelerometer, this will return the movement.
+ If the device has an accelerometer, this will return the movement.
+ </description>
+ </method>
+ <method name="get_connected_joysticks">
+ <return type="Array">
+ </return>
+ <description>
+ Returns an [Array] containing the device IDs of all currently connected joysticks.
</description>
</method>
<method name="get_joy_axis">
@@ -15973,7 +15790,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="1" name="axis" type="int">
</argument>
<description>
- Returns the current value of the joystick axis at given index (see JOY_* constants in [@Global Scope])
+ Returns the current value of the joystick axis at given index (see JOY_* constants in [@Global Scope])
</description>
</method>
<method name="get_joy_guid" qualifiers="const">
@@ -15982,7 +15799,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="0" name="device" type="int">
</argument>
<description>
- Returns a SDL2 compatible device guid on platforms that use gamepad remapping. Returns "Default Gamepad" otherwise.
+ Returns a SDL2 compatible device guid on platforms that use gamepad remapping. Returns "Default Gamepad" otherwise.
</description>
</method>
<method name="get_joy_name">
@@ -15991,7 +15808,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="0" name="device" type="int">
</argument>
<description>
- Returns the name of the joystick at the specified device index
+ Returns the name of the joystick at the specified device index
</description>
</method>
<method name="get_joy_vibration_duration">
@@ -16000,7 +15817,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="0" name="device" type="int">
</argument>
<description>
- Returns the duration of the current vibration effect in seconds.
+ Returns the duration of the current vibration effect in seconds.
</description>
</method>
<method name="get_joy_vibration_strength">
@@ -16009,35 +15826,35 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="0" name="device" type="int">
</argument>
<description>
- Returns the strength of the joystick vibration: x is the strength of the weak motor, and y is the strength of the strong motor.
+ Returns the strength of the joystick vibration: x is the strength of the weak motor, and y is the strength of the strong motor.
</description>
</method>
<method name="get_magnetometer">
<return type="Vector3">
</return>
<description>
- If the device has a magnetometer, this will return the magnetic field strength in micro-Tesla for all axes.
+ If the device has a magnetometer, this will return the magnetic field strength in micro-Tesla for all axes.
</description>
</method>
<method name="get_mouse_button_mask" qualifiers="const">
<return type="int">
</return>
<description>
- Returns mouse buttons as a bitmask. If multiple mouse buttons are pressed at the same time the bits are added together.
+ Returns mouse buttons as a bitmask. If multiple mouse buttons are pressed at the same time the bits are added together.
</description>
</method>
<method name="get_mouse_mode" qualifiers="const">
<return type="int">
</return>
<description>
- Return the mouse mode. See the constants for more information.
+ Return the mouse mode. See the constants for more information.
</description>
</method>
<method name="get_mouse_speed" qualifiers="const">
<return type="Vector2">
</return>
<description>
- Returns the mouse speed.
+ Returns the mouse speed.
</description>
</method>
<method name="is_action_pressed">
@@ -16046,7 +15863,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="0" name="action" type="String">
</argument>
<description>
- Returns true or false depending on whether the action event is pressed. Actions and their events can be set in the Project Settings / Input Map tab. Or be set with [InputMap].
+ Returns true or false depending on whether the action event is pressed. Actions and their events can be set in the Project Settings / Input Map tab. Or be set with [InputMap].
</description>
</method>
<method name="is_joy_button_pressed">
@@ -16057,7 +15874,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="1" name="button" type="int">
</argument>
<description>
- Returns if the joystick button at the given index is currently pressed. (see JOY_* constants in [@Global Scope])
+ Returns if the joystick button at the given index is currently pressed. (see JOY_* constants in [@Global Scope])
</description>
</method>
<method name="is_joy_known">
@@ -16066,7 +15883,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="0" name="device" type="int">
</argument>
<description>
- Returns if the specified device is known by the system. This means that it sets all button and axis indices exactly as defined in the JOY_* constants (see [@Global Scope]). Unknown joysticks are not expected to match these constants, but you can still retrieve events from them.
+ Returns if the specified device is known by the system. This means that it sets all button and axis indices exactly as defined in the JOY_* constants (see [@Global Scope]). Unknown joysticks are not expected to match these constants, but you can still retrieve events from them.
</description>
</method>
<method name="is_key_pressed">
@@ -16075,7 +15892,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="0" name="scancode" type="int">
</argument>
<description>
- Returns true or false depending on whether the key is pressed or not. You can pass KEY_*, which are pre-defined constants listed in [@Global Scope].
+ Returns true or false depending on whether the key is pressed or not. You can pass KEY_*, which are pre-defined constants listed in [@Global Scope].
</description>
</method>
<method name="is_mouse_button_pressed">
@@ -16084,14 +15901,14 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="0" name="button" type="int">
</argument>
<description>
- Returns true or false depending on whether mouse button is pressed or not. You can pass BUTTON_*, which are pre-defined constants listed in [@Global Scope].
+ Returns true or false depending on whether mouse button is pressed or not. You can pass BUTTON_*, which are pre-defined constants listed in [@Global Scope].
</description>
</method>
<method name="remove_joy_mapping">
<argument index="0" name="guid" type="String">
</argument>
<description>
- Removes all mappings from the internal db that match the given uid.
+ Removes all mappings from the internal db that match the given uid.
</description>
</method>
<method name="set_custom_mouse_cursor">
@@ -16100,14 +15917,14 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="1" name="hotspot" type="Vector2" default="Vector2(0,0)">
</argument>
<description>
- Set a custom mouse cursor image, which is only visible inside the game window. The hotspot can also be specified.
+ Set a custom mouse cursor image, which is only visible inside the game window. The hotspot can also be specified.
</description>
</method>
<method name="set_mouse_mode">
<argument index="0" name="mode" type="int">
</argument>
<description>
- Set the mouse mode. See the constants for more information.
+ Set the mouse mode. See the constants for more information.
</description>
</method>
<method name="start_joy_vibration">
@@ -16120,21 +15937,21 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="3" name="duration" type="float" default="0">
</argument>
<description>
- Starts to vibrate the joystick. Joysticks usually come with two rumble motors, a strong and a weak one. weak_magnitude is the strength of the weak motor (between 0 and 1) and strong_magnitude is the strength of the strong motor (between 0 and 1). duration is the duration of the effect in seconds (a duration of 0 will play the vibration indefinitely).
+ Starts to vibrate the joystick. Joysticks usually come with two rumble motors, a strong and a weak one. weak_magnitude is the strength of the weak motor (between 0 and 1) and strong_magnitude is the strength of the strong motor (between 0 and 1). duration is the duration of the effect in seconds (a duration of 0 will play the vibration indefinitely).
</description>
</method>
<method name="stop_joy_vibration">
<argument index="0" name="device" type="int">
</argument>
<description>
- Stops the vibration of the joystick.
+ Stops the vibration of the joystick.
</description>
</method>
<method name="warp_mouse_pos">
<argument index="0" name="to" type="Vector2">
</argument>
<description>
- Sets the mouse position to the specified vector.
+ Sets the mouse position to the specified vector.
</description>
</method>
</methods>
@@ -16145,7 +15962,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="1" name="connected" type="bool">
</argument>
<description>
- Emitted when a joystick device has been connected or disconnected
+ Emitted when a joystick device has been connected or disconnected
</description>
</signal>
</signals>
@@ -16163,8 +15980,10 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
</class>
<class name="InputDefault" inherits="Input" category="Core">
<brief_description>
+ Default implementation of the [Input] class.
</brief_description>
<description>
+ Default implementation of the [Input] class, used internally by the editor and games for default input management.
</description>
<methods>
</methods>
@@ -16173,10 +15992,10 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
</class>
<class name="InputEvent" category="Built-In Types">
<brief_description>
- Built-in input event data.
+ Built-in input event data.
</brief_description>
<description>
- Built-in input event data. InputEvent is a built-in engine datatype, given that it's passed around and used so much. Depending on it's type, the members contained can be different, so read the documentation well!. Input events can also represent actions (editable from the project settings).
+ Built-in input event data. InputEvent is a built-in engine datatype, given that it's passed around and used so much. Depending on its type, the members contained can be different, so read the documentation well! Input events can also represent actions (editable from the project settings).
</description>
<methods>
<method name="is_action">
@@ -16185,37 +16004,39 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="0" name="action" type="String">
</argument>
<description>
- Return if this input event matches a pre-defined action, no matter the type.
+ Return if this input event matches a pre-defined action, no matter the type.
</description>
</method>
<method name="is_action_pressed">
<return type="bool">
</return>
- <argument index="0" name="is_action_pressed" type="String">
+ <argument index="0" name="action" type="String">
</argument>
<description>
+ Return whether the given action is being pressed (and is not an echo event for KEY events). Not relevant for the event types MOUSE_MOTION, SCREEN_DRAG and NONE.
</description>
</method>
<method name="is_action_released">
<return type="bool">
</return>
- <argument index="0" name="is_action_released" type="String">
+ <argument index="0" name="action" type="String">
</argument>
<description>
+ Return whether the given action is released (i.e. not pressed). Not relevant for the event types MOUSE_MOTION, SCREEN_DRAG and NONE.
</description>
</method>
<method name="is_echo">
<return type="bool">
</return>
<description>
- Return if this input event is an echo event (usually for key events).
+ Return if this input event is an echo event (only for events of type KEY, it will return false for other types).
</description>
</method>
<method name="is_pressed">
<return type="bool">
</return>
<description>
- Return if this input event is pressed (for key, mouse, joy button or screen press events).
+ Return if this input event is pressed. Not relevant for the event types MOUSE_MOTION, SCREEN_DRAG and NONE.
</description>
</method>
<method name="set_as_action">
@@ -16224,15 +16045,19 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="1" name="pressed" type="bool">
</argument>
<description>
+ Change the input event to an action event of the given name, regardless of its initial type, with the pressed status passed as argument.
</description>
</method>
</methods>
<members>
<member name="ID" type="int">
+ Event identifier, positive integer increased at each new event.
</member>
<member name="device" type="int">
+ Device identifier.
</member>
<member name="type" type="int">
+ Type of event (one of the [InputEvent] constants).
</member>
</members>
<constants>
@@ -16255,17 +16080,22 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
Joystick button event.
</constant>
<constant name="SCREEN_TOUCH" value="6">
+ Screen touch event.
</constant>
<constant name="SCREEN_DRAG" value="7">
+ Screen drag event.
</constant>
<constant name="ACTION" value="8">
+ Pre-defined action event (see [InputMap]).
</constant>
</constants>
</class>
<class name="InputEventAction" category="Built-In Types">
<brief_description>
+ Built-in input event type for actions.
</brief_description>
<description>
+ Input event type for actions that extends the global [InputEvent] type.
</description>
<methods>
<method name="is_action">
@@ -16274,34 +16104,39 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="0" name="action" type="String">
</argument>
<description>
+ Return if this input event matches a pre-defined action, i.e. always true for InputEventAction.
</description>
</method>
<method name="is_action_pressed">
<return type="bool">
</return>
- <argument index="0" name="is_action_pressed" type="String">
+ <argument index="0" name="action" type="String">
</argument>
<description>
+ Return whether the given action is being pressed.
</description>
</method>
<method name="is_action_released">
<return type="bool">
</return>
- <argument index="0" name="is_action_released" type="String">
+ <argument index="0" name="action" type="String">
</argument>
<description>
+ Return whether the given action is released (i.e. not pressed).
</description>
</method>
<method name="is_echo">
<return type="bool">
</return>
<description>
+ Return if this input event is an echo event (only for events of type KEY, i.e. always false for this type).
</description>
</method>
<method name="is_pressed">
<return type="bool">
</return>
<description>
+ Return if this input event is pressed.
</description>
</method>
<method name="set_as_action">
@@ -16310,42 +16145,57 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="1" name="pressed" type="bool">
</argument>
<description>
+ Change the input event to an action event of the given name with the pressed status passed as argument.
</description>
</method>
</methods>
<members>
<member name="ID" type="int">
+ Event identifier, positive integer increased at each new event.
</member>
<member name="device" type="int">
+ Device identifier.
</member>
<member name="type" type="int">
+ Type of event (one of the [InputEvent] constants).
</member>
</members>
<constants>
<constant name="NONE" value="0">
+ Empty input event.
</constant>
<constant name="KEY" value="1">
+ Key event.
</constant>
<constant name="MOUSE_MOTION" value="2">
+ Mouse motion event.
</constant>
<constant name="MOUSE_BUTTON" value="3">
+ Mouse button event.
</constant>
<constant name="JOYSTICK_MOTION" value="4">
+ Joystick motion event.
</constant>
<constant name="JOYSTICK_BUTTON" value="5">
+ Joystick button event.
</constant>
<constant name="SCREEN_TOUCH" value="6">
+ Screen touch event.
</constant>
<constant name="SCREEN_DRAG" value="7">
+ Screen drag event.
</constant>
<constant name="ACTION" value="8">
+ Pre-defined action event (see [InputMap]).
</constant>
</constants>
</class>
<class name="InputEventJoystickButton" category="Built-In Types">
<brief_description>
+ Built-in input event type for joystick button events.
</brief_description>
<description>
+ Input event type for joystick button events that extends the global [InputEvent] type.
</description>
<methods>
<method name="is_action">
@@ -16354,34 +16204,39 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="0" name="action" type="String">
</argument>
<description>
+ Return if this input event matches a pre-defined action.
</description>
</method>
<method name="is_action_pressed">
<return type="bool">
</return>
- <argument index="0" name="is_action_pressed" type="String">
+ <argument index="0" name="action" type="String">
</argument>
<description>
+ Return whether the given action is being pressed.
</description>
</method>
<method name="is_action_released">
<return type="bool">
</return>
- <argument index="0" name="is_action_released" type="String">
+ <argument index="0" name="action" type="String">
</argument>
<description>
+ Return whether the given action is released (i.e. not pressed).
</description>
</method>
<method name="is_echo">
<return type="bool">
</return>
<description>
+ Return if this input event is an echo event (only for events of type KEY, i.e. always false for this type).
</description>
</method>
<method name="is_pressed">
<return type="bool">
</return>
<description>
+ Return if this input event is pressed.
</description>
</method>
<method name="set_as_action">
@@ -16390,48 +16245,66 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="1" name="pressed" type="bool">
</argument>
<description>
+ Change the input event to an action event of the given name with the pressed status passed as argument.
</description>
</method>
</methods>
<members>
<member name="ID" type="int">
+ Event identifier, positive integer increased at each new event.
</member>
<member name="button_index" type="int">
+ Joystick button identifier, one of the JOY_BUTTON_* constants in [@Global Scope].
</member>
<member name="device" type="int">
+ Device identifier.
</member>
<member name="pressed" type="bool">
+ Pressed state of the joystick button.
</member>
<member name="pressure" type="float">
+ Intensity of the button pressure, ranges from 0 to 1.0.
</member>
<member name="type" type="int">
+ Type of event (one of the [InputEvent] constants).
</member>
</members>
<constants>
<constant name="NONE" value="0">
+ Empty input event.
</constant>
<constant name="KEY" value="1">
+ Key event.
</constant>
<constant name="MOUSE_MOTION" value="2">
+ Mouse motion event.
</constant>
<constant name="MOUSE_BUTTON" value="3">
+ Mouse button event.
</constant>
<constant name="JOYSTICK_MOTION" value="4">
+ Joystick motion event.
</constant>
<constant name="JOYSTICK_BUTTON" value="5">
+ Joystick button event.
</constant>
<constant name="SCREEN_TOUCH" value="6">
+ Screen touch event.
</constant>
<constant name="SCREEN_DRAG" value="7">
+ Screen drag event.
</constant>
<constant name="ACTION" value="8">
+ Pre-defined action event (see [InputMap]).
</constant>
</constants>
</class>
<class name="InputEventJoystickMotion" category="Built-In Types">
<brief_description>
+ Built-in input event type for joystick motion/axis events.
</brief_description>
<description>
+ Input event type for joystick motion/axis events that extends the global [InputEvent] type.
</description>
<methods>
<method name="is_action">
@@ -16445,29 +16318,33 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<method name="is_action_pressed">
<return type="bool">
</return>
- <argument index="0" name="is_action_pressed" type="String">
+ <argument index="0" name="action" type="String">
</argument>
<description>
+ Return whether the given action is being pressed.
</description>
</method>
<method name="is_action_released">
<return type="bool">
</return>
- <argument index="0" name="is_action_released" type="String">
+ <argument index="0" name="action" type="String">
</argument>
<description>
+ Return whether the given action is released (i.e. not pressed).
</description>
</method>
<method name="is_echo">
<return type="bool">
</return>
<description>
+ Return if this input event is an echo event (only for events of type KEY, i.e. always false for this type).
</description>
</method>
<method name="is_pressed">
<return type="bool">
</return>
<description>
+ Return if this input event is pressed.
</description>
</method>
<method name="set_as_action">
@@ -16476,46 +16353,63 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="1" name="pressed" type="bool">
</argument>
<description>
+ Change the input event to an action event of the given name with the pressed status passed as argument.
</description>
</method>
</methods>
<members>
<member name="ID" type="int">
+ Event identifier, positive integer increased at each new event.
</member>
<member name="axis" type="int">
+ Joystick axis identifier, one of the JOY_AXIS_* constants in [@Global Scope].
</member>
<member name="device" type="int">
+ Device identifier.
</member>
<member name="type" type="int">
+ Type of event (one of the [InputEvent] constants).
</member>
<member name="value" type="float">
+ Position of the axis, ranging from -1.0 to 1.0. A value of 0 means that the axis is in its neutral position.
</member>
</members>
<constants>
<constant name="NONE" value="0">
+ Empty input event.
</constant>
<constant name="KEY" value="1">
+ Key event.
</constant>
<constant name="MOUSE_MOTION" value="2">
+ Mouse motion event.
</constant>
<constant name="MOUSE_BUTTON" value="3">
+ Mouse button event.
</constant>
<constant name="JOYSTICK_MOTION" value="4">
+ Joystick motion event.
</constant>
<constant name="JOYSTICK_BUTTON" value="5">
+ Joystick button event.
</constant>
<constant name="SCREEN_TOUCH" value="6">
+ Screen touch event.
</constant>
<constant name="SCREEN_DRAG" value="7">
+ Screen drag event.
</constant>
<constant name="ACTION" value="8">
+ Pre-defined action event (see [InputMap]).
</constant>
</constants>
</class>
<class name="InputEventKey" category="Built-In Types">
<brief_description>
+ Built-in input event type for keyboard events.
</brief_description>
<description>
+ Input event type for keyboard events that extends the global [InputEvent] type.
</description>
<methods>
<method name="is_action">
@@ -16524,34 +16418,39 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="0" name="action" type="String">
</argument>
<description>
+ Return if this input event matches a pre-defined action.
</description>
</method>
<method name="is_action_pressed">
<return type="bool">
</return>
- <argument index="0" name="is_action_pressed" type="String">
+ <argument index="0" name="action" type="String">
</argument>
<description>
+ Return whether the given action is being pressed.
</description>
</method>
<method name="is_action_released">
<return type="bool">
</return>
- <argument index="0" name="is_action_released" type="String">
+ <argument index="0" name="action" type="String">
</argument>
<description>
+ Return whether the given action is released (i.e. not pressed).
</description>
</method>
<method name="is_echo">
<return type="bool">
</return>
<description>
+ Return if this input event is an echo event.
</description>
</method>
<method name="is_pressed">
<return type="bool">
</return>
<description>
+ Return if this input event is pressed.
</description>
</method>
<method name="set_as_action">
@@ -16560,58 +16459,81 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="1" name="pressed" type="bool">
</argument>
<description>
+ Change the input event to an action event of the given name with the pressed status passed as argument.
</description>
</method>
</methods>
<members>
<member name="ID" type="int">
+ Event identifier, positive integer increased at each new event.
</member>
<member name="alt" type="bool">
+ State of the Alt modifier.
</member>
<member name="control" type="bool">
+ State of the Ctrl modifier.
</member>
<member name="device" type="int">
+ Device identifier.
</member>
<member name="echo" type="bool">
+ Echo state of the key, i.e. whether it's a repeat event or not.
</member>
<member name="meta" type="bool">
+ State of the Meta modifier.
</member>
<member name="pressed" type="bool">
+ Pressed state of the key.
</member>
<member name="scancode" type="int">
+ Scancode of the key, one of the KEY_* constants in [@Global Scope].
</member>
<member name="shift" type="bool">
+ State of the Shift modifier.
</member>
<member name="type" type="int">
+ Type of event (one of the [InputEvent] constants).
</member>
<member name="unicode" type="int">
+ Unicode identifier of the key (when relevant).
</member>
</members>
<constants>
<constant name="NONE" value="0">
+ Empty input event.
</constant>
<constant name="KEY" value="1">
+ Key event.
</constant>
<constant name="MOUSE_MOTION" value="2">
+ Mouse motion event.
</constant>
<constant name="MOUSE_BUTTON" value="3">
+ Mouse button event.
</constant>
<constant name="JOYSTICK_MOTION" value="4">
+ Joystick motion event.
</constant>
<constant name="JOYSTICK_BUTTON" value="5">
+ Joystick button event.
</constant>
<constant name="SCREEN_TOUCH" value="6">
+ Screen touch event.
</constant>
<constant name="SCREEN_DRAG" value="7">
+ Screen drag event.
</constant>
<constant name="ACTION" value="8">
+ Pre-defined action event (see [InputMap]).
</constant>
</constants>
</class>
<class name="InputEventMouseButton" category="Built-In Types">
<brief_description>
+ Built-in input event type for mouse button events.
</brief_description>
<description>
+ Input event type for mouse button events that extends the global [InputEvent] type.
</description>
<methods>
<method name="is_action">
@@ -16620,34 +16542,39 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="0" name="action" type="String">
</argument>
<description>
+ Return if this input event matches a pre-defined action.
</description>
</method>
<method name="is_action_pressed">
<return type="bool">
</return>
- <argument index="0" name="is_action_pressed" type="String">
+ <argument index="0" name="action" type="String">
</argument>
<description>
+ Return whether the given action is being pressed.
</description>
</method>
<method name="is_action_released">
<return type="bool">
</return>
- <argument index="0" name="is_action_released" type="String">
+ <argument index="0" name="action" type="String">
</argument>
<description>
+ Return whether the given action is released (i.e. not pressed).
</description>
</method>
<method name="is_echo">
<return type="bool">
</return>
<description>
+ Return if this input event is an echo event (only for events of type KEY, i.e. always false for this type).
</description>
</method>
<method name="is_pressed">
<return type="bool">
</return>
<description>
+ Return if this input event is pressed.
</description>
</method>
<method name="set_as_action">
@@ -16656,70 +16583,99 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="1" name="pressed" type="bool">
</argument>
<description>
+ Change the input event to an action event of the given name with the pressed status passed as argument.
</description>
</method>
</methods>
<members>
<member name="ID" type="int">
+ Event identifier, positive integer increased at each new event.
</member>
<member name="alt" type="bool">
+ State of the Alt modifier.
</member>
<member name="button_index" type="int">
+ Mouse button identifier, one of the BUTTON_* or BUTTON_WHEEL_* constants in [@Global Scope].
</member>
<member name="button_mask" type="int">
+ Mouse button mask identifier, one of or a bitwise combination of the BUTTON_MASK_* constants in [@Global Scope].
</member>
<member name="control" type="bool">
+ State of the Control modifier.
</member>
<member name="device" type="int">
+ Device identifier.
</member>
<member name="doubleclick" type="bool">
+ Whether the event is a double-click.
</member>
<member name="global_pos" type="Vector2">
+ Global position of the mouse click.
</member>
<member name="global_x" type="int">
+ Global X coordinate of the mouse click.
</member>
<member name="global_y" type="int">
+ Global Y coordinate of the mouse click.
</member>
<member name="meta" type="bool">
+ State of the Meta modifier.
</member>
<member name="pos" type="Vector2">
+ Local position of the mouse click.
</member>
<member name="pressed" type="bool">
+ Pressed state of the mouse button.
</member>
<member name="shift" type="bool">
+ State of the Shift modifier.
</member>
<member name="type" type="int">
+ Type of event (one of the [InputEvent] constants).
</member>
<member name="x" type="int">
+ Local X coordinate of the mouse click.
</member>
<member name="y" type="int">
+ Local Y coordinate of the mouse click.
</member>
</members>
<constants>
<constant name="NONE" value="0">
+ Empty input event.
</constant>
<constant name="KEY" value="1">
+ Key event.
</constant>
<constant name="MOUSE_MOTION" value="2">
+ Mouse motion event.
</constant>
<constant name="MOUSE_BUTTON" value="3">
+ Mouse button event.
</constant>
<constant name="JOYSTICK_MOTION" value="4">
+ Joystick motion event.
</constant>
<constant name="JOYSTICK_BUTTON" value="5">
+ Joystick button event.
</constant>
<constant name="SCREEN_TOUCH" value="6">
+ Screen touch event.
</constant>
<constant name="SCREEN_DRAG" value="7">
+ Screen drag event.
</constant>
<constant name="ACTION" value="8">
+ Pre-defined action event (see [InputMap]).
</constant>
</constants>
</class>
<class name="InputEventMouseMotion" category="Built-In Types">
<brief_description>
+ Built-in input event type for mouse motion events.
</brief_description>
<description>
+ Input event type for mouse motion events that extends the global [InputEvent] type.
</description>
<methods>
<method name="is_action">
@@ -16728,34 +16684,39 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="0" name="action" type="String">
</argument>
<description>
+ Return if this input event matches a pre-defined action.
</description>
</method>
<method name="is_action_pressed">
<return type="bool">
</return>
- <argument index="0" name="is_action_pressed" type="String">
+ <argument index="0" name="action" type="String">
</argument>
<description>
+ Return whether the given action is being pressed. Not relevant for MOUSE_MOTION events, always false.
</description>
</method>
<method name="is_action_released">
<return type="bool">
</return>
- <argument index="0" name="is_action_released" type="String">
+ <argument index="0" name="action" type="String">
</argument>
<description>
+ Return whether the given action is released (i.e. not pressed). Not relevant for MOUSE_MOTION events, can be true or false depending on whether [method is_action] is true.
</description>
</method>
<method name="is_echo">
<return type="bool">
</return>
<description>
+ Return if this input event is an echo event (only for events of type KEY, i.e. always false for this type).
</description>
</method>
<method name="is_pressed">
<return type="bool">
</return>
<description>
+ Return if this input event is pressed. Not relevant for MOUSE_MOTION events, always false.
</description>
</method>
<method name="set_as_action">
@@ -16764,76 +16725,108 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="1" name="pressed" type="bool">
</argument>
<description>
+ Change the input event to an action event of the given name with the (irrelevant for this type) pressed status passed as argument.
</description>
</method>
</methods>
<members>
<member name="ID" type="int">
+ Event identifier, positive integer increased at each new event.
</member>
<member name="alt" type="bool">
+ State of the Alt modifier.
</member>
<member name="button_mask" type="int">
+ Mouse button mask identifier, one of or a bitwise combination of the BUTTON_MASK_* constants in [@Global Scope].
</member>
<member name="control" type="bool">
+ State of the Ctrl modifier.
</member>
<member name="device" type="int">
+ Device identifier.
</member>
<member name="global_pos" type="Vector2">
+ Global position of the mouse pointer.
</member>
<member name="global_x" type="int">
+ Global X coordinate of the mouse pointer.
</member>
<member name="global_y" type="int">
+ Global Y coordinate of the mouse pointer.
</member>
<member name="meta" type="bool">
+ State of the Meta modifier.
</member>
<member name="pos" type="Vector2">
+ Local position of the mouse pointer.
</member>
<member name="relative_pos" type="Vector2">
+ Position of the mouse pointer relative to the previous mouse position.
</member>
<member name="relative_x" type="int">
+ X coordinate of the mouse pointer relative to the previous mouse position.
</member>
<member name="relative_y" type="int">
+ Y coordinate of the mouse pointer relative to the previous mouse position.
</member>
<member name="shift" type="bool">
+ State of the Shift modifier.
</member>
<member name="speed" type="Vector2">
+ Speed of the mouse pointer.
</member>
<member name="speed_x" type="float">
+ Speed of the mouse pointer on the X axis.
</member>
<member name="speed_y" type="float">
+ Speed of the mouse pointer on the Y axis.
</member>
<member name="type" type="int">
+ Type of event (one of the [InputEvent] constants).
</member>
<member name="x" type="int">
+ Local X coordinate of the mouse pointer.
</member>
<member name="y" type="int">
+ Local Y coordinate of the mouse pointer.
</member>
</members>
<constants>
<constant name="NONE" value="0">
+ Empty input event.
</constant>
<constant name="KEY" value="1">
+ Key event.
</constant>
<constant name="MOUSE_MOTION" value="2">
+ Mouse motion event.
</constant>
<constant name="MOUSE_BUTTON" value="3">
+ Mouse button event.
</constant>
<constant name="JOYSTICK_MOTION" value="4">
+ Joystick motion event.
</constant>
<constant name="JOYSTICK_BUTTON" value="5">
+ Joystick button event.
</constant>
<constant name="SCREEN_TOUCH" value="6">
+ Screen touch event.
</constant>
<constant name="SCREEN_DRAG" value="7">
+ Screen drag event.
</constant>
<constant name="ACTION" value="8">
+ Pre-defined action event (see [InputMap]).
</constant>
</constants>
</class>
<class name="InputEventScreenDrag" category="Built-In Types">
<brief_description>
+ Built-in input event type for screen drag events.
</brief_description>
<description>
+ Input event type for screen drag events that extends the global [InputEvent] type.
</description>
<methods>
<method name="is_action">
@@ -16842,34 +16835,39 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="0" name="action" type="String">
</argument>
<description>
+ Return if this input event matches a pre-defined action.
</description>
</method>
<method name="is_action_pressed">
<return type="bool">
</return>
- <argument index="0" name="is_action_pressed" type="String">
+ <argument index="0" name="action" type="String">
</argument>
<description>
+ Return whether the given action is being pressed. Not relevant for SCREEN_DRAG events, always false.
</description>
</method>
<method name="is_action_released">
<return type="bool">
</return>
- <argument index="0" name="is_action_released" type="String">
+ <argument index="0" name="action" type="String">
</argument>
<description>
+ Return whether the given action is released (i.e. not pressed). Not relevant for SCREEN_DRAG events, can be true or false depending on whether [method is_action] is true.
</description>
</method>
<method name="is_echo">
<return type="bool">
</return>
<description>
+ Return if this input event is an echo event (only for events of type KEY, i.e. always false for this type).
</description>
</method>
<method name="is_pressed">
<return type="bool">
</return>
<description>
+ Return if this input event is pressed. Not relevant for SCREEN_DRAG events, always false.
</description>
</method>
<method name="set_as_action">
@@ -16878,62 +16876,87 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="1" name="pressed" type="bool">
</argument>
<description>
+ Change the input event to an action event of the given name with the (irrelevant for this type) pressed status passed as argument.
</description>
</method>
</methods>
<members>
<member name="ID" type="int">
+ Event identifier, positive integer increased at each new event.
</member>
<member name="device" type="int">
+ Device identifier.
</member>
<member name="index" type="int">
+ Drag event index in the case of a multi-drag event.
</member>
<member name="pos" type="Vector2">
+ Position of the drag event.
</member>
<member name="relative_pos" type="Vector2">
+ Position of the drag event relative to its start position.
</member>
<member name="relative_x" type="float">
+ X coordinate of the drag event relative to its start position.
</member>
<member name="relative_y" type="float">
+ Y coordinate of the drag event relative to its start position.
</member>
<member name="speed" type="Vector2">
+ Speed of the drag event.
</member>
<member name="speed_x" type="float">
+ Speed of the drag event on the X axis.
</member>
<member name="speed_y" type="float">
+ Speed of the drag event on the Y axis.
</member>
<member name="type" type="int">
+ Type of event (one of the [InputEvent] constants).
</member>
<member name="x" type="float">
+ X coordinate of the drag event.
</member>
<member name="y" type="float">
+ Y coordinate of the drag event.
</member>
</members>
<constants>
<constant name="NONE" value="0">
+ Empty input event.
</constant>
<constant name="KEY" value="1">
+ Key event.
</constant>
<constant name="MOUSE_MOTION" value="2">
+ Mouse motion event.
</constant>
<constant name="MOUSE_BUTTON" value="3">
+ Mouse button event.
</constant>
<constant name="JOYSTICK_MOTION" value="4">
+ Joystick motion event.
</constant>
<constant name="JOYSTICK_BUTTON" value="5">
+ Joystick button event.
</constant>
<constant name="SCREEN_TOUCH" value="6">
+ Screen touch event.
</constant>
<constant name="SCREEN_DRAG" value="7">
+ Screen drag event.
</constant>
<constant name="ACTION" value="8">
+ Pre-defined action event (see [InputMap]).
</constant>
</constants>
</class>
<class name="InputEventScreenTouch" category="Built-In Types">
<brief_description>
+ Built-in input event type for touchscreen drag events.
</brief_description>
<description>
+ Input event type for touchscreen drag events that extends the global [InputEvent] type.
</description>
<methods>
<method name="is_action">
@@ -16942,34 +16965,39 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="0" name="action" type="String">
</argument>
<description>
+ Return if this input event matches a pre-defined action.
</description>
</method>
<method name="is_action_pressed">
<return type="bool">
</return>
- <argument index="0" name="is_action_pressed" type="String">
+ <argument index="0" name="action" type="String">
</argument>
<description>
+ Return whether the given action is being pressed.
</description>
</method>
<method name="is_action_released">
<return type="bool">
</return>
- <argument index="0" name="is_action_released" type="String">
+ <argument index="0" name="action" type="String">
</argument>
<description>
+ Return whether the given action is released (i.e. not pressed).
</description>
</method>
<method name="is_echo">
<return type="bool">
</return>
<description>
+ Return if this input event is an echo event (only for events of type KEY, i.e. always false for this type).
</description>
</method>
<method name="is_pressed">
<return type="bool">
</return>
<description>
+ Return if this input event is pressed.
</description>
</method>
<method name="set_as_action">
@@ -16978,54 +17006,72 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="1" name="pressed" type="bool">
</argument>
<description>
+ Change the input event to an action event of the given name with the pressed status passed as argument.
</description>
</method>
</methods>
<members>
<member name="ID" type="int">
+ Event identifier, positive integer increased at each new event.
</member>
<member name="device" type="int">
+ Device identifier.
</member>
<member name="index" type="int">
+ Touch event index in the case of a multi-touch event.
</member>
<member name="pos" type="Vector2">
+ Position of the touch event.
</member>
<member name="pressed" type="bool">
+ Pressed state of the touch event.
</member>
<member name="type" type="int">
+ Type of event (one of the [InputEvent] constants).
</member>
<member name="x" type="float">
+ X coordinate of the touch event.
</member>
<member name="y" type="float">
+ Y coordinate of the touch event.
</member>
</members>
<constants>
<constant name="NONE" value="0">
+ Empty input event.
</constant>
<constant name="KEY" value="1">
+ Key event.
</constant>
<constant name="MOUSE_MOTION" value="2">
+ Mouse motion event.
</constant>
<constant name="MOUSE_BUTTON" value="3">
+ Mouse button event.
</constant>
<constant name="JOYSTICK_MOTION" value="4">
+ Joystick motion event.
</constant>
<constant name="JOYSTICK_BUTTON" value="5">
+ Joystick button event.
</constant>
<constant name="SCREEN_TOUCH" value="6">
+ Screen touch event.
</constant>
<constant name="SCREEN_DRAG" value="7">
+ Screen drag event.
</constant>
<constant name="ACTION" value="8">
+ Pre-defined action event (see [InputMap]).
</constant>
</constants>
</class>
<class name="InputMap" inherits="Object" category="Core">
<brief_description>
- Singleton that manages actions.
+ Singleton that manages actions.
</brief_description>
<description>
- Singleton that manages actions. InputMap has a list of the actions used in InputEvent, which can be modified.
+ Singleton that manages actions. InputMap has a list of the actions used in InputEvent, which can be modified.
</description>
<methods>
<method name="action_add_event">
@@ -17034,7 +17080,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="1" name="event" type="InputEvent">
</argument>
<description>
- Add an [InputEvent] to action. This [InputEvent] will trigger the action.
+ Add an [InputEvent] to an action. This [InputEvent] will trigger the action.
</description>
</method>
<method name="action_erase_event">
@@ -17043,7 +17089,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="1" name="event" type="InputEvent">
</argument>
<description>
- Remove an [InputEvent] from an action.
+ Remove an [InputEvent] from an action.
</description>
</method>
<method name="action_has_event">
@@ -17054,21 +17100,21 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="1" name="event" type="InputEvent">
</argument>
<description>
- Whether an action has an [InputEvent] associated with it.
+ Whether an action has an [InputEvent] associated with it.
</description>
</method>
<method name="add_action">
<argument index="0" name="action" type="String">
</argument>
<description>
- Add an action to the [InputMap].
+ Add an (empty) action to the [InputMap]. An [InputEvent] can then be added to this action with [method action_add_event].
</description>
</method>
<method name="erase_action">
<argument index="0" name="action" type="String">
</argument>
<description>
- Remove an action from the [InputMap].
+ Remove an action from the [InputMap].
</description>
</method>
<method name="event_is_action" qualifiers="const">
@@ -17079,6 +17125,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="1" name="action" type="String">
</argument>
<description>
+ Return whether the given event is part of an existing action.
</description>
</method>
<method name="get_action_from_id" qualifiers="const">
@@ -17087,7 +17134,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="0" name="id" type="int">
</argument>
<description>
- Return the action from an id.
+ Return the action corresponding to the identifier.
</description>
</method>
<method name="get_action_id" qualifiers="const">
@@ -17096,7 +17143,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="0" name="action" type="String">
</argument>
<description>
- Return the id of an action.
+ Return the identifier of the given action.
</description>
</method>
<method name="get_action_list">
@@ -17105,14 +17152,14 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="0" name="action" type="String">
</argument>
<description>
- Return an [Array] of [InputEvent]s associated with an action.
+ Return an array of InputEvents associated with a given action.
</description>
</method>
<method name="get_actions">
<return type="Array">
</return>
<description>
- Return an [Array] of all actions in the [InputMap].
+ Return an array of all actions in the [InputMap].
</description>
</method>
<method name="has_action" qualifiers="const">
@@ -17121,12 +17168,12 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="0" name="action" type="String">
</argument>
<description>
- Whether this InputMap has an action with name "action".
+ Whether this InputMap has a registered action with the given name.
</description>
</method>
<method name="load_from_globals">
<description>
- Clears the [InputMap] and loads it from [Globals].
+ Clear the [InputMap] and load it anew from [Globals].
</description>
</method>
</methods>
@@ -17157,10 +17204,10 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
</class>
<class name="IntArray" category="Built-In Types">
<brief_description>
- Integer Array.
+ Integer Array.
</brief_description>
<description>
- Integer Array. Array of integers. Can only contain integers. Optimized for memory usage, can't fragment the memory.
+ Integer Array. Array of integers. Can only contain integers. Optimized for memory usage, can't fragment the memory.
</description>
<methods>
<method name="IntArray">
@@ -17169,21 +17216,21 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="0" name="from" type="Array">
</argument>
<description>
- Create from a generic array.
+ Create from a generic array.
</description>
</method>
<method name="append">
<argument index="0" name="integer" type="int">
</argument>
<description>
- Append an element at the end of the array (alias of [method push_back]).
+ Append an element at the end of the array (alias of [method push_back]).
</description>
</method>
<method name="append_array">
<argument index="0" name="array" type="IntArray">
</argument>
<description>
- Append an [IntArray] at the end of this array.
+ Append an [IntArray] at the end of this array.
</description>
</method>
<method name="insert">
@@ -17194,33 +17241,33 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="1" name="integer" type="int">
</argument>
<description>
- Insert a new int at a given position in the array. The position must be valid, or at the end of the array (pos==size()).
+ Insert a new int at a given position in the array. The position must be valid, or at the end of the array (pos==size()).
</description>
</method>
<method name="invert">
<description>
- Reverse the order of the elements in the array (so first element will now be the last).
+ Reverse the order of the elements in the array (so first element will now be the last).
</description>
</method>
<method name="push_back">
<argument index="0" name="integer" type="int">
</argument>
<description>
- Append a value to the array.
+ Append a value to the array.
</description>
</method>
<method name="remove">
<argument index="0" name="idx" type="int">
</argument>
<description>
- Remove an element from the array by index.
+ Remove an element from the array by index.
</description>
</method>
<method name="resize">
<argument index="0" name="idx" type="int">
</argument>
<description>
- Set the size of the [IntArray]. If larger than the current size it will reserve some space beforehand, and if it is smaller it will cut off the array.
+ Set the size of the [IntArray]. If larger than the current size it will reserve some space beforehand, and if it is smaller it will cut off the array.
</description>
</method>
<method name="set">
@@ -17229,14 +17276,14 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="1" name="integer" type="int">
</argument>
<description>
- Change the int at the given index.
+ Change the int at the given index.
</description>
</method>
<method name="size">
<return type="int">
</return>
<description>
- Return the array size.
+ Return the array size.
</description>
</method>
</methods>
@@ -17511,7 +17558,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<return type="IntArray">
</return>
<description>
- Returns a list of selected indexes.
+ Returns a list of selected indexes.
</description>
</method>
<method name="is_item_disabled" qualifiers="const">
@@ -17818,10 +17865,10 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
</class>
<class name="Joint2D" inherits="Node2D" category="Core">
<brief_description>
- Base node for all joint constraints in 2D physics.
+ Base node for all joint constraints in 2D physics.
</brief_description>
<description>
- Base node for all joint constraints in 2D physics. Joints take 2 bodies and apply a custom constraint.
+ Base node for all joint constraints in 2D physics. Joints take 2 bodies and apply a custom constraint.
</description>
<methods>
<method name="get_bias" qualifiers="const">
@@ -17840,14 +17887,14 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<return type="NodePath">
</return>
<description>
- Return the path to the A node for the joint.
+ Return the path to the A node for the joint.
</description>
</method>
<method name="get_node_b" qualifiers="const">
<return type="NodePath">
</return>
<description>
- Return the path to the B node for the joint.
+ Return the path to the B node for the joint.
</description>
</method>
<method name="set_bias">
@@ -17866,14 +17913,14 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="0" name="node" type="NodePath">
</argument>
<description>
- Set the path to the A node for the joint. Must be of type [PhysicsBody2D].
+ Set the path to the A node for the joint. Must be of type [PhysicsBody2D].
</description>
</method>
<method name="set_node_b">
<argument index="0" name="node" type="NodePath">
</argument>
<description>
- Set the path to the B node for the joint. Must be of type [PhysicsBody2D].
+ Set the path to the B node for the joint. Must be of type [PhysicsBody2D].
</description>
</method>
</methods>
@@ -17882,40 +17929,40 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
</class>
<class name="KinematicBody" inherits="PhysicsBody" category="Core">
<brief_description>
- Kinematic body 3D node.
+ Kinematic body 3D node.
</brief_description>
<description>
- Kinematic bodies are special types of bodies that are meant to be user-controlled. They are not affected by physics at all (to other types of bodies, such a character or a rigid body, these are the same as a static body). They have however, two main uses:
- Simulated Motion: When these bodies are moved manually, either from code or from an AnimationPlayer (with process mode set to fixed), the physics will automatically compute an estimate of their linear and angular velocity. This makes them very useful for moving platforms or other AnimationPlayer-controlled objects (like a door, a bridge that opens, etc).
- Kinematic Characters: KinematicBody also has an api for moving objects (the [method move] method) while performing collision tests. This makes them really useful to implement characters that collide against a world, but that don't require advanced physics.
+ Kinematic bodies are special types of bodies that are meant to be user-controlled. They are not affected by physics at all (to other types of bodies, such a character or a rigid body, these are the same as a static body). They have however, two main uses:
+ Simulated Motion: When these bodies are moved manually, either from code or from an AnimationPlayer (with process mode set to fixed), the physics will automatically compute an estimate of their linear and angular velocity. This makes them very useful for moving platforms or other AnimationPlayer-controlled objects (like a door, a bridge that opens, etc).
+ Kinematic Characters: KinematicBody also has an api for moving objects (the [method move] method) while performing collision tests. This makes them really useful to implement characters that collide against a world, but that don't require advanced physics.
</description>
<methods>
<method name="can_collide_with_character_bodies" qualifiers="const">
<return type="bool">
</return>
<description>
- Return if this body can collide with character bodies.
+ Return if this body can collide with character bodies.
</description>
</method>
<method name="can_collide_with_kinematic_bodies" qualifiers="const">
<return type="bool">
</return>
<description>
- Return if this body can collide with kinematic bodies.
+ Return if this body can collide with kinematic bodies.
</description>
</method>
<method name="can_collide_with_rigid_bodies" qualifiers="const">
<return type="bool">
</return>
<description>
- Return if this body can collide with rigid bodies.
+ Return if this body can collide with rigid bodies.
</description>
</method>
<method name="can_collide_with_static_bodies" qualifiers="const">
<return type="bool">
</return>
<description>
- Return if this body can collide with static bodies.
+ Return if this body can collide with static bodies.
</description>
</method>
<method name="can_teleport_to">
@@ -17924,56 +17971,56 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="0" name="position" type="Vector3">
</argument>
<description>
- Returns whether the KinematicBody can be teleported to the destination given as an argument, checking all collision shapes of the body against potential colliders at the destination.
+ Returns whether the KinematicBody can be teleported to the destination given as an argument, checking all collision shapes of the body against potential colliders at the destination.
</description>
</method>
<method name="get_collider" qualifiers="const">
<return type="Object">
</return>
<description>
- Return the body that collided with this one.
+ Return the body that collided with this one.
</description>
</method>
<method name="get_collider_shape" qualifiers="const">
<return type="int">
</return>
<description>
- Return the shape index from the body that collided with this one. If there is no collision, this method will return 0, so collisions must be checked first with [method is_colliding].
+ Return the shape index from the body that collided with this one. If there is no collision, this method will return 0, so collisions must be checked first with [method is_colliding].
</description>
</method>
<method name="get_collider_velocity" qualifiers="const">
<return type="Vector3">
</return>
<description>
- Return the velocity of the body that collided with this one.
+ Return the velocity of the body that collided with this one.
</description>
</method>
<method name="get_collision_margin" qualifiers="const">
<return type="float">
</return>
<description>
- Return the collision margin for this object.
+ Return the collision margin for this object.
</description>
</method>
<method name="get_collision_normal" qualifiers="const">
<return type="Vector3">
</return>
<description>
- Return the normal of the surface the body collided with. This is useful to implement sliding along a surface.
+ Return the normal of the surface the body collided with. This is useful to implement sliding along a surface.
</description>
</method>
<method name="get_collision_pos" qualifiers="const">
<return type="Vector3">
</return>
<description>
- Return the point in space where the body is touching another. If there is no collision, this method will return (0,0,0), so collisions must be checked first with [method is_colliding].
+ Return the point in space where the body is touching another. If there is no collision, this method will return (0,0,0), so collisions must be checked first with [method is_colliding].
</description>
</method>
<method name="is_colliding" qualifiers="const">
<return type="bool">
</return>
<description>
- Return whether the body is colliding with another.
+ Return whether the body is colliding with another.
</description>
</method>
<method name="move">
@@ -17982,7 +18029,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="0" name="rel_vec" type="Vector3">
</argument>
<description>
- Move the body in the given direction, stopping if there is an obstacle. The returned vector is how much movement was remaining before being stopped.
+ Move the body in the given direction, stopping if there is an obstacle. The returned vector is how much movement was remaining before being stopped.
</description>
</method>
<method name="move_to">
@@ -17991,42 +18038,42 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="0" name="position" type="Vector3">
</argument>
<description>
- Move the body to the given position. This is not a teleport, and the body will stop if there is an obstacle. The returned vector is how much movement was remaining before being stopped.
+ Move the body to the given position. This is not a teleport, and the body will stop if there is an obstacle. The returned vector is how much movement was remaining before being stopped.
</description>
</method>
<method name="set_collide_with_character_bodies">
<argument index="0" name="enable" type="bool">
</argument>
<description>
- Set if this body should collide with character bodies.
+ Set if this body should collide with character bodies.
</description>
</method>
<method name="set_collide_with_kinematic_bodies">
<argument index="0" name="enable" type="bool">
</argument>
<description>
- Set if this body should collide with kinematic bodies.
+ Set if this body should collide with kinematic bodies.
</description>
</method>
<method name="set_collide_with_rigid_bodies">
<argument index="0" name="enable" type="bool">
</argument>
<description>
- Set if this body should collide with rigid bodies.
+ Set if this body should collide with rigid bodies.
</description>
</method>
<method name="set_collide_with_static_bodies">
<argument index="0" name="enable" type="bool">
</argument>
<description>
- Set if this body should collide with static bodies.
+ Set if this body should collide with static bodies.
</description>
</method>
<method name="set_collision_margin">
<argument index="0" name="pixels" type="float">
</argument>
<description>
- Set the collision margin for this object. A collision margin is an amount that all shapes will grow when computing collisions, to account for numerical imprecision.
+ Set the collision margin for this object. A collision margin is an amount that all shapes will grow when computing collisions, to account for numerical imprecision.
</description>
</method>
</methods>
@@ -18035,75 +18082,75 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
</class>
<class name="KinematicBody2D" inherits="PhysicsBody2D" category="Core">
<brief_description>
- Kinematic body 2D node.
+ Kinematic body 2D node.
</brief_description>
<description>
- Kinematic bodies are special types of bodies that are meant to be user-controlled. They are not affected by physics at all (to other types of bodies, such a character or a rigid body, these are the same as a static body). They have however, two main uses:
- Simulated Motion: When these bodies are moved manually, either from code or from an AnimationPlayer (with process mode set to fixed), the physics will automatically compute an estimate of their linear and angular velocity. This makes them very useful for moving platforms or other AnimationPlayer-controlled objects (like a door, a bridge that opens, etc).
- Kinematic Characters: KinematicBody2D also has an api for moving objects (the [method move] method) while performing collision tests. This makes them really useful to implement characters that collide against a world, but that don't require advanced physics.
+ Kinematic bodies are special types of bodies that are meant to be user-controlled. They are not affected by physics at all (to other types of bodies, such a character or a rigid body, these are the same as a static body). They have however, two main uses:
+ Simulated Motion: When these bodies are moved manually, either from code or from an AnimationPlayer (with process mode set to fixed), the physics will automatically compute an estimate of their linear and angular velocity. This makes them very useful for moving platforms or other AnimationPlayer-controlled objects (like a door, a bridge that opens, etc).
+ Kinematic Characters: KinematicBody2D also has an api for moving objects (the [method move] method) while performing collision tests. This makes them really useful to implement characters that collide against a world, but that don't require advanced physics.
</description>
<methods>
<method name="get_collider" qualifiers="const">
<return type="Object">
</return>
<description>
- Return the body that collided with this one.
+ Return the body that collided with this one.
</description>
</method>
<method name="get_collider_metadata" qualifiers="const">
<return type="Variant">
</return>
<description>
- Return the metadata of the shape that collided with this body. If there is no collision, it will return 0, so collisions must be checked first with [method is_colliding]. Additionally, this metadata can not be set with [method Object.set_meta], it must be set with [method Physics2DServer.body_set_shape_metadata].
+ Return the metadata of the shape that collided with this body. If there is no collision, it will return 0, so collisions must be checked first with [method is_colliding]. Additionally, this metadata can not be set with [method Object.set_meta], it must be set with [method Physics2DServer.body_set_shape_metadata].
</description>
</method>
<method name="get_collider_shape" qualifiers="const">
<return type="int">
</return>
<description>
- Return the shape index from the body that collided with this one. If there is no collision, this method will return 0, so collisions must be checked first with [method is_colliding].
+ Return the shape index from the body that collided with this one. If there is no collision, this method will return 0, so collisions must be checked first with [method is_colliding].
</description>
</method>
<method name="get_collider_velocity" qualifiers="const">
<return type="Vector2">
</return>
<description>
- Return the velocity of the body that collided with this one.
+ Return the velocity of the body that collided with this one.
</description>
</method>
<method name="get_collision_margin" qualifiers="const">
<return type="float">
</return>
<description>
- Return the collision margin for this object.
+ Return the collision margin for this object.
</description>
</method>
<method name="get_collision_normal" qualifiers="const">
<return type="Vector2">
</return>
<description>
- Return the normal of the surface the body collided with. This is useful to implement sliding along a surface.
+ Return the normal of the surface the body collided with. This is useful to implement sliding along a surface.
</description>
</method>
<method name="get_collision_pos" qualifiers="const">
<return type="Vector2">
</return>
<description>
- Return the point in space where the body is touching another. If there is no collision, this method will return (0,0), so collisions must be checked first with [method is_colliding].
+ Return the point in space where the body is touching another. If there is no collision, this method will return (0,0), so collisions must be checked first with [method is_colliding].
</description>
</method>
<method name="get_travel" qualifiers="const">
<return type="Vector2">
</return>
<description>
- Return the last movement done by the body.
+ Return the last movement done by the body.
</description>
</method>
<method name="is_colliding" qualifiers="const">
<return type="bool">
</return>
<description>
- Return whether the body is colliding with another.
+ Return whether the body is colliding with another.
</description>
</method>
<method name="move">
@@ -18112,7 +18159,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="0" name="rel_vec" type="Vector2">
</argument>
<description>
- Move the body in the given direction, stopping if there is an obstacle. The returned vector is how much movement was remaining before being stopped.
+ Move the body in the given direction, stopping if there is an obstacle. The returned vector is how much movement was remaining before being stopped.
</description>
</method>
<method name="move_to">
@@ -18121,19 +18168,19 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="0" name="position" type="Vector2">
</argument>
<description>
- Move the body to the given position. This is not a teleport, and the body will stop if there is an obstacle. The returned vector is how much movement was remaining before being stopped.
+ Move the body to the given position. This is not a teleport, and the body will stop if there is an obstacle. The returned vector is how much movement was remaining before being stopped.
</description>
</method>
<method name="revert_motion">
<description>
- Undo the last movement done by the body.
+ Undo the last movement done by the body.
</description>
</method>
<method name="set_collision_margin">
<argument index="0" name="pixels" type="float">
</argument>
<description>
- Set the collision margin for this object. A collision margin is an amount (in pixels) that all shapes will grow when computing collisions, to account for numerical imprecision.
+ Set the collision margin for this object. A collision margin is an amount (in pixels) that all shapes will grow when computing collisions, to account for numerical imprecision.
</description>
</method>
<method name="test_move">
@@ -18142,7 +18189,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="0" name="rel_vec" type="Vector2">
</argument>
<description>
- Return true if there would be a collision if the body moved in the given direction.
+ Return true if there would be a collision if the body moved in the given direction.
</description>
</method>
</methods>
@@ -18151,171 +18198,171 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
</class>
<class name="Label" inherits="Control" category="Core">
<brief_description>
- Control that displays formatted text.
+ Control that displays formatted text.
</brief_description>
<description>
- Label is a control that displays formatted text, optionally autowrapping it to the [Control] area. It inherits from range to be able to scroll wrapped text vertically.
+ Label is a control that displays formatted text, optionally autowrapping it to the [Control] area. It inherits from range to be able to scroll wrapped text vertically.
</description>
<methods>
<method name="get_align" qualifiers="const">
<return type="int">
</return>
<description>
- Return the alignment mode (any of the ALIGN_* enumeration values).
+ Return the alignment mode (any of the ALIGN_* enumeration values).
</description>
</method>
<method name="get_line_count" qualifiers="const">
<return type="int">
</return>
<description>
- Return the amount of lines.
+ Return the amount of lines.
</description>
</method>
<method name="get_line_height" qualifiers="const">
<return type="int">
</return>
<description>
- Return the height of a line.
+ Return the height of a line.
</description>
</method>
<method name="get_lines_skipped" qualifiers="const">
<return type="int">
</return>
<description>
- Return the the number of lines to skipped before displaying.
+ Return the the number of lines to skipped before displaying.
</description>
</method>
<method name="get_max_lines_visible" qualifiers="const">
<return type="int">
</return>
<description>
- Return the restricted number of lines to display. Returns -1 if unrestricted.
+ Return the restricted number of lines to display. Returns -1 if unrestricted.
</description>
</method>
<method name="get_percent_visible" qualifiers="const">
<return type="float">
</return>
<description>
- Return the restricted number of characters to display (as a percentage of the total text).
+ Return the restricted number of characters to display (as a percentage of the total text).
</description>
</method>
<method name="get_text" qualifiers="const">
<return type="String">
</return>
<description>
- Return the label text. Text can contain newlines.
+ Return the label text. Text can contain newlines.
</description>
</method>
<method name="get_total_character_count" qualifiers="const">
<return type="int">
</return>
<description>
- Return the total length of the text.
+ Return the total length of the text.
</description>
</method>
<method name="get_valign" qualifiers="const">
<return type="int">
</return>
<description>
- Return the vertical alignment mode (any of the VALIGN_* enumeration values).
+ Return the vertical alignment mode (any of the VALIGN_* enumeration values).
</description>
</method>
<method name="get_visible_characters" qualifiers="const">
<return type="int">
</return>
<description>
- Return the restricted number of characters to display. Returns -1 if unrestricted.
+ Return the restricted number of characters to display. Returns -1 if unrestricted.
</description>
</method>
<method name="has_autowrap" qualifiers="const">
<return type="bool">
</return>
<description>
- Return the state of the [i]autowrap[/i] mode (see [method set_autowrap]).
+ Return the state of the [i]autowrap[/i] mode (see [method set_autowrap]).
</description>
</method>
<method name="is_clipping_text" qualifiers="const">
<return type="bool">
</return>
<description>
- Return true if text would be cut off if it is too wide.
+ Return true if text would be cut off if it is too wide.
</description>
</method>
<method name="is_uppercase" qualifiers="const">
<return type="bool">
</return>
<description>
- Return true if text is displayed in all capitals.
+ Return true if text is displayed in all capitals.
</description>
</method>
<method name="set_align">
<argument index="0" name="align" type="int">
</argument>
<description>
- Sets the alignment mode to any of the ALIGN_* enumeration values.
+ Sets the alignment mode to any of the ALIGN_* enumeration values.
</description>
</method>
<method name="set_autowrap">
<argument index="0" name="enable" type="bool">
</argument>
<description>
- Set [i]autowrap[/i] mode. When enabled, autowrap will fit text to the control width, breaking sentences when they exceed the available horizontal space. When disabled, the label minimum width becomes the width of the longest row, and the minimum height large enough to fit all rows.
+ Set [i]autowrap[/i] mode. When enabled, autowrap will fit text to the control width, breaking sentences when they exceed the available horizontal space. When disabled, the label minimum width becomes the width of the longest row, and the minimum height large enough to fit all rows.
</description>
</method>
<method name="set_clip_text">
<argument index="0" name="enable" type="bool">
</argument>
<description>
- Cuts off the rest of the text if it is too wide.
+ Cuts off the rest of the text if it is too wide.
</description>
</method>
<method name="set_lines_skipped">
<argument index="0" name="lines_skipped" type="int">
</argument>
<description>
- Sets the number of lines to skip before displaying. Useful for scrolling text.
+ Sets the number of lines to skip before displaying. Useful for scrolling text.
</description>
</method>
<method name="set_max_lines_visible">
<argument index="0" name="lines_visible" type="int">
</argument>
<description>
- Restricts the number of lines to display. Set to -1 to disable.
+ Restricts the number of lines to display. Set to -1 to disable.
</description>
</method>
<method name="set_percent_visible">
<argument index="0" name="percent_visible" type="float">
</argument>
<description>
- Restricts the number of characters to display (as a percentage of the total text).
+ Restricts the number of characters to display (as a percentage of the total text).
</description>
</method>
<method name="set_text">
<argument index="0" name="text" type="String">
</argument>
<description>
- Set the label text. Text can contain newlines.
+ Set the label text. Text can contain newlines.
</description>
</method>
<method name="set_uppercase">
<argument index="0" name="enable" type="bool">
</argument>
<description>
- Display text in all capitals.
+ Display text in all capitals.
</description>
</method>
<method name="set_valign">
<argument index="0" name="valign" type="int">
</argument>
<description>
- Sets the vertical alignment mode to any of the VALIGN_* enumeration values.
+ Sets the vertical alignment mode to any of the VALIGN_* enumeration values.
</description>
</method>
<method name="set_visible_characters">
<argument index="0" name="amount" type="int">
</argument>
<description>
- Restricts the number of characters to display. Set to -1 to disable.
+ Restricts the number of characters to display. Set to -1 to disable.
</description>
</method>
</methods>
@@ -18364,11 +18411,11 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
</class>
<class name="LargeTexture" inherits="Texture" category="Core">
<brief_description>
- A Texture capable of storing many smaller Textures with offsets.
+ A Texture capable of storing many smaller Textures with offsets.
</brief_description>
<description>
- A Texture capable of storing many smaller Textures with offsets.
- You can dynamically add pieces(Textures) to this fLargeTexture] using different offsets.
+ A Texture capable of storing many smaller Textures with offsets.
+ You can dynamically add pieces(Textures) to this fLargeTexture] using different offsets.
</description>
<methods>
<method name="add_piece">
@@ -18379,19 +18426,19 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="1" name="texture" type="Texture">
</argument>
<description>
- Add another [Texture] to this [LargeTexture], starting on offset "ofs".
+ Add another [Texture] to this [LargeTexture], starting on offset "ofs".
</description>
</method>
<method name="clear">
<description>
- Clear the [LargeTexture].
+ Clear the [LargeTexture].
</description>
</method>
<method name="get_piece_count" qualifiers="const">
<return type="int">
</return>
<description>
- Return the number of pieces currently in this [LargeTexture].
+ Return the number of pieces currently in this [LargeTexture].
</description>
</method>
<method name="get_piece_offset" qualifiers="const">
@@ -18400,7 +18447,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="0" name="idx" type="int">
</argument>
<description>
- Return the offset of the piece with index "idx".
+ Return the offset of the piece with index "idx".
</description>
</method>
<method name="get_piece_texture" qualifiers="const">
@@ -18409,7 +18456,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="0" name="idx" type="int">
</argument>
<description>
- Return the [Texture] of the piece with index "idx".
+ Return the [Texture] of the piece with index "idx".
</description>
</method>
<method name="set_piece_offset">
@@ -18418,7 +18465,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="1" name="ofs" type="Vector2">
</argument>
<description>
- Set the offset of the piece with index "idx" to "ofs".
+ Set the offset of the piece with index "idx" to "ofs".
</description>
</method>
<method name="set_piece_texture">
@@ -18427,14 +18474,14 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="1" name="texture" type="Texture">
</argument>
<description>
- Set the [Texture] of the piece with index "idx" to "ofs".
+ Set the [Texture] of the piece with index "idx" to "ofs".
</description>
</method>
<method name="set_size">
<argument index="0" name="size" type="Vector2">
</argument>
<description>
- Set the size of this [LargeTexture].
+ Set the size of this [LargeTexture].
</description>
</method>
</methods>
@@ -18443,10 +18490,10 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
</class>
<class name="Light" inherits="VisualInstance" category="Core">
<brief_description>
- Provides a base class for different kinds of light nodes.
+ Provides a base class for different kinds of light nodes.
</brief_description>
<description>
- Light is the abstract base class for light nodes, so it shouldn't be used directly (It can't be instanced). Other types of light nodes inherit from it. Light contains the common variables and parameters used for lighting.
+ Light is the abstract base class for light nodes, so it shouldn't be used directly (It can't be instanced). Other types of light nodes inherit from it. Light contains the common variables and parameters used for lighting.
</description>
<methods>
<method name="get_bake_mode" qualifiers="const">
@@ -18585,262 +18632,262 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
</class>
<class name="Light2D" inherits="Node2D" category="Core">
<brief_description>
- Node that casts light in a 2D environment.
+ Node that casts light in a 2D environment.
</brief_description>
<description>
- Node that casts light in a 2D environment. Light is defined by a (usually grayscale) texture, a color, an energy value, a mode (see constants), and various other parameters (range and shadows-related). Note that Light2D can be used as a mask.
+ Node that casts light in a 2D environment. Light is defined by a (usually grayscale) texture, a color, an energy value, a mode (see constants), and various other parameters (range and shadows-related). Note that Light2D can be used as a mask.
</description>
<methods>
<method name="get_color" qualifiers="const">
<return type="Color">
</return>
<description>
- Return the color of the Light2D.
+ Return the color of the Light2D.
</description>
</method>
<method name="get_energy" qualifiers="const">
<return type="float">
</return>
<description>
- Return the energy value of the Light2D.
+ Return the energy value of the Light2D.
</description>
</method>
<method name="get_height" qualifiers="const">
<return type="float">
</return>
<description>
- Return the height of the Light2D. Used with 2D normalmapping.
+ Return the height of the Light2D. Used with 2D normalmapping.
</description>
</method>
<method name="get_item_mask" qualifiers="const">
<return type="int">
</return>
<description>
- Return the item mask of the Light2D.
+ Return the item mask of the Light2D.
</description>
</method>
<method name="get_item_shadow_mask" qualifiers="const">
<return type="int">
</return>
<description>
- Return the item shadow mask of the Light2D.
+ Return the item shadow mask of the Light2D.
</description>
</method>
<method name="get_layer_range_max" qualifiers="const">
<return type="int">
</return>
<description>
- Set the maximum layer value of objects of the scene that are affected by the Light2D.
+ Set the maximum layer value of objects of the scene that are affected by the Light2D.
</description>
</method>
<method name="get_layer_range_min" qualifiers="const">
<return type="int">
</return>
<description>
- Get the minimum layer value of objects of the scene that are affected by the Light2D.
+ Get the minimum layer value of objects of the scene that are affected by the Light2D.
</description>
</method>
<method name="get_mode" qualifiers="const">
<return type="int">
</return>
<description>
- Return the current mode set to the Light2D.
+ Return the current mode set to the Light2D.
</description>
</method>
<method name="get_shadow_buffer_size" qualifiers="const">
<return type="int">
</return>
<description>
- Return the shadow buffer size.
+ Return the shadow buffer size.
</description>
</method>
<method name="get_shadow_color" qualifiers="const">
<return type="Color">
</return>
<description>
- Return the color of casted shadows for this Light2D.
+ Return the color of casted shadows for this Light2D.
</description>
</method>
<method name="get_shadow_esm_multiplier" qualifiers="const">
<return type="float">
</return>
<description>
- Return the Exponential Shadow Multiplier (ESM) value of the Light2D.
+ Return the Exponential Shadow Multiplier (ESM) value of the Light2D.
</description>
</method>
<method name="get_texture" qualifiers="const">
<return type="Object">
</return>
<description>
- Return the texture of the Light2D.
+ Return the texture of the Light2D.
</description>
</method>
<method name="get_texture_offset" qualifiers="const">
<return type="Vector2">
</return>
<description>
- Return the offset of the light texture.
+ Return the offset of the light texture.
</description>
</method>
<method name="get_texture_scale" qualifiers="const">
<return type="float">
</return>
<description>
- Return the scale value of the light texture.
+ Return the scale value of the light texture.
</description>
</method>
<method name="get_z_range_max" qualifiers="const">
<return type="int">
</return>
<description>
- Get the maximum Z value that objects of the scene can be in order to be affected by the Light2D.
+ Get the maximum Z value that objects of the scene can be in order to be affected by the Light2D.
</description>
</method>
<method name="get_z_range_min" qualifiers="const">
<return type="int">
</return>
<description>
- Get the minimum Z value that objects of the scene have to be in order to be affected by the Light2D.
+ Get the minimum Z value that objects of the scene have to be in order to be affected by the Light2D.
</description>
</method>
<method name="is_enabled" qualifiers="const">
<return type="bool">
</return>
<description>
- Return true if the Light2D is enabled, false if it is not.
+ Return true if the Light2D is enabled, false if it is not.
</description>
</method>
<method name="is_shadow_enabled" qualifiers="const">
<return type="bool">
</return>
<description>
- Return true if shadow casting is enabled for this Light2D, else return false.
+ Return true if shadow casting is enabled for this Light2D, else return false.
</description>
</method>
<method name="set_color">
<argument index="0" name="color" type="Color">
</argument>
<description>
- Set the color of the Light2D.
+ Set the color of the Light2D.
</description>
</method>
<method name="set_enabled">
<argument index="0" name="enabled" type="bool">
</argument>
<description>
- Switches the Light2D on or off, depending on the 'enabled' parameter.
+ Switches the Light2D on or off, depending on the 'enabled' parameter.
</description>
</method>
<method name="set_energy">
<argument index="0" name="energy" type="float">
</argument>
<description>
- Set the energy value of the Light2D. The bigger the value, the stronger the light.
+ Set the energy value of the Light2D. The bigger the value, the stronger the light.
</description>
</method>
<method name="set_height">
<argument index="0" name="height" type="float">
</argument>
<description>
- Set the height of the Light2D. Used with 2D normalmapping.
+ Set the height of the Light2D. Used with 2D normalmapping.
</description>
</method>
<method name="set_item_mask">
<argument index="0" name="item_mask" type="int">
</argument>
<description>
- Set the item mask of the Light2D to 'item_mask' value.
+ Set the item mask of the Light2D to 'item_mask' value.
</description>
</method>
<method name="set_item_shadow_mask">
<argument index="0" name="item_shadow_mask" type="int">
</argument>
<description>
- Set the item shadow mask to 'item_shadow_mask' value.
+ Set the item shadow mask to 'item_shadow_mask' value.
</description>
</method>
<method name="set_layer_range_max">
<argument index="0" name="layer" type="int">
</argument>
<description>
- Set the maximum layer value of objects of the scene that are affected by the Light2D.
+ Set the maximum layer value of objects of the scene that are affected by the Light2D.
</description>
</method>
<method name="set_layer_range_min">
<argument index="0" name="layer" type="int">
</argument>
<description>
- Set the minimum layer value of objects of the scene that are affected by the Light2D.
+ Set the minimum layer value of objects of the scene that are affected by the Light2D.
</description>
</method>
<method name="set_mode">
<argument index="0" name="mode" type="int">
</argument>
<description>
- Set the behaviour mode of the Light2D. Use constants defined in the constants section.
+ Set the behaviour mode of the Light2D. Use constants defined in the constants section.
</description>
</method>
<method name="set_shadow_buffer_size">
<argument index="0" name="size" type="int">
</argument>
<description>
- Set the shadow buffer size.
+ Set the shadow buffer size.
</description>
</method>
<method name="set_shadow_color">
<argument index="0" name="shadow_color" type="Color">
</argument>
<description>
- Set the color of casted shadows for this Light2D.
+ Set the color of casted shadows for this Light2D.
</description>
</method>
<method name="set_shadow_enabled">
<argument index="0" name="enabled" type="bool">
</argument>
<description>
- Enable or disable shadows casting from this Light2D according to the 'enabled' parameter.
+ Enable or disable shadows casting from this Light2D according to the 'enabled' parameter.
</description>
</method>
<method name="set_shadow_esm_multiplier">
<argument index="0" name="multiplier" type="float">
</argument>
<description>
- Set the Exponential Shadow Multiplier (ESM) value of the Light2D.
+ Set the Exponential Shadow Multiplier (ESM) value of the Light2D.
</description>
</method>
<method name="set_texture">
<argument index="0" name="texture" type="Object">
</argument>
<description>
- Set the texture of the Light2D.
+ Set the texture of the Light2D.
</description>
</method>
<method name="set_texture_offset">
<argument index="0" name="texture_offset" type="Vector2">
</argument>
<description>
- Set the offset of the light texture.
+ Set the offset of the light texture.
</description>
</method>
<method name="set_texture_scale">
<argument index="0" name="texture_scale" type="float">
</argument>
<description>
- Set the scale value of the light texture.
+ Set the scale value of the light texture.
</description>
</method>
<method name="set_z_range_max">
<argument index="0" name="z" type="int">
</argument>
<description>
- Set the maximum Z value that objects of the scene can be in order to be affected by the Light2D.
+ Set the maximum Z value that objects of the scene can be in order to be affected by the Light2D.
</description>
</method>
<method name="set_z_range_min">
<argument index="0" name="z" type="int">
</argument>
<description>
- Set the minimum Z value that objects of the scene have to be in order to be affected by the Light2D.
+ Set the minimum Z value that objects of the scene have to be in order to be affected by the Light2D.
</description>
</method>
</methods>
@@ -18861,38 +18908,38 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
</class>
<class name="LightOccluder2D" inherits="Node2D" category="Core">
<brief_description>
- Occludes light cast by a Light2D, thus casting shadows.
+ Occludes light cast by a Light2D, thus casting shadows.
</brief_description>
<description>
- Occludes light cast by a Light2D, thus casting shadows. The LightOccluder2D must be provided with a shape (see OccluderPolygon2D) that allows the shadow to be computed. This shape affects the resulting shadow, while the shape of the representating asset shadowed does not actually affect shadows.
+ Occludes light cast by a Light2D, thus casting shadows. The LightOccluder2D must be provided with a shape (see OccluderPolygon2D) that allows the shadow to be computed. This shape affects the resulting shadow, while the shape of the representating asset shadowed does not actually affect shadows.
</description>
<methods>
<method name="get_occluder_light_mask" qualifiers="const">
<return type="int">
</return>
<description>
- Return the light mask of the LightOccluder2D.
+ Return the light mask of the LightOccluder2D.
</description>
</method>
<method name="get_occluder_polygon" qualifiers="const">
<return type="OccluderPolygon2D">
</return>
<description>
- Return the OccluderPolygon2D that defines the LightOccluder2D.
+ Return the OccluderPolygon2D that defines the LightOccluder2D.
</description>
</method>
<method name="set_occluder_light_mask">
<argument index="0" name="mask" type="int">
</argument>
<description>
- Set the LightOccluder2D light mask. The LightOccluder2D will cast shadows only from Light2Ds that belong to the same light mask(s).
+ Set the LightOccluder2D light mask. The LightOccluder2D will cast shadows only from Light2Ds that belong to the same light mask(s).
</description>
</method>
<method name="set_occluder_polygon">
<argument index="0" name="polygon" type="OccluderPolygon2D">
</argument>
<description>
- Set the OccluderPolygon2D that defines the LightOccluder2D.
+ Set the OccluderPolygon2D that defines the LightOccluder2D.
</description>
</method>
</methods>
@@ -18901,50 +18948,50 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
</class>
<class name="LineEdit" inherits="Control" category="Core">
<brief_description>
- Control that provides single line string editing.
+ Control that provides single line string editing.
</brief_description>
<description>
- LineEdit provides a single line string editor, used for text fields.
+ LineEdit provides a single line string editor, used for text fields.
</description>
<methods>
<method name="append_at_cursor">
<argument index="0" name="text" type="String">
</argument>
<description>
- Append text at cursor, scrolling the [LineEdit] when needed.
+ Append text at cursor, scrolling the [LineEdit] when needed.
</description>
</method>
<method name="clear">
<description>
- Clear the [LineEdit] text.
+ Clear the [LineEdit] text.
</description>
</method>
<method name="cursor_get_blink_enabled" qualifiers="const">
<return type="bool">
</return>
<description>
- Gets whether the line edit caret is blinking.
+ Gets whether the line edit caret is blinking.
</description>
</method>
<method name="cursor_get_blink_speed" qualifiers="const">
<return type="float">
</return>
<description>
- Gets the line edit caret blink speed.
+ Gets the line edit caret blink speed.
</description>
</method>
<method name="cursor_set_blink_enabled">
<argument index="0" name="enable" type="bool">
</argument>
<description>
- Set the line edit caret to blink.
+ Set the line edit caret to blink.
</description>
</method>
<method name="cursor_set_blink_speed">
<argument index="0" name="blink_speed" type="float">
</argument>
<description>
- Set the line edit caret blink speed. Cannot be less then or equal to 0.
+ Set the line edit caret blink speed. Cannot be less then or equal to 0.
</description>
</method>
<method name="get_align" qualifiers="const">
@@ -18957,14 +19004,14 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<return type="int">
</return>
<description>
- Return the cursor position inside the [LineEdit].
+ Return the cursor position inside the [LineEdit].
</description>
</method>
<method name="get_max_length" qualifiers="const">
<return type="int">
</return>
<description>
- Return the maximum amount of characters the [LineEdit] can edit. If 0 is returned, no limit exists.
+ Return the maximum amount of characters the [LineEdit] can edit. If 0 is returned, no limit exists.
</description>
</method>
<method name="get_menu" qualifiers="const">
@@ -18989,21 +19036,21 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<return type="String">
</return>
<description>
- Return the text in the [LineEdit].
+ Return the text in the [LineEdit].
</description>
</method>
<method name="is_editable" qualifiers="const">
<return type="bool">
</return>
<description>
- Return the [i]editable[/i] status of the [LineEdit] (see [method set_editable]).
+ Return the [i]editable[/i] status of the [LineEdit] (see [method set_editable]).
</description>
</method>
<method name="is_secret" qualifiers="const">
<return type="bool">
</return>
<description>
- Return the [i]secret[/i] status of the [LineEdit] (see [method set_secret]).
+ Return the [i]secret[/i] status of the [LineEdit] (see [method set_secret]).
</description>
</method>
<method name="menu_option">
@@ -19022,7 +19069,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
</method>
<method name="select_all">
<description>
- Select the whole string.
+ Select the whole string.
</description>
</method>
<method name="set_align">
@@ -19035,21 +19082,21 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="0" name="pos" type="int">
</argument>
<description>
- Set the cursor position inside the [LineEdit], causing it to scroll if needed.
+ Set the cursor position inside the [LineEdit], causing it to scroll if needed.
</description>
</method>
<method name="set_editable">
<argument index="0" name="enabled" type="bool">
</argument>
<description>
- Set the [i]editable[/i] status of the [LineEdit]. When disabled, existing text can't be modified and new text can't be added.
+ Set the [i]editable[/i] status of the [LineEdit]. When disabled, existing text can't be modified and new text can't be added.
</description>
</method>
<method name="set_max_length">
<argument index="0" name="chars" type="int">
</argument>
<description>
- Set the maximum amount of characters the [LineEdit] can edit, and cropping existing text in case it exceeds that limit. Setting 0 removes the limit.
+ Set the maximum amount of characters the [LineEdit] can edit, and cropping existing text in case it exceeds that limit. Setting 0 removes the limit.
</description>
</method>
<method name="set_placeholder">
@@ -19068,14 +19115,14 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="0" name="enabled" type="bool">
</argument>
<description>
- Set the [i]secret[/i] status of the [LineEdit]. When enabled, every character is displayed as "*".
+ Set the [i]secret[/i] status of the [LineEdit]. When enabled, every character is displayed as "*".
</description>
</method>
<method name="set_text">
<argument index="0" name="text" type="String">
</argument>
<description>
- Set the text in the [LineEdit], clearing the existing one and the selection.
+ Set the text in the [LineEdit], clearing the existing one and the selection.
</description>
</method>
</methods>
@@ -19084,14 +19131,14 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="0" name="text" type="String">
</argument>
<description>
- When the text changes, this signal is emitted.
+ When the text changes, this signal is emitted.
</description>
</signal>
<signal name="text_entered">
<argument index="0" name="text" type="String">
</argument>
<description>
- This signal is emitted when the user presses KEY_ENTER on the [LineEdit]. This signal is often used as an alternate confirmation mechanism in dialogs.
+ This signal is emitted when the user presses KEY_ENTER on the [LineEdit]. This signal is often used as an alternate confirmation mechanism in dialogs.
</description>
</signal>
</signals>
@@ -19142,38 +19189,38 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
</class>
<class name="LineShape2D" inherits="Shape2D" category="Core">
<brief_description>
- Line shape for 2D collision objects.
+ Line shape for 2D collision objects.
</brief_description>
<description>
- Line shape for 2D collision objects. It works like a 2D plane and will not allow any body to go to the negative side. Not recommended for rigid bodies, and usually not recommended for static bodies either because it forces checks against it on every frame.
+ Line shape for 2D collision objects. It works like a 2D plane and will not allow any body to go to the negative side. Not recommended for rigid bodies, and usually not recommended for static bodies either because it forces checks against it on every frame.
</description>
<methods>
<method name="get_d" qualifiers="const">
<return type="float">
</return>
<description>
- Return the line distance from the origin.
+ Return the line distance from the origin.
</description>
</method>
<method name="get_normal" qualifiers="const">
<return type="Vector2">
</return>
<description>
- Return the line normal.
+ Return the line normal.
</description>
</method>
<method name="set_d">
<argument index="0" name="d" type="float">
</argument>
<description>
- Set the line distance from the origin.
+ Set the line distance from the origin.
</description>
</method>
<method name="set_normal">
<argument index="0" name="normal" type="Vector2">
</argument>
<description>
- Set the line normal.
+ Set the line normal.
</description>
</method>
</methods>
@@ -19182,38 +19229,38 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
</class>
<class name="LinkButton" inherits="BaseButton" category="Core">
<brief_description>
- Simple button used to represent a link to some resource
+ Simple button used to represent a link to some resource
</brief_description>
<description>
- This kind of buttons are primarily used when the interaction with the button causes a context change (like linking to a web page).
+ This kind of buttons are primarily used when the interaction with the button causes a context change (like linking to a web page).
</description>
<methods>
<method name="get_text" qualifiers="const">
<return type="String">
</return>
<description>
- Returns the text of the button.
+ Returns the text of the button.
</description>
</method>
<method name="get_underline_mode" qualifiers="const">
<return type="int">
</return>
<description>
- Returns the underline mode for this button.
+ Returns the underline mode for this button.
</description>
</method>
<method name="set_text">
<argument index="0" name="text" type="String">
</argument>
<description>
- Sets the text of the button.
+ Sets the text of the button.
</description>
</method>
<method name="set_underline_mode">
<argument index="0" name="underline_mode" type="int">
</argument>
<description>
- Sets the underline mode for this button, the argument must be one of the [LinkButton] constants (see constants section).
+ Sets the underline mode for this button, the argument must be one of the [LinkButton] constants (see constants section).
</description>
</method>
</methods>
@@ -19270,10 +19317,10 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
</class>
<class name="MainLoop" inherits="Object" category="Core">
<brief_description>
- Main loop is the abstract main loop base class.
+ Main loop is the abstract main loop base class.
</brief_description>
<description>
- Main loop is the abstract main loop base class. All other main loop classes are derived from it. Upon application start, a [MainLoop] has to be provided to OS, else the application will exit. This happens automatically (and a [SceneTree] is created), unless a main [Script] is supplied, which may or not create and return a [MainLoop].
+ Main loop is the abstract main loop base class. All other main loop classes are derived from it. Upon application start, a [MainLoop] has to be provided to OS, else the application will exit. This happens automatically (and a [SceneTree] is created), unless a main [Script] is supplied, which may or not create and return a [MainLoop].
</description>
<methods>
<method name="_drop_files" qualifiers="virtual">
@@ -19372,10 +19419,10 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
</class>
<class name="MarginContainer" inherits="Container" category="Core">
<brief_description>
- Simple margin container.
+ Simple margin container.
</brief_description>
<description>
- Simple margin container. Adds a left margin to anything contained.
+ Simple margin container. Adds a left margin to anything contained.
</description>
<methods>
</methods>
@@ -19452,17 +19499,17 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
</class>
<class name="Material" inherits="Resource" category="Core">
<brief_description>
- Abstract base [Resource] for coloring and shading geometry.
+ Abstract base [Resource] for coloring and shading geometry.
</brief_description>
<description>
- Material is a base [Resource] used for coloring and shading geometry. All materials inherit from it and almost all [VisualInstance] derived nodes carry a Material. A few flags and parameters are shared between all material types and are configured here.
+ Material is a base [Resource] used for coloring and shading geometry. All materials inherit from it and almost all [VisualInstance] derived nodes carry a Material. A few flags and parameters are shared between all material types and are configured here.
</description>
<methods>
<method name="get_blend_mode" qualifiers="const">
<return type="int">
</return>
<description>
- Return blend mode for the material, which can be one of BLEND_MODE_MIX (default), BLEND_MODE_ADD, BLEND_MODE_SUB. Keep in mind that only BLEND_MODE_MIX ensures that the material [i]may[/i] be opaque, any other blend mode will render with alpha blending enabled in raster-based [VisualServer] implementations.
+ Return blend mode for the material, which can be one of BLEND_MODE_MIX (default), BLEND_MODE_ADD, BLEND_MODE_SUB. Keep in mind that only BLEND_MODE_MIX ensures that the material [i]may[/i] be opaque, any other blend mode will render with alpha blending enabled in raster-based [VisualServer] implementations.
</description>
</method>
<method name="get_depth_draw_mode" qualifiers="const">
@@ -19477,21 +19524,21 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="0" name="flag" type="int">
</argument>
<description>
- Return a [Material] flag, which toggles on or off a behavior when rendering. See enumeration FLAG_* for a list.
+ Return a [Material] flag, which toggles on or off a behavior when rendering. See enumeration FLAG_* for a list.
</description>
</method>
<method name="get_line_width" qualifiers="const">
<return type="float">
</return>
<description>
- Return the line width for geometry drawn with FLAG_WIREFRAME enabled, or LINE primitives. Note that not all hardware or VisualServer backends support this (like DirectX).
+ Return the line width for geometry drawn with FLAG_WIREFRAME enabled, or LINE primitives. Note that not all hardware or VisualServer backends support this (like DirectX).
</description>
</method>
<method name="set_blend_mode">
<argument index="0" name="mode" type="int">
</argument>
<description>
- Set blend mode for the material, which can be one of BLEND_MODE_MIX (default), BLEND_MODE_ADD, BLEND_MODE_SUB. Keep in mind that only BLEND_MODE_MIX ensures that the material [i]may[/i] be opaque, any other blend mode will render with alpha blending enabled in raster-based [VisualServer] implementations.
+ Set blend mode for the material, which can be one of BLEND_MODE_MIX (default), BLEND_MODE_ADD, BLEND_MODE_SUB. Keep in mind that only BLEND_MODE_MIX ensures that the material [i]may[/i] be opaque, any other blend mode will render with alpha blending enabled in raster-based [VisualServer] implementations.
</description>
</method>
<method name="set_depth_draw_mode">
@@ -19506,14 +19553,14 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="1" name="enable" type="bool">
</argument>
<description>
- Set a [Material] flag, which toggles on or off a behavior when rendering. See enumeration FLAG_* for a list.
+ Set a [Material] flag, which toggles on or off a behavior when rendering. See enumeration FLAG_* for a list.
</description>
</method>
<method name="set_line_width">
<argument index="0" name="width" type="float">
</argument>
<description>
- Set the line width for geometry drawn with FLAG_WIREFRAME enabled, or LINE primitives. Note that not all hardware or VisualServer backends support this (like DirectX).
+ Set the line width for geometry drawn with FLAG_WIREFRAME enabled, or LINE primitives. Note that not all hardware or VisualServer backends support this (like DirectX).
</description>
</method>
</methods>
@@ -19584,10 +19631,10 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
</class>
<class name="Matrix3" category="Built-In Types">
<brief_description>
- 3x3 matrix datatype.
+ 3x3 matrix datatype.
</brief_description>
<description>
- 3x3 matrix used for 3D rotation and scale. Contains 3 vector fields x,y and z. Can also be accessed as array of 3D vectors. Almost always used as orthogonal basis for a [Transform].
+ 3x3 matrix used for 3D rotation and scale. Contains 3 vector fields x,y and z. Can also be accessed as array of 3D vectors. Almost always used as orthogonal basis for a [Transform].
</description>
<methods>
<method name="Matrix3">
@@ -19596,7 +19643,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="0" name="from" type="Quat">
</argument>
<description>
- Create a matrix from a quaternion.
+ Create a matrix from a quaternion.
</description>
</method>
<method name="Matrix3">
@@ -19607,7 +19654,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="1" name="phi" type="float">
</argument>
<description>
- Create a matrix from an axis vector and an angle.
+ Create a matrix from an axis vector and an angle.
</description>
</method>
<method name="Matrix3">
@@ -19620,21 +19667,21 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="2" name="z_axis" type="Vector3">
</argument>
<description>
- Create a matrix from 3 axis vectors.
+ Create a matrix from 3 axis vectors.
</description>
</method>
<method name="determinant">
<return type="float">
</return>
<description>
- Return the determinant of the matrix.
+ Return the determinant of the matrix.
</description>
</method>
<method name="get_euler">
<return type="Vector3">
</return>
<description>
- Return euler angles from the matrix.
+ Return euler angles from the matrix.
</description>
</method>
<method name="get_orthogonal_index">
@@ -19653,14 +19700,14 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<return type="Matrix3">
</return>
<description>
- Return the affine inverse of the matrix.
+ Return the affine inverse of the matrix.
</description>
</method>
<method name="orthonormalized">
<return type="Matrix3">
</return>
<description>
- Return the orthonormalized version of the matrix (useful to call from time to time to avoid rounding error).
+ Return the orthonormalized version of the matrix (useful to call from time to time to avoid rounding error).
</description>
</method>
<method name="rotated">
@@ -19671,7 +19718,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="1" name="phi" type="float">
</argument>
<description>
- Return the rotated version of the matrix, by a given axis and angle.
+ Return the rotated version of the matrix, by a given axis and angle.
</description>
</method>
<method name="scaled">
@@ -19680,7 +19727,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="0" name="scale" type="Vector3">
</argument>
<description>
- Return the scaled version of the matrix, by a 3D scale.
+ Return the scaled version of the matrix, by a 3D scale.
</description>
</method>
<method name="tdotx">
@@ -19689,7 +19736,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="0" name="with" type="Vector3">
</argument>
<description>
- Transposed dot product with the x axis of the matrix.
+ Transposed dot product with the x axis of the matrix.
</description>
</method>
<method name="tdoty">
@@ -19698,7 +19745,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="0" name="with" type="Vector3">
</argument>
<description>
- Transposed dot product with the y axis of the matrix.
+ Transposed dot product with the y axis of the matrix.
</description>
</method>
<method name="tdotz">
@@ -19707,14 +19754,14 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="0" name="with" type="Vector3">
</argument>
<description>
- Transposed dot product with the z axis of the matrix.
+ Transposed dot product with the z axis of the matrix.
</description>
</method>
<method name="transposed">
<return type="Matrix3">
</return>
<description>
- Return the transposed version of the matrix.
+ Return the transposed version of the matrix.
</description>
</method>
<method name="xform">
@@ -19723,7 +19770,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="0" name="v" type="Vector3">
</argument>
<description>
- Return a vector transformed by the matrix and return it.
+ Return a vector transformed by the matrix and return it.
</description>
</method>
<method name="xform_inv">
@@ -19732,7 +19779,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="0" name="v" type="Vector3">
</argument>
<description>
- Return a vector transformed by the transposed matrix and return it.
+ Return a vector transformed by the transposed matrix and return it.
</description>
</method>
</methods>
@@ -19749,10 +19796,10 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
</class>
<class name="Matrix32" category="Built-In Types">
<brief_description>
- 3x2 Matrix for 2D transforms.
+ 3x2 Matrix for 2D transforms.
</brief_description>
<description>
- 3x2 Matrix for 2D transforms.
+ 3x2 Matrix for 2D transforms.
</description>
<methods>
<method name="Matrix32">
@@ -19901,17 +19948,17 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
</class>
<class name="MenuButton" inherits="Button" category="Core">
<brief_description>
- Special button that brings up a [PopupMenu] when clicked.
+ Special button that brings up a [PopupMenu] when clicked.
</brief_description>
<description>
- Special button that brings up a [PopupMenu] when clicked. That's pretty much all it does, as it's just a helper class when building GUIs.
+ Special button that brings up a [PopupMenu] when clicked. That's pretty much all it does, as it's just a helper class when building GUIs.
</description>
<methods>
<method name="get_popup">
<return type="PopupMenu">
</return>
<description>
- Return the [PopupMenu] contained in this button.
+ Return the [PopupMenu] contained in this button.
</description>
</method>
</methods>
@@ -19950,10 +19997,10 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
</class>
<class name="Mesh" inherits="Resource" category="Core">
<brief_description>
- A [Resource] that contains vertex-array based geometry.
+ A [Resource] that contains vertex-array based geometry.
</brief_description>
<description>
- Mesh is a type of [Resource] that contains vertex-array based geometry, divided in [i]surfaces[/i]. Each surface contains a completely separate array and a material used to draw it. Design wise, a mesh with multiple surfaces is preferred to a single surface, because objects created in 3D editing software commonly contain multiple materials.
+ Mesh is a type of [Resource] that contains vertex-array based geometry, divided in [i]surfaces[/i]. Each surface contains a completely separate array and a material used to draw it. Design wise, a mesh with multiple surfaces is preferred to a single surface, because objects created in 3D editing software commonly contain multiple materials.
</description>
<methods>
<method name="add_morph_target">
@@ -19972,9 +20019,9 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="3" name="alphasort" type="bool" default="false">
</argument>
<description>
- Create a new surface ([method get_surface_count] that will become surf_idx for this.
- Surfaces are created to be rendered using a "primitive", which may be PRIMITIVE_POINTS, PRIMITIVE_LINES, PRIMITIVE_LINE_STRIP, PRIMITIVE_LINE_LOOP, PRIMITIVE_TRIANGLES, PRIMITIVE_TRIANGLE_STRIP, PRIMITIVE_TRIANGLE_FAN. (As a note, when using indices, it is recommended to only use just points, lines or triangles).
- The format of a surface determines which arrays it will allocate and hold, so "format" is a combination of ARRAY_FORMAT_* mask constants ORed together. ARRAY_FORMAT_VERTEX must be always present. "array_len" determines the amount of vertices in the array (not primitives!). if ARRAY_FORMAT_INDEX is in the format mask, then it means that an index array will be allocated and "index_array_len" must be passed.
+ Create a new surface ([method get_surface_count] that will become surf_idx for this.
+ Surfaces are created to be rendered using a "primitive", which may be PRIMITIVE_POINTS, PRIMITIVE_LINES, PRIMITIVE_LINE_STRIP, PRIMITIVE_LINE_LOOP, PRIMITIVE_TRIANGLES, PRIMITIVE_TRIANGLE_STRIP, PRIMITIVE_TRIANGLE_FAN. (As a note, when using indices, it is recommended to only use just points, lines or triangles).
+ The format of a surface determines which arrays it will allocate and hold, so "format" is a combination of ARRAY_FORMAT_* mask constants ORed together. ARRAY_FORMAT_VERTEX must be always present. "array_len" determines the amount of vertices in the array (not primitives!). if ARRAY_FORMAT_INDEX is in the format mask, then it means that an index array will be allocated and "index_array_len" must be passed.
</description>
</method>
<method name="center_geometry">
@@ -20015,7 +20062,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<return type="int">
</return>
<description>
- Return the amount of surfaces that the [Mesh] holds.
+ Return the amount of surfaces that the [Mesh] holds.
</description>
</method>
<method name="regen_normalmaps">
@@ -20040,7 +20087,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="0" name="surf_idx" type="int">
</argument>
<description>
- Return the length in indices of the index array in the requested surface (see [method add_surface]).
+ Return the length in indices of the index array in the requested surface (see [method add_surface]).
</description>
</method>
<method name="surface_get_array_len" qualifiers="const">
@@ -20049,7 +20096,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="0" name="surf_idx" type="int">
</argument>
<description>
- Return the length in vertices of the vertex array in the requested surface (see [method add_surface]).
+ Return the length in vertices of the vertex array in the requested surface (see [method add_surface]).
</description>
</method>
<method name="surface_get_format" qualifiers="const">
@@ -20058,7 +20105,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="0" name="surf_idx" type="int">
</argument>
<description>
- Return the format mask of the requested surface (see [method add_surface]).
+ Return the format mask of the requested surface (see [method add_surface]).
</description>
</method>
<method name="surface_get_material" qualifiers="const">
@@ -20067,7 +20114,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="0" name="surf_idx" type="int">
</argument>
<description>
- Return a [Material] in a given surface. Surface is rendered using this material.
+ Return a [Material] in a given surface. Surface is rendered using this material.
</description>
</method>
<method name="surface_get_name" qualifiers="const">
@@ -20084,14 +20131,14 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="0" name="surf_idx" type="int">
</argument>
<description>
- Return the primitive type of the requested surface (see [method add_surface]).
+ Return the primitive type of the requested surface (see [method add_surface]).
</description>
</method>
<method name="surface_remove">
<argument index="0" name="surf_idx" type="int">
</argument>
<description>
- Remove a surface at position surf_idx, shifting greater surfaces one surf_idx slot down.
+ Remove a surface at position surf_idx, shifting greater surfaces one surf_idx slot down.
</description>
</method>
<method name="surface_set_material">
@@ -20100,7 +20147,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="1" name="material" type="Material">
</argument>
<description>
- Set a [Material] for a given surface. Surface will be rendered using this material.
+ Set a [Material] for a given surface. Surface will be rendered using this material.
</description>
</method>
<method name="surface_set_name">
@@ -20498,10 +20545,10 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
</class>
<class name="MeshInstance" inherits="GeometryInstance" category="Core">
<brief_description>
- Node that instances meshes into a scenario.
+ Node that instances meshes into a scenario.
</brief_description>
<description>
- MeshInstance is a [Node] that takes a [Mesh] resource and adds it to the current scenario by creating an instance of it. This is the class most often used to get 3D geometry rendered and can be used to instance a single [Mesh] in many places. This allows to reuse geometry and save on resources. When a [Mesh] has to be instanced more than thousands of times at close proximity, consider using a [MultiMesh] in a [MultiMeshInstance] instead.
+ MeshInstance is a [Node] that takes a [Mesh] resource and adds it to the current scenario by creating an instance of it. This is the class most often used to get 3D geometry rendered and can be used to instance a single [Mesh] in many places. This allows to reuse geometry and save on resources. When a [Mesh] has to be instanced more than thousands of times at close proximity, consider using a [MultiMesh] in a [MultiMeshInstance] instead.
</description>
<methods>
<method name="create_convex_collision">
@@ -20510,21 +20557,21 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
</method>
<method name="create_trimesh_collision">
<description>
- This helper creates a [StaticBody] child [Node] using the mesh geometry as collision. It's mainly used for testing.
+ This helper creates a [StaticBody] child [Node] using the mesh geometry as collision. It's mainly used for testing.
</description>
</method>
<method name="get_aabb" qualifiers="const">
<return type="AABB">
</return>
<description>
- Return the AABB of the mesh, in local coordinates.
+ Return the AABB of the mesh, in local coordinates.
</description>
</method>
<method name="get_mesh" qualifiers="const">
<return type="Mesh">
</return>
<description>
- Return the current [Mesh] resource for the instance.
+ Return the current [Mesh] resource for the instance.
</description>
</method>
<method name="get_skeleton_path">
@@ -20537,7 +20584,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="0" name="mesh" type="Mesh">
</argument>
<description>
- Set the [Mesh] resource for the instance.
+ Set the [Mesh] resource for the instance.
</description>
</method>
<method name="set_skeleton_path">
@@ -20552,29 +20599,29 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
</class>
<class name="MeshLibrary" inherits="Resource" category="Core">
<brief_description>
- Library of meshes.
+ Library of meshes.
</brief_description>
<description>
- Library of meshes. Contains a list of [Mesh] resources, each with name and ID. Useful for GridMap or painting Terrain.
+ Library of meshes. Contains a list of [Mesh] resources, each with name and ID. Useful for GridMap or painting Terrain.
</description>
<methods>
<method name="clear">
<description>
- Clear the library.
+ Clear the library.
</description>
</method>
<method name="create_item">
<argument index="0" name="id" type="int">
</argument>
<description>
- Create a new item in the library, supplied an id.
+ Create a new item in the library, supplied an id.
</description>
</method>
<method name="get_item_list" qualifiers="const">
<return type="IntArray">
</return>
<description>
- Return the list of items.
+ Return the list of items.
</description>
</method>
<method name="get_item_mesh" qualifiers="const">
@@ -20583,7 +20630,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="0" name="id" type="int">
</argument>
<description>
- Return the mesh of the item.
+ Return the mesh of the item.
</description>
</method>
<method name="get_item_name" qualifiers="const">
@@ -20592,7 +20639,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="0" name="id" type="int">
</argument>
<description>
- Return the name of the item.
+ Return the name of the item.
</description>
</method>
<method name="get_item_navmesh" qualifiers="const">
@@ -20615,14 +20662,14 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<return type="int">
</return>
<description>
- Get an unused id for a new item.
+ Get an unused id for a new item.
</description>
</method>
<method name="remove_item">
<argument index="0" name="id" type="int">
</argument>
<description>
- Remove the item.
+ Remove the item.
</description>
</method>
<method name="set_item_mesh">
@@ -20631,7 +20678,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="1" name="mesh" type="Mesh">
</argument>
<description>
- Set the mesh of the item.
+ Set the mesh of the item.
</description>
</method>
<method name="set_item_name">
@@ -20640,7 +20687,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="1" name="name" type="String">
</argument>
<description>
- Set the name of the item.
+ Set the name of the item.
</description>
</method>
<method name="set_item_navmesh">
@@ -20665,25 +20712,25 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
</class>
<class name="MultiMesh" inherits="Resource" category="Core">
<brief_description>
- Provides high performance mesh instancing.
+ Provides high performance mesh instancing.
</brief_description>
<description>
- MultiMesh provides low level mesh instancing. If the amount of [Mesh] instances needed goes from hundreds to thousands (and most need to be visible at close proximity) creating such a large amount of [MeshInstance] nodes may affect performance by using too much CPU or video memory.
- For this case a MultiMesh becomes very useful, as it can draw thousands of instances with little API overhead.
- As a drawback, if the instances are too far away of each other, performance may be reduced as every single instance will always rendered (they are spatially indexed as one, for the whole object).
- Since instances may have any behavior, the AABB used for visibility must be provided by the user, or generated with [method generate_aabb].
+ MultiMesh provides low level mesh instancing. If the amount of [Mesh] instances needed goes from hundreds to thousands (and most need to be visible at close proximity) creating such a large amount of [MeshInstance] nodes may affect performance by using too much CPU or video memory.
+ For this case a MultiMesh becomes very useful, as it can draw thousands of instances with little API overhead.
+ As a drawback, if the instances are too far away of each other, performance may be reduced as every single instance will always rendered (they are spatially indexed as one, for the whole object).
+ Since instances may have any behavior, the AABB used for visibility must be provided by the user, or generated with [method generate_aabb].
</description>
<methods>
<method name="generate_aabb">
<description>
- Generate a new visibility AABB, using mesh AABB and instance transforms. Since instance information is stored in the [VisualServer], this function is VERY SLOW and must NOT be used often.
+ Generate a new visibility AABB, using mesh AABB and instance transforms. Since instance information is stored in the [VisualServer], this function is VERY SLOW and must NOT be used often.
</description>
</method>
<method name="get_aabb" qualifiers="const">
<return type="AABB">
</return>
<description>
- Return the visibility AABB.
+ Return the visibility AABB.
</description>
</method>
<method name="get_instance_color" qualifiers="const">
@@ -20692,14 +20739,14 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="0" name="instance" type="int">
</argument>
<description>
- Get the color of a specific instance.
+ Get the color of a specific instance.
</description>
</method>
<method name="get_instance_count" qualifiers="const">
<return type="int">
</return>
<description>
- Return the amount of instances that is going to be drawn.
+ Return the amount of instances that is going to be drawn.
</description>
</method>
<method name="get_instance_transform" qualifiers="const">
@@ -20708,21 +20755,21 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="0" name="instance" type="int">
</argument>
<description>
- Return the transform of a specific instance.
+ Return the transform of a specific instance.
</description>
</method>
<method name="get_mesh" qualifiers="const">
<return type="Mesh">
</return>
<description>
- Return the [Mesh] resource drawn as multiple instances.
+ Return the [Mesh] resource drawn as multiple instances.
</description>
</method>
<method name="set_aabb">
<argument index="0" name="visibility_aabb" type="AABB">
</argument>
<description>
- Set the visibility AABB. If not provided, MultiMesh will not be visible.
+ Set the visibility AABB. If not provided, MultiMesh will not be visible.
</description>
</method>
<method name="set_instance_color">
@@ -20731,14 +20778,14 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="1" name="color" type="Color">
</argument>
<description>
- Set the color of a specific instance.
+ Set the color of a specific instance.
</description>
</method>
<method name="set_instance_count">
<argument index="0" name="count" type="int">
</argument>
<description>
- Set the amount of instances that is going to be drawn. Changing this number will erase all the existing instance transform and color data.
+ Set the amount of instances that is going to be drawn. Changing this number will erase all the existing instance transform and color data.
</description>
</method>
<method name="set_instance_transform">
@@ -20747,14 +20794,14 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="1" name="transform" type="Transform">
</argument>
<description>
- Set the transform for a specific instance.
+ Set the transform for a specific instance.
</description>
</method>
<method name="set_mesh">
<argument index="0" name="mesh" type="Mesh">
</argument>
<description>
- Set the [Mesh] resource to be drawn in multiple instances.
+ Set the [Mesh] resource to be drawn in multiple instances.
</description>
</method>
</methods>
@@ -20763,24 +20810,24 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
</class>
<class name="MultiMeshInstance" inherits="GeometryInstance" category="Core">
<brief_description>
- Node that instances a [MultiMesh].
+ Node that instances a [MultiMesh].
</brief_description>
<description>
- MultiMeshInstance is a [Node] that takes a [MultiMesh] resource and adds it to the current scenario by creating an instance of it (yes, this is an instance of instances).
+ MultiMeshInstance is a [Node] that takes a [MultiMesh] resource and adds it to the current scenario by creating an instance of it (yes, this is an instance of instances).
</description>
<methods>
<method name="get_multimesh" qualifiers="const">
<return type="Object">
</return>
<description>
- Return the [MultiMesh] that is used for instancing.
+ Return the [MultiMesh] that is used for instancing.
</description>
</method>
<method name="set_multimesh">
<argument index="0" name="multimesh" type="Object">
</argument>
<description>
- Set the [MultiMesh] to be instance.
+ Set the [MultiMesh] to be instance.
</description>
</method>
</methods>
@@ -20789,27 +20836,27 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
</class>
<class name="Mutex" inherits="Reference" category="Core">
<brief_description>
- A synchronization Mutex.
+ A synchronization Mutex.
</brief_description>
<description>
- A synchronization Mutex. Element used in multi-threadding. Basically a binary [Semaphore]. Guarantees that only one thread has this lock, can be used to protect a critical section.
+ A synchronization Mutex. Element used in multi-threadding. Basically a binary [Semaphore]. Guarantees that only one thread has this lock, can be used to protect a critical section.
</description>
<methods>
<method name="lock">
<description>
- Lock this [Mutex], blocks until it is unlocked by the current owner.
+ Lock this [Mutex], blocks until it is unlocked by the current owner.
</description>
</method>
<method name="try_lock">
<return type="Error">
</return>
<description>
- Try locking this [Mutex], does not block. Returns [OK] on success else [ERR_BUSY].
+ Try locking this [Mutex], does not block. Returns [OK] on success else [ERR_BUSY].
</description>
</method>
<method name="unlock">
<description>
- Unlock this [Mutex], leaving it to others threads.
+ Unlock this [Mutex], leaving it to others threads.
</description>
</method>
</methods>
@@ -21366,18 +21413,18 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
</class>
<class name="Node" inherits="Object" category="Core">
<brief_description>
- Base class for all the "Scene" elements.
+ Base class for all the "Scene" elements.
</brief_description>
<description>
- Nodes can be set as children of other nodes, resulting in a tree arrangement. Any tree of nodes is called a "Scene".
- Scenes can be saved to disk, and then instanced into other scenes. This allows for very high flexibility in the architecture and data model of the projects.
- [SceneTree] contains the "active" tree of nodes, and a node becomes active (receiving NOTIFICATION_ENTER_SCENE) when added to that tree.
- A node can contain any number of nodes as a children (but there is only one tree root) with the requirement that no two children with the same name can exist.
- Nodes can, optionally, be added to groups. This makes it easy to reach a number of nodes from the code (for example an "enemies" group).
- Nodes can be set to "process" state, so they constantly receive a callback requesting them to process (do anything). Normal processing ([method _process]) happens as fast as possible and is dependent on the frame rate, so the processing time delta is variable. Fixed processing ([method _fixed_process]) happens a fixed amount of times per second (by default 60) and is useful to link itself to the physics.
- Nodes can also process input events. When set, the [method _input] function will be called with every input that the program receives. Since this is usually too overkill (unless used for simple projects), an [method _unhandled_input] function is called when the input was not handled by anyone else (usually, GUI [Control] nodes).
- To keep track of the scene hierarchy (specially when instancing scenes into scenes) an "owner" can be set to a node. This keeps track of who instanced what. This is mostly useful when writing editors and tools, though.
- Finally, when a node is freed, it will free all its children nodes too.
+ Nodes can be set as children of other nodes, resulting in a tree arrangement. Any tree of nodes is called a "Scene".
+ Scenes can be saved to disk, and then instanced into other scenes. This allows for very high flexibility in the architecture and data model of the projects.
+ [SceneTree] contains the "active" tree of nodes, and a node becomes active (receiving NOTIFICATION_ENTER_SCENE) when added to that tree.
+ A node can contain any number of nodes as a children (but there is only one tree root) with the requirement that no two children with the same name can exist.
+ Nodes can, optionally, be added to groups. This makes it easy to reach a number of nodes from the code (for example an "enemies" group).
+ Nodes can be set to "process" state, so they constantly receive a callback requesting them to process (do anything). Normal processing ([method _process]) happens as fast as possible and is dependent on the frame rate, so the processing time delta is variable. Fixed processing ([method _fixed_process]) happens a fixed amount of times per second (by default 60) and is useful to link itself to the physics.
+ Nodes can also process input events. When set, the [method _input] function will be called with every input that the program receives. Since this is usually too overkill (unless used for simple projects), an [method _unhandled_input] function is called when the input was not handled by anyone else (usually, GUI [Control] nodes).
+ To keep track of the scene hierarchy (specially when instancing scenes into scenes) an "owner" can be set to a node. This keeps track of who instanced what. This is mostly useful when writing editors and tools, though.
+ Finally, when a node is freed, it will free all its children nodes too.
</description>
<methods>
<method name="_enter_tree" qualifiers="virtual">
@@ -21392,40 +21439,40 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="0" name="delta" type="float">
</argument>
<description>
- Called for fixed processing (synced to the physics).
+ Called for fixed processing (synced to the physics).
</description>
</method>
<method name="_input" qualifiers="virtual">
<argument index="0" name="event" type="InputEvent">
</argument>
<description>
- Called when any input happens (also must enable with [method set_process_input] or the property).
+ Called when any input happens (also must enable with [method set_process_input] or the property).
</description>
</method>
<method name="_process" qualifiers="virtual">
<argument index="0" name="delta" type="float">
</argument>
<description>
- Called for processing. This is called every frame, with the delta time from the previous frame.
+ Called for processing. This is called every frame, with the delta time from the previous frame.
</description>
</method>
<method name="_ready" qualifiers="virtual">
<description>
- Called when ready (entered scene and children entered too).
+ Called when ready (entered scene and children entered too).
</description>
</method>
<method name="_unhandled_input" qualifiers="virtual">
<argument index="0" name="event" type="InputEvent">
</argument>
<description>
- Called when any input happens that was not handled by something else (also must enable with [method set_process_unhandled_input] or the property).
+ Called when any input happens that was not handled by something else (also must enable with [method set_process_unhandled_input] or the property).
</description>
</method>
<method name="_unhandled_key_input" qualifiers="virtual">
<argument index="0" name="key_event" type="InputEvent">
</argument>
<description>
- Called when any key input happens that was not handled by something else.
+ Called when any key input happens that was not handled by something else.
</description>
</method>
<method name="add_child">
@@ -21434,8 +21481,8 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="1" name="legible_unique_name" type="bool" default="false">
</argument>
<description>
- Add a child [Node]. Nodes can have as many children as they want, but every child must have a unique name. Children nodes are automatically deleted when the parent node is deleted, so deleting a whole scene is performed by deleting its topmost node.
- The optional boolean argument enforces creating child node with human-readable names, based on the name of node being instanced instead of its type only.
+ Add a child [Node]. Nodes can have as many children as they want, but every child must have a unique name. Children nodes are automatically deleted when the parent node is deleted, so deleting a whole scene is performed by deleting its topmost node.
+ The optional boolean argument enforces creating child node with human-readable names, based on the name of node being instanced instead of its type only.
</description>
</method>
<method name="add_to_group">
@@ -21444,14 +21491,14 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="1" name="persistent" type="bool" default="false">
</argument>
<description>
- Add a node to a group. Groups are helpers to name and organize group of nodes, like for example: "Enemies", "Collectables", etc. A [Node] can be in any number of groups. Nodes can be assigned a group at any time, but will not be added to it until they are inside the scene tree (see [method is_inside_tree]).
+ Add a node to a group. Groups are helpers to name and organize group of nodes, like for example: "Enemies", "Collectables", etc. A [Node] can be in any number of groups. Nodes can be assigned a group at any time, but will not be added to it until they are inside the scene tree (see [method is_inside_tree]).
</description>
</method>
<method name="can_process" qualifiers="const">
<return type="bool">
</return>
<description>
- Return true if the node can process.
+ Return true if the node can process.
</description>
</method>
<method name="duplicate" qualifiers="const">
@@ -21472,7 +21519,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="2" name="owned" type="bool" default="true">
</argument>
<description>
- Find a descendant of this node whose name matches [code]mask[/code] as in [method String.match] (i.e. case sensitive, but '*' matches zero or more characters and '?' matches any single character except '.'). Note that it does not match against the full path, just against individual node names.
+ Find a descendant of this node whose name matches [code]mask[/code] as in [method String.match] (i.e. case sensitive, but '*' matches zero or more characters and '?' matches any single character except '.'). Note that it does not match against the full path, just against individual node names.
</description>
</method>
<method name="get_child" qualifiers="const">
@@ -21481,14 +21528,14 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="0" name="idx" type="int">
</argument>
<description>
- Return a children node by it's index (see [method get_child_count]). This method is often used for iterating all children of a node.
+ Return a children node by it's index (see [method get_child_count]). This method is often used for iterating all children of a node.
</description>
</method>
<method name="get_child_count" qualifiers="const">
<return type="int">
</return>
<description>
- Return the amount of children nodes.
+ Return the amount of children nodes.
</description>
</method>
<method name="get_children" qualifiers="const">
@@ -21501,14 +21548,14 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<return type="String">
</return>
<description>
- Return a filename that may be containedA node can contained by the node. When a scene is instanced from a file, it topmost node contains the filename from where it was loaded (see [method set_filename]).
+ Return a filename that may be containedA node can contained by the node. When a scene is instanced from a file, it topmost node contains the filename from where it was loaded (see [method set_filename]).
</description>
</method>
<method name="get_fixed_process_delta_time" qualifiers="const">
<return type="float">
</return>
<description>
- Return the time elapsed since the last fixed frame. This is always the same in fixed processing unless the frames per second is changed in [OS].
+ Return the time elapsed since the last fixed frame. This is always the same in fixed processing unless the frames per second is changed in [OS].
</description>
</method>
<method name="get_groups" qualifiers="const">
@@ -21521,14 +21568,14 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<return type="int">
</return>
<description>
- Get the node index in the parent (assuming it has a parent).
+ Get the node index in the parent (assuming it has a parent).
</description>
</method>
<method name="get_name" qualifiers="const">
<return type="String">
</return>
<description>
- Return the name of the [Node]. Name is be unique within parent.
+ Return the name of the [Node]. Name is be unique within parent.
</description>
</method>
<method name="get_node" qualifiers="const">
@@ -21537,22 +21584,25 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="0" name="path" type="NodePath">
</argument>
<description>
- Fetch a node. NodePath must be valid (or else error will occur) and can be either the path to child node, a relative path (from the current node to another node), or an absolute path to a node.
- Note: fetching absolute paths only works when the node is inside the scene tree (see [method is_inside_tree]). Examples. Assume your current node is Character and following tree:[br]
- root/
- root/Character
- root/Character/Sword
- root/Character/Backpack/Dagger
- root/MyGame
- root/Swamp/Alligator
- root/Swamp/Mosquito
- root/Swamp/Goblin
-
- Possible paths are:
- - get_node("Sword")
- - get_node("Backpack/Dagger")
- - get_node("../Swamp/Alligator")
- - get_node("/root/MyGame")
+ Fetch a node. NodePath must be valid (or else error will occur) and can be either the path to child node, a relative path (from the current node to another node), or an absolute path to a node.
+ Note: fetching absolute paths only works when the node is inside the scene tree (see [method is_inside_tree]). Examples. Assume your current node is Character and following tree:
+ [codeblock]
+ root/
+ root/Character
+ root/Character/Sword
+ root/Character/Backpack/Dagger
+ root/MyGame
+ root/Swamp/Alligator
+ root/Swamp/Mosquito
+ root/Swamp/Goblin
+ [/codeblock]
+ Possible paths are:
+ [codeblock]
+ get_node("Sword")
+ get_node("Backpack/Dagger")
+ get_node("../Swamp/Alligator")
+ get_node("/root/MyGame")
+ [/codeblock]
</description>
</method>
<method name="get_node_and_resource">
@@ -21567,21 +21617,21 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<return type="Node">
</return>
<description>
- Get the node owner (see [method set_owner]).
+ Get the node owner (see [method set_owner]).
</description>
</method>
<method name="get_parent" qualifiers="const">
<return type="Node">
</return>
<description>
- Return the parent [Node] of the current [Node], or an empty Object if the node lacks a parent.
+ Return the parent [Node] of the current [Node], or an empty Object if the node lacks a parent.
</description>
</method>
<method name="get_path" qualifiers="const">
<return type="NodePath">
</return>
<description>
- Return the absolute path of the current node. This only works if the current node is inside the scene tree (see [method is_inside_tree]).
+ Return the absolute path of the current node. This only works if the current node is inside the scene tree (see [method is_inside_tree]).
</description>
</method>
<method name="get_path_to" qualifiers="const">
@@ -21590,7 +21640,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="0" name="node" type="Node">
</argument>
<description>
- Return the relative path from the current node to the specified node in "node" argument. Both nodes must be in the same scene, or else the function will fail.
+ Return the relative path from the current node to the specified node in "node" argument. Both nodes must be in the same scene, or else the function will fail.
</description>
</method>
<method name="get_pause_mode" qualifiers="const">
@@ -21609,7 +21659,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<return type="float">
</return>
<description>
- Return the time elapsed (in seconds) since the last process callback. This is almost always different each time.
+ Return the time elapsed (in seconds) since the last process callback. This is almost always different each time.
</description>
</method>
<method name="get_scene_instance_load_placeholder" qualifiers="const">
@@ -21652,7 +21702,13 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="0" name="node" type="Node">
</argument>
<description>
- Return [i]true[/i] if the "node" argument is a direct or indirect child of the current node, otherwise return [i]false[/i].
+ Return [i]true[/i] if the "node" argument is a direct or indirect child of the current node, otherwise return [i]false[/i].
+ </description>
+ </method>
+ <method name="is_displayed_folded" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
</description>
</method>
<method name="is_displayed_folded" qualifiers="const">
@@ -21665,7 +21721,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<return type="bool">
</return>
<description>
- Return true if fixed processing is enabled (see [method set_fixed_process]).
+ Return true if fixed processing is enabled (see [method set_fixed_process]).
</description>
</method>
<method name="is_greater_than" qualifiers="const">
@@ -21674,7 +21730,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="0" name="node" type="Node">
</argument>
<description>
- Return [i]true[/i] if "node" occurs later in the scene hierarchy than the current node, otherwise return [i]false[/i].
+ Return [i]true[/i] if "node" occurs later in the scene hierarchy than the current node, otherwise return [i]false[/i].
</description>
</method>
<method name="is_in_group" qualifiers="const">
@@ -21695,21 +21751,21 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<return type="bool">
</return>
<description>
- Return whether processing is enabled in the current node (see [method set_process]).
+ Return whether processing is enabled in the current node (see [method set_process]).
</description>
</method>
<method name="is_processing_input" qualifiers="const">
<return type="bool">
</return>
<description>
- Return true if the node is processing input (see [method set_process_input]).
+ Return true if the node is processing input (see [method set_process_input]).
</description>
</method>
<method name="is_processing_unhandled_input" qualifiers="const">
<return type="bool">
</return>
<description>
- Return true if the node is processing unhandled input (see [method set_process_unhandled_input]).
+ Return true if the node is processing unhandled input (see [method set_process_unhandled_input]).
</description>
</method>
<method name="is_processing_unhandled_key_input" qualifiers="const">
@@ -21724,7 +21780,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="1" name="to_pos" type="int">
</argument>
<description>
- Move a child node to a different position (order) amongst the other children. Since calls, signals, etc are performed by tree order, changing the order of children nodes may be useful.
+ Move a child node to a different position (order) amongst the other children. Since calls, signals, etc are performed by tree order, changing the order of children nodes may be useful.
</description>
</method>
<method name="print_stray_nodes">
@@ -21733,14 +21789,14 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
</method>
<method name="print_tree">
<description>
- Print the scene to stdout. Used mainly for debugging purposes.
+ Print the scene to stdout. Used mainly for debugging purposes.
</description>
</method>
<method name="propagate_notification">
<argument index="0" name="what" type="int">
</argument>
<description>
- Notify the current node and all its children recursively by calling notification() in all of them.
+ Notify the current node and all its children recursively by calling notification() in all of them.
</description>
</method>
<method name="queue_free">
@@ -21749,26 +21805,26 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
</method>
<method name="raise">
<description>
- Move this node to the top of the array of nodes of the parent node. This is often useful on GUIs ([Control]), because their order of drawing fully depends on their order in the tree.
+ Move this node to the top of the array of nodes of the parent node. This is often useful on GUIs ([Control]), because their order of drawing fully depends on their order in the tree.
</description>
</method>
<method name="remove_and_skip">
<description>
- Remove a node and set all its children as children of the parent node (if exists). All even subscriptions that pass by the removed node will be unsubscribed.
+ Remove a node and set all its children as children of the parent node (if exists). All even subscriptions that pass by the removed node will be unsubscribed.
</description>
</method>
<method name="remove_child">
<argument index="0" name="node" type="Node">
</argument>
<description>
- Remove a child [Node]. Node is NOT deleted and will have to be deleted manually.
+ Remove a child [Node]. Node is NOT deleted and will have to be deleted manually.
</description>
</method>
<method name="remove_from_group">
<argument index="0" name="group" type="String">
</argument>
<description>
- Remove a node from a group.
+ Remove a node from a group.
</description>
</method>
<method name="replace_by">
@@ -21777,7 +21833,13 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="1" name="keep_data" type="bool" default="false">
</argument>
<description>
- Replace a node in a scene by a given one. Subscriptions that pass through this node will be lost.
+ Replace a node in a scene by a given one. Subscriptions that pass through this node will be lost.
+ </description>
+ </method>
+ <method name="set_display_folded">
+ <argument index="0" name="fold" type="bool">
+ </argument>
+ <description>
</description>
</method>
<method name="set_display_folded">
@@ -21790,28 +21852,28 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="0" name="filename" type="String">
</argument>
<description>
- A node can contain a filename. This filename should not be changed by the user, unless writing editors and tools. When a scene is instanced from a file, it topmost node contains the filename from where it was loaded.
+ A node can contain a filename. This filename should not be changed by the user, unless writing editors and tools. When a scene is instanced from a file, it topmost node contains the filename from where it was loaded.
</description>
</method>
<method name="set_fixed_process">
<argument index="0" name="enable" type="bool">
</argument>
<description>
- Enables or disables node fixed framerate processing. When a node is being processed, it will receive a NOTIFICATION_PROCESS at a fixed (usually 60 fps, check [OS] to change that) interval (and the [method _fixed_process] callback will be called if exists). It is common to check how much time was elapsed since the previous frame by calling [method get_fixed_process_delta_time].
+ Enables or disables node fixed framerate processing. When a node is being processed, it will receive a NOTIFICATION_PROCESS at a fixed (usually 60 fps, check [OS] to change that) interval (and the [method _fixed_process] callback will be called if exists). It is common to check how much time was elapsed since the previous frame by calling [method get_fixed_process_delta_time].
</description>
</method>
<method name="set_name">
<argument index="0" name="name" type="String">
</argument>
<description>
- Set the name of the [Node]. Name must be unique within parent, and setting an already existing name will cause for the node to be automatically renamed.
+ Set the name of the [Node]. Name must be unique within parent, and setting an already existing name will cause for the node to be automatically renamed.
</description>
</method>
<method name="set_owner">
<argument index="0" name="owner" type="Node">
</argument>
<description>
- Set the node owner. A node can have any other node as owner (as long as a valid parent, grandparent, etc ascending in the tree). When saving a node (using SceneSaver) all the nodes it owns will be saved with it. This allows to create complex SceneTrees, with instancing and subinstancing.
+ Set the node owner. A node can have any other node as owner (as long as a valid parent, grandparent, etc ascending in the tree). When saving a node (using SceneSaver) all the nodes it owns will be saved with it. This allows to create complex SceneTrees, with instancing and subinstancing.
</description>
</method>
<method name="set_pause_mode">
@@ -21824,21 +21886,21 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="0" name="enable" type="bool">
</argument>
<description>
- Enables or disables node processing. When a node is being processed, it will receive a NOTIFICATION_PROCESS on every drawn frame (and the [method _process] callback will be called if exists). It is common to check how much time was elapsed since the previous frame by calling [method get_process_delta_time].
+ Enables or disables node processing. When a node is being processed, it will receive a NOTIFICATION_PROCESS on every drawn frame (and the [method _process] callback will be called if exists). It is common to check how much time was elapsed since the previous frame by calling [method get_process_delta_time].
</description>
</method>
<method name="set_process_input">
<argument index="0" name="enable" type="bool">
</argument>
<description>
- Enable input processing for node. This is not required for GUI controls! It hooks up the node to receive all input (see [method _input]).
+ Enable input processing for node. This is not required for GUI controls! It hooks up the node to receive all input (see [method _input]).
</description>
</method>
<method name="set_process_unhandled_input">
<argument index="0" name="enable" type="bool">
</argument>
<description>
- Enable unhandled input processing for node. This is not required for GUI controls! It hooks up the node to receive all input that was not previously handled before (usually by a [Control]). (see [method _unhandled_input]).
+ Enable unhandled input processing for node. This is not required for GUI controls! It hooks up the node to receive all input that was not previously handled before (usually by a [Control]). (see [method _unhandled_input]).
</description>
</method>
<method name="set_process_unhandled_key_input">
@@ -21865,7 +21927,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
</signal>
<signal name="renamed">
<description>
- Emitted when the node is renamed.
+ Emitted when the node is renamed.
</description>
</signal>
</signals>
@@ -21909,17 +21971,17 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
</class>
<class name="Node2D" inherits="CanvasItem" category="Core">
<brief_description>
- Base node for 2D system.
+ Base node for 2D system.
</brief_description>
<description>
- Base node for 2D system. Node2D contains a position, rotation and scale, which is used to position and animate. It can alternatively be used with a custom 2D transform ([Matrix32]). A tree of Node2Ds allows complex hierarchies for animation and positioning.
+ Base node for 2D system. Node2D contains a position, rotation and scale, which is used to position and animate. It can alternatively be used with a custom 2D transform ([Matrix32]). A tree of Node2Ds allows complex hierarchies for animation and positioning.
</description>
<methods>
<method name="edit_set_pivot">
<argument index="0" name="pivot" type="Vector2">
</argument>
<description>
- Set the pivot position of the 2D node to 'pivot' value. This method is implemented only in some nodes that inherit Node2D.
+ Set the pivot position of the 2D node to 'pivot' value. This method is implemented only in some nodes that inherit Node2D.
</description>
</method>
<method name="get_angle_to" qualifiers="const">
@@ -21928,21 +21990,21 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="0" name="point" type="Vector2">
</argument>
<description>
- Return the rotation angle in radians needed for the 2d node to point at 'point' position.
+ Return the rotation angle in radians needed for the 2d node to point at 'point' position.
</description>
</method>
<method name="get_global_pos" qualifiers="const">
<return type="Vector2">
</return>
<description>
- Return the global position of the 2D node.
+ Return the global position of the 2D node.
</description>
</method>
<method name="get_pos" qualifiers="const">
<return type="Vector2">
</return>
<description>
- Return the position of the 2D node.
+ Return the position of the 2D node.
</description>
</method>
<method name="get_relative_transform_to_parent" qualifiers="const">
@@ -21951,14 +22013,14 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="0" name="parent" type="Object">
</argument>
<description>
- Return the transform [Matrix32] calculated relatively to the parent of this 2D node.
+ Return the transform [Matrix32] calculated relatively to the parent of this 2D node.
</description>
</method>
<method name="get_rot" qualifiers="const">
<return type="float">
</return>
<description>
- Return the rotation of the 2D node.
+ Return the rotation of the 2D node.
</description>
</method>
<method name="get_rotd" qualifiers="const">
@@ -21971,35 +22033,35 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<return type="Vector2">
</return>
<description>
- Return the scale of the 2D node.
+ Return the scale of the 2D node.
</description>
</method>
<method name="get_z" qualifiers="const">
<return type="int">
</return>
<description>
- Return the Z-index of the 2D node.
+ Return the Z-index of the 2D node.
</description>
</method>
<method name="global_translate">
<argument index="0" name="offset" type="Vector2">
</argument>
<description>
- Apply a global translation of 'offset' to the 2D node, starting from its current global position.
+ Apply a global translation of 'offset' to the 2D node, starting from its current global position.
</description>
</method>
<method name="is_z_relative" qualifiers="const">
<return type="bool">
</return>
<description>
- Return true if the Z-index value of this 2D node is relative to its parent's. Else, return false.
+ Return true if the Z-index value of this 2D node is relative to its parent's. Else, return false.
</description>
</method>
<method name="look_at">
<argument index="0" name="point" type="Vector2">
</argument>
<description>
- Rotate the 2d node so it points at 'point' position.
+ Rotate the 2d node so it points at 'point' position.
</description>
</method>
<method name="move_local_x">
@@ -22008,7 +22070,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="1" name="scaled" type="bool" default="false">
</argument>
<description>
- Apply a local translation on X axis to the 2D node according to the 'delta' of the process. If 'scaled' is false, the movement is normalized.
+ Apply a local translation on X axis to the 2D node according to the 'delta' of the process. If 'scaled' is false, the movement is normalized.
</description>
</method>
<method name="move_local_y">
@@ -22017,91 +22079,91 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="1" name="scaled" type="bool" default="false">
</argument>
<description>
- Apply a local translation on Y axis to the 2D node according to the 'delta' of the process. If 'scaled' is false, the movement is normalized.
+ Apply a local translation on Y axis to the 2D node according to the 'delta' of the process. If 'scaled' is false, the movement is normalized.
</description>
</method>
<method name="rotate">
<argument index="0" name="radians" type="float">
</argument>
<description>
- Apply a 'radians' rotation to the 2D node, starting from its current rotation.
+ Apply a 'radians' rotation to the 2D node, starting from its current rotation.
</description>
</method>
<method name="scale">
<argument index="0" name="ratio" type="Vector2">
</argument>
<description>
- Apply the 'ratio' scale to the 2D node, according to its current scale value.
+ Apply the 'ratio' scale to the 2D node, according to its current scale value.
</description>
</method>
<method name="set_global_pos">
<argument index="0" name="pos" type="Vector2">
</argument>
<description>
- Set the global position of the 2D node to 'pos'.
+ Set the global position of the 2D node to 'pos'.
</description>
</method>
<method name="set_global_transform">
<argument index="0" name="xform" type="Matrix32">
</argument>
<description>
- Set the global transform [Matrix32] of the 2D node.
+ Set the global transform [Matrix32] of the 2D node.
</description>
</method>
<method name="set_pos">
<argument index="0" name="pos" type="Vector2">
</argument>
<description>
- Set the position of the 2D node.
+ Set the position of the 2D node.
</description>
</method>
<method name="set_rot">
<argument index="0" name="radians" type="float">
</argument>
<description>
- Set the rotation of the 2D node.
+ Set the rotation of the 2D node.
</description>
</method>
<method name="set_rotd">
<argument index="0" name="degrees" type="float">
</argument>
<description>
- Set the rotation of the 2D node.
+ Set the rotation of the 2D node.
</description>
</method>
<method name="set_scale">
<argument index="0" name="scale" type="Vector2">
</argument>
<description>
- Set the scale of the 2D node.
+ Set the scale of the 2D node.
</description>
</method>
<method name="set_transform">
<argument index="0" name="xform" type="Matrix32">
</argument>
<description>
- Set the local transform [Matrix32] of the 2D node.
+ Set the local transform [Matrix32] of the 2D node.
</description>
</method>
<method name="set_z">
<argument index="0" name="z" type="int">
</argument>
<description>
- Set the Z-index value of the 2D node.
+ Set the Z-index value of the 2D node.
</description>
</method>
<method name="set_z_as_relative">
<argument index="0" name="enable" type="bool">
</argument>
<description>
- Set the Z-index value as relative to the parent node of this 2D node. Thus, if this 2D node's Z-index value is 2 and its parent's effective Z-index is 3, then the effective Z-index value of this 2D node would be 3 + 2 = 5.
+ Set the Z-index value as relative to the parent node of this 2D node. Thus, if this 2D node's Z-index value is 2 and its parent's effective Z-index is 3, then the effective Z-index value of this 2D node would be 3 + 2 = 5.
</description>
</method>
<method name="translate">
<argument index="0" name="offset" type="Vector2">
</argument>
<description>
- Apply a local translation of 'offset' to the 2D node, starting from its current local position.
+ Apply a local translation of 'offset' to the 2D node, starting from its current local position.
</description>
</method>
</methods>
@@ -22110,12 +22172,12 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
</class>
<class name="NodePath" category="Built-In Types">
<brief_description>
- Pre-parsed scene tree path.
+ Pre-parsed scene tree path.
</brief_description>
<description>
- A pre-parsed relative or absolute path in a scene tree, for use with [method Node.get_node] and similar functions. It can reference a node, a resource within a node, or a property of a node or resource. For instance, [code]"Path2D/PathFollow2D/Sprite:texture:size"[/code] would refer to the size property of the texture resource on the node named "Sprite" which is a child of the other named nodes in the path. Note that if you want to get a resource, you must end the path with a colon, otherwise the last element will be used as a property name.
- You will usually just pass a string to [method Node.get_node] and it will be automatically converted, but you may occasionally want to parse a path ahead of time with [NodePath] or the literal syntax [code]@"path"[/code]. Exporting a [NodePath] variable will give you a node selection widget in the properties panel of the editor, which can often be useful.
- A [NodePath] is made up of a list of node names, a list of "subnode" (resource) names, and the name of a property in the final node or resource.
+ A pre-parsed relative or absolute path in a scene tree, for use with [method Node.get_node] and similar functions. It can reference a node, a resource within a node, or a property of a node or resource. For instance, [code]"Path2D/PathFollow2D/Sprite:texture:size"[/code] would refer to the size property of the texture resource on the node named "Sprite" which is a child of the other named nodes in the path. Note that if you want to get a resource, you must end the path with a colon, otherwise the last element will be used as a property name.
+ You will usually just pass a string to [method Node.get_node] and it will be automatically converted, but you may occasionally want to parse a path ahead of time with [NodePath] or the literal syntax [code]@"path"[/code]. Exporting a [NodePath] variable will give you a node selection widget in the properties panel of the editor, which can often be useful.
+ A [NodePath] is made up of a list of node names, a list of "subnode" (resource) names, and the name of a property in the final node or resource.
</description>
<methods>
<method name="NodePath">
@@ -22124,7 +22186,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="0" name="from" type="String">
</argument>
<description>
- Create a NodePath from a string, e.g. "Path2D/PathFollow2D/Sprite:texture:size". A path is absolute if it starts with a slash. Absolute paths are only valid in the global scene tree, not within individual scenes. In a relative path, [code]"."[/code] and [code]".."[/code] indicate the current node and its parent.
+ Create a NodePath from a string, e.g. "Path2D/PathFollow2D/Sprite:texture:size". A path is absolute if it starts with a slash. Absolute paths are only valid in the global scene tree, not within individual scenes. In a relative path, [code]"."[/code] and [code]".."[/code] indicate the current node and its parent.
</description>
</method>
<method name="get_name">
@@ -22133,21 +22195,21 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="0" name="idx" type="int">
</argument>
<description>
- Get the node name indicated by [code]idx[/code] (0 to [method get_name_count])
+ Get the node name indicated by [code]idx[/code] (0 to [method get_name_count])
</description>
</method>
<method name="get_name_count">
<return type="int">
</return>
<description>
- Get the number of node names which make up the path.
+ Get the number of node names which make up the path.
</description>
</method>
<method name="get_property">
<return type="String">
</return>
<description>
- Get the path's property name, or an empty string if the path doesn't have a property.
+ Get the path's property name, or an empty string if the path doesn't have a property.
</description>
</method>
<method name="get_subname">
@@ -22156,28 +22218,28 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="0" name="idx" type="int">
</argument>
<description>
- Get the resource name indicated by [code]idx[/code] (0 to [method get_subname_count])
+ Get the resource name indicated by [code]idx[/code] (0 to [method get_subname_count])
</description>
</method>
<method name="get_subname_count">
<return type="int">
</return>
<description>
- Get the number of resource names in the path.
+ Get the number of resource names in the path.
</description>
</method>
<method name="is_absolute">
<return type="bool">
</return>
<description>
- Return true if the node path is absolute (not relative).
+ Return true if the node path is absolute (not relative).
</description>
</method>
<method name="is_empty">
<return type="bool">
</return>
<description>
- Return true if the node path is empty.
+ Return true if the node path is empty.
</description>
</method>
</methods>
@@ -22186,19 +22248,10 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
</class>
<class name="OS" inherits="Object" category="Core">
<brief_description>
- Operating System functions.
+ Operating System functions.
</brief_description>
<description>
- Operating System functions. OS Wraps the most common functionality to communicate with the host Operating System, such as:
- -Mouse Grabbing
- -Mouse Cursors
- -Clipboard
- -Video Mode
- -Date " Time
- -Timers
- -Environment Variables
- -Execution of Binaries
- -Command Line
+ Operating System functions. OS Wraps the most common functionality to communicate with the host Operating System, such as: mouse grabbing, mouse cursors, clipboard, video mode, date and time, timers, environment variables, execution of binaries, command line, etc.
</description>
<methods>
<method name="alert">
@@ -22213,7 +22266,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<return type="bool">
</return>
<description>
- Return true if the host OS allows drawing.
+ Return true if the host OS allows drawing.
</description>
</method>
<method name="can_use_threads" qualifiers="const">
@@ -22226,14 +22279,14 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="0" name="msec" type="int">
</argument>
<description>
- Delay executing of the current thread by given milliseconds.
+ Delay executing of the current thread by given milliseconds.
</description>
</method>
<method name="delay_usec" qualifiers="const">
<argument index="0" name="usec" type="int">
</argument>
<description>
- Delay executing of the current thread by given microseconds.
+ Delay executing of the current thread by given microseconds.
</description>
</method>
<method name="dump_memory_to_file">
@@ -22260,7 +22313,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="3" name="output" type="Array" default="Array()">
</argument>
<description>
- Execute the binary file in given path, optionally blocking until it returns. A process ID is returned.
+ Execute the binary file in given path, optionally blocking until it returns. A process ID is returned.
</description>
</method>
<method name="find_scancode_from_string" qualifiers="const">
@@ -22281,21 +22334,21 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<return type="String">
</return>
<description>
- Get clipboard from the host OS.
+ Get clipboard from the host OS.
</description>
</method>
<method name="get_cmdline_args">
<return type="StringArray">
</return>
<description>
- Return the commandline passed to the engine.
+ Return the commandline passed to the engine.
</description>
</method>
<method name="get_current_screen" qualifiers="const">
<return type="int">
</return>
<description>
- Returns the current screen index (0 padded).
+ Returns the current screen index (0 padded).
</description>
</method>
<method name="get_custom_level" qualifiers="const">
@@ -22308,7 +22361,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<return type="String">
</return>
<description>
- Return the absolute directory path of user data path([user://]).
+ Return the absolute directory path of user data path([user://]).
</description>
</method>
<method name="get_date" qualifiers="const">
@@ -22317,7 +22370,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="0" name="utc" type="bool" default="false">
</argument>
<description>
- Returns current date as a dictionary of keys: year, month, day, weekday, dst (daylight savings time).
+ Returns current date as a dictionary of keys: year, month, day, weekday, dst (daylight savings time).
</description>
</method>
<method name="get_datetime" qualifiers="const">
@@ -22326,7 +22379,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="0" name="utc" type="bool" default="false">
</argument>
<description>
- Returns current datetime as a dictionary of keys: year, month, day, weekday, dst (daylight savings time), hour, minute, second.
+ Returns current datetime as a dictionary of keys: year, month, day, weekday, dst (daylight savings time), hour, minute, second.
</description>
</method>
<method name="get_datetime_from_unix_time" qualifiers="const">
@@ -22335,15 +22388,15 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="0" name="unix_time_val" type="int">
</argument>
<description>
- Get a dictionary of time values when given epoch time.
- Dictionary Time values will be a union of values from [method get_time] and [method get_date] dictionaries (with the exception of dst = day light standard time, as it cannot be determined from epoch).
+ Get a dictionary of time values when given epoch time.
+ Dictionary Time values will be a union of values from [method get_time] and [method get_date] dictionaries (with the exception of dst = day light standard time, as it cannot be determined from epoch).
</description>
</method>
<method name="get_dynamic_memory_usage" qualifiers="const">
<return type="int">
</return>
<description>
- Return the total amount of dynamic memory used (only works in debug).
+ Return the total amount of dynamic memory used (only works in debug).
</description>
</method>
<method name="get_environment" qualifiers="const">
@@ -22352,28 +22405,28 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="0" name="environment" type="String">
</argument>
<description>
- Return an environment variable.
+ Return an environment variable.
</description>
</method>
<method name="get_executable_path" qualifiers="const">
<return type="String">
</return>
<description>
- Return the path to the current engine executable.
+ Return the path to the current engine executable.
</description>
</method>
<method name="get_frames_drawn">
<return type="int">
</return>
<description>
- Return the total amount of frames drawn.
+ Return the total amount of frames drawn.
</description>
</method>
<method name="get_frames_per_second" qualifiers="const">
<return type="float">
</return>
<description>
- Returns the frames per second of the running game.
+ Returns the frames per second of the running game.
</description>
</method>
<method name="get_fullscreen_mode_list" qualifiers="const">
@@ -22382,28 +22435,28 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="0" name="screen" type="int" default="0">
</argument>
<description>
- Return the list of fullscreen modes.
+ Return the list of fullscreen modes.
</description>
</method>
<method name="get_iterations_per_second" qualifiers="const">
<return type="int">
</return>
<description>
- Return the amount of fixed iterations per second (for fixed process and physics).
+ Return the amount of fixed iterations per second (for fixed process and physics).
</description>
</method>
<method name="get_locale" qualifiers="const">
<return type="String">
</return>
<description>
- Return the host OS locale.
+ Return the host OS locale.
</description>
</method>
<method name="get_main_loop" qualifiers="const">
<return type="Object">
</return>
<description>
- Return the main loop object (see [MainLoop]).
+ Return the main loop object (see [MainLoop]).
</description>
</method>
<method name="get_model_name" qualifiers="const">
@@ -22416,21 +22469,21 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<return type="String">
</return>
<description>
- Return the name of the host OS. Possible values are: "Android", "BlackBerry 10", "Flash", "Haiku", "iOS", "HTML5", "OSX", "Server", "Windows", "WinRT", "X11"
+ Return the name of the host OS. Possible values are: "Android", "BlackBerry 10", "Flash", "Haiku", "iOS", "HTML5", "OSX", "Server", "Windows", "WinRT", "X11"
</description>
</method>
<method name="get_process_ID" qualifiers="const">
<return type="int">
</return>
<description>
- Returns the game process ID
+ Returns the game process ID
</description>
</method>
<method name="get_processor_count" qualifiers="const">
<return type="int">
</return>
<description>
- Returns the number of cores available in the host machine.
+ Returns the number of cores available in the host machine.
</description>
</method>
<method name="get_scancode_string" qualifiers="const">
@@ -22445,7 +22498,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<return type="int">
</return>
<description>
- Returns the number of displays attached to the host machine
+ Returns the number of displays attached to the host machine
</description>
</method>
<method name="get_screen_dpi" qualifiers="const">
@@ -22460,7 +22513,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<return type="int">
</return>
<description>
- Returns the current screen orientation, the return value will be one of the SCREEN_ORIENTATION constants in this class.
+ Returns the current screen orientation, the return value will be one of the SCREEN_ORIENTATION constants in this class.
</description>
</method>
<method name="get_screen_position" qualifiers="const">
@@ -22477,7 +22530,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="0" name="screen" type="int" default="0">
</argument>
<description>
- Returns the dimensions in pixels of the specified screen.
+ Returns the dimensions in pixels of the specified screen.
</description>
</method>
<method name="get_splash_tick_msec" qualifiers="const">
@@ -22490,7 +22543,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<return type="int">
</return>
<description>
- Return the max amount of static memory used (only works in debug).
+ Return the max amount of static memory used (only works in debug).
</description>
</method>
<method name="get_static_memory_usage" qualifiers="const">
@@ -22523,7 +22576,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<return type="int">
</return>
<description>
- Return the amount of time passed in milliseconds since the engine started.
+ Return the amount of time passed in milliseconds since the engine started.
</description>
</method>
<method name="get_time" qualifiers="const">
@@ -22532,7 +22585,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="0" name="utc" type="bool" default="false">
</argument>
<description>
- Returns current time as a dictionary of keys: hour, minute, second
+ Returns current time as a dictionary of keys: hour, minute, second
</description>
</method>
<method name="get_time_scale">
@@ -22557,7 +22610,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<return type="int">
</return>
<description>
- Return the current unix timestamp.
+ Return the current unix timestamp.
</description>
</method>
<method name="get_unix_time_from_datetime" qualifiers="const">
@@ -22566,9 +22619,9 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="0" name="datetime" type="Dictionary">
</argument>
<description>
- Get an epoch time value from a dictionary of time values.
- [code]datetime[/code] must be populated with the following keys: year, month, day, hour, minute, second.
- You can pass the output from [method get_datetime_from_unix_time] directly into this function. Daylight savings time (dst), if present, is ignored.
+ Get an epoch time value from a dictionary of time values.
+ [code]datetime[/code] must be populated with the following keys: year, month, day, hour, minute, second.
+ You can pass the output from [method get_datetime_from_unix_time] directly into this function. Daylight savings time (dst), if present, is ignored.
</description>
</method>
<method name="get_video_mode_size" qualifiers="const">
@@ -22577,21 +22630,21 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="0" name="screen" type="int" default="0">
</argument>
<description>
- Return the current video mode size.
+ Return the current video mode size.
</description>
</method>
<method name="get_window_position" qualifiers="const">
<return type="Vector2">
</return>
<description>
- Returns the window position relative to the screen, the origin is the top left corner, +Y axis goes to the bottom and +X axis goes to the right.
+ Returns the window position relative to the screen, the origin is the top left corner, +Y axis goes to the bottom and +X axis goes to the right.
</description>
</method>
<method name="get_window_size" qualifiers="const">
<return type="Vector2">
</return>
<description>
- Returns the size of the window (without counting window manager decorations).
+ Returns the size of the window (without counting window manager decorations).
</description>
</method>
<method name="has_environment" qualifiers="const">
@@ -22600,7 +22653,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="0" name="environment" type="String">
</argument>
<description>
- Return true if an environment variable exists.
+ Return true if an environment variable exists.
</description>
</method>
<method name="has_touchscreen_ui_hint" qualifiers="const">
@@ -22619,14 +22672,14 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<return type="bool">
</return>
<description>
- Return true if low cpu usage mode is enabled.
+ Return true if low cpu usage mode is enabled.
</description>
</method>
<method name="is_keep_screen_on" qualifiers="const">
<return type="bool">
</return>
<description>
- Returns whether the screen is being kept on or not.
+ Returns whether the screen is being kept on or not.
</description>
</method>
<method name="is_ok_left_and_cancel_right" qualifiers="const">
@@ -22647,7 +22700,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<return type="bool">
</return>
<description>
- Return true if the engine was executed with -v (verbose stdout).
+ Return true if the engine was executed with -v (verbose stdout).
</description>
</method>
<method name="is_video_mode_fullscreen" qualifiers="const">
@@ -22656,7 +22709,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="0" name="screen" type="int" default="0">
</argument>
<description>
- Return true if the current video mode is fullscreen.
+ Return true if the current video mode is fullscreen.
</description>
</method>
<method name="is_video_mode_resizable" qualifiers="const">
@@ -22665,7 +22718,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="0" name="screen" type="int" default="0">
</argument>
<description>
- Return true if the window is resizable.
+ Return true if the window is resizable.
</description>
</method>
<method name="is_vsnc_enabled" qualifiers="const">
@@ -22678,28 +22731,28 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<return type="bool">
</return>
<description>
- Returns whether the window is in fullscreen mode or not.
+ Returns whether the window is in fullscreen mode or not.
</description>
</method>
<method name="is_window_maximized" qualifiers="const">
<return type="bool">
</return>
<description>
- Return true if the window is maximized.
+ Return true if the window is maximized.
</description>
</method>
<method name="is_window_minimized" qualifiers="const">
<return type="bool">
</return>
<description>
- Return true if the window is minimized.
+ Return true if the window is minimized.
</description>
</method>
<method name="is_window_resizable" qualifiers="const">
<return type="bool">
</return>
<description>
- Returns whether the window is resizable or not.
+ Returns whether the window is resizable or not.
</description>
</method>
<method name="kill">
@@ -22708,7 +22761,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="0" name="pid" type="int">
</argument>
<description>
- Kill a process ID (this method can be used to kill processes that were not spawned by the game).
+ Kill a process ID (this method can be used to kill processes that were not spawned by the game).
</description>
</method>
<method name="native_video_is_playing">
@@ -22775,7 +22828,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="0" name="clipboard" type="String">
</argument>
<description>
- Set clipboard to the OS.
+ Set clipboard to the OS.
</description>
</method>
<method name="set_current_screen">
@@ -22794,28 +22847,28 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="0" name="iterations_per_second" type="int">
</argument>
<description>
- Set the amount of fixed iterations per second (for fixed process and physics).
+ Set the amount of fixed iterations per second (for fixed process and physics).
</description>
</method>
<method name="set_keep_screen_on">
<argument index="0" name="enabled" type="bool">
</argument>
<description>
- Set keep screen on if true, or goes to sleep by device setting if false. (for Android/iOS)
+ Set keep screen on if true, or goes to sleep by device setting if false. (for Android/iOS)
</description>
</method>
<method name="set_low_processor_usage_mode">
<argument index="0" name="enable" type="bool">
</argument>
<description>
- Set to true to enable the low cpu usage mode. In this mode, the screen only redraws when there are changes, and a considerable sleep time is inserted between frames. This way, editors using the engine UI only use very little cpu.
+ Set to true to enable the low cpu usage mode. In this mode, the screen only redraws when there are changes, and a considerable sleep time is inserted between frames. This way, editors using the engine UI only use very little cpu.
</description>
</method>
<method name="set_screen_orientation">
<argument index="0" name="orientation" type="int">
</argument>
<description>
- Sets the current screen orientation, the argument value must be one of the SCREEN_ORIENTATION constants in this class.
+ Sets the current screen orientation, the argument value must be one of the SCREEN_ORIENTATION constants in this class.
</description>
</method>
<method name="set_target_fps">
@@ -22836,7 +22889,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="0" name="time_scale" type="float">
</argument>
<description>
- Speeds up or slows down the physics by changing the delta variable. (delta * time_scale)
+ Speeds up or slows down the physics by changing the delta variable. (delta * time_scale)
</description>
</method>
<method name="set_use_file_access_save_and_swap">
@@ -22861,56 +22914,56 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="3" name="screen" type="int" default="0">
</argument>
<description>
- Change the video mode.
+ Change the video mode.
</description>
</method>
<method name="set_window_fullscreen">
<argument index="0" name="enabled" type="bool">
</argument>
<description>
- Sets window fullscreen mode to the [i]enabled[/i] argument, [i]enabled[/i] is a toggle for the fullscreen mode, calling the function with [i]enabled[/i] true when the screen is not on fullscreen mode will cause the screen to go to fullscreen mode, calling the function with [i]enabled[/i] false when the screen is in fullscreen mode will cause the window to exit the fullscreen mode.
+ Sets window fullscreen mode to the [i]enabled[/i] argument, [i]enabled[/i] is a toggle for the fullscreen mode, calling the function with [i]enabled[/i] true when the screen is not on fullscreen mode will cause the screen to go to fullscreen mode, calling the function with [i]enabled[/i] false when the screen is in fullscreen mode will cause the window to exit the fullscreen mode.
</description>
</method>
<method name="set_window_maximized">
<argument index="0" name="enabled" type="bool">
</argument>
<description>
- Set the window size to maximized.
+ Set the window size to maximized.
</description>
</method>
<method name="set_window_minimized">
<argument index="0" name="enabled" type="bool">
</argument>
<description>
- Set whether the window is minimized.
+ Set whether the window is minimized.
</description>
</method>
<method name="set_window_position">
<argument index="0" name="position" type="Vector2">
</argument>
<description>
- Sets the position of the window to the specified position (this function could be restricted by the window manager, meaning that there could be some unreachable areas of the screen).
+ Sets the position of the window to the specified position (this function could be restricted by the window manager, meaning that there could be some unreachable areas of the screen).
</description>
</method>
<method name="set_window_resizable">
<argument index="0" name="enabled" type="bool">
</argument>
<description>
- Set the window resizable state, if the window is not resizable it will preserve the dimensions specified in the project settings.
+ Set the window resizable state, if the window is not resizable it will preserve the dimensions specified in the project settings.
</description>
</method>
<method name="set_window_size">
<argument index="0" name="size" type="Vector2">
</argument>
<description>
- Sets the window size to the specified size.
+ Sets the window size to the specified size.
</description>
</method>
<method name="set_window_title">
<argument index="0" name="title" type="String">
</argument>
<description>
- Sets the window title to the specified string.
+ Sets the window title to the specified string.
</description>
</method>
<method name="shell_open">
@@ -22995,14 +23048,14 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
</class>
<class name="Object" category="Core">
<brief_description>
- Base class for all non built-in types.
+ Base class for all non built-in types.
</brief_description>
<description>
- Base class for all non built-in types. Everything not a built-in type starts the inheritance chain from this class.
- Objects do not manage memory, if inheriting from one the object will most likely have to be deleted manually (call the [method free] function from the script or delete from C++).
- Some derivates add memory management, such as [Reference] (which keeps a reference count and deletes itself automatically when no longer referenced) and [Node], which deletes the children tree when deleted.
- Objects export properties, which are mainly useful for storage and editing, but not really so much in programming. Properties are exported in [method _get_property_list] and handled in [method _get] and [method _set]. However, scripting languages and C++ have simpler means to export them.
- Objects also receive notifications ([method _notification]). Notifications are a simple way to notify the object about simple events, so they can all be handled together.
+ Base class for all non built-in types. Everything not a built-in type starts the inheritance chain from this class.
+ Objects do not manage memory, if inheriting from one the object will most likely have to be deleted manually (call the [method free] function from the script or delete from C++).
+ Some derivates add memory management, such as [Reference] (which keeps a reference count and deletes itself automatically when no longer referenced) and [Node], which deletes the children tree when deleted.
+ Objects export properties, which are mainly useful for storage and editing, but not really so much in programming. Properties are exported in [method _get_property_list] and handled in [method _get] and [method _set]. However, scripting languages and C++ have simpler means to export them.
+ Objects also receive notifications ([method _notification]). Notifications are a simple way to notify the object about simple events, so they can all be handled together.
</description>
<methods>
<method name="XL_MESSAGE" qualifiers="const">
@@ -23011,21 +23064,21 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="0" name="message" type="String">
</argument>
<description>
- Deprecated, will go away.
+ Deprecated, will go away.
</description>
</method>
<method name="_get" qualifiers="virtual">
<argument index="0" name="property" type="String">
</argument>
<description>
- Return a property, return null if the property does not exist.
+ Return a property, return null if the property does not exist.
</description>
</method>
<method name="_get_property_list" qualifiers="virtual">
<return type="Array">
</return>
<description>
- Return the property list, array of dictionaries, dictionaries must contain: name:String, type:int (see TYPE_* enum in globals) and optionally: hint:int (see PROPERTY_HINT_* in globals), hint_string:String, usage:int (see PROPERTY_USAGE_* in globals).
+ Return the property list, array of dictionaries, dictionaries must contain: name:String, type:int (see TYPE_* enum in globals) and optionally: hint:int (see PROPERTY_HINT_* in globals), hint_string:String, usage:int (see PROPERTY_USAGE_* in globals).
</description>
</method>
<method name="_init" qualifiers="virtual">
@@ -23036,7 +23089,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="0" name="what" type="int">
</argument>
<description>
- Notification request, the notification id is received.
+ Notification request, the notification id is received.
</description>
</method>
<method name="_set" qualifiers="virtual">
@@ -23045,7 +23098,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="1" name="value" type="Variant">
</argument>
<description>
- Set a property. Return true if the property was found.
+ Set a property. Return true if the property was found.
</description>
</method>
<method name="add_user_signal">
@@ -23054,7 +23107,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="1" name="arguments" type="Array" default="Array()">
</argument>
<description>
- Add a user signal (can be added anytime). Arguments are optional, but can be added as an array of dictionaries, each containing "name" and "type" (from [@Global Scope] TYPE_*).
+ Add a user signal (can be added anytime). Arguments are optional, but can be added as an array of dictionaries, each containing "name" and "type" (from [@Global Scope] TYPE_*).
</description>
</method>
<method name="call">
@@ -23081,7 +23134,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="10" name="arg9" type="Variant" default="NULL">
</argument>
<description>
- Call a function in the object, result is returned.
+ Call a function in the object, result is returned.
</description>
</method>
<method name="call_deferred">
@@ -23098,7 +23151,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="5" name="arg4" type="Variant" default="NULL">
</argument>
<description>
- Create and store a function in the object. The call will take place on idle time.
+ Create and store a function in the object. The call will take place on idle time.
</description>
</method>
<method name="callv">
@@ -23115,7 +23168,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<return type="bool">
</return>
<description>
- Return true if this object can translate strings.
+ Return true if this object can translate strings.
</description>
</method>
<method name="connect">
@@ -23132,7 +23185,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="4" name="flags" type="int" default="0">
</argument>
<description>
- Connect a signal to a method at a target (member function). Binds are optional and are passed as extra arguments to the call. Flags specify optional deferred or one shot connections, see enum CONNECT_*. A signal can only be connected once to a method, and it will throw an error if already connected. If you want to avoid this, use [method is_connected] to check.
+ Connect a signal to a method at a target (member function). Binds are optional and are passed as extra arguments to the call. Flags specify optional deferred or one shot connections, see enum CONNECT_*. A signal can only be connected once to a method, and it will throw an error if already connected. If you want to avoid this, use [method is_connected] to check.
</description>
</method>
<method name="disconnect">
@@ -23143,7 +23196,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="2" name="method" type="String">
</argument>
<description>
- Disconnect a signal from a method.
+ Disconnect a signal from a method.
</description>
</method>
<method name="emit_signal">
@@ -23160,7 +23213,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="5" name="arg4" type="Variant" default="NULL">
</argument>
<description>
- Emit a signal. Arguments are passed in an array.
+ Emit a signal. Arguments are passed in an array.
</description>
</method>
<method name="free">
@@ -23171,28 +23224,28 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="0" name="property" type="String">
</argument>
<description>
- Get a property from the object.
+ Get a property from the object.
</description>
</method>
<method name="get_instance_ID" qualifiers="const">
<return type="int">
</return>
<description>
- Return the instance ID. All objects have a unique instance ID.
+ Return the instance ID. All objects have a unique instance ID.
</description>
</method>
<method name="get_meta" qualifiers="const">
<argument index="0" name="name" type="String">
</argument>
<description>
- Return a metadata from the object.
+ Return a metadata from the object.
</description>
</method>
<method name="get_meta_list" qualifiers="const">
<return type="StringArray">
</return>
<description>
- Return the list of metadata in the object.
+ Return the list of metadata in the object.
</description>
</method>
<method name="get_method_list" qualifiers="const">
@@ -23205,14 +23258,14 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<return type="Array">
</return>
<description>
- Return the list of properties as an array of dictionaries, dictionaries contain: name:String, type:int (see TYPE_* enum in globals) and optionally: hint:int (see PROPERTY_HINT_* in globals), hint_string:String, usage:int (see PROPERTY_USAGE_* in globals).
+ Return the list of properties as an array of dictionaries, dictionaries contain: name:String, type:int (see TYPE_* enum in globals) and optionally: hint:int (see PROPERTY_HINT_* in globals), hint_string:String, usage:int (see PROPERTY_USAGE_* in globals).
</description>
</method>
<method name="get_script" qualifiers="const">
<return type="Script">
</return>
<description>
- Return the object script (or null if it doesn't have one).
+ Return the object script (or null if it doesn't have one).
</description>
</method>
<method name="get_signal_connection_list" qualifiers="const">
@@ -23227,14 +23280,14 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<return type="Array">
</return>
<description>
- Return the list of signals as an array of dictionaries.
+ Return the list of signals as an array of dictionaries.
</description>
</method>
<method name="get_type" qualifiers="const">
<return type="String">
</return>
<description>
- Return the type of the object as a string.
+ Return the type of the object as a string.
</description>
</method>
<method name="has_meta" qualifiers="const">
@@ -23243,7 +23296,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="0" name="name" type="String">
</argument>
<description>
- Return true if a metadata is found with the requested name.
+ Return true if a metadata is found with the requested name.
</description>
</method>
<method name="has_method" qualifiers="const">
@@ -23266,7 +23319,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<return type="bool">
</return>
<description>
- Return true if signal emission blocking is enabled.
+ Return true if signal emission blocking is enabled.
</description>
</method>
<method name="is_connected" qualifiers="const">
@@ -23279,7 +23332,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="2" name="method" type="String">
</argument>
<description>
- Return true if a connection exists for a given signal and target/method.
+ Return true if a connection exists for a given signal and target/method.
</description>
</method>
<method name="is_queued_for_deletion" qualifiers="const">
@@ -23294,7 +23347,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="0" name="type" type="String">
</argument>
<description>
- Check the type of the object against a string (including inheritance).
+ Check the type of the object against a string (including inheritance).
</description>
</method>
<method name="notification">
@@ -23303,7 +23356,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="1" name="reversed" type="bool" default="false">
</argument>
<description>
- Notify the object of something.
+ Notify the object of something.
</description>
</method>
<method name="property_list_changed_notify">
@@ -23316,21 +23369,21 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="1" name="value" type="Variant">
</argument>
<description>
- Set property into the object.
+ Set property into the object.
</description>
</method>
<method name="set_block_signals">
<argument index="0" name="enable" type="bool">
</argument>
<description>
- If set to true, signal emission is blocked.
+ If set to true, signal emission is blocked.
</description>
</method>
<method name="set_message_translation">
<argument index="0" name="enable" type="bool">
</argument>
<description>
- Set true if this object can translate strings (in calls to tr() ). Default is true.
+ Set true if this object can translate strings (in calls to tr() ). Default is true.
</description>
</method>
<method name="set_meta">
@@ -23339,14 +23392,14 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="1" name="value" type="Variant">
</argument>
<description>
- Set a metadata into the object. Metadata is serialized. Metadata can be [i]anything[/i].
+ Set a metadata into the object. Metadata is serialized. Metadata can be [i]anything[/i].
</description>
</method>
<method name="set_script">
<argument index="0" name="script" type="Script">
</argument>
<description>
- Set a script into the object, scripts extend the object functionality.
+ Set a script into the object, scripts extend the object functionality.
</description>
</method>
<method name="tr" qualifiers="const">
@@ -23355,7 +23408,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="0" name="message" type="String">
</argument>
<description>
- Translate a message. Only works in message translation is enabled (which is by default). See [method set_message_translation].
+ Translate a message. Only works in message translation is enabled (which is by default). See [method set_message_translation].
</description>
</method>
</methods>
@@ -23437,10 +23490,10 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
</class>
<class name="OmniLight" inherits="Light" category="Core">
<brief_description>
- OmniDirectional Light, such as a light bulb or a candle.
+ OmniDirectional Light, such as a light bulb or a candle.
</brief_description>
<description>
- An OmniDirectional light is a type of [Light] node that emits lights in all directions. The light is attenuated through the distance and this attenuation can be configured by changing the energy, radius and attenuation parameters of [Light]. TODO: Image of an omnilight.
+ An OmniDirectional light is a type of [Light] node that emits lights in all directions. The light is attenuated through the distance and this attenuation can be configured by changing the energy, radius and attenuation parameters of [Light]. TODO: Image of an omnilight.
</description>
<methods>
</methods>
@@ -23449,10 +23502,10 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
</class>
<class name="OptionButton" inherits="Button" category="Core">
<brief_description>
- Button control that provides selectable options when pressed.
+ Button control that provides selectable options when pressed.
</brief_description>
<description>
- OptionButton is a type button that provides a selectable list of items when pressed. The item selected becomes the "current" item and is displayed as the button text.
+ OptionButton is a type button that provides a selectable list of items when pressed. The item selected becomes the "current" item and is displayed as the button text.
</description>
<methods>
<method name="add_icon_item">
@@ -23463,7 +23516,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="2" name="id" type="int">
</argument>
<description>
- Add an item, with a "texture" icon, text "label" and (optionally) id. If no "id" is passed, "id" becomes the item index. New items are appended at the end.
+ Add an item, with a "texture" icon, text "label" and (optionally) id. If no "id" is passed, "id" becomes the item index. New items are appended at the end.
</description>
</method>
<method name="add_item">
@@ -23472,17 +23525,17 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="1" name="id" type="int" default="-1">
</argument>
<description>
- Add an item, with text "label" and (optionally) id. If no "id" is passed, "id" becomes the item index. New items are appended at the end.
+ Add an item, with text "label" and (optionally) id. If no "id" is passed, "id" becomes the item index. New items are appended at the end.
</description>
</method>
<method name="add_separator">
<description>
- Add a separator to the list of items. Separators help to group items. Separator also takes up an index and is appended at the end.
+ Add a separator to the list of items. Separators help to group items. Separator also takes up an index and is appended at the end.
</description>
</method>
<method name="clear">
<description>
- Clear all the items in the [OptionButton].
+ Clear all the items in the [OptionButton].
</description>
</method>
<method name="get_item_ID" qualifiers="const">
@@ -23491,14 +23544,14 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="0" name="idx" type="int">
</argument>
<description>
- Return the ID of the item at index "idx".
+ Return the ID of the item at index "idx".
</description>
</method>
<method name="get_item_count" qualifiers="const">
<return type="int">
</return>
<description>
- Return the amount of items in the OptionButton.
+ Return the amount of items in the OptionButton.
</description>
</method>
<method name="get_item_icon" qualifiers="const">
@@ -23507,7 +23560,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="0" name="idx" type="int">
</argument>
<description>
- Return the icon of the item at index "idx".
+ Return the icon of the item at index "idx".
</description>
</method>
<method name="get_item_metadata" qualifiers="const">
@@ -23522,14 +23575,14 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="0" name="idx" type="int">
</argument>
<description>
- Return the text of the item at index "idx".
+ Return the text of the item at index "idx".
</description>
</method>
<method name="get_selected" qualifiers="const">
<return type="int">
</return>
<description>
- Return the current item index
+ Return the current item index
</description>
</method>
<method name="get_selected_ID" qualifiers="const">
@@ -23560,7 +23613,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="0" name="idx" type="int">
</argument>
<description>
- Select an item by index and make it the current item.
+ Select an item by index and make it the current item.
</description>
</method>
<method name="set_item_ID">
@@ -23569,7 +23622,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="1" name="id" type="int">
</argument>
<description>
- Set the ID of an item at index "idx".
+ Set the ID of an item at index "idx".
</description>
</method>
<method name="set_item_disabled">
@@ -23586,7 +23639,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="1" name="texture" type="Texture">
</argument>
<description>
- Set the icon of an item at index "idx".
+ Set the icon of an item at index "idx".
</description>
</method>
<method name="set_item_metadata">
@@ -23603,7 +23656,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="1" name="text" type="String">
</argument>
<description>
- Set the text of an item at index "idx".
+ Set the text of an item at index "idx".
</description>
</method>
</methods>
@@ -23612,7 +23665,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="0" name="ID" type="int">
</argument>
<description>
- This signal is emitted when the current item was changed by the user. ID of the item selected is passed as argument (if no IDs were added, ID will be just the item index).
+ This signal is emitted when the current item was changed by the user. ID of the item selected is passed as argument (if no IDs were added, ID will be just the item index).
</description>
</signal>
</signals>
@@ -23687,10 +23740,10 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
</class>
<class name="PHashTranslation" inherits="Translation" category="Core">
<brief_description>
- Optimized translation.
+ Optimized translation.
</brief_description>
<description>
- Optimized translation. Uses real-time compressed translations, which results in very small dictionaries.
+ Optimized translation. Uses real-time compressed translations, which results in very small dictionaries.
</description>
<methods>
<method name="generate">
@@ -23747,7 +23800,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<brief_description>
</brief_description>
<description>
- TODO: explain ownership, and that node does not need to own itself
+ TODO: explain ownership, and that node does not need to own itself
</description>
<methods>
<method name="can_instance" qualifiers="const">
@@ -23776,7 +23829,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="0" name="path" type="Node">
</argument>
<description>
- Pack will ignore any sub-nodes not owned by given node. See [method Node.set_owner].
+ Pack will ignore any sub-nodes not owned by given node. See [method Node.set_owner].
</description>
</method>
</methods>
@@ -23785,38 +23838,38 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
</class>
<class name="PacketPeer" inherits="Reference" category="Core">
<brief_description>
- Abstraction and base class for packet-based protocols.
+ Abstraction and base class for packet-based protocols.
</brief_description>
<description>
- PacketPeer is an abstraction and base class for packet-based protocols (such as UDP). It provides an API for sending and receiving packets both as raw data or variables. This makes it easy to transfer data over a protocol, without having to encode data as low level bytes or having to worry about network ordering.
+ PacketPeer is an abstraction and base class for packet-based protocols (such as UDP). It provides an API for sending and receiving packets both as raw data or variables. This makes it easy to transfer data over a protocol, without having to encode data as low level bytes or having to worry about network ordering.
</description>
<methods>
<method name="get_available_packet_count" qualifiers="const">
<return type="int">
</return>
<description>
- Return the number of packets currently available in the ring-buffer.
+ Return the number of packets currently available in the ring-buffer.
</description>
</method>
<method name="get_packet" qualifiers="const">
<return type="RawArray">
</return>
<description>
- Get a raw packet.
+ Get a raw packet.
</description>
</method>
<method name="get_packet_error" qualifiers="const">
<return type="Error">
</return>
<description>
- Return the error state of the last packet received (via [method get_packet] and [method get_var]).
+ Return the error state of the last packet received (via [method get_packet] and [method get_var]).
</description>
</method>
<method name="get_var" qualifiers="const">
<return type="Variant">
</return>
<description>
- Get a Variant.
+ Get a Variant.
</description>
</method>
<method name="put_packet">
@@ -23825,7 +23878,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="0" name="buffer" type="RawArray">
</argument>
<description>
- Send a raw packet.
+ Send a raw packet.
</description>
</method>
<method name="put_var">
@@ -23834,7 +23887,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="0" name="var" type="Variant">
</argument>
<description>
- Send a Variant as a packet.
+ Send a Variant as a packet.
</description>
</method>
</methods>
@@ -23843,17 +23896,17 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
</class>
<class name="PacketPeerStream" inherits="PacketPeer" category="Core">
<brief_description>
- Wrapper to use a PacketPeer over a StreamPeer.
+ Wrapper to use a PacketPeer over a StreamPeer.
</brief_description>
<description>
- PacketStreamPeer provides a wrapper for working using packets over a stream. This allows for using packet based code with StreamPeers. PacketPeerStream implements a custom protocol over the StreamPeer, so the user should not read or write to the wrapped StreamPeer directly.
+ PacketStreamPeer provides a wrapper for working using packets over a stream. This allows for using packet based code with StreamPeers. PacketPeerStream implements a custom protocol over the StreamPeer, so the user should not read or write to the wrapped StreamPeer directly.
</description>
<methods>
<method name="set_stream_peer">
<argument index="0" name="peer" type="StreamPeer">
</argument>
<description>
- Set the StreamPeer object to be wrapped
+ Set the StreamPeer object to be wrapped
</description>
</method>
</methods>
@@ -23862,43 +23915,43 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
</class>
<class name="PacketPeerUDP" inherits="PacketPeer" category="Core">
<brief_description>
- UDP packet peer.
+ UDP packet peer.
</brief_description>
<description>
- UDP packet peer. Can be used to send raw UDP packets as well as [Variant]s.
+ UDP packet peer. Can be used to send raw UDP packets as well as [Variant]s.
</description>
<methods>
<method name="close">
<description>
- Close the UDP socket the [PacketPeerUDP] is currently listening on.
+ Close the UDP socket the [PacketPeerUDP] is currently listening on.
</description>
</method>
<method name="get_packet_address" qualifiers="const">
<return type="int">
</return>
<description>
- Return the address of the remote peer(as a 32bit integer) that sent the last packet(that was received with [method get_packet] or [method get_var]).
+ Return the address of the remote peer(as a 32bit integer) that sent the last packet(that was received with [method get_packet] or [method get_var]).
</description>
</method>
<method name="get_packet_ip" qualifiers="const">
<return type="String">
</return>
<description>
- Return the IP of the remote peer that sent the last packet(that was received with [method get_packet] or [method get_var]).
+ Return the IP of the remote peer that sent the last packet(that was received with [method get_packet] or [method get_var]).
</description>
</method>
<method name="get_packet_port" qualifiers="const">
<return type="int">
</return>
<description>
- Return the port of the remote peer that sent the last packet(that was received with [method get_packet] or [method get_var]).
+ Return the port of the remote peer that sent the last packet(that was received with [method get_packet] or [method get_var]).
</description>
</method>
<method name="is_listening" qualifiers="const">
<return type="bool">
</return>
<description>
- Return whether this [PacketPeerUDP] is listening.
+ Return whether this [PacketPeerUDP] is listening.
</description>
</method>
<method name="listen">
@@ -23909,7 +23962,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="1" name="recv_buf_size" type="int" default="65536">
</argument>
<description>
- Make this [PacketPeerUDP] listen on the "port" using a buffer size "recv_buf_size". Listens on all available adresses.
+ Make this [PacketPeerUDP] listen on the "port" using a buffer size "recv_buf_size". Listens on all available adresses.
</description>
</method>
<method name="set_send_address">
@@ -23920,14 +23973,14 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="1" name="port" type="int">
</argument>
<description>
- Set the destination address and port for sending packets and variables, a hostname will be resolved if valid.
+ Set the destination address and port for sending packets and variables, a hostname will be resolved if valid.
</description>
</method>
<method name="wait">
<return type="Error">
</return>
<description>
- Wait for a packet to arrive on the listening port, see [method listen].
+ Wait for a packet to arrive on the listening port, see [method listen].
</description>
</method>
</methods>
@@ -23936,10 +23989,10 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
</class>
<class name="Panel" inherits="Control" category="Core">
<brief_description>
- Provides an opaque background for [Control] children.
+ Provides an opaque background for [Control] children.
</brief_description>
<description>
- Panel is a [Control] that displays an opaque background. It's commonly used as a parent and container for other types of [Control] nodes.
+ Panel is a [Control] that displays an opaque background. It's commonly used as a parent and container for other types of [Control] nodes.
</description>
<methods>
</methods>
@@ -23956,10 +24009,10 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
</class>
<class name="PanelContainer" inherits="Container" category="Core">
<brief_description>
- Panel container type.
+ Panel container type.
</brief_description>
<description>
- Panel container type. This container fits controls inside of the delimited area of a stylebox. It's useful for giving controls an outline.
+ Panel container type. This container fits controls inside of the delimited area of a stylebox. It's useful for giving controls an outline.
</description>
<methods>
</methods>
@@ -23972,38 +24025,38 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
</class>
<class name="ParallaxBackground" inherits="CanvasLayer" category="Core">
<brief_description>
- A node used to create a parallax scrolling background.
+ A node used to create a parallax scrolling background.
</brief_description>
<description>
- A ParallaxBackground will use one or more [ParallaxLayer] nodes to create a parallax scrolling background. Each [ParallaxLayer] can be set to move at different speeds relative to the camera movement, this can be used to create an illusion of depth in a 2D game.
+ A ParallaxBackground will use one or more [ParallaxLayer] nodes to create a parallax scrolling background. Each [ParallaxLayer] can be set to move at different speeds relative to the camera movement, this can be used to create an illusion of depth in a 2D game.
</description>
<methods>
<method name="get_limit_begin" qualifiers="const">
<return type="Vector2">
</return>
<description>
- Return the beginning limit.
+ Return the beginning limit.
</description>
</method>
<method name="get_limit_end" qualifiers="const">
<return type="Vector2">
</return>
<description>
- Return the ending limit.
+ Return the ending limit.
</description>
</method>
<method name="get_scroll_base_offset" qualifiers="const">
<return type="Vector2">
</return>
<description>
- Return the base offset.
+ Return the base offset.
</description>
</method>
<method name="get_scroll_base_scale" qualifiers="const">
<return type="Vector2">
</return>
<description>
- Return the base motion scale.
+ Return the base motion scale.
</description>
</method>
<method name="get_scroll_offset" qualifiers="const">
@@ -24016,42 +24069,42 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<return type="bool">
</return>
<description>
- Return ignoring camera zoom.
+ Return ignoring camera zoom.
</description>
</method>
<method name="set_ignore_camera_zoom">
<argument index="0" name="ignore" type="bool">
</argument>
<description>
- Set to true for all child [ParallaxLayer] nodes to not be affected by the zoom level of the camera.
+ Set to true for all child [ParallaxLayer] nodes to not be affected by the zoom level of the camera.
</description>
</method>
<method name="set_limit_begin">
<argument index="0" name="ofs" type="Vector2">
</argument>
<description>
- Set the left and top limits in pixels for scrolling to begin. If the camera is outside of this limit the background will not continue to scroll. If an axis is greater than or equal to the corresponding axis of limit_end, then it will not limit scrolling for that axis.
+ Set the left and top limits in pixels for scrolling to begin. If the camera is outside of this limit the background will not continue to scroll. If an axis is greater than or equal to the corresponding axis of limit_end, then it will not limit scrolling for that axis.
</description>
</method>
<method name="set_limit_end">
<argument index="0" name="ofs" type="Vector2">
</argument>
<description>
- Set the right and bottom limits in pixels for scrolling to end. If the camera is outside of this limit the background will not continue to scroll. If an axis is less than or equal to the corresponding axis of limit_begin, then it will not limit scrolling for that axis.
+ Set the right and bottom limits in pixels for scrolling to end. If the camera is outside of this limit the background will not continue to scroll. If an axis is less than or equal to the corresponding axis of limit_begin, then it will not limit scrolling for that axis.
</description>
</method>
<method name="set_scroll_base_offset">
<argument index="0" name="ofs" type="Vector2">
</argument>
<description>
- Set the base offset in pixels of all children [ParallaxLayer] nodes.
+ Set the base offset in pixels of all children [ParallaxLayer] nodes.
</description>
</method>
<method name="set_scroll_base_scale">
<argument index="0" name="scale" type="Vector2">
</argument>
<description>
- Set the base motion scale of all children [ParallaxLayer] nodes.
+ Set the base motion scale of all children [ParallaxLayer] nodes.
</description>
</method>
<method name="set_scroll_offset">
@@ -24066,17 +24119,17 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
</class>
<class name="ParallaxLayer" inherits="Node2D" category="Core">
<brief_description>
- A parallax scrolling layer to be used with [ParallaxBackground].
+ A parallax scrolling layer to be used with [ParallaxBackground].
</brief_description>
<description>
- A ParallaxLayer must be the child of a [ParallaxBackground] node. All child nodes will be affected by the parallax scrolling of this layer.
+ A ParallaxLayer must be the child of a [ParallaxBackground] node. All child nodes will be affected by the parallax scrolling of this layer.
</description>
<methods>
<method name="get_mirroring" qualifiers="const">
<return type="Vector2">
</return>
<description>
- Return the mirroring of the ParallaxLayer.
+ Return the mirroring of the ParallaxLayer.
</description>
</method>
<method name="get_motion_offset" qualifiers="const">
@@ -24089,14 +24142,14 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<return type="Vector2">
</return>
<description>
- Return the motion scale of the ParallaxLayer.
+ Return the motion scale of the ParallaxLayer.
</description>
</method>
<method name="set_mirroring">
<argument index="0" name="mirror" type="Vector2">
</argument>
<description>
- Set the mirroring of the ParallaxLayer. If an axis is set to 0 then that axis will have no mirroring.
+ Set the mirroring of the ParallaxLayer. If an axis is set to 0 then that axis will have no mirroring.
</description>
</method>
<method name="set_motion_offset">
@@ -24109,7 +24162,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="0" name="scale" type="Vector2">
</argument>
<description>
- Set the motion scale of the ParallaxLayer. If an axis is set to 0 then it will not move at all, it will stick with the camera.
+ Set the motion scale of the ParallaxLayer. If an axis is set to 0 then it will not move at all, it will stick with the camera.
</description>
</method>
</methods>
@@ -24200,17 +24253,17 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
</class>
<class name="Particles" inherits="GeometryInstance" category="Core">
<brief_description>
- Particle system 3D Node
+ Particle system 3D Node
</brief_description>
<description>
- Particles is a particle system 3D [Node] that is used to simulate several types of particle effects, such as explosions, rain, snow, fireflies, or other magical-like shinny sparkles. Particles are drawn using impostors, and given their dynamic behavior, the user must provide a visibility AABB (although helpers to create one automatically exist).
+ Particles is a particle system 3D [Node] that is used to simulate several types of particle effects, such as explosions, rain, snow, fireflies, or other magical-like shinny sparkles. Particles are drawn using impostors, and given their dynamic behavior, the user must provide a visibility AABB (although helpers to create one automatically exist).
</description>
<methods>
<method name="get_amount" qualifiers="const">
<return type="int">
</return>
<description>
- Return the total amount of particles in the system.
+ Return the total amount of particles in the system.
</description>
</method>
<method name="get_color_phase_color" qualifiers="const">
@@ -24219,7 +24272,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="0" name="phase" type="int">
</argument>
<description>
- Return the color of a color phase.
+ Return the color of a color phase.
</description>
</method>
<method name="get_color_phase_pos" qualifiers="const">
@@ -24228,7 +24281,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="0" name="phase" type="int">
</argument>
<description>
- Return the position of a color phase (0 to 1).
+ Return the position of a color phase (0 to 1).
</description>
</method>
<method name="get_color_phases" qualifiers="const">
@@ -24247,7 +24300,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<return type="Vector3">
</return>
<description>
- Return the half extents for the emission box.
+ Return the half extents for the emission box.
</description>
</method>
<method name="get_emission_points" qualifiers="const">
@@ -24266,14 +24319,14 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<return type="Vector3">
</return>
<description>
- Return the normal vector towards where gravity is pulling (by default, negative Y).
+ Return the normal vector towards where gravity is pulling (by default, negative Y).
</description>
</method>
<method name="get_material" qualifiers="const">
<return type="Material">
</return>
<description>
- Return the material used to draw particles.
+ Return the material used to draw particles.
</description>
</method>
<method name="get_randomness" qualifiers="const">
@@ -24282,7 +24335,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="0" name="variable" type="int">
</argument>
<description>
- Return the randomness for a specific variable of the particle system. Randomness produces small changes from the default each time a particle is emitted.
+ Return the randomness for a specific variable of the particle system. Randomness produces small changes from the default each time a particle is emitted.
</description>
</method>
<method name="get_variable" qualifiers="const">
@@ -24291,14 +24344,14 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="0" name="variable" type="int">
</argument>
<description>
- Return a specific variable for the particle system (see VAR_* enum).
+ Return a specific variable for the particle system (see VAR_* enum).
</description>
</method>
<method name="get_visibility_aabb" qualifiers="const">
<return type="AABB">
</return>
<description>
- Return the current visibility AABB.
+ Return the current visibility AABB.
</description>
</method>
<method name="has_height_from_velocity" qualifiers="const">
@@ -24311,7 +24364,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<return type="bool">
</return>
<description>
- Return the "emitting" property state (see [method set_emitting]).
+ Return the "emitting" property state (see [method set_emitting]).
</description>
</method>
<method name="is_using_local_coordinates" qualifiers="const">
@@ -24324,7 +24377,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="0" name="amount" type="int">
</argument>
<description>
- Set total amount of particles in the system.
+ Set total amount of particles in the system.
</description>
</method>
<method name="set_color_phase_color">
@@ -24333,7 +24386,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="1" name="color" type="Color">
</argument>
<description>
- Set the color of a color phase.
+ Set the color of a color phase.
</description>
</method>
<method name="set_color_phase_pos">
@@ -24342,7 +24395,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="1" name="pos" type="float">
</argument>
<description>
- Set the position of a color phase (0 to 1).
+ Set the position of a color phase (0 to 1).
</description>
</method>
<method name="set_color_phases">
@@ -24361,7 +24414,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="0" name="half_extents" type="Vector3">
</argument>
<description>
- Set the half extents for the emission box.
+ Set the half extents for the emission box.
</description>
</method>
<method name="set_emission_points">
@@ -24380,14 +24433,14 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="0" name="enabled" type="bool">
</argument>
<description>
- Set the "emitting" property state. When emitting, the particle system generates new particles at constant rate.
+ Set the "emitting" property state. When emitting, the particle system generates new particles at constant rate.
</description>
</method>
<method name="set_gravity_normal">
<argument index="0" name="normal" type="Vector3">
</argument>
<description>
- Set the normal vector towards where gravity is pulling (by default, negative Y).
+ Set the normal vector towards where gravity is pulling (by default, negative Y).
</description>
</method>
<method name="set_height_from_velocity">
@@ -24400,7 +24453,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="0" name="material" type="Material">
</argument>
<description>
- Set the material used to draw particles.
+ Set the material used to draw particles.
</description>
</method>
<method name="set_randomness">
@@ -24409,7 +24462,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="1" name="randomness" type="float">
</argument>
<description>
- Set the randomness for a specific variable of the particle system. Randomness produces small changes from the default each time a particle is emitted.
+ Set the randomness for a specific variable of the particle system. Randomness produces small changes from the default each time a particle is emitted.
</description>
</method>
<method name="set_use_local_coordinates">
@@ -24424,14 +24477,14 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="1" name="value" type="float">
</argument>
<description>
- Set a specific variable for the particle system (see VAR_* enum).
+ Set a specific variable for the particle system (see VAR_* enum).
</description>
</method>
<method name="set_visibility_aabb">
<argument index="0" name="aabb" type="AABB">
</argument>
<description>
- Set the visibility AABB for the particle system, since the default one will not work properly most of the time.
+ Set the visibility AABB for the particle system, since the default one will not work properly most of the time.
</description>
</method>
</methods>
@@ -24468,24 +24521,24 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
</class>
<class name="Particles2D" inherits="Node2D" category="Core">
<brief_description>
- 2D Particle emitter
+ 2D Particle emitter
</brief_description>
<description>
- Particles2D is a particle system 2D [Node] that is used to simulate several types of particle effects, such as explosions, rain, snow, fireflies, or other magical-like shinny sparkles. Particles are drawn using impostors, and given their dynamic behavior, the user must provide a visibility AABB (although helpers to create one automatically exist).
+ Particles2D is a particle system 2D [Node] that is used to simulate several types of particle effects, such as explosions, rain, snow, fireflies, or other magical-like shinny sparkles. Particles are drawn using impostors, and given their dynamic behavior, the user must provide a visibility AABB (although helpers to create one automatically exist).
</description>
<methods>
<method name="get_amount" qualifiers="const">
<return type="int">
</return>
<description>
- Returns the amount of particles spawned at each emission
+ Returns the amount of particles spawned at each emission
</description>
</method>
<method name="get_color" qualifiers="const">
<return type="Color">
</return>
<description>
- Returns the tint color for each particle.
+ Returns the tint color for each particle.
</description>
</method>
<method name="get_color_phase_color" qualifiers="const">
@@ -24514,14 +24567,14 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<return type="ColorRamp">
</return>
<description>
- Returns the [ColorRamp] used to tint each particle
+ Returns the [ColorRamp] used to tint each particle
</description>
</method>
<method name="get_emission_half_extents" qualifiers="const">
<return type="Vector2">
</return>
<description>
- Returns the half extents of the emission box.
+ Returns the half extents of the emission box.
</description>
</method>
<method name="get_emission_points" qualifiers="const">
@@ -24534,14 +24587,14 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<return type="Vector2">
</return>
<description>
- Returns the particle spawn origin position relative to the emitter.
+ Returns the particle spawn origin position relative to the emitter.
</description>
</method>
<method name="get_emit_timeout" qualifiers="const">
<return type="float">
</return>
<description>
- Returns the amount of seconds during which the emitter will spawn particles
+ Returns the amount of seconds during which the emitter will spawn particles
</description>
</method>
<method name="get_explosiveness" qualifiers="const">
@@ -24566,7 +24619,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<return type="float">
</return>
<description>
- Gets the amount of seconds that each particle will be visible.
+ Gets the amount of seconds that each particle will be visible.
</description>
</method>
<method name="get_param" qualifiers="const">
@@ -24575,7 +24628,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="0" name="param" type="int">
</argument>
<description>
- Returns the value of the specified emitter parameter
+ Returns the value of the specified emitter parameter
</description>
</method>
<method name="get_pre_process_time" qualifiers="const">
@@ -24590,21 +24643,21 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="0" name="param" type="int">
</argument>
<description>
- Returns the randomness value of the specified emitter parameter
+ Returns the randomness value of the specified emitter parameter
</description>
</method>
<method name="get_texture" qualifiers="const">
<return type="Texture">
</return>
<description>
- Returns the texture for emitted particles
+ Returns the texture for emitted particles
</description>
</method>
<method name="get_time_scale" qualifiers="const">
<return type="float">
</return>
<description>
- Returns the emitter time scale
+ Returns the emitter time scale
</description>
</method>
<method name="get_v_frames" qualifiers="const">
@@ -24617,7 +24670,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<return type="bool">
</return>
<description>
- Returns whether this emitter is currently emitting or not
+ Returns whether this emitter is currently emitting or not
</description>
</method>
<method name="is_flipped_h" qualifiers="const">
@@ -24652,14 +24705,14 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="0" name="amount" type="int">
</argument>
<description>
- Sets the amount of particles spawned at each emission
+ Sets the amount of particles spawned at each emission
</description>
</method>
<method name="set_color">
<argument index="0" name="color" type="Color">
</argument>
<description>
- Set the tint color for each particle.
+ Set the tint color for each particle.
</description>
</method>
<method name="set_color_phase_color">
@@ -24690,14 +24743,14 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="0" name="color_ramp" type="Object">
</argument>
<description>
- Sets the [ColorRamp] used to tint each particle. Particle will be tinted according to their lifetimes.
+ Sets the [ColorRamp] used to tint each particle. Particle will be tinted according to their lifetimes.
</description>
</method>
<method name="set_emission_half_extents">
<argument index="0" name="extents" type="Vector2">
</argument>
<description>
- Sets the half extents of the emission box, particles will be spawned at random inside this box.
+ Sets the half extents of the emission box, particles will be spawned at random inside this box.
</description>
</method>
<method name="set_emission_points">
@@ -24710,21 +24763,21 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="0" name="offset" type="Vector2">
</argument>
<description>
- Sets the particle spawn origin position relative to the emitter center. for example if this value is set to (50, 50), the particle will spawn 50 units to the right and 50 units to the bottom of the emitter center.
+ Sets the particle spawn origin position relative to the emitter center. for example if this value is set to (50, 50), the particle will spawn 50 units to the right and 50 units to the bottom of the emitter center.
</description>
</method>
<method name="set_emit_timeout">
<argument index="0" name="value" type="float">
</argument>
<description>
- Sets the amount of seconds during which the emitter will spawn particles, after the specified seconds the emitter state will be set to non emitting, so calling [method is_emitting] will return false. If the timeout is 0 the emitter will spawn forever.
+ Sets the amount of seconds during which the emitter will spawn particles, after the specified seconds the emitter state will be set to non emitting, so calling [method is_emitting] will return false. If the timeout is 0 the emitter will spawn forever.
</description>
</method>
<method name="set_emitting">
<argument index="0" name="active" type="bool">
</argument>
<description>
- If this is set to true then the particle emitter will emit particles, if its false it will not.
+ If this is set to true then the particle emitter will emit particles, if its false it will not.
</description>
</method>
<method name="set_explosiveness">
@@ -24761,7 +24814,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="0" name="lifetime" type="float">
</argument>
<description>
- Sets the amount of seconds that each particle will be visible.
+ Sets the amount of seconds that each particle will be visible.
</description>
</method>
<method name="set_param">
@@ -24770,7 +24823,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="1" name="value" type="float">
</argument>
<description>
- Sets the value of the specified emitter parameter (see the constants secction for the list of parameters)
+ Sets the value of the specified emitter parameter (see the constants secction for the list of parameters)
</description>
</method>
<method name="set_pre_process_time">
@@ -24785,7 +24838,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="1" name="value" type="float">
</argument>
<description>
- Sets the randomness value of the specified emitter parameter (see the constants secction for the list of parameters), 0 means no randomness, so every particle will have the parameters specified, 1 means that the parameter will be choosen at random, the closer the randomness value gets to 0 the more conservative the variation of the parameter will be.
+ Sets the randomness value of the specified emitter parameter (see the constants secction for the list of parameters), 0 means no randomness, so every particle will have the parameters specified, 1 means that the parameter will be choosen at random, the closer the randomness value gets to 0 the more conservative the variation of the parameter will be.
</description>
</method>
<method name="set_texture">
@@ -24794,14 +24847,14 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="0" name="texture" type="Object">
</argument>
<description>
- Sets the texture for each particle
+ Sets the texture for each particle
</description>
</method>
<method name="set_time_scale">
<argument index="0" name="time_scale" type="float">
</argument>
<description>
- Sets the increment or decrement for the particle lifetime. for example: if the time scale is set to 2, the particles will die and move twice as fast.
+ Sets the increment or decrement for the particle lifetime. for example: if the time scale is set to 2, the particles will die and move twice as fast.
</description>
</method>
<method name="set_use_local_space">
@@ -24948,24 +25001,24 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
</class>
<class name="Path" inherits="Spatial" category="Core">
<brief_description>
- Container for a [Curve3D].
+ Container for a [Curve3D].
</brief_description>
<description>
- This class is a container/Node-ification of a [Curve3D], so it can have [Spatial] properties and [Node] info.
+ This class is a container/Node-ification of a [Curve3D], so it can have [Spatial] properties and [Node] info.
</description>
<methods>
<method name="get_curve" qualifiers="const">
<return type="Curve3D">
</return>
<description>
- Returns the [Curve3D] contained.
+ Returns the [Curve3D] contained.
</description>
</method>
<method name="set_curve">
<argument index="0" name="curve" type="Curve3D">
</argument>
<description>
- Sets the [Curve3D].
+ Sets the [Curve3D].
</description>
</method>
</methods>
@@ -24974,24 +25027,24 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
</class>
<class name="Path2D" inherits="Node2D" category="Core">
<brief_description>
- Container for a [Curve2D].
+ Container for a [Curve2D].
</brief_description>
<description>
- This class is a container/Node-ification of a [Curve2D], so it can have [Node2D] properties and [Node] info.
+ This class is a container/Node-ification of a [Curve2D], so it can have [Node2D] properties and [Node] info.
</description>
<methods>
<method name="get_curve" qualifiers="const">
<return type="Curve2D">
</return>
<description>
- Returns the [Curve2D] contained.
+ Returns the [Curve2D] contained.
</description>
</method>
<method name="set_curve">
<argument index="0" name="curve" type="Curve2D">
</argument>
<description>
- Sets the [Curve2D].
+ Sets the [Curve2D].
</description>
</method>
</methods>
@@ -25000,112 +25053,112 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
</class>
<class name="PathFollow" inherits="Spatial" category="Core">
<brief_description>
- Point sampler for a [Path].
+ Point sampler for a [Path].
</brief_description>
<description>
- This node takes its parent [Path], and returns the coordinates of a point within it, given a distance from the first vertex.
-It is useful for making other nodes follow a path, without coding the movement pattern. For that, the nodes must be descendants of this node. Then, when setting an offset in this node, the descendant nodes will move accordingly.
+ This node takes its parent [Path], and returns the coordinates of a point within it, given a distance from the first vertex.
+ It is useful for making other nodes follow a path, without coding the movement pattern. For that, the nodes must be descendants of this node. Then, when setting an offset in this node, the descendant nodes will move accordingly.
</description>
<methods>
<method name="get_cubic_interpolation" qualifiers="const">
<return type="bool">
</return>
<description>
- This method returns whether the position between two cached points (see [method set_cubic_interpolation]) is interpolated linearly, or cubicly.
+ This method returns whether the position between two cached points (see [method set_cubic_interpolation]) is interpolated linearly, or cubicly.
</description>
</method>
<method name="get_h_offset" qualifiers="const">
<return type="float">
</return>
<description>
- Returns the X displacement this node has from its parent [Path].
+ Returns the X displacement this node has from its parent [Path].
</description>
</method>
<method name="get_offset" qualifiers="const">
<return type="float">
</return>
<description>
- Returns the distance along the path in 3D units.
+ Returns the distance along the path in 3D units.
</description>
</method>
<method name="get_rotation_mode" qualifiers="const">
<return type="int">
</return>
<description>
- Returns the rotation mode. The constants below list which axes are allowed to rotate for each mode.
+ Returns the rotation mode. The constants below list which axes are allowed to rotate for each mode.
</description>
</method>
<method name="get_unit_offset" qualifiers="const">
<return type="float">
</return>
<description>
- Returns the distance along the path as a number in the range 0.0 (for the first vertex) to 1.0 (for the last).
+ Returns the distance along the path as a number in the range 0.0 (for the first vertex) to 1.0 (for the last).
</description>
</method>
<method name="get_v_offset" qualifiers="const">
<return type="float">
</return>
<description>
- Returns the Y displacement this node has from its parent [Path].
+ Returns the Y displacement this node has from its parent [Path].
</description>
</method>
<method name="has_loop" qualifiers="const">
<return type="bool">
</return>
<description>
- Returns whether this node wraps its offsets around, or truncates them to the path ends.
+ Returns whether this node wraps its offsets around, or truncates them to the path ends.
</description>
</method>
<method name="set_cubic_interpolation">
<argument index="0" name="enable" type="bool">
</argument>
<description>
- The points along the [Curve3D] of the [Path] are precomputed before use, for faster calculations. The point at the requested offset is then calculated interpolating between two adjacent cached points. This may present a problem if the curve makes sharp turns, as the cached points may not follow the curve closely enough.
-There are two answers to this problem: Either increase the number of cached points and increase memory consumption, or make a cubic interpolation between two points at the cost of (slightly) slower calculations.
-This method controls whether the position between two cached points is interpolated linearly, or cubicly.
+ The points along the [Curve3D] of the [Path] are precomputed before use, for faster calculations. The point at the requested offset is then calculated interpolating between two adjacent cached points. This may present a problem if the curve makes sharp turns, as the cached points may not follow the curve closely enough.
+ There are two answers to this problem: Either increase the number of cached points and increase memory consumption, or make a cubic interpolation between two points at the cost of (slightly) slower calculations.
+ This method controls whether the position between two cached points is interpolated linearly, or cubicly.
</description>
</method>
<method name="set_h_offset">
<argument index="0" name="h_offset" type="float">
</argument>
<description>
- Moves this node in the X axis. As this node's position will be set every time its offset is set, this allows many PathFollow to share the same curve (and thus the same movement pattern), yet not return the same position for a given path offset.
-A similar effect may be achieved moving the this node's descendants.
+ Moves this node in the X axis. As this node's position will be set every time its offset is set, this allows many PathFollow to share the same curve (and thus the same movement pattern), yet not return the same position for a given path offset.
+ A similar effect may be achieved moving the this node's descendants.
</description>
</method>
<method name="set_loop">
<argument index="0" name="loop" type="bool">
</argument>
<description>
- If set, any offset outside the path's length (whether set by [method set_offset] or [method set_unit_offset] will wrap around, instead of stopping at the ends. Set it for cyclic paths.
+ If set, any offset outside the path's length (whether set by [method set_offset] or [method set_unit_offset] will wrap around, instead of stopping at the ends. Set it for cyclic paths.
</description>
</method>
<method name="set_offset">
<argument index="0" name="offset" type="float">
</argument>
<description>
- Sets the distance from the first vertex, measured in 3D units along the path. This sets this node's position to a point within the path.
+ Sets the distance from the first vertex, measured in 3D units along the path. This sets this node's position to a point within the path.
</description>
</method>
<method name="set_rotation_mode">
<argument index="0" name="rotation_mode" type="int">
</argument>
<description>
- Allows or forbids rotation on one or more axes, per the constants below.
+ Allows or forbids rotation on one or more axes, per the constants below.
</description>
</method>
<method name="set_unit_offset">
<argument index="0" name="unit_offset" type="float">
</argument>
<description>
- Sets the distance from the first vertex, considering 0.0 as the first vertex and 1.0 as the last. This is just another way of expressing the offset within the path, as the offset supplied is multiplied internally by the path's length.
+ Sets the distance from the first vertex, considering 0.0 as the first vertex and 1.0 as the last. This is just another way of expressing the offset within the path, as the offset supplied is multiplied internally by the path's length.
</description>
</method>
<method name="set_v_offset">
<argument index="0" name="v_offset" type="float">
</argument>
<description>
- Moves this node in the Y axis, for the same reasons of [method set_h_offset].
+ Moves this node in the Y axis, for the same reasons of [method set_h_offset].
</description>
</method>
</methods>
@@ -25126,112 +25179,112 @@ A similar effect may be achieved moving the this node's descendants.
</class>
<class name="PathFollow2D" inherits="Node2D" category="Core">
<brief_description>
- Point sampler for a [Path2D].
+ Point sampler for a [Path2D].
</brief_description>
<description>
- This node takes its parent [Path2D], and returns the coordinates of a point within it, given a distance from the first vertex.
-It is useful for making other nodes follow a path, without coding the movement pattern. For that, the nodes must be descendants of this node. Then, when setting an offset in this node, the descendant nodes will move accordingly.
+ This node takes its parent [Path2D], and returns the coordinates of a point within it, given a distance from the first vertex.
+ It is useful for making other nodes follow a path, without coding the movement pattern. For that, the nodes must be descendants of this node. Then, when setting an offset in this node, the descendant nodes will move accordingly.
</description>
<methods>
<method name="get_cubic_interpolation" qualifiers="const">
<return type="bool">
</return>
<description>
- This method returns whether the position between two cached points (see [method set_cubic_interpolation]) is interpolated linearly, or cubicly.
+ This method returns whether the position between two cached points (see [method set_cubic_interpolation]) is interpolated linearly, or cubicly.
</description>
</method>
<method name="get_h_offset" qualifiers="const">
<return type="float">
</return>
<description>
- Returns the horizontal displacement this node has from its parent [Path2D].
+ Returns the horizontal displacement this node has from its parent [Path2D].
</description>
</method>
<method name="get_offset" qualifiers="const">
<return type="float">
</return>
<description>
- Returns the distance along the path in pixels.
+ Returns the distance along the path in pixels.
</description>
</method>
<method name="get_unit_offset" qualifiers="const">
<return type="float">
</return>
<description>
- Returns the distance along the path as a number in the range 0.0 (for the first vertex) to 1.0 (for the last).
+ Returns the distance along the path as a number in the range 0.0 (for the first vertex) to 1.0 (for the last).
</description>
</method>
<method name="get_v_offset" qualifiers="const">
<return type="float">
</return>
<description>
- Returns the vertical displacement this node has from its parent [Path2D].
+ Returns the vertical displacement this node has from its parent [Path2D].
</description>
</method>
<method name="has_loop" qualifiers="const">
<return type="bool">
</return>
<description>
- Returns whether this node wraps its offsets around, or truncates them to the path ends.
+ Returns whether this node wraps its offsets around, or truncates them to the path ends.
</description>
</method>
<method name="is_rotating" qualifiers="const">
<return type="bool">
</return>
<description>
- Returns whether this node rotates to follow the path.
+ Returns whether this node rotates to follow the path.
</description>
</method>
<method name="set_cubic_interpolation">
<argument index="0" name="enable" type="bool">
</argument>
<description>
- The points along the [Curve2D] of the [Path2D] are precomputed before use, for faster calculations. The point at the requested offset is then calculated interpolating between two adjacent cached points. This may present a problem if the curve makes sharp turns, as the cached points may not follow the curve closely enough.
-There are two answers to this problem: Either increase the number of cached points and increase memory consumption, or make a cubic interpolation between two points at the cost of (slightly) slower calculations.
-This method controls whether the position between two cached points is interpolated linearly, or cubicly.
+ The points along the [Curve2D] of the [Path2D] are precomputed before use, for faster calculations. The point at the requested offset is then calculated interpolating between two adjacent cached points. This may present a problem if the curve makes sharp turns, as the cached points may not follow the curve closely enough.
+ There are two answers to this problem: Either increase the number of cached points and increase memory consumption, or make a cubic interpolation between two points at the cost of (slightly) slower calculations.
+ This method controls whether the position between two cached points is interpolated linearly, or cubicly.
</description>
</method>
<method name="set_h_offset">
<argument index="0" name="h_offset" type="float">
</argument>
<description>
- Moves this node horizontally. As this node's position will be set every time its offset is set, this allows many PathFollow2D to share the same curve (and thus the same movement pattern), yet not return the same position for a given path offset.
-A similar effect may be achieved moving this node's descendants.
+ Moves this node horizontally. As this node's position will be set every time its offset is set, this allows many PathFollow2D to share the same curve (and thus the same movement pattern), yet not return the same position for a given path offset.
+ A similar effect may be achieved moving this node's descendants.
</description>
</method>
<method name="set_loop">
<argument index="0" name="loop" type="bool">
</argument>
<description>
- If set, any offset outside the path's length (whether set by [method set_offset] or [method set_unit_offset] will wrap around, instead of stopping at the ends. Set it for cyclic paths.
+ If set, any offset outside the path's length (whether set by [method set_offset] or [method set_unit_offset] will wrap around, instead of stopping at the ends. Set it for cyclic paths.
</description>
</method>
<method name="set_offset">
<argument index="0" name="offset" type="float">
</argument>
<description>
- Sets the distance from the first vertex, measured in pixels along the path. This sets this node's position to a point within the path.
+ Sets the distance from the first vertex, measured in pixels along the path. This sets this node's position to a point within the path.
</description>
</method>
<method name="set_rotate">
<argument index="0" name="enable" type="bool">
</argument>
<description>
- If set, this node rotates to follow the path, making its descendants rotate.
+ If set, this node rotates to follow the path, making its descendants rotate.
</description>
</method>
<method name="set_unit_offset">
<argument index="0" name="unit_offset" type="float">
</argument>
<description>
- Sets the distance from the first vertex, considering 0.0 as the first vertex and 1.0 as the last. This is just another way of expressing the offset within the path, as the offset supplied is multiplied internally by the path's length.
+ Sets the distance from the first vertex, considering 0.0 as the first vertex and 1.0 as the last. This is just another way of expressing the offset within the path, as the offset supplied is multiplied internally by the path's length.
</description>
</method>
<method name="set_v_offset">
<argument index="0" name="v_offset" type="float">
</argument>
<description>
- Moves the PathFollow2D vertically, for the same reasons of [method set_h_offset].
+ Moves the PathFollow2D vertically, for the same reasons of [method set_h_offset].
</description>
</method>
</methods>
@@ -25240,10 +25293,10 @@ A similar effect may be achieved moving this node's descendants.
</class>
<class name="PathRemap" inherits="Object" category="Core">
<brief_description>
- Singleton containing the list of remapped resources.
+ Singleton containing the list of remapped resources.
</brief_description>
<description>
- When exporting, the types of some resources may change internally so they are converted to more optimized versions. While it's not usually necessary to access to this directly (path remapping happens automatically when opening a file), it's exported just for information.
+ When exporting, the types of some resources may change internally so they are converted to more optimized versions. While it's not usually necessary to access to this directly (path remapping happens automatically when opening a file), it's exported just for information.
</description>
<methods>
<method name="add_remap">
@@ -25254,19 +25307,19 @@ A similar effect may be achieved moving this node's descendants.
<argument index="2" name="locale" type="String" default="&quot;&quot;">
</argument>
<description>
- Add a remap from a file to another.
+ Add a remap from a file to another.
</description>
</method>
<method name="clear_remaps">
<description>
- Clear all remaps.
+ Clear all remaps.
</description>
</method>
<method name="erase_remap">
<argument index="0" name="path" type="String">
</argument>
<description>
- Erase a remap.
+ Erase a remap.
</description>
</method>
<method name="get_remap" qualifiers="const">
@@ -25275,7 +25328,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="path" type="String">
</argument>
<description>
- Return the remapped new path of a file.
+ Return the remapped new path of a file.
</description>
</method>
<method name="has_remap" qualifiers="const">
@@ -25284,7 +25337,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="path" type="String">
</argument>
<description>
- Return true if a file is being remapped.
+ Return true if a file is being remapped.
</description>
</method>
</methods>
@@ -25367,17 +25420,17 @@ A similar effect may be achieved moving this node's descendants.
</class>
<class name="Physics2DDirectBodyState" inherits="Object" category="Core">
<brief_description>
- Direct access object to a physics body in the [Physics2DServer].
+ Direct access object to a physics body in the [Physics2DServer].
</brief_description>
<description>
- Direct access object to a physics body in the [Physics2DServer]. This object is passed via the direct state callback of rigid/character bodies, and is intended for changing the direct state of that body.
+ Direct access object to a physics body in the [Physics2DServer]. This object is passed via the direct state callback of rigid/character bodies, and is intended for changing the direct state of that body.
</description>
<methods>
<method name="get_angular_velocity" qualifiers="const">
<return type="float">
</return>
<description>
- Return the angular velocity of the body.
+ Return the angular velocity of the body.
</description>
</method>
<method name="get_contact_collider" qualifiers="const">
@@ -25386,7 +25439,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="contact_idx" type="int">
</argument>
<description>
- Return the [RID] of the collider.
+ Return the [RID] of the collider.
</description>
</method>
<method name="get_contact_collider_id" qualifiers="const">
@@ -25395,7 +25448,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="contact_idx" type="int">
</argument>
<description>
- Return the object id of the collider.
+ Return the object id of the collider.
</description>
</method>
<method name="get_contact_collider_object" qualifiers="const">
@@ -25404,7 +25457,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="contact_idx" type="int">
</argument>
<description>
- Return the collider object, this depends on how it was created (will return a scene node if such was used to create it).
+ Return the collider object, this depends on how it was created (will return a scene node if such was used to create it).
</description>
</method>
<method name="get_contact_collider_pos" qualifiers="const">
@@ -25413,7 +25466,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="contact_idx" type="int">
</argument>
<description>
- Return the contact position in the collider.
+ Return the contact position in the collider.
</description>
</method>
<method name="get_contact_collider_shape" qualifiers="const">
@@ -25422,7 +25475,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="contact_idx" type="int">
</argument>
<description>
- Return the collider shape index.
+ Return the collider shape index.
</description>
</method>
<method name="get_contact_collider_shape_metadata" qualifiers="const">
@@ -25431,7 +25484,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="contact_idx" type="int">
</argument>
<description>
- Return the metadata of the collided shape. This metadata is different from [method Object.get_meta], and is set with [method Physics2DServer.shape_set_data].
+ Return the metadata of the collided shape. This metadata is different from [method Object.get_meta], and is set with [method Physics2DServer.shape_set_data].
</description>
</method>
<method name="get_contact_collider_velocity_at_pos" qualifiers="const">
@@ -25440,14 +25493,14 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="contact_idx" type="int">
</argument>
<description>
- Return the linear velocity vector at contact point of the collider.
+ Return the linear velocity vector at contact point of the collider.
</description>
</method>
<method name="get_contact_count" qualifiers="const">
<return type="int">
</return>
<description>
- Return the amount of contacts this body has with other bodies. Note that by default this returns 0 unless bodies are configured to log contacts.
+ Return the amount of contacts this body has with other bodies. Note that by default this returns 0 unless bodies are configured to log contacts.
</description>
</method>
<method name="get_contact_local_normal" qualifiers="const">
@@ -25456,7 +25509,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="contact_idx" type="int">
</argument>
<description>
- Return the local normal (of this body) of the contact point.
+ Return the local normal (of this body) of the contact point.
</description>
</method>
<method name="get_contact_local_pos" qualifiers="const">
@@ -25465,7 +25518,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="contact_idx" type="int">
</argument>
<description>
- Return the local position (of this body) of the contact point.
+ Return the local position (of this body) of the contact point.
</description>
</method>
<method name="get_contact_local_shape" qualifiers="const">
@@ -25474,110 +25527,110 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="contact_idx" type="int">
</argument>
<description>
- Return the local shape index of the collision.
+ Return the local shape index of the collision.
</description>
</method>
<method name="get_inverse_inertia" qualifiers="const">
<return type="float">
</return>
<description>
- Return the inverse of the inertia of the body.
+ Return the inverse of the inertia of the body.
</description>
</method>
<method name="get_inverse_mass" qualifiers="const">
<return type="float">
</return>
<description>
- Return the inverse of the mass of the body.
+ Return the inverse of the mass of the body.
</description>
</method>
<method name="get_linear_velocity" qualifiers="const">
<return type="Vector2">
</return>
<description>
- Return the current linear velocity of the body.
+ Return the current linear velocity of the body.
</description>
</method>
<method name="get_space_state">
<return type="Physics2DDirectSpaceState">
</return>
<description>
- Return the current state of space, useful for queries.
+ Return the current state of space, useful for queries.
</description>
</method>
<method name="get_step" qualifiers="const">
<return type="float">
</return>
<description>
- Return the timestep (delta) used for the simulation.
+ Return the timestep (delta) used for the simulation.
</description>
</method>
<method name="get_total_angular_damp" qualifiers="const">
<return type="float">
</return>
<description>
- Return the rate at which the body stops rotating, if there are not any other forces moving it.
+ Return the rate at which the body stops rotating, if there are not any other forces moving it.
</description>
</method>
<method name="get_total_gravity" qualifiers="const">
<return type="Vector2">
</return>
<description>
- Return the total gravity vector being currently applied to this body.
+ Return the total gravity vector being currently applied to this body.
</description>
</method>
<method name="get_total_linear_damp" qualifiers="const">
<return type="float">
</return>
<description>
- Return the rate at which the body stops moving, if there are not any other forces moving it.
+ Return the rate at which the body stops moving, if there are not any other forces moving it.
</description>
</method>
<method name="get_transform" qualifiers="const">
<return type="Matrix32">
</return>
<description>
- Return the transform matrix of the body.
+ Return the transform matrix of the body.
</description>
</method>
<method name="integrate_forces">
<description>
- Call the built-in force integration code.
+ Call the built-in force integration code.
</description>
</method>
<method name="is_sleeping" qualifiers="const">
<return type="bool">
</return>
<description>
- Return true if this body is currently sleeping (not active).
+ Return true if this body is currently sleeping (not active).
</description>
</method>
<method name="set_angular_velocity">
<argument index="0" name="velocity" type="float">
</argument>
<description>
- Change the angular velocity of the body.
+ Change the angular velocity of the body.
</description>
</method>
<method name="set_linear_velocity">
<argument index="0" name="velocity" type="Vector2">
</argument>
<description>
- Change the linear velocity of the body.
+ Change the linear velocity of the body.
</description>
</method>
<method name="set_sleep_state">
<argument index="0" name="enabled" type="bool">
</argument>
<description>
- Set the sleeping state of the body, only affects character/rigid bodies.
+ Set the sleeping state of the body, only affects character/rigid bodies.
</description>
</method>
<method name="set_transform">
<argument index="0" name="transform" type="Matrix32">
</argument>
<description>
- Change the transform matrix of the body.
+ Change the transform matrix of the body.
</description>
</method>
</methods>
@@ -25586,10 +25639,10 @@ A similar effect may be achieved moving this node's descendants.
</class>
<class name="Physics2DDirectBodyStateSW" inherits="Physics2DDirectBodyState" category="Core">
<brief_description>
- Software implementation of [Physics2DDirectBodyState].
+ Software implementation of [Physics2DDirectBodyState].
</brief_description>
<description>
- Software implementation of [Physics2DDirectBodyState]. This object exposes no new methods or properties and should not be used, as [Physics2DDirectBodyState] selects the best implementation available.
+ Software implementation of [Physics2DDirectBodyState]. This object exposes no new methods or properties and should not be used, as [Physics2DDirectBodyState] selects the best implementation available.
</description>
<methods>
</methods>
@@ -25598,10 +25651,10 @@ A similar effect may be achieved moving this node's descendants.
</class>
<class name="Physics2DDirectSpaceState" inherits="Object" category="Core">
<brief_description>
- Direct access object to a space in the [Physics2DServer].
+ Direct access object to a space in the [Physics2DServer].
</brief_description>
<description>
- Direct access object to a space in the [Physics2DServer]. It's used mainly to do queries against objects and areas residing in a given space.
+ Direct access object to a space in the [Physics2DServer]. It's used mainly to do queries against objects and areas residing in a given space.
</description>
<methods>
<method name="cast_motion">
@@ -25610,7 +25663,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="shape" type="Physics2DShapeQueryParameters">
</argument>
<description>
- Check whether the shape can travel to a point. If it can, the method will return an array with two floats: The first is the distance the shape can move in that direction without colliding, and the second is the distance at which it will collide.
+ Check whether the shape can travel to a point. If it can, the method will return an array with two floats: The first is the distance the shape can move in that direction without colliding, and the second is the distance at which it will collide.
If the shape can not move, the array will be empty.
</description>
</method>
@@ -25622,7 +25675,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="1" name="max_results" type="int" default="32">
</argument>
<description>
- Check the intersections of a shape, given through a [Physics2DShapeQueryParameters] object, against the space. The resulting array contains a list of points where the shape intersects another. Like with [method intersect_shape], the number of returned results can be limited to save processing time.
+ Check the intersections of a shape, given through a [Physics2DShapeQueryParameters] object, against the space. The resulting array contains a list of points where the shape intersects another. Like with [method intersect_shape], the number of returned results can be limited to save processing time.
</description>
</method>
<method name="get_rest_info">
@@ -25631,16 +25684,16 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="shape" type="Physics2DShapeQueryParameters">
</argument>
<description>
- Check the intersections of a shape, given through a [Physics2DShapeQueryParameters] object, against the space. If it collides with more than a shape, the nearest one is selected. The returned object is a dictionary containing the following fields:
- pointo: Place where the shapes intersect.
- normal: Normal of the object at the point where the shapes intersect.
- shape: Shape index within the object against which the shape intersected.
- metadata: Metadata of the shape against which the shape intersected. This metadata is different from [method Object.get_meta], and is set with [method Physics2DServer.shape_set_data].
- collider_id: Id of the object against which the shape intersected.
- collider: Object against which the shape intersected.
- rid: [RID] of the object against which the shape intersected.
- linear_velocity: The movement vector of the object the shape intersected, if it was a body. If it was an area, it is (0,0).
- If the shape did not intersect anything, then an empty dictionary (dir.empty()==true) is returned instead.
+ Check the intersections of a shape, given through a [Physics2DShapeQueryParameters] object, against the space. If it collides with more than a shape, the nearest one is selected. The returned object is a dictionary containing the following fields:
+ pointo: Place where the shapes intersect.
+ normal: Normal of the object at the point where the shapes intersect.
+ shape: Shape index within the object against which the shape intersected.
+ metadata: Metadata of the shape against which the shape intersected. This metadata is different from [method Object.get_meta], and is set with [method Physics2DServer.shape_set_data].
+ collider_id: Id of the object against which the shape intersected.
+ collider: Object against which the shape intersected.
+ rid: [RID] of the object against which the shape intersected.
+ linear_velocity: The movement vector of the object the shape intersected, if it was a body. If it was an area, it is (0,0).
+ If the shape did not intersect anything, then an empty dictionary (dir.empty()==true) is returned instead.
</description>
</method>
<method name="intersect_point">
@@ -25657,13 +25710,13 @@ A similar effect may be achieved moving this node's descendants.
<argument index="4" name="type_mask" type="int" default="15">
</argument>
<description>
- Check whether a point is inside any shape. The shapes the point is inside of are returned in an array containing dictionaries with the following fields:
- shape: Shape index within the object the point is in.
- metadata: Metadata of the shape the point is in. This metadata is different from [method Object.get_meta], and is set with [method Physics2DServer.shape_set_data].
- collider_id: Id of the object the point is in.
- collider: Object the point is inside of.
- rid: [RID] of the object the point is in.
- Additionally, the method can take an array of objects or [RID]s that are to be excluded from collisions, a bitmask representing the physics layers to check in, and another bitmask for the types of objects to check (see TYPE_MASK_* constants).
+ Check whether a point is inside any shape. The shapes the point is inside of are returned in an array containing dictionaries with the following fields:
+ shape: Shape index within the object the point is in.
+ metadata: Metadata of the shape the point is in. This metadata is different from [method Object.get_meta], and is set with [method Physics2DServer.shape_set_data].
+ collider_id: Id of the object the point is in.
+ collider: Object the point is inside of.
+ rid: [RID] of the object the point is in.
+ Additionally, the method can take an array of objects or [RID]s that are to be excluded from collisions, a bitmask representing the physics layers to check in, and another bitmask for the types of objects to check (see TYPE_MASK_* constants).
</description>
</method>
<method name="intersect_ray">
@@ -25680,16 +25733,16 @@ A similar effect may be achieved moving this node's descendants.
<argument index="4" name="type_mask" type="int" default="15">
</argument>
<description>
- Intersect a ray in a given space. The returned object is a dictionary with the following fields:
- position: Place where ray is stopped.
- normal: Normal of the object at the point where the ray was stopped.
- shape: Shape index within the object against which the ray was stopped.
- metadata: Metadata of the shape against which the ray was stopped. This metadata is different from [method Object.get_meta], and is set with [method Physics2DServer.shape_set_data].
- collider_id: Id of the object against which the ray was stopped.
- collider: Object against which the ray was stopped.
- rid: [RID] of the object against which the ray was stopped.
- If the ray did not intersect anything, then an empty dictionary (dir.empty()==true) is returned instead.
- Additionally, the method can take an array of objects or [RID]s that are to be excluded from collisions, a bitmask representing the physics layers to check in, and another bitmask for the types of objects to check (see TYPE_MASK_* constants).
+ Intersect a ray in a given space. The returned object is a dictionary with the following fields:
+ position: Place where ray is stopped.
+ normal: Normal of the object at the point where the ray was stopped.
+ shape: Shape index within the object against which the ray was stopped.
+ metadata: Metadata of the shape against which the ray was stopped. This metadata is different from [method Object.get_meta], and is set with [method Physics2DServer.shape_set_data].
+ collider_id: Id of the object against which the ray was stopped.
+ collider: Object against which the ray was stopped.
+ rid: [RID] of the object against which the ray was stopped.
+ If the ray did not intersect anything, then an empty dictionary (dir.empty()==true) is returned instead.
+ Additionally, the method can take an array of objects or [RID]s that are to be excluded from collisions, a bitmask representing the physics layers to check in, and another bitmask for the types of objects to check (see TYPE_MASK_* constants).
</description>
</method>
<method name="intersect_shape">
@@ -25700,13 +25753,13 @@ A similar effect may be achieved moving this node's descendants.
<argument index="1" name="max_results" type="int" default="32">
</argument>
<description>
- Check the intersections of a shape, given through a [Physics2DShapeQueryParameters] object, against the space. The intersected shapes are returned in an array containing dictionaries with the following fields:
- shape: Shape index within the object the shape intersected.
- metadata: Metadata of the shape intersected by the shape given through the [Physics2DShapeQueryParameters]. This metadata is different from [method Object.get_meta], and is set with [method Physics2DServer.shape_set_data].
- collider_id: Id of the object the shape intersected.
- collider: Object the shape intersected.
- rid: [RID] of the object the shape intersected.
- The number of intersections can be limited with the second paramater, to reduce the processing time.
+ Check the intersections of a shape, given through a [Physics2DShapeQueryParameters] object, against the space. The intersected shapes are returned in an array containing dictionaries with the following fields:
+ shape: Shape index within the object the shape intersected.
+ metadata: Metadata of the shape intersected by the shape given through the [Physics2DShapeQueryParameters]. This metadata is different from [method Object.get_meta], and is set with [method Physics2DServer.shape_set_data].
+ collider_id: Id of the object the shape intersected.
+ collider: Object the shape intersected.
+ rid: [RID] of the object the shape intersected.
+ The number of intersections can be limited with the second paramater, to reduce the processing time.
</description>
</method>
</methods>
@@ -25733,10 +25786,10 @@ A similar effect may be achieved moving this node's descendants.
</class>
<class name="Physics2DServer" inherits="Object" category="Core">
<brief_description>
- Physics 2D Server.
+ Physics 2D Server.
</brief_description>
<description>
- Physics 2D Server is the server responsible for all 2D physics. It can create many kinds of physics objects, but does not insert them on the node tree.
+ Physics 2D Server is the server responsible for all 2D physics. It can create many kinds of physics objects, but does not insert them on the node tree.
</description>
<methods>
<method name="area_add_shape">
@@ -25747,7 +25800,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="2" name="transform" type="Matrix32" default="1,0, 0,1, 0,0">
</argument>
<description>
- Add a shape to the area, along with a transform matrix. Shapes are usually referenced by their index, so you should track which shape has a given index.
+ Add a shape to the area, along with a transform matrix. Shapes are usually referenced by their index, so you should track which shape has a given index.
</description>
</method>
<method name="area_attach_object_instance_ID">
@@ -25756,21 +25809,21 @@ A similar effect may be achieved moving this node's descendants.
<argument index="1" name="id" type="int">
</argument>
<description>
- Assign the area to a descendant of [Object], so it can exist in the node tree.
+ Assign the area to a descendant of [Object], so it can exist in the node tree.
</description>
</method>
<method name="area_clear_shapes">
<argument index="0" name="area" type="RID">
</argument>
<description>
- Remove all shapes from an area. It does not delete the shapes, so they can be reassigned later.
+ Remove all shapes from an area. It does not delete the shapes, so they can be reassigned later.
</description>
</method>
<method name="area_create">
<return type="RID">
</return>
<description>
- Create an [Area2D].
+ Create an [Area2D].
</description>
</method>
<method name="area_get_object_instance_ID" qualifiers="const">
@@ -25779,7 +25832,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="area" type="RID">
</argument>
<description>
- Get the instance ID of the object the area is assigned to.
+ Get the instance ID of the object the area is assigned to.
</description>
</method>
<method name="area_get_param" qualifiers="const">
@@ -25788,7 +25841,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="1" name="param" type="int">
</argument>
<description>
- Return an area parameter value.
+ Return an area parameter value.
</description>
</method>
<method name="area_get_shape" qualifiers="const">
@@ -25799,7 +25852,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="1" name="shape_idx" type="int">
</argument>
<description>
- Return the [RID] of the nth shape of an area.
+ Return the [RID] of the nth shape of an area.
</description>
</method>
<method name="area_get_shape_count" qualifiers="const">
@@ -25808,7 +25861,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="area" type="RID">
</argument>
<description>
- Return the number of shapes assigned to an area.
+ Return the number of shapes assigned to an area.
</description>
</method>
<method name="area_get_shape_transform" qualifiers="const">
@@ -25819,7 +25872,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="1" name="shape_idx" type="int">
</argument>
<description>
- Return the transform matrix of a shape within an area.
+ Return the transform matrix of a shape within an area.
</description>
</method>
<method name="area_get_space" qualifiers="const">
@@ -25828,7 +25881,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="area" type="RID">
</argument>
<description>
- Return the space assigned to the area.
+ Return the space assigned to the area.
</description>
</method>
<method name="area_get_space_override_mode" qualifiers="const">
@@ -25837,7 +25890,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="area" type="RID">
</argument>
<description>
- Return the space override mode for the area.
+ Return the space override mode for the area.
</description>
</method>
<method name="area_get_transform" qualifiers="const">
@@ -25846,7 +25899,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="area" type="RID">
</argument>
<description>
- Return the transform matrix for an area.
+ Return the transform matrix for an area.
</description>
</method>
<method name="area_remove_shape">
@@ -25855,7 +25908,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="1" name="shape_idx" type="int">
</argument>
<description>
- Remove a shape from an area. It does not delete the shape, so it can be reassigned later.
+ Remove a shape from an area. It does not delete the shape, so it can be reassigned later.
</description>
</method>
<method name="area_set_collision_mask">
@@ -25864,7 +25917,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="1" name="mask" type="int">
</argument>
<description>
- Set which physics layers the area will monitor.
+ Set which physics layers the area will monitor.
</description>
</method>
<method name="area_set_layer_mask">
@@ -25873,7 +25926,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="1" name="mask" type="int">
</argument>
<description>
- Assign the area to one or many physics layers.
+ Assign the area to one or many physics layers.
</description>
</method>
<method name="area_set_monitor_callback">
@@ -25884,12 +25937,12 @@ A similar effect may be achieved moving this node's descendants.
<argument index="2" name="method" type="String">
</argument>
<description>
- Set the function to call when any body/area enters or exits the area. This callback will be called for any object interacting with the area, and takes five parameters:
- 1: AREA_BODY_ADDED or AREA_BODY_REMOVED, depending on whether the object entered or exited the area.
- 2: [RID] of the object that entered/exited the area.
- 3: Instance ID of the object that entered/exited the area.
- 4: The shape index of the object that entered/exited the area.
- 5: The shape index of the area where the object entered/exited.
+ Set the function to call when any body/area enters or exits the area. This callback will be called for any object interacting with the area, and takes five parameters:
+ 1: AREA_BODY_ADDED or AREA_BODY_REMOVED, depending on whether the object entered or exited the area.
+ 2: [RID] of the object that entered/exited the area.
+ 3: Instance ID of the object that entered/exited the area.
+ 4: The shape index of the object that entered/exited the area.
+ 5: The shape index of the area where the object entered/exited.
</description>
</method>
<method name="area_set_param">
@@ -25900,7 +25953,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="2" name="value" type="Variant">
</argument>
<description>
- Set the value for an area parameter. A list of available parameters is on the AREA_PARAM_* constants.
+ Set the value for an area parameter. A list of available parameters is on the AREA_PARAM_* constants.
</description>
</method>
<method name="area_set_shape">
@@ -25911,7 +25964,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="2" name="shape" type="RID">
</argument>
<description>
- Substitute a given area shape by another. The old shape is selected by its index, the new one by its [RID].
+ Substitute a given area shape by another. The old shape is selected by its index, the new one by its [RID].
</description>
</method>
<method name="area_set_shape_transform">
@@ -25922,7 +25975,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="2" name="transform" type="Matrix32">
</argument>
<description>
- Set the transform matrix for an area shape.
+ Set the transform matrix for an area shape.
</description>
</method>
<method name="area_set_space">
@@ -25931,7 +25984,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="1" name="space" type="RID">
</argument>
<description>
- Assign a space to the area.
+ Assign a space to the area.
</description>
</method>
<method name="area_set_space_override_mode">
@@ -25940,7 +25993,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="1" name="mode" type="int">
</argument>
<description>
- Set the space override mode for the area. The modes are described in the constants AREA_SPACE_OVERRIDE_*.
+ Set the space override mode for the area. The modes are described in the constants AREA_SPACE_OVERRIDE_*.
</description>
</method>
<method name="area_set_transform">
@@ -25949,7 +26002,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="1" name="transform" type="Matrix32">
</argument>
<description>
- Set the transform matrix for an area.
+ Set the transform matrix for an area.
</description>
</method>
<method name="body_add_collision_exception">
@@ -25958,7 +26011,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="1" name="excepted_body" type="RID">
</argument>
<description>
- Add a body to the list of bodies exempt from collisions.
+ Add a body to the list of bodies exempt from collisions.
</description>
</method>
<method name="body_add_force">
@@ -25969,7 +26022,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="2" name="force" type="Vector2">
</argument>
<description>
- Add a positioned force to the applied force and torque. As with [method body_apply_impulse], both the force and the offset from the body origin are in global coordinates. A force differs from an impulse in that, while the two are forces, the impulse clears itself after being applied.
+ Add a positioned force to the applied force and torque. As with [method body_apply_impulse], both the force and the offset from the body origin are in global coordinates. A force differs from an impulse in that, while the two are forces, the impulse clears itself after being applied.
</description>
</method>
<method name="body_add_shape">
@@ -25980,7 +26033,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="2" name="transform" type="Matrix32" default="1,0, 0,1, 0,0">
</argument>
<description>
- Add a shape to the body, along with a transform matrix. Shapes are usually referenced by their index, so you should track which shape has a given index.
+ Add a shape to the body, along with a transform matrix. Shapes are usually referenced by their index, so you should track which shape has a given index.
</description>
</method>
<method name="body_apply_impulse">
@@ -25991,7 +26044,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="2" name="impulse" type="Vector2">
</argument>
<description>
- Add a positioned impulse to the applied force and torque. Both the force and the offset from the body origin are in global coordinates.
+ Add a positioned impulse to the applied force and torque. Both the force and the offset from the body origin are in global coordinates.
</description>
</method>
<method name="body_attach_object_instance_ID">
@@ -26000,14 +26053,14 @@ A similar effect may be achieved moving this node's descendants.
<argument index="1" name="id" type="int">
</argument>
<description>
- Assign the area to a descendant of [Object], so it can exist in the node tree.
+ Assign the area to a descendant of [Object], so it can exist in the node tree.
</description>
</method>
<method name="body_clear_shapes">
<argument index="0" name="body" type="RID">
</argument>
<description>
- Remove all shapes from a body.
+ Remove all shapes from a body.
</description>
</method>
<method name="body_create">
@@ -26018,7 +26071,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="1" name="init_sleeping" type="bool" default="false">
</argument>
<description>
- Create a physics body. The first parameter can be any value from constants BODY_MODE*, for the type of body created. Additionally, the body can be created in sleeping state to save processing time.
+ Create a physics body. The first parameter can be any value from constants BODY_MODE*, for the type of body created. Additionally, the body can be created in sleeping state to save processing time.
</description>
</method>
<method name="body_get_collision_mask" qualifiers="const">
@@ -26027,7 +26080,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="body" type="RID">
</argument>
<description>
- Return the physics layer or layers a body can collide with.
+ Return the physics layer or layers a body can collide with.
</description>
</method>
<method name="body_get_continuous_collision_detection_mode" qualifiers="const">
@@ -26036,7 +26089,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="body" type="RID">
</argument>
<description>
- Return the continuous collision detection mode.
+ Return the continuous collision detection mode.
</description>
</method>
<method name="body_get_layer_mask" qualifiers="const">
@@ -26045,7 +26098,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="body" type="RID">
</argument>
<description>
- Return the physics layer or layers a body belongs to.
+ Return the physics layer or layers a body belongs to.
</description>
</method>
<method name="body_get_max_contacts_reported" qualifiers="const">
@@ -26054,7 +26107,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="body" type="RID">
</argument>
<description>
- Return the maximum contacts that can be reported. See [method body_set_max_contacts_reported].
+ Return the maximum contacts that can be reported. See [method body_set_max_contacts_reported].
</description>
</method>
<method name="body_get_mode" qualifiers="const">
@@ -26063,7 +26116,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="body" type="RID">
</argument>
<description>
- Return the body mode.
+ Return the body mode.
</description>
</method>
<method name="body_get_object_instance_ID" qualifiers="const">
@@ -26072,7 +26125,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="body" type="RID">
</argument>
<description>
- Get the instance ID of the object the area is assigned to.
+ Get the instance ID of the object the area is assigned to.
</description>
</method>
<method name="body_get_one_way_collision_direction" qualifiers="const">
@@ -26081,7 +26134,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="body" type="RID">
</argument>
<description>
- Return the direction used for one-way collision detection.
+ Return the direction used for one-way collision detection.
</description>
</method>
<method name="body_get_one_way_collision_max_depth" qualifiers="const">
@@ -26090,7 +26143,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="body" type="RID">
</argument>
<description>
- Return how far a body can go through the given one, when it allows one-way collisions.
+ Return how far a body can go through the given one, when it allows one-way collisions.
</description>
</method>
<method name="body_get_param" qualifiers="const">
@@ -26101,7 +26154,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="1" name="param" type="int">
</argument>
<description>
- Return the value of a body parameter.
+ Return the value of a body parameter.
</description>
</method>
<method name="body_get_shape" qualifiers="const">
@@ -26112,7 +26165,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="1" name="shape_idx" type="int">
</argument>
<description>
- Return the [RID] of the nth shape of a body.
+ Return the [RID] of the nth shape of a body.
</description>
</method>
<method name="body_get_shape_count" qualifiers="const">
@@ -26121,7 +26174,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="body" type="RID">
</argument>
<description>
- Return the number of shapes assigned to a body.
+ Return the number of shapes assigned to a body.
</description>
</method>
<method name="body_get_shape_metadata" qualifiers="const">
@@ -26130,7 +26183,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="1" name="shape_idx" type="int">
</argument>
<description>
- Return the metadata of a shape of a body.
+ Return the metadata of a shape of a body.
</description>
</method>
<method name="body_get_shape_transform" qualifiers="const">
@@ -26141,7 +26194,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="1" name="shape_idx" type="int">
</argument>
<description>
- Return the transform matrix of a body shape.
+ Return the transform matrix of a body shape.
</description>
</method>
<method name="body_get_space" qualifiers="const">
@@ -26150,7 +26203,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="body" type="RID">
</argument>
<description>
- Return the [RID] of the space assigned to a body.
+ Return the [RID] of the space assigned to a body.
</description>
</method>
<method name="body_get_state" qualifiers="const">
@@ -26159,7 +26212,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="1" name="state" type="int">
</argument>
<description>
- Return a body state.
+ Return a body state.
</description>
</method>
<method name="body_is_omitting_force_integration" qualifiers="const">
@@ -26168,7 +26221,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="body" type="RID">
</argument>
<description>
- Return whether a body uses a callback function to calculate its own physics (see [method body_set_force_integration_callback]).
+ Return whether a body uses a callback function to calculate its own physics (see [method body_set_force_integration_callback]).
</description>
</method>
<method name="body_is_shape_set_as_trigger" qualifiers="const">
@@ -26179,7 +26232,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="1" name="shape_idx" type="int">
</argument>
<description>
- Return whether a body's shape is marked as a trigger.
+ Return whether a body's shape is marked as a trigger.
</description>
</method>
<method name="body_remove_collision_exception">
@@ -26188,7 +26241,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="1" name="excepted_body" type="RID">
</argument>
<description>
- Remove a body from the list of bodies exempt from collisions.
+ Remove a body from the list of bodies exempt from collisions.
</description>
</method>
<method name="body_remove_shape">
@@ -26197,7 +26250,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="1" name="shape_idx" type="int">
</argument>
<description>
- Remove a shape from a body. The shape is not deleted, so it can be reused afterwards.
+ Remove a shape from a body. The shape is not deleted, so it can be reused afterwards.
</description>
</method>
<method name="body_set_axis_velocity">
@@ -26206,7 +26259,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="1" name="axis_velocity" type="Vector2">
</argument>
<description>
- Set an axis velocity. The velocity in the given vector axis will be set as the given vector length. This is useful for jumping behavior.
+ Set an axis velocity. The velocity in the given vector axis will be set as the given vector length. This is useful for jumping behavior.
</description>
</method>
<method name="body_set_collision_mask">
@@ -26215,7 +26268,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="1" name="mask" type="int">
</argument>
<description>
- Set the physics layer or layers a body can collide with.
+ Set the physics layer or layers a body can collide with.
</description>
</method>
<method name="body_set_continuous_collision_detection_mode">
@@ -26224,8 +26277,8 @@ A similar effect may be achieved moving this node's descendants.
<argument index="1" name="mode" type="int">
</argument>
<description>
- Set the continuous collision detection mode from any of the CCD_MODE_* constants.
- Continuous collision detection tries to predict where a moving body will collide, instead of moving it and correcting its movement if it collided.
+ Set the continuous collision detection mode from any of the CCD_MODE_* constants.
+ Continuous collision detection tries to predict where a moving body will collide, instead of moving it and correcting its movement if it collided.
</description>
</method>
<method name="body_set_force_integration_callback">
@@ -26238,7 +26291,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="3" name="userdata" type="Variant" default="NULL">
</argument>
<description>
- Set the function used to calculate physics for an object, if that object allows it (see [method body_set_omit_force integration]).
+ Set the function used to calculate physics for an object, if that object allows it (see [method body_set_omit_force integration]).
</description>
</method>
<method name="body_set_layer_mask">
@@ -26247,7 +26300,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="1" name="mask" type="int">
</argument>
<description>
- Set the physics layer or layers a body belongs to.
+ Set the physics layer or layers a body belongs to.
</description>
</method>
<method name="body_set_max_contacts_reported">
@@ -26256,7 +26309,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="1" name="amount" type="int">
</argument>
<description>
- Set the maximum contacts to report. Bodies can keep a log of the contacts with other bodies, this is enabled by setting the maximum amount of contacts reported to a number greater than 0.
+ Set the maximum contacts to report. Bodies can keep a log of the contacts with other bodies, this is enabled by setting the maximum amount of contacts reported to a number greater than 0.
</description>
</method>
<method name="body_set_mode">
@@ -26265,7 +26318,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="1" name="mode" type="int">
</argument>
<description>
- Set the body mode, from one of the constants BODY_MODE*.
+ Set the body mode, from one of the constants BODY_MODE*.
</description>
</method>
<method name="body_set_omit_force_integration">
@@ -26274,7 +26327,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="1" name="enable" type="bool">
</argument>
<description>
- Set whether a body uses a callback function to calculate its own physics (see [method body_set_force_integration_callback]).
+ Set whether a body uses a callback function to calculate its own physics (see [method body_set_force_integration_callback]).
</description>
</method>
<method name="body_set_one_way_collision_direction">
@@ -26283,7 +26336,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="1" name="normal" type="Vector2">
</argument>
<description>
- Set a direction in which bodies can go through the given one. If this value is different from (0,0), any movement within 90 degrees of this vector is considered a valid movement. Set this direction to (0,0) to disable one-way collisions.
+ Set a direction in which bodies can go through the given one. If this value is different from (0,0), any movement within 90 degrees of this vector is considered a valid movement. Set this direction to (0,0) to disable one-way collisions.
</description>
</method>
<method name="body_set_one_way_collision_max_depth">
@@ -26292,7 +26345,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="1" name="depth" type="float">
</argument>
<description>
- Set how far a body can go through the given one, if it allows one-way collisions (see [method body_set_one_way_collision_direction]).
+ Set how far a body can go through the given one, if it allows one-way collisions (see [method body_set_one_way_collision_direction]).
</description>
</method>
<method name="body_set_param">
@@ -26303,7 +26356,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="2" name="value" type="float">
</argument>
<description>
- Set a body parameter (see BODY_PARAM* constants).
+ Set a body parameter (see BODY_PARAM* constants).
</description>
</method>
<method name="body_set_shape">
@@ -26314,7 +26367,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="2" name="shape" type="RID">
</argument>
<description>
- Substitute a given body shape by another. The old shape is selected by its index, the new one by its [RID].
+ Substitute a given body shape by another. The old shape is selected by its index, the new one by its [RID].
</description>
</method>
<method name="body_set_shape_as_trigger">
@@ -26325,7 +26378,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="2" name="enable" type="bool">
</argument>
<description>
- Mark a body's shape as a trigger. A trigger shape cannot affect other bodies, but detects other shapes entering and exiting it.
+ Mark a body's shape as a trigger. A trigger shape cannot affect other bodies, but detects other shapes entering and exiting it.
</description>
</method>
<method name="body_set_shape_metadata">
@@ -26336,7 +26389,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="2" name="metadata" type="Variant">
</argument>
<description>
- Set metadata of a shape within a body. This metadata is different from [method Object.set_meta], and can be retrieved on shape queries.
+ Set metadata of a shape within a body. This metadata is different from [method Object.set_meta], and can be retrieved on shape queries.
</description>
</method>
<method name="body_set_shape_transform">
@@ -26347,7 +26400,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="2" name="transform" type="Matrix32">
</argument>
<description>
- Set the transform matrix for a body shape.
+ Set the transform matrix for a body shape.
</description>
</method>
<method name="body_set_space">
@@ -26356,7 +26409,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="1" name="space" type="RID">
</argument>
<description>
- Assign a space to the body (see [method create_space]).
+ Assign a space to the body (see [method create_space]).
</description>
</method>
<method name="body_set_state">
@@ -26367,7 +26420,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="2" name="value" type="Variant">
</argument>
<description>
- Set a body state (see BODY_STATE* constants).
+ Set a body state (see BODY_STATE* constants).
</description>
</method>
<method name="body_test_motion">
@@ -26382,7 +26435,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="3" name="result" type="Physics2DTestMotionResult" default="NULL">
</argument>
<description>
- Return whether a body can move in a given direction. Apart from the boolean return value, a [Physics2DTestMotionResult] can be passed to return additional information in.
+ Return whether a body can move in a given direction. Apart from the boolean return value, a [Physics2DTestMotionResult] can be passed to return additional information in.
</description>
</method>
<method name="damped_spring_joint_create">
@@ -26397,7 +26450,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="3" name="body_b" type="RID" default="RID()">
</argument>
<description>
- Create a damped spring joint between two bodies. If not specified, the second body is assumed to be the joint itself.
+ Create a damped spring joint between two bodies. If not specified, the second body is assumed to be the joint itself.
</description>
</method>
<method name="damped_string_joint_get_param" qualifiers="const">
@@ -26408,7 +26461,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="1" name="param" type="int">
</argument>
<description>
- Return the value of a damped spring joint parameter.
+ Return the value of a damped spring joint parameter.
</description>
</method>
<method name="damped_string_joint_set_param">
@@ -26419,14 +26472,14 @@ A similar effect may be achieved moving this node's descendants.
<argument index="2" name="value" type="float">
</argument>
<description>
- Set a damped spring joint parameter. Parameters are explained in the DAMPED_STRING* constants.
+ Set a damped spring joint parameter. Parameters are explained in the DAMPED_STRING* constants.
</description>
</method>
<method name="free_rid">
<argument index="0" name="rid" type="RID">
</argument>
<description>
- Destroy any of the objects created by Physics2DServer. If the [RID] passed is not one of the objects that can be created by Physics2DServer, an error will be sent to the console.
+ Destroy any of the objects created by Physics2DServer. If the [RID] passed is not one of the objects that can be created by Physics2DServer, an error will be sent to the console.
</description>
</method>
<method name="get_process_info">
@@ -26435,7 +26488,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="process_info" type="int">
</argument>
<description>
- Return information about the current state of the 2D physics engine. The states are listed under the INFO_* constants.
+ Return information about the current state of the 2D physics engine. The states are listed under the INFO_* constants.
</description>
</method>
<method name="groove_joint_create">
@@ -26452,7 +26505,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="4" name="body_b" type="RID" default="RID()">
</argument>
<description>
- Create a groove joint between two bodies. If not specified, the bodyies are assumed to be the joint itself.
+ Create a groove joint between two bodies. If not specified, the bodyies are assumed to be the joint itself.
</description>
</method>
<method name="joint_get_param" qualifiers="const">
@@ -26463,7 +26516,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="1" name="param" type="int">
</argument>
<description>
- Return the value of a joint parameter.
+ Return the value of a joint parameter.
</description>
</method>
<method name="joint_get_type" qualifiers="const">
@@ -26472,7 +26525,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="joint" type="RID">
</argument>
<description>
- Return the type of a joint (see JOINT_* constants).
+ Return the type of a joint (see JOINT_* constants).
</description>
</method>
<method name="joint_set_param">
@@ -26483,7 +26536,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="2" name="value" type="float">
</argument>
<description>
- Set a joint parameter. Parameters are explained in the JOINT_PARAM* constants.
+ Set a joint parameter. Parameters are explained in the JOINT_PARAM* constants.
</description>
</method>
<method name="pin_joint_create">
@@ -26496,14 +26549,14 @@ A similar effect may be achieved moving this node's descendants.
<argument index="2" name="body_b" type="RID" default="RID()">
</argument>
<description>
- Create a pin joint between two bodies. If not specified, the second body is assumed to be the joint itself.
+ Create a pin joint between two bodies. If not specified, the second body is assumed to be the joint itself.
</description>
</method>
<method name="set_active">
<argument index="0" name="active" type="bool">
</argument>
<description>
- Activate or deactivate the 2D physics engine.
+ Activate or deactivate the 2D physics engine.
</description>
</method>
<method name="shape_create">
@@ -26512,14 +26565,14 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="type" type="int">
</argument>
<description>
- Create a shape of type SHAPE_*. Does not assign it to a body or an area. To do so, you must use [method area_set_shape] or [method body_set_shape].
+ Create a shape of type SHAPE_*. Does not assign it to a body or an area. To do so, you must use [method area_set_shape] or [method body_set_shape].
</description>
</method>
<method name="shape_get_data" qualifiers="const">
<argument index="0" name="shape" type="RID">
</argument>
<description>
- Return the shape data.
+ Return the shape data.
</description>
</method>
<method name="shape_get_type" qualifiers="const">
@@ -26528,7 +26581,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="shape" type="RID">
</argument>
<description>
- Return the type of shape (see SHAPE_* constants).
+ Return the type of shape (see SHAPE_* constants).
</description>
</method>
<method name="shape_set_data">
@@ -26537,14 +26590,14 @@ A similar effect may be achieved moving this node's descendants.
<argument index="1" name="data" type="Variant">
</argument>
<description>
- Set the shape data that defines its shape and size. The data to be passed depends on the kind of shape created [method shape_get_type].
+ Set the shape data that defines its shape and size. The data to be passed depends on the kind of shape created [method shape_get_type].
</description>
</method>
<method name="space_create">
<return type="RID">
</return>
<description>
- Create a space. A space is a collection of parameters for the physics engine that can be assigned to an area or a body. It can be assigned to an area with [method area_set_space], or to a body with [method body_set_space].
+ Create a space. A space is a collection of parameters for the physics engine that can be assigned to an area or a body. It can be assigned to an area with [method area_set_space], or to a body with [method body_set_space].
</description>
</method>
<method name="space_get_direct_state">
@@ -26553,7 +26606,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="space" type="RID">
</argument>
<description>
- Return the state of a space, a [Physics2DDirectSpaceState]. This object can be used to make collision/intersection queries.
+ Return the state of a space, a [Physics2DDirectSpaceState]. This object can be used to make collision/intersection queries.
</description>
</method>
<method name="space_get_param" qualifiers="const">
@@ -26564,7 +26617,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="1" name="param" type="int">
</argument>
<description>
- Return the value of a space parameter.
+ Return the value of a space parameter.
</description>
</method>
<method name="space_is_active" qualifiers="const">
@@ -26573,7 +26626,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="space" type="RID">
</argument>
<description>
- Return whether the space is active.
+ Return whether the space is active.
</description>
</method>
<method name="space_set_active">
@@ -26582,7 +26635,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="1" name="active" type="bool">
</argument>
<description>
- Mark a space as active. It will not have an effect, unless it is assigned to an area or body.
+ Mark a space as active. It will not have an effect, unless it is assigned to an area or body.
</description>
</method>
<method name="space_set_param">
@@ -26593,7 +26646,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="2" name="value" type="float">
</argument>
<description>
- Set the value for a space parameter. A list of available parameters is on the SPACE_PARAM_* constants.
+ Set the value for a space parameter. A list of available parameters is on the SPACE_PARAM_* constants.
</description>
</method>
</methods>
@@ -26779,10 +26832,10 @@ A similar effect may be achieved moving this node's descendants.
</class>
<class name="Physics2DServerSW" inherits="Physics2DServer" category="Core">
<brief_description>
- Software implementation of [Physics2DServer].
+ Software implementation of [Physics2DServer].
</brief_description>
<description>
- Software implementation of [Physics2DServer]. This class exposes no new methods or properties and should not be used, as [Physics2DServer] automatically selects the best implementation available.
+ Software implementation of [Physics2DServer]. This class exposes no new methods or properties and should not be used, as [Physics2DServer] automatically selects the best implementation available.
</description>
<methods>
</methods>
@@ -26791,115 +26844,115 @@ A similar effect may be achieved moving this node's descendants.
</class>
<class name="Physics2DShapeQueryParameters" inherits="Reference" category="Core">
<brief_description>
- Parameters to be sent to a 2D shape physics query.
+ Parameters to be sent to a 2D shape physics query.
</brief_description>
<description>
- This class contains the shape and other parameters for intersection/collision queries.
+ This class contains the shape and other parameters for intersection/collision queries.
</description>
<methods>
<method name="get_exclude" qualifiers="const">
<return type="Array">
</return>
<description>
- Return the list of objects, or object [RID]s, that will be excluded from collisions.
+ Return the list of objects, or object [RID]s, that will be excluded from collisions.
</description>
</method>
<method name="get_layer_mask" qualifiers="const">
<return type="int">
</return>
<description>
- Return the physics layer(s) the shape belongs to.
+ Return the physics layer(s) the shape belongs to.
</description>
</method>
<method name="get_margin" qualifiers="const">
<return type="float">
</return>
<description>
- Return the collision margin for the shape.
+ Return the collision margin for the shape.
</description>
</method>
<method name="get_motion" qualifiers="const">
<return type="Vector2">
</return>
<description>
- Return the current movement speed of the shape.
+ Return the current movement speed of the shape.
</description>
</method>
<method name="get_object_type_mask" qualifiers="const">
<return type="int">
</return>
<description>
- Return the type of object the shape belongs to.
+ Return the type of object the shape belongs to.
</description>
</method>
<method name="get_shape_rid" qualifiers="const">
<return type="RID">
</return>
<description>
- Return the [RID] of the shape queried.
+ Return the [RID] of the shape queried.
</description>
</method>
<method name="get_transform" qualifiers="const">
<return type="Matrix32">
</return>
<description>
- Return the transform matrix of the shape queried.
+ Return the transform matrix of the shape queried.
</description>
</method>
<method name="set_exclude">
<argument index="0" name="exclude" type="Array">
</argument>
<description>
- Set the list of objects, or object [RID]s, that will be excluded from collisions.
+ Set the list of objects, or object [RID]s, that will be excluded from collisions.
</description>
</method>
<method name="set_layer_mask">
<argument index="0" name="layer_mask" type="int">
</argument>
<description>
- Set the physics layer(s) the shape belongs to.
+ Set the physics layer(s) the shape belongs to.
</description>
</method>
<method name="set_margin">
<argument index="0" name="margin" type="float">
</argument>
<description>
- Set the collision margin for the shape. A collision margin is an amount (in pixels) that the shape will grow when computing collisions, to account for numerical imprecision.
+ Set the collision margin for the shape. A collision margin is an amount (in pixels) that the shape will grow when computing collisions, to account for numerical imprecision.
</description>
</method>
<method name="set_motion">
<argument index="0" name="motion" type="Vector2">
</argument>
<description>
- Set the current movement speed of the shape.
+ Set the current movement speed of the shape.
</description>
</method>
<method name="set_object_type_mask">
<argument index="0" name="object_type_mask" type="int">
</argument>
<description>
- Set the type of object the shape belongs to (see Physics2DDirectSpaceState.TYPE_MASK_*).
+ Set the type of object the shape belongs to (see Physics2DDirectSpaceState.TYPE_MASK_*).
</description>
</method>
<method name="set_shape">
<argument index="0" name="shape" type="Shape2D">
</argument>
<description>
- Set the [Shape2D] that will be used for collision/intersection queries.
+ Set the [Shape2D] that will be used for collision/intersection queries.
</description>
</method>
<method name="set_shape_rid">
<argument index="0" name="shape" type="RID">
</argument>
<description>
- Set the [RID] of the shape to be used in queries.
+ Set the [RID] of the shape to be used in queries.
</description>
</method>
<method name="set_transform">
<argument index="0" name="transform" type="Matrix32">
</argument>
<description>
- Set the transormation matrix of the shape. This is necessary to set its position/rotation/scale.
+ Set the transormation matrix of the shape. This is necessary to set its position/rotation/scale.
</description>
</method>
</methods>
@@ -27020,10 +27073,10 @@ A similar effect may be achieved moving this node's descendants.
</class>
<class name="PhysicsBody" inherits="CollisionObject" category="Core">
<brief_description>
- Base class for different types of Physics bodies.
+ Base class for different types of Physics bodies.
</brief_description>
<description>
- PhysicsBody is an abstract base class for implementing a physics body. All PhysicsBody types inherit from it.
+ PhysicsBody is an abstract base class for implementing a physics body. All PhysicsBody types inherit from it.
</description>
<methods>
<method name="add_collision_exception_with">
@@ -27100,24 +27153,24 @@ A similar effect may be achieved moving this node's descendants.
</class>
<class name="PhysicsBody2D" inherits="CollisionObject2D" category="Core">
<brief_description>
- Base class for all objects affected by physics.
+ Base class for all objects affected by physics.
</brief_description>
<description>
- PhysicsBody2D is an abstract base class for implementing a physics body. All *Body2D types inherit from it.
+ PhysicsBody2D is an abstract base class for implementing a physics body. All *Body2D types inherit from it.
</description>
<methods>
<method name="add_collision_exception_with">
<argument index="0" name="body" type="PhysicsBody2D">
</argument>
<description>
- Adds a body to the collision exception list. This list contains bodies that this body will not collide with.
+ Adds a body to the collision exception list. This list contains bodies that this body will not collide with.
</description>
</method>
<method name="get_collision_mask" qualifiers="const">
<return type="int">
</return>
<description>
- Return the physics layers this area can scan for collisions.
+ Return the physics layers this area can scan for collisions.
</description>
</method>
<method name="get_collision_mask_bit" qualifiers="const">
@@ -27126,14 +27179,14 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="bit" type="int">
</argument>
<description>
- Return an individual bit on the collision mask.
+ Return an individual bit on the collision mask.
</description>
</method>
<method name="get_layer_mask" qualifiers="const">
<return type="int">
</return>
<description>
- Return the physics layer this area is in.
+ Return the physics layer this area is in.
</description>
</method>
<method name="get_layer_mask_bit" qualifiers="const">
@@ -27142,35 +27195,35 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="bit" type="int">
</argument>
<description>
- Return an individual bit on the collision mask.
+ Return an individual bit on the collision mask.
</description>
</method>
<method name="get_one_way_collision_direction" qualifiers="const">
<return type="Vector2">
</return>
<description>
- Return the direction used for one-way collision detection.
+ Return the direction used for one-way collision detection.
</description>
</method>
<method name="get_one_way_collision_max_depth" qualifiers="const">
<return type="float">
</return>
<description>
- Return how far a body can go through this one, when it allows one-way collisions.
+ Return how far a body can go through this one, when it allows one-way collisions.
</description>
</method>
<method name="remove_collision_exception_with">
<argument index="0" name="body" type="PhysicsBody2D">
</argument>
<description>
- Removes a body from the collision exception list.
+ Removes a body from the collision exception list.
</description>
</method>
<method name="set_collision_mask">
<argument index="0" name="mask" type="int">
</argument>
<description>
- Set the physics layers this area can scan for collisions.
+ Set the physics layers this area can scan for collisions.
</description>
</method>
<method name="set_collision_mask_bit">
@@ -27179,16 +27232,16 @@ A similar effect may be achieved moving this node's descendants.
<argument index="1" name="value" type="bool">
</argument>
<description>
- Set/clear individual bits on the collision mask. This makes selecting the areas scanned easier.
+ Set/clear individual bits on the collision mask. This makes selecting the areas scanned easier.
</description>
</method>
<method name="set_layer_mask">
<argument index="0" name="mask" type="int">
</argument>
<description>
- Set the physics layers this area is in.
- Collidable objects can exist in any of 32 different layers. These layers are not visual, but more of a tagging system instead. A collidable can use these layers/tags to select with which objects it can collide, using [method set_collision_mask].
- A contact is detected if object A is in any of the layers that object B scans, or object B is in any layer scanned by object A.
+ Set the physics layers this area is in.
+ Collidable objects can exist in any of 32 different layers. These layers are not visual, but more of a tagging system instead. A collidable can use these layers/tags to select with which objects it can collide, using [method set_collision_mask].
+ A contact is detected if object A is in any of the layers that object B scans, or object B is in any layer scanned by object A.
</description>
</method>
<method name="set_layer_mask_bit">
@@ -27197,21 +27250,21 @@ A similar effect may be achieved moving this node's descendants.
<argument index="1" name="value" type="bool">
</argument>
<description>
- Set/clear individual bits on the layer mask. This makes getting a body in/out of only one layer easier.
+ Set/clear individual bits on the layer mask. This makes getting a body in/out of only one layer easier.
</description>
</method>
<method name="set_one_way_collision_direction">
<argument index="0" name="dir" type="Vector2">
</argument>
<description>
- Set a direction in which bodies can go through this one. If this value is different from (0,0), any movement within 90 degrees of this vector is considered a valid movement. Set this direction to (0,0) to disable one-way collisions.
+ Set a direction in which bodies can go through this one. If this value is different from (0,0), any movement within 90 degrees of this vector is considered a valid movement. Set this direction to (0,0) to disable one-way collisions.
</description>
</method>
<method name="set_one_way_collision_max_depth">
<argument index="0" name="depth" type="float">
</argument>
<description>
- Set how far a body can go through this one, when it allows one-way collisions (see [method set_one_way_collision_direction]).
+ Set how far a body can go through this one, when it allows one-way collisions (see [method set_one_way_collision_direction]).
</description>
</method>
</methods>
@@ -28735,7 +28788,7 @@ A similar effect may be achieved moving this node's descendants.
</class>
<class name="PhysicsShapeQueryResult" inherits="Reference" category="Core">
<brief_description>
- Result of a shape query in Physics2DServer.
+ Result of a shape query in Physics2DServer.
</brief_description>
<description>
</description>
@@ -28816,10 +28869,10 @@ A similar effect may be achieved moving this node's descendants.
</class>
<class name="PinJoint2D" inherits="Joint2D" category="Core">
<brief_description>
- Pin Joint for 2D Shapes.
+ Pin Joint for 2D Shapes.
</brief_description>
<description>
- Pin Joint for 2D Rigid Bodies. It pins 2 bodies (rigid or static) together, or a single body to a fixed position in space.
+ Pin Joint for 2D Rigid Bodies. It pins 2 bodies (rigid or static) together, or a single body to a fixed position in space.
</description>
<methods>
<method name="get_softness" qualifiers="const">
@@ -28840,10 +28893,10 @@ A similar effect may be achieved moving this node's descendants.
</class>
<class name="Plane" category="Built-In Types">
<brief_description>
- Plane in hessian form.
+ Plane in hessian form.
</brief_description>
<description>
- Plane represents a normalized plane equation. Basically, "normal" is the normal of the plane (a,b,c normalized), and "d" is the distance from the origin to the plane (in the direction of "normal"). "Over" or "Above" the plane is considered the side of the plane towards where the normal is pointing.
+ Plane represents a normalized plane equation. Basically, "normal" is the normal of the plane (a,b,c normalized), and "d" is the distance from the origin to the plane (in the direction of "normal"). "Over" or "Above" the plane is considered the side of the plane towards where the normal is pointing.
</description>
<methods>
<method name="Plane">
@@ -28858,7 +28911,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="3" name="d" type="float">
</argument>
<description>
- Creates a plane from the three parameters "a", "b", "c" and "d".
+ Creates a plane from the three parameters "a", "b", "c" and "d".
</description>
</method>
<method name="Plane">
@@ -28871,7 +28924,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="2" name="v3" type="Vector3">
</argument>
<description>
- Creates a plane from three points.
+ Creates a plane from three points.
</description>
</method>
<method name="Plane">
@@ -28882,14 +28935,14 @@ A similar effect may be achieved moving this node's descendants.
<argument index="1" name="d" type="float">
</argument>
<description>
- Creates a plane from the normal and the plane's distance to the origin.
+ Creates a plane from the normal and the plane's distance to the origin.
</description>
</method>
<method name="center">
<return type="Vector3">
</return>
<description>
- Returns the center of the plane.
+ Returns the center of the plane.
</description>
</method>
<method name="distance_to">
@@ -28898,14 +28951,14 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="point" type="Vector3">
</argument>
<description>
- Returns the shortest distance from the plane to the position "point".
+ Returns the shortest distance from the plane to the position "point".
</description>
</method>
<method name="get_any_point">
<return type="Vector3">
</return>
<description>
- Returns a point on the plane.
+ Returns a point on the plane.
</description>
</method>
<method name="has_point">
@@ -28916,7 +28969,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="1" name="epsilon" type="float" default="0.00001">
</argument>
<description>
- Returns true if "point" is inside the plane (by a very minimum threshold).
+ Returns true if "point" is inside the plane (by a very minimum threshold).
</description>
</method>
<method name="intersect_3">
@@ -28927,7 +28980,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="1" name="c" type="Plane">
</argument>
<description>
- Returns the intersection point of the three planes "b", "c" and this plane. If no intersection is found null is returned.
+ Returns the intersection point of the three planes "b", "c" and this plane. If no intersection is found null is returned.
</description>
</method>
<method name="intersects_ray">
@@ -28938,7 +28991,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="1" name="dir" type="Vector3">
</argument>
<description>
- Returns the intersection point of a ray consisting of the position "from" and the direction normal "dir" with this plane. If no intersection is found null is returned.
+ Returns the intersection point of a ray consisting of the position "from" and the direction normal "dir" with this plane. If no intersection is found null is returned.
</description>
</method>
<method name="intersects_segment">
@@ -28949,7 +29002,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="1" name="end" type="Vector3">
</argument>
<description>
- Returns the intersection point of a segment from position "begin" to position "end" with this plane. If no intersection is found null is returned.
+ Returns the intersection point of a segment from position "begin" to position "end" with this plane. If no intersection is found null is returned.
</description>
</method>
<method name="is_point_over">
@@ -28958,14 +29011,14 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="point" type="Vector3">
</argument>
<description>
- Returns true if "point" is located above the plane.
+ Returns true if "point" is located above the plane.
</description>
</method>
<method name="normalized">
<return type="Plane">
</return>
<description>
- Returns a copy of the plane, normalized.
+ Returns a copy of the plane, normalized.
</description>
</method>
<method name="project">
@@ -28974,7 +29027,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="point" type="Vector3">
</argument>
<description>
- Returns the orthogonal projection of point "p" into a point in the plane.
+ Returns the orthogonal projection of point "p" into a point in the plane.
</description>
</method>
</methods>
@@ -29017,164 +29070,164 @@ A similar effect may be achieved moving this node's descendants.
</class>
<class name="Polygon2D" inherits="Node2D" category="Core">
<brief_description>
- 2D polygon representation
+ 2D polygon representation
</brief_description>
<description>
- A Polygon2D is defined by a set of n vertices connected together by line segments, meaning that the vertex 1 will be connected with vertex 2, vertex 2 with vertex 3 ..., vertex n-1 with vertex n and vertex n with vertex 1 in order to close the loop and define a polygon.
+ A Polygon2D is defined by a set of n vertices connected together by line segments, meaning that the vertex 1 will be connected with vertex 2, vertex 2 with vertex 3 ..., vertex n-1 with vertex n and vertex n with vertex 1 in order to close the loop and define a polygon.
</description>
<methods>
<method name="get_color" qualifiers="const">
<return type="Color">
</return>
<description>
- Return the polygon fill color.
+ Return the polygon fill color.
</description>
</method>
<method name="get_invert" qualifiers="const">
<return type="bool">
</return>
<description>
- Return whether this polygon is inverted or not.
+ Return whether this polygon is inverted or not.
</description>
</method>
<method name="get_invert_border" qualifiers="const">
<return type="float">
</return>
<description>
- Return the added padding around the bounding box.
+ Return the added padding around the bounding box.
</description>
</method>
<method name="get_offset" qualifiers="const">
<return type="Vector2">
</return>
<description>
- Return the offset for the polygon vertices.
+ Return the offset for the polygon vertices.
</description>
</method>
<method name="get_polygon" qualifiers="const">
<return type="Vector2Array">
</return>
<description>
- Return the set of vertices that defines this polygon.
+ Return the set of vertices that defines this polygon.
</description>
</method>
<method name="get_texture" qualifiers="const">
<return type="Object">
</return>
<description>
- Return the polygon texture
+ Return the polygon texture
</description>
</method>
<method name="get_texture_offset" qualifiers="const">
<return type="Vector2">
</return>
<description>
- Return the polygon texture offset.
+ Return the polygon texture offset.
</description>
</method>
<method name="get_texture_rotation" qualifiers="const">
<return type="float">
</return>
<description>
- Return the rotation in radians of the texture polygon.
+ Return the rotation in radians of the texture polygon.
</description>
</method>
<method name="get_texture_scale" qualifiers="const">
<return type="Vector2">
</return>
<description>
- Return the uv coordinate multiplier.
+ Return the uv coordinate multiplier.
</description>
</method>
<method name="get_uv" qualifiers="const">
<return type="Vector2Array">
</return>
<description>
- Return the texture coordinates associated with every vertex of the polygon.
+ Return the texture coordinates associated with every vertex of the polygon.
</description>
</method>
<method name="get_vertex_colors" qualifiers="const">
<return type="ColorArray">
</return>
<description>
- Return the list of vertex colors.
+ Return the list of vertex colors.
</description>
</method>
<method name="set_color">
<argument index="0" name="color" type="Color">
</argument>
<description>
- Set the polygon fill color. If the polygon has a texture defined, the defined texture will be multiplied by the polygon fill color. This, also, is the default color for those vertices that are not defined by [method get_vertex_colors].
+ Set the polygon fill color. If the polygon has a texture defined, the defined texture will be multiplied by the polygon fill color. This, also, is the default color for those vertices that are not defined by [method get_vertex_colors].
</description>
</method>
<method name="set_invert">
<argument index="0" name="invert" type="bool">
</argument>
<description>
- Set the polygon as the defined polygon bounding box minus the defined polygon (the defined polygon will appear as a hole on the square that contains the defined polygon).
+ Set the polygon as the defined polygon bounding box minus the defined polygon (the defined polygon will appear as a hole on the square that contains the defined polygon).
</description>
</method>
<method name="set_invert_border">
<argument index="0" name="invert_border" type="float">
</argument>
<description>
- Add extra padding around the bounding box, making it bigger. Too small a value can make the polygon triangulate strangely, due to numerical imprecision.
+ Add extra padding around the bounding box, making it bigger. Too small a value can make the polygon triangulate strangely, due to numerical imprecision.
</description>
</method>
<method name="set_offset">
<argument index="0" name="offset" type="Vector2">
</argument>
<description>
- Set the an offset that will be added to the vertices' position. E.g. if the offset is set to (10,10) then all the polygon points will move 10 units to the right and 10 units to the bottom.
+ Set the an offset that will be added to the vertices' position. E.g. if the offset is set to (10,10) then all the polygon points will move 10 units to the right and 10 units to the bottom.
</description>
</method>
<method name="set_polygon">
<argument index="0" name="polygon" type="Vector2Array">
</argument>
<description>
- Define the set of vertices that will represent the polygon.
+ Define the set of vertices that will represent the polygon.
</description>
</method>
<method name="set_texture">
<argument index="0" name="texture" type="Object">
</argument>
<description>
- Set the polygon texture.
+ Set the polygon texture.
</description>
</method>
<method name="set_texture_offset">
<argument index="0" name="texture_offset" type="Vector2">
</argument>
<description>
- Set the offset of the polygon texture. Initially the texture will appear anchored to the polygon position, the offset is used to move the texture location away from that point (notice that the texture origin is set to its top left corner, so when offset is 0,0 the top left corner of the texture is at the polygon position), for example setting the offset to 10, 10 will move the texture 10 units to the left and 10 units to the top.
+ Set the offset of the polygon texture. Initially the texture will appear anchored to the polygon position, the offset is used to move the texture location away from that point (notice that the texture origin is set to its top left corner, so when offset is 0,0 the top left corner of the texture is at the polygon position), for example setting the offset to 10, 10 will move the texture 10 units to the left and 10 units to the top.
</description>
</method>
<method name="set_texture_rotation">
<argument index="0" name="texture_rotation" type="float">
</argument>
<description>
- Set the amount of rotation of the polygon texture, [code]texture_rotation[/code] is specified in radians and clockwise rotation.
+ Set the amount of rotation of the polygon texture, [code]texture_rotation[/code] is specified in radians and clockwise rotation.
</description>
</method>
<method name="set_texture_scale">
<argument index="0" name="texture_scale" type="Vector2">
</argument>
<description>
- Set the value that will multiply the uv coordinates ([method get_uv]) when applying the texture. Larger values make the texture smaller, and vice versa.
+ Set the value that will multiply the uv coordinates ([method get_uv]) when applying the texture. Larger values make the texture smaller, and vice versa.
</description>
</method>
<method name="set_uv">
<argument index="0" name="uv" type="Vector2Array">
</argument>
<description>
- Set the texture coordinates for every vertex of the polygon. There should be one uv vertex for every vertex in the polygon. If there are less, the undefined ones will be assumed to be (0,0). Extra uv vertices are ignored.
+ Set the texture coordinates for every vertex of the polygon. There should be one uv vertex for every vertex in the polygon. If there are less, the undefined ones will be assumed to be (0,0). Extra uv vertices are ignored.
</description>
</method>
<method name="set_vertex_colors">
<argument index="0" name="vertex_colors" type="ColorArray">
</argument>
<description>
- Set the color for each vertex of the polygon. There should be one color for every vertex in the polygon. If there are less, the undefined ones will be assumed to be [method get_color]. Extra color entries are ignored.
+ Set the color for each vertex of the polygon. There should be one color for every vertex in the polygon. If there are less, the undefined ones will be assumed to be [method get_color]. Extra color entries are ignored.
Colors are interpolated between vertices, resulting in smooth gradients when they differ.
</description>
</method>
@@ -29260,62 +29313,62 @@ A similar effect may be achieved moving this node's descendants.
</class>
<class name="Popup" inherits="Control" category="Core">
<brief_description>
- Base container control for popups and dialogs.
+ Base container control for popups and dialogs.
</brief_description>
<description>
- Popup is a base [Control] used to show dialogs and popups. It's a subwindow and modal by default (see [Control]) and has helpers for custom popup behavior.
+ Popup is a base [Control] used to show dialogs and popups. It's a subwindow and modal by default (see [Control]) and has helpers for custom popup behavior.
</description>
<methods>
<method name="is_exclusive" qualifiers="const">
<return type="bool">
</return>
<description>
- Returns whether the popup will hide other popups when shown on the screen.
+ Returns whether the popup will hide other popups when shown on the screen.
</description>
</method>
<method name="popup">
<description>
- Popup (show the control in modal form).
+ Popup (show the control in modal form).
</description>
</method>
<method name="popup_centered">
<argument index="0" name="size" type="Vector2" default="Vector2(0,0)">
</argument>
<description>
- Popup (show the control in modal form) in the center of the screen, at the current size, or at a size determined by "size".
+ Popup (show the control in modal form) in the center of the screen, at the current size, or at a size determined by "size".
</description>
</method>
<method name="popup_centered_minsize">
<argument index="0" name="minsize" type="Vector2" default="Vector2(0,0)">
</argument>
<description>
- Popup (show the control in modal form) in the center of the screen, ensuring the size is never smaller than [code]minsize[/code].
+ Popup (show the control in modal form) in the center of the screen, ensuring the size is never smaller than [code]minsize[/code].
</description>
</method>
<method name="popup_centered_ratio">
<argument index="0" name="ratio" type="float" default="0.75">
</argument>
<description>
- Popup (show the control in modal form) in the center of the screen, scaled at a ratio of size of the screen.
+ Popup (show the control in modal form) in the center of the screen, scaled at a ratio of size of the screen.
</description>
</method>
<method name="set_exclusive">
<argument index="0" name="enable" type="bool">
</argument>
<description>
- Make the popup hide other popups when shown on the screen.
+ Make the popup hide other popups when shown on the screen.
</description>
</method>
</methods>
<signals>
<signal name="about_to_show">
<description>
- This signal is emitted when a popup is about to be shown. (often used in [PopupMenu] for clearing the list of options and creating a new one according to the current context).
+ This signal is emitted when a popup is about to be shown. (often used in [PopupMenu] for clearing the list of options and creating a new one according to the current context).
</description>
</signal>
<signal name="popup_hide">
<description>
- This signal is emitted when a popup is hidden.
+ This signal is emitted when a popup is hidden.
</description>
</signal>
</signals>
@@ -29330,10 +29383,10 @@ A similar effect may be achieved moving this node's descendants.
</class>
<class name="PopupDialog" inherits="Popup" category="Core">
<brief_description>
- Base class for Popup Dialogs.
+ Base class for Popup Dialogs.
</brief_description>
<description>
- PopupDialog is a base class for popup dialogs, along with [WindowDialog].
+ PopupDialog is a base class for popup dialogs, along with [WindowDialog].
</description>
<methods>
</methods>
@@ -29342,10 +29395,10 @@ A similar effect may be achieved moving this node's descendants.
</class>
<class name="PopupMenu" inherits="Popup" category="Core">
<brief_description>
- PopupMenu displays a list of options.
+ PopupMenu displays a list of options.
</brief_description>
<description>
- PopupMenu is the typical Control that displays a list of options. They are popular in toolbars or context menus.
+ PopupMenu is the typical Control that displays a list of options. They are popular in toolbars or context menus.
</description>
<methods>
<method name="add_check_item">
@@ -29356,7 +29409,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="2" name="accel" type="int" default="0">
</argument>
<description>
- Add a new checkable item with text "label". An id can optionally be provided, as well as an accelerator. If no id is provided, one will be created from the index. Note that checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually.
+ Add a new checkable item with text "label". An id can optionally be provided, as well as an accelerator. If no id is provided, one will be created from the index. Note that checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually.
</description>
</method>
<method name="add_check_shortcut">
@@ -29377,7 +29430,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="3" name="accel" type="int" default="0">
</argument>
<description>
- Add a new checkable item with text "label" and icon "texture". An id can optionally be provided, as well as an accelerator. If no id is provided, one will be created from the index. Note that checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually.
+ Add a new checkable item with text "label" and icon "texture". An id can optionally be provided, as well as an accelerator. If no id is provided, one will be created from the index. Note that checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually.
</description>
</method>
<method name="add_icon_check_shortcut">
@@ -29400,7 +29453,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="3" name="accel" type="int" default="0">
</argument>
<description>
- Add a new item with text "label" and icon "texture". An id can optionally be provided, as well as an accelerator keybinding. If no id is provided, one will be created from the index.
+ Add a new item with text "label" and icon "texture". An id can optionally be provided, as well as an accelerator keybinding. If no id is provided, one will be created from the index.
</description>
</method>
<method name="add_icon_shortcut">
@@ -29421,12 +29474,12 @@ A similar effect may be achieved moving this node's descendants.
<argument index="2" name="accel" type="int" default="0">
</argument>
<description>
- Add a new item with text "label". An id can optionally be provided, as well as an accelerator keybinding. If no id is provided, one will be created from the index.
+ Add a new item with text "label". An id can optionally be provided, as well as an accelerator keybinding. If no id is provided, one will be created from the index.
</description>
</method>
<method name="add_separator">
<description>
- Add a separator between items. Separators also occupy an index.
+ Add a separator between items. Separators also occupy an index.
</description>
</method>
<method name="add_shortcut">
@@ -29445,12 +29498,12 @@ A similar effect may be achieved moving this node's descendants.
<argument index="2" name="id" type="int" default="-1">
</argument>
<description>
- Adds an item with a submenu. The submenu is the name of a child PopupMenu node that would be shown when the item is clicked. An id can optionally be provided, but if is isn't provided, one will be created from the index.
+ Adds an item with a submenu. The submenu is the name of a child PopupMenu node that would be shown when the item is clicked. An id can optionally be provided, but if is isn't provided, one will be created from the index.
</description>
</method>
<method name="clear">
<description>
- Clear the popup menu, in effect removing all items.
+ Clear the popup menu, in effect removing all items.
</description>
</method>
<method name="get_item_ID" qualifiers="const">
@@ -29459,7 +29512,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="idx" type="int">
</argument>
<description>
- Return the id of the item at index "idx".
+ Return the id of the item at index "idx".
</description>
</method>
<method name="get_item_accelerator" qualifiers="const">
@@ -29468,14 +29521,14 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="idx" type="int">
</argument>
<description>
- Return the accelerator of the item at index "idx". Accelerators are special combinations of keys that activate the item, no matter which control is focused.
+ Return the accelerator of the item at index "idx". Accelerators are special combinations of keys that activate the item, no matter which control is focused.
</description>
</method>
<method name="get_item_count" qualifiers="const">
<return type="int">
</return>
<description>
- Return the amount of items.
+ Return the amount of items.
</description>
</method>
<method name="get_item_icon" qualifiers="const">
@@ -29484,7 +29537,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="idx" type="int">
</argument>
<description>
- Return the icon of the item at index "idx".
+ Return the icon of the item at index "idx".
</description>
</method>
<method name="get_item_index" qualifiers="const">
@@ -29493,14 +29546,14 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="id" type="int">
</argument>
<description>
- Find and return the index of the item containing a given id.
+ Find and return the index of the item containing a given id.
</description>
</method>
<method name="get_item_metadata" qualifiers="const">
<argument index="0" name="idx" type="int">
</argument>
<description>
- Return the metadata of an item, which might be of any type. You can set it with [method set_item_metadata], which provides a simple way of assigning context data to items.
+ Return the metadata of an item, which might be of any type. You can set it with [method set_item_metadata], which provides a simple way of assigning context data to items.
</description>
</method>
<method name="get_item_shortcut" qualifiers="const">
@@ -29517,7 +29570,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="idx" type="int">
</argument>
<description>
- Return the submenu name of the item at index "idx".
+ Return the submenu name of the item at index "idx".
</description>
</method>
<method name="get_item_text" qualifiers="const">
@@ -29526,7 +29579,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="idx" type="int">
</argument>
<description>
- Return the text of the item at index "idx".
+ Return the text of the item at index "idx".
</description>
</method>
<method name="is_item_checkable" qualifiers="const">
@@ -29535,7 +29588,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="idx" type="int">
</argument>
<description>
- Return whether the item at index "idx" has a checkbox. Note that checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually.
+ Return whether the item at index "idx" has a checkbox. Note that checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually.
</description>
</method>
<method name="is_item_checked" qualifiers="const">
@@ -29544,7 +29597,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="idx" type="int">
</argument>
<description>
- Return the checkstate status of the item at index "idx".
+ Return the checkstate status of the item at index "idx".
</description>
</method>
<method name="is_item_disabled" qualifiers="const">
@@ -29553,7 +29606,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="idx" type="int">
</argument>
<description>
- Return whether the item at index "idx" is disabled. When it is disabled it can't be selected, or its action invoked.
+ Return whether the item at index "idx" is disabled. When it is disabled it can't be selected, or its action invoked.
</description>
</method>
<method name="is_item_separator" qualifiers="const">
@@ -29562,14 +29615,14 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="idx" type="int">
</argument>
<description>
- Return whether the item is a seperator. If it is, it would be displayed as a line.
+ Return whether the item is a seperator. If it is, it would be displayed as a line.
</description>
</method>
<method name="remove_item">
<argument index="0" name="idx" type="int">
</argument>
<description>
- Removes the item at index "idx" from the menu. Note that the indexes of items after the removed item are going to be shifted by one.
+ Removes the item at index "idx" from the menu. Note that the indexes of items after the removed item are going to be shifted by one.
</description>
</method>
<method name="set_item_ID">
@@ -29578,7 +29631,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="1" name="id" type="int">
</argument>
<description>
- Set the id of the item at index "idx".
+ Set the id of the item at index "idx".
</description>
</method>
<method name="set_item_accelerator">
@@ -29587,7 +29640,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="1" name="accel" type="int">
</argument>
<description>
- Set the accelerator of the item at index "idx". Accelerators are special combinations of keys that activate the item, no matter which control is focused.
+ Set the accelerator of the item at index "idx". Accelerators are special combinations of keys that activate the item, no matter which control is focused.
</description>
</method>
<method name="set_item_as_checkable">
@@ -29596,7 +29649,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="1" name="enable" type="bool">
</argument>
<description>
- Set whether the item at index "idx" has a checkbox. Note that checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually.
+ Set whether the item at index "idx" has a checkbox. Note that checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually.
</description>
</method>
<method name="set_item_as_separator">
@@ -29605,7 +29658,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="1" name="enable" type="bool">
</argument>
<description>
- Mark the item at index "idx" as a seperator, which means that it would be displayed as a mere line.
+ Mark the item at index "idx" as a seperator, which means that it would be displayed as a mere line.
</description>
</method>
<method name="set_item_checked">
@@ -29614,7 +29667,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="1" name="checked" type="bool">
</argument>
<description>
- Set the checkstate status of the item at index "idx".
+ Set the checkstate status of the item at index "idx".
</description>
</method>
<method name="set_item_disabled">
@@ -29623,7 +29676,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="1" name="disabled" type="bool">
</argument>
<description>
- Sets whether the item at index "idx" is disabled or not. When it is disabled it can't be selected, or its action invoked.
+ Sets whether the item at index "idx" is disabled or not. When it is disabled it can't be selected, or its action invoked.
</description>
</method>
<method name="set_item_icon">
@@ -29632,7 +29685,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="1" name="icon" type="Object">
</argument>
<description>
- Set the icon of the item at index "idx".
+ Set the icon of the item at index "idx".
</description>
</method>
<method name="set_item_metadata">
@@ -29641,7 +29694,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="1" name="metadata" type="Variant">
</argument>
<description>
- Sets the metadata of an item, which might be of any type. You can later get it with [method get_item_metadata], which provides a simple way of assigning context data to items.
+ Sets the metadata of an item, which might be of any type. You can later get it with [method get_item_metadata], which provides a simple way of assigning context data to items.
</description>
</method>
<method name="set_item_shortcut">
@@ -29658,7 +29711,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="1" name="submenu" type="String">
</argument>
<description>
- Sets the submenu of the item at index "idx". The submenu is the name of a child PopupMenu node that would be shown when the item is clicked.
+ Sets the submenu of the item at index "idx". The submenu is the name of a child PopupMenu node that would be shown when the item is clicked.
</description>
</method>
<method name="set_item_text">
@@ -29667,7 +29720,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="1" name="text" type="String">
</argument>
<description>
- Set the text of the item at index "idx".
+ Set the text of the item at index "idx".
</description>
</method>
</methods>
@@ -29676,7 +29729,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="ID" type="int">
</argument>
<description>
- This even is emitted when an item is pressed or its accelerator is activated. The id of the item is returned if it exists, else the index.
+ This even is emitted when an item is pressed or its accelerator is activated. The id of the item is returned if it exists, else the index.
</description>
</signal>
</signals>
@@ -29715,10 +29768,10 @@ A similar effect may be achieved moving this node's descendants.
</class>
<class name="PopupPanel" inherits="Popup" category="Core">
<brief_description>
- Class for displaying popups with a panel background.
+ Class for displaying popups with a panel background.
</brief_description>
<description>
- Class for displaying popups with a panel background. In some cases it might be simpler to use than [Popup], since it provides a configurable background. If you are making windows, better check [WindowDialog].
+ Class for displaying popups with a panel background. In some cases it might be simpler to use than [Popup], since it provides a configurable background. If you are making windows, better check [WindowDialog].
</description>
<methods>
</methods>
@@ -29731,80 +29784,80 @@ A similar effect may be achieved moving this node's descendants.
</class>
<class name="Portal" inherits="VisualInstance" category="Core">
<brief_description>
- Portals provide virtual openings to rooms.
+ Portals provide virtual openings to rooms.
</brief_description>
<description>
- Portals provide virtual openings to [VisualInstance] nodes, so cameras can look at them from the outside. Note that portals are a visibility optimization technique, and are in no way related to the game of the same name (as in, they are not used for teleportation). For more information on how rooms and portals work, see [VisualInstance]. Portals are represented as 2D convex polygon shapes (in the X,Y local plane), and are placed on the surface of the areas occupied by a [VisualInstance], to indicate that the room can be accessed or looked-at through them. If two rooms are next to each other, and two similar portals in each of them share the same world position (and are parallel and opposed to each other), they will automatically "connect" and form "doors" (for example, the portals that connect a kitchen to a living room are placed in the door they share). Portals must always have a [VisualInstance] node as a parent, grandparent or far parent, or else they will not be active.
+ Portals provide virtual openings to [VisualInstance] nodes, so cameras can look at them from the outside. Note that portals are a visibility optimization technique, and are in no way related to the game of the same name (as in, they are not used for teleportation). For more information on how rooms and portals work, see [VisualInstance]. Portals are represented as 2D convex polygon shapes (in the X,Y local plane), and are placed on the surface of the areas occupied by a [VisualInstance], to indicate that the room can be accessed or looked-at through them. If two rooms are next to each other, and two similar portals in each of them share the same world position (and are parallel and opposed to each other), they will automatically "connect" and form "doors" (for example, the portals that connect a kitchen to a living room are placed in the door they share). Portals must always have a [VisualInstance] node as a parent, grandparent or far parent, or else they will not be active.
</description>
<methods>
<method name="get_connect_range" qualifiers="const">
<return type="float">
</return>
<description>
- Return the range for auto-connecting two portals from different rooms sharing the same space.
+ Return the range for auto-connecting two portals from different rooms sharing the same space.
</description>
</method>
<method name="get_disable_distance" qualifiers="const">
<return type="float">
</return>
<description>
- Return the distance threshold for disabling the portal. Every time that the portal goes beyond "distance", it disables itself, becoming the opaque color (see [method set_disabled_color]).
+ Return the distance threshold for disabling the portal. Every time that the portal goes beyond "distance", it disables itself, becoming the opaque color (see [method set_disabled_color]).
</description>
</method>
<method name="get_disabled_color" qualifiers="const">
<return type="Color">
</return>
<description>
- Return the color for when the portal goes beyond the disable distance (see [method set_disable_distance]) and becomes disabled.
+ Return the color for when the portal goes beyond the disable distance (see [method set_disable_distance]) and becomes disabled.
</description>
</method>
<method name="get_shape" qualifiers="const">
<return type="Vector2Array">
</return>
<description>
- Return the portal shape. The shape is an array of [Vector2] points, representing a convex polygon in the X,Y plane.
+ Return the portal shape. The shape is an array of [Vector2] points, representing a convex polygon in the X,Y plane.
</description>
</method>
<method name="is_enabled" qualifiers="const">
<return type="bool">
</return>
<description>
- Return whether the portal is active. When disabled it causes the parent [VisualInstance] to not be visible any longer when looking through the portal.
+ Return whether the portal is active. When disabled it causes the parent [VisualInstance] to not be visible any longer when looking through the portal.
</description>
</method>
<method name="set_connect_range">
<argument index="0" name="range" type="float">
</argument>
<description>
- Set the range for auto-connecting two portals from different rooms sharing the same space.
+ Set the range for auto-connecting two portals from different rooms sharing the same space.
</description>
</method>
<method name="set_disable_distance">
<argument index="0" name="distance" type="float">
</argument>
<description>
- Set the distance threshold for disabling the portal. Every time that the portal goes beyond "distance", it disables itself, becoming the opaque color (see [method set_disabled_color]).
+ Set the distance threshold for disabling the portal. Every time that the portal goes beyond "distance", it disables itself, becoming the opaque color (see [method set_disabled_color]).
</description>
</method>
<method name="set_disabled_color">
<argument index="0" name="color" type="Color">
</argument>
<description>
- When the portal goes beyond the disable distance (see [method set_disable_distance]), it becomes opaque and displayed with color "color".
+ When the portal goes beyond the disable distance (see [method set_disable_distance]), it becomes opaque and displayed with color "color".
</description>
</method>
<method name="set_enabled">
<argument index="0" name="enable" type="bool">
</argument>
<description>
- Enable the portal (it is enabled by default though), disabling it will cause the parent [VisualInstance] to not be visible any longer when looking through the portal.
+ Enable the portal (it is enabled by default though), disabling it will cause the parent [VisualInstance] to not be visible any longer when looking through the portal.
</description>
</method>
<method name="set_shape">
<argument index="0" name="points" type="Vector2Array">
</argument>
<description>
- Set the portal shape. The shape is an array of [Vector2] points, representing a convex polygon in the X,Y plane.
+ Set the portal shape. The shape is an array of [Vector2] points, representing a convex polygon in the X,Y plane.
</description>
</method>
</methods>
@@ -29813,10 +29866,10 @@ A similar effect may be achieved moving this node's descendants.
</class>
<class name="Position2D" inherits="Node2D" category="Core">
<brief_description>
- Generic 2D Position hint for editing.
+ Generic 2D Position hint for editing.
</brief_description>
<description>
- Generic 2D Position hint for editing. It's just like a plain [Node2D] but displays as a cross in the 2D-Editor at all times.
+ Generic 2D Position hint for editing. It's just like a plain [Node2D] but displays as a cross in the 2D-Editor at all times.
</description>
<methods>
</methods>
@@ -29825,10 +29878,10 @@ A similar effect may be achieved moving this node's descendants.
</class>
<class name="Position3D" inherits="Spatial" category="Core">
<brief_description>
- Generic 3D Position hint for editing
+ Generic 3D Position hint for editing
</brief_description>
<description>
- Generic 3D Position hint for editing. It's just like a plain [Spatial] but displays as a cross in the 3D-Editor at all times.
+ Generic 3D Position hint for editing. It's just like a plain [Spatial] but displays as a cross in the 3D-Editor at all times.
</description>
<methods>
</methods>
@@ -29837,10 +29890,10 @@ A similar effect may be achieved moving this node's descendants.
</class>
<class name="ProgressBar" inherits="Range" category="Core">
<brief_description>
- General purpose progress bar.
+ General purpose progress bar.
</brief_description>
<description>
- General purpose progress bar. Shows fill percentage from right to left.
+ General purpose progress bar. Shows fill percentage from right to left.
</description>
<methods>
<method name="is_percent_visible" qualifiers="const">
@@ -29873,10 +29926,10 @@ A similar effect may be achieved moving this node's descendants.
</class>
<class name="ProximityGroup" inherits="Spatial" category="Core">
<brief_description>
- General purpose proximity-detection node.
+ General purpose proximity-detection node.
</brief_description>
<description>
- General purpose proximity-detection node.
+ General purpose proximity-detection node.
</description>
<methods>
<method name="broadcast">
@@ -29985,10 +30038,10 @@ A similar effect may be achieved moving this node's descendants.
</class>
<class name="Quat" category="Built-In Types">
<brief_description>
- Quaternion.
+ Quaternion.
</brief_description>
<description>
- Quaternion is a 4 dimensional vector that is used to represent a rotation. It mainly exists to perform SLERP (spherical-linear interpolation) between to rotations obtained by a Matrix3 cheaply. Adding quaternions also cheaply adds the rotations, however quaternions need to be often normalized, or else they suffer from precision issues.
+ Quaternion is a 4 dimensional vector that is used to represent a rotation. It mainly exists to perform SLERP (spherical-linear interpolation) between to rotations obtained by a Matrix3 cheaply. Adding quaternions also cheaply adds the rotations, however quaternions need to be often normalized, or else they suffer from precision issues.
</description>
<methods>
<method name="Quat">
@@ -30043,35 +30096,35 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="b" type="Quat">
</argument>
<description>
- Returns the dot product between two quaternions.
+ Returns the dot product between two quaternions.
</description>
</method>
<method name="inverse">
<return type="Quat">
</return>
<description>
- Returns the inverse of the quaternion (applies to the inverse rotation too).
+ Returns the inverse of the quaternion (applies to the inverse rotation too).
</description>
</method>
<method name="length">
<return type="float">
</return>
<description>
- Returns the length of the quaternion.
+ Returns the length of the quaternion.
</description>
</method>
<method name="length_squared">
<return type="float">
</return>
<description>
- Returns the length of the quaternion, squared.
+ Returns the length of the quaternion, squared.
</description>
</method>
<method name="normalized">
<return type="Quat">
</return>
<description>
- Returns a copy of the quaternion, normalized to unit length.
+ Returns a copy of the quaternion, normalized to unit length.
</description>
</method>
<method name="slerp">
@@ -30082,7 +30135,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="1" name="t" type="float">
</argument>
<description>
- Perform a spherical-linear interpolation with another quaternion.
+ Perform a spherical-linear interpolation with another quaternion.
</description>
</method>
<method name="slerpni">
@@ -30143,52 +30196,52 @@ A similar effect may be achieved moving this node's descendants.
</class>
<class name="Range" inherits="Control" category="Core">
<brief_description>
- Abstract base class for range-based controls.
+ Abstract base class for range-based controls.
</brief_description>
<description>
- Range is a base class for [Control] nodes that change a floating point [i]value[/i] between a [i]minimum[/i] and a [i]maximum[/i], using [i]step[/i] and [i]page[/i], for example a [ScrollBar].
+ Range is a base class for [Control] nodes that change a floating point [i]value[/i] between a [i]minimum[/i] and a [i]maximum[/i], using [i]step[/i] and [i]page[/i], for example a [ScrollBar].
</description>
<methods>
<method name="get_max" qualifiers="const">
<return type="float">
</return>
<description>
- Return the maximum value.
+ Return the maximum value.
</description>
</method>
<method name="get_min" qualifiers="const">
<return type="float">
</return>
<description>
- Return the minimum value.
+ Return the minimum value.
</description>
</method>
<method name="get_page" qualifiers="const">
<return type="float">
</return>
<description>
- Return the page size, if page is 0, paging is disabled.
+ Return the page size, if page is 0, paging is disabled.
</description>
</method>
<method name="get_step" qualifiers="const">
<return type="float">
</return>
<description>
- Return the stepping, if step is 0, stepping is disabled.
+ Return the stepping, if step is 0, stepping is disabled.
</description>
</method>
<method name="get_unit_value" qualifiers="const">
<return type="float">
</return>
<description>
- Return value mapped to 0 to 1 (unit) range.
+ Return value mapped to 0 to 1 (unit) range.
</description>
</method>
<method name="get_val" qualifiers="const">
<return type="float">
</return>
<description>
- Return the current value.
+ Return the current value.
</description>
</method>
<method name="get_value" qualifiers="const">
@@ -30225,14 +30278,14 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="minimum" type="float">
</argument>
<description>
- Set minimum value, clamped range value to it if it's less.
+ Set minimum value, clamped range value to it if it's less.
</description>
</method>
<method name="set_page">
<argument index="0" name="pagesize" type="float">
</argument>
<description>
- Set page size. Page is mainly used for scrollbars or anything that controls text scrolling.
+ Set page size. Page is mainly used for scrollbars or anything that controls text scrolling.
</description>
</method>
<method name="set_rounded_values">
@@ -30245,14 +30298,14 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="step" type="float">
</argument>
<description>
- Set step value. If step is 0, stepping will be disabled.
+ Set step value. If step is 0, stepping will be disabled.
</description>
</method>
<method name="set_unit_value">
<argument index="0" name="value" type="float">
</argument>
<description>
- Set value mapped to 0 to 1 (unit) range, it will then be converted to the actual value within min and max.
+ Set value mapped to 0 to 1 (unit) range, it will then be converted to the actual value within min and max.
</description>
</method>
<method name="set_val">
@@ -30281,14 +30334,14 @@ A similar effect may be achieved moving this node's descendants.
<signals>
<signal name="changed">
<description>
- This signal is emitted when min, max, range or step change.
+ This signal is emitted when min, max, range or step change.
</description>
</signal>
<signal name="value_changed">
<argument index="0" name="value" type="float">
</argument>
<description>
- This signal is emitted when value changes.
+ This signal is emitted when value changes.
</description>
</signal>
</signals>
@@ -30297,10 +30350,10 @@ A similar effect may be achieved moving this node's descendants.
</class>
<class name="RawArray" category="Built-In Types">
<brief_description>
- Raw byte array.
+ Raw byte array.
</brief_description>
<description>
- Raw byte array. Contains bytes. Optimized for memory usage, can't fragment the memory.
+ Raw byte array. Contains bytes. Optimized for memory usage, can't fragment the memory.
</description>
<methods>
<method name="RawArray">
@@ -30309,7 +30362,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="from" type="Array">
</argument>
<description>
- Create from a generic array.
+ Create from a generic array.
</description>
</method>
<method name="append">
@@ -30322,21 +30375,21 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="array" type="RawArray">
</argument>
<description>
- Append an [RawArray] at the end of this array.
+ Append an [RawArray] at the end of this array.
</description>
</method>
<method name="get_string_from_ascii">
<return type="String">
</return>
<description>
- Returns a copy of the array's contents formatted as String. Fast alternative to get_string_from_utf8(), assuming the content is ASCII-only (unlike the UTF-8 function, this function maps every byte to a character in the string, so any multibyte sequence will be torn apart).
+ Returns a copy of the array's contents formatted as String. Fast alternative to get_string_from_utf8(), assuming the content is ASCII-only (unlike the UTF-8 function, this function maps every byte to a character in the string, so any multibyte sequence will be torn apart).
</description>
</method>
<method name="get_string_from_utf8">
<return type="String">
</return>
<description>
- Returns a copy of the array's contents formatted as String, assuming the array is formatted as UTF-8. Slower than get_string_from_ascii(), but works for UTF-8. Usually you should prefer this function over get_string_from_ascii() to support international input.
+ Returns a copy of the array's contents formatted as String, assuming the array is formatted as UTF-8. Slower than get_string_from_ascii(), but works for UTF-8. Usually you should prefer this function over get_string_from_ascii() to support international input.
</description>
</method>
<method name="insert">
@@ -30347,33 +30400,33 @@ A similar effect may be achieved moving this node's descendants.
<argument index="1" name="byte" type="int">
</argument>
<description>
- Insert a new element at a given position in the array. The position must be valid, or at the end of the array (pos==size()).
+ Insert a new element at a given position in the array. The position must be valid, or at the end of the array (pos==size()).
</description>
</method>
<method name="invert">
<description>
- Reverse the order of the elements in the array (so first element will now be the last).
+ Reverse the order of the elements in the array (so first element will now be the last).
</description>
</method>
<method name="push_back">
<argument index="0" name="byte" type="int">
</argument>
<description>
- Append an element at the end of the array.
+ Append an element at the end of the array.
</description>
</method>
<method name="remove">
<argument index="0" name="idx" type="int">
</argument>
<description>
- Remove an element from the array by index.
+ Remove an element from the array by index.
</description>
</method>
<method name="resize">
<argument index="0" name="idx" type="int">
</argument>
<description>
- Set the size of the [RawArray]. If larger than the current size it will reserve some space beforehand, and if it is smaller it will cut off the array.
+ Set the size of the [RawArray]. If larger than the current size it will reserve some space beforehand, and if it is smaller it will cut off the array.
</description>
</method>
<method name="set">
@@ -30382,14 +30435,14 @@ A similar effect may be achieved moving this node's descendants.
<argument index="1" name="byte" type="int">
</argument>
<description>
- Change the byte at the given index.
+ Change the byte at the given index.
</description>
</method>
<method name="size">
<return type="int">
</return>
<description>
- Return the size of the array.
+ Return the size of the array.
</description>
</method>
</methods>
@@ -30514,17 +30567,17 @@ A similar effect may be achieved moving this node's descendants.
</class>
<class name="RayCast2D" inherits="Node2D" category="Core">
<brief_description>
- Query the closest object intersecting a ray
+ Query the closest object intersecting a ray
</brief_description>
<description>
- A RayCast2D represents a line from its origin to its destination position [code]cast_to[/code], it is used to query the 2D space in order to find the closest object intersecting with the ray.
+ A RayCast2D represents a line from its origin to its destination position [code]cast_to[/code], it is used to query the 2D space in order to find the closest object intersecting with the ray.
</description>
<methods>
<method name="add_exception">
<argument index="0" name="node" type="Object">
</argument>
<description>
- Adds a collision exception so the ray does not report collisions with the specified [code]node[/code].
+ Adds a collision exception so the ray does not report collisions with the specified [code]node[/code].
</description>
</method>
<method name="add_exception_rid">
@@ -30535,49 +30588,49 @@ A similar effect may be achieved moving this node's descendants.
</method>
<method name="clear_exceptions">
<description>
- Removes all collision exception for this ray.
+ Removes all collision exception for this ray.
</description>
</method>
<method name="get_cast_to" qualifiers="const">
<return type="Vector2">
</return>
<description>
- Return the destination point of this ray object
+ Return the destination point of this ray object
</description>
</method>
<method name="get_collider" qualifiers="const">
<return type="Object">
</return>
<description>
- Return the closest object the ray is pointing to. Note that this does not consider the length of the vector, so you must also use [method is_colliding] to check if the object returned is actually colliding with the ray.
+ Return the closest object the ray is pointing to. Note that this does not consider the length of the vector, so you must also use [method is_colliding] to check if the object returned is actually colliding with the ray.
</description>
</method>
<method name="get_collider_shape" qualifiers="const">
<return type="int">
</return>
<description>
- Returns the collision shape of the closest object the ray is pointing to.
+ Returns the collision shape of the closest object the ray is pointing to.
</description>
</method>
<method name="get_collision_normal" qualifiers="const">
<return type="Vector2">
</return>
<description>
- Returns the normal of the intersecting object shape face containing the collision point.
+ Returns the normal of the intersecting object shape face containing the collision point.
</description>
</method>
<method name="get_collision_point" qualifiers="const">
<return type="Vector2">
</return>
<description>
- Returns the collision point in which the ray intersects the closest object.
+ Returns the collision point in which the ray intersects the closest object.
</description>
</method>
<method name="get_layer_mask" qualifiers="const">
<return type="int">
</return>
<description>
- Returns the layer mask for this ray.
+ Returns the layer mask for this ray.
</description>
</method>
<method name="get_type_mask" qualifiers="const">
@@ -30590,21 +30643,21 @@ A similar effect may be achieved moving this node's descendants.
<return type="bool">
</return>
<description>
- Return whether the closest object the ray is pointing to is colliding with the vector (considering the vector length).
+ Return whether the closest object the ray is pointing to is colliding with the vector (considering the vector length).
</description>
</method>
<method name="is_enabled" qualifiers="const">
<return type="bool">
</return>
<description>
- Returns whether this raycast is enabled or not
+ Returns whether this raycast is enabled or not
</description>
</method>
<method name="remove_exception">
<argument index="0" name="node" type="Object">
</argument>
<description>
- Removes a collision exception so the ray does report collisions with the specified [code]node[/code].
+ Removes a collision exception so the ray does report collisions with the specified [code]node[/code].
</description>
</method>
<method name="remove_exception_rid">
@@ -30617,14 +30670,14 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="local_point" type="Vector2">
</argument>
<description>
- Sets the ray destination point, so that the ray will test from the ray's origin to [code]local_point[/code]
+ Sets the ray destination point, so that the ray will test from the ray's origin to [code]local_point[/code]
</description>
</method>
<method name="set_enabled">
<argument index="0" name="enabled" type="bool">
</argument>
<description>
- Enables the RayCast2D. Only enabled raycasts will be able to query the space and report collisions.
+ Enables the RayCast2D. Only enabled raycasts will be able to query the space and report collisions.
</description>
</method>
<method name="set_layer_mask">
@@ -30667,24 +30720,24 @@ A similar effect may be achieved moving this node's descendants.
</class>
<class name="RayShape2D" inherits="Shape2D" category="Core">
<brief_description>
- Ray 2D shape resource for physics.
+ Ray 2D shape resource for physics.
</brief_description>
<description>
- Ray 2D shape resource for physics. A ray is not really a collision body, instead it tries to separate itself from whatever is touching its far endpoint. It's often useful for characters.
+ Ray 2D shape resource for physics. A ray is not really a collision body, instead it tries to separate itself from whatever is touching its far endpoint. It's often useful for characters.
</description>
<methods>
<method name="get_length" qualifiers="const">
<return type="float">
</return>
<description>
- Return the length of the ray.
+ Return the length of the ray.
</description>
</method>
<method name="set_length">
<argument index="0" name="length" type="float">
</argument>
<description>
- Set the length of the ray.
+ Set the length of the ray.
</description>
</method>
</methods>
@@ -30693,10 +30746,10 @@ A similar effect may be achieved moving this node's descendants.
</class>
<class name="RealArray" category="Built-In Types">
<brief_description>
- Real Array .
+ Real Array .
</brief_description>
<description>
- Real Array. Array of floating point values. Can only contain floats. Optimized for memory usage, can't fragment the memory.
+ Real Array. Array of floating point values. Can only contain floats. Optimized for memory usage, can't fragment the memory.
</description>
<methods>
<method name="RealArray">
@@ -30705,21 +30758,21 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="from" type="Array">
</argument>
<description>
- Create from a generic array.
+ Create from a generic array.
</description>
</method>
<method name="append">
<argument index="0" name="value" type="float">
</argument>
<description>
- Append an element at the end of the array (alias of [method push_back]).
+ Append an element at the end of the array (alias of [method push_back]).
</description>
</method>
<method name="append_array">
<argument index="0" name="array" type="RealArray">
</argument>
<description>
- Append an [RealArray] at the end of this array.
+ Append an [RealArray] at the end of this array.
</description>
</method>
<method name="insert">
@@ -30730,33 +30783,33 @@ A similar effect may be achieved moving this node's descendants.
<argument index="1" name="value" type="float">
</argument>
<description>
- Insert a new element at a given position in the array. The position must be valid, or at the end of the array (pos==size()).
+ Insert a new element at a given position in the array. The position must be valid, or at the end of the array (pos==size()).
</description>
</method>
<method name="invert">
<description>
- Reverse the order of the elements in the array (so first element will now be the last).
+ Reverse the order of the elements in the array (so first element will now be the last).
</description>
</method>
<method name="push_back">
<argument index="0" name="value" type="float">
</argument>
<description>
- Append an element at the end of the array.
+ Append an element at the end of the array.
</description>
</method>
<method name="remove">
<argument index="0" name="idx" type="int">
</argument>
<description>
- Remove an element from the array by index.
+ Remove an element from the array by index.
</description>
</method>
<method name="resize">
<argument index="0" name="idx" type="int">
</argument>
<description>
- Set the size of the [RealArray]. If larger than the current size it will reserve some space beforehand, and if it is smaller it will cut off the array.
+ Set the size of the [RealArray]. If larger than the current size it will reserve some space beforehand, and if it is smaller it will cut off the array.
</description>
</method>
<method name="set">
@@ -30765,14 +30818,14 @@ A similar effect may be achieved moving this node's descendants.
<argument index="1" name="value" type="float">
</argument>
<description>
- Change the float at the given index.
+ Change the float at the given index.
</description>
</method>
<method name="size">
<return type="int">
</return>
<description>
- Return the size of the array.
+ Return the size of the array.
</description>
</method>
</methods>
@@ -30781,10 +30834,10 @@ A similar effect may be achieved moving this node's descendants.
</class>
<class name="Rect2" category="Built-In Types">
<brief_description>
- 2D Axis-aligned bounding box.
+ 2D Axis-aligned bounding box.
</brief_description>
<description>
- Rect2 provides an 2D Axis-Aligned Bounding Box. It consists of a position, a size, and several utility functions. It is typically used for fast overlap tests.
+ Rect2 provides an 2D Axis-Aligned Bounding Box. It consists of a position, a size, and several utility functions. It is typically used for fast overlap tests.
</description>
<methods>
<method name="Rect2">
@@ -30795,7 +30848,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="1" name="size" type="Vector2">
</argument>
<description>
- Construct a [Rect2] by position and size.
+ Construct a [Rect2] by position and size.
</description>
</method>
<method name="Rect2">
@@ -30810,7 +30863,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="3" name="height" type="float">
</argument>
<description>
- Construct a [Rect2] by x, y, width and height.
+ Construct a [Rect2] by x, y, width and height.
</description>
</method>
<method name="clip">
@@ -30819,7 +30872,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="b" type="Rect2">
</argument>
<description>
- Returns the intersection of this [Rect2] and b.
+ Returns the intersection of this [Rect2] and b.
</description>
</method>
<method name="encloses">
@@ -30828,7 +30881,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="b" type="Rect2">
</argument>
<description>
- Returns true if this [Rect2] completely encloses another one.
+ Returns true if this [Rect2] completely encloses another one.
</description>
</method>
<method name="expand">
@@ -30837,14 +30890,14 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="to" type="Vector2">
</argument>
<description>
- Return this [Rect2] expanded to include a given point.
+ Return this [Rect2] expanded to include a given point.
</description>
</method>
<method name="get_area">
<return type="float">
</return>
<description>
- Get the area of the [Rect2].
+ Get the area of the [Rect2].
</description>
</method>
<method name="grow">
@@ -30853,14 +30906,14 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="by" type="float">
</argument>
<description>
- Return a copy of the [Rect2] grown a given amount of units towards all the sides.
+ Return a copy of the [Rect2] grown a given amount of units towards all the sides.
</description>
</method>
<method name="has_no_area">
<return type="bool">
</return>
<description>
- Return true if the [Rect2] is flat or empty.
+ Return true if the [Rect2] is flat or empty.
</description>
</method>
<method name="has_point">
@@ -30869,7 +30922,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="point" type="Vector2">
</argument>
<description>
- Return true if the [Rect2] contains a point.
+ Return true if the [Rect2] contains a point.
</description>
</method>
<method name="intersects">
@@ -30878,7 +30931,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="b" type="Rect2">
</argument>
<description>
- Return true if the [Rect2] overlaps with another.
+ Return true if the [Rect2] overlaps with another.
</description>
</method>
<method name="merge">
@@ -30887,7 +30940,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="b" type="Rect2">
</argument>
<description>
- Combine this [Rect2] with another, a larger one is returned that contains both.
+ Combine this [Rect2] with another, a larger one is returned that contains both.
</description>
</method>
</methods>
@@ -30907,24 +30960,24 @@ A similar effect may be achieved moving this node's descendants.
</class>
<class name="RectangleShape2D" inherits="Shape2D" category="Core">
<brief_description>
- Rectangle Shape for 2D Physics.
+ Rectangle Shape for 2D Physics.
</brief_description>
<description>
- Rectangle Shape for 2D Physics. This shape is useful for modeling box-like 2D objects.
+ Rectangle Shape for 2D Physics. This shape is useful for modeling box-like 2D objects.
</description>
<methods>
<method name="get_extents" qualifiers="const">
<return type="Vector2">
</return>
<description>
- Return the half extents, the actual width and height of this shape is twice the half extents.
+ Return the half extents, the actual width and height of this shape is twice the half extents.
</description>
</method>
<method name="set_extents">
<argument index="0" name="extents" type="Vector2">
</argument>
<description>
- Set the half extents, the actual width and height of this shape is twice the half extents.
+ Set the half extents, the actual width and height of this shape is twice the half extents.
</description>
</method>
</methods>
@@ -30933,10 +30986,10 @@ A similar effect may be achieved moving this node's descendants.
</class>
<class name="Reference" inherits="Object" category="Core">
<brief_description>
- Base class for anything that keeps a reference count.
+ Base class for anything that keeps a reference count.
</brief_description>
<description>
- Base class for anything that keeps a reference count. Resource and many other helper objects inherit this. References keep an internal reference counter so they are only released when no longer in use.
+ Base class for anything that keeps a reference count. Resource and many other helper objects inherit this. References keep an internal reference counter so they are only released when no longer in use.
</description>
<methods>
<method name="init_ref">
@@ -30947,14 +31000,14 @@ A similar effect may be achieved moving this node's descendants.
</method>
<method name="reference">
<description>
- Increase the internal reference counter. Use this only if you really know what you are doing.
+ Increase the internal reference counter. Use this only if you really know what you are doing.
</description>
</method>
<method name="unreference">
<return type="bool">
</return>
<description>
- Decrease the internal reference counter. Use this only if you really know what you are doing.
+ Decrease the internal reference counter. Use this only if you really know what you are doing.
</description>
</method>
</methods>
@@ -30963,10 +31016,10 @@ A similar effect may be achieved moving this node's descendants.
</class>
<class name="ReferenceFrame" inherits="Control" category="Core">
<brief_description>
- Reference frame for GUI.
+ Reference frame for GUI.
</brief_description>
<description>
- Reference frame for GUI. It's just like an empty control, except a red box is displayed while editing around its size at all times.
+ Reference frame for GUI. It's just like an empty control, except a red box is displayed while editing around its size at all times.
</description>
<methods>
</methods>
@@ -30979,13 +31032,13 @@ A similar effect may be achieved moving this node's descendants.
</class>
<class name="RegEx" inherits="Reference" category="Core">
<brief_description>
- Simple regular expression matcher.
+ Simple regular expression matcher.
</brief_description>
<description>
- Class for finding text patterns in a string using regular expressions. Regular expressions are a way to define patterns of text to be searched.
- This class only finds patterns in a string. It can not perform replacements.
- Usage of regular expressions is too long to be explained here, but Internet is full of tutorials and detailed explanations.
- Currently supported features:
+ Class for finding text patterns in a string using regular expressions. Regular expressions are a way to define patterns of text to be searched.
+ This class only finds patterns in a string. It can not perform replacements.
+ Usage of regular expressions is too long to be explained here, but Internet is full of tutorials and detailed explanations.
+ Currently supported features:
Capturing [code]()[/code] and non-capturing [code](?:)[/code] groups
Any character [code].[/code]
Shorthand character classes [code]\w \W \s \S \d \D[/code]
@@ -31004,7 +31057,7 @@ A similar effect may be achieved moving this node's descendants.
<methods>
<method name="clear">
<description>
- This method resets the state of the object, as it was freshly created. Namely, it unassigns the regular expression of this object, and forgets all captures made by the last [method find].
+ This method resets the state of the object, as it was freshly created. Namely, it unassigns the regular expression of this object, and forgets all captures made by the last [method find].
</description>
</method>
<method name="compile">
@@ -31015,7 +31068,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="1" name="capture" type="int" default="9">
</argument>
<description>
- Compiles and assign the regular expression pattern to use. The limit on the number of capturing groups can be specified or made unlimited if negative.
+ Compiles and assign the regular expression pattern to use. The limit on the number of capturing groups can be specified or made unlimited if negative.
</description>
</method>
<method name="find" qualifiers="const">
@@ -31028,7 +31081,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="2" name="end" type="int" default="-1">
</argument>
<description>
- This method tries to find the pattern within the string, and returns the position where it was found. It also stores any capturing group (see [method get_capture]) for further retrieval.
+ This method tries to find the pattern within the string, and returns the position where it was found. It also stores any capturing group (see [method get_capture]) for further retrieval.
</description>
</method>
<method name="get_capture" qualifiers="const">
@@ -31037,14 +31090,14 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="capture" type="int">
</argument>
<description>
- Returns a captured group. A captured group is the part of a string that matches a part of the pattern delimited by parentheses (unless they are non-capturing parentheses [i](?:)[/i]).
+ Returns a captured group. A captured group is the part of a string that matches a part of the pattern delimited by parentheses (unless they are non-capturing parentheses [i](?:)[/i]).
</description>
</method>
<method name="get_capture_count" qualifiers="const">
<return type="int">
</return>
<description>
- Returns the number of capturing groups. A captured group is the part of a string that matches a part of the pattern delimited by parentheses (unless they are non-capturing parentheses [i](?:)[/i]).
+ Returns the number of capturing groups. A captured group is the part of a string that matches a part of the pattern delimited by parentheses (unless they are non-capturing parentheses [i](?:)[/i]).
</description>
</method>
<method name="get_capture_start" qualifiers="const">
@@ -31059,14 +31112,14 @@ A similar effect may be achieved moving this node's descendants.
<return type="StringArray">
</return>
<description>
- Return a list of all the captures made by the regular expression.
+ Return a list of all the captures made by the regular expression.
</description>
</method>
<method name="is_valid" qualifiers="const">
<return type="bool">
</return>
<description>
- Returns whether this object has a valid regular expression assigned.
+ Returns whether this object has a valid regular expression assigned.
</description>
</method>
</methods>
@@ -31107,10 +31160,10 @@ A similar effect may be achieved moving this node's descendants.
</class>
<class name="Resource" inherits="Reference" category="Core">
<brief_description>
- Base class for all resources.
+ Base class for all resources.
</brief_description>
<description>
- Resource is the base class for all resource types. Resources are primarily data containers. They are reference counted and freed when no longer in use. They are also loaded only once from disk, and further attempts to load the resource will return the same reference (all this in contrast to a [Node], which is not reference counted and can be instanced from disk as many times as desired). Resources can be saved externally on disk or bundled into another object, such as a [Node] or another resource.
+ Resource is the base class for all resource types. Resources are primarily data containers. They are reference counted and freed when no longer in use. They are also loaded only once from disk, and further attempts to load the resource will return the same reference (all this in contrast to a [Node], which is not reference counted and can be instanced from disk as many times as desired). Resources can be saved externally on disk or bundled into another object, such as a [Node] or another resource.
</description>
<methods>
<method name="duplicate">
@@ -31131,21 +31184,21 @@ A similar effect may be achieved moving this node's descendants.
<return type="String">
</return>
<description>
- Return the name of the resources, any name is valid (it doesn't have to be unique). Name is for descriptive purposes only.
+ Return the name of the resources, any name is valid (it doesn't have to be unique). Name is for descriptive purposes only.
</description>
</method>
<method name="get_path" qualifiers="const">
<return type="String">
</return>
<description>
- Return the path of the resource. This is useful mainly for editors when saving/loading, and shouldn't be changed by anything else.
+ Return the path of the resource. This is useful mainly for editors when saving/loading, and shouldn't be changed by anything else.
</description>
</method>
<method name="get_rid" qualifiers="const">
<return type="RID">
</return>
<description>
- Return the RID of the resource (or an empty RID). Many resources (such as [Texture], [Mesh], etc) are high level abstractions of resources stored in a server, so this function will return the original RID.
+ Return the RID of the resource (or an empty RID). Many resources (such as [Texture], [Mesh], etc) are high level abstractions of resources stored in a server, so this function will return the original RID.
</description>
</method>
<method name="set_import_metadata">
@@ -31158,21 +31211,21 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="name" type="String">
</argument>
<description>
- Set the name of the resources, any name is valid (it doesn't have to be unique). Name is for descriptive purposes only.
+ Set the name of the resources, any name is valid (it doesn't have to be unique). Name is for descriptive purposes only.
</description>
</method>
<method name="set_path">
<argument index="0" name="path" type="String">
</argument>
<description>
- Set the path of the resource. This is useful mainly for editors when saving/loading, and shouldn't be changed by anything else. Fails if another [Resource] already has path "path".
+ Set the path of the resource. This is useful mainly for editors when saving/loading, and shouldn't be changed by anything else. Fails if another [Resource] already has path "path".
</description>
</method>
<method name="take_over_path">
<argument index="0" name="path" type="String">
</argument>
<description>
- Set the path of the resource. Differs from set_path(), if another [Resource] exists with "path" it over-takes it, instead of failing.
+ Set the path of the resource. Differs from set_path(), if another [Resource] exists with "path" it over-takes it, instead of failing.
</description>
</method>
</methods>
@@ -31273,38 +31326,38 @@ A similar effect may be achieved moving this node's descendants.
</class>
<class name="ResourceInteractiveLoader" inherits="Reference" category="Core">
<brief_description>
- Interactive Resource Loader.
+ Interactive Resource Loader.
</brief_description>
<description>
- Interactive Resource Loader. This object is returned by ResourceLoader when performing an interactive load. It allows to load with high granularity, so this is mainly useful for displaying load bars/percentages.
+ Interactive Resource Loader. This object is returned by ResourceLoader when performing an interactive load. It allows to load with high granularity, so this is mainly useful for displaying load bars/percentages.
</description>
<methods>
<method name="get_resource">
<return type="Object">
</return>
<description>
- Return the loaded resource (only if loaded). Otherwise, returns null.
+ Return the loaded resource (only if loaded). Otherwise, returns null.
</description>
</method>
<method name="get_stage" qualifiers="const">
<return type="int">
</return>
<description>
- Return the load stage. The total amount of stages can be queried with [method get_stage_count]
+ Return the load stage. The total amount of stages can be queried with [method get_stage_count]
</description>
</method>
<method name="get_stage_count" qualifiers="const">
<return type="int">
</return>
<description>
- Return the total amount of stages (calls to [method poll]) needed to completely load this resource.
+ Return the total amount of stages (calls to [method poll]) needed to completely load this resource.
</description>
</method>
<method name="poll">
<return type="int">
</return>
<description>
- Poll the load. If OK is returned, this means poll will have to be called again. If ERR_EOF is returned, them the load has finished and the resource can be obtained by calling [method get_resource].
+ Poll the load. If OK is returned, this means poll will have to be called again. If ERR_EOF is returned, them the load has finished and the resource can be obtained by calling [method get_resource].
</description>
</method>
<method name="wait">
@@ -31319,10 +31372,10 @@ A similar effect may be achieved moving this node's descendants.
</class>
<class name="ResourceLoader" inherits="Object" category="Core">
<brief_description>
- Resource Loader.
+ Resource Loader.
</brief_description>
<description>
- Resource Loader. This is a static object accessible as [ResourceLoader]. GDScript has a simplified load() function, though.
+ Resource Loader. This is a static object accessible as [ResourceLoader]. GDScript has a simplified load() function, though.
</description>
<methods>
<method name="get_dependencies">
@@ -31339,7 +31392,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="type" type="String">
</argument>
<description>
- Return the list of recognized extensions for a resource type.
+ Return the list of recognized extensions for a resource type.
</description>
</method>
<method name="has">
@@ -31378,14 +31431,14 @@ A similar effect may be achieved moving this node's descendants.
<argument index="1" name="type_hint" type="String" default="&quot;&quot;">
</argument>
<description>
- Load a resource interactively, the returned object allows to load with high granularity.
+ Load a resource interactively, the returned object allows to load with high granularity.
</description>
</method>
<method name="set_abort_on_missing_resources">
<argument index="0" name="abort" type="bool">
</argument>
<description>
- Change the behavior on missing sub-resources. Default is to abort load.
+ Change the behavior on missing sub-resources. Default is to abort load.
</description>
</method>
</methods>
@@ -31394,10 +31447,10 @@ A similar effect may be achieved moving this node's descendants.
</class>
<class name="ResourcePreloader" inherits="Node" category="Core">
<brief_description>
- Resource Preloader Node.
+ Resource Preloader Node.
</brief_description>
<description>
- Resource Preloader Node. This node is used to preload sub-resources inside a scene, so when the scene is loaded all the resources are ready to use and be retrieved from here.
+ Resource Preloader Node. This node is used to preload sub-resources inside a scene, so when the scene is loaded all the resources are ready to use and be retrieved from here.
</description>
<methods>
<method name="add_resource">
@@ -31406,7 +31459,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="1" name="resource" type="Object">
</argument>
<description>
- Add a resource to the preloader. Set the text-id that will be used to identify it (retrieve it/erase it/etc).
+ Add a resource to the preloader. Set the text-id that will be used to identify it (retrieve it/erase it/etc).
</description>
</method>
<method name="get_resource" qualifiers="const">
@@ -31415,14 +31468,14 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="name" type="String">
</argument>
<description>
- Return the resource given a text-id.
+ Return the resource given a text-id.
</description>
</method>
<method name="get_resource_list" qualifiers="const">
<return type="StringArray">
</return>
<description>
- Return the list of resources inside the preloader.
+ Return the list of resources inside the preloader.
</description>
</method>
<method name="has_resource" qualifiers="const">
@@ -31431,14 +31484,14 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="name" type="String">
</argument>
<description>
- Return true if the preloader has a given resource.
+ Return true if the preloader has a given resource.
</description>
</method>
<method name="remove_resource">
<argument index="0" name="name" type="String">
</argument>
<description>
- Remove a resource from the preloader by text id.
+ Remove a resource from the preloader by text id.
</description>
</method>
<method name="rename_resource">
@@ -31447,7 +31500,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="1" name="newname" type="String">
</argument>
<description>
- Rename a resource inside the preloader, from a text-id to a new text-id.
+ Rename a resource inside the preloader, from a text-id to a new text-id.
</description>
</method>
</methods>
@@ -31456,10 +31509,10 @@ A similar effect may be achieved moving this node's descendants.
</class>
<class name="ResourceSaver" inherits="Object" category="Core">
<brief_description>
- Resource Saving Interface.
+ Resource Saving Interface.
</brief_description>
<description>
- Resource Saving Interface. This interface is used for saving resources to disk.
+ Resource Saving Interface. This interface is used for saving resources to disk.
</description>
<methods>
<method name="get_recognized_extensions">
@@ -31468,7 +31521,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="type" type="Object">
</argument>
<description>
- Return the list of extensions available for saving a resource of a given type.
+ Return the list of extensions available for saving a resource of a given type.
</description>
</method>
<method name="save">
@@ -31481,7 +31534,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="2" name="flags" type="int" default="0">
</argument>
<description>
- Save a resource to disk, to a given path.
+ Save a resource to disk, to a given path.
</description>
</method>
</methods>
@@ -31502,10 +31555,10 @@ A similar effect may be achieved moving this node's descendants.
</class>
<class name="RichTextLabel" inherits="Control" category="Core">
<brief_description>
- Label that displays rich text.
+ Label that displays rich text.
</brief_description>
<description>
- Label that displays rich text. Rich text can contain custom text, fonts, images and some basic formatting. It also adapts itself to given width/heights.
+ Label that displays rich text. Rich text can contain custom text, fonts, images and some basic formatting. It also adapts itself to given width/heights.
</description>
<methods>
<method name="add_image">
@@ -31544,6 +31597,13 @@ A similar effect may be achieved moving this node's descendants.
<description>
</description>
</method>
+ <method name="get_text">
+ <return type="String">
+ </return>
+ <description>
+ Returns the raw text, stripping out the formatting information.
+ </description>
+ </method>
<method name="get_total_character_count" qualifiers="const">
<return type="int">
</return>
@@ -31584,7 +31644,7 @@ A similar effect may be achieved moving this node's descendants.
<return type="bool">
</return>
<description>
- Return true if selecting the text inside this richtext is allowed.
+ Return true if selecting the text inside this richtext is allowed.
</description>
</method>
<method name="is_using_bbcode" qualifiers="const">
@@ -31693,7 +31753,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="enabled" type="bool">
</argument>
<description>
- Set to true if selecting the text inside this richtext is allowed.
+ Set to true if selecting the text inside this richtext is allowed.
</description>
</method>
<method name="set_tab_size">
@@ -31800,17 +31860,17 @@ A similar effect may be achieved moving this node's descendants.
</class>
<class name="RigidBody" inherits="PhysicsBody" category="Core">
<brief_description>
- Rigid body node.
+ Rigid body node.
</brief_description>
<description>
- Rigid body node. This node is used for placing rigid bodies in the scene. It can contain a number of shapes, and also shift mode between regular Rigid body, Kinematic, Character or Static.
+ Rigid body node. This node is used for placing rigid bodies in the scene. It can contain a number of shapes, and also shift mode between regular Rigid body, Kinematic, Character or Static.
</description>
<methods>
<method name="_integrate_forces" qualifiers="virtual">
<argument index="0" name="state" type="PhysicsDirectBodyState">
</argument>
<description>
- Called during physics processing, allowing you to read and safely modify the simulation state for the object. By default it works in addition to the usual physics behavior, but [method set_use_custom_integrator] allows you to disable the default behavior and do fully custom force integration for a body.
+ Called during physics processing, allowing you to read and safely modify the simulation state for the object. By default it works in addition to the usual physics behavior, but [method set_use_custom_integrator] allows you to disable the default behavior and do fully custom force integration for a body.
</description>
</method>
<method name="apply_impulse">
@@ -31819,261 +31879,261 @@ A similar effect may be achieved moving this node's descendants.
<argument index="1" name="impulse" type="Vector3">
</argument>
<description>
- Apply a positioned impulse (which will be affected by the body mass and shape). This is the equivalent of hitting a billiard ball with a cue: a force that is applied once, and only once. Both the impulse and the offset from the body origin are in global coordinates.
+ Apply a positioned impulse (which will be affected by the body mass and shape). This is the equivalent of hitting a billiard ball with a cue: a force that is applied once, and only once. Both the impulse and the offset from the body origin are in global coordinates.
</description>
</method>
<method name="get_angular_damp" qualifiers="const">
<return type="float">
</return>
<description>
- Return the current body angular damp. Default is -1.
+ Return the current body angular damp. Default is -1.
</description>
</method>
<method name="get_angular_velocity" qualifiers="const">
<return type="Vector3">
</return>
<description>
- Return the current body angular velocity.
+ Return the current body angular velocity.
</description>
</method>
<method name="get_axis_lock" qualifiers="const">
<return type="int">
</return>
<description>
- Return the current axis lock of the body. One of AXIS_LOCK_* enum.
+ Return the current axis lock of the body. One of AXIS_LOCK_* enum.
</description>
</method>
<method name="get_bounce" qualifiers="const">
<return type="float">
</return>
<description>
- Return the current body bounciness.
+ Return the current body bounciness.
</description>
</method>
<method name="get_colliding_bodies" qualifiers="const">
<return type="Array">
</return>
<description>
- Return a list of the bodies colliding with this one.
+ Return a list of the bodies colliding with this one.
</description>
</method>
<method name="get_friction" qualifiers="const">
<return type="float">
</return>
<description>
- Return the current body friction, from 0 (frictionless) to 1 (max friction).
+ Return the current body friction, from 0 (frictionless) to 1 (max friction).
</description>
</method>
<method name="get_gravity_scale" qualifiers="const">
<return type="float">
</return>
<description>
- Return the current body gravity scale.
+ Return the current body gravity scale.
</description>
</method>
<method name="get_linear_damp" qualifiers="const">
<return type="float">
</return>
<description>
- Return the current body linear damp. Default is -1.
+ Return the current body linear damp. Default is -1.
</description>
</method>
<method name="get_linear_velocity" qualifiers="const">
<return type="Vector3">
</return>
<description>
- Return the current body linear velocity.
+ Return the current body linear velocity.
</description>
</method>
<method name="get_mass" qualifiers="const">
<return type="float">
</return>
<description>
- Return the current body mass.
+ Return the current body mass.
</description>
</method>
<method name="get_max_contacts_reported" qualifiers="const">
<return type="int">
</return>
<description>
- Return the maximum contacts that can be reported. See [method set_max_contacts_reported].
+ Return the maximum contacts that can be reported. See [method set_max_contacts_reported].
</description>
</method>
<method name="get_mode" qualifiers="const">
<return type="int">
</return>
<description>
- Return the current body mode, see [method set_mode].
+ Return the current body mode, see [method set_mode].
</description>
</method>
<method name="get_weight" qualifiers="const">
<return type="float">
</return>
<description>
- Return the current body weight, given standard earth-weight (gravity 9.8).
+ Return the current body weight, given standard earth-weight (gravity 9.8).
</description>
</method>
<method name="is_able_to_sleep" qualifiers="const">
<return type="bool">
</return>
<description>
- Return whether the body has the ability to fall asleep when not moving. See [method set_can_sleep].
+ Return whether the body has the ability to fall asleep when not moving. See [method set_can_sleep].
</description>
</method>
<method name="is_contact_monitor_enabled" qualifiers="const">
<return type="bool">
</return>
<description>
- Return whether contact monitoring is enabled.
+ Return whether contact monitoring is enabled.
</description>
</method>
<method name="is_sleeping" qualifiers="const">
<return type="bool">
</return>
<description>
- Return whether the body is sleeping.
+ Return whether the body is sleeping.
</description>
</method>
<method name="is_using_continuous_collision_detection" qualifiers="const">
<return type="bool">
</return>
<description>
- Return whether this body is using continuous collision detection.
+ Return whether this body is using continuous collision detection.
</description>
</method>
<method name="is_using_custom_integrator">
<return type="bool">
</return>
<description>
- Return whether the body is using a custom integrator.
+ Return whether the body is using a custom integrator.
</description>
</method>
<method name="set_angular_damp">
<argument index="0" name="angular_damp" type="float">
</argument>
<description>
- Set the angular damp for this body. Default of -1, cannot be less than -1. If this value is different from -1, any angular damp derived from the world or areas will be overridden.
+ Set the angular damp for this body. Default of -1, cannot be less than -1. If this value is different from -1, any angular damp derived from the world or areas will be overridden.
</description>
</method>
<method name="set_angular_velocity">
<argument index="0" name="angular_velocity" type="Vector3">
</argument>
<description>
- Set the body angular velocity. Can be used sporadically, but [b]DON'T SET THIS IN EVERY FRAME[/b], because physics may be running in another thread and definitely runs at a different granularity. Use [method _integrate_forces] as your process loop if you want to have precise control of the body state.
+ Set the body angular velocity. Can be used sporadically, but [b]DON'T SET THIS IN EVERY FRAME[/b], because physics may be running in another thread and definitely runs at a different granularity. Use [method _integrate_forces] as your process loop if you want to have precise control of the body state.
</description>
</method>
<method name="set_axis_lock">
<argument index="0" name="axis_lock" type="int">
</argument>
<description>
- Set the axis lock of the body, from the AXIS_LOCK_* enum. Axis lock stops the body from moving along the specified axis(X/Y/Z) and rotating along the other two axes.
+ Set the axis lock of the body, from the AXIS_LOCK_* enum. Axis lock stops the body from moving along the specified axis(X/Y/Z) and rotating along the other two axes.
</description>
</method>
<method name="set_axis_velocity">
<argument index="0" name="axis_velocity" type="Vector3">
</argument>
<description>
- Set an axis velocity. The velocity in the given vector axis will be set as the given vector length. This is useful for jumping behavior.
+ Set an axis velocity. The velocity in the given vector axis will be set as the given vector length. This is useful for jumping behavior.
</description>
</method>
<method name="set_bounce">
<argument index="0" name="bounce" type="float">
</argument>
<description>
- Set the body bounciness, from 0 (no bounciness) to 1 (max bounciness).
+ Set the body bounciness, from 0 (no bounciness) to 1 (max bounciness).
</description>
</method>
<method name="set_can_sleep">
<argument index="0" name="able_to_sleep" type="bool">
</argument>
<description>
- Set the body ability to fall asleep when not moving. This saves an enormous amount of processor time when there are plenty of rigid bodies (non static) in a scene.
- Sleeping bodies are not affected by forces until a collision or an [method apply_impulse] / [method set_applied_force] wakes them up. Until then, they behave like a static body.
+ Set the body ability to fall asleep when not moving. This saves an enormous amount of processor time when there are plenty of rigid bodies (non static) in a scene.
+ Sleeping bodies are not affected by forces until a collision or an [method apply_impulse] / [method set_applied_force] wakes them up. Until then, they behave like a static body.
</description>
</method>
<method name="set_contact_monitor">
<argument index="0" name="enabled" type="bool">
</argument>
<description>
- Enable contact monitoring. This allows the body to emit signals when it collides with another.
+ Enable contact monitoring. This allows the body to emit signals when it collides with another.
</description>
</method>
<method name="set_friction">
<argument index="0" name="friction" type="float">
</argument>
<description>
- Set the body friction, from 0 (frictionless) to 1 (max friction).
+ Set the body friction, from 0 (frictionless) to 1 (max friction).
</description>
</method>
<method name="set_gravity_scale">
<argument index="0" name="gravity_scale" type="float">
</argument>
<description>
- Set the gravity factor. This factor multiplies gravity intensity just for this body.
+ Set the gravity factor. This factor multiplies gravity intensity just for this body.
</description>
</method>
<method name="set_linear_damp">
<argument index="0" name="linear_damp" type="float">
</argument>
<description>
- Set the linear damp for this body. Default of -1, cannot be less than -1. If this value is different from -1, any linear damp derived from the world or areas will be overridden.
+ Set the linear damp for this body. Default of -1, cannot be less than -1. If this value is different from -1, any linear damp derived from the world or areas will be overridden.
</description>
</method>
<method name="set_linear_velocity">
<argument index="0" name="linear_velocity" type="Vector3">
</argument>
<description>
- Set the body linear velocity. Can be used sporadically, but [b]DON'T SET THIS IN EVERY FRAME[/b], because physics may be running in another thread and definitely runs at a different granularity. Use [method _integrate_forces] as your process loop if you want to have precise control of the body state.
+ Set the body linear velocity. Can be used sporadically, but [b]DON'T SET THIS IN EVERY FRAME[/b], because physics may be running in another thread and definitely runs at a different granularity. Use [method _integrate_forces] as your process loop if you want to have precise control of the body state.
</description>
</method>
<method name="set_mass">
<argument index="0" name="mass" type="float">
</argument>
<description>
- Set the body mass.
+ Set the body mass.
</description>
</method>
<method name="set_max_contacts_reported">
<argument index="0" name="amount" type="int">
</argument>
<description>
- Set the maximum contacts to report. Bodies can keep a log of the contacts with other bodies, this is enabled by setting the maximum amount of contacts reported to a number greater than 0.
+ Set the maximum contacts to report. Bodies can keep a log of the contacts with other bodies, this is enabled by setting the maximum amount of contacts reported to a number greater than 0.
</description>
</method>
<method name="set_mode">
<argument index="0" name="mode" type="int">
</argument>
<description>
- Set the body mode, from the MODE_* enum. This allows to change to a static body or a character body.
+ Set the body mode, from the MODE_* enum. This allows to change to a static body or a character body.
</description>
</method>
<method name="set_sleeping">
<argument index="0" name="sleeping" type="bool">
</argument>
<description>
- Set whether a body is sleeping or not. Sleeping bodies are not affected by forces until a collision or an [method apply_impulse] wakes them up. Until then, they behave like a static body.
+ Set whether a body is sleeping or not. Sleeping bodies are not affected by forces until a collision or an [method apply_impulse] wakes them up. Until then, they behave like a static body.
</description>
</method>
<method name="set_use_continuous_collision_detection">
<argument index="0" name="enable" type="bool">
</argument>
<description>
- Set the continuous collision detection mode from the enum CCD_MODE_*.
- Continuous collision detection tries to predict where a moving body will collide, instead of moving it and correcting its movement if it collided. The first is more precise, and misses less impacts by small, fast-moving objects. The second is faster to compute, but can miss small, fast-moving objects.
+ Set the continuous collision detection mode from the enum CCD_MODE_*.
+ Continuous collision detection tries to predict where a moving body will collide, instead of moving it and correcting its movement if it collided. The first is more precise, and misses less impacts by small, fast-moving objects. The second is faster to compute, but can miss small, fast-moving objects.
</description>
</method>
<method name="set_use_custom_integrator">
<argument index="0" name="enable" type="bool">
</argument>
<description>
- Pass true to disable the internal force integration (like gravity or air friction) for this body. Other than collision response, the body will only move as determined by the [method _integrate_forces] function, if defined.
+ Pass true to disable the internal force integration (like gravity or air friction) for this body. Other than collision response, the body will only move as determined by the [method _integrate_forces] function, if defined.
</description>
</method>
<method name="set_weight">
<argument index="0" name="weight" type="float">
</argument>
<description>
- Set the body weight given standard earth-weight (gravity 9.8).
+ Set the body weight given standard earth-weight (gravity 9.8).
</description>
</method>
</methods>
@@ -32082,7 +32142,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="body" type="Object">
</argument>
<description>
- Emitted when a body enters into contact with this one. Contact monitor and contacts reported must be enabled for this to work.
+ Emitted when a body enters into contact with this one. Contact monitor and contacts reported must be enabled for this to work.
</description>
</signal>
<signal name="body_enter_shape">
@@ -32095,15 +32155,15 @@ A similar effect may be achieved moving this node's descendants.
<argument index="3" name="local_shape" type="int">
</argument>
<description>
- Emitted when a body enters into contact with this one. Contact monitor and contacts reported must be enabled for this to work.
- This signal not only receives the body that collided with this one, but also its [RID] (body_id), the shape index from the colliding body (body_shape), and the shape index from this body (local_shape) the other body collided with.
+ Emitted when a body enters into contact with this one. Contact monitor and contacts reported must be enabled for this to work.
+ This signal not only receives the body that collided with this one, but also its [RID] (body_id), the shape index from the colliding body (body_shape), and the shape index from this body (local_shape) the other body collided with.
</description>
</signal>
<signal name="body_exit">
<argument index="0" name="body" type="Object">
</argument>
<description>
- Emitted when a body shape exits contact with this one. Contact monitor and contacts reported must be enabled for this to work.
+ Emitted when a body shape exits contact with this one. Contact monitor and contacts reported must be enabled for this to work.
</description>
</signal>
<signal name="body_exit_shape">
@@ -32116,13 +32176,13 @@ A similar effect may be achieved moving this node's descendants.
<argument index="3" name="local_shape" type="int">
</argument>
<description>
- Emitted when a body shape exits contact with this one. Contact monitor and contacts reported must be enabled for this to work.
- This signal not only receives the body that stopped colliding with this one, but also its [RID] (body_id), the shape index from the colliding body (body_shape), and the shape index from this body (local_shape) the other body stopped colliding with.
+ Emitted when a body shape exits contact with this one. Contact monitor and contacts reported must be enabled for this to work.
+ This signal not only receives the body that stopped colliding with this one, but also its [RID] (body_id), the shape index from the colliding body (body_shape), and the shape index from this body (local_shape) the other body stopped colliding with.
</description>
</signal>
<signal name="sleeping_state_changed">
<description>
- Emitted when the body changes it's sleeping state. Either by sleeping or waking up.
+ Emitted when the body changes it's sleeping state. Either by sleeping or waking up.
</description>
</signal>
</signals>
@@ -32143,19 +32203,19 @@ A similar effect may be achieved moving this node's descendants.
</class>
<class name="RigidBody2D" inherits="PhysicsBody2D" category="Core">
<brief_description>
- Rigid body 2D node.
+ Rigid body 2D node.
</brief_description>
<description>
- Rigid body 2D node. This node is used for placing rigid bodies in the scene. It can contain a number of shapes, and also shift state between regular Rigid body, Kinematic, Character or Static.
- Character mode forbids the node from being rotated. This node can have a custom force integrator function, for writing complex physics motion behavior per node.
- As a warning, don't change this node position every frame or very often. Sporadic changes work fine, but physics runs at a different granularity (fixed hz) than usual rendering (process callback) and maybe even in a separate thread, so changing this from a process loop will yield strange behavior.
+ Rigid body 2D node. This node is used for placing rigid bodies in the scene. It can contain a number of shapes, and also shift state between regular Rigid body, Kinematic, Character or Static.
+ Character mode forbids the node from being rotated. This node can have a custom force integrator function, for writing complex physics motion behavior per node.
+ As a warning, don't change this node position every frame or very often. Sporadic changes work fine, but physics runs at a different granularity (fixed hz) than usual rendering (process callback) and maybe even in a separate thread, so changing this from a process loop will yield strange behavior.
</description>
<methods>
<method name="_integrate_forces" qualifiers="virtual">
<argument index="0" name="state" type="Physics2DDirectBodyState">
</argument>
<description>
- Called during physics processing, allowing you to read and safely modify the simulation state for the object. By default it works in addition to the usual physics behavior, but [method set_use_custom_integrator] allows you to disable the default behavior and do fully custom force integration for a body.
+ Called during physics processing, allowing you to read and safely modify the simulation state for the object. By default it works in addition to the usual physics behavior, but [method set_use_custom_integrator] allows you to disable the default behavior and do fully custom force integration for a body.
</description>
</method>
<method name="add_force">
@@ -32164,7 +32224,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="1" name="force" type="Vector2">
</argument>
<description>
- Add a positioned force to the applied force and torque. As with [method apply_impulse], both the force and the offset from the body origin are in global coordinates.
+ Add a positioned force to the applied force and torque. As with [method apply_impulse], both the force and the offset from the body origin are in global coordinates.
</description>
</method>
<method name="apply_impulse">
@@ -32173,289 +32233,289 @@ A similar effect may be achieved moving this node's descendants.
<argument index="1" name="impulse" type="Vector2">
</argument>
<description>
- Apply a positioned impulse (which will be affected by the body mass and shape). This is the equivalent of hitting a billiard ball with a cue: a force that is applied once, and only once. Both the impulse and the offset from the body origin are in global coordinates.
+ Apply a positioned impulse (which will be affected by the body mass and shape). This is the equivalent of hitting a billiard ball with a cue: a force that is applied once, and only once. Both the impulse and the offset from the body origin are in global coordinates.
</description>
</method>
<method name="get_angular_damp" qualifiers="const">
<return type="float">
</return>
<description>
- Return the angular damp for this body.
+ Return the angular damp for this body.
</description>
</method>
<method name="get_angular_velocity" qualifiers="const">
<return type="float">
</return>
<description>
- Return the body angular velocity. This changes by physics granularity. See [method set_angular_velocity].
+ Return the body angular velocity. This changes by physics granularity. See [method set_angular_velocity].
</description>
</method>
<method name="get_applied_force" qualifiers="const">
<return type="Vector2">
</return>
<description>
- Return the applied force vector.
+ Return the applied force vector.
</description>
</method>
<method name="get_applied_torque" qualifiers="const">
<return type="float">
</return>
<description>
- Return the torque which is being applied to this body.
+ Return the torque which is being applied to this body.
</description>
</method>
<method name="get_bounce" qualifiers="const">
<return type="float">
</return>
<description>
- Return the body bounciness.
+ Return the body bounciness.
</description>
</method>
<method name="get_colliding_bodies" qualifiers="const">
<return type="Array">
</return>
<description>
- Return a list of the bodies colliding with this one.
+ Return a list of the bodies colliding with this one.
</description>
</method>
<method name="get_continuous_collision_detection_mode" qualifiers="const">
<return type="int">
</return>
<description>
- Return whether this body is using continuous collision detection.
+ Return whether this body is using continuous collision detection.
</description>
</method>
<method name="get_friction" qualifiers="const">
<return type="float">
</return>
<description>
- Return the body friction.
+ Return the body friction.
</description>
</method>
<method name="get_gravity_scale" qualifiers="const">
<return type="float">
</return>
<description>
- Return the gravity factor.
+ Return the gravity factor.
</description>
</method>
<method name="get_inertia" qualifiers="const">
<return type="float">
</return>
<description>
- Return the body's moment of inertia. This is usually automatically computed from the mass and the shapes. Note that this doesn't seem to work in a [code]_ready[/code] function: it apparently has not been auto-computed yet.
+ Return the body's moment of inertia. This is usually automatically computed from the mass and the shapes. Note that this doesn't seem to work in a [code]_ready[/code] function: it apparently has not been auto-computed yet.
</description>
</method>
<method name="get_linear_damp" qualifiers="const">
<return type="float">
</return>
<description>
- Return the linear damp for this body.
+ Return the linear damp for this body.
</description>
</method>
<method name="get_linear_velocity" qualifiers="const">
<return type="Vector2">
</return>
<description>
- Return the body linear velocity. This changes by physics granularity. See [method set_linear_velocity].
+ Return the body linear velocity. This changes by physics granularity. See [method set_linear_velocity].
</description>
</method>
<method name="get_mass" qualifiers="const">
<return type="float">
</return>
<description>
- Return the body mass.
+ Return the body mass.
</description>
</method>
<method name="get_max_contacts_reported" qualifiers="const">
<return type="int">
</return>
<description>
- Return the maximum contacts that can be reported. See [method set_max_contacts_reported].
+ Return the maximum contacts that can be reported. See [method set_max_contacts_reported].
</description>
</method>
<method name="get_mode" qualifiers="const">
<return type="int">
</return>
<description>
- Return the current body mode, see [method set_mode].
+ Return the current body mode, see [method set_mode].
</description>
</method>
<method name="get_weight" qualifiers="const">
<return type="float">
</return>
<description>
- Return the body weight given standard earth-weight (gravity 9.8).
+ Return the body weight given standard earth-weight (gravity 9.8).
</description>
</method>
<method name="is_able_to_sleep" qualifiers="const">
<return type="bool">
</return>
<description>
- Return true if the body has the ability to fall asleep when not moving. See [method set_can_sleep].
+ Return true if the body has the ability to fall asleep when not moving. See [method set_can_sleep].
</description>
</method>
<method name="is_contact_monitor_enabled" qualifiers="const">
<return type="bool">
</return>
<description>
- Return whether contact monitoring is enabled.
+ Return whether contact monitoring is enabled.
</description>
</method>
<method name="is_sleeping" qualifiers="const">
<return type="bool">
</return>
<description>
- Return whether the body is sleeping.
+ Return whether the body is sleeping.
</description>
</method>
<method name="is_using_custom_integrator">
<return type="bool">
</return>
<description>
- Return true if the body is not doing any built-in force integration.
+ Return true if the body is not doing any built-in force integration.
</description>
</method>
<method name="set_angular_damp">
<argument index="0" name="angular_damp" type="float">
</argument>
<description>
- Set the angular damp for this body. If this value is different from -1, any angular damp derived from the world or areas will be overridden.
+ Set the angular damp for this body. If this value is different from -1, any angular damp derived from the world or areas will be overridden.
</description>
</method>
<method name="set_angular_velocity">
<argument index="0" name="angular_velocity" type="float">
</argument>
<description>
- Set the body angular velocity. Can be used sporadically, but [b]DON'T SET THIS IN EVERY FRAME[/b], because physics may be running in another thread and definitely runs at a different granularity. Use [method _integrate_forces] as your process loop if you want to have precise control of the body state.
+ Set the body angular velocity. Can be used sporadically, but [b]DON'T SET THIS IN EVERY FRAME[/b], because physics may be running in another thread and definitely runs at a different granularity. Use [method _integrate_forces] as your process loop if you want to have precise control of the body state.
</description>
</method>
<method name="set_applied_force">
<argument index="0" name="force" type="Vector2">
</argument>
<description>
- Set the applied force vector. This is the equivalent of pushing a box over the ground: the force applied is applied constantly.
+ Set the applied force vector. This is the equivalent of pushing a box over the ground: the force applied is applied constantly.
</description>
</method>
<method name="set_applied_torque">
<argument index="0" name="torque" type="float">
</argument>
<description>
- Set a constant torque which will be applied to this body.
+ Set a constant torque which will be applied to this body.
</description>
</method>
<method name="set_axis_velocity">
<argument index="0" name="axis_velocity" type="Vector2">
</argument>
<description>
- Set an axis velocity. The velocity in the given vector axis will be set as the given vector length. This is useful for jumping behavior.
+ Set an axis velocity. The velocity in the given vector axis will be set as the given vector length. This is useful for jumping behavior.
</description>
</method>
<method name="set_bounce">
<argument index="0" name="bounce" type="float">
</argument>
<description>
- Set the body bounciness, from 0 (no bounce) to 1 (full bounce).
+ Set the body bounciness, from 0 (no bounce) to 1 (full bounce).
</description>
</method>
<method name="set_can_sleep">
<argument index="0" name="able_to_sleep" type="bool">
</argument>
<description>
- Set the body ability to fall asleep when not moving. This saves an enormous amount of processor time when there are plenty of rigid bodies (non static) in a scene.
- Sleeping bodies are not affected by forces until a collision or an [method apply_impulse] / [method set_applied_force] wakes them up. Until then, they behave like a static body.
+ Set the body ability to fall asleep when not moving. This saves an enormous amount of processor time when there are plenty of rigid bodies (non static) in a scene.
+ Sleeping bodies are not affected by forces until a collision or an [method apply_impulse] / [method set_applied_force] wakes them up. Until then, they behave like a static body.
</description>
</method>
<method name="set_contact_monitor">
<argument index="0" name="enabled" type="bool">
</argument>
<description>
- Enable contact monitoring. This allows the body to emit signals when it collides with another.
+ Enable contact monitoring. This allows the body to emit signals when it collides with another.
</description>
</method>
<method name="set_continuous_collision_detection_mode">
<argument index="0" name="mode" type="int">
</argument>
<description>
- Set the continuous collision detection mode from the enum CCD_MODE_*.
- Continuous collision detection tries to predict where a moving body will collide, instead of moving it and correcting its movement if it collided. The first is more precise, and misses less impacts by small, fast-moving objects. The second is faster to compute, but can miss small, fast-moving objects.
+ Set the continuous collision detection mode from the enum CCD_MODE_*.
+ Continuous collision detection tries to predict where a moving body will collide, instead of moving it and correcting its movement if it collided. The first is more precise, and misses less impacts by small, fast-moving objects. The second is faster to compute, but can miss small, fast-moving objects.
</description>
</method>
<method name="set_friction">
<argument index="0" name="friction" type="float">
</argument>
<description>
- Set the body friction, from 0 (frictionless) to 1 (full friction).
+ Set the body friction, from 0 (frictionless) to 1 (full friction).
</description>
</method>
<method name="set_gravity_scale">
<argument index="0" name="gravity_scale" type="float">
</argument>
<description>
- Set the gravity factor. This factor multiplies gravity intensity just for this body.
+ Set the gravity factor. This factor multiplies gravity intensity just for this body.
</description>
</method>
<method name="set_inertia">
<argument index="0" name="inertia" type="float">
</argument>
<description>
- Set the body's moment of inertia. This is like mass, but for rotation: it determines how much torque it takes to rotate the body. The moment of inertia is usually computed automatically from the mass and the shapes, but this function allows you to set a custom value. Set 0 (or negative) inertia to return to automatically computing it.
+ Set the body's moment of inertia. This is like mass, but for rotation: it determines how much torque it takes to rotate the body. The moment of inertia is usually computed automatically from the mass and the shapes, but this function allows you to set a custom value. Set 0 (or negative) inertia to return to automatically computing it.
</description>
</method>
<method name="set_linear_damp">
<argument index="0" name="linear_damp" type="float">
</argument>
<description>
- Set the linear damp for this body. If this value is different from -1, any linear damp derived from the world or areas will be overridden.
+ Set the linear damp for this body. If this value is different from -1, any linear damp derived from the world or areas will be overridden.
</description>
</method>
<method name="set_linear_velocity">
<argument index="0" name="linear_velocity" type="Vector2">
</argument>
<description>
- Set the body linear velocity. Can be used sporadically, but [b]DON'T SET THIS IN EVERY FRAME[/b], because physics may be running in another thread and definitely runs at a different granularity. Use [method _integrate_forces] as your process loop if you want to have precise control of the body state.
+ Set the body linear velocity. Can be used sporadically, but [b]DON'T SET THIS IN EVERY FRAME[/b], because physics may be running in another thread and definitely runs at a different granularity. Use [method _integrate_forces] as your process loop if you want to have precise control of the body state.
</description>
</method>
<method name="set_mass">
<argument index="0" name="mass" type="float">
</argument>
<description>
- Set the body mass.
+ Set the body mass.
</description>
</method>
<method name="set_max_contacts_reported">
<argument index="0" name="amount" type="int">
</argument>
<description>
- Set the maximum contacts to report. Bodies can keep a log of the contacts with other bodies, this is enabled by setting the maximum amount of contacts reported to a number greater than 0.
+ Set the maximum contacts to report. Bodies can keep a log of the contacts with other bodies, this is enabled by setting the maximum amount of contacts reported to a number greater than 0.
</description>
</method>
<method name="set_mode">
<argument index="0" name="mode" type="int">
</argument>
<description>
- Set the body mode, from the MODE_* enum. This allows to change to a static body or a character body.
+ Set the body mode, from the MODE_* enum. This allows to change to a static body or a character body.
</description>
</method>
<method name="set_sleeping">
<argument index="0" name="sleeping" type="bool">
</argument>
<description>
- Set whether a body is sleeping or not. Sleeping bodies are not affected by forces until a collision or an [method apply_impulse] / [method set_applied_force] wakes them up. Until then, they behave like a static body.
+ Set whether a body is sleeping or not. Sleeping bodies are not affected by forces until a collision or an [method apply_impulse] / [method set_applied_force] wakes them up. Until then, they behave like a static body.
</description>
</method>
<method name="set_use_custom_integrator">
<argument index="0" name="enable" type="bool">
</argument>
<description>
- Pass true to disable the internal force integration (like gravity or air friction) for this body. Other than collision response, the body will only move as determined by the [method _integrate_forces] function, if defined.
+ Pass true to disable the internal force integration (like gravity or air friction) for this body. Other than collision response, the body will only move as determined by the [method _integrate_forces] function, if defined.
</description>
</method>
<method name="set_weight">
<argument index="0" name="weight" type="float">
</argument>
<description>
- Set the body weight given standard earth-weight (gravity 9.8). Not really useful for 2D since most measures for this node are in pixels.
+ Set the body weight given standard earth-weight (gravity 9.8). Not really useful for 2D since most measures for this node are in pixels.
</description>
</method>
<method name="test_motion">
@@ -32468,7 +32528,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="2" name="result" type="Physics2DTestMotionResult" default="NULL">
</argument>
<description>
- Return whether the body would collide, if it tried to move in the given vector. This method allows two extra parameters: A margin, which increases slightly the size of the shapes involved in the collision detection, and an object of type [Physics2DTestMotionResult], which will store additional information about the collision (should there be one).
+ Return whether the body would collide, if it tried to move in the given vector. This method allows two extra parameters: A margin, which increases slightly the size of the shapes involved in the collision detection, and an object of type [Physics2DTestMotionResult], which will store additional information about the collision (should there be one).
</description>
</method>
</methods>
@@ -32477,7 +32537,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="body" type="Object">
</argument>
<description>
- Emitted when a body enters into contact with this one. Contact monitor and contacts reported must be enabled for this to work.
+ Emitted when a body enters into contact with this one. Contact monitor and contacts reported must be enabled for this to work.
</description>
</signal>
<signal name="body_enter_shape">
@@ -32490,15 +32550,15 @@ A similar effect may be achieved moving this node's descendants.
<argument index="3" name="local_shape" type="int">
</argument>
<description>
- Emitted when a body enters into contact with this one. Contact monitor and contacts reported must be enabled for this to work.
- This signal not only receives the body that collided with this one, but also its [RID] (body_id), the shape index from the colliding body (body_shape), and the shape index from this body (local_shape) the other body collided with.
+ Emitted when a body enters into contact with this one. Contact monitor and contacts reported must be enabled for this to work.
+ This signal not only receives the body that collided with this one, but also its [RID] (body_id), the shape index from the colliding body (body_shape), and the shape index from this body (local_shape) the other body collided with.
</description>
</signal>
<signal name="body_exit">
<argument index="0" name="body" type="Object">
</argument>
<description>
- Emitted when a body exits contact with this one. Contact monitor and contacts reported must be enabled for this to work.
+ Emitted when a body exits contact with this one. Contact monitor and contacts reported must be enabled for this to work.
</description>
</signal>
<signal name="body_exit_shape">
@@ -32511,13 +32571,13 @@ A similar effect may be achieved moving this node's descendants.
<argument index="3" name="local_shape" type="int">
</argument>
<description>
- Emitted when a body shape exits contact with this one. Contact monitor and contacts reported must be enabled for this to work.
- This signal not only receives the body that stopped colliding with this one, but also its [RID] (body_id), the shape index from the colliding body (body_shape), and the shape index from this body (local_shape) the other body stopped colliding with.
+ Emitted when a body shape exits contact with this one. Contact monitor and contacts reported must be enabled for this to work.
+ This signal not only receives the body that stopped colliding with this one, but also its [RID] (body_id), the shape index from the colliding body (body_shape), and the shape index from this body (local_shape) the other body stopped colliding with.
</description>
</signal>
<signal name="sleeping_state_changed">
<description>
- Emitted when the body changes it's sleeping state. Either by sleeping or waking up.
+ Emitted when the body changes it's sleeping state. Either by sleeping or waking up.
</description>
</signal>
</signals>
@@ -32547,10 +32607,10 @@ A similar effect may be achieved moving this node's descendants.
</class>
<class name="Room" inherits="VisualInstance" category="Core">
<brief_description>
- Room data resource.
+ Room data resource.
</brief_description>
<description>
- Room contains the data to define the bounds of a scene (using a BSP Tree). It is instanced by a [VisualInstance] node to create rooms. See that class documentation for more information about rooms.
+ Room contains the data to define the bounds of a scene (using a BSP Tree). It is instanced by a [VisualInstance] node to create rooms. See that class documentation for more information about rooms.
</description>
<methods>
<method name="compute_room_from_subtree">
@@ -32629,10 +32689,10 @@ A similar effect may be achieved moving this node's descendants.
</class>
<class name="Sample" inherits="Resource" category="Core">
<brief_description>
- Audio sample (sound) class.
+ Audio sample (sound) class.
</brief_description>
<description>
- Sample provides an audio sample class, containing audio data, together with some information for playback, such as format, mix rate and loop. It is used by sound playback routines.
+ Sample provides an audio sample class, containing audio data, together with some information for playback, such as format, mix rate and loop. It is used by sound playback routines.
</description>
<methods>
<method name="create">
@@ -32643,103 +32703,100 @@ A similar effect may be achieved moving this node's descendants.
<argument index="2" name="length" type="int">
</argument>
<description>
- Create new data for the sample, with format (see FORMAT_* constants), stereo hint, and length in samples (not bytes).
- Calling this method overrides previously existing data. Stereo samples are interleaved pairs of left and right points (in that order), but count as one sample for length purposes.
+ Create new data for the sample, with format (see FORMAT_* constants), stereo hint, and length in samples (not bytes).
+ Calling this method overrides previously existing data. Stereo samples are interleaved pairs of left and right points (in that order), but count as one sample for length purposes.
</description>
</method>
<method name="get_data" qualifiers="const">
<return type="RawArray">
</return>
<description>
- Return sample data as little endian.
+ Return sample data as little endian.
</description>
</method>
<method name="get_format" qualifiers="const">
<return type="int">
</return>
<description>
- Return the sample format.
+ Return the sample format.
</description>
</method>
<method name="get_length" qualifiers="const">
<return type="int">
</return>
<description>
- Return the sample length in samples. Stereo samples count as one, even if they are made of a left and a right sample.
+ Return the sample length in samples. Stereo samples count as one, even if they are made of a left and a right sample.
</description>
</method>
<method name="get_loop_begin" qualifiers="const">
<return type="int">
</return>
<description>
- Return the loop begin position.
+ Return the loop begin position.
</description>
</method>
<method name="get_loop_end" qualifiers="const">
<return type="int">
</return>
<description>
- Return the loop end position.
+ Return the loop end position.
</description>
</method>
<method name="get_loop_format" qualifiers="const">
<return type="int">
</return>
<description>
- Return the loop format.
+ Return the loop format.
</description>
</method>
<method name="get_mix_rate" qualifiers="const">
<return type="int">
</return>
<description>
- Return the mix rate for the sample.
+ Return the mix rate for the sample.
</description>
</method>
<method name="is_stereo" qualifiers="const">
<return type="bool">
</return>
<description>
- Return whether the current sample was created as stereo.
+ Return whether the current sample was created as stereo.
</description>
</method>
<method name="set_data">
<argument index="0" name="data" type="RawArray">
</argument>
<description>
- Set sample data. Data must be little endian, no matter the host platform, and exactly as long as to fit all samples. The length of this array can be calculated as follows:
- Get the sample length ([method get_length]).
- If the sample format is FORMAT_PCM16, multiply it by 2.
- If the sample format is FORMAT_IMA_ADPCM, divide it by 2 (rounding any fraction up), then add 4.
- If the sample is stereo ([method is_stereo]), multiply it by 2.
+ Set sample data. Data must be little endian, no matter the host platform, and exactly as long as to fit all samples. The length of this array can be calculated as follows:
+ Get the sample length ([method get_length]). If the sample format is FORMAT_PCM16, multiply it by 2. If the sample format is FORMAT_IMA_ADPCM, divide it by 2 (rounding any fraction up), then add 4. If the sample is stereo ([method is_stereo]), multiply it by 2.
</description>
</method>
<method name="set_loop_begin">
<argument index="0" name="pos" type="int">
</argument>
<description>
- Set the loop begin position. It must be a valid frame and less than the loop end position.
+ Set the loop begin position. It must be a valid frame and less than the loop end position.
</description>
</method>
<method name="set_loop_end">
<argument index="0" name="pos" type="int">
</argument>
<description>
- Set the loop end position. It must be a valid frame and greater than the loop begin position.
+ Set the loop end position. It must be a valid frame and greater than the loop begin position.
</description>
</method>
<method name="set_loop_format">
<argument index="0" name="format" type="int">
</argument>
<description>
- Set the loop format (use LOOP_* constants as argument).
+ Set the loop format (use LOOP_* constants as argument).
</description>
</method>
<method name="set_mix_rate">
<argument index="0" name="hz" type="int">
</argument>
<description>
- Set the mix rate for the sample (expected playback frequency).
+ Set the mix rate for the sample (expected playback frequency).
</description>
</method>
</methods>
@@ -32766,10 +32823,10 @@ A similar effect may be achieved moving this node's descendants.
</class>
<class name="SampleLibrary" inherits="Resource" category="Core">
<brief_description>
- Library that contains a collection of samples.
+ Library that contains a collection of samples.
</brief_description>
<description>
- Library that contains a collection of [Sample], each identified by a text ID. This is used as a data container for the majority of the SamplePlayer classes and derivatives.
+ Library that contains a collection of [Sample], each identified by a text ID. This is used as a data container for the majority of the SamplePlayer classes and derivatives.
</description>
<methods>
<method name="add_sample">
@@ -32778,7 +32835,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="1" name="sample" type="Sample">
</argument>
<description>
- Add a sample to the library, with a given text ID.
+ Add a sample to the library, with a given text ID.
</description>
</method>
<method name="get_sample" qualifiers="const">
@@ -32787,7 +32844,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="name" type="String">
</argument>
<description>
- Return the sample from the library matching the given text ID. Return null if the sample is not found.
+ Return the sample from the library matching the given text ID. Return null if the sample is not found.
</description>
</method>
<method name="has_sample" qualifiers="const">
@@ -32796,14 +32853,14 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="name" type="String">
</argument>
<description>
- Return true if the sample text ID exists in the library.
+ Return true if the sample text ID exists in the library.
</description>
</method>
<method name="remove_sample">
<argument index="0" name="name" type="String">
</argument>
<description>
- Remove the sample matching the given text ID.
+ Remove the sample matching the given text ID.
</description>
</method>
<method name="sample_get_pitch_scale" qualifiers="const">
@@ -32812,7 +32869,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="name" type="String">
</argument>
<description>
- Return the pitch scale for the given sample.
+ Return the pitch scale for the given sample.
</description>
</method>
<method name="sample_get_volume_db" qualifiers="const">
@@ -32821,7 +32878,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="name" type="String">
</argument>
<description>
- Return the volume (in dB) for the given sample.
+ Return the volume (in dB) for the given sample.
</description>
</method>
<method name="sample_set_pitch_scale">
@@ -32830,7 +32887,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="1" name="pitch" type="float">
</argument>
<description>
- Set the pitch scale for the given sample.
+ Set the pitch scale for the given sample.
</description>
</method>
<method name="sample_set_volume_db">
@@ -32839,7 +32896,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="1" name="db" type="float">
</argument>
<description>
- Set the volume (in dB) for the given sample.
+ Set the volume (in dB) for the given sample.
</description>
</method>
</methods>
@@ -32848,10 +32905,10 @@ A similar effect may be achieved moving this node's descendants.
</class>
<class name="SamplePlayer" inherits="Node" category="Core">
<brief_description>
- Sample Player node.
+ Sample Player node.
</brief_description>
<description>
- SamplePlayer is a [Node] meant for simple sample playback. A library of samples is loaded and played back "as is", without positioning or anything.
+ SamplePlayer is a [Node] meant for simple sample playback. A library of samples is loaded and played back "as is", without positioning or anything.
</description>
<methods>
<method name="get_chorus" qualifiers="const">
@@ -32860,98 +32917,98 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="voice" type="int">
</argument>
<description>
- Return the current chorus send level for a given voice.
+ Return the current chorus send level for a given voice.
</description>
</method>
<method name="get_default_chorus" qualifiers="const">
<return type="float">
</return>
<description>
- Return the default chorus send level of the player.
+ Return the default chorus send level of the player.
</description>
</method>
<method name="get_default_filter_cutoff" qualifiers="const">
<return type="float">
</return>
<description>
- Return the default filter cutoff frequency of the player.
+ Return the default filter cutoff frequency of the player.
</description>
</method>
<method name="get_default_filter_gain" qualifiers="const">
<return type="float">
</return>
<description>
- Return the default filter gain of the player.
+ Return the default filter gain of the player.
</description>
</method>
<method name="get_default_filter_resonance" qualifiers="const">
<return type="float">
</return>
<description>
- Return the default filter resonance of the player.
+ Return the default filter resonance of the player.
</description>
</method>
<method name="get_default_filter_type" qualifiers="const">
<return type="int">
</return>
<description>
- Return the default filter type in use (see FILTER_* constants) for the player.
+ Return the default filter type in use (see FILTER_* constants) for the player.
</description>
</method>
<method name="get_default_pan" qualifiers="const">
<return type="float">
</return>
<description>
- Return the default panning of the player.
+ Return the default panning of the player.
</description>
</method>
<method name="get_default_pan_depth" qualifiers="const">
<return type="float">
</return>
<description>
- Return the default pan depth of the player.
+ Return the default pan depth of the player.
</description>
</method>
<method name="get_default_pan_height" qualifiers="const">
<return type="float">
</return>
<description>
- Return the default pan height of the player.
+ Return the default pan height of the player.
</description>
</method>
<method name="get_default_pitch_scale" qualifiers="const">
<return type="float">
</return>
<description>
- Return the default pitch scale of the player.
+ Return the default pitch scale of the player.
</description>
</method>
<method name="get_default_reverb" qualifiers="const">
<return type="float">
</return>
<description>
- Return the default reverberation send level of the player.
+ Return the default reverberation send level of the player.
</description>
</method>
<method name="get_default_reverb_room" qualifiers="const">
<return type="int">
</return>
<description>
- Return the default reverberation room type of the player (see REVERB_* enum).
+ Return the default reverberation room type of the player (see REVERB_* enum).
</description>
</method>
<method name="get_default_volume" qualifiers="const">
<return type="float">
</return>
<description>
- Return the default volume (on a linear scale) of the player.
+ Return the default volume (on a linear scale) of the player.
</description>
</method>
<method name="get_default_volume_db" qualifiers="const">
<return type="float">
</return>
<description>
- Return the default volume (in dB) of the player.
+ Return the default volume (in dB) of the player.
</description>
</method>
<method name="get_filter_cutoff" qualifiers="const">
@@ -32960,7 +33017,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="voice" type="int">
</argument>
<description>
- Return the current filter cutoff frequency for a given voice.
+ Return the current filter cutoff frequency for a given voice.
</description>
</method>
<method name="get_filter_gain" qualifiers="const">
@@ -32969,7 +33026,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="voice" type="int">
</argument>
<description>
- Return the current filter gain for a given voice.
+ Return the current filter gain for a given voice.
</description>
</method>
<method name="get_filter_resonance" qualifiers="const">
@@ -32978,7 +33035,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="voice" type="int">
</argument>
<description>
- Return the current filter resonance for a given voice.
+ Return the current filter resonance for a given voice.
</description>
</method>
<method name="get_filter_type" qualifiers="const">
@@ -32987,7 +33044,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="voice" type="int">
</argument>
<description>
- Return the current filter type in use (see FILTER_* constants) for a given voice.
+ Return the current filter type in use (see FILTER_* constants) for a given voice.
</description>
</method>
<method name="get_mix_rate" qualifiers="const">
@@ -32996,7 +33053,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="voice" type="int">
</argument>
<description>
- Return the current mix rate for a given voice.
+ Return the current mix rate for a given voice.
</description>
</method>
<method name="get_pan" qualifiers="const">
@@ -33005,7 +33062,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="voice" type="int">
</argument>
<description>
- Return the current panning for a given voice.
+ Return the current panning for a given voice.
</description>
</method>
<method name="get_pan_depth" qualifiers="const">
@@ -33014,7 +33071,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="voice" type="int">
</argument>
<description>
- Return the current pan depth for a given voice.
+ Return the current pan depth for a given voice.
</description>
</method>
<method name="get_pan_height" qualifiers="const">
@@ -33023,7 +33080,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="voice" type="int">
</argument>
<description>
- Return the current pan height for a given voice.
+ Return the current pan height for a given voice.
</description>
</method>
<method name="get_pitch_scale" qualifiers="const">
@@ -33032,14 +33089,14 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="voice" type="int">
</argument>
<description>
- Return the current pitch scale for a given voice.
+ Return the current pitch scale for a given voice.
</description>
</method>
<method name="get_polyphony" qualifiers="const">
<return type="int">
</return>
<description>
- Return the polyphony of the player.
+ Return the polyphony of the player.
</description>
</method>
<method name="get_reverb" qualifiers="const">
@@ -33048,7 +33105,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="voice" type="int">
</argument>
<description>
- Return the current reverberation send level for a given voice.
+ Return the current reverberation send level for a given voice.
</description>
</method>
<method name="get_reverb_room" qualifiers="const">
@@ -33057,14 +33114,14 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="voice" type="int">
</argument>
<description>
- Return the current reverberation room type for a given voice (see REVERB_* enum).
+ Return the current reverberation room type for a given voice (see REVERB_* enum).
</description>
</method>
<method name="get_sample_library" qualifiers="const">
<return type="SampleLibrary">
</return>
<description>
- Return the sample library used by the player.
+ Return the sample library used by the player.
</description>
</method>
<method name="get_volume" qualifiers="const">
@@ -33073,7 +33130,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="voice" type="int">
</argument>
<description>
- Return the current volume (on a linear scale) for a given voice.
+ Return the current volume (on a linear scale) for a given voice.
</description>
</method>
<method name="get_volume_db" qualifiers="const">
@@ -33082,14 +33139,14 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="voice" type="int">
</argument>
<description>
- Return the current volume (in dB) for a given voice.
+ Return the current volume (in dB) for a given voice.
</description>
</method>
<method name="is_active" qualifiers="const">
<return type="bool">
</return>
<description>
- Return whether the player is currently active.
+ Return whether the player is currently active.
</description>
</method>
<method name="is_voice_active" qualifiers="const">
@@ -33098,7 +33155,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="voice" type="int">
</argument>
<description>
- Return whether the given voice is currently active.
+ Return whether the given voice is currently active.
</description>
</method>
<method name="play">
@@ -33109,8 +33166,8 @@ A similar effect may be achieved moving this node's descendants.
<argument index="1" name="unique" type="bool" default="false">
</argument>
<description>
- Play a sample referenced by its name.
- Optionally, the playback can be made "unique" to force stopping all other samples currently played. The voices allocated for playback will then be returned.
+ Play a sample referenced by its name.
+ Optionally, the playback can be made "unique" to force stopping all other samples currently played. The voices allocated for playback will then be returned.
</description>
</method>
<method name="set_chorus">
@@ -33119,14 +33176,14 @@ A similar effect may be achieved moving this node's descendants.
<argument index="1" name="send" type="float">
</argument>
<description>
- Set the chorus send level of a voice (from 0 to 1.0). For setting chorus parameters, see [AudioServer].
+ Set the chorus send level of a voice (from 0 to 1.0). For setting chorus parameters, see [AudioServer].
</description>
</method>
<method name="set_default_chorus">
<argument index="0" name="send" type="float">
</argument>
<description>
- Set the default chorus send level of the player (from 0 to 1.0). For setting chorus parameters, see [AudioServer].
+ Set the default chorus send level of the player (from 0 to 1.0). For setting chorus parameters, see [AudioServer].
</description>
</method>
<method name="set_default_filter">
@@ -33139,7 +33196,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="3" name="gain" type="float" default="0">
</argument>
<description>
- Set the default filter for the player, using the given type (see FILTER_* constants), cutoff frequency (from 20 to 16,384 Hz) and resonance (from 0 to 4.0).
+ Set the default filter for the player, using the given type (see FILTER_* constants), cutoff frequency (from 20 to 16,384 Hz) and resonance (from 0 to 4.0).
Optionally, a gain can also be given (from 0 to 2.0).
</description>
</method>
@@ -33151,15 +33208,15 @@ A similar effect may be achieved moving this node's descendants.
<argument index="2" name="height" type="float" default="0">
</argument>
<description>
- Set the default panning of the player. Panning goes from -1.0 (left) to +1.0 (right).
- Optionally, for hardware than support 3D sound, one can also set depth and height (also in range -1.0 to +1.0).
+ Set the default panning of the player. Panning goes from -1.0 (left) to +1.0 (right).
+ Optionally, for hardware than support 3D sound, one can also set depth and height (also in range -1.0 to +1.0).
</description>
</method>
<method name="set_default_pitch_scale">
<argument index="0" name="ratio" type="float">
</argument>
<description>
- Set the default pitch scale of the player. A ratio of 1.0 is the normal scale.
+ Set the default pitch scale of the player. A ratio of 1.0 is the normal scale.
</description>
</method>
<method name="set_default_reverb">
@@ -33168,24 +33225,24 @@ A similar effect may be achieved moving this node's descendants.
<argument index="1" name="send" type="float">
</argument>
<description>
- Set the default reverberation type (see REVERB_* constants) and send level (from 0 to 1.0) of the player.
+ Set the default reverberation type (see REVERB_* constants) and send level (from 0 to 1.0) of the player.
</description>
</method>
<method name="set_default_volume">
<argument index="0" name="volume" type="float">
</argument>
<description>
- Set the default volume of the player using a linear scale.
- The "volume" argument should be a positive factor ranging from 0.0 (mute) up to 16.0 (i.e. 24 dB).
- A factor of 1.0 means that the voice will be played at normal system volume. Factors above 1.0 might be limited by the platform's audio output.
+ Set the default volume of the player using a linear scale.
+ The "volume" argument should be a positive factor ranging from 0.0 (mute) up to 16.0 (i.e. 24 dB).
+ A factor of 1.0 means that the voice will be played at normal system volume. Factors above 1.0 might be limited by the platform's audio output.
</description>
</method>
<method name="set_default_volume_db">
<argument index="0" name="db" type="float">
</argument>
<description>
- Set the default volume of the player in dB.
- The "dB" argument can range from -80 to 24 dB, 0 dB being the maximum volume. Every 6 dB (resp. -6 dB), the volume is increased (resp. reduced) by half.
+ Set the default volume of the player in dB.
+ The "dB" argument can range from -80 to 24 dB, 0 dB being the maximum volume. Every 6 dB (resp. -6 dB), the volume is increased (resp. reduced) by half.
</description>
</method>
<method name="set_filter">
@@ -33200,8 +33257,8 @@ A similar effect may be achieved moving this node's descendants.
<argument index="4" name="gain" type="float" default="0">
</argument>
<description>
- Set the filter for a given voice, using the given type (see FILTER_* constants), cutoff frequency (from 20 to 16,384 Hz) and resonance (from 0 to 4.0).
- Optionally, a gain can also be given (from 0 to 2.0).
+ Set the filter for a given voice, using the given type (see FILTER_* constants), cutoff frequency (from 20 to 16,384 Hz) and resonance (from 0 to 4.0).
+ Optionally, a gain can also be given (from 0 to 2.0).
</description>
</method>
<method name="set_mix_rate">
@@ -33210,7 +33267,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="1" name="hz" type="int">
</argument>
<description>
- Set the mix rate (in Hz) of a given voice.
+ Set the mix rate (in Hz) of a given voice.
</description>
</method>
<method name="set_pan">
@@ -33223,8 +33280,8 @@ A similar effect may be achieved moving this node's descendants.
<argument index="3" name="height" type="float" default="0">
</argument>
<description>
- Set the panning of a voice. Panning goes from -1.0 (left) to +1.0 (right).
- Optionally, for hardware than support 3D sound, one can also set depth and height (also in range -1.0 to +1.0).
+ Set the panning of a voice. Panning goes from -1.0 (left) to +1.0 (right).
+ Optionally, for hardware than support 3D sound, one can also set depth and height (also in range -1.0 to +1.0).
</description>
</method>
<method name="set_pitch_scale">
@@ -33233,14 +33290,14 @@ A similar effect may be achieved moving this node's descendants.
<argument index="1" name="ratio" type="float">
</argument>
<description>
- Set the pitch scale of a given voice. A ratio of 1.0 is the normal scale.
+ Set the pitch scale of a given voice. A ratio of 1.0 is the normal scale.
</description>
</method>
<method name="set_polyphony">
<argument index="0" name="max_voices" type="int">
</argument>
<description>
- Set the polyphony of the player (maximum amount of simultaneous voices).
+ Set the polyphony of the player (maximum amount of simultaneous voices).
</description>
</method>
<method name="set_reverb">
@@ -33251,14 +33308,14 @@ A similar effect may be achieved moving this node's descendants.
<argument index="2" name="send" type="float">
</argument>
<description>
- Set the reverberation type (see REVERB_* constants) and send level (from 0 to 1.0) of a voice.
+ Set the reverberation type (see REVERB_* constants) and send level (from 0 to 1.0) of a voice.
</description>
</method>
<method name="set_sample_library">
<argument index="0" name="library" type="SampleLibrary">
</argument>
<description>
- Set the sample library for the player.
+ Set the sample library for the player.
</description>
</method>
<method name="set_volume">
@@ -33267,9 +33324,9 @@ A similar effect may be achieved moving this node's descendants.
<argument index="1" name="volume" type="float">
</argument>
<description>
- Set the volume of a given voice using a linear scale.
- The "volume" argument should be a positive factor ranging from 0.0 (mute) up to 16.0 (i.e. 24 dB).
- A factor of 1.0 means that the voice will be played at normal system volume. Factors above 1.0 might be limited by the platform's audio output.
+ Set the volume of a given voice using a linear scale.
+ The "volume" argument should be a positive factor ranging from 0.0 (mute) up to 16.0 (i.e. 24 dB).
+ A factor of 1.0 means that the voice will be played at normal system volume. Factors above 1.0 might be limited by the platform's audio output.
</description>
</method>
<method name="set_volume_db">
@@ -33278,20 +33335,20 @@ A similar effect may be achieved moving this node's descendants.
<argument index="1" name="db" type="float">
</argument>
<description>
- Set the volume of a given voice in dB.
- The "dB" argument can range from -80 to 24 dB, 0 dB being the maximum volume. Every 6 dB (resp. -6 dB), the volume is increased (resp. reduced) by half.
+ Set the volume of a given voice in dB.
+ The "dB" argument can range from -80 to 24 dB, 0 dB being the maximum volume. Every 6 dB (resp. -6 dB), the volume is increased (resp. reduced) by half.
</description>
</method>
<method name="stop">
<argument index="0" name="voice" type="int">
</argument>
<description>
- Stop a given voice.
+ Stop a given voice.
</description>
</method>
<method name="stop_all">
<description>
- Stop all playing voices.
+ Stop all playing voices.
</description>
</method>
</methods>
@@ -33342,31 +33399,31 @@ A similar effect may be achieved moving this node's descendants.
</class>
<class name="SamplePlayer2D" inherits="SoundPlayer2D" category="Core">
<brief_description>
- Sample player for positional 2D Sound.
+ Sample player for positional 2D Sound.
</brief_description>
<description>
- Sample player for positional 2D Sound. Plays sound samples positionally, left and right depending on the distance/place on the screen.
+ Sample player for positional 2D Sound. Plays sound samples positionally, left and right depending on the distance/place on the screen.
</description>
<methods>
<method name="get_polyphony" qualifiers="const">
<return type="int">
</return>
<description>
- Return the polyphony of the player.
+ Return the polyphony of the player.
</description>
</method>
<method name="get_random_pitch_scale" qualifiers="const">
<return type="float">
</return>
<description>
- Return the amplitude used for random pitch scale variations.
+ Return the amplitude used for random pitch scale variations.
</description>
</method>
<method name="get_sample_library" qualifiers="const">
<return type="SampleLibrary">
</return>
<description>
- Return the sample library used by the player.
+ Return the sample library used by the player.
</description>
</method>
<method name="is_voice_active" qualifiers="const">
@@ -33375,7 +33432,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="voice" type="int">
</argument>
<description>
- Return whether a voice is still active or has stopped playing.
+ Return whether a voice is still active or has stopped playing.
</description>
</method>
<method name="play">
@@ -33386,44 +33443,44 @@ A similar effect may be achieved moving this node's descendants.
<argument index="1" name="voice" type="int" default="-2">
</argument>
<description>
- Play a sample. An internal polyphony ID can optionally be passed, or defaults to NEXT_VOICE.
- Return a voice ID which can be used to modify the voice parameters, or INVALID_VOICE if the voice or sample are invalid.
+ Play a sample. An internal polyphony ID can optionally be passed, or defaults to NEXT_VOICE.
+ Return a voice ID which can be used to modify the voice parameters, or INVALID_VOICE if the voice or sample are invalid.
</description>
</method>
<method name="set_polyphony">
<argument index="0" name="max_voices" type="int">
</argument>
<description>
- Set the polyphony of the player (maximum amount of simultaneous voices).
+ Set the polyphony of the player (maximum amount of simultaneous voices).
</description>
</method>
<method name="set_random_pitch_scale">
<argument index="0" name="val" type="float">
</argument>
<description>
- Set the amplitude for random pitch scale variations. If different from zero, the pitch scale will vary randomly around 1.0 in a range defined by val.
- The actual pitch scale will be, with "variation" ranging from -val to val:
- * variation &gt; 0: 1.0 + variation
- * variation &lt; 0: 1.0/(1.0 - variation)
+ Set the amplitude for random pitch scale variations. If different from zero, the pitch scale will vary randomly around 1.0 in a range defined by val.
+ The actual pitch scale will be, with "variation" ranging from -val to val:
+ * variation &gt; 0: 1.0 + variation
+ * variation &lt; 0: 1.0/(1.0 - variation)
</description>
</method>
<method name="set_sample_library">
<argument index="0" name="library" type="SampleLibrary">
</argument>
<description>
- Set the sample library for the player.
+ Set the sample library for the player.
</description>
</method>
<method name="stop_all">
<description>
- Stop all playing voices.
+ Stop all playing voices.
</description>
</method>
<method name="stop_voice">
<argument index="0" name="voice" type="int">
</argument>
<description>
- Stop a given voice.
+ Stop a given voice.
</description>
</method>
<method name="voice_set_pitch_scale">
@@ -33432,7 +33489,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="1" name="ratio" type="float">
</argument>
<description>
- Change the pitch scale of a currently playing voice.
+ Change the pitch scale of a currently playing voice.
</description>
</method>
<method name="voice_set_volume_scale_db">
@@ -33441,7 +33498,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="1" name="db" type="float">
</argument>
<description>
- Change the volume scale (in dB) of a currently playing voice.
+ Change the volume scale (in dB) of a currently playing voice.
</description>
</method>
</methods>
@@ -33888,31 +33945,31 @@ A similar effect may be achieved moving this node's descendants.
</class>
<class name="Script" inherits="Resource" category="Core">
<brief_description>
- Base class for scripts.
+ Base class for scripts.
</brief_description>
<description>
- Base class for scripts. Any script that is loaded becomes one of these resources, which can then create instances.
+ Base class for scripts. Any script that is loaded becomes one of these resources, which can then create instances.
</description>
<methods>
<method name="can_instance" qualifiers="const">
<return type="bool">
</return>
<description>
- Return true if this script can be instance (ie not a library).
+ Return true if this script can be instance (ie not a library).
</description>
</method>
<method name="get_source_code" qualifiers="const">
<return type="String">
</return>
<description>
- Return the script source code (if available).
+ Return the script source code (if available).
</description>
</method>
<method name="has_source_code" qualifiers="const">
<return type="bool">
</return>
<description>
- Return true if the script contains source code.
+ Return true if the script contains source code.
</description>
</method>
<method name="instance_has" qualifiers="const">
@@ -33921,7 +33978,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="base_object" type="Object">
</argument>
<description>
- Return true if a given object uses an instance of this script.
+ Return true if a given object uses an instance of this script.
</description>
</method>
<method name="reload">
@@ -33936,7 +33993,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="source" type="String">
</argument>
<description>
- Set the script source code.
+ Set the script source code.
</description>
</method>
</methods>
@@ -33945,10 +34002,10 @@ A similar effect may be achieved moving this node's descendants.
</class>
<class name="ScrollBar" inherits="Range" category="Core">
<brief_description>
- Base class for scroll bars.
+ Base class for scroll bars.
</brief_description>
<description>
- Scrollbars are a [Range] based [Control], that display a draggable area (the size of the page). Horizontal ([HScrollBar]) and Vertical ([VScrollBar]) versions are available.
+ Scrollbars are a [Range] based [Control], that display a draggable area (the size of the page). Horizontal ([HScrollBar]) and Vertical ([VScrollBar]) versions are available.
</description>
<methods>
<method name="get_custom_step" qualifiers="const">
@@ -33969,66 +34026,66 @@ A similar effect may be achieved moving this node's descendants.
</class>
<class name="ScrollContainer" inherits="Container" category="Core">
<brief_description>
- A helper node for displaying scrollable elements (e.g. lists).
+ A helper node for displaying scrollable elements (e.g. lists).
</brief_description>
<description>
- A ScrollContainer node with a [Control] child and scrollbar child ([HScrollbar], [VScrollBar], or both) will only draw the Control within the ScrollContainer area. Scrollbars will automatically be drawn at the right (for vertical) or bottom (for horizontal) and will enable dragging to move the viewable Control (and its children) within the ScrollContainer. Scrollbars will also automatically resize the grabber based on the minimum_size of the Control relative to the ScrollContainer. Works great with a [Panel] control.
+ A ScrollContainer node with a [Control] child and scrollbar child ([HScrollbar], [VScrollBar], or both) will only draw the Control within the ScrollContainer area. Scrollbars will automatically be drawn at the right (for vertical) or bottom (for horizontal) and will enable dragging to move the viewable Control (and its children) within the ScrollContainer. Scrollbars will also automatically resize the grabber based on the minimum_size of the Control relative to the ScrollContainer. Works great with a [Panel] control.
</description>
<methods>
<method name="get_h_scroll" qualifiers="const">
<return type="int">
</return>
<description>
- Return current horizontal scroll value.
+ Return current horizontal scroll value.
</description>
</method>
<method name="get_v_scroll" qualifiers="const">
<return type="int">
</return>
<description>
- Return current vertical scroll value.
+ Return current vertical scroll value.
</description>
</method>
<method name="is_h_scroll_enabled" qualifiers="const">
<return type="bool">
</return>
<description>
- Return true if horizontal scrool is allowed.
+ Return true if horizontal scrool is allowed.
</description>
</method>
<method name="is_v_scroll_enabled" qualifiers="const">
<return type="bool">
</return>
<description>
- Return true if vertical scrool is allowed.
+ Return true if vertical scrool is allowed.
</description>
</method>
<method name="set_enable_h_scroll">
<argument index="0" name="enable" type="bool">
</argument>
<description>
- Set allows horizontal scrool.
+ Set allows horizontal scrool.
</description>
</method>
<method name="set_enable_v_scroll">
<argument index="0" name="enable" type="bool">
</argument>
<description>
- Set allows vertical scrool.
+ Set allows vertical scrool.
</description>
</method>
<method name="set_h_scroll">
<argument index="0" name="val" type="int">
</argument>
<description>
- Set horizontal scroll value.
+ Set horizontal scroll value.
</description>
</method>
<method name="set_v_scroll">
<argument index="0" name="val" type="int">
</argument>
<description>
- Set vertical scroll value.
+ Set vertical scroll value.
</description>
</method>
</methods>
@@ -34037,38 +34094,38 @@ A similar effect may be achieved moving this node's descendants.
</class>
<class name="SegmentShape2D" inherits="Shape2D" category="Core">
<brief_description>
- Segment Shape for 2D Collision Detection.
+ Segment Shape for 2D Collision Detection.
</brief_description>
<description>
- Segment Shape for 2D Collision Detection, consists of two points, 'a' and 'b'.
+ Segment Shape for 2D Collision Detection, consists of two points, 'a' and 'b'.
</description>
<methods>
<method name="get_a" qualifiers="const">
<return type="Vector2">
</return>
<description>
- Return the first point's position.
+ Return the first point's position.
</description>
</method>
<method name="get_b" qualifiers="const">
<return type="Vector2">
</return>
<description>
- Return the second point's position.
+ Return the second point's position.
</description>
</method>
<method name="set_a">
<argument index="0" name="a" type="Vector2">
</argument>
<description>
- Set the first point's position.
+ Set the first point's position.
</description>
</method>
<method name="set_b">
<argument index="0" name="b" type="Vector2">
</argument>
<description>
- Set the second point's position.
+ Set the second point's position.
</description>
</method>
</methods>
@@ -34077,24 +34134,24 @@ A similar effect may be achieved moving this node's descendants.
</class>
<class name="Semaphore" inherits="Reference" category="Core">
<brief_description>
- A synchronization Semaphore.
+ A synchronization Semaphore.
</brief_description>
<description>
- A synchronization Semaphore. Element used in multi-threadding. Initialized to zero on creation.
+ A synchronization Semaphore. Element used in multi-threadding. Initialized to zero on creation.
</description>
<methods>
<method name="post">
<return type="Error">
</return>
<description>
- Lowers the [Semaphore], allowing one more thread in.
+ Lowers the [Semaphore], allowing one more thread in.
</description>
</method>
<method name="wait">
<return type="Error">
</return>
<description>
- Tries to wait for the [Semaphore], if it's value is zero, blocks until non-zero.
+ Tries to wait for the [Semaphore], if it's value is zero, blocks until non-zero.
</description>
</method>
</methods>
@@ -34103,10 +34160,10 @@ A similar effect may be achieved moving this node's descendants.
</class>
<class name="Separator" inherits="Control" category="Core">
<brief_description>
- Base class for separators.
+ Base class for separators.
</brief_description>
<description>
- Separator is a [Control] used for separating other controls. It's purely a visual decoration. Horizontal ([HSeparator]) and Vertical ([VSeparator]) versions are available.
+ Separator is a [Control] used for separating other controls. It's purely a visual decoration. Horizontal ([HSeparator]) and Vertical ([VSeparator]) versions are available.
</description>
<methods>
</methods>
@@ -34115,10 +34172,10 @@ A similar effect may be achieved moving this node's descendants.
</class>
<class name="Shader" inherits="Resource" category="Core">
<brief_description>
- To be changed, ignore.
+ To be changed, ignore.
</brief_description>
<description>
- To be changed, ignore.
+ To be changed, ignore.
</description>
<methods>
<method name="get_default_texture_param" qualifiers="const">
@@ -35113,10 +35170,10 @@ A similar effect may be achieved moving this node's descendants.
</class>
<class name="Shape2D" inherits="Resource" category="Core">
<brief_description>
- Base class for all 2D Shapes.
+ Base class for all 2D Shapes.
</brief_description>
<description>
- Base class for all 2D Shapes. All 2D shape types inherit from this.
+ Base class for all 2D Shapes. All 2D shape types inherit from this.
</description>
<methods>
<method name="collide">
@@ -35129,8 +35186,8 @@ A similar effect may be achieved moving this node's descendants.
<argument index="2" name="shape_xform" type="Matrix32">
</argument>
<description>
- Return whether this shape is colliding with another.
- This method needs the transformation matrix for this shape ([code]local_xform[/code]), the shape to check collisions with ([code]with_shape[/code]), and the transformation matrix of that shape ([code]shape_xform[/code]).
+ Return whether this shape is colliding with another.
+ This method needs the transformation matrix for this shape ([code]local_xform[/code]), the shape to check collisions with ([code]with_shape[/code]), and the transformation matrix of that shape ([code]shape_xform[/code]).
</description>
</method>
<method name="collide_and_get_contacts">
@@ -35143,8 +35200,8 @@ A similar effect may be achieved moving this node's descendants.
<argument index="2" name="shape_xform" type="Matrix32">
</argument>
<description>
- Return a list of the points where this shape touches another. If there are no collisions, the list is empty.
- This method needs the transformation matrix for this shape ([code]local_xform[/code]), the shape to check collisions with ([code]with_shape[/code]), and the transformation matrix of that shape ([code]shape_xform[/code]).
+ Return a list of the points where this shape touches another. If there are no collisions, the list is empty.
+ This method needs the transformation matrix for this shape ([code]local_xform[/code]), the shape to check collisions with ([code]with_shape[/code]), and the transformation matrix of that shape ([code]shape_xform[/code]).
</description>
</method>
<method name="collide_with_motion">
@@ -35161,8 +35218,8 @@ A similar effect may be achieved moving this node's descendants.
<argument index="4" name="shape_motion" type="Vector2">
</argument>
<description>
- Return whether this shape would collide with another, if a given movement was applied.
- This method needs the transformation matrix for this shape ([code]local_xform[/code]), the movement to test on this shape ([code]local_motion[/code]), the shape to check collisions with ([code]with_shape[/code]), the transformation matrix of that shape ([code]shape_xform[/code]), and the movement to test onto the other object ([code]shape_motion[/code]).
+ Return whether this shape would collide with another, if a given movement was applied.
+ This method needs the transformation matrix for this shape ([code]local_xform[/code]), the movement to test on this shape ([code]local_motion[/code]), the shape to check collisions with ([code]with_shape[/code]), the transformation matrix of that shape ([code]shape_xform[/code]), and the movement to test onto the other object ([code]shape_motion[/code]).
</description>
</method>
<method name="collide_with_motion_and_get_contacts">
@@ -35179,23 +35236,23 @@ A similar effect may be achieved moving this node's descendants.
<argument index="4" name="shape_motion" type="Vector2">
</argument>
<description>
- Return a list of the points where this shape would touch another, if a given movement was applied. If there are no collisions, the list is empty.
- This method needs the transformation matrix for this shape ([code]local_xform[/code]), the movement to test on this shape ([code]local_motion[/code]), the shape to check collisions with ([code]with_shape[/code]), the transformation matrix of that shape ([code]shape_xform[/code]), and the movement to test onto the other object ([code]shape_motion[/code]).
+ Return a list of the points where this shape would touch another, if a given movement was applied. If there are no collisions, the list is empty.
+ This method needs the transformation matrix for this shape ([code]local_xform[/code]), the movement to test on this shape ([code]local_motion[/code]), the shape to check collisions with ([code]with_shape[/code]), the transformation matrix of that shape ([code]shape_xform[/code]), and the movement to test onto the other object ([code]shape_motion[/code]).
</description>
</method>
<method name="get_custom_solver_bias" qualifiers="const">
<return type="float">
</return>
<description>
- Return the custom solver bias.
+ Return the custom solver bias.
</description>
</method>
<method name="set_custom_solver_bias">
<argument index="0" name="bias" type="float">
</argument>
<description>
- Use a custom solver bias. No need to change this unless you really know what you are doing.
- The solver bias is a factor controlling how much two objects "rebound" off each other, when colliding, to avoid them getting into each other because of numerical imprecision.
+ Use a custom solver bias. No need to change this unless you really know what you are doing.
+ The solver bias is a factor controlling how much two objects "rebound" off each other, when colliding, to avoid them getting into each other because of numerical imprecision.
</description>
</method>
</methods>
@@ -35246,17 +35303,17 @@ A similar effect may be achieved moving this node's descendants.
</class>
<class name="Skeleton" inherits="Spatial" category="Core">
<brief_description>
- Skeleton for characters and animated objects.
+ Skeleton for characters and animated objects.
</brief_description>
<description>
- Skeleton provides a hierarchical interface for managing bones, including pose, rest and animation (see [Animation]). Skeleton will support rag doll dynamics in the future.
+ Skeleton provides a hierarchical interface for managing bones, including pose, rest and animation (see [Animation]). Skeleton will support rag doll dynamics in the future.
</description>
<methods>
<method name="add_bone">
<argument index="0" name="name" type="String">
</argument>
<description>
- Add a bone, with name "name". [method get_bone_count] will become the bone index.
+ Add a bone, with name "name". [method get_bone_count] will become the bone index.
</description>
</method>
<method name="bind_child_node_to_bone">
@@ -35265,12 +35322,12 @@ A similar effect may be achieved moving this node's descendants.
<argument index="1" name="node" type="Node">
</argument>
<description>
- Deprecated soon.
+ Deprecated soon.
</description>
</method>
<method name="clear_bones">
<description>
- Clear all the bones in this skeleton.
+ Clear all the bones in this skeleton.
</description>
</method>
<method name="find_bone" qualifiers="const">
@@ -35279,14 +35336,14 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="name" type="String">
</argument>
<description>
- Return the bone index that matches "name" as its name.
+ Return the bone index that matches "name" as its name.
</description>
</method>
<method name="get_bone_count" qualifiers="const">
<return type="int">
</return>
<description>
- Return the amount of bones in the skeleton.
+ Return the amount of bones in the skeleton.
</description>
</method>
<method name="get_bone_custom_pose" qualifiers="const">
@@ -35311,7 +35368,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="bone_idx" type="int">
</argument>
<description>
- Return the name of the bone at index "index"
+ Return the name of the bone at index "index"
</description>
</method>
<method name="get_bone_parent" qualifiers="const">
@@ -35320,7 +35377,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="bone_idx" type="int">
</argument>
<description>
- Return the bone index which is the parent of the bone at "bone_idx". If -1, then bone has no parent. Note that the parent bone returned will always be less than "bone_idx".
+ Return the bone index which is the parent of the bone at "bone_idx". If -1, then bone has no parent. Note that the parent bone returned will always be less than "bone_idx".
</description>
</method>
<method name="get_bone_pose" qualifiers="const">
@@ -35329,7 +35386,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="bone_idx" type="int">
</argument>
<description>
- Return the pose transform for bone "bone_idx".
+ Return the pose transform for bone "bone_idx".
</description>
</method>
<method name="get_bone_rest" qualifiers="const">
@@ -35338,7 +35395,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="bone_idx" type="int">
</argument>
<description>
- Return the rest transform for a bone "bone_idx".
+ Return the rest transform for a bone "bone_idx".
</description>
</method>
<method name="get_bone_transform" qualifiers="const">
@@ -35355,7 +35412,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="bone_idx" type="int">
</argument>
<description>
- Deprecated soon.
+ Deprecated soon.
</description>
</method>
<method name="is_bone_rest_disabled" qualifiers="const">
@@ -35396,7 +35453,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="1" name="parent_idx" type="int">
</argument>
<description>
- Set the bone index "parent_idx" as the parent of the bone at "bone_idx". If -1, then bone has no parent. Note: "parent_idx" must be less than "bone_idx".
+ Set the bone index "parent_idx" as the parent of the bone at "bone_idx". If -1, then bone has no parent. Note: "parent_idx" must be less than "bone_idx".
</description>
</method>
<method name="set_bone_pose">
@@ -35405,7 +35462,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="1" name="pose" type="Transform">
</argument>
<description>
- Return the pose transform for bone "bone_idx".
+ Return the pose transform for bone "bone_idx".
</description>
</method>
<method name="set_bone_rest">
@@ -35414,7 +35471,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="1" name="rest" type="Transform">
</argument>
<description>
- Set the rest transform for bone "bone_idx"
+ Set the rest transform for bone "bone_idx"
</description>
</method>
<method name="unbind_child_node_from_bone">
@@ -35423,7 +35480,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="1" name="node" type="Node">
</argument>
<description>
- Deprecated soon.
+ Deprecated soon.
</description>
</method>
<method name="unparent_bone_and_rest">
@@ -35440,38 +35497,38 @@ A similar effect may be achieved moving this node's descendants.
</class>
<class name="Slider" inherits="Range" category="Core">
<brief_description>
- Base class for GUI Sliders.
+ Base class for GUI Sliders.
</brief_description>
<description>
- Base class for GUI Sliders.
+ Base class for GUI Sliders.
</description>
<methods>
<method name="get_ticks" qualifiers="const">
<return type="int">
</return>
<description>
- Return amounts of ticks to display on slider.
+ Return amounts of ticks to display on slider.
</description>
</method>
<method name="get_ticks_on_borders" qualifiers="const">
<return type="bool">
</return>
<description>
- Return true if ticks are visible on borders.
+ Return true if ticks are visible on borders.
</description>
</method>
<method name="set_ticks">
<argument index="0" name="count" type="int">
</argument>
<description>
- Set amount of ticks to display in slider.
+ Set amount of ticks to display in slider.
</description>
</method>
<method name="set_ticks_on_borders">
<argument index="0" name="ticks_on_border" type="bool">
</argument>
<description>
- Set true if ticks are visible on borders.
+ Set true if ticks are visible on borders.
</description>
</method>
</methods>
@@ -35552,10 +35609,10 @@ A similar effect may be achieved moving this node's descendants.
</class>
<class name="SoundPlayer2D" inherits="Node2D" category="Core">
<brief_description>
- Base class for playing spatial 2D sound.
+ Base class for playing spatial 2D sound.
</brief_description>
<description>
- Base class for playing spatial 2D sound.
+ Base class for playing spatial 2D sound.
</description>
<methods>
<method name="get_param" qualifiers="const">
@@ -35642,10 +35699,10 @@ A similar effect may be achieved moving this node's descendants.
</class>
<class name="Spatial" inherits="Node" category="Core">
<brief_description>
- Base class for all 3D nodes.
+ Base class for all 3D nodes.
</brief_description>
<description>
- Spatial is the base for every type of 3D [Node]. It contains a 3D [Transform] which can be set or get as local or global. If a Spatial [Node] has Spatial children, their transforms will be relative to the parent.
+ Spatial is the base for every type of 3D [Node]. It contains a 3D [Transform] which can be set or get as local or global. If a Spatial [Node] has Spatial children, their transforms will be relative to the parent.
</description>
<methods>
<method name="get_gizmo" qualifiers="const">
@@ -35658,14 +35715,14 @@ A similar effect may be achieved moving this node's descendants.
<return type="Transform">
</return>
<description>
- Return the global transform, relative to worldspace.
+ Return the global transform, relative to worldspace.
</description>
</method>
<method name="get_parent_spatial" qualifiers="const">
<return type="Object">
</return>
<description>
- Return the parent [Spatial], or an empty [Object] if no parent exists or parent is not of type [Spatial].
+ Return the parent [Spatial], or an empty [Object] if no parent exists or parent is not of type [Spatial].
</description>
</method>
<method name="get_rotation" qualifiers="const">
@@ -35690,7 +35747,7 @@ A similar effect may be achieved moving this node's descendants.
<return type="Transform">
</return>
<description>
- Return the local transform, relative to the bone parent.
+ Return the local transform, relative to the bone parent.
</description>
</method>
<method name="get_translation" qualifiers="const">
@@ -35811,7 +35868,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="global" type="Transform">
</argument>
<description>
- Set the transform globally, relative to worldspace.
+ Set the transform globally, relative to worldspace.
</description>
</method>
<method name="set_hidden">
@@ -35858,7 +35915,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="local" type="Transform">
</argument>
<description>
- Set the transform locally, relative to the parent spatial node.
+ Set the transform locally, relative to the parent spatial node.
</description>
</method>
<method name="set_translation">
@@ -36036,10 +36093,10 @@ A similar effect may be achieved moving this node's descendants.
</class>
<class name="SpatialSound2DServer" inherits="Object" category="Core">
<brief_description>
- Server for Spatial 2D Sound.
+ Server for Spatial 2D Sound.
</brief_description>
<description>
- Server for Spatial 2D Sound.
+ Server for Spatial 2D Sound.
</description>
<methods>
</methods>
@@ -36252,10 +36309,10 @@ A similar effect may be achieved moving this node's descendants.
</class>
<class name="SpinBox" inherits="Range" category="Core">
<brief_description>
- Numerical input text field.
+ Numerical input text field.
</brief_description>
<description>
- SpinBox is a numerical input text field. It allows entering integers and floats.
+ SpinBox is a numerical input text field. It allows entering integers and floats.
</description>
<methods>
<method name="get_line_edit">
@@ -36274,35 +36331,35 @@ A similar effect may be achieved moving this node's descendants.
<return type="String">
</return>
<description>
- Return the specific suffix.
+ Return the specific suffix.
</description>
</method>
<method name="is_editable" qualifiers="const">
<return type="bool">
</return>
<description>
- Return if the spinbox is editable.
+ Return if the spinbox is editable.
</description>
</method>
<method name="set_editable">
<argument index="0" name="editable" type="bool">
</argument>
<description>
- Set whether the spinbox is editable.
+ Set whether the spinbox is editable.
</description>
</method>
<method name="set_prefix">
<argument index="0" name="prefix" type="String">
</argument>
<description>
- Set a prefix.
+ Set a prefix.
</description>
</method>
<method name="set_suffix">
<argument index="0" name="suffix" type="String">
</argument>
<description>
- Set a specific suffix.
+ Set a specific suffix.
</description>
</method>
</methods>
@@ -36315,52 +36372,52 @@ A similar effect may be achieved moving this node's descendants.
</class>
<class name="SplitContainer" inherits="Container" category="Core">
<brief_description>
- Container for splitting and adjusting.
+ Container for splitting and adjusting.
</brief_description>
<description>
- Container for splitting two controls vertically or horizontally, with a grabber that allows adjusting the split offset or ratio.
+ Container for splitting two controls vertically or horizontally, with a grabber that allows adjusting the split offset or ratio.
</description>
<methods>
<method name="get_dragger_visibility" qualifiers="const">
<return type="int">
</return>
<description>
- Return visibility of the split dragger(One of [DRAGGER_VISIBLE], [DRAGGER_HIDDEN] or [DRAGGER_HIDDEN_COLLAPSED]).
+ Return visibility of the split dragger(One of [DRAGGER_VISIBLE], [DRAGGER_HIDDEN] or [DRAGGER_HIDDEN_COLLAPSED]).
</description>
</method>
<method name="get_split_offset" qualifiers="const">
<return type="int">
</return>
<description>
- Return the split offset.
+ Return the split offset.
</description>
</method>
<method name="is_collapsed" qualifiers="const">
<return type="bool">
</return>
<description>
- Return true if the split is collapsed.
+ Return true if the split is collapsed.
</description>
</method>
<method name="set_collapsed">
<argument index="0" name="collapsed" type="bool">
</argument>
<description>
- Set if the split must be collapsed.
+ Set if the split must be collapsed.
</description>
</method>
<method name="set_dragger_visibility">
<argument index="0" name="mode" type="int">
</argument>
<description>
- Set visibility of the split dragger([i]mode[/i] must be one of [DRAGGER_VISIBLE], [DRAGGER_HIDDEN] or [DRAGGER_HIDDEN_COLLAPSED]).
+ Set visibility of the split dragger([i]mode[/i] must be one of [DRAGGER_VISIBLE], [DRAGGER_HIDDEN] or [DRAGGER_HIDDEN_COLLAPSED]).
</description>
</method>
<method name="set_split_offset">
<argument index="0" name="offset" type="int">
</argument>
<description>
- Set the split offset.
+ Set the split offset.
</description>
</method>
</methods>
@@ -36369,7 +36426,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="offset" type="int">
</argument>
<description>
- Emmited when the dragger is gragged by user.
+ Emmited when the dragger is gragged by user.
</description>
</signal>
</signals>
@@ -36387,10 +36444,10 @@ A similar effect may be achieved moving this node's descendants.
</class>
<class name="SpotLight" inherits="Light" category="Core">
<brief_description>
- Spotlight [Light], such as a reflector spotlight or a lantern.
+ Spotlight [Light], such as a reflector spotlight or a lantern.
</brief_description>
<description>
- A SpotLight light is a type of [Light] node that emits lights in a specific direction, in the shape of a cone. The light is attenuated through the distance and this attenuation can be configured by changing the energy, radius and attenuation parameters of [Light]. TODO: Image of a spotlight.
+ A SpotLight light is a type of [Light] node that emits lights in a specific direction, in the shape of a cone. The light is attenuated through the distance and this attenuation can be configured by changing the energy, radius and attenuation parameters of [Light]. TODO: Image of a spotlight.
</description>
<methods>
</methods>
@@ -36399,164 +36456,164 @@ A similar effect may be achieved moving this node's descendants.
</class>
<class name="Sprite" inherits="Node2D" category="Core">
<brief_description>
- General purpose Sprite node.
+ General purpose Sprite node.
</brief_description>
<description>
- General purpose Sprite node. This Sprite node can show any texture as a sprite. The texture can be used as a spritesheet for animation, or only a region from a bigger texture can referenced, like an atlas.
+ General purpose Sprite node. This Sprite node can show any texture as a sprite. The texture can be used as a spritesheet for animation, or only a region from a bigger texture can referenced, like an atlas.
</description>
<methods>
<method name="get_frame" qualifiers="const">
<return type="int">
</return>
<description>
- Return the texture frame for a sprite-sheet, works when vframes or hframes are greater than 1.
+ Return the texture frame for a sprite-sheet, works when vframes or hframes are greater than 1.
</description>
</method>
<method name="get_hframes" qualifiers="const">
<return type="int">
</return>
<description>
- Return the amount of horizontal frames. See [method set_hframes].
+ Return the amount of horizontal frames. See [method set_hframes].
</description>
</method>
<method name="get_modulate" qualifiers="const">
<return type="Color">
</return>
<description>
- Return color modulation for the sprite. All sprite pixels are multiplied by this color.
+ Return color modulation for the sprite. All sprite pixels are multiplied by this color.
</description>
</method>
<method name="get_offset" qualifiers="const">
<return type="Vector2">
</return>
<description>
- Return sprite draw offset.
+ Return sprite draw offset.
</description>
</method>
<method name="get_region_rect" qualifiers="const">
<return type="Rect2">
</return>
<description>
- Return the region rect to read from.
+ Return the region rect to read from.
</description>
</method>
<method name="get_texture" qualifiers="const">
<return type="Texture">
</return>
<description>
- Return the base texture for the sprite.
+ Return the base texture for the sprite.
</description>
</method>
<method name="get_vframes" qualifiers="const">
<return type="int">
</return>
<description>
- Return the amount of vertical frames. See [method set_vframes].
+ Return the amount of vertical frames. See [method set_vframes].
</description>
</method>
<method name="is_centered" qualifiers="const">
<return type="bool">
</return>
<description>
- Return if the sprite is centered at the local origin.
+ Return if the sprite is centered at the local origin.
</description>
</method>
<method name="is_flipped_h" qualifiers="const">
<return type="bool">
</return>
<description>
- Return true if the sprite is flipped horizontally.
+ Return true if the sprite is flipped horizontally.
</description>
</method>
<method name="is_flipped_v" qualifiers="const">
<return type="bool">
</return>
<description>
- Return true if the sprite is flipped vertically.
+ Return true if the sprite is flipped vertically.
</description>
</method>
<method name="is_region" qualifiers="const">
<return type="bool">
</return>
<description>
- Return if the sprite reads from a region.
+ Return if the sprite reads from a region.
</description>
</method>
<method name="set_centered">
<argument index="0" name="centered" type="bool">
</argument>
<description>
- Set whether the sprite should be centered on the origin.
+ Set whether the sprite should be centered on the origin.
</description>
</method>
<method name="set_flip_h">
<argument index="0" name="flip_h" type="bool">
</argument>
<description>
- Set true to flip the sprite horizontally.
+ Set true to flip the sprite horizontally.
</description>
</method>
<method name="set_flip_v">
<argument index="0" name="flip_v" type="bool">
</argument>
<description>
- Set true to flip the sprite vertically.
+ Set true to flip the sprite vertically.
</description>
</method>
<method name="set_frame">
<argument index="0" name="frame" type="int">
</argument>
<description>
- Set the texture frame for a sprite-sheet, works when vframes or hframes are greater than 1.
+ Set the texture frame for a sprite-sheet, works when vframes or hframes are greater than 1.
</description>
</method>
<method name="set_hframes">
<argument index="0" name="hframes" type="int">
</argument>
<description>
- Set the amount of horizontal frames and converts the sprite into a sprite-sheet. This is useful for animation.
+ Set the amount of horizontal frames and converts the sprite into a sprite-sheet. This is useful for animation.
</description>
</method>
<method name="set_modulate">
<argument index="0" name="modulate" type="Color">
</argument>
<description>
- Set color modulation for the sprite. All sprite pixels are multiplied by this color. Color may contain rgb values above 1 to achieve a highlight effect.
+ Set color modulation for the sprite. All sprite pixels are multiplied by this color. Color may contain rgb values above 1 to achieve a highlight effect.
</description>
</method>
<method name="set_offset">
<argument index="0" name="offset" type="Vector2">
</argument>
<description>
- Set the sprite draw offset, useful for setting rotation pivots.
+ Set the sprite draw offset, useful for setting rotation pivots.
</description>
</method>
<method name="set_region">
<argument index="0" name="enabled" type="bool">
</argument>
<description>
- Set the sprite as a sub-region of a bigger texture. Useful for texture-atlases.
+ Set the sprite as a sub-region of a bigger texture. Useful for texture-atlases.
</description>
</method>
<method name="set_region_rect">
<argument index="0" name="rect" type="Rect2">
</argument>
<description>
- Set the region rect to read from.
+ Set the region rect to read from.
</description>
</method>
<method name="set_texture">
<argument index="0" name="texture" type="Texture">
</argument>
<description>
- Set the base texture for the sprite.
+ Set the base texture for the sprite.
</description>
</method>
<method name="set_vframes">
<argument index="0" name="vframes" type="int">
</argument>
<description>
- Set the amount of vertical frames and converts the sprite into a sprite-sheet. This is useful for animation.
+ Set the amount of vertical frames and converts the sprite into a sprite-sheet. This is useful for animation.
</description>
</method>
</methods>
@@ -36815,10 +36872,10 @@ A similar effect may be achieved moving this node's descendants.
</class>
<class name="SpriteFrames" inherits="Resource" category="Core">
<brief_description>
- Sprite frame library for AnimatedSprite.
+ Sprite frame library for AnimatedSprite.
</brief_description>
<description>
- Sprite frame library for [AnimatedSprite].
+ Sprite frame library for [AnimatedSprite].
</description>
<methods>
<method name="add_animation">
@@ -36943,68 +37000,68 @@ A similar effect may be achieved moving this node's descendants.
</class>
<class name="StaticBody" inherits="PhysicsBody" category="Core">
<brief_description>
- Static body for 3D Physics.
+ Static body for 3D Physics.
</brief_description>
<description>
- Static body for 3D Physics. A static body is a simple body that is not intended to move. They don't consume any CPU resources in contrast to a [RigidBody3D] so they are great for scenario collision.
- A static body can also be animated by using simulated motion mode. This is useful for implementing functionalities such as moving platforms. When this mode is active the body can be animated and automatically computes linear and angular velocity to apply in that frame and to influence other bodies.
- Alternatively, a constant linear or angular velocity can be set for the static body, so even if it doesn't move, it affects other bodies as if it was moving (this is useful for simulating conveyor belts or conveyor wheels).
+ Static body for 3D Physics. A static body is a simple body that is not intended to move. They don't consume any CPU resources in contrast to a [RigidBody3D] so they are great for scenario collision.
+ A static body can also be animated by using simulated motion mode. This is useful for implementing functionalities such as moving platforms. When this mode is active the body can be animated and automatically computes linear and angular velocity to apply in that frame and to influence other bodies.
+ Alternatively, a constant linear or angular velocity can be set for the static body, so even if it doesn't move, it affects other bodies as if it was moving (this is useful for simulating conveyor belts or conveyor wheels).
</description>
<methods>
<method name="get_bounce" qualifiers="const">
<return type="float">
</return>
<description>
- Return the body bounciness.
+ Return the body bounciness.
</description>
</method>
<method name="get_constant_angular_velocity" qualifiers="const">
<return type="Vector3">
</return>
<description>
- Return the constant angular velocity for the body.
+ Return the constant angular velocity for the body.
</description>
</method>
<method name="get_constant_linear_velocity" qualifiers="const">
<return type="Vector3">
</return>
<description>
- Return the constant linear velocity for the body.
+ Return the constant linear velocity for the body.
</description>
</method>
<method name="get_friction" qualifiers="const">
<return type="float">
</return>
<description>
- Return the body friction.
+ Return the body friction.
</description>
</method>
<method name="set_bounce">
<argument index="0" name="bounce" type="float">
</argument>
<description>
- Set the body bounciness, from 0 (not bouncy) to 1 (bouncy).
+ Set the body bounciness, from 0 (not bouncy) to 1 (bouncy).
</description>
</method>
<method name="set_constant_angular_velocity">
<argument index="0" name="vel" type="Vector3">
</argument>
<description>
- Set a constant angular velocity for the body. This does not rotate the body, but affects other bodies touching it, as if it was rotating.
+ Set a constant angular velocity for the body. This does not rotate the body, but affects other bodies touching it, as if it was rotating.
</description>
</method>
<method name="set_constant_linear_velocity">
<argument index="0" name="vel" type="Vector3">
</argument>
<description>
- Set a constant linear velocity for the body. This does not move the body, but affects other bodies touching it, as if it was moving.
+ Set a constant linear velocity for the body. This does not move the body, but affects other bodies touching it, as if it was moving.
</description>
</method>
<method name="set_friction">
<argument index="0" name="friction" type="float">
</argument>
<description>
- Set the body friction, from 0 (frictionless) to 1 (full friction).
+ Set the body friction, from 0 (frictionless) to 1 (full friction).
</description>
</method>
</methods>
@@ -37013,68 +37070,68 @@ A similar effect may be achieved moving this node's descendants.
</class>
<class name="StaticBody2D" inherits="PhysicsBody2D" category="Core">
<brief_description>
- Static body for 2D Physics.
+ Static body for 2D Physics.
</brief_description>
<description>
- Static body for 2D Physics. A static body is a simple body that is not intended to move. They don't consume any CPU resources in contrast to a [RigidBody2D] so they are great for scenario collision.
- A static body can also be animated by using simulated motion mode. This is useful for implementing functionalities such as moving platforms. When this mode is active the body can be animated and automatically computes linear and angular velocity to apply in that frame and to influence other bodies.
- Alternatively, a constant linear or angular velocity can be set for the static body, so even if it doesn't move, it affects other bodies as if it was moving (this is useful for simulating conveyor belts or conveyor wheels).
+ Static body for 2D Physics. A static body is a simple body that is not intended to move. They don't consume any CPU resources in contrast to a [RigidBody2D] so they are great for scenario collision.
+ A static body can also be animated by using simulated motion mode. This is useful for implementing functionalities such as moving platforms. When this mode is active the body can be animated and automatically computes linear and angular velocity to apply in that frame and to influence other bodies.
+ Alternatively, a constant linear or angular velocity can be set for the static body, so even if it doesn't move, it affects other bodies as if it was moving (this is useful for simulating conveyor belts or conveyor wheels).
</description>
<methods>
<method name="get_bounce" qualifiers="const">
<return type="float">
</return>
<description>
- Return the body bounciness.
+ Return the body bounciness.
</description>
</method>
<method name="get_constant_angular_velocity" qualifiers="const">
<return type="float">
</return>
<description>
- Return the constant angular velocity for the body.
+ Return the constant angular velocity for the body.
</description>
</method>
<method name="get_constant_linear_velocity" qualifiers="const">
<return type="Vector2">
</return>
<description>
- Return the constant linear velocity for the body.
+ Return the constant linear velocity for the body.
</description>
</method>
<method name="get_friction" qualifiers="const">
<return type="float">
</return>
<description>
- Return the body friction.
+ Return the body friction.
</description>
</method>
<method name="set_bounce">
<argument index="0" name="bounce" type="float">
</argument>
<description>
- Set the body bounciness, from 0 (not bouncy) to 1 (bouncy).
+ Set the body bounciness, from 0 (not bouncy) to 1 (bouncy).
</description>
</method>
<method name="set_constant_angular_velocity">
<argument index="0" name="vel" type="float">
</argument>
<description>
- Set a constant angular velocity for the body. This does not rotate the body, but affects other bodies touching it, as if it was rotating.
+ Set a constant angular velocity for the body. This does not rotate the body, but affects other bodies touching it, as if it was rotating.
</description>
</method>
<method name="set_constant_linear_velocity">
<argument index="0" name="vel" type="Vector2">
</argument>
<description>
- Set a constant linear velocity for the body. This does not move the body, but affects other bodies touching it, as if it was moving.
+ Set a constant linear velocity for the body. This does not move the body, but affects other bodies touching it, as if it was moving.
</description>
</method>
<method name="set_friction">
<argument index="0" name="friction" type="float">
</argument>
<description>
- Set the body friction, from 0 (frictionless) to 1 (full friction).
+ Set the body friction, from 0 (frictionless) to 1 (full friction).
</description>
</method>
</methods>
@@ -37083,45 +37140,45 @@ A similar effect may be achieved moving this node's descendants.
</class>
<class name="StreamPeer" inherits="Reference" category="Core">
<brief_description>
- Abstraction and base class for stream-based protocols.
+ Abstraction and base class for stream-based protocols.
</brief_description>
<description>
- StreamPeer is an abstraction and base class for stream-based protocols (such as TCP or Unix Sockets). It provides an API for sending and receiving data through streams as raw data or strings.
+ StreamPeer is an abstraction and base class for stream-based protocols (such as TCP or Unix Sockets). It provides an API for sending and receiving data through streams as raw data or strings.
</description>
<methods>
<method name="get_16">
<return type="int">
</return>
<description>
- Get a signed 16 bit value from the stream.
+ Get a signed 16 bit value from the stream.
</description>
</method>
<method name="get_32">
<return type="int">
</return>
<description>
- Get a signed 32 bit value from the stream.
+ Get a signed 32 bit value from the stream.
</description>
</method>
<method name="get_64">
<return type="int">
</return>
<description>
- Get a signed 64 bit value from the stream.
+ Get a signed 64 bit value from the stream.
</description>
</method>
<method name="get_8">
<return type="int">
</return>
<description>
- Get a signed byte from the stream.
+ Get a signed byte from the stream.
</description>
</method>
<method name="get_available_bytes" qualifiers="const">
<return type="int">
</return>
<description>
- Return the amount of bytes this [StreamPeer] has available.
+ Return the amount of bytes this [StreamPeer] has available.
</description>
</method>
<method name="get_data">
@@ -37130,21 +37187,21 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="bytes" type="int">
</argument>
<description>
- Return a chunk data with the received bytes. The amount of bytes to be received can be requested in the "bytes" argument. If not enough bytes are available, the function will block until the desired amount is received. This function returns two values, an Error code and a data array.
+ Return a chunk data with the received bytes. The amount of bytes to be received can be requested in the "bytes" argument. If not enough bytes are available, the function will block until the desired amount is received. This function returns two values, an Error code and a data array.
</description>
</method>
<method name="get_double">
<return type="float">
</return>
<description>
- Get a double-precision float from the stream.
+ Get a double-precision float from the stream.
</description>
</method>
<method name="get_float">
<return type="float">
</return>
<description>
- Get a single-precision float from the stream.
+ Get a single-precision float from the stream.
</description>
</method>
<method name="get_partial_data">
@@ -37153,7 +37210,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="bytes" type="int">
</argument>
<description>
- Return a chunk data with the received bytes. The amount of bytes to be received can be requested in the "bytes" argument. If not enough bytes are available, the function will return how many were actually received. This function returns two values, an Error code, and a data array.
+ Return a chunk data with the received bytes. The amount of bytes to be received can be requested in the "bytes" argument. If not enough bytes are available, the function will return how many were actually received. This function returns two values, an Error code, and a data array.
</description>
</method>
<method name="get_string">
@@ -37162,35 +37219,35 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="bytes" type="int">
</argument>
<description>
- Get a string with byte-length "bytes" from the stream.
+ Get a string with byte-length "bytes" from the stream.
</description>
</method>
<method name="get_u16">
<return type="int">
</return>
<description>
- Get an unsigned 16 bit value from the stream.
+ Get an unsigned 16 bit value from the stream.
</description>
</method>
<method name="get_u32">
<return type="int">
</return>
<description>
- Get an unsigned 32 bit value from the stream.
+ Get an unsigned 32 bit value from the stream.
</description>
</method>
<method name="get_u64">
<return type="int">
</return>
<description>
- Get an unsigned 16 bit value from the stream.
+ Get an unsigned 16 bit value from the stream.
</description>
</method>
<method name="get_u8">
<return type="int">
</return>
<description>
- Get an unsigned byte from the stream.
+ Get an unsigned byte from the stream.
</description>
</method>
<method name="get_utf8_string">
@@ -37199,49 +37256,49 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="bytes" type="int">
</argument>
<description>
- Get an utf8 string with byte-length "bytes" from the stream (this decodes the string sent as utf8).
+ Get an utf8 string with byte-length "bytes" from the stream (this decodes the string sent as utf8).
</description>
</method>
<method name="get_var">
<return type="Variant">
</return>
<description>
- Get a Variant from the stream.
+ Get a Variant from the stream.
</description>
</method>
<method name="is_big_endian_enabled" qualifiers="const">
<return type="bool">
</return>
<description>
- Return whether this [StreamPeer] is using big-endian format.
+ Return whether this [StreamPeer] is using big-endian format.
</description>
</method>
<method name="put_16">
<argument index="0" name="val" type="int">
</argument>
<description>
- Put a signed 16 bit value into the stream.
+ Put a signed 16 bit value into the stream.
</description>
</method>
<method name="put_32">
<argument index="0" name="val" type="int">
</argument>
<description>
- Put a signed 32 bit value into the stream.
+ Put a signed 32 bit value into the stream.
</description>
</method>
<method name="put_64">
<argument index="0" name="val" type="int">
</argument>
<description>
- Put a signed 64 bit value into the stream.
+ Put a signed 64 bit value into the stream.
</description>
</method>
<method name="put_8">
<argument index="0" name="val" type="int">
</argument>
<description>
- Put a signed byte into the stream.
+ Put a signed byte into the stream.
</description>
</method>
<method name="put_data">
@@ -37250,21 +37307,21 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="data" type="RawArray">
</argument>
<description>
- Send a chunk of data through the connection, blocking if necessary until the data is done sending. This function returns an Error code.
+ Send a chunk of data through the connection, blocking if necessary until the data is done sending. This function returns an Error code.
</description>
</method>
<method name="put_double">
<argument index="0" name="val" type="float">
</argument>
<description>
- Put a double-precision float into the stream.
+ Put a double-precision float into the stream.
</description>
</method>
<method name="put_float">
<argument index="0" name="val" type="float">
</argument>
<description>
- Put a single-precision float into the stream.
+ Put a single-precision float into the stream.
</description>
</method>
<method name="put_partial_data">
@@ -37273,56 +37330,56 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="data" type="RawArray">
</argument>
<description>
- Send a chunk of data through the connection, if all the data could not be sent at once, only part of it will. This function returns two values, an Error code and an integer, describing how much data was actually sent.
+ Send a chunk of data through the connection, if all the data could not be sent at once, only part of it will. This function returns two values, an Error code and an integer, describing how much data was actually sent.
</description>
</method>
<method name="put_u16">
<argument index="0" name="val" type="int">
</argument>
<description>
- Put an unsigned 16 bit value into the stream.
+ Put an unsigned 16 bit value into the stream.
</description>
</method>
<method name="put_u32">
<argument index="0" name="val" type="int">
</argument>
<description>
- Put an unsigned 32 bit value into the stream.
+ Put an unsigned 32 bit value into the stream.
</description>
</method>
<method name="put_u64">
<argument index="0" name="val" type="int">
</argument>
<description>
- Put an unsigned 64 bit value into the stream.
+ Put an unsigned 64 bit value into the stream.
</description>
</method>
<method name="put_u8">
<argument index="0" name="val" type="int">
</argument>
<description>
- Put an unsigned byte into the stream.
+ Put an unsigned byte into the stream.
</description>
</method>
<method name="put_utf8_string">
<argument index="0" name="val" type="String">
</argument>
<description>
- Put a zero-terminated utf8 string into the stream.
+ Put a zero-terminated utf8 string into the stream.
</description>
</method>
<method name="put_var">
<argument index="0" name="val" type="Variant">
</argument>
<description>
- Put a Variant into the stream.
+ Put a Variant into the stream.
</description>
</method>
<method name="set_big_endian">
<argument index="0" name="enable" type="bool">
</argument>
<description>
- Set this [StreamPeer] to use big-endian format. Default is false.
+ Set this [StreamPeer] to use big-endian format. Default is false.
</description>
</method>
</methods>
@@ -37331,10 +37388,10 @@ A similar effect may be achieved moving this node's descendants.
</class>
<class name="StreamPeerSSL" inherits="StreamPeer" category="Core">
<brief_description>
- SSL Stream peer.
+ SSL Stream peer.
</brief_description>
<description>
- SSL Stream peer. This object can be used to connect to SSL servers.
+ SSL Stream peer. This object can be used to connect to SSL servers.
</description>
<methods>
<method name="accept">
@@ -37355,19 +37412,19 @@ A similar effect may be achieved moving this node's descendants.
<argument index="2" name="for_hostname" type="String" default="&quot;&quot;">
</argument>
<description>
- Connect to a peer using an underlying [StreamPeer] "stream", when "validate_certs" is true, [StreamPeerSSL] will validate that the certificate presented by the peer matches the "for_hostname".
+ Connect to a peer using an underlying [StreamPeer] "stream", when "validate_certs" is true, [StreamPeerSSL] will validate that the certificate presented by the peer matches the "for_hostname".
</description>
</method>
<method name="disconnect">
<description>
- Disconnect from host.
+ Disconnect from host.
</description>
</method>
<method name="get_status" qualifiers="const">
<return type="int">
</return>
<description>
- Return the status of the connection, one of STATUS_* enum.
+ Return the status of the connection, one of STATUS_* enum.
</description>
</method>
</methods>
@@ -37388,10 +37445,10 @@ A similar effect may be achieved moving this node's descendants.
</class>
<class name="StreamPeerTCP" inherits="StreamPeer" category="Core">
<brief_description>
- TCP Stream peer.
+ TCP Stream peer.
</brief_description>
<description>
- TCP Stream peer. This object can be used to connect to TCP servers, or also is returned by a tcp server.
+ TCP Stream peer. This object can be used to connect to TCP servers, or also is returned by a tcp server.
</description>
<methods>
<method name="connect">
@@ -37402,40 +37459,40 @@ A similar effect may be achieved moving this node's descendants.
<argument index="1" name="port" type="int">
</argument>
<description>
- Connect to the specified IP:port pair. Returns [OK] on success or [FAILED] on failure.
+ Connect to the specified IP:port pair. Returns [OK] on success or [FAILED] on failure.
</description>
</method>
<method name="disconnect">
<description>
- Disconnect from host.
+ Disconnect from host.
</description>
</method>
<method name="get_connected_host" qualifiers="const">
<return type="String">
</return>
<description>
- Return the IP of this peer.
+ Return the IP of this peer.
</description>
</method>
<method name="get_connected_port" qualifiers="const">
<return type="int">
</return>
<description>
- Return the port of this peer.
+ Return the port of this peer.
</description>
</method>
<method name="get_status" qualifiers="const">
<return type="int">
</return>
<description>
- Return the status of the connection, one of STATUS_* enum.
+ Return the status of the connection, one of STATUS_* enum.
</description>
</method>
<method name="is_connected" qualifiers="const">
<return type="bool">
</return>
<description>
- Return whether this peer is connected. Returns true while connecting and connected.
+ Return whether this peer is connected. Returns true while connecting and connected.
</description>
</method>
</methods>
@@ -37456,184 +37513,184 @@ A similar effect may be achieved moving this node's descendants.
</class>
<class name="StreamPlayer" inherits="Node" category="Core">
<brief_description>
- Base class for audio stream playback.
+ Base class for audio stream playback.
</brief_description>
<description>
- Base class for audio stream playback. Audio stream players inherit from it.
+ Base class for audio stream playback. Audio stream players inherit from it.
</description>
<methods>
<method name="get_buffering_msec" qualifiers="const">
<return type="int">
</return>
<description>
- Return the size of the audio buffer.
+ Return the size of the audio buffer.
</description>
</method>
<method name="get_length" qualifiers="const">
<return type="float">
</return>
<description>
- Return the length of the stream, in seconds.
+ Return the length of the stream, in seconds.
</description>
</method>
<method name="get_loop_count" qualifiers="const">
<return type="int">
</return>
<description>
- Return the number of times the playback has looped.
+ Return the number of times the playback has looped.
</description>
</method>
<method name="get_loop_restart_time" qualifiers="const">
<return type="float">
</return>
<description>
- Return the point in time the stream will rewind to, when looping.
+ Return the point in time the stream will rewind to, when looping.
</description>
</method>
<method name="get_pos" qualifiers="const">
<return type="float">
</return>
<description>
- Return the playback position, in seconds.
+ Return the playback position, in seconds.
</description>
</method>
<method name="get_stream" qualifiers="const">
<return type="AudioStream">
</return>
<description>
- Return the currently assigned stream.
+ Return the currently assigned stream.
</description>
</method>
<method name="get_stream_name" qualifiers="const">
<return type="String">
</return>
<description>
- Return the name of the currently assigned stream. This is not the file name, but a field inside the file. If no stream is assigned, if returns "&lt;No Stream&gt;".
+ Return the name of the currently assigned stream. This is not the file name, but a field inside the file. If no stream is assigned, if returns "&lt;No Stream&gt;".
</description>
</method>
<method name="get_volume" qualifiers="const">
<return type="float">
</return>
<description>
- Return the playback volume for this player.
+ Return the playback volume for this player.
</description>
</method>
<method name="get_volume_db" qualifiers="const">
<return type="float">
</return>
<description>
- Return the playback volume for this player, in decibels.
+ Return the playback volume for this player, in decibels.
</description>
</method>
<method name="has_autoplay" qualifiers="const">
<return type="bool">
</return>
<description>
- Return whether this player will start playing as soon as it enters the scene tree.
+ Return whether this player will start playing as soon as it enters the scene tree.
</description>
</method>
<method name="has_loop" qualifiers="const">
<return type="bool">
</return>
<description>
- Return whether the stream will be restarted at the end.
+ Return whether the stream will be restarted at the end.
</description>
</method>
<method name="is_paused" qualifiers="const">
<return type="bool">
</return>
<description>
- Return whether the playback is currently paused.
+ Return whether the playback is currently paused.
</description>
</method>
<method name="is_playing" qualifiers="const">
<return type="bool">
</return>
<description>
- Return whether this player is playing.
+ Return whether this player is playing.
</description>
</method>
<method name="play">
<argument index="0" name="offset" type="float" default="0">
</argument>
<description>
- Play the currently assigned stream, starting from a given position (in seconds).
+ Play the currently assigned stream, starting from a given position (in seconds).
</description>
</method>
<method name="seek_pos">
<argument index="0" name="time" type="float">
</argument>
<description>
- Set the playback position, in seconds.
+ Set the playback position, in seconds.
</description>
</method>
<method name="set_autoplay">
<argument index="0" name="enabled" type="bool">
</argument>
<description>
- Set whether this player will start playing as soon as it enters the scene tree.
+ Set whether this player will start playing as soon as it enters the scene tree.
</description>
</method>
<method name="set_buffering_msec">
<argument index="0" name="msec" type="int">
</argument>
<description>
- Set the size (in milliseconds) of the audio buffer. A long audio buffer protects better against slowdowns, but responds worse to changes (in volume, stream played...). A shorter buffer takes less time to respond to changes, but may stutter if the application suffers some slowdown.
- Default is 500 milliseconds.
+ Set the size (in milliseconds) of the audio buffer. A long audio buffer protects better against slowdowns, but responds worse to changes (in volume, stream played...). A shorter buffer takes less time to respond to changes, but may stutter if the application suffers some slowdown.
+ Default is 500 milliseconds.
</description>
</method>
<method name="set_loop">
<argument index="0" name="enabled" type="bool">
</argument>
<description>
- Set whether the stream will be restarted at the end.
+ Set whether the stream will be restarted at the end.
</description>
</method>
<method name="set_loop_restart_time">
<argument index="0" name="secs" type="float">
</argument>
<description>
- Set the point in time the stream will rewind to, when looping.
+ Set the point in time the stream will rewind to, when looping.
</description>
</method>
<method name="set_paused">
<argument index="0" name="paused" type="bool">
</argument>
<description>
- Pause stream playback.
+ Pause stream playback.
</description>
</method>
<method name="set_stream">
<argument index="0" name="stream" type="AudioStream">
</argument>
<description>
- Set the [EventStream] this player will play.
+ Set the [EventStream] this player will play.
</description>
</method>
<method name="set_volume">
<argument index="0" name="volume" type="float">
</argument>
<description>
- Set the playback volume for this player. This is a float between 0.0 (silent) and 1.0 (full volume). Values over 1.0 will amplify sound even more, but may introduce distortion. Negative values will just invert the output waveform, which produces no audible difference.
+ Set the playback volume for this player. This is a float between 0.0 (silent) and 1.0 (full volume). Values over 1.0 will amplify sound even more, but may introduce distortion. Negative values will just invert the output waveform, which produces no audible difference.
</description>
</method>
<method name="set_volume_db">
<argument index="0" name="db" type="float">
</argument>
<description>
- Set the playback volume for this player, in decibels. This is a float between -80.0 (silent) and 0.0 (full volume). Values under -79.0 get truncated to -80, but values over 0.0 do not, so the warnings for overamplifying (see [method set_volume]) still apply.
+ Set the playback volume for this player, in decibels. This is a float between -80.0 (silent) and 0.0 (full volume). Values under -79.0 get truncated to -80, but values over 0.0 do not, so the warnings for overamplifying (see [method set_volume]) still apply.
</description>
</method>
<method name="stop">
<description>
- Stop the playback.
+ Stop the playback.
</description>
</method>
</methods>
<signals>
<signal name="finished">
<description>
- This signal triggers when the player stops playing. It will not trigger on each loop.
+ This signal triggers when the player stops playing. It will not trigger on each loop.
</description>
</signal>
</signals>
@@ -37642,17 +37699,17 @@ A similar effect may be achieved moving this node's descendants.
</class>
<class name="String" category="Built-In Types">
<brief_description>
- Built-in string class.
+ Built-in string class.
</brief_description>
<description>
- This is the built-in string class (and the one used by GDScript). It supports Unicode and provides all necessary means for string handling. Strings are reference counted and use a copy-on-write approach, so passing them around is cheap in resources.
+ This is the built-in string class (and the one used by GDScript). It supports Unicode and provides all necessary means for string handling. Strings are reference counted and use a copy-on-write approach, so passing them around is cheap in resources.
</description>
<methods>
<method name="basename">
<return type="String">
</return>
<description>
- If the string is a path to a file, return the path to the file without the extension.
+ If the string is a path to a file, return the path to the file without the extension.
</description>
</method>
<method name="begins_with">
@@ -37661,35 +37718,35 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="text" type="String">
</argument>
<description>
- Return true if the strings begins with the given string.
+ Return true if the strings begins with the given string.
</description>
</method>
<method name="bigrams">
<return type="StringArray">
</return>
<description>
- Return the bigrams (pairs of consecutive letters) of this string.
+ Return the bigrams (pairs of consecutive letters) of this string.
</description>
</method>
<method name="c_escape">
<return type="String">
</return>
<description>
- Return a copy of the string with special characters escaped using the C language standard.
+ Return a copy of the string with special characters escaped using the C language standard.
</description>
</method>
<method name="c_unescape">
<return type="String">
</return>
<description>
- Return a copy of the string with escaped characters replaced by their meanings according to the C language standard.
+ Return a copy of the string with escaped characters replaced by their meanings according to the C language standard.
</description>
</method>
<method name="capitalize">
<return type="String">
</return>
<description>
- Change the case of some letters. Replace underscores with spaces, convert all letters to lowercase then capitalize first and every letter following the space character. For [code]capitalize camelCase mixed_with_underscores[/code] it will return [code]Capitalize Camelcase Mixed With Underscores[/code].
+ Change the case of some letters. Replace underscores with spaces, convert all letters to lowercase then capitalize first and every letter following the space character. For [code]capitalize camelCase mixed_with_underscores[/code] it will return [code]Capitalize Camelcase Mixed With Underscores[/code].
</description>
</method>
<method name="casecmp_to">
@@ -37698,14 +37755,14 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="to" type="String">
</argument>
<description>
- Perform a case-sensitive comparison to another string, return -1 if less, 0 if equal and +1 if greater.
+ Perform a case-sensitive comparison to another string, return -1 if less, 0 if equal and +1 if greater.
</description>
</method>
<method name="empty">
<return type="bool">
</return>
<description>
- Return true if the string is empty.
+ Return true if the string is empty.
</description>
</method>
<method name="ends_with">
@@ -37714,7 +37771,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="text" type="String">
</argument>
<description>
- Return true if the strings ends with the given string.
+ Return true if the strings ends with the given string.
</description>
</method>
<method name="erase">
@@ -37723,14 +37780,14 @@ A similar effect may be achieved moving this node's descendants.
<argument index="1" name="chars" type="int">
</argument>
<description>
- Erase [code]chars[/code] characters from the string starting from [code]pos[/code].
+ Erase [code]chars[/code] characters from the string starting from [code]pos[/code].
</description>
</method>
<method name="extension">
<return type="String">
</return>
<description>
- If the string is a path to a file, return the extension.
+ If the string is a path to a file, return the extension.
</description>
</method>
<method name="find">
@@ -37741,7 +37798,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="1" name="from" type="int" default="0">
</argument>
<description>
- Find the first occurrence of a substring, return the starting position of the substring or -1 if not found. Optionally, the initial search index can be passed.
+ Find the first occurrence of a substring, return the starting position of the substring or -1 if not found. Optionally, the initial search index can be passed.
</description>
</method>
<method name="find_last">
@@ -37750,7 +37807,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="what" type="String">
</argument>
<description>
- Find the last occurrence of a substring, return the starting position of the substring or -1 if not found. Optionally, the initial search index can be passed.
+ Find the last occurrence of a substring, return the starting position of the substring or -1 if not found. Optionally, the initial search index can be passed.
</description>
</method>
<method name="findn">
@@ -37761,35 +37818,35 @@ A similar effect may be achieved moving this node's descendants.
<argument index="1" name="from" type="int" default="0">
</argument>
<description>
- Find the first occurrence of a substring but search as case-insensitive, return the starting position of the substring or -1 if not found. Optionally, the initial search index can be passed.
+ Find the first occurrence of a substring but search as case-insensitive, return the starting position of the substring or -1 if not found. Optionally, the initial search index can be passed.
</description>
</method>
<method name="get_base_dir">
<return type="String">
</return>
<description>
- If the string is a path to a file, return the base directory.
+ If the string is a path to a file, return the base directory.
</description>
</method>
<method name="get_file">
<return type="String">
</return>
<description>
- If the string is a path to a file, return the file and ignore the base directory.
+ If the string is a path to a file, return the file and ignore the base directory.
</description>
</method>
<method name="hash">
<return type="int">
</return>
<description>
- Hash the string and return a 32 bits integer.
+ Hash the string and return a 32 bits integer.
</description>
</method>
<method name="hex_to_int">
<return type="int">
</return>
<description>
- Convert a string containing an hexadecimal number into an int.
+ Convert a string containing an hexadecimal number into an int.
</description>
</method>
<method name="insert">
@@ -37800,21 +37857,21 @@ A similar effect may be achieved moving this node's descendants.
<argument index="1" name="what" type="String">
</argument>
<description>
- Insert a substring at a given position.
+ Insert a substring at a given position.
</description>
</method>
<method name="is_abs_path">
<return type="bool">
</return>
<description>
- If the string is a path to a file or directory, return true if the path is absolute.
+ If the string is a path to a file or directory, return true if the path is absolute.
</description>
</method>
<method name="is_rel_path">
<return type="bool">
</return>
<description>
- If the string is a path to a file or directory, return true if the path is relative.
+ If the string is a path to a file or directory, return true if the path is relative.
</description>
</method>
<method name="is_subsequence_of">
@@ -37823,7 +37880,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="text" type="String">
</argument>
<description>
- Check whether this string is a subsequence of the given string.
+ Check whether this string is a subsequence of the given string.
</description>
</method>
<method name="is_subsequence_ofi">
@@ -37832,49 +37889,49 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="text" type="String">
</argument>
<description>
- Check whether this string is a subsequence of the given string, without considering case.
+ Check whether this string is a subsequence of the given string, without considering case.
</description>
</method>
<method name="is_valid_float">
<return type="bool">
</return>
<description>
- Check whether the string contains a valid float.
+ Check whether the string contains a valid float.
</description>
</method>
<method name="is_valid_html_color">
<return type="bool">
</return>
<description>
- Check whether the string contains a valid color in HTML notation.
+ Check whether the string contains a valid color in HTML notation.
</description>
</method>
<method name="is_valid_identifier">
<return type="bool">
</return>
<description>
- Check whether the string is a valid identifier. As is common in programming languages, a valid identifier may contain only letters, digits and underscores (_) and the first character may not be a digit.
+ Check whether the string is a valid identifier. As is common in programming languages, a valid identifier may contain only letters, digits and underscores (_) and the first character may not be a digit.
</description>
</method>
<method name="is_valid_integer">
<return type="bool">
</return>
<description>
- Check whether the string contains a valid integer.
+ Check whether the string contains a valid integer.
</description>
</method>
<method name="is_valid_ip_address">
<return type="bool">
</return>
<description>
- Check whether the string contains a valid IP address.
+ Check whether the string contains a valid IP address.
</description>
</method>
<method name="json_escape">
<return type="String">
</return>
<description>
- Return a copy of the string with special characters escaped using the JSON standard.
+ Return a copy of the string with special characters escaped using the JSON standard.
</description>
</method>
<method name="left">
@@ -37883,14 +37940,14 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="pos" type="int">
</argument>
<description>
- Return an amount of characters from the left of the string.
+ Return an amount of characters from the left of the string.
</description>
</method>
<method name="length">
<return type="int">
</return>
<description>
- Return the length of the string in characters.
+ Return the length of the string in characters.
</description>
</method>
<method name="match">
@@ -37899,7 +37956,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="expr" type="String">
</argument>
<description>
- Do a simple expression match, where '*' matches zero or more arbitrary characters and '?' matches any single character except '.'.
+ Do a simple expression match, where '*' matches zero or more arbitrary characters and '?' matches any single character except '.'.
</description>
</method>
<method name="matchn">
@@ -37908,21 +37965,21 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="expr" type="String">
</argument>
<description>
- Do a simple case insensitive expression match, using ? and * wildcards (see [method match]).
+ Do a simple case insensitive expression match, using ? and * wildcards (see [method match]).
</description>
</method>
<method name="md5_buffer">
<return type="RawArray">
</return>
<description>
- Return the MD5 hash of the string as an array of bytes.
+ Return the MD5 hash of the string as an array of bytes.
</description>
</method>
<method name="md5_text">
<return type="String">
</return>
<description>
- Return the MD5 hash of the string as a string.
+ Return the MD5 hash of the string as a string.
</description>
</method>
<method name="nocasecmp_to">
@@ -37931,7 +37988,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="to" type="String">
</argument>
<description>
- Perform a case-insensitive comparison to another string, return -1 if less, 0 if equal and +1 if greater.
+ Perform a case-insensitive comparison to another string, return -1 if less, 0 if equal and +1 if greater.
</description>
</method>
<method name="ord_at">
@@ -37940,7 +37997,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="at" type="int">
</argument>
<description>
- Return the character code at position [code]at[/code].
+ Return the character code at position [code]at[/code].
</description>
</method>
<method name="pad_decimals">
@@ -37949,7 +38006,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="digits" type="int">
</argument>
<description>
- Format a number to have an exact number of [code]digits[/code] after the decimal point.
+ Format a number to have an exact number of [code]digits[/code] after the decimal point.
</description>
</method>
<method name="pad_zeros">
@@ -37958,21 +38015,21 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="digits" type="int">
</argument>
<description>
- Format a number to have an exact number of [code]digits[/code] before the decimal point.
+ Format a number to have an exact number of [code]digits[/code] before the decimal point.
</description>
</method>
<method name="percent_decode">
<return type="String">
</return>
<description>
- Decode a percent-encoded string. See [method percent_encode].
+ Decode a percent-encoded string. See [method percent_encode].
</description>
</method>
<method name="percent_encode">
<return type="String">
</return>
<description>
- Percent-encode a string. This is meant to encode parameters in a URL when sending a HTTP GET request and bodies of form-urlencoded POST request.
+ Percent-encode a string. This is meant to encode parameters in a URL when sending a HTTP GET request and bodies of form-urlencoded POST request.
</description>
</method>
<method name="plus_file">
@@ -37981,7 +38038,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="file" type="String">
</argument>
<description>
- If the string is a path, this concatenates [code]file[/code] at the end of the string as a subpath. E.g. [code]"this/is".plus_file("path") == "this/is/path"[/code].
+ If the string is a path, this concatenates [code]file[/code] at the end of the string as a subpath. E.g. [code]"this/is".plus_file("path") == "this/is/path"[/code].
</description>
</method>
<method name="replace">
@@ -37992,7 +38049,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="1" name="forwhat" type="String">
</argument>
<description>
- Replace occurrences of a substring for different ones inside the string.
+ Replace occurrences of a substring for different ones inside the string.
</description>
</method>
<method name="replacen">
@@ -38003,7 +38060,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="1" name="forwhat" type="String">
</argument>
<description>
- Replace occurrences of a substring for different ones inside the string, but search case-insensitive.
+ Replace occurrences of a substring for different ones inside the string, but search case-insensitive.
</description>
</method>
<method name="rfind">
@@ -38014,7 +38071,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="1" name="from" type="int" default="-1">
</argument>
<description>
- Perform a search for a substring, but start from the end of the string instead of the beginning.
+ Perform a search for a substring, but start from the end of the string instead of the beginning.
</description>
</method>
<method name="rfindn">
@@ -38025,7 +38082,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="1" name="from" type="int" default="-1">
</argument>
<description>
- Perform a search for a substring, but start from the end of the string instead of the beginning. Also search case-insensitive.
+ Perform a search for a substring, but start from the end of the string instead of the beginning. Also search case-insensitive.
</description>
</method>
<method name="right">
@@ -38034,7 +38091,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="pos" type="int">
</argument>
<description>
- Return the right side of the string from a given position.
+ Return the right side of the string from a given position.
</description>
</method>
<method name="sha256_buffer">
@@ -38047,7 +38104,7 @@ A similar effect may be achieved moving this node's descendants.
<return type="String">
</return>
<description>
- Return the SHA-256 hash of the string as a string.
+ Return the SHA-256 hash of the string as a string.
</description>
</method>
<method name="similarity">
@@ -38056,7 +38113,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="text" type="String">
</argument>
<description>
- Return the similarity index of the text compared to this string. 1 means totally similar and 0 means totally dissimilar.
+ Return the similarity index of the text compared to this string. 1 means totally similar and 0 means totally dissimilar.
</description>
</method>
<method name="split">
@@ -38067,7 +38124,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="1" name="allow_empty" type="bool" default="True">
</argument>
<description>
- Split the string by a divisor string, return an array of the substrings. Example "One,Two,Three" will return ["One","Two","Three"] if split by ",".
+ Split the string by a divisor string, return an array of the substrings. Example "One,Two,Three" will return ["One","Two","Three"] if split by ",".
</description>
</method>
<method name="split_floats">
@@ -38078,7 +38135,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="1" name="allow_empty" type="bool" default="True">
</argument>
<description>
- Split the string in floats by using a divisor string, return an array of the substrings. Example "1,2.5,3" will return [1,2.5,3] if split by ",".
+ Split the string in floats by using a divisor string, return an array of the substrings. Example "1,2.5,3" will return [1,2.5,3] if split by ",".
</description>
</method>
<method name="strip_edges">
@@ -38089,7 +38146,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="1" name="right" type="bool" default="True">
</argument>
<description>
- Return a copy of the string stripped of any non-printable character at the beginning and the end. The optional arguments are used to toggle stripping on the left and right edges respectively.
+ Return a copy of the string stripped of any non-printable character at the beginning and the end. The optional arguments are used to toggle stripping on the left and right edges respectively.
</description>
</method>
<method name="substr">
@@ -38100,63 +38157,63 @@ A similar effect may be achieved moving this node's descendants.
<argument index="1" name="len" type="int">
</argument>
<description>
- Return part of the string from the position [code]from[/code], with length [code]len[/code].
+ Return part of the string from the position [code]from[/code], with length [code]len[/code].
</description>
</method>
<method name="to_ascii">
<return type="RawArray">
</return>
<description>
- Convert the String (which is a character array) to RawArray (which is an array of bytes). The conversion is speeded up in comparison to to_utf8() with the assumption that all the characters the String contains are only ASCII characters.
+ Convert the String (which is a character array) to RawArray (which is an array of bytes). The conversion is speeded up in comparison to to_utf8() with the assumption that all the characters the String contains are only ASCII characters.
</description>
</method>
<method name="to_float">
<return type="float">
</return>
<description>
- Convert a string, containing a decimal number, into a [code]float[/code].
+ Convert a string, containing a decimal number, into a [code]float[/code].
</description>
</method>
<method name="to_int">
<return type="int">
</return>
<description>
- Convert a string, containing an integer number, into an [code]int[/code].
+ Convert a string, containing an integer number, into an [code]int[/code].
</description>
</method>
<method name="to_lower">
<return type="String">
</return>
<description>
- Return the string converted to lowercase.
+ Return the string converted to lowercase.
</description>
</method>
<method name="to_upper">
<return type="String">
</return>
<description>
- Return the string converted to uppercase.
+ Return the string converted to uppercase.
</description>
</method>
<method name="to_utf8">
<return type="RawArray">
</return>
<description>
- Convert the String (which is an array of characters) to RawArray (which is an array of bytes). The conversion is a bit slower than to_ascii(), but supports all UTF-8 characters. Therefore, you should prefer this function over to_ascii().
+ Convert the String (which is an array of characters) to RawArray (which is an array of bytes). The conversion is a bit slower than to_ascii(), but supports all UTF-8 characters. Therefore, you should prefer this function over to_ascii().
</description>
</method>
<method name="xml_escape">
<return type="String">
</return>
<description>
- Return a copy of the string with special characters escaped using the XML standard.
+ Return a copy of the string with special characters escaped using the XML standard.
</description>
</method>
<method name="xml_unescape">
<return type="String">
</return>
<description>
- Return a copy of the string with escaped characters replaced by their meanings according to the XML standard.
+ Return a copy of the string with escaped characters replaced by their meanings according to the XML standard.
</description>
</method>
</methods>
@@ -38165,10 +38222,10 @@ A similar effect may be achieved moving this node's descendants.
</class>
<class name="StringArray" category="Built-In Types">
<brief_description>
- String Array.
+ String Array.
</brief_description>
<description>
- String Array. Array of strings. Can only contain strings. Optimized for memory usage, can't fragment the memory.
+ String Array. Array of strings. Can only contain strings. Optimized for memory usage, can't fragment the memory.
</description>
<methods>
<method name="StringArray">
@@ -38177,21 +38234,21 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="from" type="Array">
</argument>
<description>
- Create from a generic array.
+ Create from a generic array.
</description>
</method>
<method name="append">
<argument index="0" name="string" type="String">
</argument>
<description>
- Append an element at the end of the array (alias of [method push_back]).
+ Append an element at the end of the array (alias of [method push_back]).
</description>
</method>
<method name="append_array">
<argument index="0" name="array" type="StringArray">
</argument>
<description>
- Append an [StringArray] at the end of this array.
+ Append an [StringArray] at the end of this array.
</description>
</method>
<method name="insert">
@@ -38202,33 +38259,33 @@ A similar effect may be achieved moving this node's descendants.
<argument index="1" name="string" type="String">
</argument>
<description>
- Insert a new element at a given position in the array. The position must be valid, or at the end of the array (pos==size()).
+ Insert a new element at a given position in the array. The position must be valid, or at the end of the array (pos==size()).
</description>
</method>
<method name="invert">
<description>
- Reverse the order of the elements in the array (so first element will now be the last).
+ Reverse the order of the elements in the array (so first element will now be the last).
</description>
</method>
<method name="push_back">
<argument index="0" name="string" type="String">
</argument>
<description>
- Append a string element at end of the array.
+ Append a string element at end of the array.
</description>
</method>
<method name="remove">
<argument index="0" name="idx" type="int">
</argument>
<description>
- Remove an element from the array by index.
+ Remove an element from the array by index.
</description>
</method>
<method name="resize">
<argument index="0" name="idx" type="int">
</argument>
<description>
- Set the size of the [StringArray]. If larger than the current size it will reserve some space beforehand, and if it is smaller it will cut off the array.
+ Set the size of the [StringArray]. If larger than the current size it will reserve some space beforehand, and if it is smaller it will cut off the array.
</description>
</method>
<method name="set">
@@ -38237,14 +38294,14 @@ A similar effect may be achieved moving this node's descendants.
<argument index="1" name="string" type="String">
</argument>
<description>
- Change the [String] at the given index.
+ Change the [String] at the given index.
</description>
</method>
<method name="size">
<return type="int">
</return>
<description>
- Return the size of the array.
+ Return the size of the array.
</description>
</method>
</methods>
@@ -38253,10 +38310,10 @@ A similar effect may be achieved moving this node's descendants.
</class>
<class name="StyleBox" inherits="Resource" category="Core">
<brief_description>
- Base class for drawing stylized boxes for the UI.
+ Base class for drawing stylized boxes for the UI.
</brief_description>
<description>
- StyleBox is [Resource] that provides an abstract base class for drawing stylized boxes for the UI. StyleBoxes are used for drawing the styles of buttons, line edit backgrounds, tree backgrounds, etc. and also for testing a transparency mask for pointer signals. If mask test fails on a StyleBox assigned as mask to a control, clicks and motion signals will go through it to the one below.
+ StyleBox is [Resource] that provides an abstract base class for drawing stylized boxes for the UI. StyleBoxes are used for drawing the styles of buttons, line edit backgrounds, tree backgrounds, etc. and also for testing a transparency mask for pointer signals. If mask test fails on a StyleBox assigned as mask to a control, clicks and motion signals will go through it to the one below.
</description>
<methods>
<method name="draw" qualifiers="const">
@@ -38279,7 +38336,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="margin" type="int">
</argument>
<description>
- Return the default offset of the margin "margin" (see MARGIN_* enum) of a StyleBox, Controls that draw styleboxes with context inside need to know the margin, so the border of the stylebox is not occluded.
+ Return the default offset of the margin "margin" (see MARGIN_* enum) of a StyleBox, Controls that draw styleboxes with context inside need to know the margin, so the border of the stylebox is not occluded.
</description>
</method>
<method name="get_margin" qualifiers="const">
@@ -38288,21 +38345,21 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="margin" type="int">
</argument>
<description>
- Return the offset of margin "margin" (see MARGIN_* enum).
+ Return the offset of margin "margin" (see MARGIN_* enum).
</description>
</method>
<method name="get_minimum_size" qualifiers="const">
<return type="Vector2">
</return>
<description>
- Return the minimum size that this stylebox can be shrunk to.
+ Return the minimum size that this stylebox can be shrunk to.
</description>
</method>
<method name="get_offset" qualifiers="const">
<return type="Vector2">
</return>
<description>
- Return the "offset" of a stylebox, this is a helper function, like writing [code]Vector2(style.get_margin(MARGIN_LEFT), style.get_margin(MARGIN_TOP))[/code].
+ Return the "offset" of a stylebox, this is a helper function, like writing [code]Vector2(style.get_margin(MARGIN_LEFT), style.get_margin(MARGIN_TOP))[/code].
</description>
</method>
<method name="set_default_margin">
@@ -38311,7 +38368,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="1" name="offset" type="float">
</argument>
<description>
- Set the default offset "offset" of the margin "margin" (see MARGIN_* enum) for a StyleBox, Controls that draw styleboxes with context inside need to know the margin, so the border of the stylebox is not occluded.
+ Set the default offset "offset" of the margin "margin" (see MARGIN_* enum) for a StyleBox, Controls that draw styleboxes with context inside need to know the margin, so the border of the stylebox is not occluded.
</description>
</method>
<method name="test_mask" qualifiers="const">
@@ -38322,7 +38379,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="1" name="rect" type="Rect2">
</argument>
<description>
- Test a position in a rectangle, return whether it passes the mask test.
+ Test a position in a rectangle, return whether it passes the mask test.
</description>
</method>
</methods>
@@ -38331,10 +38388,10 @@ A similar effect may be achieved moving this node's descendants.
</class>
<class name="StyleBoxEmpty" inherits="StyleBox" category="Core">
<brief_description>
- Empty stylebox (does not display anything).
+ Empty stylebox (does not display anything).
</brief_description>
<description>
- Empty stylebox (really does not display anything).
+ Empty stylebox (really does not display anything).
</description>
<methods>
</methods>
@@ -38343,10 +38400,10 @@ A similar effect may be achieved moving this node's descendants.
</class>
<class name="StyleBoxFlat" inherits="StyleBox" category="Core">
<brief_description>
- Stylebox of a single color.
+ Stylebox of a single color.
</brief_description>
<description>
- Stylebox of a single color. Displays the stylebox of a single color, alternatively a border with light/dark colors can be assigned.
+ Stylebox of a single color. Displays the stylebox of a single color, alternatively a border with light/dark colors can be assigned.
</description>
<methods>
<method name="get_bg_color" qualifiers="const">
@@ -38427,17 +38484,17 @@ A similar effect may be achieved moving this node's descendants.
</class>
<class name="StyleBoxImageMask" inherits="StyleBox" category="Core">
<brief_description>
- Image mask based StyleBox, for mask test.
+ Image mask based StyleBox, for mask test.
</brief_description>
<description>
- This StyleBox is similar to [StyleBoxTexture], but only meant to be used for mask testing. It takes an image and applies stretch rules to determine if the point clicked is masked or not.
+ This StyleBox is similar to [StyleBoxTexture], but only meant to be used for mask testing. It takes an image and applies stretch rules to determine if the point clicked is masked or not.
</description>
<methods>
<method name="get_expand" qualifiers="const">
<return type="bool">
</return>
<description>
- Return whether the expand property is set(default). When expanding, the image will use the same rules as [StyleBoxTexture] for expand. If not expanding, the image will always be tested at its original size.
+ Return whether the expand property is set(default). When expanding, the image will use the same rules as [StyleBoxTexture] for expand. If not expanding, the image will always be tested at its original size.
</description>
</method>
<method name="get_expand_margin_size" qualifiers="const">
@@ -38446,21 +38503,21 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="margin" type="int">
</argument>
<description>
- Return the expand margin size (from enum MARGIN_*). Parts of the image below the size of the margin (and in the direction of the margin) will not expand.
+ Return the expand margin size (from enum MARGIN_*). Parts of the image below the size of the margin (and in the direction of the margin) will not expand.
</description>
</method>
<method name="get_image" qualifiers="const">
<return type="Image">
</return>
<description>
- Return the image used for mask testing. (see [method set_image]).
+ Return the image used for mask testing. (see [method set_image]).
</description>
</method>
<method name="set_expand">
<argument index="0" name="expand" type="bool">
</argument>
<description>
- Set the expand property (default). When expanding, the image will use the same rules as [StyleBoxTexture] for expand. If not expanding, the image will always be tested at its original size.
+ Set the expand property (default). When expanding, the image will use the same rules as [StyleBoxTexture] for expand. If not expanding, the image will always be tested at its original size.
</description>
</method>
<method name="set_expand_margin_size">
@@ -38469,14 +38526,14 @@ A similar effect may be achieved moving this node's descendants.
<argument index="1" name="size" type="float">
</argument>
<description>
- Set an expand margin size (from enum MARGIN_*). Parts of the image below the size of the margin (and in the direction of the margin) will not expand.
+ Set an expand margin size (from enum MARGIN_*). Parts of the image below the size of the margin (and in the direction of the margin) will not expand.
</description>
</method>
<method name="set_image">
<argument index="0" name="image" type="Image">
</argument>
<description>
- Set the image used for mask testing. Pixels (converted to grey) that have a value, less than 0.5 will fail the test.
+ Set the image used for mask testing. Pixels (converted to grey) that have a value, less than 0.5 will fail the test.
</description>
</method>
</methods>
@@ -38485,10 +38542,10 @@ A similar effect may be achieved moving this node's descendants.
</class>
<class name="StyleBoxTexture" inherits="StyleBox" category="Core">
<brief_description>
- Texture Based 3x3 scale style.
+ Texture Based 3x3 scale style.
</brief_description>
<description>
- Texture Based 3x3 scale style. This stylebox performs a 3x3 scaling of a texture, where only the center cell is fully stretched. This allows for the easy creation of bordered styles.
+ Texture Based 3x3 scale style. This stylebox performs a 3x3 scaling of a texture, where only the center cell is fully stretched. This allows for the easy creation of bordered styles.
</description>
<methods>
<method name="get_draw_center" qualifiers="const">
@@ -38571,10 +38628,10 @@ A similar effect may be achieved moving this node's descendants.
</class>
<class name="SurfaceTool" inherits="Reference" category="Core">
<brief_description>
- Helper tool to create geometry.
+ Helper tool to create geometry.
</brief_description>
<description>
- Helper tool to create geometry.
+ Helper tool to create geometry.
</description>
<methods>
<method name="add_bones">
@@ -38689,17 +38746,17 @@ A similar effect may be achieved moving this node's descendants.
</class>
<class name="TCP_Server" inherits="Reference" category="Core">
<brief_description>
- TCP Server.
+ TCP Server.
</brief_description>
<description>
- TCP Server class. Listens to connections on a port and returns a [StreamPeerTCP] when got a connection.
+ TCP Server class. Listens to connections on a port and returns a [StreamPeerTCP] when got a connection.
</description>
<methods>
<method name="is_connection_available" qualifiers="const">
<return type="bool">
</return>
<description>
- Return true if a connection is available for taking.
+ Return true if a connection is available for taking.
</description>
</method>
<method name="listen">
@@ -38710,19 +38767,19 @@ A similar effect may be achieved moving this node's descendants.
<argument index="1" name="accepted_hosts" type="StringArray" default="StringArray([])">
</argument>
<description>
- Listen on a port, alternatively give a white-list of accepted hosts.
+ Listen on a port, alternatively give a white-list of accepted hosts.
</description>
</method>
<method name="stop">
<description>
- Stop listening.
+ Stop listening.
</description>
</method>
<method name="take_connection">
<return type="Object">
</return>
<description>
- If a connection is available, return a StreamPeerTCP with the connection/
+ If a connection is available, return a StreamPeerTCP with the connection/
</description>
</method>
</methods>
@@ -38731,25 +38788,25 @@ A similar effect may be achieved moving this node's descendants.
</class>
<class name="TabContainer" inherits="Control" category="Core">
<brief_description>
- Tabbed Container.
+ Tabbed Container.
</brief_description>
<description>
- Tabbed Container. Contains several children controls, but shows only one at the same time. Clicking on the top tabs allows to change the currently visible one.
- Children controls of this one automatically.
+ Tabbed Container. Contains several children controls, but shows only one at the same time. Clicking on the top tabs allows to change the currently visible one.
+ Children controls of this one automatically.
</description>
<methods>
<method name="are_tabs_visible" qualifiers="const">
<return type="bool">
</return>
<description>
- Return whether the tabs should be visible or hidden.
+ Return whether the tabs should be visible or hidden.
</description>
</method>
<method name="get_current_tab" qualifiers="const">
<return type="int">
</return>
<description>
- Return the current tab that is being showed.
+ Return the current tab that is being showed.
</description>
</method>
<method name="get_current_tab_control" qualifiers="const">
@@ -38768,7 +38825,7 @@ A similar effect may be achieved moving this node's descendants.
<return type="int">
</return>
<description>
- Return tab alignment, from the ALIGN_* enum.
+ Return tab alignment, from the ALIGN_* enum.
</description>
</method>
<method name="get_tab_control" qualifiers="const">
@@ -38783,7 +38840,7 @@ A similar effect may be achieved moving this node's descendants.
<return type="int">
</return>
<description>
- Return the amount of tabs.
+ Return the amount of tabs.
</description>
</method>
<method name="get_tab_icon" qualifiers="const">
@@ -38800,14 +38857,14 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="tab_idx" type="int">
</argument>
<description>
- Return the title for the tab. Tab titles are by default the children node name, but this can be overridden.
+ Return the title for the tab. Tab titles are by default the children node name, but this can be overridden.
</description>
</method>
<method name="set_current_tab">
<argument index="0" name="tab_idx" type="int">
</argument>
<description>
- Bring a tab (and the Control it represents) to the front, and hide the rest.
+ Bring a tab (and the Control it represents) to the front, and hide the rest.
</description>
</method>
<method name="set_popup">
@@ -38820,7 +38877,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="align" type="int">
</argument>
<description>
- Set tab alignment, from the ALIGN_* enum. Moves tabs to the left, right or center.
+ Set tab alignment, from the ALIGN_* enum. Moves tabs to the left, right or center.
</description>
</method>
<method name="set_tab_icon">
@@ -38829,7 +38886,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="1" name="icon" type="Texture">
</argument>
<description>
- Set an icon for a tab.
+ Set an icon for a tab.
</description>
</method>
<method name="set_tab_title">
@@ -38838,14 +38895,14 @@ A similar effect may be achieved moving this node's descendants.
<argument index="1" name="title" type="String">
</argument>
<description>
- Set a title for the tab. Tab titles are by default the children node name, but this can be overridden.
+ Set a title for the tab. Tab titles are by default the children node name, but this can be overridden.
</description>
</method>
<method name="set_tabs_visible">
<argument index="0" name="visible" type="bool">
</argument>
<description>
- Set whether the tabs should be visible or hidden.
+ Set whether the tabs should be visible or hidden.
</description>
</method>
</methods>
@@ -38858,7 +38915,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="tab" type="int">
</argument>
<description>
- Emitted when the current tab changes.
+ Emitted when the current tab changes.
</description>
</signal>
</signals>
@@ -38903,10 +38960,10 @@ A similar effect may be achieved moving this node's descendants.
</class>
<class name="Tabs" inherits="Control" category="Core">
<brief_description>
- Tabs Control.
+ Tabs Control.
</brief_description>
<description>
- Simple tabs control, similar to [TabContainer] but is only in charge of drawing tabs, not interact with children.
+ Simple tabs control, similar to [TabContainer] but is only in charge of drawing tabs, not interact with children.
</description>
<methods>
<method name="add_tab">
@@ -39065,10 +39122,10 @@ A similar effect may be achieved moving this node's descendants.
</class>
<class name="TestCube" inherits="GeometryInstance" category="Core">
<brief_description>
- A simple cube used for testing in 3D.
+ A simple cube used for testing in 3D.
</brief_description>
<description>
- The TestCube is a simple 2x2x2 cube with a basic texture. It can be used as a placeholder, to verify how the lighting looks, to test shaders, or any other task you may need a textured model to test with.
+ The TestCube is a simple 2x2x2 cube with a basic texture. It can be used as a placeholder, to verify how the lighting looks, to test shaders, or any other task you may need a textured model to test with.
</description>
<methods>
</methods>
@@ -39077,10 +39134,10 @@ A similar effect may be achieved moving this node's descendants.
</class>
<class name="TextEdit" inherits="Control" category="Core">
<brief_description>
- Multiline text editing control.
+ Multiline text editing control.
</brief_description>
<description>
- TextEdit is meant for editing large, multiline text. It also has facilities for editing code, such as syntax highlighting support and multiple levels of undo/redo.
+ TextEdit is meant for editing large, multiline text. It also has facilities for editing code, such as syntax highlighting support and multiple levels of undo/redo.
</description>
<methods>
<method name="add_color_region">
@@ -39093,7 +39150,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="3" name="line_only" type="bool" default="false">
</argument>
<description>
- Add color region (given the delimiters) and its colors.
+ Add color region (given the delimiters) and its colors.
</description>
</method>
<method name="add_keyword_color">
@@ -39102,64 +39159,64 @@ A similar effect may be achieved moving this node's descendants.
<argument index="1" name="color" type="Color">
</argument>
<description>
- Add a keyword and its color.
+ Add a keyword and its color.
</description>
</method>
<method name="clear_colors">
<description>
- Clear all the syntax coloring information.
+ Clear all the syntax coloring information.
</description>
</method>
<method name="clear_undo_history">
<description>
- Clear the undo history.
+ Clear the undo history.
</description>
</method>
<method name="copy">
<description>
- Copy the current selection.
+ Copy the current selection.
</description>
</method>
<method name="cursor_get_blink_enabled" qualifiers="const">
<return type="bool">
</return>
<description>
- Gets whether the text editor caret is blinking.
+ Gets whether the text editor caret is blinking.
</description>
</method>
<method name="cursor_get_blink_speed" qualifiers="const">
<return type="float">
</return>
<description>
- Gets the text editor caret blink speed.
+ Gets the text editor caret blink speed.
</description>
</method>
<method name="cursor_get_column" qualifiers="const">
<return type="int">
</return>
<description>
- Return the column the editing cursor is at.
+ Return the column the editing cursor is at.
</description>
</method>
<method name="cursor_get_line" qualifiers="const">
<return type="int">
</return>
<description>
- Return the line the editing cursor is at.
+ Return the line the editing cursor is at.
</description>
</method>
<method name="cursor_set_blink_enabled">
<argument index="0" name="enable" type="bool">
</argument>
<description>
- Set the text editor caret to blink.
+ Set the text editor caret to blink.
</description>
</method>
<method name="cursor_set_blink_speed">
<argument index="0" name="blink_speed" type="float">
</argument>
<description>
- Set the text editor caret blink speed. Cannot be less then or equal to 0.
+ Set the text editor caret blink speed. Cannot be less then or equal to 0.
</description>
</method>
<method name="cursor_set_column">
@@ -39180,7 +39237,7 @@ A similar effect may be achieved moving this node's descendants.
</method>
<method name="cut">
<description>
- Cut the current selection.
+ Cut the current selection.
</description>
</method>
<method name="get_line" qualifiers="const">
@@ -39189,14 +39246,14 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="line" type="int">
</argument>
<description>
- Return the text of a specific line.
+ Return the text of a specific line.
</description>
</method>
<method name="get_line_count" qualifiers="const">
<return type="int">
</return>
<description>
- Return the amount of total lines in the text.
+ Return the amount of total lines in the text.
</description>
</method>
<method name="get_menu" qualifiers="const">
@@ -39209,42 +39266,42 @@ A similar effect may be achieved moving this node's descendants.
<return type="int">
</return>
<description>
- Return the selection begin column.
+ Return the selection begin column.
</description>
</method>
<method name="get_selection_from_line" qualifiers="const">
<return type="int">
</return>
<description>
- Return the selection begin line.
+ Return the selection begin line.
</description>
</method>
<method name="get_selection_text" qualifiers="const">
<return type="String">
</return>
<description>
- Return the text inside the selection.
+ Return the text inside the selection.
</description>
</method>
<method name="get_selection_to_column" qualifiers="const">
<return type="int">
</return>
<description>
- Return the selection end column.
+ Return the selection end column.
</description>
</method>
<method name="get_selection_to_line" qualifiers="const">
<return type="int">
</return>
<description>
- Return the selection end line.
+ Return the selection end line.
</description>
</method>
<method name="get_text">
<return type="String">
</return>
<description>
- Return the whole text.
+ Return the whole text.
</description>
</method>
<method name="get_word_under_cursor" qualifiers="const">
@@ -39257,21 +39314,21 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="text" type="String">
</argument>
<description>
- Insert a given text at the cursor position.
+ Insert a given text at the cursor position.
</description>
</method>
<method name="is_selection_active" qualifiers="const">
<return type="bool">
</return>
<description>
- Return true if the selection is active.
+ Return true if the selection is active.
</description>
</method>
<method name="is_syntax_coloring_enabled" qualifiers="const">
<return type="bool">
</return>
<description>
- Return true if the syntax coloring is enabled.
+ Return true if the syntax coloring is enabled.
</description>
</method>
<method name="menu_option">
@@ -39282,12 +39339,12 @@ A similar effect may be achieved moving this node's descendants.
</method>
<method name="paste">
<description>
- Paste the current selection.
+ Paste the current selection.
</description>
</method>
<method name="redo">
<description>
- Perform redo operation.
+ Perform redo operation.
</description>
</method>
<method name="search" qualifiers="const">
@@ -39302,7 +39359,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="3" name="to_line" type="int">
</argument>
<description>
- Perform a search inside the text. Search flags can be specified in the SEARCH_* enum.
+ Perform a search inside the text. Search flags can be specified in the SEARCH_* enum.
</description>
</method>
<method name="select">
@@ -39315,73 +39372,101 @@ A similar effect may be achieved moving this node's descendants.
<argument index="3" name="to_column" type="int">
</argument>
<description>
- Perform selection, from line/column to line/column.
+ Perform selection, from line/column to line/column.
</description>
</method>
<method name="select_all">
<description>
- Select all the text.
+ Select all the text.
</description>
</method>
<method name="set_custom_bg_color">
<argument index="0" name="color" type="Color">
</argument>
<description>
- Set a custom background color. A background color with alpha==0 disables this.
+ Set a custom background color. A background color with alpha==0 disables this.
</description>
</method>
<method name="set_max_chars">
<argument index="0" name="amount" type="int">
</argument>
<description>
- Set the maximum amount of characters editable.
+ Set the maximum amount of characters editable.
</description>
</method>
<method name="set_readonly">
<argument index="0" name="enable" type="bool">
</argument>
<description>
- Set the text editor as read-only. Text can be displayed but not edited.
+ Set the text editor as read-only. Text can be displayed but not edited.
</description>
</method>
<method name="set_symbol_color">
<argument index="0" name="color" type="Color">
</argument>
<description>
- Set the color for symbols.
+ Set the color for symbols.
+ </description>
+ </method>
+ <method name="set_show_line_numbers">
+ <argument index="0" name="enable" type="bool">
+ </argument>
+ <description>
+ Set to enable showing line numbers.
+ </description>
+ </method>
+ <method name="is_show_line_numbers_enabled" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Returns true if line numbers are enabled.
+ </description>
+ </method>
+ <method name="set_highlight_all_occurrences">
+ <argument index="0" name="enable" type="bool">
+ </argument>
+ <description>
+ Set to enable highlighting all occurrences of the current selection.
+ </description>
+ </method>
+ <method name="is_highlight_all_occurrences_enabled" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Returns true if highlight all occurrences is enabled.
</description>
</method>
<method name="set_syntax_coloring">
<argument index="0" name="enable" type="bool">
</argument>
<description>
- Set to enable the syntax coloring.
+ Set to enable the syntax coloring.
</description>
</method>
<method name="set_text">
<argument index="0" name="text" type="String">
</argument>
<description>
- Set the entire text.
+ Set the entire text.
</description>
</method>
<method name="set_wrap">
<argument index="0" name="enable" type="bool">
</argument>
<description>
- Enable text wrapping when it goes beyond he edge of what is visible.
+ Enable text wrapping when it goes beyond he edge of what is visible.
</description>
</method>
<method name="undo">
<description>
- Perform undo operation.
+ Perform undo operation.
</description>
</method>
</methods>
<signals>
<signal name="cursor_changed">
<description>
- Emitted when the cursor changes.
+ Emitted when the cursor changes.
</description>
</signal>
<signal name="request_completion">
@@ -39390,7 +39475,7 @@ A similar effect may be achieved moving this node's descendants.
</signal>
<signal name="text_changed">
<description>
- Emitted when the text changes.
+ Emitted when the text changes.
</description>
</signal>
</signals>
@@ -39432,6 +39517,8 @@ A similar effect may be achieved moving this node's descendants.
</theme_item>
<theme_item name="completion_existing_color" type="Color">
</theme_item>
+ <theme_item name="completion_font_color" type="Color">
+ </theme_item>
<theme_item name="completion_lines" type="int">
</theme_item>
<theme_item name="completion_max_width" type="int">
@@ -39452,26 +39539,36 @@ A similar effect may be achieved moving this node's descendants.
</theme_item>
<theme_item name="font_color_selected" type="Color">
</theme_item>
+ <theme_item name="function_color" type="Color">
+ </theme_item>
+ <theme_item name="line_number_color" type="Color">
+ </theme_item>
<theme_item name="line_spacing" type="int">
</theme_item>
<theme_item name="mark_color" type="Color">
</theme_item>
+ <theme_item name="member_variable_color" type="Color">
+ </theme_item>
<theme_item name="normal" type="StyleBox">
</theme_item>
+ <theme_item name="number_color" type="Color">
+ </theme_item>
<theme_item name="selection_color" type="Color">
</theme_item>
<theme_item name="symbol_color" type="Color">
</theme_item>
<theme_item name="tab" type="Texture">
</theme_item>
+ <theme_item name="word_highlighted_color" type="Color">
+ </theme_item>
</theme_items>
</class>
<class name="Texture" inherits="Resource" category="Core">
<brief_description>
- Texture for 2D and 3D.
+ Texture for 2D and 3D.
</brief_description>
<description>
- A texture works by registering an image in the video hardware, which then can be used in 3D models or 2D [Sprite] or GUI [Control].
+ A texture works by registering an image in the video hardware, which then can be used in 3D models or 2D [Sprite] or GUI [Control].
</description>
<methods>
<method name="draw" qualifiers="const">
@@ -39518,35 +39615,35 @@ A similar effect may be achieved moving this node's descendants.
<return type="int">
</return>
<description>
- Return the current texture flags.
+ Return the current texture flags.
</description>
</method>
<method name="get_height" qualifiers="const">
<return type="int">
</return>
<description>
- Return the texture height.
+ Return the texture height.
</description>
</method>
<method name="get_rid" qualifiers="const">
<return type="RID">
</return>
<description>
- Return the texture RID as used in the [VisualServer].
+ Return the texture RID as used in the [VisualServer].
</description>
</method>
<method name="get_size" qualifiers="const">
<return type="Vector2">
</return>
<description>
- Return the texture size.
+ Return the texture size.
</description>
</method>
<method name="get_width" qualifiers="const">
<return type="int">
</return>
<description>
- Return the texture width.
+ Return the texture width.
</description>
</method>
<method name="has_alpha" qualifiers="const">
@@ -39559,7 +39656,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="flags" type="int">
</argument>
<description>
- Change the texture flags.
+ Change the texture flags.
</description>
</method>
</methods>
@@ -39589,11 +39686,11 @@ A similar effect may be achieved moving this node's descendants.
</class>
<class name="TextureButton" inherits="BaseButton" category="Core">
<brief_description>
- Button that can be themed with textures.
+ Button that can be themed with textures.
</brief_description>
<description>
- Button that can be themed with textures. This is like a regular [Button] but can be themed by assigning textures to it. This button is intended to be easy to theme, however a regular button can expand (that uses styleboxes) and still be better if the interface is expect to have internationalization of texts.
- Only the normal texture is required, the others are optional.
+ Button that can be themed with textures. This is like a regular [Button] but can be themed by assigning textures to it. This button is intended to be easy to theme, however a regular button can expand (that uses styleboxes) and still be better if the interface is expect to have internationalization of texts.
+ Only the normal texture is required, the others are optional.
</description>
<methods>
<method name="get_click_mask" qualifiers="const">
@@ -39698,10 +39795,10 @@ A similar effect may be achieved moving this node's descendants.
</class>
<class name="TextureFrame" inherits="Control" category="Core">
<brief_description>
- Control Frame that draws a texture.
+ Control Frame that draws a texture.
</brief_description>
<description>
- Control frame that simply draws an assigned texture. It can stretch or not. It's a simple way to just show an image in a UI.
+ Control frame that simply draws an assigned texture. It can stretch or not. It's a simple way to just show an image in a UI.
</description>
<methods>
<method name="get_modulate" qualifiers="const">
@@ -39772,10 +39869,10 @@ A similar effect may be achieved moving this node's descendants.
</class>
<class name="TextureProgress" inherits="Range" category="Core">
<brief_description>
- Textured progress bar implementation.
+ Textured progress bar implementation.
</brief_description>
<description>
- [ProgressBar] implementation that is easier to theme (by just passing a few textures).
+ [ProgressBar] implementation that is easier to theme (by just passing a few textures).
</description>
<methods>
<method name="get_fill_degrees">
@@ -39880,11 +39977,11 @@ A similar effect may be achieved moving this node's descendants.
</class>
<class name="Theme" inherits="Resource" category="Core">
<brief_description>
- Theme for controls.
+ Theme for controls.
</brief_description>
<description>
- Theme for skinning controls. Controls can be skinned individually, but for complex applications it's more efficient to just create a global theme that defines everything. This theme can be applied to any [Control], and it and its children will automatically use it.
- Theme resources can be alternatively loaded by writing them in a .theme file, see wiki for more info.
+ Theme for skinning controls. Controls can be skinned individually, but for complex applications it's more efficient to just create a global theme that defines everything. This theme can be applied to any [Control], and it and its children will automatically use it.
+ Theme resources can be alternatively loaded by writing them in a .theme file, see docs for more info.
</description>
<methods>
<method name="clear_color">
@@ -40153,24 +40250,24 @@ A similar effect may be achieved moving this node's descendants.
</class>
<class name="Thread" inherits="Reference" category="Core">
<brief_description>
- A unit of execution in a process.
+ A unit of execution in a process.
</brief_description>
<description>
- A unit of execution in a process. Can run methods on [Object]s simultaneously. The use of synchronization via [Mutex], [Semaphore] is advised if working with shared objects.
+ A unit of execution in a process. Can run methods on [Object]s simultaneously. The use of synchronization via [Mutex], [Semaphore] is advised if working with shared objects.
</description>
<methods>
<method name="get_id" qualifiers="const">
<return type="String">
</return>
<description>
- Return the id of the thread, uniquely identifying it among all threads.
+ Return the id of the thread, uniquely identifying it among all threads.
</description>
</method>
<method name="is_active" qualifiers="const">
<return type="bool">
</return>
<description>
- Whether this thread is currently active, an active Thread cannot start work on a new method but can be joined with [method wait_to_finish].
+ Whether this thread is currently active, an active Thread cannot start work on a new method but can be joined with [method wait_to_finish].
</description>
</method>
<method name="start">
@@ -40185,15 +40282,15 @@ A similar effect may be achieved moving this node's descendants.
<argument index="3" name="priority" type="int" default="1">
</argument>
<description>
- Start a new [Thread], it will run "method" on object "instance" using "userdata" as an argument and running with "priority", one of PRIORITY_* enum.
- Returns OK on success, or ERR_CANT_CREATE on failure.
+ Start a new [Thread], it will run "method" on object "instance" using "userdata" as an argument and running with "priority", one of PRIORITY_* enum.
+ Returns OK on success, or ERR_CANT_CREATE on failure.
</description>
</method>
<method name="wait_to_finish">
<return type="Variant">
</return>
<description>
- Joins the [Thread] and waits for it to finish. Returns what the method called returned.
+ Joins the [Thread] and waits for it to finish. Returns what the method called returned.
</description>
</method>
</methods>
@@ -40208,16 +40305,16 @@ A similar effect may be achieved moving this node's descendants.
</class>
<class name="TileMap" inherits="Node2D" category="Core">
<brief_description>
- Node for 2D tile-based games.
+ Node for 2D tile-based games.
</brief_description>
<description>
- Node for 2D tile-based games. Tilemaps use a [TileSet] which contain a list of tiles (textures, their rect and a collision) and are used to create complex grid-based maps.
- To optimize drawing and culling (sort of like [GridMap]), you can specify a quadrant size, so chunks of the map will be batched together at drawing time.
+ Node for 2D tile-based games. Tilemaps use a [TileSet] which contain a list of tiles (textures, their rect and a collision) and are used to create complex grid-based maps.
+ To optimize drawing and culling (sort of like [GridMap]), you can specify a quadrant size, so chunks of the map will be batched together at drawing time.
</description>
<methods>
<method name="clear">
<description>
- Clear all cells.
+ Clear all cells.
</description>
</method>
<method name="get_cell" qualifiers="const">
@@ -40228,14 +40325,14 @@ A similar effect may be achieved moving this node's descendants.
<argument index="1" name="y" type="int">
</argument>
<description>
- Return the tile index of the referenced cell.
+ Return the tile index of the referenced cell.
</description>
</method>
<method name="get_cell_size" qualifiers="const">
<return type="Vector2">
</return>
<description>
- Return the cell size.
+ Return the cell size.
</description>
</method>
<method name="get_cellv" qualifiers="const">
@@ -40244,77 +40341,77 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="pos" type="Vector2">
</argument>
<description>
- Return the tile index of the cell referenced by a Vector2.
+ Return the tile index of the cell referenced by a Vector2.
</description>
</method>
<method name="get_center_x" qualifiers="const">
<return type="bool">
</return>
<description>
- Return true if tiles are to be centered in x coordinate (by default this is false and they are drawn from upper left cell corner).
+ Return true if tiles are to be centered in x coordinate (by default this is false and they are drawn from upper left cell corner).
</description>
</method>
<method name="get_center_y" qualifiers="const">
<return type="bool">
</return>
<description>
- Return true if tiles are to be centered in y coordinate (by default this is false and they are drawn from upper left cell corner).
+ Return true if tiles are to be centered in y coordinate (by default this is false and they are drawn from upper left cell corner).
</description>
</method>
<method name="get_collision_bounce" qualifiers="const">
<return type="float">
</return>
<description>
- Return the collision bounce parameter.
+ Return the collision bounce parameter.
</description>
</method>
<method name="get_collision_friction" qualifiers="const">
<return type="float">
</return>
<description>
- Return the collision friction parameter.
+ Return the collision friction parameter.
</description>
</method>
<method name="get_collision_layer" qualifiers="const">
<return type="int">
</return>
<description>
- Return the collision layer.
+ Return the collision layer.
</description>
</method>
<method name="get_collision_mask" qualifiers="const">
<return type="int">
</return>
<description>
- Return the collision mask.
+ Return the collision mask.
</description>
</method>
<method name="get_collision_use_kinematic" qualifiers="const">
<return type="bool">
</return>
<description>
- Return whether the tilemap handles collisions as a kinematic body.
+ Return whether the tilemap handles collisions as a kinematic body.
</description>
</method>
<method name="get_custom_transform" qualifiers="const">
<return type="Matrix32">
</return>
<description>
- Return the custom transform matrix.
+ Return the custom transform matrix.
</description>
</method>
<method name="get_half_offset" qualifiers="const">
<return type="int">
</return>
<description>
- Return the current half offset configuration.
+ Return the current half offset configuration.
</description>
</method>
<method name="get_mode" qualifiers="const">
<return type="int">
</return>
<description>
- Return the orientation mode.
+ Return the orientation mode.
</description>
</method>
<method name="get_occluder_light_mask" qualifiers="const">
@@ -40327,28 +40424,28 @@ A similar effect may be achieved moving this node's descendants.
<return type="int">
</return>
<description>
- Return the quadrant size.
+ Return the quadrant size.
</description>
</method>
<method name="get_tile_origin" qualifiers="const">
<return type="int">
</return>
<description>
- Return the tile origin configuration.
+ Return the tile origin configuration.
</description>
</method>
<method name="get_tileset" qualifiers="const">
<return type="TileSet">
</return>
<description>
- Return the current tileset.
+ Return the current tileset.
</description>
</method>
<method name="get_used_cells" qualifiers="const">
<return type="Array">
</return>
<description>
- Return an array of all cells containing a tile from the tileset (i.e. a tile index different from -1).
+ Return an array of all cells containing a tile from the tileset (i.e. a tile index different from -1).
</description>
</method>
<method name="is_cell_transposed" qualifiers="const">
@@ -40359,7 +40456,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="1" name="y" type="int">
</argument>
<description>
- Return whether the referenced cell is transposed, i.e. the X and Y axes are swapped (mirroring with regard to the (1,1) vector).
+ Return whether the referenced cell is transposed, i.e. the X and Y axes are swapped (mirroring with regard to the (1,1) vector).
</description>
</method>
<method name="is_cell_x_flipped" qualifiers="const">
@@ -40370,7 +40467,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="1" name="y" type="int">
</argument>
<description>
- Return whether the referenced cell is flipped over the X axis.
+ Return whether the referenced cell is flipped over the X axis.
</description>
</method>
<method name="is_cell_y_flipped" qualifiers="const">
@@ -40381,14 +40478,14 @@ A similar effect may be achieved moving this node's descendants.
<argument index="1" name="y" type="int">
</argument>
<description>
- Return whether the referenced cell is flipped over the Y axis.
+ Return whether the referenced cell is flipped over the Y axis.
</description>
</method>
<method name="is_y_sort_mode_enabled" qualifiers="const">
<return type="bool">
</return>
<description>
- Return the Y sort mode.
+ Return the Y sort mode.
</description>
</method>
<method name="map_to_world" qualifiers="const">
@@ -40399,8 +40496,8 @@ A similar effect may be achieved moving this node's descendants.
<argument index="1" name="ignore_half_ofs" type="bool" default="false">
</argument>
<description>
- Return the absolute world position corresponding to the tilemap (grid-based) coordinates given as an argument.
- Optionally, the tilemap's potential half offset can be ignored.
+ Return the absolute world position corresponding to the tilemap (grid-based) coordinates given as an argument.
+ Optionally, the tilemap's potential half offset can be ignored.
</description>
</method>
<method name="set_cell">
@@ -40417,16 +40514,16 @@ A similar effect may be achieved moving this node's descendants.
<argument index="5" name="transpose" type="bool" default="false">
</argument>
<description>
- Set the tile index for the cell referenced by its grid-based X and Y coordinates.
- A tile index of -1 clears the cell.
- Optionally, the tile can also be flipped over the X and Y coordinates or transposed.
+ Set the tile index for the cell referenced by its grid-based X and Y coordinates.
+ A tile index of -1 clears the cell.
+ Optionally, the tile can also be flipped over the X and Y coordinates or transposed.
</description>
</method>
<method name="set_cell_size">
<argument index="0" name="size" type="Vector2">
</argument>
<description>
- Set the cell size.
+ Set the cell size.
</description>
</method>
<method name="set_cellv">
@@ -40441,84 +40538,82 @@ A similar effect may be achieved moving this node's descendants.
<argument index="4" name="transpose" type="bool" default="false">
</argument>
<description>
- Set the tile index for the cell referenced by a Vector2 of grid-based coordinates.
- A tile index of -1 clears the cell.
- Optionally, the tile can also be flipped over the X and Y axes or transposed.
+ Set the tile index for the cell referenced by a Vector2 of grid-based coordinates.
+ A tile index of -1 clears the cell.
+ Optionally, the tile can also be flipped over the X and Y axes or transposed.
</description>
</method>
<method name="set_center_x">
<argument index="0" name="enable" type="bool">
</argument>
<description>
- Set tiles to be centered in x coordinate. (by default this is false and they are drawn from upper left cell corner).
+ Set tiles to be centered in x coordinate. (by default this is false and they are drawn from upper left cell corner).
</description>
</method>
<method name="set_center_y">
<argument index="0" name="enable" type="bool">
</argument>
<description>
- Set tiles to be centered in y coordinate. (by default this is false and they are drawn from upper left cell corner).
+ Set tiles to be centered in y coordinate. (by default this is false and they are drawn from upper left cell corner).
</description>
</method>
<method name="set_collision_bounce">
<argument index="0" name="value" type="float">
</argument>
<description>
- Set the collision bounce parameter.
- Allowable values range from 0 to 1.
+ Set the collision bounce parameter. Allowable values range from 0 to 1.
</description>
</method>
<method name="set_collision_friction">
<argument index="0" name="value" type="float">
</argument>
<description>
- Set the collision friction parameter.
- Allowable values range from 0 to 1.
+ Set the collision friction parameter. Allowable values range from 0 to 1.
</description>
</method>
<method name="set_collision_layer">
<argument index="0" name="mask" type="int">
</argument>
<description>
- Set the collision layer.
- Layers are referenced by binary indexes, so allowable values to describe the 20 available layers range from 0 to 2^20-1.
+ Set the collision layer.
+ Layers are referenced by binary indexes, so allowable values to describe the 20 available layers range from 0 to 2^20-1.
</description>
</method>
<method name="set_collision_mask">
<argument index="0" name="mask" type="int">
</argument>
<description>
- Set the collision masks.
- Masks are referenced by binary indexes, so allowable values to describe the 20 available masks range from 0 to 2^20-1.
+ Set the collision masks.
+ Masks are referenced by binary indexes, so allowable values to describe the 20 available masks range from 0 to 2^20-1.
</description>
</method>
<method name="set_collision_use_kinematic">
<argument index="0" name="use_kinematic" type="bool">
</argument>
<description>
- Set the tilemap to handle collisions as a kinematic body (enabled) or a static body (disabled).
+ Set the tilemap to handle collisions as a kinematic body (enabled) or a static body (disabled).
</description>
</method>
<method name="set_custom_transform">
<argument index="0" name="custom_transform" type="Matrix32">
</argument>
<description>
- Set custom transform matrix, to use in combination with the custom orientation mode.
+ Set custom transform matrix, to use in combination with the custom orientation mode.
</description>
</method>
<method name="set_half_offset">
<argument index="0" name="half_offset" type="int">
</argument>
<description>
- Set an half offset on the X coordinate, Y coordinate, or none (use HALF_OFFSET_* constants as argument).
- Half offset sets every other tile off by a half tile size in the specified direction.
+ Set an half offset on the X coordinate, Y coordinate, or none (use HALF_OFFSET_* constants as argument).
+ Half offset sets every other tile off by a half tile size in the specified direction.
</description>
</method>
<method name="set_mode">
<argument index="0" name="mode" type="int">
</argument>
<description>
- Set the orientation mode as square, isometric or custom (use MODE_* constants as argument).
+ Set the orientation mode as square, isometric or custom (use MODE_* constants as argument).
</description>
</method>
<method name="set_occluder_light_mask">
@@ -40531,30 +40626,30 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="size" type="int">
</argument>
<description>
- Set the quadrant size, this optimizes drawing by batching chunks of map at draw/cull time.
- Allowed values are integers ranging from 1 to 128.
+ Set the quadrant size, this optimizes drawing by batching chunks of map at draw/cull time.
+ Allowed values are integers ranging from 1 to 128.
</description>
</method>
<method name="set_tile_origin">
<argument index="0" name="origin" type="int">
</argument>
<description>
- Set the tile origin to the tile center or its top-left corner (use TILE_ORIGIN_* constants as argument).
+ Set the tile origin to the tile center or its top-left corner (use TILE_ORIGIN_* constants as argument).
</description>
</method>
<method name="set_tileset">
<argument index="0" name="tileset" type="TileSet">
</argument>
<description>
- Set the current tileset.
+ Set the current tileset.
</description>
</method>
<method name="set_y_sort_mode">
<argument index="0" name="enable" type="bool">
</argument>
<description>
- Set the Y sort mode. Enabled Y sort mode means that children of the tilemap will be drawn in the order defined by their Y coordinate.
- A tile with a higher Y coordinate will therefore be drawn later, potentially covering up the tile(s) above it if its sprite is higher than its cell size.
+ Set the Y sort mode. Enabled Y sort mode means that children of the tilemap will be drawn in the order defined by their Y coordinate.
+ A tile with a higher Y coordinate will therefore be drawn later, potentially covering up the tile(s) above it if its sprite is higher than its cell size.
</description>
</method>
<method name="world_to_map" qualifiers="const">
@@ -40563,14 +40658,14 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="worldpos" type="Vector2">
</argument>
<description>
- Return the tilemap (grid-based) coordinates corresponding to the absolute world position given as an argument.
+ Return the tilemap (grid-based) coordinates corresponding to the absolute world position given as an argument.
</description>
</method>
</methods>
<signals>
<signal name="settings_changed">
<description>
- Signal indicating that a tilemap setting has changed.
+ Signal indicating that a tilemap setting has changed.
</description>
</signal>
</signals>
@@ -40606,23 +40701,23 @@ A similar effect may be achieved moving this node's descendants.
</class>
<class name="TileSet" inherits="Resource" category="Core">
<brief_description>
- Tile library for tilemaps.
+ Tile library for tilemaps.
</brief_description>
<description>
- A TileSet is a library of tiles for a [TileMap]. It contains a list of tiles, each consisting of a sprite and optional collision shapes.
- Tiles are referenced by a unique integer ID.
+ A TileSet is a library of tiles for a [TileMap]. It contains a list of tiles, each consisting of a sprite and optional collision shapes.
+ Tiles are referenced by a unique integer ID.
</description>
<methods>
<method name="clear">
<description>
- Clear all tiles.
+ Clear all tiles.
</description>
</method>
<method name="create_tile">
<argument index="0" name="id" type="int">
</argument>
<description>
- Create a new tile which will be referenced by the given ID.
+ Create a new tile which will be referenced by the given ID.
</description>
</method>
<method name="find_tile_by_name" qualifiers="const">
@@ -40631,28 +40726,28 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="name" type="String">
</argument>
<description>
- Find the first tile matching the given name.
+ Find the first tile matching the given name.
</description>
</method>
<method name="get_last_unused_tile_id" qualifiers="const">
<return type="int">
</return>
<description>
- Return the ID following the last currently used ID, useful when creating a new tile.
+ Return the ID following the last currently used ID, useful when creating a new tile.
</description>
</method>
<method name="get_tiles_ids" qualifiers="const">
<return type="Array">
</return>
<description>
- Return an array of all currently used tile IDs.
+ Return an array of all currently used tile IDs.
</description>
</method>
<method name="remove_tile">
<argument index="0" name="id" type="int">
</argument>
<description>
- Remove the tile referenced by the given ID.
+ Remove the tile referenced by the given ID.
</description>
</method>
<method name="tile_get_light_occluder" qualifiers="const">
@@ -40661,7 +40756,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="id" type="int">
</argument>
<description>
- Return the light occluder of the tile.
+ Return the light occluder of the tile.
</description>
</method>
<method name="tile_get_material" qualifiers="const">
@@ -40670,7 +40765,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="id" type="int">
</argument>
<description>
- Return the material of the tile.
+ Return the material of the tile.
</description>
</method>
<method name="tile_get_name" qualifiers="const">
@@ -40679,7 +40774,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="id" type="int">
</argument>
<description>
- Return the name of the tile.
+ Return the name of the tile.
</description>
</method>
<method name="tile_get_navigation_polygon" qualifiers="const">
@@ -40688,7 +40783,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="id" type="int">
</argument>
<description>
- Return the navigation polygon of the tile.
+ Return the navigation polygon of the tile.
</description>
</method>
<method name="tile_get_navigation_polygon_offset" qualifiers="const">
@@ -40697,7 +40792,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="id" type="int">
</argument>
<description>
- Return the offset of the tile's navigation polygon.
+ Return the offset of the tile's navigation polygon.
</description>
</method>
<method name="tile_get_occluder_offset" qualifiers="const">
@@ -40706,7 +40801,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="id" type="int">
</argument>
<description>
- Return the offset of the tile's light occluder.
+ Return the offset of the tile's light occluder.
</description>
</method>
<method name="tile_get_region" qualifiers="const">
@@ -40715,7 +40810,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="id" type="int">
</argument>
<description>
- Return the tile sub-region in the texture.
+ Return the tile sub-region in the texture.
</description>
</method>
<method name="tile_get_shape" qualifiers="const">
@@ -40724,7 +40819,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="id" type="int">
</argument>
<description>
- Return the shape of the tile.
+ Return the shape of the tile.
</description>
</method>
<method name="tile_get_shape_offset" qualifiers="const">
@@ -40733,7 +40828,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="id" type="int">
</argument>
<description>
- Return the shape offset of the tile.
+ Return the shape offset of the tile.
</description>
</method>
<method name="tile_get_shapes" qualifiers="const">
@@ -40742,7 +40837,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="id" type="int">
</argument>
<description>
- Return the array of shapes of the tile.
+ Return the array of shapes of the tile.
</description>
</method>
<method name="tile_get_texture" qualifiers="const">
@@ -40751,7 +40846,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="id" type="int">
</argument>
<description>
- Return the texture of the tile.
+ Return the texture of the tile.
</description>
</method>
<method name="tile_get_texture_offset" qualifiers="const">
@@ -40760,7 +40855,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="id" type="int">
</argument>
<description>
- Return the texture offset of the tile.
+ Return the texture offset of the tile.
</description>
</method>
<method name="tile_set_light_occluder">
@@ -40769,7 +40864,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="1" name="light_occluder" type="OccluderPolygon2D">
</argument>
<description>
- Set a light occluder for the tile.
+ Set a light occluder for the tile.
</description>
</method>
<method name="tile_set_material">
@@ -40778,7 +40873,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="1" name="material" type="CanvasItemMaterial">
</argument>
<description>
- Set the material of the tile.
+ Set the material of the tile.
</description>
</method>
<method name="tile_set_name">
@@ -40787,7 +40882,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="1" name="name" type="String">
</argument>
<description>
- Set the name of the tile, for descriptive purposes.
+ Set the name of the tile, for descriptive purposes.
</description>
</method>
<method name="tile_set_navigation_polygon">
@@ -40796,7 +40891,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="1" name="navigation_polygon" type="NavigationPolygon">
</argument>
<description>
- Set a navigation polygon for the tile.
+ Set a navigation polygon for the tile.
</description>
</method>
<method name="tile_set_navigation_polygon_offset">
@@ -40805,7 +40900,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="1" name="navigation_polygon_offset" type="Vector2">
</argument>
<description>
- Set an offset for the tile's navigation polygon.
+ Set an offset for the tile's navigation polygon.
</description>
</method>
<method name="tile_set_occluder_offset">
@@ -40814,7 +40909,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="1" name="occluder_offset" type="Vector2">
</argument>
<description>
- Set an offset for the tile's light occluder.
+ Set an offset for the tile's light occluder.
</description>
</method>
<method name="tile_set_region">
@@ -40823,7 +40918,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="1" name="region" type="Rect2">
</argument>
<description>
- Set the tile sub-region in the texture. This is common in texture atlases.
+ Set the tile sub-region in the texture. This is common in texture atlases.
</description>
</method>
<method name="tile_set_shape">
@@ -40832,7 +40927,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="1" name="shape" type="Shape2D">
</argument>
<description>
- Set a shape for the tile, enabling physics to collide with it.
+ Set a shape for the tile, enabling physics to collide with it.
</description>
</method>
<method name="tile_set_shape_offset">
@@ -40841,7 +40936,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="1" name="shape_offset" type="Vector2">
</argument>
<description>
- Set the shape offset of the tile.
+ Set the shape offset of the tile.
</description>
</method>
<method name="tile_set_shapes">
@@ -40850,7 +40945,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="1" name="shapes" type="Array">
</argument>
<description>
- Set an array of shapes for the tile, enabling physics to collide with it.
+ Set an array of shapes for the tile, enabling physics to collide with it.
</description>
</method>
<method name="tile_set_texture">
@@ -40859,7 +40954,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="1" name="texture" type="Texture">
</argument>
<description>
- Set the texture of the tile.
+ Set the texture of the tile.
</description>
</method>
<method name="tile_set_texture_offset">
@@ -40868,7 +40963,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="1" name="texture_offset" type="Vector2">
</argument>
<description>
- Set the texture offset of the tile.
+ Set the texture offset of the tile.
</description>
</method>
</methods>
@@ -40877,104 +40972,104 @@ A similar effect may be achieved moving this node's descendants.
</class>
<class name="Timer" inherits="Node" category="Core">
<brief_description>
- A simple Timer node.
+ A simple Timer node.
</brief_description>
<description>
- Timer node. This is a simple node that will emit a timeout callback when the timer runs out. It can optionally be set to loop.
+ Timer node. This is a simple node that will emit a timeout callback when the timer runs out. It can optionally be set to loop.
</description>
<methods>
<method name="get_time_left" qualifiers="const">
<return type="float">
</return>
<description>
- Return the time left for timeout in seconds if the timer is active, 0 otherwise.
+ Return the time left for timeout in seconds if the timer is active, 0 otherwise.
</description>
</method>
<method name="get_timer_process_mode" qualifiers="const">
<return type="int">
</return>
<description>
- Return the timer's processing mode.
+ Return the timer's processing mode.
</description>
</method>
<method name="get_wait_time" qualifiers="const">
<return type="float">
</return>
<description>
- Return the wait time in seconds.
+ Return the wait time in seconds.
</description>
</method>
<method name="has_autostart" qualifiers="const">
<return type="bool">
</return>
<description>
- Return true if set to automatically start when entering the scene.
+ Return true if set to automatically start when entering the scene.
</description>
</method>
<method name="is_active" qualifiers="const">
<return type="bool">
</return>
<description>
- Return if the timer is active or not.
+ Return if the timer is active or not.
</description>
</method>
<method name="is_one_shot" qualifiers="const">
<return type="bool">
</return>
<description>
- Return true if configured as one-shot.
+ Return true if configured as one-shot.
</description>
</method>
<method name="set_active">
<argument index="0" name="active" type="bool">
</argument>
<description>
- Set whether the timer is active or not. An inactive timer will be paused until it is activated again.
+ Set whether the timer is active or not. An inactive timer will be paused until it is activated again.
</description>
</method>
<method name="set_autostart">
<argument index="0" name="enable" type="bool">
</argument>
<description>
- Set to automatically start when entering the scene.
+ Set to automatically start when entering the scene.
</description>
</method>
<method name="set_one_shot">
<argument index="0" name="enable" type="bool">
</argument>
<description>
- Set as one-shot. If enabled, the timer will stop after timeout, otherwise it will automatically restart.
+ Set as one-shot. If enabled, the timer will stop after timeout, otherwise it will automatically restart.
</description>
</method>
<method name="set_timer_process_mode">
<argument index="0" name="mode" type="int">
</argument>
<description>
- Set the timer's processing mode (fixed or idle, use TIMER_PROCESS_* constants as argument).
+ Set the timer's processing mode (fixed or idle, use TIMER_PROCESS_* constants as argument).
</description>
</method>
<method name="set_wait_time">
<argument index="0" name="time_sec" type="float">
</argument>
<description>
- Set wait time in seconds. When the time is over, it will emit the timeout signal.
+ Set wait time in seconds. When the time is over, it will emit the timeout signal.
</description>
</method>
<method name="start">
<description>
- Start the timer.
+ Start the timer.
</description>
</method>
<method name="stop">
<description>
- Stop (cancel) the timer.
+ Stop (cancel) the timer.
</description>
</method>
</methods>
<signals>
<signal name="timeout">
<description>
- Emitted when the time runs out.
+ Emitted when the time runs out.
</description>
</signal>
</signals>
@@ -41121,10 +41216,10 @@ A similar effect may be achieved moving this node's descendants.
</class>
<class name="Transform" category="Built-In Types">
<brief_description>
- 3D Transformation.
+ 3D Transformation.
</brief_description>
<description>
- Transform is used to store transformations, including translations. It consists of a Matrix3 "basis" and Vector3 "origin". Transform is used to represent transformations of any object in space. It is similar to a 4x3 matrix.
+ Transform is used to store transformations, including translations. It consists of a Matrix3 "basis" and Vector3 "origin". Transform is used to represent transformations of any object in space. It is similar to a 4x3 matrix.
</description>
<methods>
<method name="Transform">
@@ -41139,7 +41234,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="3" name="origin" type="Vector3">
</argument>
<description>
- Construct the Transform from four Vector3. Each axis creates the basis.
+ Construct the Transform from four Vector3. Each axis creates the basis.
</description>
</method>
<method name="Transform">
@@ -41150,7 +41245,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="1" name="origin" type="Vector3">
</argument>
<description>
- Construct the Transform from a Matrix3 and Vector3.
+ Construct the Transform from a Matrix3 and Vector3.
</description>
</method>
<method name="Transform">
@@ -41159,7 +41254,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="from" type="Matrix32">
</argument>
<description>
- Construct the Transform from a Matrix32.
+ Construct the Transform from a Matrix32.
</description>
</method>
<method name="Transform">
@@ -41168,7 +41263,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="from" type="Quat">
</argument>
<description>
- Construct the Transform from a Quat. The origin will be Vector3(0, 0, 0)
+ Construct the Transform from a Quat. The origin will be Vector3(0, 0, 0)
</description>
</method>
<method name="Transform">
@@ -41177,21 +41272,21 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="from" type="Matrix3">
</argument>
<description>
- Construct the Transform from a Matrix3. The origin will be Vector3(0, 0, 0)
+ Construct the Transform from a Matrix3. The origin will be Vector3(0, 0, 0)
</description>
</method>
<method name="affine_inverse">
<return type="Transform">
</return>
<description>
- Returns the inverse of the transfrom, even if the transform has scale or the axis vectors are not orthogonal.
+ Returns the inverse of the transfrom, even if the transform has scale or the axis vectors are not orthogonal.
</description>
</method>
<method name="inverse">
<return type="Transform">
</return>
<description>
- Returns the inverse of the transform.
+ Returns the inverse of the transform.
</description>
</method>
<method name="looking_at">
@@ -41202,14 +41297,14 @@ A similar effect may be achieved moving this node's descendants.
<argument index="1" name="up" type="Vector3">
</argument>
<description>
- Rotate the transform around the up vector to face the target.
+ Rotate the transform around the up vector to face the target.
</description>
</method>
<method name="orthonormalized">
<return type="Transform">
</return>
<description>
- Returns a transfrom with the basis orthogonal (90 degrees), and normalized axis vectors.
+ Returns a transfrom with the basis orthogonal (90 degrees), and normalized axis vectors.
</description>
</method>
<method name="rotated">
@@ -41220,7 +41315,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="1" name="phi" type="float">
</argument>
<description>
- Rotate the transform locally.
+ Rotate the transform locally.
</description>
</method>
<method name="scaled">
@@ -41229,7 +41324,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="scale" type="Vector3">
</argument>
<description>
- Scale the transform locally.
+ Scale the transform locally.
</description>
</method>
<method name="translated">
@@ -41238,7 +41333,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="ofs" type="Vector3">
</argument>
<description>
- Translate the transform locally.
+ Translate the transform locally.
</description>
</method>
<method name="xform">
@@ -41247,7 +41342,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="v" type="var">
</argument>
<description>
- Transforms vector "v" by this transform.
+ Transforms vector "v" by this transform.
</description>
</method>
<method name="xform_inv">
@@ -41256,7 +41351,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="v" type="var">
</argument>
<description>
- Inverse-transforms vector "v" by this transform.
+ Inverse-transforms vector "v" by this transform.
</description>
</method>
</methods>
@@ -41273,10 +41368,10 @@ A similar effect may be achieved moving this node's descendants.
</class>
<class name="Translation" inherits="Resource" category="Core">
<brief_description>
- Language Translation.
+ Language Translation.
</brief_description>
<description>
- Translations are resources that can be loaded/unloaded on demand. They map a string to another string.
+ Translations are resources that can be loaded/unloaded on demand. They map a string to another string.
</description>
<methods>
<method name="add_message">
@@ -41285,21 +41380,21 @@ A similar effect may be achieved moving this node's descendants.
<argument index="1" name="xlated_message" type="String">
</argument>
<description>
- Add a message for translation.
+ Add a message for translation.
</description>
</method>
<method name="erase_message">
<argument index="0" name="src_message" type="String">
</argument>
<description>
- Erase a message.
+ Erase a message.
</description>
</method>
<method name="get_locale" qualifiers="const">
<return type="String">
</return>
<description>
- Return the locale of the translation.
+ Return the locale of the translation.
</description>
</method>
<method name="get_message" qualifiers="const">
@@ -41308,7 +41403,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="src_message" type="String">
</argument>
<description>
- Return a message for translation.
+ Return a message for translation.
</description>
</method>
<method name="get_message_count" qualifiers="const">
@@ -41321,14 +41416,14 @@ A similar effect may be achieved moving this node's descendants.
<return type="StringArray">
</return>
<description>
- Return all the messages (keys).
+ Return all the messages (keys).
</description>
</method>
<method name="set_locale">
<argument index="0" name="locale" type="String">
</argument>
<description>
- Set the locale of the translation.
+ Set the locale of the translation.
</description>
</method>
</methods>
@@ -41337,7 +41432,7 @@ A similar effect may be achieved moving this node's descendants.
</class>
<class name="TranslationServer" inherits="Object" category="Core">
<brief_description>
- Server that manages all translations. Translations can be set to it and removed from it.
+ Server that manages all translations. Translations can be set to it and removed from it.
</brief_description>
<description>
</description>
@@ -42154,18 +42249,18 @@ A similar effect may be achieved moving this node's descendants.
</class>
<class name="Tween" inherits="Node" category="Core">
<brief_description>
- Node useful for animations with unknown start and end points.
+ Node useful for animations with unknown start and end points.
</brief_description>
<description>
- Node useful for animations with unknown start and end points, procedural animations, making one node follow another, and other simple behavior.
- Because it is easy to get it wrong, here is a quick usage example:
- [codeblock]
- var tween = get_node("Tween")
- tween.interpolate_property(get_node("Node2D_to_move"), "transform/pos", Vector2(0,0), Vector2(100,100), Tween.TRANS_LINEAR, Tween.EASE_IN_OUT)
- tween.start()
- [/codeblock]
- Some of the methods of this class require a property name. You can get the property name by hovering over the property in the inspector of the editor.
- Many of the methods accept [code]trans_type[/code] and [code]ease_type[/code]. The first accepts an TRANS_* constant, and refers to the way the timing of the animation is handled (you might want to see [code]http://easings.net/[/code] for some examples). The second accepts an EASE_* constant, and controls the where [code]trans_type[/code] is applied to the interpolation (in the begining, the end, or both). If you don't know which transision and easing to pick, you can try different TRANS_* constants with EASE_IN_OUT, and use the one that looks best.
+ Node useful for animations with unknown start and end points, procedural animations, making one node follow another, and other simple behavior.
+ Because it is easy to get it wrong, here is a quick usage example:
+ [codeblock]
+ var tween = get_node("Tween")
+ tween.interpolate_property(get_node("Node2D_to_move"), "transform/pos", Vector2(0,0), Vector2(100,100), Tween.TRANS_LINEAR, Tween.EASE_IN_OUT)
+ tween.start()
+ [/codeblock]
+ Some of the methods of this class require a property name. You can get the property name by hovering over the property in the inspector of the editor.
+ Many of the methods accept [code]trans_type[/code] and [code]ease_type[/code]. The first accepts an TRANS_* constant, and refers to the way the timing of the animation is handled (you might want to see [code]http://easings.net/[/code] for some examples). The second accepts an EASE_* constant, and controls the where [code]trans_type[/code] is applied to the interpolation (in the begining, the end, or both). If you don't know which transision and easing to pick, you can try different TRANS_* constants with EASE_IN_OUT, and use the one that looks best.
</description>
<methods>
<method name="follow_method">
@@ -42190,8 +42285,8 @@ A similar effect may be achieved moving this node's descendants.
<argument index="8" name="delay" type="float" default="0">
</argument>
<description>
- Follow [code]method[/code] of [code]object[/code] and apply the returned value on [code]target_method[/code] of [code]target[/code], beginning from [code]initial_val[/code] for [code]times_in_sec[/code] seconds, [code]delay[/code] later. Methods are animated by calling them with consequitive values.
- [code]trans_type[/code] accepts TRANS_* constants, and is the way the animation is interpolated, while [code]ease_type[/code] accepts EASE_* constants, and controls the place of the interpolation (the begining, the end, or both). You can read more about them in the class description.
+ Follow [code]method[/code] of [code]object[/code] and apply the returned value on [code]target_method[/code] of [code]target[/code], beginning from [code]initial_val[/code] for [code]times_in_sec[/code] seconds, [code]delay[/code] later. Methods are animated by calling them with consequitive values.
+ [code]trans_type[/code] accepts TRANS_* constants, and is the way the animation is interpolated, while [code]ease_type[/code] accepts EASE_* constants, and controls the place of the interpolation (the begining, the end, or both). You can read more about them in the class description.
</description>
</method>
<method name="follow_property">
@@ -42216,29 +42311,29 @@ A similar effect may be achieved moving this node's descendants.
<argument index="8" name="delay" type="float" default="0">
</argument>
<description>
- Follow [code]property[/code] of [code]object[/code] and apply it on [code]target_property[/code] of [code]target[/code], beginning from [code]initial_val[/code] for [code]times_in_sec[/code] seconds, [code]delay[/code] seconds later. Note that [code]target:target_property[/code] would equal [code]object:property[/code] at the end of the tween.
- [code]trans_type[/code] accepts TRANS_* constants, and is the way the animation is interpolated, while [code]ease_type[/code] accepts EASE_* constants, and controls the place of the interpolation (the begining, the end, or both). You can read more about them in the class description.
+ Follow [code]property[/code] of [code]object[/code] and apply it on [code]target_property[/code] of [code]target[/code], beginning from [code]initial_val[/code] for [code]times_in_sec[/code] seconds, [code]delay[/code] seconds later. Note that [code]target:target_property[/code] would equal [code]object:property[/code] at the end of the tween.
+ [code]trans_type[/code] accepts TRANS_* constants, and is the way the animation is interpolated, while [code]ease_type[/code] accepts EASE_* constants, and controls the place of the interpolation (the begining, the end, or both). You can read more about them in the class description.
</description>
</method>
<method name="get_runtime" qualifiers="const">
<return type="float">
</return>
<description>
- Returns the time needed for all tweens to end in seconds, measured from the start. Thus, if you have two tweens, one ending 10 seconds after the start and the other - 20 seconds, it would return 20 seconds, as by that time all tweens would have finished.
+ Returns the time needed for all tweens to end in seconds, measured from the start. Thus, if you have two tweens, one ending 10 seconds after the start and the other - 20 seconds, it would return 20 seconds, as by that time all tweens would have finished.
</description>
</method>
<method name="get_speed" qualifiers="const">
<return type="float">
</return>
<description>
- Returns the speed that has been set from editor GUI or [method set_repeat].
+ Returns the speed that has been set from editor GUI or [method set_repeat].
</description>
</method>
<method name="get_tween_process_mode" qualifiers="const">
<return type="int">
</return>
<description>
- Returns the process mode that has been set from editor GUI or [method set_tween_process_mode]
+ Returns the process mode that has been set from editor GUI or [method set_tween_process_mode]
</description>
</method>
<method name="interpolate_callback">
@@ -42261,7 +42356,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="7" name="arg5" type="Variant" default="NULL">
</argument>
<description>
- Call [code]callback[/code] of [code]object[/code] after [code]times_in_sec[/code]. [code]arg1[/code]-[code]arg5[/code] are arguments to be passed to the callback.
+ Call [code]callback[/code] of [code]object[/code] after [code]times_in_sec[/code]. [code]arg1[/code]-[code]arg5[/code] are arguments to be passed to the callback.
</description>
</method>
<method name="interpolate_deferred_callback">
@@ -42284,7 +42379,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="7" name="arg5" type="Variant" default="NULL">
</argument>
<description>
- Call [code]callback[/code] of [code]object[/code] after [code]times_in_sec[/code] on the main thread (similar to [methog Object.call_deferred). [code]arg1[/code]-[code]arg5[/code] are arguments to be passed to the callback.
+ Call [code]callback[/code] of [code]object[/code] after [code]times_in_sec[/code] on the main thread (similar to [methog Object.call_deferred). [code]arg1[/code]-[code]arg5[/code] are arguments to be passed to the callback.
</description>
</method>
<method name="interpolate_method">
@@ -42307,8 +42402,8 @@ A similar effect may be achieved moving this node's descendants.
<argument index="7" name="delay" type="float" default="0">
</argument>
<description>
- Animate [code]method[/code] of [code]object[/code] from [code]initial_val[/code] to [code]final_val[/code] for [code]times_in_sec[/code] seconds, [code]delay[/code] seconds later. Methods are animated by calling them with consecuitive values.
- [code]trans_type[/code] accepts TRANS_* constants, and is the way the animation is interpolated, while [code]ease_type[/code] accepts EASE_* constants, and controls the place of the interpolation (the begining, the end, or both). You can read more about them in the class description.
+ Animate [code]method[/code] of [code]object[/code] from [code]initial_val[/code] to [code]final_val[/code] for [code]times_in_sec[/code] seconds, [code]delay[/code] seconds later. Methods are animated by calling them with consecuitive values.
+ [code]trans_type[/code] accepts TRANS_* constants, and is the way the animation is interpolated, while [code]ease_type[/code] accepts EASE_* constants, and controls the place of the interpolation (the begining, the end, or both). You can read more about them in the class description.
</description>
</method>
<method name="interpolate_property">
@@ -42331,22 +42426,22 @@ A similar effect may be achieved moving this node's descendants.
<argument index="7" name="delay" type="float" default="0">
</argument>
<description>
- Animate [code]property[/code] of [code]object[/code] from [code]initial_val[/code] to [code]final_val[/code] for [code]times_in_sec[/code] seconds, [code]delay[/code] seconds later.
- [code]trans_type[/code] accepts TRANS_* constants, and is the way the animation is interpolated, while [code]ease_type[/code] accepts EASE_* constants, and controls the place of the interpolation (the begining, the end, or both). You can read more about them in the class description.
+ Animate [code]property[/code] of [code]object[/code] from [code]initial_val[/code] to [code]final_val[/code] for [code]times_in_sec[/code] seconds, [code]delay[/code] seconds later.
+ [code]trans_type[/code] accepts TRANS_* constants, and is the way the animation is interpolated, while [code]ease_type[/code] accepts EASE_* constants, and controls the place of the interpolation (the begining, the end, or both). You can read more about them in the class description.
</description>
</method>
<method name="is_active" qualifiers="const">
<return type="bool">
</return>
<description>
- Returns true if any tweens are currently running, and false otherwise. Note that this method doesn't consider tweens that have ended.
+ Returns true if any tweens are currently running, and false otherwise. Note that this method doesn't consider tweens that have ended.
</description>
</method>
<method name="is_repeat" qualifiers="const">
<return type="bool">
</return>
<description>
- Returns true if repeat has been set from editor GUI or [method set_repeat].
+ Returns true if repeat has been set from editor GUI or [method set_repeat].
</description>
</method>
<method name="remove">
@@ -42357,14 +42452,14 @@ A similar effect may be achieved moving this node's descendants.
<argument index="1" name="key" type="String">
</argument>
<description>
- Stop animating and completely remove a tween, given its object and property/method pair.
+ Stop animating and completely remove a tween, given its object and property/method pair.
</description>
</method>
<method name="remove_all">
<return type="bool">
</return>
<description>
- Stop animating and completely remove all tweens.
+ Stop animating and completely remove all tweens.
</description>
</method>
<method name="reset">
@@ -42375,14 +42470,14 @@ A similar effect may be achieved moving this node's descendants.
<argument index="1" name="key" type="String">
</argument>
<description>
- Resets a tween to the initial value (the one given, not the one before the tween), given its object and property/method pair.
+ Resets a tween to the initial value (the one given, not the one before the tween), given its object and property/method pair.
</description>
</method>
<method name="reset_all">
<return type="bool">
</return>
<description>
- Resets all tweens to their initial values (the ones given, not those before the tween).
+ Resets all tweens to their initial values (the ones given, not those before the tween).
</description>
</method>
<method name="resume">
@@ -42393,14 +42488,14 @@ A similar effect may be achieved moving this node's descendants.
<argument index="1" name="key" type="String">
</argument>
<description>
- Continue animating a stopped tween, given its object and property/method pair.
+ Continue animating a stopped tween, given its object and property/method pair.
</description>
</method>
<method name="resume_all">
<return type="bool">
</return>
<description>
- Continue animating all stopped tweens.
+ Continue animating all stopped tweens.
</description>
</method>
<method name="seek">
@@ -42409,42 +42504,42 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="time" type="float">
</argument>
<description>
- Seek the animation to the given [code]time[/code] in seconds.
+ Seek the animation to the given [code]time[/code] in seconds.
</description>
</method>
<method name="set_active">
<argument index="0" name="active" type="bool">
</argument>
<description>
- Activate/deactivate the tween. You can use this for pausing animations, though [method stop_all] and [method resume_all] might be more fit for this.
+ Activate/deactivate the tween. You can use this for pausing animations, though [method stop_all] and [method resume_all] might be more fit for this.
</description>
</method>
<method name="set_repeat">
<argument index="0" name="repeat" type="bool">
</argument>
<description>
- Make the tween repeat after all tweens have finished.
+ Make the tween repeat after all tweens have finished.
</description>
</method>
<method name="set_speed">
<argument index="0" name="speed" type="float">
</argument>
<description>
- Set the speed multiplier of the tween. Set it to 1 for normal speed, 2 for two times nromal speed, and 0.5 for half of the normal speed. Setting it to 0 would pause the animation, but you might consider using [method set_active] or [method stop_all] and [method resume_all] for this.
+ Set the speed multiplier of the tween. Set it to 1 for normal speed, 2 for two times nromal speed, and 0.5 for half of the normal speed. Setting it to 0 would pause the animation, but you might consider using [method set_active] or [method stop_all] and [method resume_all] for this.
</description>
</method>
<method name="set_tween_process_mode">
<argument index="0" name="mode" type="int">
</argument>
<description>
- Set whether the Tween uses [code]_process[/code] or [code]_fixed_process[/code] (accepts TWEEN_PROCESS_IDLE and TWEEN_PROCESS_FIXED constants, respectively).
+ Set whether the Tween uses [code]_process[/code] or [code]_fixed_process[/code] (accepts TWEEN_PROCESS_IDLE and TWEEN_PROCESS_FIXED constants, respectively).
</description>
</method>
<method name="start">
<return type="bool">
</return>
<description>
- Start the tween node. You can define tweens both before and after this.
+ Start the tween node. You can define tweens both before and after this.
</description>
</method>
<method name="stop">
@@ -42455,14 +42550,14 @@ A similar effect may be achieved moving this node's descendants.
<argument index="1" name="key" type="String">
</argument>
<description>
- Stop animating a tween, given its object and property/method pair.
+ Stop animating a tween, given its object and property/method pair.
</description>
</method>
<method name="stop_all">
<return type="bool">
</return>
<description>
- Stop animating all tweens.
+ Stop animating all tweens.
</description>
</method>
<method name="targeting_method">
@@ -42487,8 +42582,8 @@ A similar effect may be achieved moving this node's descendants.
<argument index="8" name="delay" type="float" default="0">
</argument>
<description>
- Animate [code]method[/code] of [code]object[/code] from the value returned by [code]initial.initial_method[/code] to [code]final_val[/code] for [code]times_in_sec[/code] seconds, [code]delay[/code] seconds later. Methods are animated by calling them with consecuitive values.
- [code]trans_type[/code] accepts TRANS_* constants, and is the way the animation is interpolated, while [code]ease_type[/code] accepts EASE_* constants, and controls the place of the interpolation (the begining, the end, or both). You can read more about them in the class description.
+ Animate [code]method[/code] of [code]object[/code] from the value returned by [code]initial.initial_method[/code] to [code]final_val[/code] for [code]times_in_sec[/code] seconds, [code]delay[/code] seconds later. Methods are animated by calling them with consecuitive values.
+ [code]trans_type[/code] accepts TRANS_* constants, and is the way the animation is interpolated, while [code]ease_type[/code] accepts EASE_* constants, and controls the place of the interpolation (the begining, the end, or both). You can read more about them in the class description.
</description>
</method>
<method name="targeting_property">
@@ -42513,15 +42608,15 @@ A similar effect may be achieved moving this node's descendants.
<argument index="8" name="delay" type="float" default="0">
</argument>
<description>
- Animate [code]property[/code] of [code]object[/code] from the current value of the [code]initial_val[/code] property of [code]initial[/code] to [code]final_val[/code] for [code]times_in_sec[/code] seconds, [code]delay[/code] seconds later.
- [code]trans_type[/code] accepts TRANS_* constants, and is the way the animation is interpolated, while [code]ease_type[/code] accepts EASE_* constants, and controls the place of the interpolation (the begining, the end, or both). You can read more about them in the class description.
+ Animate [code]property[/code] of [code]object[/code] from the current value of the [code]initial_val[/code] property of [code]initial[/code] to [code]final_val[/code] for [code]times_in_sec[/code] seconds, [code]delay[/code] seconds later.
+ [code]trans_type[/code] accepts TRANS_* constants, and is the way the animation is interpolated, while [code]ease_type[/code] accepts EASE_* constants, and controls the place of the interpolation (the begining, the end, or both). You can read more about them in the class description.
</description>
</method>
<method name="tell" qualifiers="const">
<return type="float">
</return>
<description>
- Returns the current time of the tween.
+ Returns the current time of the tween.
</description>
</method>
</methods>
@@ -42532,7 +42627,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="1" name="key" type="String">
</argument>
<description>
- This signal is emitted when a tween ends.
+ This signal is emitted when a tween ends.
</description>
</signal>
<signal name="tween_start">
@@ -42541,7 +42636,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="1" name="key" type="String">
</argument>
<description>
- This signal is emitted when a tween starts.
+ This signal is emitted when a tween starts.
</description>
</signal>
<signal name="tween_step">
@@ -42554,7 +42649,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="3" name="value" type="Object">
</argument>
<description>
- This signal is emitted each step of the tweening.
+ This signal is emitted each step of the tweening.
</description>
</signal>
</signals>
@@ -42614,14 +42709,11 @@ A similar effect may be achieved moving this node's descendants.
</class>
<class name="UndoRedo" inherits="Object" category="Core">
<brief_description>
- Helper to manage UndoRedo in the editor or custom tools.
+ Helper to manage UndoRedo in the editor or custom tools.
</brief_description>
<description>
- Helper to maange UndoRedo in the editor or custom tools. It works by
- storing calls to functions in both 'do' an 'undo' lists.
-
- Common behavior is to create an action, then add do/undo calls to
- functions or property changes, then commiting the action.
+ Helper to maange UndoRedo in the editor or custom tools. It works by storing calls to functions in both 'do' an 'undo' lists.
+ Common behavior is to create an action, then add do/undo calls to functions or property changes, then commiting the action.
</description>
<methods>
<method name="add_do_method">
@@ -42640,7 +42732,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="6" name="arg4" type="Variant" default="NULL">
</argument>
<description>
- Add a call to a method in a given object with custom
+ Add a call to a method in a given object with custom
arguments.
</description>
</method>
@@ -42652,16 +42744,14 @@ A similar effect may be achieved moving this node's descendants.
<argument index="2" name="value" type="Variant">
</argument>
<description>
- Set a property with a custom value.
+ Set a property with a custom value.
</description>
</method>
<method name="add_do_reference">
<argument index="0" name="object" type="Object">
</argument>
<description>
- Add a 'do' reference that will be erased if the 'do'
- history is lost. This is useful mostly for new nodes
- created for the 'do' call. Do not use for resources.
+ Add a 'do' reference that will be erased if the 'do' history is lost. This is useful mostly for new nodes created for the 'do' call. Do not use for resources.
</description>
</method>
<method name="add_undo_method">
@@ -42680,9 +42770,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="6" name="arg4" type="Variant" default="NULL">
</argument>
<description>
- Add a call to an undo method in a given object with
- custom arguments. Undo calls are used to revert 'do'
- calls.
+ Add a call to an undo method in a given object with custom arguments. Undo calls are used to revert 'do' calls.
</description>
</method>
<method name="add_undo_property">
@@ -42693,29 +42781,25 @@ A similar effect may be achieved moving this node's descendants.
<argument index="2" name="value" type="Variant">
</argument>
<description>
- Undo setting of a property with a custom value.
+ Undo setting of a property with a custom value.
</description>
</method>
<method name="add_undo_reference">
<argument index="0" name="object" type="Object">
</argument>
<description>
- Add an 'undo' reference that will be erased if the
- 'undo' history is lost. This is useful mostly for
- nodes rmoved with the 'do' call (not the 'undo'
- call!).
+ Add an 'undo' reference that will be erased if the 'undo' history is lost. This is useful mostly for nodes rmoved with the 'do' call (not the 'undo' call!).
</description>
</method>
<method name="clear_history">
<description>
- Clear the undo/redo history and associated
+ Clear the undo/redo history and associated
references.
</description>
</method>
<method name="commit_action">
<description>
- Commit the action. All 'do' methods/properties are
- called/set when this function is called.
+ Commit the action. All 'do' methods/properties are called/set when this function is called.
</description>
</method>
<method name="create_action">
@@ -42724,29 +42808,22 @@ A similar effect may be achieved moving this node's descendants.
<argument index="1" name="mergeable" type="bool" default="false">
</argument>
<description>
- Create a new action. After this is called, do all
- your calls to [method add_do_method],
- [method add_undo_method], [method add_do_property]
- and [method add_undo_property].
+ Create a new action. After this is called, do all your calls to [method add_do_method], [method add_undo_method], [method add_do_property] and [method add_undo_property].
</description>
</method>
<method name="get_current_action_name" qualifiers="const">
<return type="String">
</return>
<description>
- Get the name of the current action.
+ Get the name of the current action.
</description>
</method>
<method name="get_version" qualifiers="const">
<return type="int">
</return>
<description>
- Get the version, each time a new action is commited,
- the version number of the UndoRedo is increased
- automatically.
-
- This is useful mostly to check if something changed
- from a saved version.
+ Get the version, each time a new action is commited, the version number of the UndoRedo is increased automatically.
+ This is useful mostly to check if something changed from a saved version.
</description>
</method>
</methods>
@@ -42755,10 +42832,10 @@ A similar effect may be achieved moving this node's descendants.
</class>
<class name="VBoxContainer" inherits="BoxContainer" category="Core">
<brief_description>
- Vertical box container.
+ Vertical box container.
</brief_description>
<description>
- Vertical box container. See [BoxContainer].
+ Vertical box container. See [BoxContainer].
</description>
<methods>
</methods>
@@ -42771,10 +42848,10 @@ A similar effect may be achieved moving this node's descendants.
</class>
<class name="VButtonArray" inherits="ButtonArray" category="Core">
<brief_description>
- Vertical button array.
+ Vertical button array.
</brief_description>
<description>
- Vertical button array. See [ButtonArray].
+ Vertical button array. See [ButtonArray].
</description>
<methods>
</methods>
@@ -42805,7 +42882,7 @@ A similar effect may be achieved moving this node's descendants.
</class>
<class name="VScrollBar" inherits="ScrollBar" category="Core">
<brief_description>
- Vertical version of [ScrollBar], which goes from left (min) to right (max).
+ Vertical version of [ScrollBar], which goes from left (min) to right (max).
</brief_description>
<description>
</description>
@@ -42834,10 +42911,10 @@ A similar effect may be achieved moving this node's descendants.
</class>
<class name="VSeparator" inherits="Separator" category="Core">
<brief_description>
- Vertical version of [Separator].
+ Vertical version of [Separator].
</brief_description>
<description>
- Vertical version of [Separator]. It is used to separate objects horizontally, though (but it looks vertical!).
+ Vertical version of [Separator]. It is used to separate objects horizontally, though (but it looks vertical!).
</description>
<methods>
</methods>
@@ -42852,10 +42929,10 @@ A similar effect may be achieved moving this node's descendants.
</class>
<class name="VSlider" inherits="Slider" category="Core">
<brief_description>
- Vertical slider.
+ Vertical slider.
</brief_description>
<description>
- Vertical slider. See [Slider]. This one goes from left (min) to right (max).
+ Vertical slider. See [Slider]. This one goes from left (min) to right (max).
</description>
<methods>
</methods>
@@ -42876,10 +42953,10 @@ A similar effect may be achieved moving this node's descendants.
</class>
<class name="VSplitContainer" inherits="SplitContainer" category="Core">
<brief_description>
- Vertical split container.
+ Vertical split container.
</brief_description>
<description>
- Vertical split container. See [SplitContainer]. This goes from left to right.
+ Vertical split container. See [SplitContainer]. This goes from left to right.
</description>
<methods>
</methods>
@@ -42908,10 +42985,10 @@ A similar effect may be achieved moving this node's descendants.
</class>
<class name="Vector2" category="Built-In Types">
<brief_description>
- Vector used for 2D Math.
+ Vector used for 2D Math.
</brief_description>
<description>
- 2-element structure that can be used to represent positions in 2d-space, or any other pair of numeric values.
+ 2-element structure that can be used to represent positions in 2d-space, or any other pair of numeric values.
</description>
<methods>
<method name="Vector2">
@@ -42922,7 +42999,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="1" name="y" type="float">
</argument>
<description>
- Constructs a new Vector2 from the given x and y.
+ Constructs a new Vector2 from the given x and y.
</description>
</method>
<method name="abs">
@@ -42935,8 +43012,8 @@ A similar effect may be achieved moving this node's descendants.
<return type="float">
</return>
<description>
- Returns the result of atan2 when called with the Vector's x and y as parameters (Math::atan2(x,y)).
- Be aware that it therefore returns an angle oriented clockwise with regard to the (0, 1) unit vector, and not an angle oriented counter-clockwise with regard to the (1, 0) unit vector (which would be the typical trigonometric representation of the angle when calling Math::atan2(y,x)).
+ Returns the result of atan2 when called with the Vector's x and y as parameters (Math::atan2(x,y)).
+ Be aware that it therefore returns an angle oriented clockwise with regard to the (0, 1) unit vector, and not an angle oriented counter-clockwise with regard to the (1, 0) unit vector (which would be the typical trigonometric representation of the angle when calling Math::atan2(y,x)).
</description>
</method>
<method name="angle_to">
@@ -42945,7 +43022,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="to" type="Vector2">
</argument>
<description>
- Returns the angle in radians between the two vectors.
+ Returns the angle in radians between the two vectors.
</description>
</method>
<method name="angle_to_point">
@@ -42954,7 +43031,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="to" type="Vector2">
</argument>
<description>
- Returns the angle in radians between the line connecting the two points and the x coordinate.
+ Returns the angle in radians between the line connecting the two points and the x coordinate.
</description>
</method>
<method name="cubic_interpolate">
@@ -42969,7 +43046,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="3" name="t" type="float">
</argument>
<description>
- Cubicly interpolates between this Vector and "b", using "pre_a" and "post_b" as handles, and returning the result at position "t".
+ Cubicly interpolates between this Vector and "b", using "pre_a" and "post_b" as handles, and returning the result at position "t".
</description>
</method>
<method name="distance_squared_to">
@@ -42978,7 +43055,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="to" type="Vector2">
</argument>
<description>
- Returns the squared distance to vector "b". Prefer this function over "distance_to" if you need to sort vectors or need the squared distance for some formula.
+ Returns the squared distance to vector "b". Prefer this function over "distance_to" if you need to sort vectors or need the squared distance for some formula.
</description>
</method>
<method name="distance_to">
@@ -42987,7 +43064,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="to" type="Vector2">
</argument>
<description>
- Returns the distance to vector "b".
+ Returns the distance to vector "b".
</description>
</method>
<method name="dot">
@@ -42996,42 +43073,42 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="with" type="Vector2">
</argument>
<description>
- Returns the dot product with vector "b".
+ Returns the dot product with vector "b".
</description>
</method>
<method name="floor">
<return type="Vector2">
</return>
<description>
- Remove the fractional part of x and y.
+ Remove the fractional part of x and y.
</description>
</method>
<method name="floorf">
<return type="Vector2">
</return>
<description>
- Remove the fractional part of x and y.
+ Remove the fractional part of x and y.
</description>
</method>
<method name="get_aspect">
<return type="float">
</return>
<description>
- Returns the ratio of X to Y.
+ Returns the ratio of X to Y.
</description>
</method>
<method name="length">
<return type="float">
</return>
<description>
- Returns the length of the vector.
+ Returns the length of the vector.
</description>
</method>
<method name="length_squared">
<return type="float">
</return>
<description>
- Returns the squared length of the vector. Prefer this function over "length" if you need to sort vectors or need the squared length for some formula.
+ Returns the squared length of the vector. Prefer this function over "length" if you need to sort vectors or need the squared length for some formula.
</description>
</method>
<method name="linear_interpolate">
@@ -43042,14 +43119,14 @@ A similar effect may be achieved moving this node's descendants.
<argument index="1" name="t" type="float">
</argument>
<description>
- Returns the result of the linear interpolation between this vector and "b", by amount "t".
+ Returns the result of the linear interpolation between this vector and "b", by amount "t".
</description>
</method>
<method name="normalized">
<return type="Vector2">
</return>
<description>
- Returns a normalized vector to unit length.
+ Returns a normalized vector to unit length.
</description>
</method>
<method name="reflect">
@@ -43058,7 +43135,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="vec" type="Vector2">
</argument>
<description>
- Like "slide", but reflects the Vector instead of continuing along the wall.
+ Like "slide", but reflects the Vector instead of continuing along the wall.
</description>
</method>
<method name="rotated">
@@ -43067,7 +43144,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="phi" type="float">
</argument>
<description>
- Rotates the vector by "phi" radians.
+ Rotates the vector by "phi" radians.
</description>
</method>
<method name="slide">
@@ -43076,7 +43153,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="vec" type="Vector2">
</argument>
<description>
- Slides the vector by the other vector.
+ Slides the vector by the other vector.
</description>
</method>
<method name="snapped">
@@ -43085,14 +43162,14 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="by" type="Vector2">
</argument>
<description>
- Snaps the vector to a grid with the given size.
+ Snaps the vector to a grid with the given size.
</description>
</method>
<method name="tangent">
<return type="Vector2">
</return>
<description>
- Returns a perpendicular vector.
+ Returns a perpendicular vector.
</description>
</method>
</methods>
@@ -43115,10 +43192,10 @@ A similar effect may be achieved moving this node's descendants.
</class>
<class name="Vector2Array" category="Built-In Types">
<brief_description>
- An Array of Vector2.
+ An Array of Vector2.
</brief_description>
<description>
- An Array specifically designed to hold Vector2.
+ An Array specifically designed to hold Vector2.
</description>
<methods>
<method name="Vector2Array">
@@ -43127,21 +43204,21 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="from" type="Array">
</argument>
<description>
- Construct a new [Vector2Array]. Optionally, you can pass in an Array that will be converted.
+ Construct a new [Vector2Array]. Optionally, you can pass in an Array that will be converted.
</description>
</method>
<method name="append">
<argument index="0" name="vector2" type="Vector2">
</argument>
<description>
- Append an element at the end of the array (alias of [method push_back]).
+ Append an element at the end of the array (alias of [method push_back]).
</description>
</method>
<method name="append_array">
<argument index="0" name="array" type="Vector2Array">
</argument>
<description>
- Append an [Vector2Array] at the end of this array.
+ Append an [Vector2Array] at the end of this array.
</description>
</method>
<method name="insert">
@@ -43152,33 +43229,33 @@ A similar effect may be achieved moving this node's descendants.
<argument index="1" name="vector2" type="Vector2">
</argument>
<description>
- Insert a new element at a given position in the array. The position must be valid, or at the end of the array (pos==size()).
+ Insert a new element at a given position in the array. The position must be valid, or at the end of the array (pos==size()).
</description>
</method>
<method name="invert">
<description>
- Reverse the order of the elements in the array (so first element will now be the last).
+ Reverse the order of the elements in the array (so first element will now be the last).
</description>
</method>
<method name="push_back">
<argument index="0" name="vector2" type="Vector2">
</argument>
<description>
- Insert a [Vector2] at the end.
+ Insert a [Vector2] at the end.
</description>
</method>
<method name="remove">
<argument index="0" name="idx" type="int">
</argument>
<description>
- Remove an element from the array by index.
+ Remove an element from the array by index.
</description>
</method>
<method name="resize">
<argument index="0" name="idx" type="int">
</argument>
<description>
- Set the size of the Vector2Array. If larger than the current size it will reserve some space beforehand, and if it is smaller it will cut off the array.
+ Set the size of the Vector2Array. If larger than the current size it will reserve some space beforehand, and if it is smaller it will cut off the array.
</description>
</method>
<method name="set">
@@ -43187,14 +43264,14 @@ A similar effect may be achieved moving this node's descendants.
<argument index="1" name="vector2" type="Vector2">
</argument>
<description>
- Change the [Vector2] at the given index.
+ Change the [Vector2] at the given index.
</description>
</method>
<method name="size">
<return type="int">
</return>
<description>
- Return the size of the array.
+ Return the size of the array.
</description>
</method>
</methods>
@@ -43203,10 +43280,10 @@ A similar effect may be achieved moving this node's descendants.
</class>
<class name="Vector3" category="Built-In Types">
<brief_description>
- Vector class, which performs basic 3D vector math operations.
+ Vector class, which performs basic 3D vector math operations.
</brief_description>
<description>
- Vector3 is one of the core classes of the engine, and includes several built-in helper functions to perform basic vector math operations.
+ Vector3 is one of the core classes of the engine, and includes several built-in helper functions to perform basic vector math operations.
</description>
<methods>
<method name="Vector3">
@@ -43219,21 +43296,21 @@ A similar effect may be achieved moving this node's descendants.
<argument index="2" name="z" type="float">
</argument>
<description>
- Returns a Vector3 with the given components.
+ Returns a Vector3 with the given components.
</description>
</method>
<method name="abs">
<return type="Vector3">
</return>
<description>
- Returns a new vector with all components in absolute values (e.g. positive).
+ Returns a new vector with all components in absolute values (e.g. positive).
</description>
</method>
<method name="ceil">
<return type="Vector3">
</return>
<description>
- Returns a new vector with all components rounded up.
+ Returns a new vector with all components rounded up.
</description>
</method>
<method name="cross">
@@ -43242,7 +43319,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="b" type="Vector3">
</argument>
<description>
- Return the cross product with b.
+ Return the cross product with b.
</description>
</method>
<method name="cubic_interpolate">
@@ -43257,7 +43334,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="3" name="t" type="float">
</argument>
<description>
- Perform a cubic interpolation between vectors pre_a, a, b, post_b (a is current), by the given amount (t).
+ Perform a cubic interpolation between vectors pre_a, a, b, post_b (a is current), by the given amount (t).
</description>
</method>
<method name="distance_squared_to">
@@ -43266,7 +43343,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="b" type="Vector3">
</argument>
<description>
- Return the squared distance (distance minus the last square root) to b. Prefer this function over distance_to if you need to sort vectors or need the squared distance for some formula.
+ Return the squared distance (distance minus the last square root) to b. Prefer this function over distance_to if you need to sort vectors or need the squared distance for some formula.
</description>
</method>
<method name="distance_to">
@@ -43275,7 +43352,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="b" type="Vector3">
</argument>
<description>
- Return the distance to b.
+ Return the distance to b.
</description>
</method>
<method name="dot">
@@ -43284,35 +43361,35 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="b" type="Vector3">
</argument>
<description>
- Return the dot product with b.
+ Return the dot product with b.
</description>
</method>
<method name="floor">
<return type="Vector3">
</return>
<description>
- Returns a new vector with all components rounded down.
+ Returns a new vector with all components rounded down.
</description>
</method>
<method name="inverse">
<return type="Vector3">
</return>
<description>
- Returns the inverse of the vector. This is the same as Vector3( 1.0 / v.x, 1.0 / v.y, 1.0 / v.z )
+ Returns the inverse of the vector. This is the same as Vector3( 1.0 / v.x, 1.0 / v.y, 1.0 / v.z )
</description>
</method>
<method name="length">
<return type="float">
</return>
<description>
- Return the length of the vector.
+ Return the length of the vector.
</description>
</method>
<method name="length_squared">
<return type="float">
</return>
<description>
- Return the length of the vector, squared. Prefer this function over "length" if you need to sort vectors or need the squared length for some formula.
+ Return the length of the vector, squared. Prefer this function over "length" if you need to sort vectors or need the squared length for some formula.
</description>
</method>
<method name="linear_interpolate">
@@ -43323,28 +43400,28 @@ A similar effect may be achieved moving this node's descendants.
<argument index="1" name="t" type="float">
</argument>
<description>
- Linearly interpolates the vector to a given one (b), by the given amount (t).
+ Linearly interpolates the vector to a given one (b), by the given amount (t).
</description>
</method>
<method name="max_axis">
<return type="int">
</return>
<description>
- Returns AXIS_X, AXIS_Y or AXIS_Z depending on which axis is the largest.
+ Returns AXIS_X, AXIS_Y or AXIS_Z depending on which axis is the largest.
</description>
</method>
<method name="min_axis">
<return type="int">
</return>
<description>
- Returns AXIS_X, AXIS_Y or AXIS_Z depending on which axis is the smallest.
+ Returns AXIS_X, AXIS_Y or AXIS_Z depending on which axis is the smallest.
</description>
</method>
<method name="normalized">
<return type="Vector3">
</return>
<description>
- Return a copy of the normalized vector to unit length. This is the same as v / v.length().
+ Return a copy of the normalized vector to unit length. This is the same as v / v.length().
</description>
</method>
<method name="reflect">
@@ -43353,7 +43430,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="by" type="Vector3">
</argument>
<description>
- Like "slide", but reflects the Vector instead of continuing along the wall.
+ Like "slide", but reflects the Vector instead of continuing along the wall.
</description>
</method>
<method name="rotated">
@@ -43364,7 +43441,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="1" name="phi" type="float">
</argument>
<description>
- Rotates the vector around some axis by phi radians.
+ Rotates the vector around some axis by phi radians.
</description>
</method>
<method name="slide">
@@ -43373,7 +43450,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="by" type="Vector3">
</argument>
<description>
- Slides the vector along a wall.
+ Slides the vector along a wall.
</description>
</method>
<method name="snapped">
@@ -43382,7 +43459,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="by" type="float">
</argument>
<description>
- Return a copy of the vector, snapped to the lowest neared multiple.
+ Return a copy of the vector, snapped to the lowest neared multiple.
</description>
</method>
</methods>
@@ -43411,10 +43488,10 @@ A similar effect may be achieved moving this node's descendants.
</class>
<class name="Vector3Array" category="Built-In Types">
<brief_description>
- An Array of Vector3.
+ An Array of Vector3.
</brief_description>
<description>
- An Array specifically designed to hold Vector3.
+ An Array specifically designed to hold Vector3.
</description>
<methods>
<method name="Vector3Array">
@@ -43423,21 +43500,21 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="from" type="Array">
</argument>
<description>
- Construct a new Vector3Array. Optionally, you can pass in an Array that will be converted.
+ Construct a new Vector3Array. Optionally, you can pass in an Array that will be converted.
</description>
</method>
<method name="append">
<argument index="0" name="vector3" type="Vector3">
</argument>
<description>
- Append an element at the end of the array (alias of [method push_back]).
+ Append an element at the end of the array (alias of [method push_back]).
</description>
</method>
<method name="append_array">
<argument index="0" name="array" type="Vector3Array">
</argument>
<description>
- Append an [Vector3Array] at the end of this array.
+ Append an [Vector3Array] at the end of this array.
</description>
</method>
<method name="insert">
@@ -43448,33 +43525,33 @@ A similar effect may be achieved moving this node's descendants.
<argument index="1" name="vector3" type="Vector3">
</argument>
<description>
- Insert a new element at a given position in the array. The position must be valid, or at the end of the array (pos==size()).
+ Insert a new element at a given position in the array. The position must be valid, or at the end of the array (pos==size()).
</description>
</method>
<method name="invert">
<description>
- Reverse the order of the elements in the array (so first element will now be the last).
+ Reverse the order of the elements in the array (so first element will now be the last).
</description>
</method>
<method name="push_back">
<argument index="0" name="vector3" type="Vector3">
</argument>
<description>
- Insert a Vector3 at the end.
+ Insert a Vector3 at the end.
</description>
</method>
<method name="remove">
<argument index="0" name="idx" type="int">
</argument>
<description>
- Remove an element from the array by index.
+ Remove an element from the array by index.
</description>
</method>
<method name="resize">
<argument index="0" name="idx" type="int">
</argument>
<description>
- Set the size of the Vector3Array. If larger than the current size it will reserve some space beforehand, and if it is smaller it will cut off the array.
+ Set the size of the Vector3Array. If larger than the current size it will reserve some space beforehand, and if it is smaller it will cut off the array.
</description>
</method>
<method name="set">
@@ -43483,14 +43560,14 @@ A similar effect may be achieved moving this node's descendants.
<argument index="1" name="vector3" type="Vector3">
</argument>
<description>
- Change the [Vector3] at the given index.
+ Change the [Vector3] at the given index.
</description>
</method>
<method name="size">
<return type="int">
</return>
<description>
- Return the size of the array.
+ Return the size of the array.
</description>
</method>
</methods>
@@ -43525,11 +43602,11 @@ A similar effect may be achieved moving this node's descendants.
<return type="Vector3">
</return>
<description>
- Returns the VehicleBody's velocity vector. To get the absolute speed in scalar value, get the length of the return vector in pixels/second. Example:
- [codeblock]
- # vehicle is an instance of VehicleBody
- var speed = vehicle.get_linear_velocity().length()
- [/codeblock]
+ Returns the VehicleBody's velocity vector. To get the absolute speed in scalar value, get the length of the return vector in pixels/second. Example:
+ [codeblock]
+ # vehicle is an instance of VehicleBody
+ var speed = vehicle.get_linear_velocity().length()
+ [/codeblock]
</description>
</method>
<method name="get_mass" qualifiers="const">
@@ -43868,176 +43945,176 @@ A similar effect may be achieved moving this node's descendants.
</class>
<class name="Viewport" inherits="Node" category="Core">
<brief_description>
- Creates a sub-view into the screen.
+ Creates a sub-view into the screen.
</brief_description>
<description>
- A Viewport creates a different view into the screen, or a sub-view inside another viewport. Children 2D Nodes will display on it, and children Camera 3D nodes will render on it too.
- Optionally, a viewport can have its own 2D or 3D world, so they don't share what they draw with other viewports.
- If a viewport is a child of a [Control], it will automatically take up its same rect and position, otherwise they must be set manually.
- Viewports can also choose to be audio listeners, so they generate positional audio depending on a 2D or 3D camera child of it.
- Also, viewports can be assigned to different screens in case the devices have multiple screens.
- Finally, viewports can also behave as render targets, in which case they will not be visible unless the associated texture is used to draw.
+ A Viewport creates a different view into the screen, or a sub-view inside another viewport. Children 2D Nodes will display on it, and children Camera 3D nodes will render on it too.
+ Optionally, a viewport can have its own 2D or 3D world, so they don't share what they draw with other viewports.
+ If a viewport is a child of a [Control], it will automatically take up its same rect and position, otherwise they must be set manually.
+ Viewports can also choose to be audio listeners, so they generate positional audio depending on a 2D or 3D camera child of it.
+ Also, viewports can be assigned to different screens in case the devices have multiple screens.
+ Finally, viewports can also behave as render targets, in which case they will not be visible unless the associated texture is used to draw.
</description>
<methods>
<method name="find_world" qualifiers="const">
<return type="World">
</return>
<description>
- Return the 3D world of the viewport, or if no such present, the one of the parent viewport.
+ Return the 3D world of the viewport, or if no such present, the one of the parent viewport.
</description>
</method>
<method name="find_world_2d" qualifiers="const">
<return type="World2D">
</return>
<description>
- Return the 2D world of the viewport.
+ Return the 2D world of the viewport.
</description>
</method>
<method name="get_camera" qualifiers="const">
<return type="Camera">
</return>
<description>
- Return the active 3D camera.
+ Return the active 3D camera.
</description>
</method>
<method name="get_canvas_transform" qualifiers="const">
<return type="Matrix32">
</return>
<description>
- Get the canvas transform of the viewport.
+ Get the canvas transform of the viewport.
</description>
</method>
<method name="get_final_transform" qualifiers="const">
<return type="Matrix32">
</return>
<description>
- Get the total transform of the viewport.
+ Get the total transform of the viewport.
</description>
</method>
<method name="get_global_canvas_transform" qualifiers="const">
<return type="Matrix32">
</return>
<description>
- Get the global canvas transform of the viewport.
+ Get the global canvas transform of the viewport.
</description>
</method>
<method name="get_mouse_pos" qualifiers="const">
<return type="Vector2">
</return>
<description>
- Get the mouse position, relative to the viewport.
+ Get the mouse position, relative to the viewport.
</description>
</method>
<method name="get_physics_object_picking">
<return type="bool">
</return>
<description>
- Get whether picking for all physics objects inside the viewport is enabled.
+ Get whether picking for all physics objects inside the viewport is enabled.
</description>
</method>
<method name="get_rect" qualifiers="const">
<return type="Rect2">
</return>
<description>
- Return the viewport rect. If the viewport is child of a control, it will use the same rect as the parent. Otherwise, if the rect is empty, the viewport will use all the allowed space.
+ Return the viewport rect. If the viewport is child of a control, it will use the same rect as the parent. Otherwise, if the rect is empty, the viewport will use all the allowed space.
</description>
</method>
<method name="get_render_target_clear_on_new_frame" qualifiers="const">
<return type="bool">
</return>
<description>
- Return whether automatic clearing of the render target on each frame is enabled.
+ Return whether automatic clearing of the render target on each frame is enabled.
</description>
</method>
<method name="get_render_target_filter" qualifiers="const">
<return type="bool">
</return>
<description>
- Get whether the rendered texture has filters enabled.
+ Get whether the rendered texture has filters enabled.
</description>
</method>
<method name="get_render_target_gen_mipmaps" qualifiers="const">
<return type="bool">
</return>
<description>
- Get whether the rendered texture will have mipmaps generated.
+ Get whether the rendered texture will have mipmaps generated.
</description>
</method>
<method name="get_render_target_texture" qualifiers="const">
<return type="RenderTargetTexture">
</return>
<description>
- Get the render target's texture, for use with various objects that you want to texture with the viewport.
+ Get the render target's texture, for use with various objects that you want to texture with the viewport.
</description>
</method>
<method name="get_render_target_update_mode" qualifiers="const">
<return type="int">
</return>
<description>
- Get when the render target would be updated, will be one of the [code]RENDER_TARGET_UPDATE_*[/code] constants.
+ Get when the render target would be updated, will be one of the [code]RENDER_TARGET_UPDATE_*[/code] constants.
</description>
</method>
<method name="get_render_target_vflip" qualifiers="const">
<return type="bool">
</return>
<description>
- Set whether the render target is flipped on the Y axis.
+ Set whether the render target is flipped on the Y axis.
</description>
</method>
<method name="get_screen_capture" qualifiers="const">
<return type="Image">
</return>
<description>
- Return the captured screenshot after [method queue_screen_capture]. You might need to check more than one frame untill the right image is returned.
+ Return the captured screenshot after [method queue_screen_capture]. You might need to check more than one frame untill the right image is returned.
</description>
</method>
<method name="get_size_override" qualifiers="const">
<return type="Vector2">
</return>
<description>
- Get the size override set with [method set_size_override].
+ Get the size override set with [method set_size_override].
</description>
</method>
<method name="get_viewport" qualifiers="const">
<return type="RID">
</return>
<description>
- Get the viewport RID from the visual server.
+ Get the viewport RID from the visual server.
</description>
</method>
<method name="get_visible_rect" qualifiers="const">
<return type="Rect2">
</return>
<description>
- Return the final, visible rect in global screen coordinates.
+ Return the final, visible rect in global screen coordinates.
</description>
</method>
<method name="get_world" qualifiers="const">
<return type="World">
</return>
<description>
- Return the 3D world of the viewport.
+ Return the 3D world of the viewport.
</description>
</method>
<method name="gui_get_drag_data" qualifiers="const">
<return type="Variant">
</return>
<description>
- Returs the drag data from the GUI, that was previously returned by [method Control.get_drag_data].
+ Returs the drag data from the GUI, that was previously returned by [method Control.get_drag_data].
</description>
</method>
<method name="gui_has_modal_stack" qualifiers="const">
<return type="bool">
</return>
<description>
- Returs whether there are shown modals on-screen.
+ Returs whether there are shown modals on-screen.
</description>
</method>
<method name="has_transparent_background" qualifiers="const">
<return type="bool">
</return>
<description>
- Return whether the viewport lets whatever is behind it to show.
+ Return whether the viewport lets whatever is behind it to show.
</description>
</method>
<method name="input">
@@ -44050,157 +44127,157 @@ A similar effect may be achieved moving this node's descendants.
<return type="bool">
</return>
<description>
- Returns whether the viewport sends sounds to the speakers.
+ Returns whether the viewport sends sounds to the speakers.
</description>
</method>
<method name="is_audio_listener_2d" qualifiers="const">
<return type="bool">
</return>
<description>
- Returns whether the viewport sends soundsfrom 2D emitters to the speakers.
+ Returns whether the viewport sends soundsfrom 2D emitters to the speakers.
</description>
</method>
<method name="is_input_disabled" qualifiers="const">
<return type="bool">
</return>
<description>
- Return whether input to the viewport is disabled.
+ Return whether input to the viewport is disabled.
</description>
</method>
<method name="is_set_as_render_target" qualifiers="const">
<return type="bool">
</return>
<description>
- Return whether the viewport is set as a render target by [method set_as_render_target].
+ Return whether the viewport is set as a render target by [method set_as_render_target].
</description>
</method>
<method name="is_size_override_enabled" qualifiers="const">
<return type="bool">
</return>
<description>
- Get the enabled status of the size override set with [method set_size_override].
+ Get the enabled status of the size override set with [method set_size_override].
</description>
</method>
<method name="is_size_override_stretch_enabled" qualifiers="const">
<return type="bool">
</return>
<description>
- Get the enabled status of the size strech override set with [method set_size_override_stretch].
+ Get the enabled status of the size strech override set with [method set_size_override_stretch].
</description>
</method>
<method name="is_using_own_world" qualifiers="const">
<return type="bool">
</return>
<description>
- Return whether the viewport is using a world separate from the parent viewport's world.
+ Return whether the viewport is using a world separate from the parent viewport's world.
</description>
</method>
<method name="queue_screen_capture">
<description>
- Queue a multithreaded screenshot, you can retrive it at a later frame via [method get_screen_capture].
+ Queue a multithreaded screenshot, you can retrive it at a later frame via [method get_screen_capture].
</description>
</method>
<method name="render_target_clear">
<description>
- Clear the render target manually.
+ Clear the render target manually.
</description>
</method>
<method name="set_as_audio_listener">
<argument index="0" name="enable" type="bool">
</argument>
<description>
- Makes the viewport send sounds to the speakers.
+ Makes the viewport send sounds to the speakers.
</description>
</method>
<method name="set_as_audio_listener_2d">
<argument index="0" name="enable" type="bool">
</argument>
<description>
- Makes the viewport send sounds from 2D emitters to the speakers.
+ Makes the viewport send sounds from 2D emitters to the speakers.
</description>
</method>
<method name="set_as_render_target">
<argument index="0" name="enable" type="bool">
</argument>
<description>
- Set the viewport's render target mode.
+ Set the viewport's render target mode.
</description>
</method>
<method name="set_canvas_transform">
<argument index="0" name="xform" type="Matrix32">
</argument>
<description>
- Set the canvas transform of the viewport, useful for changing the on-screen positions of all child [CanvasItem]s. This is relative to the global canvas transform of the viewport.
+ Set the canvas transform of the viewport, useful for changing the on-screen positions of all child [CanvasItem]s. This is relative to the global canvas transform of the viewport.
</description>
</method>
<method name="set_disable_input">
<argument index="0" name="disable" type="bool">
</argument>
<description>
- Set whether input to the viewport is disabled.
+ Set whether input to the viewport is disabled.
</description>
</method>
<method name="set_global_canvas_transform">
<argument index="0" name="xform" type="Matrix32">
</argument>
<description>
- Set the global canvas transform of the viewport. The canvas transform is relative to this.
+ Set the global canvas transform of the viewport. The canvas transform is relative to this.
</description>
</method>
<method name="set_physics_object_picking">
<argument index="0" name="enable" type="bool">
</argument>
<description>
- Enable/disable picking for all physics objects inside the viewport.
+ Enable/disable picking for all physics objects inside the viewport.
</description>
</method>
<method name="set_rect">
<argument index="0" name="rect" type="Rect2">
</argument>
<description>
- Set the viewport rect. If the viewport is child of a control, it will use the same rect as the parent.
+ Set the viewport rect. If the viewport is child of a control, it will use the same rect as the parent.
</description>
</method>
<method name="set_render_target_clear_on_new_frame">
<argument index="0" name="enable" type="bool">
</argument>
<description>
- Enable/disable automatic clearing of the render target on each frame. You might find it better to disable this if you are using the viewport for rarely updated textures. To clear manually, check [method render_target_clear]
+ Enable/disable automatic clearing of the render target on each frame. You might find it better to disable this if you are using the viewport for rarely updated textures. To clear manually, check [method render_target_clear]
</description>
</method>
<method name="set_render_target_filter">
<argument index="0" name="enable" type="bool">
</argument>
<description>
- Set whether the rendered texture should have filters enabled. Disable if you want the texture's pixels be visible.
+ Set whether the rendered texture should have filters enabled. Disable if you want the texture's pixels be visible.
</description>
</method>
<method name="set_render_target_gen_mipmaps">
<argument index="0" name="enable" type="bool">
</argument>
<description>
- Set whether the rendered texture should have mipmaps generated. Mipmaps allow the texture to have better antialiasing from far away.
+ Set whether the rendered texture should have mipmaps generated. Mipmaps allow the texture to have better antialiasing from far away.
</description>
</method>
<method name="set_render_target_to_screen_rect">
<argument index="0" name="rect" type="Rect2">
</argument>
<description>
- Map a part of the screen to the render target directly.
+ Map a part of the screen to the render target directly.
</description>
</method>
<method name="set_render_target_update_mode">
<argument index="0" name="mode" type="int">
</argument>
<description>
- Set when the render target should be updated, has to be one of the [code]RENDER_TARGET_UPDATE_*[/code] constants.
+ Set when the render target should be updated, has to be one of the [code]RENDER_TARGET_UPDATE_*[/code] constants.
</description>
</method>
<method name="set_render_target_vflip">
<argument index="0" name="enable" type="bool">
</argument>
<description>
- Set whether the render target should be flipped on the Y axis.
+ Set whether the render target should be flipped on the Y axis.
</description>
</method>
<method name="set_size_override">
@@ -44211,35 +44288,35 @@ A similar effect may be achieved moving this node's descendants.
<argument index="2" name="margin" type="Vector2" default="Vector2(0,0)">
</argument>
<description>
- Set the size of the viewport. If the enable parameter is true, it would use the override, otherwise it would use the default size. If the size parameter is equal to [code](-1, -1)[/code], it won't update the size.
+ Set the size of the viewport. If the enable parameter is true, it would use the override, otherwise it would use the default size. If the size parameter is equal to [code](-1, -1)[/code], it won't update the size.
</description>
</method>
<method name="set_size_override_stretch">
<argument index="0" name="enabled" type="bool">
</argument>
<description>
- Set whether the size override affects stretch as well.
+ Set whether the size override affects stretch as well.
</description>
</method>
<method name="set_transparent_background">
<argument index="0" name="enable" type="bool">
</argument>
<description>
- If this viewport is a child of another viewport, keep the previously drawn background visible.
+ If this viewport is a child of another viewport, keep the previously drawn background visible.
</description>
</method>
<method name="set_use_own_world">
<argument index="0" name="enable" type="bool">
</argument>
<description>
- Make the viewport use a world separate from the parent viewport's world.
+ Make the viewport use a world separate from the parent viewport's world.
</description>
</method>
<method name="set_world">
<argument index="0" name="world" type="World">
</argument>
<description>
- Change the 3D world of the viewport.
+ Change the 3D world of the viewport.
</description>
</method>
<method name="unhandled_input">
@@ -44250,21 +44327,21 @@ A similar effect may be achieved moving this node's descendants.
</method>
<method name="update_worlds">
<description>
- Force update of the 2D and 3D worlds.
+ Force update of the 2D and 3D worlds.
</description>
</method>
<method name="warp_mouse">
<argument index="0" name="to_pos" type="Vector2">
</argument>
<description>
- Wrap the mouse to a position, relative to the viewport.
+ Wrap the mouse to a position, relative to the viewport.
</description>
</method>
</methods>
<signals>
<signal name="size_changed">
<description>
- Emitted when the size of the viewport is changed, whether by [method set_size_override], resize of window, or some other means.
+ Emitted when the size of the viewport is changed, whether by [method set_size_override], resize of window, or some other means.
</description>
</signal>
</signals>
@@ -44285,66 +44362,66 @@ A similar effect may be achieved moving this node's descendants.
</class>
<class name="ViewportSprite" inherits="Node2D" category="Core">
<brief_description>
- Displays a viewport as a sprite.
+ Displays a viewport as a sprite.
</brief_description>
<description>
- Used to display a [Viewport] node at some position in the world, without having to mess with [RenderTargetTexture]s.
+ Used to display a [Viewport] node at some position in the world, without having to mess with [RenderTargetTexture]s.
</description>
<methods>
<method name="get_modulate" qualifiers="const">
<return type="Color">
</return>
<description>
- Get color modulation for the texture. All texture pixels are multiplied by this color.
+ Get color modulation for the texture. All texture pixels are multiplied by this color.
</description>
</method>
<method name="get_offset" qualifiers="const">
<return type="Vector2">
</return>
<description>
- get the offset to the origin of the texture.
+ get the offset to the origin of the texture.
</description>
</method>
<method name="get_viewport_path" qualifiers="const">
<return type="NodePath">
</return>
<description>
- Return the path to the shown [Viewport] node.
+ Return the path to the shown [Viewport] node.
</description>
</method>
<method name="is_centered" qualifiers="const">
<return type="bool">
</return>
<description>
- Return whether the viewport's texture is centered on the origin.
+ Return whether the viewport's texture is centered on the origin.
</description>
</method>
<method name="set_centered">
<argument index="0" name="centered" type="bool">
</argument>
<description>
- Set whether the viewport's texture should be centered on the origin.
+ Set whether the viewport's texture should be centered on the origin.
</description>
</method>
<method name="set_modulate">
<argument index="0" name="modulate" type="Color">
</argument>
<description>
- Set color modulation for the texture. All texture pixels are multiplied by this color. Color may contain rgb values above 1 to achieve a highlight effect.
+ Set color modulation for the texture. All texture pixels are multiplied by this color. Color may contain rgb values above 1 to achieve a highlight effect.
</description>
</method>
<method name="set_offset">
<argument index="0" name="offset" type="Vector2">
</argument>
<description>
- Set the offset to the origin of the texture.
+ Set the offset to the origin of the texture.
</description>
</method>
<method name="set_viewport_path">
<argument index="0" name="path" type="NodePath">
</argument>
<description>
- Set the path to the shown [Viewport] node.
+ Set the path to the shown [Viewport] node.
</description>
</method>
</methods>
@@ -44353,10 +44430,10 @@ A similar effect may be achieved moving this node's descendants.
</class>
<class name="VisibilityEnabler" inherits="VisibilityNotifier" category="Core">
<brief_description>
- Enable certain nodes only when visible.
+ Enable certain nodes only when visible.
</brief_description>
<description>
- The VisibilityEnabler will disable [RigidBody] and [AnimationPlayer] nodes when they are not visible. It will only affect other nodes within the same scene as the VisibilityEnabler itself.
+ The VisibilityEnabler will disable [RigidBody] and [AnimationPlayer] nodes when they are not visible. It will only affect other nodes within the same scene as the VisibilityEnabler itself.
</description>
<methods>
<method name="is_enabler_enabled" qualifiers="const">
@@ -44365,7 +44442,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="enabler" type="int">
</argument>
<description>
- Returns whether the specified enabler was set to true or not.
+ Returns whether the specified enabler was set to true or not.
</description>
</method>
<method name="set_enabler">
@@ -44374,7 +44451,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="1" name="enabled" type="bool">
</argument>
<description>
- Set an enabler to true for all nodes of its type to be disabled when the VisibilityEnabler is not in view. See the constants for enablers and what they affect.
+ Set an enabler to true for all nodes of its type to be disabled when the VisibilityEnabler is not in view. See the constants for enablers and what they affect.
</description>
</method>
</methods>
@@ -44391,10 +44468,10 @@ A similar effect may be achieved moving this node's descendants.
</class>
<class name="VisibilityEnabler2D" inherits="VisibilityNotifier2D" category="Core">
<brief_description>
- Enable certain nodes only when visible.
+ Enable certain nodes only when visible.
</brief_description>
<description>
- The VisibilityEnabler2D will disable [RigidBody2D], [AnimationPlayer], and other nodes when they are not visible. It will only affect other nodes within the same scene as the VisibilityEnabler2D itself.
+ The VisibilityEnabler2D will disable [RigidBody2D], [AnimationPlayer], and other nodes when they are not visible. It will only affect other nodes within the same scene as the VisibilityEnabler2D itself.
</description>
<methods>
<method name="is_enabler_enabled" qualifiers="const">
@@ -44403,7 +44480,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="enabler" type="int">
</argument>
<description>
- Returns whether the specified enabler was set to true or not.
+ Returns whether the specified enabler was set to true or not.
</description>
</method>
<method name="set_enabler">
@@ -44412,7 +44489,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="1" name="enabled" type="bool">
</argument>
<description>
- Set an enabler to true for all nodes of its type to be disabled when the VisibilityEnabler2D is not in view. See the constants for enablers and what they affect.
+ Set an enabler to true for all nodes of its type to be disabled when the VisibilityEnabler2D is not in view. See the constants for enablers and what they affect.
</description>
</method>
</methods>
@@ -44440,31 +44517,31 @@ A similar effect may be achieved moving this node's descendants.
</class>
<class name="VisibilityNotifier" inherits="Spatial" category="Core">
<brief_description>
- Detect when the node is visible on screen.
+ Detect when the node is visible on screen.
</brief_description>
<description>
- The VisibilityNotifier is used to notify when its bounding box enters the screen, is visible on the screen, or when it exits the screen.
+ The VisibilityNotifier is used to notify when its bounding box enters the screen, is visible on the screen, or when it exits the screen.
</description>
<methods>
<method name="get_aabb" qualifiers="const">
<return type="AABB">
</return>
<description>
- Return the visibility bounding box of the VisibilityNotifier.
+ Return the visibility bounding box of the VisibilityNotifier.
</description>
</method>
<method name="is_on_screen" qualifiers="const">
<return type="bool">
</return>
<description>
- Return true if any part of the bounding box is on the screen.
+ Return true if any part of the bounding box is on the screen.
</description>
</method>
<method name="set_aabb">
<argument index="0" name="rect" type="AABB">
</argument>
<description>
- Set the visibility bounding box of the VisibilityNotifier.
+ Set the visibility bounding box of the VisibilityNotifier.
</description>
</method>
</methods>
@@ -44473,24 +44550,24 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="camera" type="Object">
</argument>
<description>
- Emitted when the VisibilityNotifier enters a [Camera]'s view.
+ Emitted when the VisibilityNotifier enters a [Camera]'s view.
</description>
</signal>
<signal name="enter_screen">
<description>
- Emitted when the VisibilityNotifier enters the screen.
+ Emitted when the VisibilityNotifier enters the screen.
</description>
</signal>
<signal name="exit_camera">
<argument index="0" name="camera" type="Object">
</argument>
<description>
- Emitted when the VisibilityNotifier exits a [Camera]'s view.
+ Emitted when the VisibilityNotifier exits a [Camera]'s view.
</description>
</signal>
<signal name="exit_screen">
<description>
- Emitted when the VisibilityNotifier exits the screen.
+ Emitted when the VisibilityNotifier exits the screen.
</description>
</signal>
</signals>
@@ -44499,57 +44576,57 @@ A similar effect may be achieved moving this node's descendants.
</class>
<class name="VisibilityNotifier2D" inherits="Node2D" category="Core">
<brief_description>
- Detect when the node is visible on screen.
+ Detect when the node is visible on screen.
</brief_description>
<description>
- The VisibilityNotifier2D is used to notify when its bounding rectangle enters the screen, is visible on the screen, or when it exits the screen.
+ The VisibilityNotifier2D is used to notify when its bounding rectangle enters the screen, is visible on the screen, or when it exits the screen.
</description>
<methods>
<method name="get_rect" qualifiers="const">
<return type="Rect2">
</return>
<description>
- Return the visibility bounding rectangle of the VisibilityNotifier2D.
+ Return the visibility bounding rectangle of the VisibilityNotifier2D.
</description>
</method>
<method name="is_on_screen" qualifiers="const">
<return type="bool">
</return>
<description>
- Return true if any part of the bounding rectangle is on the screen.
+ Return true if any part of the bounding rectangle is on the screen.
</description>
</method>
<method name="set_rect">
<argument index="0" name="rect" type="Rect2">
</argument>
<description>
- Set the visibility bounding rectangle of the VisibilityNotifier2D.
+ Set the visibility bounding rectangle of the VisibilityNotifier2D.
</description>
</method>
</methods>
<signals>
<signal name="enter_screen">
<description>
- Emitted when the VisibilityNotifier2D enters the screen.
+ Emitted when the VisibilityNotifier2D enters the screen.
</description>
</signal>
<signal name="enter_viewport">
<argument index="0" name="viewport" type="Object">
</argument>
<description>
- Emitted when the VisibilityNotifier2D enters a [Viewport].
+ Emitted when the VisibilityNotifier2D enters a [Viewport].
</description>
</signal>
<signal name="exit_screen">
<description>
- Emitted when the VisibilityNotifier2D exits the screen.
+ Emitted when the VisibilityNotifier2D exits the screen.
</description>
</signal>
<signal name="exit_viewport">
<argument index="0" name="viewport" type="Object">
</argument>
<description>
- Emitted when the VisibilityNotifier2D exits a [Viewport].
+ Emitted when the VisibilityNotifier2D exits a [Viewport].
</description>
</signal>
</signals>
@@ -44586,11 +44663,11 @@ A similar effect may be achieved moving this node's descendants.
</class>
<class name="VisualServer" inherits="Object" category="Core">
<brief_description>
- Server for anything visible.
+ Server for anything visible.
</brief_description>
<description>
- Server for anything visible. The visual server is the API backend for everything visible. The whole scene system mounts on it to display.
- The visual server is completely opaque, the internals are entirely implementation specific and cannot be accessed.
+ Server for anything visible. The visual server is the API backend for everything visible. The whole scene system mounts on it to display.
+ The visual server is completely opaque, the internals are entirely implementation specific and cannot be accessed.
</description>
<methods>
<method name="black_bars_set_images">
@@ -46221,17 +46298,17 @@ A similar effect may be achieved moving this node's descendants.
</class>
<class name="WeakRef" inherits="Reference" category="Core">
<brief_description>
- Holds an [Object], but does not contribute to the reference count if the object is a reference.
+ Holds an [Object], but does not contribute to the reference count if the object is a reference.
</brief_description>
<description>
- A weakref can hold a [Reference], without contributing to the reference counter. A weakref can be created from an [Object] using [method @GDScript.weakref]. If this object is not a reference, weakref still works, however, it does not have any effect on the object. Weakrefs are useful in cases where multiple classes have variables that refer to eachother. Without weakrefs, using these classes could lead to memory leaks, since both references keep eachother from being released. Making part of the variables a weakref can prevent this cyclic dependency, and allows the references to be released.
+ A weakref can hold a [Reference], without contributing to the reference counter. A weakref can be created from an [Object] using [method @GDScript.weakref]. If this object is not a reference, weakref still works, however, it does not have any effect on the object. Weakrefs are useful in cases where multiple classes have variables that refer to eachother. Without weakrefs, using these classes could lead to memory leaks, since both references keep eachother from being released. Making part of the variables a weakref can prevent this cyclic dependency, and allows the references to be released.
</description>
<methods>
<method name="get_ref" qualifiers="const">
<return type="Object">
</return>
<description>
- Returns the [Object] this weakref is referring to.
+ Returns the [Object] this weakref is referring to.
</description>
</method>
</methods>
@@ -46240,31 +46317,31 @@ A similar effect may be achieved moving this node's descendants.
</class>
<class name="WindowDialog" inherits="Popup" category="Core">
<brief_description>
- Base class for window dialogs.
+ Base class for window dialogs.
</brief_description>
<description>
- Windowdialog is the base class for all window-based dialogs. It's a by-default toplevel [Control] that draws a window decoration and allows motion and resizing.
+ Windowdialog is the base class for all window-based dialogs. It's a by-default toplevel [Control] that draws a window decoration and allows motion and resizing.
</description>
<methods>
<method name="get_close_button">
<return type="TextureButton">
</return>
<description>
- Return the close [TextureButton].
+ Return the close [TextureButton].
</description>
</method>
<method name="get_title" qualifiers="const">
<return type="String">
</return>
<description>
- Return the title of the window.
+ Return the title of the window.
</description>
</method>
<method name="set_title">
<argument index="0" name="title" type="String">
</argument>
<description>
- Set the title of the window.
+ Set the title of the window.
</description>
</method>
</methods>
@@ -46293,10 +46370,10 @@ A similar effect may be achieved moving this node's descendants.
</class>
<class name="World" inherits="Resource" category="Core">
<brief_description>
- Class that has everything pertaining to a world.
+ Class that has everything pertaining to a world.
</brief_description>
<description>
- Class that has everything pertaining to a world. A physics space, a visual scenario and a sound space. Spatial nodes register their resources into the current world.
+ Class that has everything pertaining to a world. A physics space, a visual scenario and a sound space. Spatial nodes register their resources into the current world.
</description>
<methods>
<method name="get_direct_space_state">
@@ -46341,10 +46418,10 @@ A similar effect may be achieved moving this node's descendants.
</class>
<class name="World2D" inherits="Resource" category="Core">
<brief_description>
- Class that has everything pertaining to a 2D world.
+ Class that has everything pertaining to a 2D world.
</brief_description>
<description>
- Class that has everything pertaining to a 2D world. A physics space, a visual scenario and a sound space. 2D nodes register their resources into the current 2D world.
+ Class that has everything pertaining to a 2D world. A physics space, a visual scenario and a sound space. 2D nodes register their resources into the current 2D world.
</description>
<methods>
<method name="get_canvas">
@@ -46539,24 +46616,24 @@ A similar effect may be achieved moving this node's descendants.
</class>
<class name="YSort" inherits="Node2D" category="Core">
<brief_description>
- Sort all child nodes based on their Y positions.
+ Sort all child nodes based on their Y positions.
</brief_description>
<description>
- Sort all child nodes based on their Y positions. The child node must inherit from [CanvasItem] for it to be sorted. Nodes that have a higher Y position will be drawn later, so they will appear on top of nodes that have a lower Y position.
+ Sort all child nodes based on their Y positions. The child node must inherit from [CanvasItem] for it to be sorted. Nodes that have a higher Y position will be drawn later, so they will appear on top of nodes that have a lower Y position.
</description>
<methods>
<method name="is_sort_enabled" qualifiers="const">
<return type="bool">
</return>
<description>
- Returns true if the children nodes are being sorted.
+ Returns true if the children nodes are being sorted.
</description>
</method>
<method name="set_sort_enabled">
<argument index="0" name="enabled" type="bool">
</argument>
<description>
- Set whether the children nodes are sorted or not. (default true)
+ Set whether the children nodes are sorted or not. (default true)
</description>
</method>
</methods>
@@ -46565,10 +46642,10 @@ A similar effect may be achieved moving this node's descendants.
</class>
<class name="bool" category="Built-In Types">
<brief_description>
- Boolean built-in type
+ Boolean built-in type
</brief_description>
<description>
- Boolean built-in type.
+ Boolean built-in type.
</description>
<methods>
<method name="bool">
@@ -46577,7 +46654,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="from" type="int">
</argument>
<description>
- Cast an [int] value to a boolean value, this method will return true if called with an integer value different to 0 and false in other case.
+ Cast an [int] value to a boolean value, this method will return true if called with an integer value different to 0 and false in other case.
</description>
</method>
<method name="bool">
@@ -46586,7 +46663,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="from" type="float">
</argument>
<description>
- Cast a [float] value to a boolean value, this method will return true if called with a floating point value different to 0 and false in other case.
+ Cast a [float] value to a boolean value, this method will return true if called with a floating point value different to 0 and false in other case.
</description>
</method>
<method name="bool">
@@ -46595,7 +46672,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="from" type="String">
</argument>
<description>
- Cast a [String] value to a boolean value, this method will return true if called with a non empty string and false in other case. Examples: [code]bool('False')[/code] returns true, [code]bool('')[/code]. returns false
+ Cast a [String] value to a boolean value, this method will return true if called with a non empty string and false in other case. Examples: [code]bool('False')[/code] returns true, [code]bool('')[/code]. returns false
</description>
</method>
</methods>
@@ -46604,10 +46681,10 @@ A similar effect may be achieved moving this node's descendants.
</class>
<class name="float" category="Built-In Types">
<brief_description>
- Float built-in type
+ Float built-in type
</brief_description>
<description>
- Float built-in type.
+ Float built-in type.
</description>
<methods>
<method name="float">
@@ -46616,7 +46693,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="from" type="bool">
</argument>
<description>
- Cast a [bool] value to a floating point value, [code]float(true)[/code] will be equals to 1.0 and [code]float(false)[/code] will be equals to 0.0.
+ Cast a [bool] value to a floating point value, [code]float(true)[/code] will be equals to 1.0 and [code]float(false)[/code] will be equals to 0.0.
</description>
</method>
<method name="float">
@@ -46625,7 +46702,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="from" type="int">
</argument>
<description>
- Cast an [int] value to a floating point value, [code]float(1)[/code] will be equals to 1.0.
+ Cast an [int] value to a floating point value, [code]float(1)[/code] will be equals to 1.0.
</description>
</method>
<method name="float">
@@ -46634,7 +46711,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="from" type="String">
</argument>
<description>
- Cast a [String] value to a floating point value. This method accepts float value strings like [code] '1.23' [/code] and exponential notation strings for its parameter so calling [code] float('1e3') [/code] will return 1000.0 and calling [code] float('1e-3') [/code] will return -0.001.
+ Cast a [String] value to a floating point value. This method accepts float value strings like [code] '1.23' [/code] and exponential notation strings for its parameter so calling [code] float('1e3') [/code] will return 1000.0 and calling [code] float('1e-3') [/code] will return -0.001.
</description>
</method>
</methods>
@@ -46643,10 +46720,10 @@ A similar effect may be achieved moving this node's descendants.
</class>
<class name="int" category="Built-In Types">
<brief_description>
- Integer built-in type.
+ Integer built-in type.
</brief_description>
<description>
- Integer built-in type.
+ Integer built-in type.
</description>
<methods>
<method name="int">
@@ -46655,7 +46732,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="from" type="bool">
</argument>
<description>
- Cast a [bool] value to an integer value, [code]int(true)[/code] will be equals to 1 and [code]int(false)[/code] will be equals to 0.
+ Cast a [bool] value to an integer value, [code]int(true)[/code] will be equals to 1 and [code]int(false)[/code] will be equals to 0.
</description>
</method>
<method name="int">
@@ -46664,7 +46741,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="from" type="float">
</argument>
<description>
- Cast a float value to an integer value, this method simply removes the number fractions, so for example [code]int(2.7)[/code] will be equals to 2, [code]int(.1)[/code] will be equals to 0 and [code]int(-2.7)[/code] will be equals to -2.
+ Cast a float value to an integer value, this method simply removes the number fractions, so for example [code]int(2.7)[/code] will be equals to 2, [code]int(.1)[/code] will be equals to 0 and [code]int(-2.7)[/code] will be equals to -2.
</description>
</method>
<method name="int">
@@ -46673,7 +46750,7 @@ A similar effect may be achieved moving this node's descendants.
<argument index="0" name="from" type="String">
</argument>
<description>
- Cast a [String] value to an integer value, this method is an integer parser from a string, so calling this method with an invalid integer string will return 0, a valid string will be something like [code]'1.7'[/code]. This method will ignore all non-number characters, so calling [code]int('1e3')[/code] will return 13.
+ Cast a [String] value to an integer value, this method is an integer parser from a string, so calling this method with an invalid integer string will return 0, a valid string will be something like [code]'1.7'[/code]. This method will ignore all non-number characters, so calling [code]int('1e3')[/code] will return 13.
</description>
</method>
</methods>
diff --git a/drivers/builtin_openssl2/openssl/opensslconf.h b/drivers/builtin_openssl2/openssl/opensslconf.h
index 25429e94d6..c86bb60b94 100644
--- a/drivers/builtin_openssl2/openssl/opensslconf.h
+++ b/drivers/builtin_openssl2/openssl/opensslconf.h
@@ -213,8 +213,13 @@ extern "C" {
#ifdef OPENSSL_USE_64_BITS
-#define SIXTY_FOUR_BIT_LONG
-#undef SIXTY_FOUR_BIT
+# ifdef _WIN32
+# undef SIXTY_FOUR_BIT_LONG
+# define SIXTY_FOUR_BIT
+# else
+# define SIXTY_FOUR_BIT_LONG
+# undef SIXTY_FOUR_BIT
+# endif
#undef THIRTY_TWO_BIT
#else
diff --git a/drivers/webpold/SCsub b/drivers/webpold/SCsub
deleted file mode 100644
index 5596edbe09..0000000000
--- a/drivers/webpold/SCsub
+++ /dev/null
@@ -1,63 +0,0 @@
-Import('env')
-
-
-webp_sources = [
- "webp/mux/muxedit.c",
- "webp/mux/muxread.c",
- "webp/mux/muxinternal.c",
- "webp/mux/demux.c",
- "webp/enc/tree.c",
- "webp/enc/analysis.c",
- "webp/enc/backward_references.c",
- "webp/enc/alpha.c",
- "webp/enc/picture.c",
- "webp/enc/frame.c",
- "webp/enc/webpenc.c",
- "webp/enc/cost.c",
- "webp/enc/filter.c",
- "webp/enc/vp8l.c",
- "webp/enc/quant.c",
- "webp/enc/histogram.c",
- "webp/enc/syntax.c",
- "webp/enc/config.c",
- "webp/enc/layer.c",
- "webp/enc/iterator.c",
- "webp/dsp/dec_sse2.c",
- "webp/dsp/upsampling_sse2.c",
- "webp/dsp/dec_neon.c",
- "webp/dsp/enc.c",
- "webp/dsp/enc_sse2.c",
- "webp/dsp/upsampling.c",
- "webp/dsp/lossless.c",
- "webp/dsp/cpu.c",
- "webp/dsp/dec.c",
- "webp/dsp/yuv.c",
- "webp/utils/bit_reader.c",
- "webp/utils/filters.c",
- "webp/utils/bit_writer.c",
- "webp/utils/thread.c",
- "webp/utils/quant_levels.c",
- "webp/utils/color_cache.c",
- "webp/utils/rescaler.c",
- "webp/utils/utils.c",
- "webp/utils/huffman.c",
- "webp/utils/huffman_encode.c",
- "webp/dec/tree.c",
- "webp/dec/alpha.c",
- "webp/dec/frame.c",
- "webp/dec/vp8l.c",
- "webp/dec/vp8.c",
- "webp/dec/quant.c",
- "webp/dec/webp.c",
- "webp/dec/buffer.c",
- "webp/dec/io.c",
- "webp/dec/layer.c",
- "webp/dec/idec.c",
- "webp/image_loader_webp.cpp"
-]
-
-env.drivers_sources+=webp_sources
-
-#env.add_source_files(env.drivers_sources, webp_sources)
-
-Export('env')
diff --git a/drivers/webpold/dec/alpha.c b/drivers/webpold/dec/alpha.c
deleted file mode 100644
index d1095fa555..0000000000
--- a/drivers/webpold/dec/alpha.c
+++ /dev/null
@@ -1,140 +0,0 @@
-// Copyright 2011 Google Inc. All Rights Reserved.
-//
-// This code is licensed under the same terms as WebM:
-// Software License Agreement: http://www.webmproject.org/license/software/
-// Additional IP Rights Grant: http://www.webmproject.org/license/additional/
-// -----------------------------------------------------------------------------
-//
-// Alpha-plane decompression.
-//
-// Author: Skal (pascal.massimino@gmail.com)
-
-#include <stdlib.h>
-#include "./vp8i.h"
-#include "./vp8li.h"
-#include "../utils/filters.h"
-#include "../utils/quant_levels.h"
-#include "../format_constants.h"
-
-#if defined(__cplusplus) || defined(c_plusplus)
-extern "C" {
-#endif
-
-// TODO(skal): move to dsp/ ?
-static void CopyPlane(const uint8_t* src, int src_stride,
- uint8_t* dst, int dst_stride, int width, int height) {
- while (height-- > 0) {
- memcpy(dst, src, width);
- src += src_stride;
- dst += dst_stride;
- }
-}
-
-//------------------------------------------------------------------------------
-// Decodes the compressed data 'data' of size 'data_size' into the 'output'.
-// The 'output' buffer should be pre-allocated and must be of the same
-// dimension 'height'x'stride', as that of the image.
-//
-// Returns 1 on successfully decoding the compressed alpha and
-// 0 if either:
-// error in bit-stream header (invalid compression mode or filter), or
-// error returned by appropriate compression method.
-
-static int DecodeAlpha(const uint8_t* data, size_t data_size,
- int width, int height, int stride, uint8_t* output) {
- uint8_t* decoded_data = NULL;
- const size_t decoded_size = height * width;
- uint8_t* unfiltered_data = NULL;
- WEBP_FILTER_TYPE filter;
- int pre_processing;
- int rsrv;
- int ok = 0;
- int method;
-
- assert(width > 0 && height > 0 && stride >= width);
- assert(data != NULL && output != NULL);
-
- if (data_size <= ALPHA_HEADER_LEN) {
- return 0;
- }
-
- method = (data[0] >> 0) & 0x03;
- filter = (data[0] >> 2) & 0x03;
- pre_processing = (data[0] >> 4) & 0x03;
- rsrv = (data[0] >> 6) & 0x03;
- if (method < ALPHA_NO_COMPRESSION ||
- method > ALPHA_LOSSLESS_COMPRESSION ||
- filter >= WEBP_FILTER_LAST ||
- pre_processing > ALPHA_PREPROCESSED_LEVELS ||
- rsrv != 0) {
- return 0;
- }
-
- if (method == ALPHA_NO_COMPRESSION) {
- ok = (data_size >= decoded_size);
- decoded_data = (uint8_t*)data + ALPHA_HEADER_LEN;
- } else {
- decoded_data = (uint8_t*)malloc(decoded_size);
- if (decoded_data == NULL) return 0;
- ok = VP8LDecodeAlphaImageStream(width, height,
- data + ALPHA_HEADER_LEN,
- data_size - ALPHA_HEADER_LEN,
- decoded_data);
- }
-
- if (ok) {
- WebPFilterFunc unfilter_func = WebPUnfilters[filter];
- if (unfilter_func != NULL) {
- unfiltered_data = (uint8_t*)malloc(decoded_size);
- if (unfiltered_data == NULL) {
- ok = 0;
- goto Error;
- }
- // TODO(vikas): Implement on-the-fly decoding & filter mechanism to decode
- // and apply filter per image-row.
- unfilter_func(decoded_data, width, height, 1, width, unfiltered_data);
- // Construct raw_data (height x stride) from alpha data (height x width).
- CopyPlane(unfiltered_data, width, output, stride, width, height);
- free(unfiltered_data);
- } else {
- // Construct raw_data (height x stride) from alpha data (height x width).
- CopyPlane(decoded_data, width, output, stride, width, height);
- }
- if (pre_processing == ALPHA_PREPROCESSED_LEVELS) {
- ok = DequantizeLevels(decoded_data, width, height);
- }
- }
-
- Error:
- if (method != ALPHA_NO_COMPRESSION) {
- free(decoded_data);
- }
- return ok;
-}
-
-//------------------------------------------------------------------------------
-
-const uint8_t* VP8DecompressAlphaRows(VP8Decoder* const dec,
- int row, int num_rows) {
- const int stride = dec->pic_hdr_.width_;
-
- if (row < 0 || num_rows < 0 || row + num_rows > dec->pic_hdr_.height_) {
- return NULL; // sanity check.
- }
-
- if (row == 0) {
- // Decode everything during the first call.
- if (!DecodeAlpha(dec->alpha_data_, (size_t)dec->alpha_data_size_,
- dec->pic_hdr_.width_, dec->pic_hdr_.height_, stride,
- dec->alpha_plane_)) {
- return NULL; // Error.
- }
- }
-
- // Return a pointer to the current decoded row.
- return dec->alpha_plane_ + row * stride;
-}
-
-#if defined(__cplusplus) || defined(c_plusplus)
-} // extern "C"
-#endif
diff --git a/drivers/webpold/dec/buffer.c b/drivers/webpold/dec/buffer.c
deleted file mode 100644
index c159f6f248..0000000000
--- a/drivers/webpold/dec/buffer.c
+++ /dev/null
@@ -1,215 +0,0 @@
-// Copyright 2011 Google Inc. All Rights Reserved.
-//
-// This code is licensed under the same terms as WebM:
-// Software License Agreement: http://www.webmproject.org/license/software/
-// Additional IP Rights Grant: http://www.webmproject.org/license/additional/
-// -----------------------------------------------------------------------------
-//
-// Everything about WebPDecBuffer
-//
-// Author: Skal (pascal.massimino@gmail.com)
-
-#include <stdlib.h>
-
-#include "./vp8i.h"
-#include "./webpi.h"
-#include "../utils/utils.h"
-
-#if defined(__cplusplus) || defined(c_plusplus)
-extern "C" {
-#endif
-
-//------------------------------------------------------------------------------
-// WebPDecBuffer
-
-// Number of bytes per pixel for the different color-spaces.
-static const int kModeBpp[MODE_LAST] = {
- 3, 4, 3, 4, 4, 2, 2,
- 4, 4, 4, 2, // pre-multiplied modes
- 1, 1 };
-
-// Check that webp_csp_mode is within the bounds of WEBP_CSP_MODE.
-// Convert to an integer to handle both the unsigned/signed enum cases
-// without the need for casting to remove type limit warnings.
-static int IsValidColorspace(int webp_csp_mode) {
- return (webp_csp_mode >= MODE_RGB && webp_csp_mode < MODE_LAST);
-}
-
-static VP8StatusCode CheckDecBuffer(const WebPDecBuffer* const buffer) {
- int ok = 1;
- const WEBP_CSP_MODE mode = buffer->colorspace;
- const int width = buffer->width;
- const int height = buffer->height;
- if (!IsValidColorspace(mode)) {
- ok = 0;
- } else if (!WebPIsRGBMode(mode)) { // YUV checks
- const WebPYUVABuffer* const buf = &buffer->u.YUVA;
- const uint64_t y_size = (uint64_t)buf->y_stride * height;
- const uint64_t u_size = (uint64_t)buf->u_stride * ((height + 1) / 2);
- const uint64_t v_size = (uint64_t)buf->v_stride * ((height + 1) / 2);
- const uint64_t a_size = (uint64_t)buf->a_stride * height;
- ok &= (y_size <= buf->y_size);
- ok &= (u_size <= buf->u_size);
- ok &= (v_size <= buf->v_size);
- ok &= (buf->y_stride >= width);
- ok &= (buf->u_stride >= (width + 1) / 2);
- ok &= (buf->v_stride >= (width + 1) / 2);
- ok &= (buf->y != NULL);
- ok &= (buf->u != NULL);
- ok &= (buf->v != NULL);
- if (mode == MODE_YUVA) {
- ok &= (buf->a_stride >= width);
- ok &= (a_size <= buf->a_size);
- ok &= (buf->a != NULL);
- }
- } else { // RGB checks
- const WebPRGBABuffer* const buf = &buffer->u.RGBA;
- const uint64_t size = (uint64_t)buf->stride * height;
- ok &= (size <= buf->size);
- ok &= (buf->stride >= width * kModeBpp[mode]);
- ok &= (buf->rgba != NULL);
- }
- return ok ? VP8_STATUS_OK : VP8_STATUS_INVALID_PARAM;
-}
-
-static VP8StatusCode AllocateBuffer(WebPDecBuffer* const buffer) {
- const int w = buffer->width;
- const int h = buffer->height;
- const WEBP_CSP_MODE mode = buffer->colorspace;
-
- if (w <= 0 || h <= 0 || !IsValidColorspace(mode)) {
- return VP8_STATUS_INVALID_PARAM;
- }
-
- if (!buffer->is_external_memory && buffer->private_memory == NULL) {
- uint8_t* output;
- int uv_stride = 0, a_stride = 0;
- uint64_t uv_size = 0, a_size = 0, total_size;
- // We need memory and it hasn't been allocated yet.
- // => initialize output buffer, now that dimensions are known.
- const int stride = w * kModeBpp[mode];
- const uint64_t size = (uint64_t)stride * h;
-
- if (!WebPIsRGBMode(mode)) {
- uv_stride = (w + 1) / 2;
- uv_size = (uint64_t)uv_stride * ((h + 1) / 2);
- if (mode == MODE_YUVA) {
- a_stride = w;
- a_size = (uint64_t)a_stride * h;
- }
- }
- total_size = size + 2 * uv_size + a_size;
-
- // Security/sanity checks
- output = (uint8_t*)WebPSafeMalloc(total_size, sizeof(*output));
- if (output == NULL) {
- return VP8_STATUS_OUT_OF_MEMORY;
- }
- buffer->private_memory = output;
-
- if (!WebPIsRGBMode(mode)) { // YUVA initialization
- WebPYUVABuffer* const buf = &buffer->u.YUVA;
- buf->y = output;
- buf->y_stride = stride;
- buf->y_size = (size_t)size;
- buf->u = output + size;
- buf->u_stride = uv_stride;
- buf->u_size = (size_t)uv_size;
- buf->v = output + size + uv_size;
- buf->v_stride = uv_stride;
- buf->v_size = (size_t)uv_size;
- if (mode == MODE_YUVA) {
- buf->a = output + size + 2 * uv_size;
- }
- buf->a_size = (size_t)a_size;
- buf->a_stride = a_stride;
- } else { // RGBA initialization
- WebPRGBABuffer* const buf = &buffer->u.RGBA;
- buf->rgba = output;
- buf->stride = stride;
- buf->size = (size_t)size;
- }
- }
- return CheckDecBuffer(buffer);
-}
-
-VP8StatusCode WebPAllocateDecBuffer(int w, int h,
- const WebPDecoderOptions* const options,
- WebPDecBuffer* const out) {
- if (out == NULL || w <= 0 || h <= 0) {
- return VP8_STATUS_INVALID_PARAM;
- }
- if (options != NULL) { // First, apply options if there is any.
- if (options->use_cropping) {
- const int cw = options->crop_width;
- const int ch = options->crop_height;
- const int x = options->crop_left & ~1;
- const int y = options->crop_top & ~1;
- if (x < 0 || y < 0 || cw <= 0 || ch <= 0 || x + cw > w || y + ch > h) {
- return VP8_STATUS_INVALID_PARAM; // out of frame boundary.
- }
- w = cw;
- h = ch;
- }
- if (options->use_scaling) {
- if (options->scaled_width <= 0 || options->scaled_height <= 0) {
- return VP8_STATUS_INVALID_PARAM;
- }
- w = options->scaled_width;
- h = options->scaled_height;
- }
- }
- out->width = w;
- out->height = h;
-
- // Then, allocate buffer for real
- return AllocateBuffer(out);
-}
-
-//------------------------------------------------------------------------------
-// constructors / destructors
-
-int WebPInitDecBufferInternal(WebPDecBuffer* buffer, int version) {
- if (WEBP_ABI_IS_INCOMPATIBLE(version, WEBP_DECODER_ABI_VERSION)) {
- return 0; // version mismatch
- }
- if (buffer == NULL) return 0;
- memset(buffer, 0, sizeof(*buffer));
- return 1;
-}
-
-void WebPFreeDecBuffer(WebPDecBuffer* buffer) {
- if (buffer != NULL) {
- if (!buffer->is_external_memory)
- free(buffer->private_memory);
- buffer->private_memory = NULL;
- }
-}
-
-void WebPCopyDecBuffer(const WebPDecBuffer* const src,
- WebPDecBuffer* const dst) {
- if (src != NULL && dst != NULL) {
- *dst = *src;
- if (src->private_memory != NULL) {
- dst->is_external_memory = 1; // dst buffer doesn't own the memory.
- dst->private_memory = NULL;
- }
- }
-}
-
-// Copy and transfer ownership from src to dst (beware of parameter order!)
-void WebPGrabDecBuffer(WebPDecBuffer* const src, WebPDecBuffer* const dst) {
- if (src != NULL && dst != NULL) {
- *dst = *src;
- if (src->private_memory != NULL) {
- src->is_external_memory = 1; // src relinquishes ownership
- src->private_memory = NULL;
- }
- }
-}
-
-//------------------------------------------------------------------------------
-
-#if defined(__cplusplus) || defined(c_plusplus)
-} // extern "C"
-#endif
diff --git a/drivers/webpold/dec/decode_vp8.h b/drivers/webpold/dec/decode_vp8.h
deleted file mode 100644
index c26a9fc891..0000000000
--- a/drivers/webpold/dec/decode_vp8.h
+++ /dev/null
@@ -1,182 +0,0 @@
-// Copyright 2010 Google Inc. All Rights Reserved.
-//
-// This code is licensed under the same terms as WebM:
-// Software License Agreement: http://www.webmproject.org/license/software/
-// Additional IP Rights Grant: http://www.webmproject.org/license/additional/
-// -----------------------------------------------------------------------------
-//
-// Low-level API for VP8 decoder
-//
-// Author: Skal (pascal.massimino@gmail.com)
-
-#ifndef WEBP_WEBP_DECODE_VP8_H_
-#define WEBP_WEBP_DECODE_VP8_H_
-
-#include "../decode.h"
-
-#if defined(__cplusplus) || defined(c_plusplus)
-extern "C" {
-#endif
-
-//------------------------------------------------------------------------------
-// Lower-level API
-//
-// These functions provide fine-grained control of the decoding process.
-// The call flow should resemble:
-//
-// VP8Io io;
-// VP8InitIo(&io);
-// io.data = data;
-// io.data_size = size;
-// /* customize io's functions (setup()/put()/teardown()) if needed. */
-//
-// VP8Decoder* dec = VP8New();
-// bool ok = VP8Decode(dec);
-// if (!ok) printf("Error: %s\n", VP8StatusMessage(dec));
-// VP8Delete(dec);
-// return ok;
-
-// Input / Output
-typedef struct VP8Io VP8Io;
-typedef int (*VP8IoPutHook)(const VP8Io* io);
-typedef int (*VP8IoSetupHook)(VP8Io* io);
-typedef void (*VP8IoTeardownHook)(const VP8Io* io);
-
-struct VP8Io {
- // set by VP8GetHeaders()
- int width, height; // picture dimensions, in pixels (invariable).
- // These are the original, uncropped dimensions.
- // The actual area passed to put() is stored
- // in mb_w / mb_h fields.
-
- // set before calling put()
- int mb_y; // position of the current rows (in pixels)
- int mb_w; // number of columns in the sample
- int mb_h; // number of rows in the sample
- const uint8_t* y, *u, *v; // rows to copy (in yuv420 format)
- int y_stride; // row stride for luma
- int uv_stride; // row stride for chroma
-
- void* opaque; // user data
-
- // called when fresh samples are available. Currently, samples are in
- // YUV420 format, and can be up to width x 24 in size (depending on the
- // in-loop filtering level, e.g.). Should return false in case of error
- // or abort request. The actual size of the area to update is mb_w x mb_h
- // in size, taking cropping into account.
- VP8IoPutHook put;
-
- // called just before starting to decode the blocks.
- // Must return false in case of setup error, true otherwise. If false is
- // returned, teardown() will NOT be called. But if the setup succeeded
- // and true is returned, then teardown() will always be called afterward.
- VP8IoSetupHook setup;
-
- // Called just after block decoding is finished (or when an error occurred
- // during put()). Is NOT called if setup() failed.
- VP8IoTeardownHook teardown;
-
- // this is a recommendation for the user-side yuv->rgb converter. This flag
- // is set when calling setup() hook and can be overwritten by it. It then
- // can be taken into consideration during the put() method.
- int fancy_upsampling;
-
- // Input buffer.
- size_t data_size;
- const uint8_t* data;
-
- // If true, in-loop filtering will not be performed even if present in the
- // bitstream. Switching off filtering may speed up decoding at the expense
- // of more visible blocking. Note that output will also be non-compliant
- // with the VP8 specifications.
- int bypass_filtering;
-
- // Cropping parameters.
- int use_cropping;
- int crop_left, crop_right, crop_top, crop_bottom;
-
- // Scaling parameters.
- int use_scaling;
- int scaled_width, scaled_height;
-
- // If non NULL, pointer to the alpha data (if present) corresponding to the
- // start of the current row (That is: it is pre-offset by mb_y and takes
- // cropping into account).
- const uint8_t* a;
-};
-
-// Internal, version-checked, entry point
-int VP8InitIoInternal(VP8Io* const, int);
-
-// Set the custom IO function pointers and user-data. The setter for IO hooks
-// should be called before initiating incremental decoding. Returns true if
-// WebPIDecoder object is successfully modified, false otherwise.
-int WebPISetIOHooks(WebPIDecoder* const idec,
- VP8IoPutHook put,
- VP8IoSetupHook setup,
- VP8IoTeardownHook teardown,
- void* user_data);
-
-// Main decoding object. This is an opaque structure.
-typedef struct VP8Decoder VP8Decoder;
-
-// Create a new decoder object.
-VP8Decoder* VP8New(void);
-
-// Must be called to make sure 'io' is initialized properly.
-// Returns false in case of version mismatch. Upon such failure, no other
-// decoding function should be called (VP8Decode, VP8GetHeaders, ...)
-static WEBP_INLINE int VP8InitIo(VP8Io* const io) {
- return VP8InitIoInternal(io, WEBP_DECODER_ABI_VERSION);
-}
-
-// Start decoding a new picture. Returns true if ok.
-int VP8GetHeaders(VP8Decoder* const dec, VP8Io* const io);
-
-// Decode a picture. Will call VP8GetHeaders() if it wasn't done already.
-// Returns false in case of error.
-int VP8Decode(VP8Decoder* const dec, VP8Io* const io);
-
-// Return current status of the decoder:
-VP8StatusCode VP8Status(VP8Decoder* const dec);
-
-// return readable string corresponding to the last status.
-const char* VP8StatusMessage(VP8Decoder* const dec);
-
-// Resets the decoder in its initial state, reclaiming memory.
-// Not a mandatory call between calls to VP8Decode().
-void VP8Clear(VP8Decoder* const dec);
-
-// Destroy the decoder object.
-void VP8Delete(VP8Decoder* const dec);
-
-//------------------------------------------------------------------------------
-// Miscellaneous VP8/VP8L bitstream probing functions.
-
-// Returns true if the next 3 bytes in data contain the VP8 signature.
-WEBP_EXTERN(int) VP8CheckSignature(const uint8_t* const data, size_t data_size);
-
-// Validates the VP8 data-header and retrieves basic header information viz
-// width and height. Returns 0 in case of formatting error. *width/*height
-// can be passed NULL.
-WEBP_EXTERN(int) VP8GetInfo(
- const uint8_t* data,
- size_t data_size, // data available so far
- size_t chunk_size, // total data size expected in the chunk
- int* const width, int* const height);
-
-// Returns true if the next byte(s) in data is a VP8L signature.
-WEBP_EXTERN(int) VP8LCheckSignature(const uint8_t* const data, size_t size);
-
-// Validates the VP8L data-header and retrieves basic header information viz
-// width, height and alpha. Returns 0 in case of formatting error.
-// width/height/has_alpha can be passed NULL.
-WEBP_EXTERN(int) VP8LGetInfo(
- const uint8_t* data, size_t data_size, // data available so far
- int* const width, int* const height, int* const has_alpha);
-
-#if defined(__cplusplus) || defined(c_plusplus)
-} // extern "C"
-#endif
-
-#endif /* WEBP_WEBP_DECODE_VP8_H_ */
diff --git a/drivers/webpold/dec/frame.c b/drivers/webpold/dec/frame.c
deleted file mode 100644
index 9c91a48e17..0000000000
--- a/drivers/webpold/dec/frame.c
+++ /dev/null
@@ -1,679 +0,0 @@
-// Copyright 2010 Google Inc. All Rights Reserved.
-//
-// This code is licensed under the same terms as WebM:
-// Software License Agreement: http://www.webmproject.org/license/software/
-// Additional IP Rights Grant: http://www.webmproject.org/license/additional/
-// -----------------------------------------------------------------------------
-//
-// Frame-reconstruction function. Memory allocation.
-//
-// Author: Skal (pascal.massimino@gmail.com)
-
-#include <stdlib.h>
-#include "./vp8i.h"
-#include "../utils/utils.h"
-
-#if defined(__cplusplus) || defined(c_plusplus)
-extern "C" {
-#endif
-
-#define ALIGN_MASK (32 - 1)
-
-//------------------------------------------------------------------------------
-// Filtering
-
-// kFilterExtraRows[] = How many extra lines are needed on the MB boundary
-// for caching, given a filtering level.
-// Simple filter: up to 2 luma samples are read and 1 is written.
-// Complex filter: up to 4 luma samples are read and 3 are written. Same for
-// U/V, so it's 8 samples total (because of the 2x upsampling).
-static const uint8_t kFilterExtraRows[3] = { 0, 2, 8 };
-
-static WEBP_INLINE int hev_thresh_from_level(int level, int keyframe) {
- if (keyframe) {
- return (level >= 40) ? 2 : (level >= 15) ? 1 : 0;
- } else {
- return (level >= 40) ? 3 : (level >= 20) ? 2 : (level >= 15) ? 1 : 0;
- }
-}
-
-static void DoFilter(const VP8Decoder* const dec, int mb_x, int mb_y) {
- const VP8ThreadContext* const ctx = &dec->thread_ctx_;
- const int y_bps = dec->cache_y_stride_;
- VP8FInfo* const f_info = ctx->f_info_ + mb_x;
- uint8_t* const y_dst = dec->cache_y_ + ctx->id_ * 16 * y_bps + mb_x * 16;
- const int level = f_info->f_level_;
- const int ilevel = f_info->f_ilevel_;
- const int limit = 2 * level + ilevel;
- if (level == 0) {
- return;
- }
- if (dec->filter_type_ == 1) { // simple
- if (mb_x > 0) {
- VP8SimpleHFilter16(y_dst, y_bps, limit + 4);
- }
- if (f_info->f_inner_) {
- VP8SimpleHFilter16i(y_dst, y_bps, limit);
- }
- if (mb_y > 0) {
- VP8SimpleVFilter16(y_dst, y_bps, limit + 4);
- }
- if (f_info->f_inner_) {
- VP8SimpleVFilter16i(y_dst, y_bps, limit);
- }
- } else { // complex
- const int uv_bps = dec->cache_uv_stride_;
- uint8_t* const u_dst = dec->cache_u_ + ctx->id_ * 8 * uv_bps + mb_x * 8;
- uint8_t* const v_dst = dec->cache_v_ + ctx->id_ * 8 * uv_bps + mb_x * 8;
- const int hev_thresh =
- hev_thresh_from_level(level, dec->frm_hdr_.key_frame_);
- if (mb_x > 0) {
- VP8HFilter16(y_dst, y_bps, limit + 4, ilevel, hev_thresh);
- VP8HFilter8(u_dst, v_dst, uv_bps, limit + 4, ilevel, hev_thresh);
- }
- if (f_info->f_inner_) {
- VP8HFilter16i(y_dst, y_bps, limit, ilevel, hev_thresh);
- VP8HFilter8i(u_dst, v_dst, uv_bps, limit, ilevel, hev_thresh);
- }
- if (mb_y > 0) {
- VP8VFilter16(y_dst, y_bps, limit + 4, ilevel, hev_thresh);
- VP8VFilter8(u_dst, v_dst, uv_bps, limit + 4, ilevel, hev_thresh);
- }
- if (f_info->f_inner_) {
- VP8VFilter16i(y_dst, y_bps, limit, ilevel, hev_thresh);
- VP8VFilter8i(u_dst, v_dst, uv_bps, limit, ilevel, hev_thresh);
- }
- }
-}
-
-// Filter the decoded macroblock row (if needed)
-static void FilterRow(const VP8Decoder* const dec) {
- int mb_x;
- const int mb_y = dec->thread_ctx_.mb_y_;
- assert(dec->thread_ctx_.filter_row_);
- for (mb_x = dec->tl_mb_x_; mb_x < dec->br_mb_x_; ++mb_x) {
- DoFilter(dec, mb_x, mb_y);
- }
-}
-
-//------------------------------------------------------------------------------
-
-void VP8StoreBlock(VP8Decoder* const dec) {
- if (dec->filter_type_ > 0) {
- VP8FInfo* const info = dec->f_info_ + dec->mb_x_;
- const int skip = dec->mb_info_[dec->mb_x_].skip_;
- int level = dec->filter_levels_[dec->segment_];
- if (dec->filter_hdr_.use_lf_delta_) {
- // TODO(skal): only CURRENT is handled for now.
- level += dec->filter_hdr_.ref_lf_delta_[0];
- if (dec->is_i4x4_) {
- level += dec->filter_hdr_.mode_lf_delta_[0];
- }
- }
- level = (level < 0) ? 0 : (level > 63) ? 63 : level;
- info->f_level_ = level;
-
- if (dec->filter_hdr_.sharpness_ > 0) {
- if (dec->filter_hdr_.sharpness_ > 4) {
- level >>= 2;
- } else {
- level >>= 1;
- }
- if (level > 9 - dec->filter_hdr_.sharpness_) {
- level = 9 - dec->filter_hdr_.sharpness_;
- }
- }
-
- info->f_ilevel_ = (level < 1) ? 1 : level;
- info->f_inner_ = (!skip || dec->is_i4x4_);
- }
- {
- // Transfer samples to row cache
- int y;
- const int y_offset = dec->cache_id_ * 16 * dec->cache_y_stride_;
- const int uv_offset = dec->cache_id_ * 8 * dec->cache_uv_stride_;
- uint8_t* const ydst = dec->cache_y_ + dec->mb_x_ * 16 + y_offset;
- uint8_t* const udst = dec->cache_u_ + dec->mb_x_ * 8 + uv_offset;
- uint8_t* const vdst = dec->cache_v_ + dec->mb_x_ * 8 + uv_offset;
- for (y = 0; y < 16; ++y) {
- memcpy(ydst + y * dec->cache_y_stride_,
- dec->yuv_b_ + Y_OFF + y * BPS, 16);
- }
- for (y = 0; y < 8; ++y) {
- memcpy(udst + y * dec->cache_uv_stride_,
- dec->yuv_b_ + U_OFF + y * BPS, 8);
- memcpy(vdst + y * dec->cache_uv_stride_,
- dec->yuv_b_ + V_OFF + y * BPS, 8);
- }
- }
-}
-
-//------------------------------------------------------------------------------
-// This function is called after a row of macroblocks is finished decoding.
-// It also takes into account the following restrictions:
-// * In case of in-loop filtering, we must hold off sending some of the bottom
-// pixels as they are yet unfiltered. They will be when the next macroblock
-// row is decoded. Meanwhile, we must preserve them by rotating them in the
-// cache area. This doesn't hold for the very bottom row of the uncropped
-// picture of course.
-// * we must clip the remaining pixels against the cropping area. The VP8Io
-// struct must have the following fields set correctly before calling put():
-
-#define MACROBLOCK_VPOS(mb_y) ((mb_y) * 16) // vertical position of a MB
-
-// Finalize and transmit a complete row. Return false in case of user-abort.
-static int FinishRow(VP8Decoder* const dec, VP8Io* const io) {
- int ok = 1;
- const VP8ThreadContext* const ctx = &dec->thread_ctx_;
- const int extra_y_rows = kFilterExtraRows[dec->filter_type_];
- const int ysize = extra_y_rows * dec->cache_y_stride_;
- const int uvsize = (extra_y_rows / 2) * dec->cache_uv_stride_;
- const int y_offset = ctx->id_ * 16 * dec->cache_y_stride_;
- const int uv_offset = ctx->id_ * 8 * dec->cache_uv_stride_;
- uint8_t* const ydst = dec->cache_y_ - ysize + y_offset;
- uint8_t* const udst = dec->cache_u_ - uvsize + uv_offset;
- uint8_t* const vdst = dec->cache_v_ - uvsize + uv_offset;
- const int first_row = (ctx->mb_y_ == 0);
- const int last_row = (ctx->mb_y_ >= dec->br_mb_y_ - 1);
- int y_start = MACROBLOCK_VPOS(ctx->mb_y_);
- int y_end = MACROBLOCK_VPOS(ctx->mb_y_ + 1);
-
- if (ctx->filter_row_) {
- FilterRow(dec);
- }
-
- if (io->put) {
- if (!first_row) {
- y_start -= extra_y_rows;
- io->y = ydst;
- io->u = udst;
- io->v = vdst;
- } else {
- io->y = dec->cache_y_ + y_offset;
- io->u = dec->cache_u_ + uv_offset;
- io->v = dec->cache_v_ + uv_offset;
- }
-
- if (!last_row) {
- y_end -= extra_y_rows;
- }
- if (y_end > io->crop_bottom) {
- y_end = io->crop_bottom; // make sure we don't overflow on last row.
- }
- io->a = NULL;
- if (dec->alpha_data_ != NULL && y_start < y_end) {
- // TODO(skal): several things to correct here:
- // * testing presence of alpha with dec->alpha_data_ is not a good idea
- // * we're actually decompressing the full plane only once. It should be
- // more obvious from signature.
- // * we could free alpha_data_ right after this call, but we don't own.
- io->a = VP8DecompressAlphaRows(dec, y_start, y_end - y_start);
- if (io->a == NULL) {
- return VP8SetError(dec, VP8_STATUS_BITSTREAM_ERROR,
- "Could not decode alpha data.");
- }
- }
- if (y_start < io->crop_top) {
- const int delta_y = io->crop_top - y_start;
- y_start = io->crop_top;
- assert(!(delta_y & 1));
- io->y += dec->cache_y_stride_ * delta_y;
- io->u += dec->cache_uv_stride_ * (delta_y >> 1);
- io->v += dec->cache_uv_stride_ * (delta_y >> 1);
- if (io->a != NULL) {
- io->a += io->width * delta_y;
- }
- }
- if (y_start < y_end) {
- io->y += io->crop_left;
- io->u += io->crop_left >> 1;
- io->v += io->crop_left >> 1;
- if (io->a != NULL) {
- io->a += io->crop_left;
- }
- io->mb_y = y_start - io->crop_top;
- io->mb_w = io->crop_right - io->crop_left;
- io->mb_h = y_end - y_start;
- ok = io->put(io);
- }
- }
- // rotate top samples if needed
- if (ctx->id_ + 1 == dec->num_caches_) {
- if (!last_row) {
- memcpy(dec->cache_y_ - ysize, ydst + 16 * dec->cache_y_stride_, ysize);
- memcpy(dec->cache_u_ - uvsize, udst + 8 * dec->cache_uv_stride_, uvsize);
- memcpy(dec->cache_v_ - uvsize, vdst + 8 * dec->cache_uv_stride_, uvsize);
- }
- }
-
- return ok;
-}
-
-#undef MACROBLOCK_VPOS
-
-//------------------------------------------------------------------------------
-
-int VP8ProcessRow(VP8Decoder* const dec, VP8Io* const io) {
- int ok = 1;
- VP8ThreadContext* const ctx = &dec->thread_ctx_;
- if (!dec->use_threads_) {
- // ctx->id_ and ctx->f_info_ are already set
- ctx->mb_y_ = dec->mb_y_;
- ctx->filter_row_ = dec->filter_row_;
- ok = FinishRow(dec, io);
- } else {
- WebPWorker* const worker = &dec->worker_;
- // Finish previous job *before* updating context
- ok &= WebPWorkerSync(worker);
- assert(worker->status_ == OK);
- if (ok) { // spawn a new deblocking/output job
- ctx->io_ = *io;
- ctx->id_ = dec->cache_id_;
- ctx->mb_y_ = dec->mb_y_;
- ctx->filter_row_ = dec->filter_row_;
- if (ctx->filter_row_) { // just swap filter info
- VP8FInfo* const tmp = ctx->f_info_;
- ctx->f_info_ = dec->f_info_;
- dec->f_info_ = tmp;
- }
- WebPWorkerLaunch(worker);
- if (++dec->cache_id_ == dec->num_caches_) {
- dec->cache_id_ = 0;
- }
- }
- }
- return ok;
-}
-
-//------------------------------------------------------------------------------
-// Finish setting up the decoding parameter once user's setup() is called.
-
-VP8StatusCode VP8EnterCritical(VP8Decoder* const dec, VP8Io* const io) {
- // Call setup() first. This may trigger additional decoding features on 'io'.
- // Note: Afterward, we must call teardown() not matter what.
- if (io->setup && !io->setup(io)) {
- VP8SetError(dec, VP8_STATUS_USER_ABORT, "Frame setup failed");
- return dec->status_;
- }
-
- // Disable filtering per user request
- if (io->bypass_filtering) {
- dec->filter_type_ = 0;
- }
- // TODO(skal): filter type / strength / sharpness forcing
-
- // Define the area where we can skip in-loop filtering, in case of cropping.
- //
- // 'Simple' filter reads two luma samples outside of the macroblock and
- // and filters one. It doesn't filter the chroma samples. Hence, we can
- // avoid doing the in-loop filtering before crop_top/crop_left position.
- // For the 'Complex' filter, 3 samples are read and up to 3 are filtered.
- // Means: there's a dependency chain that goes all the way up to the
- // top-left corner of the picture (MB #0). We must filter all the previous
- // macroblocks.
- // TODO(skal): add an 'approximate_decoding' option, that won't produce
- // a 1:1 bit-exactness for complex filtering?
- {
- const int extra_pixels = kFilterExtraRows[dec->filter_type_];
- if (dec->filter_type_ == 2) {
- // For complex filter, we need to preserve the dependency chain.
- dec->tl_mb_x_ = 0;
- dec->tl_mb_y_ = 0;
- } else {
- // For simple filter, we can filter only the cropped region.
- // We include 'extra_pixels' on the other side of the boundary, since
- // vertical or horizontal filtering of the previous macroblock can
- // modify some abutting pixels.
- dec->tl_mb_x_ = (io->crop_left - extra_pixels) >> 4;
- dec->tl_mb_y_ = (io->crop_top - extra_pixels) >> 4;
- if (dec->tl_mb_x_ < 0) dec->tl_mb_x_ = 0;
- if (dec->tl_mb_y_ < 0) dec->tl_mb_y_ = 0;
- }
- // We need some 'extra' pixels on the right/bottom.
- dec->br_mb_y_ = (io->crop_bottom + 15 + extra_pixels) >> 4;
- dec->br_mb_x_ = (io->crop_right + 15 + extra_pixels) >> 4;
- if (dec->br_mb_x_ > dec->mb_w_) {
- dec->br_mb_x_ = dec->mb_w_;
- }
- if (dec->br_mb_y_ > dec->mb_h_) {
- dec->br_mb_y_ = dec->mb_h_;
- }
- }
- return VP8_STATUS_OK;
-}
-
-int VP8ExitCritical(VP8Decoder* const dec, VP8Io* const io) {
- int ok = 1;
- if (dec->use_threads_) {
- ok = WebPWorkerSync(&dec->worker_);
- }
-
- if (io->teardown) {
- io->teardown(io);
- }
- return ok;
-}
-
-//------------------------------------------------------------------------------
-// For multi-threaded decoding we need to use 3 rows of 16 pixels as delay line.
-//
-// Reason is: the deblocking filter cannot deblock the bottom horizontal edges
-// immediately, and needs to wait for first few rows of the next macroblock to
-// be decoded. Hence, deblocking is lagging behind by 4 or 8 pixels (depending
-// on strength).
-// With two threads, the vertical positions of the rows being decoded are:
-// Decode: [ 0..15][16..31][32..47][48..63][64..79][...
-// Deblock: [ 0..11][12..27][28..43][44..59][...
-// If we use two threads and two caches of 16 pixels, the sequence would be:
-// Decode: [ 0..15][16..31][ 0..15!!][16..31][ 0..15][...
-// Deblock: [ 0..11][12..27!!][-4..11][12..27][...
-// The problem occurs during row [12..15!!] that both the decoding and
-// deblocking threads are writing simultaneously.
-// With 3 cache lines, one get a safe write pattern:
-// Decode: [ 0..15][16..31][32..47][ 0..15][16..31][32..47][0..
-// Deblock: [ 0..11][12..27][28..43][-4..11][12..27][28...
-// Note that multi-threaded output _without_ deblocking can make use of two
-// cache lines of 16 pixels only, since there's no lagging behind. The decoding
-// and output process have non-concurrent writing:
-// Decode: [ 0..15][16..31][ 0..15][16..31][...
-// io->put: [ 0..15][16..31][ 0..15][...
-
-#define MT_CACHE_LINES 3
-#define ST_CACHE_LINES 1 // 1 cache row only for single-threaded case
-
-// Initialize multi/single-thread worker
-static int InitThreadContext(VP8Decoder* const dec) {
- dec->cache_id_ = 0;
- if (dec->use_threads_) {
- WebPWorker* const worker = &dec->worker_;
- if (!WebPWorkerReset(worker)) {
- return VP8SetError(dec, VP8_STATUS_OUT_OF_MEMORY,
- "thread initialization failed.");
- }
- worker->data1 = dec;
- worker->data2 = (void*)&dec->thread_ctx_.io_;
- worker->hook = (WebPWorkerHook)FinishRow;
- dec->num_caches_ =
- (dec->filter_type_ > 0) ? MT_CACHE_LINES : MT_CACHE_LINES - 1;
- } else {
- dec->num_caches_ = ST_CACHE_LINES;
- }
- return 1;
-}
-
-#undef MT_CACHE_LINES
-#undef ST_CACHE_LINES
-
-//------------------------------------------------------------------------------
-// Memory setup
-
-static int AllocateMemory(VP8Decoder* const dec) {
- const int num_caches = dec->num_caches_;
- const int mb_w = dec->mb_w_;
- // Note: we use 'size_t' when there's no overflow risk, uint64_t otherwise.
- const size_t intra_pred_mode_size = 4 * mb_w * sizeof(uint8_t);
- const size_t top_size = (16 + 8 + 8) * mb_w;
- const size_t mb_info_size = (mb_w + 1) * sizeof(VP8MB);
- const size_t f_info_size =
- (dec->filter_type_ > 0) ?
- mb_w * (dec->use_threads_ ? 2 : 1) * sizeof(VP8FInfo)
- : 0;
- const size_t yuv_size = YUV_SIZE * sizeof(*dec->yuv_b_);
- const size_t coeffs_size = 384 * sizeof(*dec->coeffs_);
- const size_t cache_height = (16 * num_caches
- + kFilterExtraRows[dec->filter_type_]) * 3 / 2;
- const size_t cache_size = top_size * cache_height;
- // alpha_size is the only one that scales as width x height.
- const uint64_t alpha_size = (dec->alpha_data_ != NULL) ?
- (uint64_t)dec->pic_hdr_.width_ * dec->pic_hdr_.height_ : 0ULL;
- const uint64_t needed = (uint64_t)intra_pred_mode_size
- + top_size + mb_info_size + f_info_size
- + yuv_size + coeffs_size
- + cache_size + alpha_size + ALIGN_MASK;
- uint8_t* mem;
-
- if (needed != (size_t)needed) return 0; // check for overflow
- if (needed > dec->mem_size_) {
- free(dec->mem_);
- dec->mem_size_ = 0;
- dec->mem_ = WebPSafeMalloc(needed, sizeof(uint8_t));
- if (dec->mem_ == NULL) {
- return VP8SetError(dec, VP8_STATUS_OUT_OF_MEMORY,
- "no memory during frame initialization.");
- }
- // down-cast is ok, thanks to WebPSafeAlloc() above.
- dec->mem_size_ = (size_t)needed;
- }
-
- mem = (uint8_t*)dec->mem_;
- dec->intra_t_ = (uint8_t*)mem;
- mem += intra_pred_mode_size;
-
- dec->y_t_ = (uint8_t*)mem;
- mem += 16 * mb_w;
- dec->u_t_ = (uint8_t*)mem;
- mem += 8 * mb_w;
- dec->v_t_ = (uint8_t*)mem;
- mem += 8 * mb_w;
-
- dec->mb_info_ = ((VP8MB*)mem) + 1;
- mem += mb_info_size;
-
- dec->f_info_ = f_info_size ? (VP8FInfo*)mem : NULL;
- mem += f_info_size;
- dec->thread_ctx_.id_ = 0;
- dec->thread_ctx_.f_info_ = dec->f_info_;
- if (dec->use_threads_) {
- // secondary cache line. The deblocking process need to make use of the
- // filtering strength from previous macroblock row, while the new ones
- // are being decoded in parallel. We'll just swap the pointers.
- dec->thread_ctx_.f_info_ += mb_w;
- }
-
- mem = (uint8_t*)((uintptr_t)(mem + ALIGN_MASK) & ~ALIGN_MASK);
- assert((yuv_size & ALIGN_MASK) == 0);
- dec->yuv_b_ = (uint8_t*)mem;
- mem += yuv_size;
-
- dec->coeffs_ = (int16_t*)mem;
- mem += coeffs_size;
-
- dec->cache_y_stride_ = 16 * mb_w;
- dec->cache_uv_stride_ = 8 * mb_w;
- {
- const int extra_rows = kFilterExtraRows[dec->filter_type_];
- const int extra_y = extra_rows * dec->cache_y_stride_;
- const int extra_uv = (extra_rows / 2) * dec->cache_uv_stride_;
- dec->cache_y_ = ((uint8_t*)mem) + extra_y;
- dec->cache_u_ = dec->cache_y_
- + 16 * num_caches * dec->cache_y_stride_ + extra_uv;
- dec->cache_v_ = dec->cache_u_
- + 8 * num_caches * dec->cache_uv_stride_ + extra_uv;
- dec->cache_id_ = 0;
- }
- mem += cache_size;
-
- // alpha plane
- dec->alpha_plane_ = alpha_size ? (uint8_t*)mem : NULL;
- mem += alpha_size;
-
- // note: left-info is initialized once for all.
- memset(dec->mb_info_ - 1, 0, mb_info_size);
-
- // initialize top
- memset(dec->intra_t_, B_DC_PRED, intra_pred_mode_size);
-
- return 1;
-}
-
-static void InitIo(VP8Decoder* const dec, VP8Io* io) {
- // prepare 'io'
- io->mb_y = 0;
- io->y = dec->cache_y_;
- io->u = dec->cache_u_;
- io->v = dec->cache_v_;
- io->y_stride = dec->cache_y_stride_;
- io->uv_stride = dec->cache_uv_stride_;
- io->a = NULL;
-}
-
-int VP8InitFrame(VP8Decoder* const dec, VP8Io* io) {
- if (!InitThreadContext(dec)) return 0; // call first. Sets dec->num_caches_.
- if (!AllocateMemory(dec)) return 0;
- InitIo(dec, io);
- VP8DspInit(); // Init critical function pointers and look-up tables.
- return 1;
-}
-
-//------------------------------------------------------------------------------
-// Main reconstruction function.
-
-static const int kScan[16] = {
- 0 + 0 * BPS, 4 + 0 * BPS, 8 + 0 * BPS, 12 + 0 * BPS,
- 0 + 4 * BPS, 4 + 4 * BPS, 8 + 4 * BPS, 12 + 4 * BPS,
- 0 + 8 * BPS, 4 + 8 * BPS, 8 + 8 * BPS, 12 + 8 * BPS,
- 0 + 12 * BPS, 4 + 12 * BPS, 8 + 12 * BPS, 12 + 12 * BPS
-};
-
-static WEBP_INLINE int CheckMode(VP8Decoder* const dec, int mode) {
- if (mode == B_DC_PRED) {
- if (dec->mb_x_ == 0) {
- return (dec->mb_y_ == 0) ? B_DC_PRED_NOTOPLEFT : B_DC_PRED_NOLEFT;
- } else {
- return (dec->mb_y_ == 0) ? B_DC_PRED_NOTOP : B_DC_PRED;
- }
- }
- return mode;
-}
-
-static WEBP_INLINE void Copy32b(uint8_t* dst, uint8_t* src) {
- *(uint32_t*)dst = *(uint32_t*)src;
-}
-
-void VP8ReconstructBlock(VP8Decoder* const dec) {
- uint8_t* const y_dst = dec->yuv_b_ + Y_OFF;
- uint8_t* const u_dst = dec->yuv_b_ + U_OFF;
- uint8_t* const v_dst = dec->yuv_b_ + V_OFF;
-
- // Rotate in the left samples from previously decoded block. We move four
- // pixels at a time for alignment reason, and because of in-loop filter.
- if (dec->mb_x_ > 0) {
- int j;
- for (j = -1; j < 16; ++j) {
- Copy32b(&y_dst[j * BPS - 4], &y_dst[j * BPS + 12]);
- }
- for (j = -1; j < 8; ++j) {
- Copy32b(&u_dst[j * BPS - 4], &u_dst[j * BPS + 4]);
- Copy32b(&v_dst[j * BPS - 4], &v_dst[j * BPS + 4]);
- }
- } else {
- int j;
- for (j = 0; j < 16; ++j) {
- y_dst[j * BPS - 1] = 129;
- }
- for (j = 0; j < 8; ++j) {
- u_dst[j * BPS - 1] = 129;
- v_dst[j * BPS - 1] = 129;
- }
- // Init top-left sample on left column too
- if (dec->mb_y_ > 0) {
- y_dst[-1 - BPS] = u_dst[-1 - BPS] = v_dst[-1 - BPS] = 129;
- }
- }
- {
- // bring top samples into the cache
- uint8_t* const top_y = dec->y_t_ + dec->mb_x_ * 16;
- uint8_t* const top_u = dec->u_t_ + dec->mb_x_ * 8;
- uint8_t* const top_v = dec->v_t_ + dec->mb_x_ * 8;
- const int16_t* coeffs = dec->coeffs_;
- int n;
-
- if (dec->mb_y_ > 0) {
- memcpy(y_dst - BPS, top_y, 16);
- memcpy(u_dst - BPS, top_u, 8);
- memcpy(v_dst - BPS, top_v, 8);
- } else if (dec->mb_x_ == 0) {
- // we only need to do this init once at block (0,0).
- // Afterward, it remains valid for the whole topmost row.
- memset(y_dst - BPS - 1, 127, 16 + 4 + 1);
- memset(u_dst - BPS - 1, 127, 8 + 1);
- memset(v_dst - BPS - 1, 127, 8 + 1);
- }
-
- // predict and add residuals
-
- if (dec->is_i4x4_) { // 4x4
- uint32_t* const top_right = (uint32_t*)(y_dst - BPS + 16);
-
- if (dec->mb_y_ > 0) {
- if (dec->mb_x_ >= dec->mb_w_ - 1) { // on rightmost border
- top_right[0] = top_y[15] * 0x01010101u;
- } else {
- memcpy(top_right, top_y + 16, sizeof(*top_right));
- }
- }
- // replicate the top-right pixels below
- top_right[BPS] = top_right[2 * BPS] = top_right[3 * BPS] = top_right[0];
-
- // predict and add residues for all 4x4 blocks in turn.
- for (n = 0; n < 16; n++) {
- uint8_t* const dst = y_dst + kScan[n];
- VP8PredLuma4[dec->imodes_[n]](dst);
- if (dec->non_zero_ac_ & (1 << n)) {
- VP8Transform(coeffs + n * 16, dst, 0);
- } else if (dec->non_zero_ & (1 << n)) { // only DC is present
- VP8TransformDC(coeffs + n * 16, dst);
- }
- }
- } else { // 16x16
- const int pred_func = CheckMode(dec, dec->imodes_[0]);
- VP8PredLuma16[pred_func](y_dst);
- if (dec->non_zero_) {
- for (n = 0; n < 16; n++) {
- uint8_t* const dst = y_dst + kScan[n];
- if (dec->non_zero_ac_ & (1 << n)) {
- VP8Transform(coeffs + n * 16, dst, 0);
- } else if (dec->non_zero_ & (1 << n)) { // only DC is present
- VP8TransformDC(coeffs + n * 16, dst);
- }
- }
- }
- }
- {
- // Chroma
- const int pred_func = CheckMode(dec, dec->uvmode_);
- VP8PredChroma8[pred_func](u_dst);
- VP8PredChroma8[pred_func](v_dst);
-
- if (dec->non_zero_ & 0x0f0000) { // chroma-U
- const int16_t* const u_coeffs = dec->coeffs_ + 16 * 16;
- if (dec->non_zero_ac_ & 0x0f0000) {
- VP8TransformUV(u_coeffs, u_dst);
- } else {
- VP8TransformDCUV(u_coeffs, u_dst);
- }
- }
- if (dec->non_zero_ & 0xf00000) { // chroma-V
- const int16_t* const v_coeffs = dec->coeffs_ + 20 * 16;
- if (dec->non_zero_ac_ & 0xf00000) {
- VP8TransformUV(v_coeffs, v_dst);
- } else {
- VP8TransformDCUV(v_coeffs, v_dst);
- }
- }
-
- // stash away top samples for next block
- if (dec->mb_y_ < dec->mb_h_ - 1) {
- memcpy(top_y, y_dst + 15 * BPS, 16);
- memcpy(top_u, u_dst + 7 * BPS, 8);
- memcpy(top_v, v_dst + 7 * BPS, 8);
- }
- }
- }
-}
-
-//------------------------------------------------------------------------------
-
-#if defined(__cplusplus) || defined(c_plusplus)
-} // extern "C"
-#endif
diff --git a/drivers/webpold/dec/idec.c b/drivers/webpold/dec/idec.c
deleted file mode 100644
index 7df790ced8..0000000000
--- a/drivers/webpold/dec/idec.c
+++ /dev/null
@@ -1,785 +0,0 @@
-// Copyright 2011 Google Inc. All Rights Reserved.
-//
-// This code is licensed under the same terms as WebM:
-// Software License Agreement: http://www.webmproject.org/license/software/
-// Additional IP Rights Grant: http://www.webmproject.org/license/additional/
-// -----------------------------------------------------------------------------
-//
-// Incremental decoding
-//
-// Author: somnath@google.com (Somnath Banerjee)
-
-#include <assert.h>
-#include <string.h>
-#include <stdlib.h>
-
-#include "./webpi.h"
-#include "./vp8i.h"
-#include "../utils/utils.h"
-
-#if defined(__cplusplus) || defined(c_plusplus)
-extern "C" {
-#endif
-
-// In append mode, buffer allocations increase as multiples of this value.
-// Needs to be a power of 2.
-#define CHUNK_SIZE 4096
-#define MAX_MB_SIZE 4096
-
-//------------------------------------------------------------------------------
-// Data structures for memory and states
-
-// Decoding states. State normally flows like HEADER->PARTS0->DATA->DONE.
-// If there is any error the decoder goes into state ERROR.
-typedef enum {
- STATE_PRE_VP8, // All data before that of the first VP8 chunk.
- STATE_VP8_FRAME_HEADER, // For VP8 Frame header (within VP8 chunk).
- STATE_VP8_PARTS0,
- STATE_VP8_DATA,
- STATE_VP8L_HEADER,
- STATE_VP8L_DATA,
- STATE_DONE,
- STATE_ERROR
-} DecState;
-
-// Operating state for the MemBuffer
-typedef enum {
- MEM_MODE_NONE = 0,
- MEM_MODE_APPEND,
- MEM_MODE_MAP
-} MemBufferMode;
-
-// storage for partition #0 and partial data (in a rolling fashion)
-typedef struct {
- MemBufferMode mode_; // Operation mode
- size_t start_; // start location of the data to be decoded
- size_t end_; // end location
- size_t buf_size_; // size of the allocated buffer
- uint8_t* buf_; // We don't own this buffer in case WebPIUpdate()
-
- size_t part0_size_; // size of partition #0
- const uint8_t* part0_buf_; // buffer to store partition #0
-} MemBuffer;
-
-struct WebPIDecoder {
- DecState state_; // current decoding state
- WebPDecParams params_; // Params to store output info
- int is_lossless_; // for down-casting 'dec_'.
- void* dec_; // either a VP8Decoder or a VP8LDecoder instance
- VP8Io io_;
-
- MemBuffer mem_; // input memory buffer.
- WebPDecBuffer output_; // output buffer (when no external one is supplied)
- size_t chunk_size_; // Compressed VP8/VP8L size extracted from Header.
-};
-
-// MB context to restore in case VP8DecodeMB() fails
-typedef struct {
- VP8MB left_;
- VP8MB info_;
- uint8_t intra_t_[4];
- uint8_t intra_l_[4];
- VP8BitReader br_;
- VP8BitReader token_br_;
-} MBContext;
-
-//------------------------------------------------------------------------------
-// MemBuffer: incoming data handling
-
-static void RemapBitReader(VP8BitReader* const br, ptrdiff_t offset) {
- if (br->buf_ != NULL) {
- br->buf_ += offset;
- br->buf_end_ += offset;
- }
-}
-
-static WEBP_INLINE size_t MemDataSize(const MemBuffer* mem) {
- return (mem->end_ - mem->start_);
-}
-
-static void DoRemap(WebPIDecoder* const idec, ptrdiff_t offset) {
- MemBuffer* const mem = &idec->mem_;
- const uint8_t* const new_base = mem->buf_ + mem->start_;
- // note: for VP8, setting up idec->io_ is only really needed at the beginning
- // of the decoding, till partition #0 is complete.
- idec->io_.data = new_base;
- idec->io_.data_size = MemDataSize(mem);
-
- if (idec->dec_ != NULL) {
- if (!idec->is_lossless_) {
- VP8Decoder* const dec = (VP8Decoder*)idec->dec_;
- const int last_part = dec->num_parts_ - 1;
- if (offset != 0) {
- int p;
- for (p = 0; p <= last_part; ++p) {
- RemapBitReader(dec->parts_ + p, offset);
- }
- // Remap partition #0 data pointer to new offset, but only in MAP
- // mode (in APPEND mode, partition #0 is copied into a fixed memory).
- if (mem->mode_ == MEM_MODE_MAP) {
- RemapBitReader(&dec->br_, offset);
- }
- }
- assert(last_part >= 0);
- dec->parts_[last_part].buf_end_ = mem->buf_ + mem->end_;
- } else { // Resize lossless bitreader
- VP8LDecoder* const dec = (VP8LDecoder*)idec->dec_;
- VP8LBitReaderSetBuffer(&dec->br_, new_base, MemDataSize(mem));
- }
- }
-}
-
-// Appends data to the end of MemBuffer->buf_. It expands the allocated memory
-// size if required and also updates VP8BitReader's if new memory is allocated.
-static int AppendToMemBuffer(WebPIDecoder* const idec,
- const uint8_t* const data, size_t data_size) {
- MemBuffer* const mem = &idec->mem_;
- const uint8_t* const old_base = mem->buf_ + mem->start_;
- assert(mem->mode_ == MEM_MODE_APPEND);
- if (data_size > MAX_CHUNK_PAYLOAD) {
- // security safeguard: trying to allocate more than what the format
- // allows for a chunk should be considered a smoke smell.
- return 0;
- }
-
- if (mem->end_ + data_size > mem->buf_size_) { // Need some free memory
- const size_t current_size = MemDataSize(mem);
- const uint64_t new_size = (uint64_t)current_size + data_size;
- const uint64_t extra_size = (new_size + CHUNK_SIZE - 1) & ~(CHUNK_SIZE - 1);
- uint8_t* const new_buf =
- (uint8_t*)WebPSafeMalloc(extra_size, sizeof(*new_buf));
- if (new_buf == NULL) return 0;
- memcpy(new_buf, old_base, current_size);
- free(mem->buf_);
- mem->buf_ = new_buf;
- mem->buf_size_ = (size_t)extra_size;
- mem->start_ = 0;
- mem->end_ = current_size;
- }
-
- memcpy(mem->buf_ + mem->end_, data, data_size);
- mem->end_ += data_size;
- assert(mem->end_ <= mem->buf_size_);
-
- DoRemap(idec, mem->buf_ + mem->start_ - old_base);
- return 1;
-}
-
-static int RemapMemBuffer(WebPIDecoder* const idec,
- const uint8_t* const data, size_t data_size) {
- MemBuffer* const mem = &idec->mem_;
- const uint8_t* const old_base = mem->buf_ + mem->start_;
- assert(mem->mode_ == MEM_MODE_MAP);
-
- if (data_size < mem->buf_size_) return 0; // can't remap to a shorter buffer!
-
- mem->buf_ = (uint8_t*)data;
- mem->end_ = mem->buf_size_ = data_size;
-
- DoRemap(idec, mem->buf_ + mem->start_ - old_base);
- return 1;
-}
-
-static void InitMemBuffer(MemBuffer* const mem) {
- mem->mode_ = MEM_MODE_NONE;
- mem->buf_ = NULL;
- mem->buf_size_ = 0;
- mem->part0_buf_ = NULL;
- mem->part0_size_ = 0;
-}
-
-static void ClearMemBuffer(MemBuffer* const mem) {
- assert(mem);
- if (mem->mode_ == MEM_MODE_APPEND) {
- free(mem->buf_);
- free((void*)mem->part0_buf_);
- }
-}
-
-static int CheckMemBufferMode(MemBuffer* const mem, MemBufferMode expected) {
- if (mem->mode_ == MEM_MODE_NONE) {
- mem->mode_ = expected; // switch to the expected mode
- } else if (mem->mode_ != expected) {
- return 0; // we mixed the modes => error
- }
- assert(mem->mode_ == expected); // mode is ok
- return 1;
-}
-
-//------------------------------------------------------------------------------
-// Macroblock-decoding contexts
-
-static void SaveContext(const VP8Decoder* dec, const VP8BitReader* token_br,
- MBContext* const context) {
- const VP8BitReader* const br = &dec->br_;
- const VP8MB* const left = dec->mb_info_ - 1;
- const VP8MB* const info = dec->mb_info_ + dec->mb_x_;
-
- context->left_ = *left;
- context->info_ = *info;
- context->br_ = *br;
- context->token_br_ = *token_br;
- memcpy(context->intra_t_, dec->intra_t_ + 4 * dec->mb_x_, 4);
- memcpy(context->intra_l_, dec->intra_l_, 4);
-}
-
-static void RestoreContext(const MBContext* context, VP8Decoder* const dec,
- VP8BitReader* const token_br) {
- VP8BitReader* const br = &dec->br_;
- VP8MB* const left = dec->mb_info_ - 1;
- VP8MB* const info = dec->mb_info_ + dec->mb_x_;
-
- *left = context->left_;
- *info = context->info_;
- *br = context->br_;
- *token_br = context->token_br_;
- memcpy(dec->intra_t_ + 4 * dec->mb_x_, context->intra_t_, 4);
- memcpy(dec->intra_l_, context->intra_l_, 4);
-}
-
-//------------------------------------------------------------------------------
-
-static VP8StatusCode IDecError(WebPIDecoder* const idec, VP8StatusCode error) {
- if (idec->state_ == STATE_VP8_DATA) {
- VP8Io* const io = &idec->io_;
- if (io->teardown) {
- io->teardown(io);
- }
- }
- idec->state_ = STATE_ERROR;
- return error;
-}
-
-static void ChangeState(WebPIDecoder* const idec, DecState new_state,
- size_t consumed_bytes) {
- MemBuffer* const mem = &idec->mem_;
- idec->state_ = new_state;
- mem->start_ += consumed_bytes;
- assert(mem->start_ <= mem->end_);
- idec->io_.data = mem->buf_ + mem->start_;
- idec->io_.data_size = MemDataSize(mem);
-}
-
-// Headers
-static VP8StatusCode DecodeWebPHeaders(WebPIDecoder* const idec) {
- MemBuffer* const mem = &idec->mem_;
- const uint8_t* data = mem->buf_ + mem->start_;
- size_t curr_size = MemDataSize(mem);
- VP8StatusCode status;
- WebPHeaderStructure headers;
-
- headers.data = data;
- headers.data_size = curr_size;
- status = WebPParseHeaders(&headers);
- if (status == VP8_STATUS_NOT_ENOUGH_DATA) {
- return VP8_STATUS_SUSPENDED; // We haven't found a VP8 chunk yet.
- } else if (status != VP8_STATUS_OK) {
- return IDecError(idec, status);
- }
-
- idec->chunk_size_ = headers.compressed_size;
- idec->is_lossless_ = headers.is_lossless;
- if (!idec->is_lossless_) {
- VP8Decoder* const dec = VP8New();
- if (dec == NULL) {
- return VP8_STATUS_OUT_OF_MEMORY;
- }
- idec->dec_ = dec;
-#ifdef WEBP_USE_THREAD
- dec->use_threads_ = (idec->params_.options != NULL) &&
- (idec->params_.options->use_threads > 0);
-#else
- dec->use_threads_ = 0;
-#endif
- dec->alpha_data_ = headers.alpha_data;
- dec->alpha_data_size_ = headers.alpha_data_size;
- ChangeState(idec, STATE_VP8_FRAME_HEADER, headers.offset);
- } else {
- VP8LDecoder* const dec = VP8LNew();
- if (dec == NULL) {
- return VP8_STATUS_OUT_OF_MEMORY;
- }
- idec->dec_ = dec;
- ChangeState(idec, STATE_VP8L_HEADER, headers.offset);
- }
- return VP8_STATUS_OK;
-}
-
-static VP8StatusCode DecodeVP8FrameHeader(WebPIDecoder* const idec) {
- const uint8_t* data = idec->mem_.buf_ + idec->mem_.start_;
- const size_t curr_size = MemDataSize(&idec->mem_);
- uint32_t bits;
-
- if (curr_size < VP8_FRAME_HEADER_SIZE) {
- // Not enough data bytes to extract VP8 Frame Header.
- return VP8_STATUS_SUSPENDED;
- }
- if (!VP8GetInfo(data, curr_size, idec->chunk_size_, NULL, NULL)) {
- return IDecError(idec, VP8_STATUS_BITSTREAM_ERROR);
- }
-
- bits = data[0] | (data[1] << 8) | (data[2] << 16);
- idec->mem_.part0_size_ = (bits >> 5) + VP8_FRAME_HEADER_SIZE;
-
- idec->io_.data = data;
- idec->io_.data_size = curr_size;
- idec->state_ = STATE_VP8_PARTS0;
- return VP8_STATUS_OK;
-}
-
-// Partition #0
-static int CopyParts0Data(WebPIDecoder* const idec) {
- VP8Decoder* const dec = (VP8Decoder*)idec->dec_;
- VP8BitReader* const br = &dec->br_;
- const size_t psize = br->buf_end_ - br->buf_;
- MemBuffer* const mem = &idec->mem_;
- assert(!idec->is_lossless_);
- assert(mem->part0_buf_ == NULL);
- assert(psize > 0);
- assert(psize <= mem->part0_size_); // Format limit: no need for runtime check
- if (mem->mode_ == MEM_MODE_APPEND) {
- // We copy and grab ownership of the partition #0 data.
- uint8_t* const part0_buf = (uint8_t*)malloc(psize);
- if (part0_buf == NULL) {
- return 0;
- }
- memcpy(part0_buf, br->buf_, psize);
- mem->part0_buf_ = part0_buf;
- br->buf_ = part0_buf;
- br->buf_end_ = part0_buf + psize;
- } else {
- // Else: just keep pointers to the partition #0's data in dec_->br_.
- }
- mem->start_ += psize;
- return 1;
-}
-
-static VP8StatusCode DecodePartition0(WebPIDecoder* const idec) {
- VP8Decoder* const dec = (VP8Decoder*)idec->dec_;
- VP8Io* const io = &idec->io_;
- const WebPDecParams* const params = &idec->params_;
- WebPDecBuffer* const output = params->output;
-
- // Wait till we have enough data for the whole partition #0
- if (MemDataSize(&idec->mem_) < idec->mem_.part0_size_) {
- return VP8_STATUS_SUSPENDED;
- }
-
- if (!VP8GetHeaders(dec, io)) {
- const VP8StatusCode status = dec->status_;
- if (status == VP8_STATUS_SUSPENDED ||
- status == VP8_STATUS_NOT_ENOUGH_DATA) {
- // treating NOT_ENOUGH_DATA as SUSPENDED state
- return VP8_STATUS_SUSPENDED;
- }
- return IDecError(idec, status);
- }
-
- // Allocate/Verify output buffer now
- dec->status_ = WebPAllocateDecBuffer(io->width, io->height, params->options,
- output);
- if (dec->status_ != VP8_STATUS_OK) {
- return IDecError(idec, dec->status_);
- }
-
- if (!CopyParts0Data(idec)) {
- return IDecError(idec, VP8_STATUS_OUT_OF_MEMORY);
- }
-
- // Finish setting up the decoding parameters. Will call io->setup().
- if (VP8EnterCritical(dec, io) != VP8_STATUS_OK) {
- return IDecError(idec, dec->status_);
- }
-
- // Note: past this point, teardown() must always be called
- // in case of error.
- idec->state_ = STATE_VP8_DATA;
- // Allocate memory and prepare everything.
- if (!VP8InitFrame(dec, io)) {
- return IDecError(idec, dec->status_);
- }
- return VP8_STATUS_OK;
-}
-
-// Remaining partitions
-static VP8StatusCode DecodeRemaining(WebPIDecoder* const idec) {
- VP8Decoder* const dec = (VP8Decoder*)idec->dec_;
- VP8Io* const io = &idec->io_;
-
- assert(dec->ready_);
-
- for (; dec->mb_y_ < dec->mb_h_; ++dec->mb_y_) {
- VP8BitReader* token_br = &dec->parts_[dec->mb_y_ & (dec->num_parts_ - 1)];
- if (dec->mb_x_ == 0) {
- VP8InitScanline(dec);
- }
- for (; dec->mb_x_ < dec->mb_w_; dec->mb_x_++) {
- MBContext context;
- SaveContext(dec, token_br, &context);
-
- if (!VP8DecodeMB(dec, token_br)) {
- RestoreContext(&context, dec, token_br);
- // We shouldn't fail when MAX_MB data was available
- if (dec->num_parts_ == 1 && MemDataSize(&idec->mem_) > MAX_MB_SIZE) {
- return IDecError(idec, VP8_STATUS_BITSTREAM_ERROR);
- }
- return VP8_STATUS_SUSPENDED;
- }
- VP8ReconstructBlock(dec);
- // Store data and save block's filtering params
- VP8StoreBlock(dec);
-
- // Release buffer only if there is only one partition
- if (dec->num_parts_ == 1) {
- idec->mem_.start_ = token_br->buf_ - idec->mem_.buf_;
- assert(idec->mem_.start_ <= idec->mem_.end_);
- }
- }
- if (!VP8ProcessRow(dec, io)) {
- return IDecError(idec, VP8_STATUS_USER_ABORT);
- }
- dec->mb_x_ = 0;
- }
- // Synchronize the thread and check for errors.
- if (!VP8ExitCritical(dec, io)) {
- return IDecError(idec, VP8_STATUS_USER_ABORT);
- }
- dec->ready_ = 0;
- idec->state_ = STATE_DONE;
-
- return VP8_STATUS_OK;
-}
-
-static int ErrorStatusLossless(WebPIDecoder* const idec, VP8StatusCode status) {
- if (status == VP8_STATUS_SUSPENDED || status == VP8_STATUS_NOT_ENOUGH_DATA) {
- return VP8_STATUS_SUSPENDED;
- }
- return IDecError(idec, status);
-}
-
-static VP8StatusCode DecodeVP8LHeader(WebPIDecoder* const idec) {
- VP8Io* const io = &idec->io_;
- VP8LDecoder* const dec = (VP8LDecoder*)idec->dec_;
- const WebPDecParams* const params = &idec->params_;
- WebPDecBuffer* const output = params->output;
- size_t curr_size = MemDataSize(&idec->mem_);
- assert(idec->is_lossless_);
-
- // Wait until there's enough data for decoding header.
- if (curr_size < (idec->chunk_size_ >> 3)) {
- return VP8_STATUS_SUSPENDED;
- }
- if (!VP8LDecodeHeader(dec, io)) {
- return ErrorStatusLossless(idec, dec->status_);
- }
- // Allocate/verify output buffer now.
- dec->status_ = WebPAllocateDecBuffer(io->width, io->height, params->options,
- output);
- if (dec->status_ != VP8_STATUS_OK) {
- return IDecError(idec, dec->status_);
- }
-
- idec->state_ = STATE_VP8L_DATA;
- return VP8_STATUS_OK;
-}
-
-static VP8StatusCode DecodeVP8LData(WebPIDecoder* const idec) {
- VP8LDecoder* const dec = (VP8LDecoder*)idec->dec_;
- const size_t curr_size = MemDataSize(&idec->mem_);
- assert(idec->is_lossless_);
-
- // At present Lossless decoder can't decode image incrementally. So wait till
- // all the image data is aggregated before image can be decoded.
- if (curr_size < idec->chunk_size_) {
- return VP8_STATUS_SUSPENDED;
- }
-
- if (!VP8LDecodeImage(dec)) {
- return ErrorStatusLossless(idec, dec->status_);
- }
-
- idec->state_ = STATE_DONE;
-
- return VP8_STATUS_OK;
-}
-
- // Main decoding loop
-static VP8StatusCode IDecode(WebPIDecoder* idec) {
- VP8StatusCode status = VP8_STATUS_SUSPENDED;
-
- if (idec->state_ == STATE_PRE_VP8) {
- status = DecodeWebPHeaders(idec);
- } else {
- if (idec->dec_ == NULL) {
- return VP8_STATUS_SUSPENDED; // can't continue if we have no decoder.
- }
- }
- if (idec->state_ == STATE_VP8_FRAME_HEADER) {
- status = DecodeVP8FrameHeader(idec);
- }
- if (idec->state_ == STATE_VP8_PARTS0) {
- status = DecodePartition0(idec);
- }
- if (idec->state_ == STATE_VP8_DATA) {
- status = DecodeRemaining(idec);
- }
- if (idec->state_ == STATE_VP8L_HEADER) {
- status = DecodeVP8LHeader(idec);
- }
- if (idec->state_ == STATE_VP8L_DATA) {
- status = DecodeVP8LData(idec);
- }
- return status;
-}
-
-//------------------------------------------------------------------------------
-// Public functions
-
-WebPIDecoder* WebPINewDecoder(WebPDecBuffer* output_buffer) {
- WebPIDecoder* idec = (WebPIDecoder*)calloc(1, sizeof(*idec));
- if (idec == NULL) {
- return NULL;
- }
-
- idec->state_ = STATE_PRE_VP8;
- idec->chunk_size_ = 0;
-
- InitMemBuffer(&idec->mem_);
- WebPInitDecBuffer(&idec->output_);
- VP8InitIo(&idec->io_);
-
- WebPResetDecParams(&idec->params_);
- idec->params_.output = output_buffer ? output_buffer : &idec->output_;
- WebPInitCustomIo(&idec->params_, &idec->io_); // Plug the I/O functions.
-
- return idec;
-}
-
-WebPIDecoder* WebPIDecode(const uint8_t* data, size_t data_size,
- WebPDecoderConfig* config) {
- WebPIDecoder* idec;
-
- // Parse the bitstream's features, if requested:
- if (data != NULL && data_size > 0 && config != NULL) {
- if (WebPGetFeatures(data, data_size, &config->input) != VP8_STATUS_OK) {
- return NULL;
- }
- }
- // Create an instance of the incremental decoder
- idec = WebPINewDecoder(config ? &config->output : NULL);
- if (idec == NULL) {
- return NULL;
- }
- // Finish initialization
- if (config != NULL) {
- idec->params_.options = &config->options;
- }
- return idec;
-}
-
-void WebPIDelete(WebPIDecoder* idec) {
- if (idec == NULL) return;
- if (idec->dec_ != NULL) {
- if (!idec->is_lossless_) {
- VP8Delete(idec->dec_);
- } else {
- VP8LDelete(idec->dec_);
- }
- }
- ClearMemBuffer(&idec->mem_);
- WebPFreeDecBuffer(&idec->output_);
- free(idec);
-}
-
-//------------------------------------------------------------------------------
-// Wrapper toward WebPINewDecoder
-
-WebPIDecoder* WebPINewRGB(WEBP_CSP_MODE mode, uint8_t* output_buffer,
- size_t output_buffer_size, int output_stride) {
- WebPIDecoder* idec;
- if (mode >= MODE_YUV) return NULL;
- idec = WebPINewDecoder(NULL);
- if (idec == NULL) return NULL;
- idec->output_.colorspace = mode;
- idec->output_.is_external_memory = 1;
- idec->output_.u.RGBA.rgba = output_buffer;
- idec->output_.u.RGBA.stride = output_stride;
- idec->output_.u.RGBA.size = output_buffer_size;
- return idec;
-}
-
-WebPIDecoder* WebPINewYUVA(uint8_t* luma, size_t luma_size, int luma_stride,
- uint8_t* u, size_t u_size, int u_stride,
- uint8_t* v, size_t v_size, int v_stride,
- uint8_t* a, size_t a_size, int a_stride) {
- WebPIDecoder* const idec = WebPINewDecoder(NULL);
- if (idec == NULL) return NULL;
- idec->output_.colorspace = (a == NULL) ? MODE_YUV : MODE_YUVA;
- idec->output_.is_external_memory = 1;
- idec->output_.u.YUVA.y = luma;
- idec->output_.u.YUVA.y_stride = luma_stride;
- idec->output_.u.YUVA.y_size = luma_size;
- idec->output_.u.YUVA.u = u;
- idec->output_.u.YUVA.u_stride = u_stride;
- idec->output_.u.YUVA.u_size = u_size;
- idec->output_.u.YUVA.v = v;
- idec->output_.u.YUVA.v_stride = v_stride;
- idec->output_.u.YUVA.v_size = v_size;
- idec->output_.u.YUVA.a = a;
- idec->output_.u.YUVA.a_stride = a_stride;
- idec->output_.u.YUVA.a_size = a_size;
- return idec;
-}
-
-WebPIDecoder* WebPINewYUV(uint8_t* luma, size_t luma_size, int luma_stride,
- uint8_t* u, size_t u_size, int u_stride,
- uint8_t* v, size_t v_size, int v_stride) {
- return WebPINewYUVA(luma, luma_size, luma_stride,
- u, u_size, u_stride,
- v, v_size, v_stride,
- NULL, 0, 0);
-}
-
-//------------------------------------------------------------------------------
-
-static VP8StatusCode IDecCheckStatus(const WebPIDecoder* const idec) {
- assert(idec);
- if (idec->state_ == STATE_ERROR) {
- return VP8_STATUS_BITSTREAM_ERROR;
- }
- if (idec->state_ == STATE_DONE) {
- return VP8_STATUS_OK;
- }
- return VP8_STATUS_SUSPENDED;
-}
-
-VP8StatusCode WebPIAppend(WebPIDecoder* idec,
- const uint8_t* data, size_t data_size) {
- VP8StatusCode status;
- if (idec == NULL || data == NULL) {
- return VP8_STATUS_INVALID_PARAM;
- }
- status = IDecCheckStatus(idec);
- if (status != VP8_STATUS_SUSPENDED) {
- return status;
- }
- // Check mixed calls between RemapMemBuffer and AppendToMemBuffer.
- if (!CheckMemBufferMode(&idec->mem_, MEM_MODE_APPEND)) {
- return VP8_STATUS_INVALID_PARAM;
- }
- // Append data to memory buffer
- if (!AppendToMemBuffer(idec, data, data_size)) {
- return VP8_STATUS_OUT_OF_MEMORY;
- }
- return IDecode(idec);
-}
-
-VP8StatusCode WebPIUpdate(WebPIDecoder* idec,
- const uint8_t* data, size_t data_size) {
- VP8StatusCode status;
- if (idec == NULL || data == NULL) {
- return VP8_STATUS_INVALID_PARAM;
- }
- status = IDecCheckStatus(idec);
- if (status != VP8_STATUS_SUSPENDED) {
- return status;
- }
- // Check mixed calls between RemapMemBuffer and AppendToMemBuffer.
- if (!CheckMemBufferMode(&idec->mem_, MEM_MODE_MAP)) {
- return VP8_STATUS_INVALID_PARAM;
- }
- // Make the memory buffer point to the new buffer
- if (!RemapMemBuffer(idec, data, data_size)) {
- return VP8_STATUS_INVALID_PARAM;
- }
- return IDecode(idec);
-}
-
-//------------------------------------------------------------------------------
-
-static const WebPDecBuffer* GetOutputBuffer(const WebPIDecoder* const idec) {
- if (idec == NULL || idec->dec_ == NULL) {
- return NULL;
- }
- if (idec->state_ <= STATE_VP8_PARTS0) {
- return NULL;
- }
- return idec->params_.output;
-}
-
-const WebPDecBuffer* WebPIDecodedArea(const WebPIDecoder* idec,
- int* left, int* top,
- int* width, int* height) {
- const WebPDecBuffer* const src = GetOutputBuffer(idec);
- if (left != NULL) *left = 0;
- if (top != NULL) *top = 0;
- // TODO(skal): later include handling of rotations.
- if (src) {
- if (width != NULL) *width = src->width;
- if (height != NULL) *height = idec->params_.last_y;
- } else {
- if (width != NULL) *width = 0;
- if (height != NULL) *height = 0;
- }
- return src;
-}
-
-uint8_t* WebPIDecGetRGB(const WebPIDecoder* idec, int* last_y,
- int* width, int* height, int* stride) {
- const WebPDecBuffer* const src = GetOutputBuffer(idec);
- if (src == NULL) return NULL;
- if (src->colorspace >= MODE_YUV) {
- return NULL;
- }
-
- if (last_y != NULL) *last_y = idec->params_.last_y;
- if (width != NULL) *width = src->width;
- if (height != NULL) *height = src->height;
- if (stride != NULL) *stride = src->u.RGBA.stride;
-
- return src->u.RGBA.rgba;
-}
-
-uint8_t* WebPIDecGetYUVA(const WebPIDecoder* idec, int* last_y,
- uint8_t** u, uint8_t** v, uint8_t** a,
- int* width, int* height,
- int* stride, int* uv_stride, int* a_stride) {
- const WebPDecBuffer* const src = GetOutputBuffer(idec);
- if (src == NULL) return NULL;
- if (src->colorspace < MODE_YUV) {
- return NULL;
- }
-
- if (last_y != NULL) *last_y = idec->params_.last_y;
- if (u != NULL) *u = src->u.YUVA.u;
- if (v != NULL) *v = src->u.YUVA.v;
- if (a != NULL) *a = src->u.YUVA.a;
- if (width != NULL) *width = src->width;
- if (height != NULL) *height = src->height;
- if (stride != NULL) *stride = src->u.YUVA.y_stride;
- if (uv_stride != NULL) *uv_stride = src->u.YUVA.u_stride;
- if (a_stride != NULL) *a_stride = src->u.YUVA.a_stride;
-
- return src->u.YUVA.y;
-}
-
-int WebPISetIOHooks(WebPIDecoder* const idec,
- VP8IoPutHook put,
- VP8IoSetupHook setup,
- VP8IoTeardownHook teardown,
- void* user_data) {
- if (idec == NULL || idec->state_ > STATE_PRE_VP8) {
- return 0;
- }
-
- idec->io_.put = put;
- idec->io_.setup = setup;
- idec->io_.teardown = teardown;
- idec->io_.opaque = user_data;
-
- return 1;
-}
-
-#if defined(__cplusplus) || defined(c_plusplus)
-} // extern "C"
-#endif
diff --git a/drivers/webpold/dec/io.c b/drivers/webpold/dec/io.c
deleted file mode 100644
index 594804c2e6..0000000000
--- a/drivers/webpold/dec/io.c
+++ /dev/null
@@ -1,633 +0,0 @@
-// Copyright 2011 Google Inc. All Rights Reserved.
-//
-// This code is licensed under the same terms as WebM:
-// Software License Agreement: http://www.webmproject.org/license/software/
-// Additional IP Rights Grant: http://www.webmproject.org/license/additional/
-// -----------------------------------------------------------------------------
-//
-// functions for sample output.
-//
-// Author: Skal (pascal.massimino@gmail.com)
-
-#include <assert.h>
-#include <stdlib.h>
-#include "../dec/vp8i.h"
-#include "./webpi.h"
-#include "../dsp/dsp.h"
-#include "../dsp/yuv.h"
-
-#if defined(__cplusplus) || defined(c_plusplus)
-extern "C" {
-#endif
-
-//------------------------------------------------------------------------------
-// Main YUV<->RGB conversion functions
-
-static int EmitYUV(const VP8Io* const io, WebPDecParams* const p) {
- WebPDecBuffer* output = p->output;
- const WebPYUVABuffer* const buf = &output->u.YUVA;
- uint8_t* const y_dst = buf->y + io->mb_y * buf->y_stride;
- uint8_t* const u_dst = buf->u + (io->mb_y >> 1) * buf->u_stride;
- uint8_t* const v_dst = buf->v + (io->mb_y >> 1) * buf->v_stride;
- const int mb_w = io->mb_w;
- const int mb_h = io->mb_h;
- const int uv_w = (mb_w + 1) / 2;
- const int uv_h = (mb_h + 1) / 2;
- int j;
- for (j = 0; j < mb_h; ++j) {
- memcpy(y_dst + j * buf->y_stride, io->y + j * io->y_stride, mb_w);
- }
- for (j = 0; j < uv_h; ++j) {
- memcpy(u_dst + j * buf->u_stride, io->u + j * io->uv_stride, uv_w);
- memcpy(v_dst + j * buf->v_stride, io->v + j * io->uv_stride, uv_w);
- }
- return io->mb_h;
-}
-
-// Point-sampling U/V sampler.
-static int EmitSampledRGB(const VP8Io* const io, WebPDecParams* const p) {
- WebPDecBuffer* output = p->output;
- const WebPRGBABuffer* const buf = &output->u.RGBA;
- uint8_t* dst = buf->rgba + io->mb_y * buf->stride;
- const uint8_t* y_src = io->y;
- const uint8_t* u_src = io->u;
- const uint8_t* v_src = io->v;
- const WebPSampleLinePairFunc sample = WebPSamplers[output->colorspace];
- const int mb_w = io->mb_w;
- const int last = io->mb_h - 1;
- int j;
- for (j = 0; j < last; j += 2) {
- sample(y_src, y_src + io->y_stride, u_src, v_src,
- dst, dst + buf->stride, mb_w);
- y_src += 2 * io->y_stride;
- u_src += io->uv_stride;
- v_src += io->uv_stride;
- dst += 2 * buf->stride;
- }
- if (j == last) { // Just do the last line twice
- sample(y_src, y_src, u_src, v_src, dst, dst, mb_w);
- }
- return io->mb_h;
-}
-
-//------------------------------------------------------------------------------
-// YUV444 -> RGB conversion
-
-#if 0 // TODO(skal): this is for future rescaling.
-static int EmitRGB(const VP8Io* const io, WebPDecParams* const p) {
- WebPDecBuffer* output = p->output;
- const WebPRGBABuffer* const buf = &output->u.RGBA;
- uint8_t* dst = buf->rgba + io->mb_y * buf->stride;
- const uint8_t* y_src = io->y;
- const uint8_t* u_src = io->u;
- const uint8_t* v_src = io->v;
- const WebPYUV444Converter convert = WebPYUV444Converters[output->colorspace];
- const int mb_w = io->mb_w;
- const int last = io->mb_h;
- int j;
- for (j = 0; j < last; ++j) {
- convert(y_src, u_src, v_src, dst, mb_w);
- y_src += io->y_stride;
- u_src += io->uv_stride;
- v_src += io->uv_stride;
- dst += buf->stride;
- }
- return io->mb_h;
-}
-#endif
-
-//------------------------------------------------------------------------------
-// Fancy upsampling
-
-#ifdef FANCY_UPSAMPLING
-static int EmitFancyRGB(const VP8Io* const io, WebPDecParams* const p) {
- int num_lines_out = io->mb_h; // a priori guess
- const WebPRGBABuffer* const buf = &p->output->u.RGBA;
- uint8_t* dst = buf->rgba + io->mb_y * buf->stride;
- WebPUpsampleLinePairFunc upsample = WebPUpsamplers[p->output->colorspace];
- const uint8_t* cur_y = io->y;
- const uint8_t* cur_u = io->u;
- const uint8_t* cur_v = io->v;
- const uint8_t* top_u = p->tmp_u;
- const uint8_t* top_v = p->tmp_v;
- int y = io->mb_y;
- const int y_end = io->mb_y + io->mb_h;
- const int mb_w = io->mb_w;
- const int uv_w = (mb_w + 1) / 2;
-
- if (y == 0) {
- // First line is special cased. We mirror the u/v samples at boundary.
- upsample(NULL, cur_y, cur_u, cur_v, cur_u, cur_v, NULL, dst, mb_w);
- } else {
- // We can finish the left-over line from previous call.
- upsample(p->tmp_y, cur_y, top_u, top_v, cur_u, cur_v,
- dst - buf->stride, dst, mb_w);
- ++num_lines_out;
- }
- // Loop over each output pairs of row.
- for (; y + 2 < y_end; y += 2) {
- top_u = cur_u;
- top_v = cur_v;
- cur_u += io->uv_stride;
- cur_v += io->uv_stride;
- dst += 2 * buf->stride;
- cur_y += 2 * io->y_stride;
- upsample(cur_y - io->y_stride, cur_y,
- top_u, top_v, cur_u, cur_v,
- dst - buf->stride, dst, mb_w);
- }
- // move to last row
- cur_y += io->y_stride;
- if (io->crop_top + y_end < io->crop_bottom) {
- // Save the unfinished samples for next call (as we're not done yet).
- memcpy(p->tmp_y, cur_y, mb_w * sizeof(*p->tmp_y));
- memcpy(p->tmp_u, cur_u, uv_w * sizeof(*p->tmp_u));
- memcpy(p->tmp_v, cur_v, uv_w * sizeof(*p->tmp_v));
- // The fancy upsampler leaves a row unfinished behind
- // (except for the very last row)
- num_lines_out--;
- } else {
- // Process the very last row of even-sized picture
- if (!(y_end & 1)) {
- upsample(cur_y, NULL, cur_u, cur_v, cur_u, cur_v,
- dst + buf->stride, NULL, mb_w);
- }
- }
- return num_lines_out;
-}
-
-#endif /* FANCY_UPSAMPLING */
-
-//------------------------------------------------------------------------------
-
-static int EmitAlphaYUV(const VP8Io* const io, WebPDecParams* const p) {
- const uint8_t* alpha = io->a;
- const WebPYUVABuffer* const buf = &p->output->u.YUVA;
- const int mb_w = io->mb_w;
- const int mb_h = io->mb_h;
- uint8_t* dst = buf->a + io->mb_y * buf->a_stride;
- int j;
-
- if (alpha != NULL) {
- for (j = 0; j < mb_h; ++j) {
- memcpy(dst, alpha, mb_w * sizeof(*dst));
- alpha += io->width;
- dst += buf->a_stride;
- }
- } else if (buf->a != NULL) {
- // the user requested alpha, but there is none, set it to opaque.
- for (j = 0; j < mb_h; ++j) {
- memset(dst, 0xff, mb_w * sizeof(*dst));
- dst += buf->a_stride;
- }
- }
- return 0;
-}
-
-static int GetAlphaSourceRow(const VP8Io* const io,
- const uint8_t** alpha, int* const num_rows) {
- int start_y = io->mb_y;
- *num_rows = io->mb_h;
-
- // Compensate for the 1-line delay of the fancy upscaler.
- // This is similar to EmitFancyRGB().
- if (io->fancy_upsampling) {
- if (start_y == 0) {
- // We don't process the last row yet. It'll be done during the next call.
- --*num_rows;
- } else {
- --start_y;
- // Fortunately, *alpha data is persistent, so we can go back
- // one row and finish alpha blending, now that the fancy upscaler
- // completed the YUV->RGB interpolation.
- *alpha -= io->width;
- }
- if (io->crop_top + io->mb_y + io->mb_h == io->crop_bottom) {
- // If it's the very last call, we process all the remaining rows!
- *num_rows = io->crop_bottom - io->crop_top - start_y;
- }
- }
- return start_y;
-}
-
-static int EmitAlphaRGB(const VP8Io* const io, WebPDecParams* const p) {
- const uint8_t* alpha = io->a;
- if (alpha != NULL) {
- const int mb_w = io->mb_w;
- const WEBP_CSP_MODE colorspace = p->output->colorspace;
- const int alpha_first =
- (colorspace == MODE_ARGB || colorspace == MODE_Argb);
- const WebPRGBABuffer* const buf = &p->output->u.RGBA;
- int num_rows;
- const int start_y = GetAlphaSourceRow(io, &alpha, &num_rows);
- uint8_t* const base_rgba = buf->rgba + start_y * buf->stride;
- uint8_t* dst = base_rgba + (alpha_first ? 0 : 3);
- uint32_t alpha_mask = 0xff;
- int i, j;
-
- for (j = 0; j < num_rows; ++j) {
- for (i = 0; i < mb_w; ++i) {
- const uint32_t alpha_value = alpha[i];
- dst[4 * i] = alpha_value;
- alpha_mask &= alpha_value;
- }
- alpha += io->width;
- dst += buf->stride;
- }
- // alpha_mask is < 0xff if there's non-trivial alpha to premultiply with.
- if (alpha_mask != 0xff && WebPIsPremultipliedMode(colorspace)) {
- WebPApplyAlphaMultiply(base_rgba, alpha_first,
- mb_w, num_rows, buf->stride);
- }
- }
- return 0;
-}
-
-static int EmitAlphaRGBA4444(const VP8Io* const io, WebPDecParams* const p) {
- const uint8_t* alpha = io->a;
- if (alpha != NULL) {
- const int mb_w = io->mb_w;
- const WEBP_CSP_MODE colorspace = p->output->colorspace;
- const WebPRGBABuffer* const buf = &p->output->u.RGBA;
- int num_rows;
- const int start_y = GetAlphaSourceRow(io, &alpha, &num_rows);
- uint8_t* const base_rgba = buf->rgba + start_y * buf->stride;
- uint8_t* alpha_dst = base_rgba + 1;
- uint32_t alpha_mask = 0x0f;
- int i, j;
-
- for (j = 0; j < num_rows; ++j) {
- for (i = 0; i < mb_w; ++i) {
- // Fill in the alpha value (converted to 4 bits).
- const uint32_t alpha_value = alpha[i] >> 4;
- alpha_dst[2 * i] = (alpha_dst[2 * i] & 0xf0) | alpha_value;
- alpha_mask &= alpha_value;
- }
- alpha += io->width;
- alpha_dst += buf->stride;
- }
- if (alpha_mask != 0x0f && WebPIsPremultipliedMode(colorspace)) {
- WebPApplyAlphaMultiply4444(base_rgba, mb_w, num_rows, buf->stride);
- }
- }
- return 0;
-}
-
-//------------------------------------------------------------------------------
-// YUV rescaling (no final RGB conversion needed)
-
-static int Rescale(const uint8_t* src, int src_stride,
- int new_lines, WebPRescaler* const wrk) {
- int num_lines_out = 0;
- while (new_lines > 0) { // import new contributions of source rows.
- const int lines_in = WebPRescalerImport(wrk, new_lines, src, src_stride);
- src += lines_in * src_stride;
- new_lines -= lines_in;
- num_lines_out += WebPRescalerExport(wrk); // emit output row(s)
- }
- return num_lines_out;
-}
-
-static int EmitRescaledYUV(const VP8Io* const io, WebPDecParams* const p) {
- const int mb_h = io->mb_h;
- const int uv_mb_h = (mb_h + 1) >> 1;
- const int num_lines_out = Rescale(io->y, io->y_stride, mb_h, &p->scaler_y);
- Rescale(io->u, io->uv_stride, uv_mb_h, &p->scaler_u);
- Rescale(io->v, io->uv_stride, uv_mb_h, &p->scaler_v);
- return num_lines_out;
-}
-
-static int EmitRescaledAlphaYUV(const VP8Io* const io, WebPDecParams* const p) {
- if (io->a != NULL) {
- Rescale(io->a, io->width, io->mb_h, &p->scaler_a);
- }
- return 0;
-}
-
-static int InitYUVRescaler(const VP8Io* const io, WebPDecParams* const p) {
- const int has_alpha = WebPIsAlphaMode(p->output->colorspace);
- const WebPYUVABuffer* const buf = &p->output->u.YUVA;
- const int out_width = io->scaled_width;
- const int out_height = io->scaled_height;
- const int uv_out_width = (out_width + 1) >> 1;
- const int uv_out_height = (out_height + 1) >> 1;
- const int uv_in_width = (io->mb_w + 1) >> 1;
- const int uv_in_height = (io->mb_h + 1) >> 1;
- const size_t work_size = 2 * out_width; // scratch memory for luma rescaler
- const size_t uv_work_size = 2 * uv_out_width; // and for each u/v ones
- size_t tmp_size;
- int32_t* work;
-
- tmp_size = work_size + 2 * uv_work_size;
- if (has_alpha) {
- tmp_size += work_size;
- }
- p->memory = calloc(1, tmp_size * sizeof(*work));
- if (p->memory == NULL) {
- return 0; // memory error
- }
- work = (int32_t*)p->memory;
- WebPRescalerInit(&p->scaler_y, io->mb_w, io->mb_h,
- buf->y, out_width, out_height, buf->y_stride, 1,
- io->mb_w, out_width, io->mb_h, out_height,
- work);
- WebPRescalerInit(&p->scaler_u, uv_in_width, uv_in_height,
- buf->u, uv_out_width, uv_out_height, buf->u_stride, 1,
- uv_in_width, uv_out_width,
- uv_in_height, uv_out_height,
- work + work_size);
- WebPRescalerInit(&p->scaler_v, uv_in_width, uv_in_height,
- buf->v, uv_out_width, uv_out_height, buf->v_stride, 1,
- uv_in_width, uv_out_width,
- uv_in_height, uv_out_height,
- work + work_size + uv_work_size);
- p->emit = EmitRescaledYUV;
-
- if (has_alpha) {
- WebPRescalerInit(&p->scaler_a, io->mb_w, io->mb_h,
- buf->a, out_width, out_height, buf->a_stride, 1,
- io->mb_w, out_width, io->mb_h, out_height,
- work + work_size + 2 * uv_work_size);
- p->emit_alpha = EmitRescaledAlphaYUV;
- }
- return 1;
-}
-
-//------------------------------------------------------------------------------
-// RGBA rescaling
-
-static int ExportRGB(WebPDecParams* const p, int y_pos) {
- const WebPYUV444Converter convert =
- WebPYUV444Converters[p->output->colorspace];
- const WebPRGBABuffer* const buf = &p->output->u.RGBA;
- uint8_t* dst = buf->rgba + (p->last_y + y_pos) * buf->stride;
- int num_lines_out = 0;
- // For RGB rescaling, because of the YUV420, current scan position
- // U/V can be +1/-1 line from the Y one. Hence the double test.
- while (WebPRescalerHasPendingOutput(&p->scaler_y) &&
- WebPRescalerHasPendingOutput(&p->scaler_u)) {
- assert(p->last_y + y_pos + num_lines_out < p->output->height);
- assert(p->scaler_u.y_accum == p->scaler_v.y_accum);
- WebPRescalerExportRow(&p->scaler_y);
- WebPRescalerExportRow(&p->scaler_u);
- WebPRescalerExportRow(&p->scaler_v);
- convert(p->scaler_y.dst, p->scaler_u.dst, p->scaler_v.dst,
- dst, p->scaler_y.dst_width);
- dst += buf->stride;
- ++num_lines_out;
- }
- return num_lines_out;
-}
-
-static int EmitRescaledRGB(const VP8Io* const io, WebPDecParams* const p) {
- const int mb_h = io->mb_h;
- const int uv_mb_h = (mb_h + 1) >> 1;
- int j = 0, uv_j = 0;
- int num_lines_out = 0;
- while (j < mb_h) {
- const int y_lines_in =
- WebPRescalerImport(&p->scaler_y, mb_h - j,
- io->y + j * io->y_stride, io->y_stride);
- const int u_lines_in =
- WebPRescalerImport(&p->scaler_u, uv_mb_h - uv_j,
- io->u + uv_j * io->uv_stride, io->uv_stride);
- const int v_lines_in =
- WebPRescalerImport(&p->scaler_v, uv_mb_h - uv_j,
- io->v + uv_j * io->uv_stride, io->uv_stride);
- (void)v_lines_in; // remove a gcc warning
- assert(u_lines_in == v_lines_in);
- j += y_lines_in;
- uv_j += u_lines_in;
- num_lines_out += ExportRGB(p, num_lines_out);
- }
- return num_lines_out;
-}
-
-static int ExportAlpha(WebPDecParams* const p, int y_pos) {
- const WebPRGBABuffer* const buf = &p->output->u.RGBA;
- uint8_t* const base_rgba = buf->rgba + (p->last_y + y_pos) * buf->stride;
- const WEBP_CSP_MODE colorspace = p->output->colorspace;
- const int alpha_first =
- (colorspace == MODE_ARGB || colorspace == MODE_Argb);
- uint8_t* dst = base_rgba + (alpha_first ? 0 : 3);
- int num_lines_out = 0;
- const int is_premult_alpha = WebPIsPremultipliedMode(colorspace);
- uint32_t alpha_mask = 0xff;
- const int width = p->scaler_a.dst_width;
-
- while (WebPRescalerHasPendingOutput(&p->scaler_a)) {
- int i;
- assert(p->last_y + y_pos + num_lines_out < p->output->height);
- WebPRescalerExportRow(&p->scaler_a);
- for (i = 0; i < width; ++i) {
- const uint32_t alpha_value = p->scaler_a.dst[i];
- dst[4 * i] = alpha_value;
- alpha_mask &= alpha_value;
- }
- dst += buf->stride;
- ++num_lines_out;
- }
- if (is_premult_alpha && alpha_mask != 0xff) {
- WebPApplyAlphaMultiply(base_rgba, alpha_first,
- width, num_lines_out, buf->stride);
- }
- return num_lines_out;
-}
-
-static int ExportAlphaRGBA4444(WebPDecParams* const p, int y_pos) {
- const WebPRGBABuffer* const buf = &p->output->u.RGBA;
- uint8_t* const base_rgba = buf->rgba + (p->last_y + y_pos) * buf->stride;
- uint8_t* alpha_dst = base_rgba + 1;
- int num_lines_out = 0;
- const WEBP_CSP_MODE colorspace = p->output->colorspace;
- const int width = p->scaler_a.dst_width;
- const int is_premult_alpha = WebPIsPremultipliedMode(colorspace);
- uint32_t alpha_mask = 0x0f;
-
- while (WebPRescalerHasPendingOutput(&p->scaler_a)) {
- int i;
- assert(p->last_y + y_pos + num_lines_out < p->output->height);
- WebPRescalerExportRow(&p->scaler_a);
- for (i = 0; i < width; ++i) {
- // Fill in the alpha value (converted to 4 bits).
- const uint32_t alpha_value = p->scaler_a.dst[i] >> 4;
- alpha_dst[2 * i] = (alpha_dst[2 * i] & 0xf0) | alpha_value;
- alpha_mask &= alpha_value;
- }
- alpha_dst += buf->stride;
- ++num_lines_out;
- }
- if (is_premult_alpha && alpha_mask != 0x0f) {
- WebPApplyAlphaMultiply4444(base_rgba, width, num_lines_out, buf->stride);
- }
- return num_lines_out;
-}
-
-static int EmitRescaledAlphaRGB(const VP8Io* const io, WebPDecParams* const p) {
- if (io->a != NULL) {
- WebPRescaler* const scaler = &p->scaler_a;
- int j = 0;
- int pos = 0;
- while (j < io->mb_h) {
- j += WebPRescalerImport(scaler, io->mb_h - j,
- io->a + j * io->width, io->width);
- pos += p->emit_alpha_row(p, pos);
- }
- }
- return 0;
-}
-
-static int InitRGBRescaler(const VP8Io* const io, WebPDecParams* const p) {
- const int has_alpha = WebPIsAlphaMode(p->output->colorspace);
- const int out_width = io->scaled_width;
- const int out_height = io->scaled_height;
- const int uv_in_width = (io->mb_w + 1) >> 1;
- const int uv_in_height = (io->mb_h + 1) >> 1;
- const size_t work_size = 2 * out_width; // scratch memory for one rescaler
- int32_t* work; // rescalers work area
- uint8_t* tmp; // tmp storage for scaled YUV444 samples before RGB conversion
- size_t tmp_size1, tmp_size2;
-
- tmp_size1 = 3 * work_size;
- tmp_size2 = 3 * out_width;
- if (has_alpha) {
- tmp_size1 += work_size;
- tmp_size2 += out_width;
- }
- p->memory = calloc(1, tmp_size1 * sizeof(*work) + tmp_size2 * sizeof(*tmp));
- if (p->memory == NULL) {
- return 0; // memory error
- }
- work = (int32_t*)p->memory;
- tmp = (uint8_t*)(work + tmp_size1);
- WebPRescalerInit(&p->scaler_y, io->mb_w, io->mb_h,
- tmp + 0 * out_width, out_width, out_height, 0, 1,
- io->mb_w, out_width, io->mb_h, out_height,
- work + 0 * work_size);
- WebPRescalerInit(&p->scaler_u, uv_in_width, uv_in_height,
- tmp + 1 * out_width, out_width, out_height, 0, 1,
- io->mb_w, 2 * out_width, io->mb_h, 2 * out_height,
- work + 1 * work_size);
- WebPRescalerInit(&p->scaler_v, uv_in_width, uv_in_height,
- tmp + 2 * out_width, out_width, out_height, 0, 1,
- io->mb_w, 2 * out_width, io->mb_h, 2 * out_height,
- work + 2 * work_size);
- p->emit = EmitRescaledRGB;
-
- if (has_alpha) {
- WebPRescalerInit(&p->scaler_a, io->mb_w, io->mb_h,
- tmp + 3 * out_width, out_width, out_height, 0, 1,
- io->mb_w, out_width, io->mb_h, out_height,
- work + 3 * work_size);
- p->emit_alpha = EmitRescaledAlphaRGB;
- if (p->output->colorspace == MODE_RGBA_4444 ||
- p->output->colorspace == MODE_rgbA_4444) {
- p->emit_alpha_row = ExportAlphaRGBA4444;
- } else {
- p->emit_alpha_row = ExportAlpha;
- }
- }
- return 1;
-}
-
-//------------------------------------------------------------------------------
-// Default custom functions
-
-static int CustomSetup(VP8Io* io) {
- WebPDecParams* const p = (WebPDecParams*)io->opaque;
- const WEBP_CSP_MODE colorspace = p->output->colorspace;
- const int is_rgb = WebPIsRGBMode(colorspace);
- const int is_alpha = WebPIsAlphaMode(colorspace);
-
- p->memory = NULL;
- p->emit = NULL;
- p->emit_alpha = NULL;
- p->emit_alpha_row = NULL;
- if (!WebPIoInitFromOptions(p->options, io, is_alpha ? MODE_YUV : MODE_YUVA)) {
- return 0;
- }
-
- if (io->use_scaling) {
- const int ok = is_rgb ? InitRGBRescaler(io, p) : InitYUVRescaler(io, p);
- if (!ok) {
- return 0; // memory error
- }
- } else {
- if (is_rgb) {
- p->emit = EmitSampledRGB; // default
-#ifdef FANCY_UPSAMPLING
- if (io->fancy_upsampling) {
- const int uv_width = (io->mb_w + 1) >> 1;
- p->memory = malloc(io->mb_w + 2 * uv_width);
- if (p->memory == NULL) {
- return 0; // memory error.
- }
- p->tmp_y = (uint8_t*)p->memory;
- p->tmp_u = p->tmp_y + io->mb_w;
- p->tmp_v = p->tmp_u + uv_width;
- p->emit = EmitFancyRGB;
- WebPInitUpsamplers();
- }
-#endif
- } else {
- p->emit = EmitYUV;
- }
- if (is_alpha) { // need transparency output
- if (WebPIsPremultipliedMode(colorspace)) WebPInitPremultiply();
- p->emit_alpha =
- (colorspace == MODE_RGBA_4444 || colorspace == MODE_rgbA_4444) ?
- EmitAlphaRGBA4444
- : is_rgb ? EmitAlphaRGB
- : EmitAlphaYUV;
- }
- }
-
- if (is_rgb) {
- VP8YUVInit();
- }
- return 1;
-}
-
-//------------------------------------------------------------------------------
-
-static int CustomPut(const VP8Io* io) {
- WebPDecParams* const p = (WebPDecParams*)io->opaque;
- const int mb_w = io->mb_w;
- const int mb_h = io->mb_h;
- int num_lines_out;
- assert(!(io->mb_y & 1));
-
- if (mb_w <= 0 || mb_h <= 0) {
- return 0;
- }
- num_lines_out = p->emit(io, p);
- if (p->emit_alpha) {
- p->emit_alpha(io, p);
- }
- p->last_y += num_lines_out;
- return 1;
-}
-
-//------------------------------------------------------------------------------
-
-static void CustomTeardown(const VP8Io* io) {
- WebPDecParams* const p = (WebPDecParams*)io->opaque;
- free(p->memory);
- p->memory = NULL;
-}
-
-//------------------------------------------------------------------------------
-// Main entry point
-
-void WebPInitCustomIo(WebPDecParams* const params, VP8Io* const io) {
- io->put = CustomPut;
- io->setup = CustomSetup;
- io->teardown = CustomTeardown;
- io->opaque = params;
-}
-
-//------------------------------------------------------------------------------
-
-#if defined(__cplusplus) || defined(c_plusplus)
-} // extern "C"
-#endif
diff --git a/drivers/webpold/dec/layer.c b/drivers/webpold/dec/layer.c
deleted file mode 100644
index a3a5bdcfe8..0000000000
--- a/drivers/webpold/dec/layer.c
+++ /dev/null
@@ -1,35 +0,0 @@
-// Copyright 2011 Google Inc. All Rights Reserved.
-//
-// This code is licensed under the same terms as WebM:
-// Software License Agreement: http://www.webmproject.org/license/software/
-// Additional IP Rights Grant: http://www.webmproject.org/license/additional/
-// -----------------------------------------------------------------------------
-//
-// Enhancement layer (for YUV444/422)
-//
-// Author: Skal (pascal.massimino@gmail.com)
-
-#include <assert.h>
-#include <stdlib.h>
-
-#include "./vp8i.h"
-
-#if defined(__cplusplus) || defined(c_plusplus)
-extern "C" {
-#endif
-
-//------------------------------------------------------------------------------
-
-int VP8DecodeLayer(VP8Decoder* const dec) {
- assert(dec);
- assert(dec->layer_data_size_ > 0);
- (void)dec;
-
- // TODO: handle enhancement layer here.
-
- return 1;
-}
-
-#if defined(__cplusplus) || defined(c_plusplus)
-} // extern "C"
-#endif
diff --git a/drivers/webpold/dec/quant.c b/drivers/webpold/dec/quant.c
deleted file mode 100644
index d54097af0d..0000000000
--- a/drivers/webpold/dec/quant.c
+++ /dev/null
@@ -1,113 +0,0 @@
-// Copyright 2010 Google Inc. All Rights Reserved.
-//
-// This code is licensed under the same terms as WebM:
-// Software License Agreement: http://www.webmproject.org/license/software/
-// Additional IP Rights Grant: http://www.webmproject.org/license/additional/
-// -----------------------------------------------------------------------------
-//
-// Quantizer initialization
-//
-// Author: Skal (pascal.massimino@gmail.com)
-
-#include "./vp8i.h"
-
-#if defined(__cplusplus) || defined(c_plusplus)
-extern "C" {
-#endif
-
-static WEBP_INLINE int clip(int v, int M) {
- return v < 0 ? 0 : v > M ? M : v;
-}
-
-// Paragraph 14.1
-static const uint8_t kDcTable[128] = {
- 4, 5, 6, 7, 8, 9, 10, 10,
- 11, 12, 13, 14, 15, 16, 17, 17,
- 18, 19, 20, 20, 21, 21, 22, 22,
- 23, 23, 24, 25, 25, 26, 27, 28,
- 29, 30, 31, 32, 33, 34, 35, 36,
- 37, 37, 38, 39, 40, 41, 42, 43,
- 44, 45, 46, 46, 47, 48, 49, 50,
- 51, 52, 53, 54, 55, 56, 57, 58,
- 59, 60, 61, 62, 63, 64, 65, 66,
- 67, 68, 69, 70, 71, 72, 73, 74,
- 75, 76, 76, 77, 78, 79, 80, 81,
- 82, 83, 84, 85, 86, 87, 88, 89,
- 91, 93, 95, 96, 98, 100, 101, 102,
- 104, 106, 108, 110, 112, 114, 116, 118,
- 122, 124, 126, 128, 130, 132, 134, 136,
- 138, 140, 143, 145, 148, 151, 154, 157
-};
-
-static const uint16_t kAcTable[128] = {
- 4, 5, 6, 7, 8, 9, 10, 11,
- 12, 13, 14, 15, 16, 17, 18, 19,
- 20, 21, 22, 23, 24, 25, 26, 27,
- 28, 29, 30, 31, 32, 33, 34, 35,
- 36, 37, 38, 39, 40, 41, 42, 43,
- 44, 45, 46, 47, 48, 49, 50, 51,
- 52, 53, 54, 55, 56, 57, 58, 60,
- 62, 64, 66, 68, 70, 72, 74, 76,
- 78, 80, 82, 84, 86, 88, 90, 92,
- 94, 96, 98, 100, 102, 104, 106, 108,
- 110, 112, 114, 116, 119, 122, 125, 128,
- 131, 134, 137, 140, 143, 146, 149, 152,
- 155, 158, 161, 164, 167, 170, 173, 177,
- 181, 185, 189, 193, 197, 201, 205, 209,
- 213, 217, 221, 225, 229, 234, 239, 245,
- 249, 254, 259, 264, 269, 274, 279, 284
-};
-
-//------------------------------------------------------------------------------
-// Paragraph 9.6
-
-void VP8ParseQuant(VP8Decoder* const dec) {
- VP8BitReader* const br = &dec->br_;
- const int base_q0 = VP8GetValue(br, 7);
- const int dqy1_dc = VP8Get(br) ? VP8GetSignedValue(br, 4) : 0;
- const int dqy2_dc = VP8Get(br) ? VP8GetSignedValue(br, 4) : 0;
- const int dqy2_ac = VP8Get(br) ? VP8GetSignedValue(br, 4) : 0;
- const int dquv_dc = VP8Get(br) ? VP8GetSignedValue(br, 4) : 0;
- const int dquv_ac = VP8Get(br) ? VP8GetSignedValue(br, 4) : 0;
-
- const VP8SegmentHeader* const hdr = &dec->segment_hdr_;
- int i;
-
- for (i = 0; i < NUM_MB_SEGMENTS; ++i) {
- int q;
- if (hdr->use_segment_) {
- q = hdr->quantizer_[i];
- if (!hdr->absolute_delta_) {
- q += base_q0;
- }
- } else {
- if (i > 0) {
- dec->dqm_[i] = dec->dqm_[0];
- continue;
- } else {
- q = base_q0;
- }
- }
- {
- VP8QuantMatrix* const m = &dec->dqm_[i];
- m->y1_mat_[0] = kDcTable[clip(q + dqy1_dc, 127)];
- m->y1_mat_[1] = kAcTable[clip(q + 0, 127)];
-
- m->y2_mat_[0] = kDcTable[clip(q + dqy2_dc, 127)] * 2;
- // For all x in [0..284], x*155/100 is bitwise equal to (x*101581) >> 16.
- // The smallest precision for that is '(x*6349) >> 12' but 16 is a good
- // word size.
- m->y2_mat_[1] = (kAcTable[clip(q + dqy2_ac, 127)] * 101581) >> 16;
- if (m->y2_mat_[1] < 8) m->y2_mat_[1] = 8;
-
- m->uv_mat_[0] = kDcTable[clip(q + dquv_dc, 117)];
- m->uv_mat_[1] = kAcTable[clip(q + dquv_ac, 127)];
- }
- }
-}
-
-//------------------------------------------------------------------------------
-
-#if defined(__cplusplus) || defined(c_plusplus)
-} // extern "C"
-#endif
diff --git a/drivers/webpold/dec/tree.c b/drivers/webpold/dec/tree.c
deleted file mode 100644
index 82484e4c55..0000000000
--- a/drivers/webpold/dec/tree.c
+++ /dev/null
@@ -1,589 +0,0 @@
-// Copyright 2010 Google Inc. All Rights Reserved.
-//
-// This code is licensed under the same terms as WebM:
-// Software License Agreement: http://www.webmproject.org/license/software/
-// Additional IP Rights Grant: http://www.webmproject.org/license/additional/
-// -----------------------------------------------------------------------------
-//
-// Coding trees and probas
-//
-// Author: Skal (pascal.massimino@gmail.com)
-
-#include "vp8i.h"
-
-#define USE_GENERIC_TREE
-
-#if defined(__cplusplus) || defined(c_plusplus)
-extern "C" {
-#endif
-
-#ifdef USE_GENERIC_TREE
-static const int8_t kYModesIntra4[18] = {
- -B_DC_PRED, 1,
- -B_TM_PRED, 2,
- -B_VE_PRED, 3,
- 4, 6,
- -B_HE_PRED, 5,
- -B_RD_PRED, -B_VR_PRED,
- -B_LD_PRED, 7,
- -B_VL_PRED, 8,
- -B_HD_PRED, -B_HU_PRED
-};
-#endif
-
-#ifndef ONLY_KEYFRAME_CODE
-
-// inter prediction modes
-enum {
- LEFT4 = 0, ABOVE4 = 1, ZERO4 = 2, NEW4 = 3,
- NEARESTMV, NEARMV, ZEROMV, NEWMV, SPLITMV };
-
-static const int8_t kYModesInter[8] = {
- -DC_PRED, 1,
- 2, 3,
- -V_PRED, -H_PRED,
- -TM_PRED, -B_PRED
-};
-
-static const int8_t kMBSplit[6] = {
- -3, 1,
- -2, 2,
- -0, -1
-};
-
-static const int8_t kMVRef[8] = {
- -ZEROMV, 1,
- -NEARESTMV, 2,
- -NEARMV, 3,
- -NEWMV, -SPLITMV
-};
-
-static const int8_t kMVRef4[6] = {
- -LEFT4, 1,
- -ABOVE4, 2,
- -ZERO4, -NEW4
-};
-#endif
-
-//------------------------------------------------------------------------------
-// Default probabilities
-
-// Inter
-#ifndef ONLY_KEYFRAME_CODE
-static const uint8_t kYModeProbaInter0[4] = { 112, 86, 140, 37 };
-static const uint8_t kUVModeProbaInter0[3] = { 162, 101, 204 };
-static const uint8_t kMVProba0[2][NUM_MV_PROBAS] = {
- { 162, 128, 225, 146, 172, 147, 214, 39,
- 156, 128, 129, 132, 75, 145, 178, 206,
- 239, 254, 254 },
- { 164, 128, 204, 170, 119, 235, 140, 230,
- 228, 128, 130, 130, 74, 148, 180, 203,
- 236, 254, 254 }
-};
-#endif
-
-// Paragraph 13.5
-static const uint8_t
- CoeffsProba0[NUM_TYPES][NUM_BANDS][NUM_CTX][NUM_PROBAS] = {
- // genereated using vp8_default_coef_probs() in entropy.c:129
- { { { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 },
- { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 },
- { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }
- },
- { { 253, 136, 254, 255, 228, 219, 128, 128, 128, 128, 128 },
- { 189, 129, 242, 255, 227, 213, 255, 219, 128, 128, 128 },
- { 106, 126, 227, 252, 214, 209, 255, 255, 128, 128, 128 }
- },
- { { 1, 98, 248, 255, 236, 226, 255, 255, 128, 128, 128 },
- { 181, 133, 238, 254, 221, 234, 255, 154, 128, 128, 128 },
- { 78, 134, 202, 247, 198, 180, 255, 219, 128, 128, 128 },
- },
- { { 1, 185, 249, 255, 243, 255, 128, 128, 128, 128, 128 },
- { 184, 150, 247, 255, 236, 224, 128, 128, 128, 128, 128 },
- { 77, 110, 216, 255, 236, 230, 128, 128, 128, 128, 128 },
- },
- { { 1, 101, 251, 255, 241, 255, 128, 128, 128, 128, 128 },
- { 170, 139, 241, 252, 236, 209, 255, 255, 128, 128, 128 },
- { 37, 116, 196, 243, 228, 255, 255, 255, 128, 128, 128 }
- },
- { { 1, 204, 254, 255, 245, 255, 128, 128, 128, 128, 128 },
- { 207, 160, 250, 255, 238, 128, 128, 128, 128, 128, 128 },
- { 102, 103, 231, 255, 211, 171, 128, 128, 128, 128, 128 }
- },
- { { 1, 152, 252, 255, 240, 255, 128, 128, 128, 128, 128 },
- { 177, 135, 243, 255, 234, 225, 128, 128, 128, 128, 128 },
- { 80, 129, 211, 255, 194, 224, 128, 128, 128, 128, 128 }
- },
- { { 1, 1, 255, 128, 128, 128, 128, 128, 128, 128, 128 },
- { 246, 1, 255, 128, 128, 128, 128, 128, 128, 128, 128 },
- { 255, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }
- }
- },
- { { { 198, 35, 237, 223, 193, 187, 162, 160, 145, 155, 62 },
- { 131, 45, 198, 221, 172, 176, 220, 157, 252, 221, 1 },
- { 68, 47, 146, 208, 149, 167, 221, 162, 255, 223, 128 }
- },
- { { 1, 149, 241, 255, 221, 224, 255, 255, 128, 128, 128 },
- { 184, 141, 234, 253, 222, 220, 255, 199, 128, 128, 128 },
- { 81, 99, 181, 242, 176, 190, 249, 202, 255, 255, 128 }
- },
- { { 1, 129, 232, 253, 214, 197, 242, 196, 255, 255, 128 },
- { 99, 121, 210, 250, 201, 198, 255, 202, 128, 128, 128 },
- { 23, 91, 163, 242, 170, 187, 247, 210, 255, 255, 128 }
- },
- { { 1, 200, 246, 255, 234, 255, 128, 128, 128, 128, 128 },
- { 109, 178, 241, 255, 231, 245, 255, 255, 128, 128, 128 },
- { 44, 130, 201, 253, 205, 192, 255, 255, 128, 128, 128 }
- },
- { { 1, 132, 239, 251, 219, 209, 255, 165, 128, 128, 128 },
- { 94, 136, 225, 251, 218, 190, 255, 255, 128, 128, 128 },
- { 22, 100, 174, 245, 186, 161, 255, 199, 128, 128, 128 }
- },
- { { 1, 182, 249, 255, 232, 235, 128, 128, 128, 128, 128 },
- { 124, 143, 241, 255, 227, 234, 128, 128, 128, 128, 128 },
- { 35, 77, 181, 251, 193, 211, 255, 205, 128, 128, 128 }
- },
- { { 1, 157, 247, 255, 236, 231, 255, 255, 128, 128, 128 },
- { 121, 141, 235, 255, 225, 227, 255, 255, 128, 128, 128 },
- { 45, 99, 188, 251, 195, 217, 255, 224, 128, 128, 128 }
- },
- { { 1, 1, 251, 255, 213, 255, 128, 128, 128, 128, 128 },
- { 203, 1, 248, 255, 255, 128, 128, 128, 128, 128, 128 },
- { 137, 1, 177, 255, 224, 255, 128, 128, 128, 128, 128 }
- }
- },
- { { { 253, 9, 248, 251, 207, 208, 255, 192, 128, 128, 128 },
- { 175, 13, 224, 243, 193, 185, 249, 198, 255, 255, 128 },
- { 73, 17, 171, 221, 161, 179, 236, 167, 255, 234, 128 }
- },
- { { 1, 95, 247, 253, 212, 183, 255, 255, 128, 128, 128 },
- { 239, 90, 244, 250, 211, 209, 255, 255, 128, 128, 128 },
- { 155, 77, 195, 248, 188, 195, 255, 255, 128, 128, 128 }
- },
- { { 1, 24, 239, 251, 218, 219, 255, 205, 128, 128, 128 },
- { 201, 51, 219, 255, 196, 186, 128, 128, 128, 128, 128 },
- { 69, 46, 190, 239, 201, 218, 255, 228, 128, 128, 128 }
- },
- { { 1, 191, 251, 255, 255, 128, 128, 128, 128, 128, 128 },
- { 223, 165, 249, 255, 213, 255, 128, 128, 128, 128, 128 },
- { 141, 124, 248, 255, 255, 128, 128, 128, 128, 128, 128 }
- },
- { { 1, 16, 248, 255, 255, 128, 128, 128, 128, 128, 128 },
- { 190, 36, 230, 255, 236, 255, 128, 128, 128, 128, 128 },
- { 149, 1, 255, 128, 128, 128, 128, 128, 128, 128, 128 }
- },
- { { 1, 226, 255, 128, 128, 128, 128, 128, 128, 128, 128 },
- { 247, 192, 255, 128, 128, 128, 128, 128, 128, 128, 128 },
- { 240, 128, 255, 128, 128, 128, 128, 128, 128, 128, 128 }
- },
- { { 1, 134, 252, 255, 255, 128, 128, 128, 128, 128, 128 },
- { 213, 62, 250, 255, 255, 128, 128, 128, 128, 128, 128 },
- { 55, 93, 255, 128, 128, 128, 128, 128, 128, 128, 128 }
- },
- { { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 },
- { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 },
- { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }
- }
- },
- { { { 202, 24, 213, 235, 186, 191, 220, 160, 240, 175, 255 },
- { 126, 38, 182, 232, 169, 184, 228, 174, 255, 187, 128 },
- { 61, 46, 138, 219, 151, 178, 240, 170, 255, 216, 128 }
- },
- { { 1, 112, 230, 250, 199, 191, 247, 159, 255, 255, 128 },
- { 166, 109, 228, 252, 211, 215, 255, 174, 128, 128, 128 },
- { 39, 77, 162, 232, 172, 180, 245, 178, 255, 255, 128 }
- },
- { { 1, 52, 220, 246, 198, 199, 249, 220, 255, 255, 128 },
- { 124, 74, 191, 243, 183, 193, 250, 221, 255, 255, 128 },
- { 24, 71, 130, 219, 154, 170, 243, 182, 255, 255, 128 }
- },
- { { 1, 182, 225, 249, 219, 240, 255, 224, 128, 128, 128 },
- { 149, 150, 226, 252, 216, 205, 255, 171, 128, 128, 128 },
- { 28, 108, 170, 242, 183, 194, 254, 223, 255, 255, 128 }
- },
- { { 1, 81, 230, 252, 204, 203, 255, 192, 128, 128, 128 },
- { 123, 102, 209, 247, 188, 196, 255, 233, 128, 128, 128 },
- { 20, 95, 153, 243, 164, 173, 255, 203, 128, 128, 128 }
- },
- { { 1, 222, 248, 255, 216, 213, 128, 128, 128, 128, 128 },
- { 168, 175, 246, 252, 235, 205, 255, 255, 128, 128, 128 },
- { 47, 116, 215, 255, 211, 212, 255, 255, 128, 128, 128 }
- },
- { { 1, 121, 236, 253, 212, 214, 255, 255, 128, 128, 128 },
- { 141, 84, 213, 252, 201, 202, 255, 219, 128, 128, 128 },
- { 42, 80, 160, 240, 162, 185, 255, 205, 128, 128, 128 }
- },
- { { 1, 1, 255, 128, 128, 128, 128, 128, 128, 128, 128 },
- { 244, 1, 255, 128, 128, 128, 128, 128, 128, 128, 128 },
- { 238, 1, 255, 128, 128, 128, 128, 128, 128, 128, 128 }
- }
- }
-};
-
-// Paragraph 11.5
-static const uint8_t kBModesProba[NUM_BMODES][NUM_BMODES][NUM_BMODES - 1] = {
- { { 231, 120, 48, 89, 115, 113, 120, 152, 112 },
- { 152, 179, 64, 126, 170, 118, 46, 70, 95 },
- { 175, 69, 143, 80, 85, 82, 72, 155, 103 },
- { 56, 58, 10, 171, 218, 189, 17, 13, 152 },
- { 114, 26, 17, 163, 44, 195, 21, 10, 173 },
- { 121, 24, 80, 195, 26, 62, 44, 64, 85 },
- { 144, 71, 10, 38, 171, 213, 144, 34, 26 },
- { 170, 46, 55, 19, 136, 160, 33, 206, 71 },
- { 63, 20, 8, 114, 114, 208, 12, 9, 226 },
- { 81, 40, 11, 96, 182, 84, 29, 16, 36 } },
- { { 134, 183, 89, 137, 98, 101, 106, 165, 148 },
- { 72, 187, 100, 130, 157, 111, 32, 75, 80 },
- { 66, 102, 167, 99, 74, 62, 40, 234, 128 },
- { 41, 53, 9, 178, 241, 141, 26, 8, 107 },
- { 74, 43, 26, 146, 73, 166, 49, 23, 157 },
- { 65, 38, 105, 160, 51, 52, 31, 115, 128 },
- { 104, 79, 12, 27, 217, 255, 87, 17, 7 },
- { 87, 68, 71, 44, 114, 51, 15, 186, 23 },
- { 47, 41, 14, 110, 182, 183, 21, 17, 194 },
- { 66, 45, 25, 102, 197, 189, 23, 18, 22 } },
- { { 88, 88, 147, 150, 42, 46, 45, 196, 205 },
- { 43, 97, 183, 117, 85, 38, 35, 179, 61 },
- { 39, 53, 200, 87, 26, 21, 43, 232, 171 },
- { 56, 34, 51, 104, 114, 102, 29, 93, 77 },
- { 39, 28, 85, 171, 58, 165, 90, 98, 64 },
- { 34, 22, 116, 206, 23, 34, 43, 166, 73 },
- { 107, 54, 32, 26, 51, 1, 81, 43, 31 },
- { 68, 25, 106, 22, 64, 171, 36, 225, 114 },
- { 34, 19, 21, 102, 132, 188, 16, 76, 124 },
- { 62, 18, 78, 95, 85, 57, 50, 48, 51 } },
- { { 193, 101, 35, 159, 215, 111, 89, 46, 111 },
- { 60, 148, 31, 172, 219, 228, 21, 18, 111 },
- { 112, 113, 77, 85, 179, 255, 38, 120, 114 },
- { 40, 42, 1, 196, 245, 209, 10, 25, 109 },
- { 88, 43, 29, 140, 166, 213, 37, 43, 154 },
- { 61, 63, 30, 155, 67, 45, 68, 1, 209 },
- { 100, 80, 8, 43, 154, 1, 51, 26, 71 },
- { 142, 78, 78, 16, 255, 128, 34, 197, 171 },
- { 41, 40, 5, 102, 211, 183, 4, 1, 221 },
- { 51, 50, 17, 168, 209, 192, 23, 25, 82 } },
- { { 138, 31, 36, 171, 27, 166, 38, 44, 229 },
- { 67, 87, 58, 169, 82, 115, 26, 59, 179 },
- { 63, 59, 90, 180, 59, 166, 93, 73, 154 },
- { 40, 40, 21, 116, 143, 209, 34, 39, 175 },
- { 47, 15, 16, 183, 34, 223, 49, 45, 183 },
- { 46, 17, 33, 183, 6, 98, 15, 32, 183 },
- { 57, 46, 22, 24, 128, 1, 54, 17, 37 },
- { 65, 32, 73, 115, 28, 128, 23, 128, 205 },
- { 40, 3, 9, 115, 51, 192, 18, 6, 223 },
- { 87, 37, 9, 115, 59, 77, 64, 21, 47 } },
- { { 104, 55, 44, 218, 9, 54, 53, 130, 226 },
- { 64, 90, 70, 205, 40, 41, 23, 26, 57 },
- { 54, 57, 112, 184, 5, 41, 38, 166, 213 },
- { 30, 34, 26, 133, 152, 116, 10, 32, 134 },
- { 39, 19, 53, 221, 26, 114, 32, 73, 255 },
- { 31, 9, 65, 234, 2, 15, 1, 118, 73 },
- { 75, 32, 12, 51, 192, 255, 160, 43, 51 },
- { 88, 31, 35, 67, 102, 85, 55, 186, 85 },
- { 56, 21, 23, 111, 59, 205, 45, 37, 192 },
- { 55, 38, 70, 124, 73, 102, 1, 34, 98 } },
- { { 125, 98, 42, 88, 104, 85, 117, 175, 82 },
- { 95, 84, 53, 89, 128, 100, 113, 101, 45 },
- { 75, 79, 123, 47, 51, 128, 81, 171, 1 },
- { 57, 17, 5, 71, 102, 57, 53, 41, 49 },
- { 38, 33, 13, 121, 57, 73, 26, 1, 85 },
- { 41, 10, 67, 138, 77, 110, 90, 47, 114 },
- { 115, 21, 2, 10, 102, 255, 166, 23, 6 },
- { 101, 29, 16, 10, 85, 128, 101, 196, 26 },
- { 57, 18, 10, 102, 102, 213, 34, 20, 43 },
- { 117, 20, 15, 36, 163, 128, 68, 1, 26 } },
- { { 102, 61, 71, 37, 34, 53, 31, 243, 192 },
- { 69, 60, 71, 38, 73, 119, 28, 222, 37 },
- { 68, 45, 128, 34, 1, 47, 11, 245, 171 },
- { 62, 17, 19, 70, 146, 85, 55, 62, 70 },
- { 37, 43, 37, 154, 100, 163, 85, 160, 1 },
- { 63, 9, 92, 136, 28, 64, 32, 201, 85 },
- { 75, 15, 9, 9, 64, 255, 184, 119, 16 },
- { 86, 6, 28, 5, 64, 255, 25, 248, 1 },
- { 56, 8, 17, 132, 137, 255, 55, 116, 128 },
- { 58, 15, 20, 82, 135, 57, 26, 121, 40 } },
- { { 164, 50, 31, 137, 154, 133, 25, 35, 218 },
- { 51, 103, 44, 131, 131, 123, 31, 6, 158 },
- { 86, 40, 64, 135, 148, 224, 45, 183, 128 },
- { 22, 26, 17, 131, 240, 154, 14, 1, 209 },
- { 45, 16, 21, 91, 64, 222, 7, 1, 197 },
- { 56, 21, 39, 155, 60, 138, 23, 102, 213 },
- { 83, 12, 13, 54, 192, 255, 68, 47, 28 },
- { 85, 26, 85, 85, 128, 128, 32, 146, 171 },
- { 18, 11, 7, 63, 144, 171, 4, 4, 246 },
- { 35, 27, 10, 146, 174, 171, 12, 26, 128 } },
- { { 190, 80, 35, 99, 180, 80, 126, 54, 45 },
- { 85, 126, 47, 87, 176, 51, 41, 20, 32 },
- { 101, 75, 128, 139, 118, 146, 116, 128, 85 },
- { 56, 41, 15, 176, 236, 85, 37, 9, 62 },
- { 71, 30, 17, 119, 118, 255, 17, 18, 138 },
- { 101, 38, 60, 138, 55, 70, 43, 26, 142 },
- { 146, 36, 19, 30, 171, 255, 97, 27, 20 },
- { 138, 45, 61, 62, 219, 1, 81, 188, 64 },
- { 32, 41, 20, 117, 151, 142, 20, 21, 163 },
- { 112, 19, 12, 61, 195, 128, 48, 4, 24 } }
-};
-
-void VP8ResetProba(VP8Proba* const proba) {
- memset(proba->segments_, 255u, sizeof(proba->segments_));
- memcpy(proba->coeffs_, CoeffsProba0, sizeof(CoeffsProba0));
-#ifndef ONLY_KEYFRAME_CODE
- memcpy(proba->mv_, kMVProba0, sizeof(kMVProba0));
- memcpy(proba->ymode_, kYModeProbaInter0, sizeof(kYModeProbaInter0));
- memcpy(proba->uvmode_, kUVModeProbaInter0, sizeof(kUVModeProbaInter0));
-#endif
-}
-
-void VP8ParseIntraMode(VP8BitReader* const br, VP8Decoder* const dec) {
- uint8_t* const top = dec->intra_t_ + 4 * dec->mb_x_;
- uint8_t* const left = dec->intra_l_;
- // Hardcoded 16x16 intra-mode decision tree.
- dec->is_i4x4_ = !VP8GetBit(br, 145); // decide for B_PRED first
- if (!dec->is_i4x4_) {
- const int ymode =
- VP8GetBit(br, 156) ? (VP8GetBit(br, 128) ? TM_PRED : H_PRED)
- : (VP8GetBit(br, 163) ? V_PRED : DC_PRED);
- dec->imodes_[0] = ymode;
- memset(top, ymode, 4 * sizeof(top[0]));
- memset(left, ymode, 4 * sizeof(left[0]));
- } else {
- uint8_t* modes = dec->imodes_;
- int y;
- for (y = 0; y < 4; ++y) {
- int ymode = left[y];
- int x;
- for (x = 0; x < 4; ++x) {
- const uint8_t* const prob = kBModesProba[top[x]][ymode];
-#ifdef USE_GENERIC_TREE
- // Generic tree-parsing
- int i = 0;
- do {
- i = kYModesIntra4[2 * i + VP8GetBit(br, prob[i])];
- } while (i > 0);
- ymode = -i;
-#else
- // Hardcoded tree parsing
- ymode = !VP8GetBit(br, prob[0]) ? B_DC_PRED :
- !VP8GetBit(br, prob[1]) ? B_TM_PRED :
- !VP8GetBit(br, prob[2]) ? B_VE_PRED :
- !VP8GetBit(br, prob[3]) ?
- (!VP8GetBit(br, prob[4]) ? B_HE_PRED :
- (!VP8GetBit(br, prob[5]) ? B_RD_PRED : B_VR_PRED)) :
- (!VP8GetBit(br, prob[6]) ? B_LD_PRED :
- (!VP8GetBit(br, prob[7]) ? B_VL_PRED :
- (!VP8GetBit(br, prob[8]) ? B_HD_PRED : B_HU_PRED)));
-#endif // USE_GENERIC_TREE
- top[x] = ymode;
- *modes++ = ymode;
- }
- left[y] = ymode;
- }
- }
- // Hardcoded UVMode decision tree
- dec->uvmode_ = !VP8GetBit(br, 142) ? DC_PRED
- : !VP8GetBit(br, 114) ? V_PRED
- : VP8GetBit(br, 183) ? TM_PRED : H_PRED;
-}
-
-//------------------------------------------------------------------------------
-// Paragraph 13
-
-static const uint8_t
- CoeffsUpdateProba[NUM_TYPES][NUM_BANDS][NUM_CTX][NUM_PROBAS] = {
- { { { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
- { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
- { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }
- },
- { { 176, 246, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
- { 223, 241, 252, 255, 255, 255, 255, 255, 255, 255, 255 },
- { 249, 253, 253, 255, 255, 255, 255, 255, 255, 255, 255 }
- },
- { { 255, 244, 252, 255, 255, 255, 255, 255, 255, 255, 255 },
- { 234, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255 },
- { 253, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }
- },
- { { 255, 246, 254, 255, 255, 255, 255, 255, 255, 255, 255 },
- { 239, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255 },
- { 254, 255, 254, 255, 255, 255, 255, 255, 255, 255, 255 }
- },
- { { 255, 248, 254, 255, 255, 255, 255, 255, 255, 255, 255 },
- { 251, 255, 254, 255, 255, 255, 255, 255, 255, 255, 255 },
- { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }
- },
- { { 255, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255 },
- { 251, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255 },
- { 254, 255, 254, 255, 255, 255, 255, 255, 255, 255, 255 }
- },
- { { 255, 254, 253, 255, 254, 255, 255, 255, 255, 255, 255 },
- { 250, 255, 254, 255, 254, 255, 255, 255, 255, 255, 255 },
- { 254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }
- },
- { { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
- { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
- { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }
- }
- },
- { { { 217, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
- { 225, 252, 241, 253, 255, 255, 254, 255, 255, 255, 255 },
- { 234, 250, 241, 250, 253, 255, 253, 254, 255, 255, 255 }
- },
- { { 255, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
- { 223, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255 },
- { 238, 253, 254, 254, 255, 255, 255, 255, 255, 255, 255 }
- },
- { { 255, 248, 254, 255, 255, 255, 255, 255, 255, 255, 255 },
- { 249, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
- { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }
- },
- { { 255, 253, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
- { 247, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
- { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }
- },
- { { 255, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255 },
- { 252, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
- { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }
- },
- { { 255, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255 },
- { 253, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
- { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }
- },
- { { 255, 254, 253, 255, 255, 255, 255, 255, 255, 255, 255 },
- { 250, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
- { 254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }
- },
- { { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
- { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
- { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }
- }
- },
- { { { 186, 251, 250, 255, 255, 255, 255, 255, 255, 255, 255 },
- { 234, 251, 244, 254, 255, 255, 255, 255, 255, 255, 255 },
- { 251, 251, 243, 253, 254, 255, 254, 255, 255, 255, 255 }
- },
- { { 255, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255 },
- { 236, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255 },
- { 251, 253, 253, 254, 254, 255, 255, 255, 255, 255, 255 }
- },
- { { 255, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255 },
- { 254, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255 },
- { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }
- },
- { { 255, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
- { 254, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
- { 254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }
- },
- { { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
- { 254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
- { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }
- },
- { { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
- { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
- { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }
- },
- { { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
- { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
- { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }
- },
- { { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
- { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
- { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }
- }
- },
- { { { 248, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
- { 250, 254, 252, 254, 255, 255, 255, 255, 255, 255, 255 },
- { 248, 254, 249, 253, 255, 255, 255, 255, 255, 255, 255 }
- },
- { { 255, 253, 253, 255, 255, 255, 255, 255, 255, 255, 255 },
- { 246, 253, 253, 255, 255, 255, 255, 255, 255, 255, 255 },
- { 252, 254, 251, 254, 254, 255, 255, 255, 255, 255, 255 }
- },
- { { 255, 254, 252, 255, 255, 255, 255, 255, 255, 255, 255 },
- { 248, 254, 253, 255, 255, 255, 255, 255, 255, 255, 255 },
- { 253, 255, 254, 254, 255, 255, 255, 255, 255, 255, 255 }
- },
- { { 255, 251, 254, 255, 255, 255, 255, 255, 255, 255, 255 },
- { 245, 251, 254, 255, 255, 255, 255, 255, 255, 255, 255 },
- { 253, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255 }
- },
- { { 255, 251, 253, 255, 255, 255, 255, 255, 255, 255, 255 },
- { 252, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255 },
- { 255, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255 }
- },
- { { 255, 252, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
- { 249, 255, 254, 255, 255, 255, 255, 255, 255, 255, 255 },
- { 255, 255, 254, 255, 255, 255, 255, 255, 255, 255, 255 }
- },
- { { 255, 255, 253, 255, 255, 255, 255, 255, 255, 255, 255 },
- { 250, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
- { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }
- },
- { { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
- { 254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
- { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }
- }
- }
-};
-
-#ifndef ONLY_KEYFRAME_CODE
-static const uint8_t MVUpdateProba[2][NUM_MV_PROBAS] = {
- { 237, 246, 253, 253, 254, 254, 254, 254,
- 254, 254, 254, 254, 254, 254, 250, 250,
- 252, 254, 254 },
- { 231, 243, 245, 253, 254, 254, 254, 254,
- 254, 254, 254, 254, 254, 254, 251, 251,
- 254, 254, 254 }
-};
-#endif
-
-// Paragraph 9.9
-void VP8ParseProba(VP8BitReader* const br, VP8Decoder* const dec) {
- VP8Proba* const proba = &dec->proba_;
- int t, b, c, p;
- for (t = 0; t < NUM_TYPES; ++t) {
- for (b = 0; b < NUM_BANDS; ++b) {
- for (c = 0; c < NUM_CTX; ++c) {
- for (p = 0; p < NUM_PROBAS; ++p) {
- if (VP8GetBit(br, CoeffsUpdateProba[t][b][c][p])) {
- proba->coeffs_[t][b][c][p] = VP8GetValue(br, 8);
- }
- }
- }
- }
- }
- dec->use_skip_proba_ = VP8Get(br);
- if (dec->use_skip_proba_) {
- dec->skip_p_ = VP8GetValue(br, 8);
- }
-#ifndef ONLY_KEYFRAME_CODE
- if (!dec->frm_hdr_.key_frame_) {
- int i;
- dec->intra_p_ = VP8GetValue(br, 8);
- dec->last_p_ = VP8GetValue(br, 8);
- dec->golden_p_ = VP8GetValue(br, 8);
- if (VP8Get(br)) { // update y-mode
- for (i = 0; i < 4; ++i) {
- proba->ymode_[i] = VP8GetValue(br, 8);
- }
- }
- if (VP8Get(br)) { // update uv-mode
- for (i = 0; i < 3; ++i) {
- proba->uvmode_[i] = VP8GetValue(br, 8);
- }
- }
- // update MV
- for (i = 0; i < 2; ++i) {
- int k;
- for (k = 0; k < NUM_MV_PROBAS; ++k) {
- if (VP8GetBit(br, MVUpdateProba[i][k])) {
- const int v = VP8GetValue(br, 7);
- proba->mv_[i][k] = v ? v << 1 : 1;
- }
- }
- }
- }
-#endif
-}
-
-#if defined(__cplusplus) || defined(c_plusplus)
-} // extern "C"
-#endif
diff --git a/drivers/webpold/dec/vp8.c b/drivers/webpold/dec/vp8.c
deleted file mode 100644
index b0ccfa2a06..0000000000
--- a/drivers/webpold/dec/vp8.c
+++ /dev/null
@@ -1,787 +0,0 @@
-// Copyright 2010 Google Inc. All Rights Reserved.
-//
-// This code is licensed under the same terms as WebM:
-// Software License Agreement: http://www.webmproject.org/license/software/
-// Additional IP Rights Grant: http://www.webmproject.org/license/additional/
-// -----------------------------------------------------------------------------
-//
-// main entry for the decoder
-//
-// Author: Skal (pascal.massimino@gmail.com)
-
-#include <stdlib.h>
-
-#include "./vp8i.h"
-#include "./vp8li.h"
-#include "./webpi.h"
-#include "../utils/bit_reader.h"
-
-#if defined(__cplusplus) || defined(c_plusplus)
-extern "C" {
-#endif
-
-//------------------------------------------------------------------------------
-
-int WebPGetDecoderVersion(void) {
- return (DEC_MAJ_VERSION << 16) | (DEC_MIN_VERSION << 8) | DEC_REV_VERSION;
-}
-
-//------------------------------------------------------------------------------
-// VP8Decoder
-
-static void SetOk(VP8Decoder* const dec) {
- dec->status_ = VP8_STATUS_OK;
- dec->error_msg_ = "OK";
-}
-
-int VP8InitIoInternal(VP8Io* const io, int version) {
- if (WEBP_ABI_IS_INCOMPATIBLE(version, WEBP_DECODER_ABI_VERSION)) {
- return 0; // mismatch error
- }
- if (io != NULL) {
- memset(io, 0, sizeof(*io));
- }
- return 1;
-}
-
-VP8Decoder* VP8New(void) {
- VP8Decoder* const dec = (VP8Decoder*)calloc(1, sizeof(*dec));
- if (dec != NULL) {
- SetOk(dec);
- WebPWorkerInit(&dec->worker_);
- dec->ready_ = 0;
- dec->num_parts_ = 1;
- }
- return dec;
-}
-
-VP8StatusCode VP8Status(VP8Decoder* const dec) {
- if (!dec) return VP8_STATUS_INVALID_PARAM;
- return dec->status_;
-}
-
-const char* VP8StatusMessage(VP8Decoder* const dec) {
- if (dec == NULL) return "no object";
- if (!dec->error_msg_) return "OK";
- return dec->error_msg_;
-}
-
-void VP8Delete(VP8Decoder* const dec) {
- if (dec != NULL) {
- VP8Clear(dec);
- free(dec);
- }
-}
-
-int VP8SetError(VP8Decoder* const dec,
- VP8StatusCode error, const char* const msg) {
- // TODO This check would be unnecessary if alpha decompression was separated
- // from VP8ProcessRow/FinishRow. This avoids setting 'dec->status_' to
- // something other than VP8_STATUS_BITSTREAM_ERROR on alpha decompression
- // failure.
- if (dec->status_ == VP8_STATUS_OK) {
- dec->status_ = error;
- dec->error_msg_ = msg;
- dec->ready_ = 0;
- }
- return 0;
-}
-
-//------------------------------------------------------------------------------
-
-int VP8CheckSignature(const uint8_t* const data, size_t data_size) {
- return (data_size >= 3 &&
- data[0] == 0x9d && data[1] == 0x01 && data[2] == 0x2a);
-}
-
-int VP8GetInfo(const uint8_t* data, size_t data_size, size_t chunk_size,
- int* const width, int* const height) {
- if (data == NULL || data_size < VP8_FRAME_HEADER_SIZE) {
- return 0; // not enough data
- }
- // check signature
- if (!VP8CheckSignature(data + 3, data_size - 3)) {
- return 0; // Wrong signature.
- } else {
- const uint32_t bits = data[0] | (data[1] << 8) | (data[2] << 16);
- const int key_frame = !(bits & 1);
- const int w = ((data[7] << 8) | data[6]) & 0x3fff;
- const int h = ((data[9] << 8) | data[8]) & 0x3fff;
-
- if (!key_frame) { // Not a keyframe.
- return 0;
- }
-
- if (((bits >> 1) & 7) > 3) {
- return 0; // unknown profile
- }
- if (!((bits >> 4) & 1)) {
- return 0; // first frame is invisible!
- }
- if (((bits >> 5)) >= chunk_size) { // partition_length
- return 0; // inconsistent size information.
- }
-
- if (width) {
- *width = w;
- }
- if (height) {
- *height = h;
- }
-
- return 1;
- }
-}
-
-//------------------------------------------------------------------------------
-// Header parsing
-
-static void ResetSegmentHeader(VP8SegmentHeader* const hdr) {
- assert(hdr != NULL);
- hdr->use_segment_ = 0;
- hdr->update_map_ = 0;
- hdr->absolute_delta_ = 1;
- memset(hdr->quantizer_, 0, sizeof(hdr->quantizer_));
- memset(hdr->filter_strength_, 0, sizeof(hdr->filter_strength_));
-}
-
-// Paragraph 9.3
-static int ParseSegmentHeader(VP8BitReader* br,
- VP8SegmentHeader* hdr, VP8Proba* proba) {
- assert(br != NULL);
- assert(hdr != NULL);
- hdr->use_segment_ = VP8Get(br);
- if (hdr->use_segment_) {
- hdr->update_map_ = VP8Get(br);
- if (VP8Get(br)) { // update data
- int s;
- hdr->absolute_delta_ = VP8Get(br);
- for (s = 0; s < NUM_MB_SEGMENTS; ++s) {
- hdr->quantizer_[s] = VP8Get(br) ? VP8GetSignedValue(br, 7) : 0;
- }
- for (s = 0; s < NUM_MB_SEGMENTS; ++s) {
- hdr->filter_strength_[s] = VP8Get(br) ? VP8GetSignedValue(br, 6) : 0;
- }
- }
- if (hdr->update_map_) {
- int s;
- for (s = 0; s < MB_FEATURE_TREE_PROBS; ++s) {
- proba->segments_[s] = VP8Get(br) ? VP8GetValue(br, 8) : 255u;
- }
- }
- } else {
- hdr->update_map_ = 0;
- }
- return !br->eof_;
-}
-
-// Paragraph 9.5
-// This function returns VP8_STATUS_SUSPENDED if we don't have all the
-// necessary data in 'buf'.
-// This case is not necessarily an error (for incremental decoding).
-// Still, no bitreader is ever initialized to make it possible to read
-// unavailable memory.
-// If we don't even have the partitions' sizes, than VP8_STATUS_NOT_ENOUGH_DATA
-// is returned, and this is an unrecoverable error.
-// If the partitions were positioned ok, VP8_STATUS_OK is returned.
-static VP8StatusCode ParsePartitions(VP8Decoder* const dec,
- const uint8_t* buf, size_t size) {
- VP8BitReader* const br = &dec->br_;
- const uint8_t* sz = buf;
- const uint8_t* buf_end = buf + size;
- const uint8_t* part_start;
- int last_part;
- int p;
-
- dec->num_parts_ = 1 << VP8GetValue(br, 2);
- last_part = dec->num_parts_ - 1;
- part_start = buf + last_part * 3;
- if (buf_end < part_start) {
- // we can't even read the sizes with sz[]! That's a failure.
- return VP8_STATUS_NOT_ENOUGH_DATA;
- }
- for (p = 0; p < last_part; ++p) {
- const uint32_t psize = sz[0] | (sz[1] << 8) | (sz[2] << 16);
- const uint8_t* part_end = part_start + psize;
- if (part_end > buf_end) part_end = buf_end;
- VP8InitBitReader(dec->parts_ + p, part_start, part_end);
- part_start = part_end;
- sz += 3;
- }
- VP8InitBitReader(dec->parts_ + last_part, part_start, buf_end);
- return (part_start < buf_end) ? VP8_STATUS_OK :
- VP8_STATUS_SUSPENDED; // Init is ok, but there's not enough data
-}
-
-// Paragraph 9.4
-static int ParseFilterHeader(VP8BitReader* br, VP8Decoder* const dec) {
- VP8FilterHeader* const hdr = &dec->filter_hdr_;
- hdr->simple_ = VP8Get(br);
- hdr->level_ = VP8GetValue(br, 6);
- hdr->sharpness_ = VP8GetValue(br, 3);
- hdr->use_lf_delta_ = VP8Get(br);
- if (hdr->use_lf_delta_) {
- if (VP8Get(br)) { // update lf-delta?
- int i;
- for (i = 0; i < NUM_REF_LF_DELTAS; ++i) {
- if (VP8Get(br)) {
- hdr->ref_lf_delta_[i] = VP8GetSignedValue(br, 6);
- }
- }
- for (i = 0; i < NUM_MODE_LF_DELTAS; ++i) {
- if (VP8Get(br)) {
- hdr->mode_lf_delta_[i] = VP8GetSignedValue(br, 6);
- }
- }
- }
- }
- dec->filter_type_ = (hdr->level_ == 0) ? 0 : hdr->simple_ ? 1 : 2;
- if (dec->filter_type_ > 0) { // precompute filter levels per segment
- if (dec->segment_hdr_.use_segment_) {
- int s;
- for (s = 0; s < NUM_MB_SEGMENTS; ++s) {
- int strength = dec->segment_hdr_.filter_strength_[s];
- if (!dec->segment_hdr_.absolute_delta_) {
- strength += hdr->level_;
- }
- dec->filter_levels_[s] = strength;
- }
- } else {
- dec->filter_levels_[0] = hdr->level_;
- }
- }
- return !br->eof_;
-}
-
-// Topmost call
-int VP8GetHeaders(VP8Decoder* const dec, VP8Io* const io) {
- const uint8_t* buf;
- size_t buf_size;
- VP8FrameHeader* frm_hdr;
- VP8PictureHeader* pic_hdr;
- VP8BitReader* br;
- VP8StatusCode status;
- WebPHeaderStructure headers;
-
- if (dec == NULL) {
- return 0;
- }
- SetOk(dec);
- if (io == NULL) {
- return VP8SetError(dec, VP8_STATUS_INVALID_PARAM,
- "null VP8Io passed to VP8GetHeaders()");
- }
-
- // Process Pre-VP8 chunks.
- headers.data = io->data;
- headers.data_size = io->data_size;
- status = WebPParseHeaders(&headers);
- if (status != VP8_STATUS_OK) {
- return VP8SetError(dec, status, "Incorrect/incomplete header.");
- }
- if (headers.is_lossless) {
- return VP8SetError(dec, VP8_STATUS_BITSTREAM_ERROR,
- "Unexpected lossless format encountered.");
- }
-
- if (dec->alpha_data_ == NULL) {
- assert(dec->alpha_data_size_ == 0);
- // We have NOT set alpha data yet. Set it now.
- // (This is to ensure that dec->alpha_data_ is NOT reset to NULL if
- // WebPParseHeaders() is called more than once, as in incremental decoding
- // case.)
- dec->alpha_data_ = headers.alpha_data;
- dec->alpha_data_size_ = headers.alpha_data_size;
- }
-
- // Process the VP8 frame header.
- buf = headers.data + headers.offset;
- buf_size = headers.data_size - headers.offset;
- assert(headers.data_size >= headers.offset); // WebPParseHeaders' guarantee
- if (buf_size < 4) {
- return VP8SetError(dec, VP8_STATUS_NOT_ENOUGH_DATA,
- "Truncated header.");
- }
-
- // Paragraph 9.1
- {
- const uint32_t bits = buf[0] | (buf[1] << 8) | (buf[2] << 16);
- frm_hdr = &dec->frm_hdr_;
- frm_hdr->key_frame_ = !(bits & 1);
- frm_hdr->profile_ = (bits >> 1) & 7;
- frm_hdr->show_ = (bits >> 4) & 1;
- frm_hdr->partition_length_ = (bits >> 5);
- if (frm_hdr->profile_ > 3)
- return VP8SetError(dec, VP8_STATUS_BITSTREAM_ERROR,
- "Incorrect keyframe parameters.");
- if (!frm_hdr->show_)
- return VP8SetError(dec, VP8_STATUS_UNSUPPORTED_FEATURE,
- "Frame not displayable.");
- buf += 3;
- buf_size -= 3;
- }
-
- pic_hdr = &dec->pic_hdr_;
- if (frm_hdr->key_frame_) {
- // Paragraph 9.2
- if (buf_size < 7) {
- return VP8SetError(dec, VP8_STATUS_NOT_ENOUGH_DATA,
- "cannot parse picture header");
- }
- if (!VP8CheckSignature(buf, buf_size)) {
- return VP8SetError(dec, VP8_STATUS_BITSTREAM_ERROR,
- "Bad code word");
- }
- pic_hdr->width_ = ((buf[4] << 8) | buf[3]) & 0x3fff;
- pic_hdr->xscale_ = buf[4] >> 6; // ratio: 1, 5/4 5/3 or 2
- pic_hdr->height_ = ((buf[6] << 8) | buf[5]) & 0x3fff;
- pic_hdr->yscale_ = buf[6] >> 6;
- buf += 7;
- buf_size -= 7;
-
- dec->mb_w_ = (pic_hdr->width_ + 15) >> 4;
- dec->mb_h_ = (pic_hdr->height_ + 15) >> 4;
- // Setup default output area (can be later modified during io->setup())
- io->width = pic_hdr->width_;
- io->height = pic_hdr->height_;
- io->use_scaling = 0;
- io->use_cropping = 0;
- io->crop_top = 0;
- io->crop_left = 0;
- io->crop_right = io->width;
- io->crop_bottom = io->height;
- io->mb_w = io->width; // sanity check
- io->mb_h = io->height; // ditto
-
- VP8ResetProba(&dec->proba_);
- ResetSegmentHeader(&dec->segment_hdr_);
- dec->segment_ = 0; // default for intra
- }
-
- // Check if we have all the partition #0 available, and initialize dec->br_
- // to read this partition (and this partition only).
- if (frm_hdr->partition_length_ > buf_size) {
- return VP8SetError(dec, VP8_STATUS_NOT_ENOUGH_DATA,
- "bad partition length");
- }
-
- br = &dec->br_;
- VP8InitBitReader(br, buf, buf + frm_hdr->partition_length_);
- buf += frm_hdr->partition_length_;
- buf_size -= frm_hdr->partition_length_;
-
- if (frm_hdr->key_frame_) {
- pic_hdr->colorspace_ = VP8Get(br);
- pic_hdr->clamp_type_ = VP8Get(br);
- }
- if (!ParseSegmentHeader(br, &dec->segment_hdr_, &dec->proba_)) {
- return VP8SetError(dec, VP8_STATUS_BITSTREAM_ERROR,
- "cannot parse segment header");
- }
- // Filter specs
- if (!ParseFilterHeader(br, dec)) {
- return VP8SetError(dec, VP8_STATUS_BITSTREAM_ERROR,
- "cannot parse filter header");
- }
- status = ParsePartitions(dec, buf, buf_size);
- if (status != VP8_STATUS_OK) {
- return VP8SetError(dec, status, "cannot parse partitions");
- }
-
- // quantizer change
- VP8ParseQuant(dec);
-
- // Frame buffer marking
- if (!frm_hdr->key_frame_) {
- // Paragraph 9.7
-#ifndef ONLY_KEYFRAME_CODE
- dec->buffer_flags_ = VP8Get(br) << 0; // update golden
- dec->buffer_flags_ |= VP8Get(br) << 1; // update alt ref
- if (!(dec->buffer_flags_ & 1)) {
- dec->buffer_flags_ |= VP8GetValue(br, 2) << 2;
- }
- if (!(dec->buffer_flags_ & 2)) {
- dec->buffer_flags_ |= VP8GetValue(br, 2) << 4;
- }
- dec->buffer_flags_ |= VP8Get(br) << 6; // sign bias golden
- dec->buffer_flags_ |= VP8Get(br) << 7; // sign bias alt ref
-#else
- return VP8SetError(dec, VP8_STATUS_UNSUPPORTED_FEATURE,
- "Not a key frame.");
-#endif
- } else {
- dec->buffer_flags_ = 0x003 | 0x100;
- }
-
- // Paragraph 9.8
-#ifndef ONLY_KEYFRAME_CODE
- dec->update_proba_ = VP8Get(br);
- if (!dec->update_proba_) { // save for later restore
- dec->proba_saved_ = dec->proba_;
- }
- dec->buffer_flags_ &= 1 << 8;
- dec->buffer_flags_ |=
- (frm_hdr->key_frame_ || VP8Get(br)) << 8; // refresh last frame
-#else
- VP8Get(br); // just ignore the value of update_proba_
-#endif
-
- VP8ParseProba(br, dec);
-
-#ifdef WEBP_EXPERIMENTAL_FEATURES
- // Extensions
- if (dec->pic_hdr_.colorspace_) {
- const size_t kTrailerSize = 8;
- const uint8_t kTrailerMarker = 0x01;
- const uint8_t* ext_buf = buf - kTrailerSize;
- size_t size;
-
- if (frm_hdr->partition_length_ < kTrailerSize ||
- ext_buf[kTrailerSize - 1] != kTrailerMarker) {
- return VP8SetError(dec, VP8_STATUS_BITSTREAM_ERROR,
- "RIFF: Inconsistent extra information.");
- }
-
- // Layer
- size = (ext_buf[0] << 0) | (ext_buf[1] << 8) | (ext_buf[2] << 16);
- dec->layer_data_size_ = size;
- dec->layer_data_ = NULL; // will be set later
- dec->layer_colorspace_ = ext_buf[3];
- }
-#endif
-
- // sanitized state
- dec->ready_ = 1;
- return 1;
-}
-
-//------------------------------------------------------------------------------
-// Residual decoding (Paragraph 13.2 / 13.3)
-
-static const uint8_t kBands[16 + 1] = {
- 0, 1, 2, 3, 6, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7,
- 0 // extra entry as sentinel
-};
-
-static const uint8_t kCat3[] = { 173, 148, 140, 0 };
-static const uint8_t kCat4[] = { 176, 155, 140, 135, 0 };
-static const uint8_t kCat5[] = { 180, 157, 141, 134, 130, 0 };
-static const uint8_t kCat6[] =
- { 254, 254, 243, 230, 196, 177, 153, 140, 133, 130, 129, 0 };
-static const uint8_t* const kCat3456[] = { kCat3, kCat4, kCat5, kCat6 };
-static const uint8_t kZigzag[16] = {
- 0, 1, 4, 8, 5, 2, 3, 6, 9, 12, 13, 10, 7, 11, 14, 15
-};
-
-typedef const uint8_t (*ProbaArray)[NUM_CTX][NUM_PROBAS]; // for const-casting
-
-// Returns the position of the last non-zero coeff plus one
-// (and 0 if there's no coeff at all)
-static int GetCoeffs(VP8BitReader* const br, ProbaArray prob,
- int ctx, const quant_t dq, int n, int16_t* out) {
- // n is either 0 or 1 here. kBands[n] is not necessary for extracting '*p'.
- const uint8_t* p = prob[n][ctx];
- if (!VP8GetBit(br, p[0])) { // first EOB is more a 'CBP' bit.
- return 0;
- }
- while (1) {
- ++n;
- if (!VP8GetBit(br, p[1])) {
- p = prob[kBands[n]][0];
- } else { // non zero coeff
- int v, j;
- if (!VP8GetBit(br, p[2])) {
- p = prob[kBands[n]][1];
- v = 1;
- } else {
- if (!VP8GetBit(br, p[3])) {
- if (!VP8GetBit(br, p[4])) {
- v = 2;
- } else {
- v = 3 + VP8GetBit(br, p[5]);
- }
- } else {
- if (!VP8GetBit(br, p[6])) {
- if (!VP8GetBit(br, p[7])) {
- v = 5 + VP8GetBit(br, 159);
- } else {
- v = 7 + 2 * VP8GetBit(br, 165);
- v += VP8GetBit(br, 145);
- }
- } else {
- const uint8_t* tab;
- const int bit1 = VP8GetBit(br, p[8]);
- const int bit0 = VP8GetBit(br, p[9 + bit1]);
- const int cat = 2 * bit1 + bit0;
- v = 0;
- for (tab = kCat3456[cat]; *tab; ++tab) {
- v += v + VP8GetBit(br, *tab);
- }
- v += 3 + (8 << cat);
- }
- }
- p = prob[kBands[n]][2];
- }
- j = kZigzag[n - 1];
- out[j] = VP8GetSigned(br, v) * dq[j > 0];
- if (n == 16 || !VP8GetBit(br, p[0])) { // EOB
- return n;
- }
- }
- if (n == 16) {
- return 16;
- }
- }
-}
-
-// Alias-safe way of converting 4bytes to 32bits.
-typedef union {
- uint8_t i8[4];
- uint32_t i32;
-} PackedNz;
-
-// Table to unpack four bits into four bytes
-static const PackedNz kUnpackTab[16] = {
- {{0, 0, 0, 0}}, {{1, 0, 0, 0}}, {{0, 1, 0, 0}}, {{1, 1, 0, 0}},
- {{0, 0, 1, 0}}, {{1, 0, 1, 0}}, {{0, 1, 1, 0}}, {{1, 1, 1, 0}},
- {{0, 0, 0, 1}}, {{1, 0, 0, 1}}, {{0, 1, 0, 1}}, {{1, 1, 0, 1}},
- {{0, 0, 1, 1}}, {{1, 0, 1, 1}}, {{0, 1, 1, 1}}, {{1, 1, 1, 1}} };
-
-// Macro to pack four LSB of four bytes into four bits.
-#if defined(__PPC__) || defined(_M_PPC) || defined(_ARCH_PPC) || \
- defined(__BIG_ENDIAN__)
-#define PACK_CST 0x08040201U
-#else
-#define PACK_CST 0x01020408U
-#endif
-#define PACK(X, S) ((((X).i32 * PACK_CST) & 0xff000000) >> (S))
-
-static void ParseResiduals(VP8Decoder* const dec,
- VP8MB* const mb, VP8BitReader* const token_br) {
- int out_t_nz, out_l_nz, first;
- ProbaArray ac_prob;
- const VP8QuantMatrix* q = &dec->dqm_[dec->segment_];
- int16_t* dst = dec->coeffs_;
- VP8MB* const left_mb = dec->mb_info_ - 1;
- PackedNz nz_ac, nz_dc;
- PackedNz tnz, lnz;
- uint32_t non_zero_ac = 0;
- uint32_t non_zero_dc = 0;
- int x, y, ch;
-
- nz_dc.i32 = nz_ac.i32 = 0;
- memset(dst, 0, 384 * sizeof(*dst));
- if (!dec->is_i4x4_) { // parse DC
- int16_t dc[16] = { 0 };
- const int ctx = mb->dc_nz_ + left_mb->dc_nz_;
- mb->dc_nz_ = left_mb->dc_nz_ =
- (GetCoeffs(token_br, (ProbaArray)dec->proba_.coeffs_[1],
- ctx, q->y2_mat_, 0, dc) > 0);
- first = 1;
- ac_prob = (ProbaArray)dec->proba_.coeffs_[0];
- VP8TransformWHT(dc, dst);
- } else {
- first = 0;
- ac_prob = (ProbaArray)dec->proba_.coeffs_[3];
- }
-
- tnz = kUnpackTab[mb->nz_ & 0xf];
- lnz = kUnpackTab[left_mb->nz_ & 0xf];
- for (y = 0; y < 4; ++y) {
- int l = lnz.i8[y];
- for (x = 0; x < 4; ++x) {
- const int ctx = l + tnz.i8[x];
- const int nz = GetCoeffs(token_br, ac_prob, ctx,
- q->y1_mat_, first, dst);
- tnz.i8[x] = l = (nz > 0);
- nz_dc.i8[x] = (dst[0] != 0);
- nz_ac.i8[x] = (nz > 1);
- dst += 16;
- }
- lnz.i8[y] = l;
- non_zero_dc |= PACK(nz_dc, 24 - y * 4);
- non_zero_ac |= PACK(nz_ac, 24 - y * 4);
- }
- out_t_nz = PACK(tnz, 24);
- out_l_nz = PACK(lnz, 24);
-
- tnz = kUnpackTab[mb->nz_ >> 4];
- lnz = kUnpackTab[left_mb->nz_ >> 4];
- for (ch = 0; ch < 4; ch += 2) {
- for (y = 0; y < 2; ++y) {
- int l = lnz.i8[ch + y];
- for (x = 0; x < 2; ++x) {
- const int ctx = l + tnz.i8[ch + x];
- const int nz =
- GetCoeffs(token_br, (ProbaArray)dec->proba_.coeffs_[2],
- ctx, q->uv_mat_, 0, dst);
- tnz.i8[ch + x] = l = (nz > 0);
- nz_dc.i8[y * 2 + x] = (dst[0] != 0);
- nz_ac.i8[y * 2 + x] = (nz > 1);
- dst += 16;
- }
- lnz.i8[ch + y] = l;
- }
- non_zero_dc |= PACK(nz_dc, 8 - ch * 2);
- non_zero_ac |= PACK(nz_ac, 8 - ch * 2);
- }
- out_t_nz |= PACK(tnz, 20);
- out_l_nz |= PACK(lnz, 20);
- mb->nz_ = out_t_nz;
- left_mb->nz_ = out_l_nz;
-
- dec->non_zero_ac_ = non_zero_ac;
- dec->non_zero_ = non_zero_ac | non_zero_dc;
- mb->skip_ = !dec->non_zero_;
-}
-#undef PACK
-
-//------------------------------------------------------------------------------
-// Main loop
-
-int VP8DecodeMB(VP8Decoder* const dec, VP8BitReader* const token_br) {
- VP8BitReader* const br = &dec->br_;
- VP8MB* const left = dec->mb_info_ - 1;
- VP8MB* const info = dec->mb_info_ + dec->mb_x_;
-
- // Note: we don't save segment map (yet), as we don't expect
- // to decode more than 1 keyframe.
- if (dec->segment_hdr_.update_map_) {
- // Hardcoded tree parsing
- dec->segment_ = !VP8GetBit(br, dec->proba_.segments_[0]) ?
- VP8GetBit(br, dec->proba_.segments_[1]) :
- 2 + VP8GetBit(br, dec->proba_.segments_[2]);
- }
- info->skip_ = dec->use_skip_proba_ ? VP8GetBit(br, dec->skip_p_) : 0;
-
- VP8ParseIntraMode(br, dec);
- if (br->eof_) {
- return 0;
- }
-
- if (!info->skip_) {
- ParseResiduals(dec, info, token_br);
- } else {
- left->nz_ = info->nz_ = 0;
- if (!dec->is_i4x4_) {
- left->dc_nz_ = info->dc_nz_ = 0;
- }
- dec->non_zero_ = 0;
- dec->non_zero_ac_ = 0;
- }
-
- return (!token_br->eof_);
-}
-
-void VP8InitScanline(VP8Decoder* const dec) {
- VP8MB* const left = dec->mb_info_ - 1;
- left->nz_ = 0;
- left->dc_nz_ = 0;
- memset(dec->intra_l_, B_DC_PRED, sizeof(dec->intra_l_));
- dec->filter_row_ =
- (dec->filter_type_ > 0) &&
- (dec->mb_y_ >= dec->tl_mb_y_) && (dec->mb_y_ <= dec->br_mb_y_);
-}
-
-static int ParseFrame(VP8Decoder* const dec, VP8Io* io) {
- for (dec->mb_y_ = 0; dec->mb_y_ < dec->br_mb_y_; ++dec->mb_y_) {
- VP8BitReader* const token_br =
- &dec->parts_[dec->mb_y_ & (dec->num_parts_ - 1)];
- VP8InitScanline(dec);
- for (dec->mb_x_ = 0; dec->mb_x_ < dec->mb_w_; dec->mb_x_++) {
- if (!VP8DecodeMB(dec, token_br)) {
- return VP8SetError(dec, VP8_STATUS_NOT_ENOUGH_DATA,
- "Premature end-of-file encountered.");
- }
- VP8ReconstructBlock(dec);
-
- // Store data and save block's filtering params
- VP8StoreBlock(dec);
- }
- if (!VP8ProcessRow(dec, io)) {
- return VP8SetError(dec, VP8_STATUS_USER_ABORT, "Output aborted.");
- }
- }
- if (dec->use_threads_ && !WebPWorkerSync(&dec->worker_)) {
- return 0;
- }
-
- // Finish
-#ifndef ONLY_KEYFRAME_CODE
- if (!dec->update_proba_) {
- dec->proba_ = dec->proba_saved_;
- }
-#endif
-
-#ifdef WEBP_EXPERIMENTAL_FEATURES
- if (dec->layer_data_size_ > 0) {
- if (!VP8DecodeLayer(dec)) {
- return 0;
- }
- }
-#endif
-
- return 1;
-}
-
-// Main entry point
-int VP8Decode(VP8Decoder* const dec, VP8Io* const io) {
- int ok = 0;
- if (dec == NULL) {
- return 0;
- }
- if (io == NULL) {
- return VP8SetError(dec, VP8_STATUS_INVALID_PARAM,
- "NULL VP8Io parameter in VP8Decode().");
- }
-
- if (!dec->ready_) {
- if (!VP8GetHeaders(dec, io)) {
- return 0;
- }
- }
- assert(dec->ready_);
-
- // Finish setting up the decoding parameter. Will call io->setup().
- ok = (VP8EnterCritical(dec, io) == VP8_STATUS_OK);
- if (ok) { // good to go.
- // Will allocate memory and prepare everything.
- if (ok) ok = VP8InitFrame(dec, io);
-
- // Main decoding loop
- if (ok) ok = ParseFrame(dec, io);
-
- // Exit.
- ok &= VP8ExitCritical(dec, io);
- }
-
- if (!ok) {
- VP8Clear(dec);
- return 0;
- }
-
- dec->ready_ = 0;
- return ok;
-}
-
-void VP8Clear(VP8Decoder* const dec) {
- if (dec == NULL) {
- return;
- }
- if (dec->use_threads_) {
- WebPWorkerEnd(&dec->worker_);
- }
- if (dec->mem_) {
- free(dec->mem_);
- }
- dec->mem_ = NULL;
- dec->mem_size_ = 0;
- memset(&dec->br_, 0, sizeof(dec->br_));
- dec->ready_ = 0;
-}
-
-//------------------------------------------------------------------------------
-
-#if defined(__cplusplus) || defined(c_plusplus)
-} // extern "C"
-#endif
diff --git a/drivers/webpold/dec/vp8i.h b/drivers/webpold/dec/vp8i.h
deleted file mode 100644
index 4382edfd8e..0000000000
--- a/drivers/webpold/dec/vp8i.h
+++ /dev/null
@@ -1,335 +0,0 @@
-// Copyright 2010 Google Inc. All Rights Reserved.
-//
-// This code is licensed under the same terms as WebM:
-// Software License Agreement: http://www.webmproject.org/license/software/
-// Additional IP Rights Grant: http://www.webmproject.org/license/additional/
-// -----------------------------------------------------------------------------
-//
-// VP8 decoder: internal header.
-//
-// Author: Skal (pascal.massimino@gmail.com)
-
-#ifndef WEBP_DEC_VP8I_H_
-#define WEBP_DEC_VP8I_H_
-
-#include <string.h> // for memcpy()
-#include "./vp8li.h"
-#include "../utils/bit_reader.h"
-#include "../utils/thread.h"
-#include "../dsp/dsp.h"
-
-#if defined(__cplusplus) || defined(c_plusplus)
-extern "C" {
-#endif
-
-//------------------------------------------------------------------------------
-// Various defines and enums
-
-// version numbers
-#define DEC_MAJ_VERSION 0
-#define DEC_MIN_VERSION 2
-#define DEC_REV_VERSION 0
-
-#define ONLY_KEYFRAME_CODE // to remove any code related to P-Frames
-
-// intra prediction modes
-enum { B_DC_PRED = 0, // 4x4 modes
- B_TM_PRED,
- B_VE_PRED,
- B_HE_PRED,
- B_RD_PRED,
- B_VR_PRED,
- B_LD_PRED,
- B_VL_PRED,
- B_HD_PRED,
- B_HU_PRED,
- NUM_BMODES = B_HU_PRED + 1 - B_DC_PRED, // = 10
-
- // Luma16 or UV modes
- DC_PRED = B_DC_PRED, V_PRED = B_VE_PRED,
- H_PRED = B_HE_PRED, TM_PRED = B_TM_PRED,
- B_PRED = NUM_BMODES, // refined I4x4 mode
-
- // special modes
- B_DC_PRED_NOTOP = 4,
- B_DC_PRED_NOLEFT = 5,
- B_DC_PRED_NOTOPLEFT = 6,
- NUM_B_DC_MODES = 7 };
-
-enum { MB_FEATURE_TREE_PROBS = 3,
- NUM_MB_SEGMENTS = 4,
- NUM_REF_LF_DELTAS = 4,
- NUM_MODE_LF_DELTAS = 4, // I4x4, ZERO, *, SPLIT
- MAX_NUM_PARTITIONS = 8,
- // Probabilities
- NUM_TYPES = 4,
- NUM_BANDS = 8,
- NUM_CTX = 3,
- NUM_PROBAS = 11,
- NUM_MV_PROBAS = 19 };
-
-// YUV-cache parameters.
-// Constraints are: We need to store one 16x16 block of luma samples (y),
-// and two 8x8 chroma blocks (u/v). These are better be 16-bytes aligned,
-// in order to be SIMD-friendly. We also need to store the top, left and
-// top-left samples (from previously decoded blocks), along with four
-// extra top-right samples for luma (intra4x4 prediction only).
-// One possible layout is, using 32 * (17 + 9) bytes:
-//
-// .+------ <- only 1 pixel high
-// .|yyyyt.
-// .|yyyyt.
-// .|yyyyt.
-// .|yyyy..
-// .+--.+-- <- only 1 pixel high
-// .|uu.|vv
-// .|uu.|vv
-//
-// Every character is a 4x4 block, with legend:
-// '.' = unused
-// 'y' = y-samples 'u' = u-samples 'v' = u-samples
-// '|' = left sample, '-' = top sample, '+' = top-left sample
-// 't' = extra top-right sample for 4x4 modes
-// With this layout, BPS (=Bytes Per Scan-line) is one cacheline size.
-#define BPS 32 // this is the common stride used by yuv[]
-#define YUV_SIZE (BPS * 17 + BPS * 9)
-#define Y_SIZE (BPS * 17)
-#define Y_OFF (BPS * 1 + 8)
-#define U_OFF (Y_OFF + BPS * 16 + BPS)
-#define V_OFF (U_OFF + 16)
-
-//------------------------------------------------------------------------------
-// Headers
-
-typedef struct {
- uint8_t key_frame_;
- uint8_t profile_;
- uint8_t show_;
- uint32_t partition_length_;
-} VP8FrameHeader;
-
-typedef struct {
- uint16_t width_;
- uint16_t height_;
- uint8_t xscale_;
- uint8_t yscale_;
- uint8_t colorspace_; // 0 = YCbCr
- uint8_t clamp_type_;
-} VP8PictureHeader;
-
-// segment features
-typedef struct {
- int use_segment_;
- int update_map_; // whether to update the segment map or not
- int absolute_delta_; // absolute or delta values for quantizer and filter
- int8_t quantizer_[NUM_MB_SEGMENTS]; // quantization changes
- int8_t filter_strength_[NUM_MB_SEGMENTS]; // filter strength for segments
-} VP8SegmentHeader;
-
-// Struct collecting all frame-persistent probabilities.
-typedef struct {
- uint8_t segments_[MB_FEATURE_TREE_PROBS];
- // Type: 0:Intra16-AC 1:Intra16-DC 2:Chroma 3:Intra4
- uint8_t coeffs_[NUM_TYPES][NUM_BANDS][NUM_CTX][NUM_PROBAS];
-#ifndef ONLY_KEYFRAME_CODE
- uint8_t ymode_[4], uvmode_[3];
- uint8_t mv_[2][NUM_MV_PROBAS];
-#endif
-} VP8Proba;
-
-// Filter parameters
-typedef struct {
- int simple_; // 0=complex, 1=simple
- int level_; // [0..63]
- int sharpness_; // [0..7]
- int use_lf_delta_;
- int ref_lf_delta_[NUM_REF_LF_DELTAS];
- int mode_lf_delta_[NUM_MODE_LF_DELTAS];
-} VP8FilterHeader;
-
-//------------------------------------------------------------------------------
-// Informations about the macroblocks.
-
-typedef struct { // filter specs
- unsigned int f_level_:6; // filter strength: 0..63
- unsigned int f_ilevel_:6; // inner limit: 1..63
- unsigned int f_inner_:1; // do inner filtering?
-} VP8FInfo;
-
-typedef struct { // used for syntax-parsing
- unsigned int nz_; // non-zero AC/DC coeffs
- unsigned int dc_nz_:1; // non-zero DC coeffs
- unsigned int skip_:1; // block type
-} VP8MB;
-
-// Dequantization matrices
-typedef int quant_t[2]; // [DC / AC]. Can be 'uint16_t[2]' too (~slower).
-typedef struct {
- quant_t y1_mat_, y2_mat_, uv_mat_;
-} VP8QuantMatrix;
-
-// Persistent information needed by the parallel processing
-typedef struct {
- int id_; // cache row to process (in [0..2])
- int mb_y_; // macroblock position of the row
- int filter_row_; // true if row-filtering is needed
- VP8FInfo* f_info_; // filter strengths
- VP8Io io_; // copy of the VP8Io to pass to put()
-} VP8ThreadContext;
-
-//------------------------------------------------------------------------------
-// VP8Decoder: the main opaque structure handed over to user
-
-struct VP8Decoder {
- VP8StatusCode status_;
- int ready_; // true if ready to decode a picture with VP8Decode()
- const char* error_msg_; // set when status_ is not OK.
-
- // Main data source
- VP8BitReader br_;
-
- // headers
- VP8FrameHeader frm_hdr_;
- VP8PictureHeader pic_hdr_;
- VP8FilterHeader filter_hdr_;
- VP8SegmentHeader segment_hdr_;
-
- // Worker
- WebPWorker worker_;
- int use_threads_; // use multi-thread
- int cache_id_; // current cache row
- int num_caches_; // number of cached rows of 16 pixels (1, 2 or 3)
- VP8ThreadContext thread_ctx_; // Thread context
-
- // dimension, in macroblock units.
- int mb_w_, mb_h_;
-
- // Macroblock to process/filter, depending on cropping and filter_type.
- int tl_mb_x_, tl_mb_y_; // top-left MB that must be in-loop filtered
- int br_mb_x_, br_mb_y_; // last bottom-right MB that must be decoded
-
- // number of partitions.
- int num_parts_;
- // per-partition boolean decoders.
- VP8BitReader parts_[MAX_NUM_PARTITIONS];
-
- // buffer refresh flags
- // bit 0: refresh Gold, bit 1: refresh Alt
- // bit 2-3: copy to Gold, bit 4-5: copy to Alt
- // bit 6: Gold sign bias, bit 7: Alt sign bias
- // bit 8: refresh last frame
- uint32_t buffer_flags_;
-
- // dequantization (one set of DC/AC dequant factor per segment)
- VP8QuantMatrix dqm_[NUM_MB_SEGMENTS];
-
- // probabilities
- VP8Proba proba_;
- int use_skip_proba_;
- uint8_t skip_p_;
-#ifndef ONLY_KEYFRAME_CODE
- uint8_t intra_p_, last_p_, golden_p_;
- VP8Proba proba_saved_;
- int update_proba_;
-#endif
-
- // Boundary data cache and persistent buffers.
- uint8_t* intra_t_; // top intra modes values: 4 * mb_w_
- uint8_t intra_l_[4]; // left intra modes values
- uint8_t* y_t_; // top luma samples: 16 * mb_w_
- uint8_t* u_t_, *v_t_; // top u/v samples: 8 * mb_w_ each
-
- VP8MB* mb_info_; // contextual macroblock info (mb_w_ + 1)
- VP8FInfo* f_info_; // filter strength info
- uint8_t* yuv_b_; // main block for Y/U/V (size = YUV_SIZE)
- int16_t* coeffs_; // 384 coeffs = (16+8+8) * 4*4
-
- uint8_t* cache_y_; // macroblock row for storing unfiltered samples
- uint8_t* cache_u_;
- uint8_t* cache_v_;
- int cache_y_stride_;
- int cache_uv_stride_;
-
- // main memory chunk for the above data. Persistent.
- void* mem_;
- size_t mem_size_;
-
- // Per macroblock non-persistent infos.
- int mb_x_, mb_y_; // current position, in macroblock units
- uint8_t is_i4x4_; // true if intra4x4
- uint8_t imodes_[16]; // one 16x16 mode (#0) or sixteen 4x4 modes
- uint8_t uvmode_; // chroma prediction mode
- uint8_t segment_; // block's segment
-
- // bit-wise info about the content of each sub-4x4 blocks: there are 16 bits
- // for luma (bits #0->#15), then 4 bits for chroma-u (#16->#19) and 4 bits for
- // chroma-v (#20->#23), each corresponding to one 4x4 block in decoding order.
- // If the bit is set, the 4x4 block contains some non-zero coefficients.
- uint32_t non_zero_;
- uint32_t non_zero_ac_;
-
- // Filtering side-info
- int filter_type_; // 0=off, 1=simple, 2=complex
- int filter_row_; // per-row flag
- uint8_t filter_levels_[NUM_MB_SEGMENTS]; // precalculated per-segment
-
- // extensions
- const uint8_t* alpha_data_; // compressed alpha data (if present)
- size_t alpha_data_size_;
- uint8_t* alpha_plane_; // output. Persistent, contains the whole data.
-
- int layer_colorspace_;
- const uint8_t* layer_data_; // compressed layer data (if present)
- size_t layer_data_size_;
-};
-
-//------------------------------------------------------------------------------
-// internal functions. Not public.
-
-// in vp8.c
-int VP8SetError(VP8Decoder* const dec,
- VP8StatusCode error, const char* const msg);
-
-// in tree.c
-void VP8ResetProba(VP8Proba* const proba);
-void VP8ParseProba(VP8BitReader* const br, VP8Decoder* const dec);
-void VP8ParseIntraMode(VP8BitReader* const br, VP8Decoder* const dec);
-
-// in quant.c
-void VP8ParseQuant(VP8Decoder* const dec);
-
-// in frame.c
-int VP8InitFrame(VP8Decoder* const dec, VP8Io* io);
-// Predict a block and add residual
-void VP8ReconstructBlock(VP8Decoder* const dec);
-// Call io->setup() and finish setting up scan parameters.
-// After this call returns, one must always call VP8ExitCritical() with the
-// same parameters. Both functions should be used in pair. Returns VP8_STATUS_OK
-// if ok, otherwise sets and returns the error status on *dec.
-VP8StatusCode VP8EnterCritical(VP8Decoder* const dec, VP8Io* const io);
-// Must always be called in pair with VP8EnterCritical().
-// Returns false in case of error.
-int VP8ExitCritical(VP8Decoder* const dec, VP8Io* const io);
-// Process the last decoded row (filtering + output)
-int VP8ProcessRow(VP8Decoder* const dec, VP8Io* const io);
-// Store a block, along with filtering params
-void VP8StoreBlock(VP8Decoder* const dec);
-// To be called at the start of a new scanline, to initialize predictors.
-void VP8InitScanline(VP8Decoder* const dec);
-// Decode one macroblock. Returns false if there is not enough data.
-int VP8DecodeMB(VP8Decoder* const dec, VP8BitReader* const token_br);
-
-// in alpha.c
-const uint8_t* VP8DecompressAlphaRows(VP8Decoder* const dec,
- int row, int num_rows);
-
-// in layer.c
-int VP8DecodeLayer(VP8Decoder* const dec);
-
-//------------------------------------------------------------------------------
-
-#if defined(__cplusplus) || defined(c_plusplus)
-} // extern "C"
-#endif
-
-#endif /* WEBP_DEC_VP8I_H_ */
diff --git a/drivers/webpold/dec/vp8l.c b/drivers/webpold/dec/vp8l.c
deleted file mode 100644
index 897e4395c7..0000000000
--- a/drivers/webpold/dec/vp8l.c
+++ /dev/null
@@ -1,1200 +0,0 @@
-// Copyright 2012 Google Inc. All Rights Reserved.
-//
-// This code is licensed under the same terms as WebM:
-// Software License Agreement: http://www.webmproject.org/license/software/
-// Additional IP Rights Grant: http://www.webmproject.org/license/additional/
-// -----------------------------------------------------------------------------
-//
-// main entry for the decoder
-//
-// Authors: Vikas Arora (vikaas.arora@gmail.com)
-// Jyrki Alakuijala (jyrki@google.com)
-
-#include <stdio.h>
-#include <stdlib.h>
-#include "./vp8li.h"
-#include "../dsp/lossless.h"
-#include "../dsp/yuv.h"
-#include "../utils/huffman.h"
-#include "../utils/utils.h"
-
-#if defined(__cplusplus) || defined(c_plusplus)
-extern "C" {
-#endif
-
-#define NUM_ARGB_CACHE_ROWS 16
-
-static const int kCodeLengthLiterals = 16;
-static const int kCodeLengthRepeatCode = 16;
-static const int kCodeLengthExtraBits[3] = { 2, 3, 7 };
-static const int kCodeLengthRepeatOffsets[3] = { 3, 3, 11 };
-
-// -----------------------------------------------------------------------------
-// Five Huffman codes are used at each meta code:
-// 1. green + length prefix codes + color cache codes,
-// 2. alpha,
-// 3. red,
-// 4. blue, and,
-// 5. distance prefix codes.
-typedef enum {
- GREEN = 0,
- RED = 1,
- BLUE = 2,
- ALPHA = 3,
- DIST = 4
-} HuffIndex;
-
-static const uint16_t kAlphabetSize[HUFFMAN_CODES_PER_META_CODE] = {
- NUM_LITERAL_CODES + NUM_LENGTH_CODES,
- NUM_LITERAL_CODES, NUM_LITERAL_CODES, NUM_LITERAL_CODES,
- NUM_DISTANCE_CODES
-};
-
-
-#define NUM_CODE_LENGTH_CODES 19
-static const uint8_t kCodeLengthCodeOrder[NUM_CODE_LENGTH_CODES] = {
- 17, 18, 0, 1, 2, 3, 4, 5, 16, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15
-};
-
-#define CODE_TO_PLANE_CODES 120
-static const uint8_t code_to_plane_lut[CODE_TO_PLANE_CODES] = {
- 0x18, 0x07, 0x17, 0x19, 0x28, 0x06, 0x27, 0x29, 0x16, 0x1a,
- 0x26, 0x2a, 0x38, 0x05, 0x37, 0x39, 0x15, 0x1b, 0x36, 0x3a,
- 0x25, 0x2b, 0x48, 0x04, 0x47, 0x49, 0x14, 0x1c, 0x35, 0x3b,
- 0x46, 0x4a, 0x24, 0x2c, 0x58, 0x45, 0x4b, 0x34, 0x3c, 0x03,
- 0x57, 0x59, 0x13, 0x1d, 0x56, 0x5a, 0x23, 0x2d, 0x44, 0x4c,
- 0x55, 0x5b, 0x33, 0x3d, 0x68, 0x02, 0x67, 0x69, 0x12, 0x1e,
- 0x66, 0x6a, 0x22, 0x2e, 0x54, 0x5c, 0x43, 0x4d, 0x65, 0x6b,
- 0x32, 0x3e, 0x78, 0x01, 0x77, 0x79, 0x53, 0x5d, 0x11, 0x1f,
- 0x64, 0x6c, 0x42, 0x4e, 0x76, 0x7a, 0x21, 0x2f, 0x75, 0x7b,
- 0x31, 0x3f, 0x63, 0x6d, 0x52, 0x5e, 0x00, 0x74, 0x7c, 0x41,
- 0x4f, 0x10, 0x20, 0x62, 0x6e, 0x30, 0x73, 0x7d, 0x51, 0x5f,
- 0x40, 0x72, 0x7e, 0x61, 0x6f, 0x50, 0x71, 0x7f, 0x60, 0x70
-};
-
-static int DecodeImageStream(int xsize, int ysize,
- int is_level0,
- VP8LDecoder* const dec,
- uint32_t** const decoded_data);
-
-//------------------------------------------------------------------------------
-
-int VP8LCheckSignature(const uint8_t* const data, size_t size) {
- return (size >= 1) && (data[0] == VP8L_MAGIC_BYTE);
-}
-
-static int ReadImageInfo(VP8LBitReader* const br,
- int* const width, int* const height,
- int* const has_alpha) {
- const uint8_t signature = VP8LReadBits(br, 8);
- if (!VP8LCheckSignature(&signature, 1)) {
- return 0;
- }
- *width = VP8LReadBits(br, VP8L_IMAGE_SIZE_BITS) + 1;
- *height = VP8LReadBits(br, VP8L_IMAGE_SIZE_BITS) + 1;
- *has_alpha = VP8LReadBits(br, 1);
- VP8LReadBits(br, VP8L_VERSION_BITS); // Read/ignore the version number.
- return 1;
-}
-
-int VP8LGetInfo(const uint8_t* data, size_t data_size,
- int* const width, int* const height, int* const has_alpha) {
- if (data == NULL || data_size < VP8L_FRAME_HEADER_SIZE) {
- return 0; // not enough data
- } else {
- int w, h, a;
- VP8LBitReader br;
- VP8LInitBitReader(&br, data, data_size);
- if (!ReadImageInfo(&br, &w, &h, &a)) {
- return 0;
- }
- if (width != NULL) *width = w;
- if (height != NULL) *height = h;
- if (has_alpha != NULL) *has_alpha = a;
- return 1;
- }
-}
-
-//------------------------------------------------------------------------------
-
-static WEBP_INLINE int GetCopyDistance(int distance_symbol,
- VP8LBitReader* const br) {
- int extra_bits, offset;
- if (distance_symbol < 4) {
- return distance_symbol + 1;
- }
- extra_bits = (distance_symbol - 2) >> 1;
- offset = (2 + (distance_symbol & 1)) << extra_bits;
- return offset + VP8LReadBits(br, extra_bits) + 1;
-}
-
-static WEBP_INLINE int GetCopyLength(int length_symbol,
- VP8LBitReader* const br) {
- // Length and distance prefixes are encoded the same way.
- return GetCopyDistance(length_symbol, br);
-}
-
-static WEBP_INLINE int PlaneCodeToDistance(int xsize, int plane_code) {
- if (plane_code > CODE_TO_PLANE_CODES) {
- return plane_code - CODE_TO_PLANE_CODES;
- } else {
- const int dist_code = code_to_plane_lut[plane_code - 1];
- const int yoffset = dist_code >> 4;
- const int xoffset = 8 - (dist_code & 0xf);
- const int dist = yoffset * xsize + xoffset;
- return (dist >= 1) ? dist : 1;
- }
-}
-
-//------------------------------------------------------------------------------
-// Decodes the next Huffman code from bit-stream.
-// FillBitWindow(br) needs to be called at minimum every second call
-// to ReadSymbolUnsafe.
-static int ReadSymbolUnsafe(const HuffmanTree* tree, VP8LBitReader* const br) {
- const HuffmanTreeNode* node = tree->root_;
- assert(node != NULL);
- while (!HuffmanTreeNodeIsLeaf(node)) {
- node = HuffmanTreeNextNode(node, VP8LReadOneBitUnsafe(br));
- }
- return node->symbol_;
-}
-
-static WEBP_INLINE int ReadSymbol(const HuffmanTree* tree,
- VP8LBitReader* const br) {
- const int read_safe = (br->pos_ + 8 > br->len_);
- if (!read_safe) {
- return ReadSymbolUnsafe(tree, br);
- } else {
- const HuffmanTreeNode* node = tree->root_;
- assert(node != NULL);
- while (!HuffmanTreeNodeIsLeaf(node)) {
- node = HuffmanTreeNextNode(node, VP8LReadOneBit(br));
- }
- return node->symbol_;
- }
-}
-
-static int ReadHuffmanCodeLengths(
- VP8LDecoder* const dec, const int* const code_length_code_lengths,
- int num_symbols, int* const code_lengths) {
- int ok = 0;
- VP8LBitReader* const br = &dec->br_;
- int symbol;
- int max_symbol;
- int prev_code_len = DEFAULT_CODE_LENGTH;
- HuffmanTree tree;
-
- if (!HuffmanTreeBuildImplicit(&tree, code_length_code_lengths,
- NUM_CODE_LENGTH_CODES)) {
- dec->status_ = VP8_STATUS_BITSTREAM_ERROR;
- return 0;
- }
-
- if (VP8LReadBits(br, 1)) { // use length
- const int length_nbits = 2 + 2 * VP8LReadBits(br, 3);
- max_symbol = 2 + VP8LReadBits(br, length_nbits);
- if (max_symbol > num_symbols) {
- dec->status_ = VP8_STATUS_BITSTREAM_ERROR;
- goto End;
- }
- } else {
- max_symbol = num_symbols;
- }
-
- symbol = 0;
- while (symbol < num_symbols) {
- int code_len;
- if (max_symbol-- == 0) break;
- VP8LFillBitWindow(br);
- code_len = ReadSymbol(&tree, br);
- if (code_len < kCodeLengthLiterals) {
- code_lengths[symbol++] = code_len;
- if (code_len != 0) prev_code_len = code_len;
- } else {
- const int use_prev = (code_len == kCodeLengthRepeatCode);
- const int slot = code_len - kCodeLengthLiterals;
- const int extra_bits = kCodeLengthExtraBits[slot];
- const int repeat_offset = kCodeLengthRepeatOffsets[slot];
- int repeat = VP8LReadBits(br, extra_bits) + repeat_offset;
- if (symbol + repeat > num_symbols) {
- dec->status_ = VP8_STATUS_BITSTREAM_ERROR;
- goto End;
- } else {
- const int length = use_prev ? prev_code_len : 0;
- while (repeat-- > 0) code_lengths[symbol++] = length;
- }
- }
- }
- ok = 1;
-
- End:
- HuffmanTreeRelease(&tree);
- return ok;
-}
-
-static int ReadHuffmanCode(int alphabet_size, VP8LDecoder* const dec,
- HuffmanTree* const tree) {
- int ok = 0;
- VP8LBitReader* const br = &dec->br_;
- const int simple_code = VP8LReadBits(br, 1);
-
- if (simple_code) { // Read symbols, codes & code lengths directly.
- int symbols[2];
- int codes[2];
- int code_lengths[2];
- const int num_symbols = VP8LReadBits(br, 1) + 1;
- const int first_symbol_len_code = VP8LReadBits(br, 1);
- // The first code is either 1 bit or 8 bit code.
- symbols[0] = VP8LReadBits(br, (first_symbol_len_code == 0) ? 1 : 8);
- codes[0] = 0;
- code_lengths[0] = num_symbols - 1;
- // The second code (if present), is always 8 bit long.
- if (num_symbols == 2) {
- symbols[1] = VP8LReadBits(br, 8);
- codes[1] = 1;
- code_lengths[1] = num_symbols - 1;
- }
- ok = HuffmanTreeBuildExplicit(tree, code_lengths, codes, symbols,
- alphabet_size, num_symbols);
- } else { // Decode Huffman-coded code lengths.
- int* code_lengths = NULL;
- int i;
- int code_length_code_lengths[NUM_CODE_LENGTH_CODES] = { 0 };
- const int num_codes = VP8LReadBits(br, 4) + 4;
- if (num_codes > NUM_CODE_LENGTH_CODES) {
- dec->status_ = VP8_STATUS_BITSTREAM_ERROR;
- return 0;
- }
-
- code_lengths =
- (int*)WebPSafeCalloc((uint64_t)alphabet_size, sizeof(*code_lengths));
- if (code_lengths == NULL) {
- dec->status_ = VP8_STATUS_OUT_OF_MEMORY;
- return 0;
- }
-
- for (i = 0; i < num_codes; ++i) {
- code_length_code_lengths[kCodeLengthCodeOrder[i]] = VP8LReadBits(br, 3);
- }
- ok = ReadHuffmanCodeLengths(dec, code_length_code_lengths, alphabet_size,
- code_lengths);
- if (ok) {
- ok = HuffmanTreeBuildImplicit(tree, code_lengths, alphabet_size);
- }
- free(code_lengths);
- }
- ok = ok && !br->error_;
- if (!ok) {
- dec->status_ = VP8_STATUS_BITSTREAM_ERROR;
- return 0;
- }
- return 1;
-}
-
-static void DeleteHtreeGroups(HTreeGroup* htree_groups, int num_htree_groups) {
- if (htree_groups != NULL) {
- int i, j;
- for (i = 0; i < num_htree_groups; ++i) {
- HuffmanTree* const htrees = htree_groups[i].htrees_;
- for (j = 0; j < HUFFMAN_CODES_PER_META_CODE; ++j) {
- HuffmanTreeRelease(&htrees[j]);
- }
- }
- free(htree_groups);
- }
-}
-
-static int ReadHuffmanCodes(VP8LDecoder* const dec, int xsize, int ysize,
- int color_cache_bits, int allow_recursion) {
- int i, j;
- VP8LBitReader* const br = &dec->br_;
- VP8LMetadata* const hdr = &dec->hdr_;
- uint32_t* huffman_image = NULL;
- HTreeGroup* htree_groups = NULL;
- int num_htree_groups = 1;
-
- if (allow_recursion && VP8LReadBits(br, 1)) {
- // use meta Huffman codes.
- const int huffman_precision = VP8LReadBits(br, 3) + 2;
- const int huffman_xsize = VP8LSubSampleSize(xsize, huffman_precision);
- const int huffman_ysize = VP8LSubSampleSize(ysize, huffman_precision);
- const int huffman_pixs = huffman_xsize * huffman_ysize;
- if (!DecodeImageStream(huffman_xsize, huffman_ysize, 0, dec,
- &huffman_image)) {
- dec->status_ = VP8_STATUS_BITSTREAM_ERROR;
- goto Error;
- }
- hdr->huffman_subsample_bits_ = huffman_precision;
- for (i = 0; i < huffman_pixs; ++i) {
- // The huffman data is stored in red and green bytes.
- const int index = (huffman_image[i] >> 8) & 0xffff;
- huffman_image[i] = index;
- if (index >= num_htree_groups) {
- num_htree_groups = index + 1;
- }
- }
- }
-
- if (br->error_) goto Error;
-
- assert(num_htree_groups <= 0x10000);
- htree_groups =
- (HTreeGroup*)WebPSafeCalloc((uint64_t)num_htree_groups,
- sizeof(*htree_groups));
- if (htree_groups == NULL) {
- dec->status_ = VP8_STATUS_OUT_OF_MEMORY;
- goto Error;
- }
-
- for (i = 0; i < num_htree_groups; ++i) {
- HuffmanTree* const htrees = htree_groups[i].htrees_;
- for (j = 0; j < HUFFMAN_CODES_PER_META_CODE; ++j) {
- int alphabet_size = kAlphabetSize[j];
- if (j == 0 && color_cache_bits > 0) {
- alphabet_size += 1 << color_cache_bits;
- }
- if (!ReadHuffmanCode(alphabet_size, dec, htrees + j)) goto Error;
- }
- }
-
- // All OK. Finalize pointers and return.
- hdr->huffman_image_ = huffman_image;
- hdr->num_htree_groups_ = num_htree_groups;
- hdr->htree_groups_ = htree_groups;
- return 1;
-
- Error:
- free(huffman_image);
- DeleteHtreeGroups(htree_groups, num_htree_groups);
- return 0;
-}
-
-//------------------------------------------------------------------------------
-// Scaling.
-
-static int AllocateAndInitRescaler(VP8LDecoder* const dec, VP8Io* const io) {
- const int num_channels = 4;
- const int in_width = io->mb_w;
- const int out_width = io->scaled_width;
- const int in_height = io->mb_h;
- const int out_height = io->scaled_height;
- const uint64_t work_size = 2 * num_channels * (uint64_t)out_width;
- int32_t* work; // Rescaler work area.
- const uint64_t scaled_data_size = num_channels * (uint64_t)out_width;
- uint32_t* scaled_data; // Temporary storage for scaled BGRA data.
- const uint64_t memory_size = sizeof(*dec->rescaler) +
- work_size * sizeof(*work) +
- scaled_data_size * sizeof(*scaled_data);
- uint8_t* memory = (uint8_t*)WebPSafeCalloc(memory_size, sizeof(*memory));
- if (memory == NULL) {
- dec->status_ = VP8_STATUS_OUT_OF_MEMORY;
- return 0;
- }
- assert(dec->rescaler_memory == NULL);
- dec->rescaler_memory = memory;
-
- dec->rescaler = (WebPRescaler*)memory;
- memory += sizeof(*dec->rescaler);
- work = (int32_t*)memory;
- memory += work_size * sizeof(*work);
- scaled_data = (uint32_t*)memory;
-
- WebPRescalerInit(dec->rescaler, in_width, in_height, (uint8_t*)scaled_data,
- out_width, out_height, 0, num_channels,
- in_width, out_width, in_height, out_height, work);
- return 1;
-}
-
-//------------------------------------------------------------------------------
-// Export to ARGB
-
-// We have special "export" function since we need to convert from BGRA
-static int Export(WebPRescaler* const rescaler, WEBP_CSP_MODE colorspace,
- int rgba_stride, uint8_t* const rgba) {
- const uint32_t* const src = (const uint32_t*)rescaler->dst;
- const int dst_width = rescaler->dst_width;
- int num_lines_out = 0;
- while (WebPRescalerHasPendingOutput(rescaler)) {
- uint8_t* const dst = rgba + num_lines_out * rgba_stride;
- WebPRescalerExportRow(rescaler);
- VP8LConvertFromBGRA(src, dst_width, colorspace, dst);
- ++num_lines_out;
- }
- return num_lines_out;
-}
-
-// Emit scaled rows.
-static int EmitRescaledRows(const VP8LDecoder* const dec,
- const uint32_t* const data, int in_stride, int mb_h,
- uint8_t* const out, int out_stride) {
- const WEBP_CSP_MODE colorspace = dec->output_->colorspace;
- const uint8_t* const in = (const uint8_t*)data;
- int num_lines_in = 0;
- int num_lines_out = 0;
- while (num_lines_in < mb_h) {
- const uint8_t* const row_in = in + num_lines_in * in_stride;
- uint8_t* const row_out = out + num_lines_out * out_stride;
- num_lines_in += WebPRescalerImport(dec->rescaler, mb_h - num_lines_in,
- row_in, in_stride);
- num_lines_out += Export(dec->rescaler, colorspace, out_stride, row_out);
- }
- return num_lines_out;
-}
-
-// Emit rows without any scaling.
-static int EmitRows(WEBP_CSP_MODE colorspace,
- const uint32_t* const data, int in_stride,
- int mb_w, int mb_h,
- uint8_t* const out, int out_stride) {
- int lines = mb_h;
- const uint8_t* row_in = (const uint8_t*)data;
- uint8_t* row_out = out;
- while (lines-- > 0) {
- VP8LConvertFromBGRA((const uint32_t*)row_in, mb_w, colorspace, row_out);
- row_in += in_stride;
- row_out += out_stride;
- }
- return mb_h; // Num rows out == num rows in.
-}
-
-//------------------------------------------------------------------------------
-// Export to YUVA
-
-static void ConvertToYUVA(const uint32_t* const src, int width, int y_pos,
- const WebPDecBuffer* const output) {
- const WebPYUVABuffer* const buf = &output->u.YUVA;
- // first, the luma plane
- {
- int i;
- uint8_t* const y = buf->y + y_pos * buf->y_stride;
- for (i = 0; i < width; ++i) {
- const uint32_t p = src[i];
- y[i] = VP8RGBToY((p >> 16) & 0xff, (p >> 8) & 0xff, (p >> 0) & 0xff);
- }
- }
-
- // then U/V planes
- {
- uint8_t* const u = buf->u + (y_pos >> 1) * buf->u_stride;
- uint8_t* const v = buf->v + (y_pos >> 1) * buf->v_stride;
- const int uv_width = width >> 1;
- int i;
- for (i = 0; i < uv_width; ++i) {
- const uint32_t v0 = src[2 * i + 0];
- const uint32_t v1 = src[2 * i + 1];
- // VP8RGBToU/V expects four accumulated pixels. Hence we need to
- // scale r/g/b value by a factor 2. We just shift v0/v1 one bit less.
- const int r = ((v0 >> 15) & 0x1fe) + ((v1 >> 15) & 0x1fe);
- const int g = ((v0 >> 7) & 0x1fe) + ((v1 >> 7) & 0x1fe);
- const int b = ((v0 << 1) & 0x1fe) + ((v1 << 1) & 0x1fe);
- if (!(y_pos & 1)) { // even lines: store values
- u[i] = VP8RGBToU(r, g, b);
- v[i] = VP8RGBToV(r, g, b);
- } else { // odd lines: average with previous values
- const int tmp_u = VP8RGBToU(r, g, b);
- const int tmp_v = VP8RGBToV(r, g, b);
- // Approximated average-of-four. But it's an acceptable diff.
- u[i] = (u[i] + tmp_u + 1) >> 1;
- v[i] = (v[i] + tmp_v + 1) >> 1;
- }
- }
- if (width & 1) { // last pixel
- const uint32_t v0 = src[2 * i + 0];
- const int r = (v0 >> 14) & 0x3fc;
- const int g = (v0 >> 6) & 0x3fc;
- const int b = (v0 << 2) & 0x3fc;
- if (!(y_pos & 1)) { // even lines
- u[i] = VP8RGBToU(r, g, b);
- v[i] = VP8RGBToV(r, g, b);
- } else { // odd lines (note: we could just skip this)
- const int tmp_u = VP8RGBToU(r, g, b);
- const int tmp_v = VP8RGBToV(r, g, b);
- u[i] = (u[i] + tmp_u + 1) >> 1;
- v[i] = (v[i] + tmp_v + 1) >> 1;
- }
- }
- }
- // Lastly, store alpha if needed.
- if (buf->a != NULL) {
- int i;
- uint8_t* const a = buf->a + y_pos * buf->a_stride;
- for (i = 0; i < width; ++i) a[i] = (src[i] >> 24);
- }
-}
-
-static int ExportYUVA(const VP8LDecoder* const dec, int y_pos) {
- WebPRescaler* const rescaler = dec->rescaler;
- const uint32_t* const src = (const uint32_t*)rescaler->dst;
- const int dst_width = rescaler->dst_width;
- int num_lines_out = 0;
- while (WebPRescalerHasPendingOutput(rescaler)) {
- WebPRescalerExportRow(rescaler);
- ConvertToYUVA(src, dst_width, y_pos, dec->output_);
- ++y_pos;
- ++num_lines_out;
- }
- return num_lines_out;
-}
-
-static int EmitRescaledRowsYUVA(const VP8LDecoder* const dec,
- const uint32_t* const data,
- int in_stride, int mb_h) {
- const uint8_t* const in = (const uint8_t*)data;
- int num_lines_in = 0;
- int y_pos = dec->last_out_row_;
- while (num_lines_in < mb_h) {
- const uint8_t* const row_in = in + num_lines_in * in_stride;
- num_lines_in += WebPRescalerImport(dec->rescaler, mb_h - num_lines_in,
- row_in, in_stride);
- y_pos += ExportYUVA(dec, y_pos);
- }
- return y_pos;
-}
-
-static int EmitRowsYUVA(const VP8LDecoder* const dec,
- const uint32_t* const data, int in_stride,
- int mb_w, int num_rows) {
- int y_pos = dec->last_out_row_;
- const uint8_t* row_in = (const uint8_t*)data;
- while (num_rows-- > 0) {
- ConvertToYUVA((const uint32_t*)row_in, mb_w, y_pos, dec->output_);
- row_in += in_stride;
- ++y_pos;
- }
- return y_pos;
-}
-
-//------------------------------------------------------------------------------
-// Cropping.
-
-// Sets io->mb_y, io->mb_h & io->mb_w according to start row, end row and
-// crop options. Also updates the input data pointer, so that it points to the
-// start of the cropped window.
-// Note that 'pixel_stride' is in units of 'uint32_t' (and not 'bytes).
-// Returns true if the crop window is not empty.
-static int SetCropWindow(VP8Io* const io, int y_start, int y_end,
- const uint32_t** const in_data, int pixel_stride) {
- assert(y_start < y_end);
- assert(io->crop_left < io->crop_right);
- if (y_end > io->crop_bottom) {
- y_end = io->crop_bottom; // make sure we don't overflow on last row.
- }
- if (y_start < io->crop_top) {
- const int delta = io->crop_top - y_start;
- y_start = io->crop_top;
- *in_data += pixel_stride * delta;
- }
- if (y_start >= y_end) return 0; // Crop window is empty.
-
- *in_data += io->crop_left;
-
- io->mb_y = y_start - io->crop_top;
- io->mb_w = io->crop_right - io->crop_left;
- io->mb_h = y_end - y_start;
- return 1; // Non-empty crop window.
-}
-
-//------------------------------------------------------------------------------
-
-static WEBP_INLINE int GetMetaIndex(
- const uint32_t* const image, int xsize, int bits, int x, int y) {
- if (bits == 0) return 0;
- return image[xsize * (y >> bits) + (x >> bits)];
-}
-
-static WEBP_INLINE HTreeGroup* GetHtreeGroupForPos(VP8LMetadata* const hdr,
- int x, int y) {
- const int meta_index = GetMetaIndex(hdr->huffman_image_, hdr->huffman_xsize_,
- hdr->huffman_subsample_bits_, x, y);
- assert(meta_index < hdr->num_htree_groups_);
- return hdr->htree_groups_ + meta_index;
-}
-
-//------------------------------------------------------------------------------
-// Main loop, with custom row-processing function
-
-typedef void (*ProcessRowsFunc)(VP8LDecoder* const dec, int row);
-
-static void ApplyInverseTransforms(VP8LDecoder* const dec, int num_rows,
- const uint32_t* const rows) {
- int n = dec->next_transform_;
- const int cache_pixs = dec->width_ * num_rows;
- const int start_row = dec->last_row_;
- const int end_row = start_row + num_rows;
- const uint32_t* rows_in = rows;
- uint32_t* const rows_out = dec->argb_cache_;
-
- // Inverse transforms.
- // TODO: most transforms only need to operate on the cropped region only.
- memcpy(rows_out, rows_in, cache_pixs * sizeof(*rows_out));
- while (n-- > 0) {
- VP8LTransform* const transform = &dec->transforms_[n];
- VP8LInverseTransform(transform, start_row, end_row, rows_in, rows_out);
- rows_in = rows_out;
- }
-}
-
-// Processes (transforms, scales & color-converts) the rows decoded after the
-// last call.
-static void ProcessRows(VP8LDecoder* const dec, int row) {
- const uint32_t* const rows = dec->argb_ + dec->width_ * dec->last_row_;
- const int num_rows = row - dec->last_row_;
-
- if (num_rows <= 0) return; // Nothing to be done.
- ApplyInverseTransforms(dec, num_rows, rows);
-
- // Emit output.
- {
- VP8Io* const io = dec->io_;
- const uint32_t* rows_data = dec->argb_cache_;
- if (!SetCropWindow(io, dec->last_row_, row, &rows_data, io->width)) {
- // Nothing to output (this time).
- } else {
- const WebPDecBuffer* const output = dec->output_;
- const int in_stride = io->width * sizeof(*rows_data);
- if (output->colorspace < MODE_YUV) { // convert to RGBA
- const WebPRGBABuffer* const buf = &output->u.RGBA;
- uint8_t* const rgba = buf->rgba + dec->last_out_row_ * buf->stride;
- const int num_rows_out = io->use_scaling ?
- EmitRescaledRows(dec, rows_data, in_stride, io->mb_h,
- rgba, buf->stride) :
- EmitRows(output->colorspace, rows_data, in_stride,
- io->mb_w, io->mb_h, rgba, buf->stride);
- // Update 'last_out_row_'.
- dec->last_out_row_ += num_rows_out;
- } else { // convert to YUVA
- dec->last_out_row_ = io->use_scaling ?
- EmitRescaledRowsYUVA(dec, rows_data, in_stride, io->mb_h) :
- EmitRowsYUVA(dec, rows_data, in_stride, io->mb_w, io->mb_h);
- }
- assert(dec->last_out_row_ <= output->height);
- }
- }
-
- // Update 'last_row_'.
- dec->last_row_ = row;
- assert(dec->last_row_ <= dec->height_);
-}
-
-static int DecodeImageData(VP8LDecoder* const dec,
- uint32_t* const data, int width, int height,
- ProcessRowsFunc process_func) {
- int ok = 1;
- int col = 0, row = 0;
- VP8LBitReader* const br = &dec->br_;
- VP8LMetadata* const hdr = &dec->hdr_;
- HTreeGroup* htree_group = hdr->htree_groups_;
- uint32_t* src = data;
- uint32_t* last_cached = data;
- uint32_t* const src_end = data + width * height;
- const int len_code_limit = NUM_LITERAL_CODES + NUM_LENGTH_CODES;
- const int color_cache_limit = len_code_limit + hdr->color_cache_size_;
- VP8LColorCache* const color_cache =
- (hdr->color_cache_size_ > 0) ? &hdr->color_cache_ : NULL;
- const int mask = hdr->huffman_mask_;
-
- assert(htree_group != NULL);
-
- while (!br->eos_ && src < src_end) {
- int code;
- // Only update when changing tile. Note we could use the following test:
- // if "((((prev_col ^ col) | prev_row ^ row)) > mask)" -> tile changed
- // but that's actually slower and requires storing the previous col/row
- if ((col & mask) == 0) {
- htree_group = GetHtreeGroupForPos(hdr, col, row);
- }
- VP8LFillBitWindow(br);
- code = ReadSymbol(&htree_group->htrees_[GREEN], br);
- if (code < NUM_LITERAL_CODES) { // Literal.
- int red, green, blue, alpha;
- red = ReadSymbol(&htree_group->htrees_[RED], br);
- green = code;
- VP8LFillBitWindow(br);
- blue = ReadSymbol(&htree_group->htrees_[BLUE], br);
- alpha = ReadSymbol(&htree_group->htrees_[ALPHA], br);
- *src = (alpha << 24) + (red << 16) + (green << 8) + blue;
- AdvanceByOne:
- ++src;
- ++col;
- if (col >= width) {
- col = 0;
- ++row;
- if ((process_func != NULL) && (row % NUM_ARGB_CACHE_ROWS == 0)) {
- process_func(dec, row);
- }
- if (color_cache != NULL) {
- while (last_cached < src) {
- VP8LColorCacheInsert(color_cache, *last_cached++);
- }
- }
- }
- } else if (code < len_code_limit) { // Backward reference
- int dist_code, dist;
- const int length_sym = code - NUM_LITERAL_CODES;
- const int length = GetCopyLength(length_sym, br);
- const int dist_symbol = ReadSymbol(&htree_group->htrees_[DIST], br);
- VP8LFillBitWindow(br);
- dist_code = GetCopyDistance(dist_symbol, br);
- dist = PlaneCodeToDistance(width, dist_code);
- if (src - data < dist || src_end - src < length) {
- ok = 0;
- goto End;
- }
- {
- int i;
- for (i = 0; i < length; ++i) src[i] = src[i - dist];
- src += length;
- }
- col += length;
- while (col >= width) {
- col -= width;
- ++row;
- if ((process_func != NULL) && (row % NUM_ARGB_CACHE_ROWS == 0)) {
- process_func(dec, row);
- }
- }
- if (src < src_end) {
- htree_group = GetHtreeGroupForPos(hdr, col, row);
- if (color_cache != NULL) {
- while (last_cached < src) {
- VP8LColorCacheInsert(color_cache, *last_cached++);
- }
- }
- }
- } else if (code < color_cache_limit) { // Color cache.
- const int key = code - len_code_limit;
- assert(color_cache != NULL);
- while (last_cached < src) {
- VP8LColorCacheInsert(color_cache, *last_cached++);
- }
- *src = VP8LColorCacheLookup(color_cache, key);
- goto AdvanceByOne;
- } else { // Not reached.
- ok = 0;
- goto End;
- }
- ok = !br->error_;
- if (!ok) goto End;
- }
- // Process the remaining rows corresponding to last row-block.
- if (process_func != NULL) process_func(dec, row);
-
- End:
- if (br->error_ || !ok || (br->eos_ && src < src_end)) {
- ok = 0;
- dec->status_ = (!br->eos_) ?
- VP8_STATUS_BITSTREAM_ERROR : VP8_STATUS_SUSPENDED;
- } else if (src == src_end) {
- dec->state_ = READ_DATA;
- }
-
- return ok;
-}
-
-// -----------------------------------------------------------------------------
-// VP8LTransform
-
-static void ClearTransform(VP8LTransform* const transform) {
- free(transform->data_);
- transform->data_ = NULL;
-}
-
-// For security reason, we need to remap the color map to span
-// the total possible bundled values, and not just the num_colors.
-static int ExpandColorMap(int num_colors, VP8LTransform* const transform) {
- int i;
- const int final_num_colors = 1 << (8 >> transform->bits_);
- uint32_t* const new_color_map =
- (uint32_t*)WebPSafeMalloc((uint64_t)final_num_colors,
- sizeof(*new_color_map));
- if (new_color_map == NULL) {
- return 0;
- } else {
- uint8_t* const data = (uint8_t*)transform->data_;
- uint8_t* const new_data = (uint8_t*)new_color_map;
- new_color_map[0] = transform->data_[0];
- for (i = 4; i < 4 * num_colors; ++i) {
- // Equivalent to AddPixelEq(), on a byte-basis.
- new_data[i] = (data[i] + new_data[i - 4]) & 0xff;
- }
- for (; i < 4 * final_num_colors; ++i)
- new_data[i] = 0; // black tail.
- free(transform->data_);
- transform->data_ = new_color_map;
- }
- return 1;
-}
-
-static int ReadTransform(int* const xsize, int const* ysize,
- VP8LDecoder* const dec) {
- int ok = 1;
- VP8LBitReader* const br = &dec->br_;
- VP8LTransform* transform = &dec->transforms_[dec->next_transform_];
- const VP8LImageTransformType type =
- (VP8LImageTransformType)VP8LReadBits(br, 2);
-
- // Each transform type can only be present once in the stream.
- if (dec->transforms_seen_ & (1U << type)) {
- return 0; // Already there, let's not accept the second same transform.
- }
- dec->transforms_seen_ |= (1U << type);
-
- transform->type_ = type;
- transform->xsize_ = *xsize;
- transform->ysize_ = *ysize;
- transform->data_ = NULL;
- ++dec->next_transform_;
- assert(dec->next_transform_ <= NUM_TRANSFORMS);
-
- switch (type) {
- case PREDICTOR_TRANSFORM:
- case CROSS_COLOR_TRANSFORM:
- transform->bits_ = VP8LReadBits(br, 3) + 2;
- ok = DecodeImageStream(VP8LSubSampleSize(transform->xsize_,
- transform->bits_),
- VP8LSubSampleSize(transform->ysize_,
- transform->bits_),
- 0, dec, &transform->data_);
- break;
- case COLOR_INDEXING_TRANSFORM: {
- const int num_colors = VP8LReadBits(br, 8) + 1;
- const int bits = (num_colors > 16) ? 0
- : (num_colors > 4) ? 1
- : (num_colors > 2) ? 2
- : 3;
- *xsize = VP8LSubSampleSize(transform->xsize_, bits);
- transform->bits_ = bits;
- ok = DecodeImageStream(num_colors, 1, 0, dec, &transform->data_);
- ok = ok && ExpandColorMap(num_colors, transform);
- break;
- }
- case SUBTRACT_GREEN:
- break;
- default:
- assert(0); // can't happen
- break;
- }
-
- return ok;
-}
-
-// -----------------------------------------------------------------------------
-// VP8LMetadata
-
-static void InitMetadata(VP8LMetadata* const hdr) {
- assert(hdr);
- memset(hdr, 0, sizeof(*hdr));
-}
-
-static void ClearMetadata(VP8LMetadata* const hdr) {
- assert(hdr);
-
- free(hdr->huffman_image_);
- DeleteHtreeGroups(hdr->htree_groups_, hdr->num_htree_groups_);
- VP8LColorCacheClear(&hdr->color_cache_);
- InitMetadata(hdr);
-}
-
-// -----------------------------------------------------------------------------
-// VP8LDecoder
-
-VP8LDecoder* VP8LNew(void) {
- VP8LDecoder* const dec = (VP8LDecoder*)calloc(1, sizeof(*dec));
- if (dec == NULL) return NULL;
- dec->status_ = VP8_STATUS_OK;
- dec->action_ = READ_DIM;
- dec->state_ = READ_DIM;
- return dec;
-}
-
-void VP8LClear(VP8LDecoder* const dec) {
- int i;
- if (dec == NULL) return;
- ClearMetadata(&dec->hdr_);
-
- free(dec->argb_);
- dec->argb_ = NULL;
- for (i = 0; i < dec->next_transform_; ++i) {
- ClearTransform(&dec->transforms_[i]);
- }
- dec->next_transform_ = 0;
- dec->transforms_seen_ = 0;
-
- free(dec->rescaler_memory);
- dec->rescaler_memory = NULL;
-
- dec->output_ = NULL; // leave no trace behind
-}
-
-void VP8LDelete(VP8LDecoder* const dec) {
- if (dec != NULL) {
- VP8LClear(dec);
- free(dec);
- }
-}
-
-static void UpdateDecoder(VP8LDecoder* const dec, int width, int height) {
- VP8LMetadata* const hdr = &dec->hdr_;
- const int num_bits = hdr->huffman_subsample_bits_;
- dec->width_ = width;
- dec->height_ = height;
-
- hdr->huffman_xsize_ = VP8LSubSampleSize(width, num_bits);
- hdr->huffman_mask_ = (num_bits == 0) ? ~0 : (1 << num_bits) - 1;
-}
-
-static int DecodeImageStream(int xsize, int ysize,
- int is_level0,
- VP8LDecoder* const dec,
- uint32_t** const decoded_data) {
- int ok = 1;
- int transform_xsize = xsize;
- int transform_ysize = ysize;
- VP8LBitReader* const br = &dec->br_;
- VP8LMetadata* const hdr = &dec->hdr_;
- uint32_t* data = NULL;
- int color_cache_bits = 0;
-
- // Read the transforms (may recurse).
- if (is_level0) {
- while (ok && VP8LReadBits(br, 1)) {
- ok = ReadTransform(&transform_xsize, &transform_ysize, dec);
- }
- }
-
- // Color cache
- if (ok && VP8LReadBits(br, 1)) {
- color_cache_bits = VP8LReadBits(br, 4);
- ok = (color_cache_bits >= 1 && color_cache_bits <= MAX_CACHE_BITS);
- if (!ok) {
- dec->status_ = VP8_STATUS_BITSTREAM_ERROR;
- goto End;
- }
- }
-
- // Read the Huffman codes (may recurse).
- ok = ok && ReadHuffmanCodes(dec, transform_xsize, transform_ysize,
- color_cache_bits, is_level0);
- if (!ok) {
- dec->status_ = VP8_STATUS_BITSTREAM_ERROR;
- goto End;
- }
-
- // Finish setting up the color-cache
- if (color_cache_bits > 0) {
- hdr->color_cache_size_ = 1 << color_cache_bits;
- if (!VP8LColorCacheInit(&hdr->color_cache_, color_cache_bits)) {
- dec->status_ = VP8_STATUS_OUT_OF_MEMORY;
- ok = 0;
- goto End;
- }
- } else {
- hdr->color_cache_size_ = 0;
- }
- UpdateDecoder(dec, transform_xsize, transform_ysize);
-
- if (is_level0) { // level 0 complete
- dec->state_ = READ_HDR;
- goto End;
- }
-
- {
- const uint64_t total_size = (uint64_t)transform_xsize * transform_ysize;
- data = (uint32_t*)WebPSafeMalloc(total_size, sizeof(*data));
- if (data == NULL) {
- dec->status_ = VP8_STATUS_OUT_OF_MEMORY;
- ok = 0;
- goto End;
- }
- }
-
- // Use the Huffman trees to decode the LZ77 encoded data.
- ok = DecodeImageData(dec, data, transform_xsize, transform_ysize, NULL);
- ok = ok && !br->error_;
-
- End:
-
- if (!ok) {
- free(data);
- ClearMetadata(hdr);
- // If not enough data (br.eos_) resulted in BIT_STREAM_ERROR, update the
- // status appropriately.
- if (dec->status_ == VP8_STATUS_BITSTREAM_ERROR && dec->br_.eos_) {
- dec->status_ = VP8_STATUS_SUSPENDED;
- }
- } else {
- if (decoded_data != NULL) {
- *decoded_data = data;
- } else {
- // We allocate image data in this function only for transforms. At level 0
- // (that is: not the transforms), we shouldn't have allocated anything.
- assert(data == NULL);
- assert(is_level0);
- }
- if (!is_level0) ClearMetadata(hdr); // Clean up temporary data behind.
- }
- return ok;
-}
-
-//------------------------------------------------------------------------------
-// Allocate dec->argb_ and dec->argb_cache_ using dec->width_ and dec->height_
-
-static int AllocateARGBBuffers(VP8LDecoder* const dec, int final_width) {
- const uint64_t num_pixels = (uint64_t)dec->width_ * dec->height_;
- // Scratch buffer corresponding to top-prediction row for transforming the
- // first row in the row-blocks.
- const uint64_t cache_top_pixels = final_width;
- // Scratch buffer for temporary BGRA storage.
- const uint64_t cache_pixels = (uint64_t)final_width * NUM_ARGB_CACHE_ROWS;
- const uint64_t total_num_pixels =
- num_pixels + cache_top_pixels + cache_pixels;
-
- assert(dec->width_ <= final_width);
- dec->argb_ = (uint32_t*)WebPSafeMalloc(total_num_pixels, sizeof(*dec->argb_));
- if (dec->argb_ == NULL) {
- dec->argb_cache_ = NULL; // for sanity check
- dec->status_ = VP8_STATUS_OUT_OF_MEMORY;
- return 0;
- }
- dec->argb_cache_ = dec->argb_ + num_pixels + cache_top_pixels;
- return 1;
-}
-
-//------------------------------------------------------------------------------
-// Special row-processing that only stores the alpha data.
-
-static void ExtractAlphaRows(VP8LDecoder* const dec, int row) {
- const int num_rows = row - dec->last_row_;
- const uint32_t* const in = dec->argb_ + dec->width_ * dec->last_row_;
-
- if (num_rows <= 0) return; // Nothing to be done.
- ApplyInverseTransforms(dec, num_rows, in);
-
- // Extract alpha (which is stored in the green plane).
- {
- const int width = dec->io_->width; // the final width (!= dec->width_)
- const int cache_pixs = width * num_rows;
- uint8_t* const dst = (uint8_t*)dec->io_->opaque + width * dec->last_row_;
- const uint32_t* const src = dec->argb_cache_;
- int i;
- for (i = 0; i < cache_pixs; ++i) dst[i] = (src[i] >> 8) & 0xff;
- }
-
- dec->last_row_ = dec->last_out_row_ = row;
-}
-
-int VP8LDecodeAlphaImageStream(int width, int height, const uint8_t* const data,
- size_t data_size, uint8_t* const output) {
- VP8Io io;
- int ok = 0;
- VP8LDecoder* const dec = VP8LNew();
- if (dec == NULL) return 0;
-
- dec->width_ = width;
- dec->height_ = height;
- dec->io_ = &io;
-
- VP8InitIo(&io);
- WebPInitCustomIo(NULL, &io); // Just a sanity Init. io won't be used.
- io.opaque = output;
- io.width = width;
- io.height = height;
-
- dec->status_ = VP8_STATUS_OK;
- VP8LInitBitReader(&dec->br_, data, data_size);
-
- dec->action_ = READ_HDR;
- if (!DecodeImageStream(width, height, 1, dec, NULL)) goto Err;
-
- // Allocate output (note that dec->width_ may have changed here).
- if (!AllocateARGBBuffers(dec, width)) goto Err;
-
- // Decode (with special row processing).
- dec->action_ = READ_DATA;
- ok = DecodeImageData(dec, dec->argb_, dec->width_, dec->height_,
- ExtractAlphaRows);
-
- Err:
- VP8LDelete(dec);
- return ok;
-}
-
-//------------------------------------------------------------------------------
-
-int VP8LDecodeHeader(VP8LDecoder* const dec, VP8Io* const io) {
- int width, height, has_alpha;
-
- if (dec == NULL) return 0;
- if (io == NULL) {
- dec->status_ = VP8_STATUS_INVALID_PARAM;
- return 0;
- }
-
- dec->io_ = io;
- dec->status_ = VP8_STATUS_OK;
- VP8LInitBitReader(&dec->br_, io->data, io->data_size);
- if (!ReadImageInfo(&dec->br_, &width, &height, &has_alpha)) {
- dec->status_ = VP8_STATUS_BITSTREAM_ERROR;
- goto Error;
- }
- dec->state_ = READ_DIM;
- io->width = width;
- io->height = height;
-
- dec->action_ = READ_HDR;
- if (!DecodeImageStream(width, height, 1, dec, NULL)) goto Error;
- return 1;
-
- Error:
- VP8LClear(dec);
- assert(dec->status_ != VP8_STATUS_OK);
- return 0;
-}
-
-int VP8LDecodeImage(VP8LDecoder* const dec) {
- VP8Io* io = NULL;
- WebPDecParams* params = NULL;
-
- // Sanity checks.
- if (dec == NULL) return 0;
-
- io = dec->io_;
- assert(io != NULL);
- params = (WebPDecParams*)io->opaque;
- assert(params != NULL);
- dec->output_ = params->output;
- assert(dec->output_ != NULL);
-
- // Initialization.
- if (!WebPIoInitFromOptions(params->options, io, MODE_BGRA)) {
- dec->status_ = VP8_STATUS_INVALID_PARAM;
- goto Err;
- }
-
- if (!AllocateARGBBuffers(dec, io->width)) goto Err;
-
- if (io->use_scaling && !AllocateAndInitRescaler(dec, io)) goto Err;
-
- // Decode.
- dec->action_ = READ_DATA;
- if (!DecodeImageData(dec, dec->argb_, dec->width_, dec->height_,
- ProcessRows)) {
- goto Err;
- }
-
- // Cleanup.
- params->last_y = dec->last_out_row_;
- VP8LClear(dec);
- return 1;
-
- Err:
- VP8LClear(dec);
- assert(dec->status_ != VP8_STATUS_OK);
- return 0;
-}
-
-//------------------------------------------------------------------------------
-
-#if defined(__cplusplus) || defined(c_plusplus)
-} // extern "C"
-#endif
diff --git a/drivers/webpold/dec/vp8li.h b/drivers/webpold/dec/vp8li.h
deleted file mode 100644
index 5f6cd6a01c..0000000000
--- a/drivers/webpold/dec/vp8li.h
+++ /dev/null
@@ -1,121 +0,0 @@
-// Copyright 2012 Google Inc. All Rights Reserved.
-//
-// This code is licensed under the same terms as WebM:
-// Software License Agreement: http://www.webmproject.org/license/software/
-// Additional IP Rights Grant: http://www.webmproject.org/license/additional/
-// -----------------------------------------------------------------------------
-//
-// Lossless decoder: internal header.
-//
-// Author: Skal (pascal.massimino@gmail.com)
-// Vikas Arora(vikaas.arora@gmail.com)
-
-#ifndef WEBP_DEC_VP8LI_H_
-#define WEBP_DEC_VP8LI_H_
-
-#include <string.h> // for memcpy()
-#include "./webpi.h"
-#include "../utils/bit_reader.h"
-#include "../utils/color_cache.h"
-#include "../utils/huffman.h"
-#include "../format_constants.h"
-
-#if defined(__cplusplus) || defined(c_plusplus)
-extern "C" {
-#endif
-
-typedef enum {
- READ_DATA = 0,
- READ_HDR = 1,
- READ_DIM = 2
-} VP8LDecodeState;
-
-typedef struct VP8LTransform VP8LTransform;
-struct VP8LTransform {
- VP8LImageTransformType type_; // transform type.
- int bits_; // subsampling bits defining transform window.
- int xsize_; // transform window X index.
- int ysize_; // transform window Y index.
- uint32_t *data_; // transform data.
-};
-
-typedef struct {
- HuffmanTree htrees_[HUFFMAN_CODES_PER_META_CODE];
-} HTreeGroup;
-
-typedef struct {
- int color_cache_size_;
- VP8LColorCache color_cache_;
-
- int huffman_mask_;
- int huffman_subsample_bits_;
- int huffman_xsize_;
- uint32_t *huffman_image_;
- int num_htree_groups_;
- HTreeGroup *htree_groups_;
-} VP8LMetadata;
-
-typedef struct {
- VP8StatusCode status_;
- VP8LDecodeState action_;
- VP8LDecodeState state_;
- VP8Io *io_;
-
- const WebPDecBuffer *output_; // shortcut to io->opaque->output
-
- uint32_t *argb_; // Internal data: always in BGRA color mode.
- uint32_t *argb_cache_; // Scratch buffer for temporary BGRA storage.
-
- VP8LBitReader br_;
-
- int width_;
- int height_;
- int last_row_; // last input row decoded so far.
- int last_out_row_; // last row output so far.
-
- VP8LMetadata hdr_;
-
- int next_transform_;
- VP8LTransform transforms_[NUM_TRANSFORMS];
- // or'd bitset storing the transforms types.
- uint32_t transforms_seen_;
-
- uint8_t *rescaler_memory; // Working memory for rescaling work.
- WebPRescaler *rescaler; // Common rescaler for all channels.
-} VP8LDecoder;
-
-//------------------------------------------------------------------------------
-// internal functions. Not public.
-
-// in vp8l.c
-
-// Decodes a raw image stream (without header) and store the alpha data
-// into *output, which must be of size width x height. Returns false in case
-// of error.
-int VP8LDecodeAlphaImageStream(int width, int height, const uint8_t* const data,
- size_t data_size, uint8_t* const output);
-
-// Allocates and initialize a new lossless decoder instance.
-VP8LDecoder* VP8LNew(void);
-
-// Decodes the image header. Returns false in case of error.
-int VP8LDecodeHeader(VP8LDecoder* const dec, VP8Io* const io);
-
-// Decodes an image. It's required to decode the lossless header before calling
-// this function. Returns false in case of error, with updated dec->status_.
-int VP8LDecodeImage(VP8LDecoder* const dec);
-
-// Resets the decoder in its initial state, reclaiming memory.
-// Preserves the dec->status_ value.
-void VP8LClear(VP8LDecoder* const dec);
-
-// Clears and deallocate a lossless decoder instance.
-void VP8LDelete(VP8LDecoder* const dec);
-
-//------------------------------------------------------------------------------
-
-#if defined(__cplusplus) || defined(c_plusplus)
-} // extern "C"
-#endif
-
-#endif /* WEBP_DEC_VP8LI_H_ */
diff --git a/drivers/webpold/dec/webp.c b/drivers/webpold/dec/webp.c
deleted file mode 100644
index f44bc2b8ae..0000000000
--- a/drivers/webpold/dec/webp.c
+++ /dev/null
@@ -1,771 +0,0 @@
-// Copyright 2010 Google Inc. All Rights Reserved.
-//
-// This code is licensed under the same terms as WebM:
-// Software License Agreement: http://www.webmproject.org/license/software/
-// Additional IP Rights Grant: http://www.webmproject.org/license/additional/
-// -----------------------------------------------------------------------------
-//
-// Main decoding functions for WEBP images.
-//
-// Author: Skal (pascal.massimino@gmail.com)
-
-#include <stdlib.h>
-
-#include "./vp8i.h"
-#include "./vp8li.h"
-#include "./webpi.h"
-#include "../format_constants.h"
-
-#if defined(__cplusplus) || defined(c_plusplus)
-extern "C" {
-#endif
-
-//------------------------------------------------------------------------------
-// RIFF layout is:
-// Offset tag
-// 0...3 "RIFF" 4-byte tag
-// 4...7 size of image data (including metadata) starting at offset 8
-// 8...11 "WEBP" our form-type signature
-// The RIFF container (12 bytes) is followed by appropriate chunks:
-// 12..15 "VP8 ": 4-bytes tags, signaling the use of VP8 video format
-// 16..19 size of the raw VP8 image data, starting at offset 20
-// 20.... the VP8 bytes
-// Or,
-// 12..15 "VP8L": 4-bytes tags, signaling the use of VP8L lossless format
-// 16..19 size of the raw VP8L image data, starting at offset 20
-// 20.... the VP8L bytes
-// Or,
-// 12..15 "VP8X": 4-bytes tags, describing the extended-VP8 chunk.
-// 16..19 size of the VP8X chunk starting at offset 20.
-// 20..23 VP8X flags bit-map corresponding to the chunk-types present.
-// 24..26 Width of the Canvas Image.
-// 27..29 Height of the Canvas Image.
-// There can be extra chunks after the "VP8X" chunk (ICCP, TILE, FRM, VP8,
-// META ...)
-// All sizes are in little-endian order.
-// Note: chunk data size must be padded to multiple of 2 when written.
-
-static WEBP_INLINE uint32_t get_le24(const uint8_t* const data) {
- return data[0] | (data[1] << 8) | (data[2] << 16);
-}
-
-static WEBP_INLINE uint32_t get_le32(const uint8_t* const data) {
- return (uint32_t)get_le24(data) | (data[3] << 24);
-}
-
-// Validates the RIFF container (if detected) and skips over it.
-// If a RIFF container is detected,
-// Returns VP8_STATUS_BITSTREAM_ERROR for invalid header, and
-// VP8_STATUS_OK otherwise.
-// In case there are not enough bytes (partial RIFF container), return 0 for
-// *riff_size. Else return the RIFF size extracted from the header.
-static VP8StatusCode ParseRIFF(const uint8_t** const data,
- size_t* const data_size,
- size_t* const riff_size) {
- assert(data != NULL);
- assert(data_size != NULL);
- assert(riff_size != NULL);
-
- *riff_size = 0; // Default: no RIFF present.
- if (*data_size >= RIFF_HEADER_SIZE && !memcmp(*data, "RIFF", TAG_SIZE)) {
- if (memcmp(*data + 8, "WEBP", TAG_SIZE)) {
- return VP8_STATUS_BITSTREAM_ERROR; // Wrong image file signature.
- } else {
- const uint32_t size = get_le32(*data + TAG_SIZE);
- // Check that we have at least one chunk (i.e "WEBP" + "VP8?nnnn").
- if (size < TAG_SIZE + CHUNK_HEADER_SIZE) {
- return VP8_STATUS_BITSTREAM_ERROR;
- }
- // We have a RIFF container. Skip it.
- *riff_size = size;
- *data += RIFF_HEADER_SIZE;
- *data_size -= RIFF_HEADER_SIZE;
- }
- }
- return VP8_STATUS_OK;
-}
-
-// Validates the VP8X header and skips over it.
-// Returns VP8_STATUS_BITSTREAM_ERROR for invalid VP8X header,
-// VP8_STATUS_NOT_ENOUGH_DATA in case of insufficient data, and
-// VP8_STATUS_OK otherwise.
-// If a VP8X chunk is found, found_vp8x is set to true and *width_ptr,
-// *height_ptr and *flags_ptr are set to the corresponding values extracted
-// from the VP8X chunk.
-static VP8StatusCode ParseVP8X(const uint8_t** const data,
- size_t* const data_size,
- int* const found_vp8x,
- int* const width_ptr, int* const height_ptr,
- uint32_t* const flags_ptr) {
- const uint32_t vp8x_size = CHUNK_HEADER_SIZE + VP8X_CHUNK_SIZE;
- assert(data != NULL);
- assert(data_size != NULL);
- assert(found_vp8x != NULL);
-
- *found_vp8x = 0;
-
- if (*data_size < CHUNK_HEADER_SIZE) {
- return VP8_STATUS_NOT_ENOUGH_DATA; // Insufficient data.
- }
-
- if (!memcmp(*data, "VP8X", TAG_SIZE)) {
- int width, height;
- uint32_t flags;
- const uint32_t chunk_size = get_le32(*data + TAG_SIZE);
- if (chunk_size != VP8X_CHUNK_SIZE) {
- return VP8_STATUS_BITSTREAM_ERROR; // Wrong chunk size.
- }
-
- // Verify if enough data is available to validate the VP8X chunk.
- if (*data_size < vp8x_size) {
- return VP8_STATUS_NOT_ENOUGH_DATA; // Insufficient data.
- }
- flags = get_le32(*data + 8);
- width = 1 + get_le24(*data + 12);
- height = 1 + get_le24(*data + 15);
- if (width * (uint64_t)height >= MAX_IMAGE_AREA) {
- return VP8_STATUS_BITSTREAM_ERROR; // image is too large
- }
-
- if (flags_ptr != NULL) *flags_ptr = flags;
- if (width_ptr != NULL) *width_ptr = width;
- if (height_ptr != NULL) *height_ptr = height;
- // Skip over VP8X header bytes.
- *data += vp8x_size;
- *data_size -= vp8x_size;
- *found_vp8x = 1;
- }
- return VP8_STATUS_OK;
-}
-
-// Skips to the next VP8/VP8L chunk header in the data given the size of the
-// RIFF chunk 'riff_size'.
-// Returns VP8_STATUS_BITSTREAM_ERROR if any invalid chunk size is encountered,
-// VP8_STATUS_NOT_ENOUGH_DATA in case of insufficient data, and
-// VP8_STATUS_OK otherwise.
-// If an alpha chunk is found, *alpha_data and *alpha_size are set
-// appropriately.
-static VP8StatusCode ParseOptionalChunks(const uint8_t** const data,
- size_t* const data_size,
- size_t const riff_size,
- const uint8_t** const alpha_data,
- size_t* const alpha_size) {
- const uint8_t* buf;
- size_t buf_size;
- uint32_t total_size = TAG_SIZE + // "WEBP".
- CHUNK_HEADER_SIZE + // "VP8Xnnnn".
- VP8X_CHUNK_SIZE; // data.
- assert(data != NULL);
- assert(data_size != NULL);
- buf = *data;
- buf_size = *data_size;
-
- assert(alpha_data != NULL);
- assert(alpha_size != NULL);
- *alpha_data = NULL;
- *alpha_size = 0;
-
- while (1) {
- uint32_t chunk_size;
- uint32_t disk_chunk_size; // chunk_size with padding
-
- *data = buf;
- *data_size = buf_size;
-
- if (buf_size < CHUNK_HEADER_SIZE) { // Insufficient data.
- return VP8_STATUS_NOT_ENOUGH_DATA;
- }
-
- chunk_size = get_le32(buf + TAG_SIZE);
- // For odd-sized chunk-payload, there's one byte padding at the end.
- disk_chunk_size = (CHUNK_HEADER_SIZE + chunk_size + 1) & ~1;
- total_size += disk_chunk_size;
-
- // Check that total bytes skipped so far does not exceed riff_size.
- if (riff_size > 0 && (total_size > riff_size)) {
- return VP8_STATUS_BITSTREAM_ERROR; // Not a valid chunk size.
- }
-
- if (buf_size < disk_chunk_size) { // Insufficient data.
- return VP8_STATUS_NOT_ENOUGH_DATA;
- }
-
- if (!memcmp(buf, "ALPH", TAG_SIZE)) { // A valid ALPH header.
- *alpha_data = buf + CHUNK_HEADER_SIZE;
- *alpha_size = chunk_size;
- } else if (!memcmp(buf, "VP8 ", TAG_SIZE) ||
- !memcmp(buf, "VP8L", TAG_SIZE)) { // A valid VP8/VP8L header.
- return VP8_STATUS_OK; // Found.
- }
-
- // We have a full and valid chunk; skip it.
- buf += disk_chunk_size;
- buf_size -= disk_chunk_size;
- }
-}
-
-// Validates the VP8/VP8L Header ("VP8 nnnn" or "VP8L nnnn") and skips over it.
-// Returns VP8_STATUS_BITSTREAM_ERROR for invalid (chunk larger than
-// riff_size) VP8/VP8L header,
-// VP8_STATUS_NOT_ENOUGH_DATA in case of insufficient data, and
-// VP8_STATUS_OK otherwise.
-// If a VP8/VP8L chunk is found, *chunk_size is set to the total number of bytes
-// extracted from the VP8/VP8L chunk header.
-// The flag '*is_lossless' is set to 1 in case of VP8L chunk / raw VP8L data.
-static VP8StatusCode ParseVP8Header(const uint8_t** const data_ptr,
- size_t* const data_size,
- size_t riff_size,
- size_t* const chunk_size,
- int* const is_lossless) {
- const uint8_t* const data = *data_ptr;
- const int is_vp8 = !memcmp(data, "VP8 ", TAG_SIZE);
- const int is_vp8l = !memcmp(data, "VP8L", TAG_SIZE);
- const uint32_t minimal_size =
- TAG_SIZE + CHUNK_HEADER_SIZE; // "WEBP" + "VP8 nnnn" OR
- // "WEBP" + "VP8Lnnnn"
- assert(data != NULL);
- assert(data_size != NULL);
- assert(chunk_size != NULL);
- assert(is_lossless != NULL);
-
- if (*data_size < CHUNK_HEADER_SIZE) {
- return VP8_STATUS_NOT_ENOUGH_DATA; // Insufficient data.
- }
-
- if (is_vp8 || is_vp8l) {
- // Bitstream contains VP8/VP8L header.
- const uint32_t size = get_le32(data + TAG_SIZE);
- if ((riff_size >= minimal_size) && (size > riff_size - minimal_size)) {
- return VP8_STATUS_BITSTREAM_ERROR; // Inconsistent size information.
- }
- // Skip over CHUNK_HEADER_SIZE bytes from VP8/VP8L Header.
- *chunk_size = size;
- *data_ptr += CHUNK_HEADER_SIZE;
- *data_size -= CHUNK_HEADER_SIZE;
- *is_lossless = is_vp8l;
- } else {
- // Raw VP8/VP8L bitstream (no header).
- *is_lossless = VP8LCheckSignature(data, *data_size);
- *chunk_size = *data_size;
- }
-
- return VP8_STATUS_OK;
-}
-
-//------------------------------------------------------------------------------
-
-// Fetch '*width', '*height', '*has_alpha' and fill out 'headers' based on
-// 'data'. All the output parameters may be NULL. If 'headers' is NULL only the
-// minimal amount will be read to fetch the remaining parameters.
-// If 'headers' is non-NULL this function will attempt to locate both alpha
-// data (with or without a VP8X chunk) and the bitstream chunk (VP8/VP8L).
-// Note: The following chunk sequences (before the raw VP8/VP8L data) are
-// considered valid by this function:
-// RIFF + VP8(L)
-// RIFF + VP8X + (optional chunks) + VP8(L)
-// ALPH + VP8 <-- Not a valid WebP format: only allowed for internal purpose.
-// VP8(L) <-- Not a valid WebP format: only allowed for internal purpose.
-static VP8StatusCode ParseHeadersInternal(const uint8_t* data,
- size_t data_size,
- int* const width,
- int* const height,
- int* const has_alpha,
- WebPHeaderStructure* const headers) {
- int found_riff = 0;
- int found_vp8x = 0;
- VP8StatusCode status;
- WebPHeaderStructure hdrs;
-
- if (data == NULL || data_size < RIFF_HEADER_SIZE) {
- return VP8_STATUS_NOT_ENOUGH_DATA;
- }
- memset(&hdrs, 0, sizeof(hdrs));
- hdrs.data = data;
- hdrs.data_size = data_size;
-
- // Skip over RIFF header.
- status = ParseRIFF(&data, &data_size, &hdrs.riff_size);
- if (status != VP8_STATUS_OK) {
- return status; // Wrong RIFF header / insufficient data.
- }
- found_riff = (hdrs.riff_size > 0);
-
- // Skip over VP8X.
- {
- uint32_t flags = 0;
- status = ParseVP8X(&data, &data_size, &found_vp8x, width, height, &flags);
- if (status != VP8_STATUS_OK) {
- return status; // Wrong VP8X / insufficient data.
- }
- if (!found_riff && found_vp8x) {
- // Note: This restriction may be removed in the future, if it becomes
- // necessary to send VP8X chunk to the decoder.
- return VP8_STATUS_BITSTREAM_ERROR;
- }
- if (has_alpha != NULL) *has_alpha = !!(flags & ALPHA_FLAG_BIT);
- if (found_vp8x && headers == NULL) {
- return VP8_STATUS_OK; // Return features from VP8X header.
- }
- }
-
- if (data_size < TAG_SIZE) return VP8_STATUS_NOT_ENOUGH_DATA;
-
- // Skip over optional chunks if data started with "RIFF + VP8X" or "ALPH".
- if ((found_riff && found_vp8x) ||
- (!found_riff && !found_vp8x && !memcmp(data, "ALPH", TAG_SIZE))) {
- status = ParseOptionalChunks(&data, &data_size, hdrs.riff_size,
- &hdrs.alpha_data, &hdrs.alpha_data_size);
- if (status != VP8_STATUS_OK) {
- return status; // Found an invalid chunk size / insufficient data.
- }
- }
-
- // Skip over VP8/VP8L header.
- status = ParseVP8Header(&data, &data_size, hdrs.riff_size,
- &hdrs.compressed_size, &hdrs.is_lossless);
- if (status != VP8_STATUS_OK) {
- return status; // Wrong VP8/VP8L chunk-header / insufficient data.
- }
- if (hdrs.compressed_size > MAX_CHUNK_PAYLOAD) {
- return VP8_STATUS_BITSTREAM_ERROR;
- }
-
- if (!hdrs.is_lossless) {
- if (data_size < VP8_FRAME_HEADER_SIZE) {
- return VP8_STATUS_NOT_ENOUGH_DATA;
- }
- // Validates raw VP8 data.
- if (!VP8GetInfo(data, data_size,
- (uint32_t)hdrs.compressed_size, width, height)) {
- return VP8_STATUS_BITSTREAM_ERROR;
- }
- } else {
- if (data_size < VP8L_FRAME_HEADER_SIZE) {
- return VP8_STATUS_NOT_ENOUGH_DATA;
- }
- // Validates raw VP8L data.
- if (!VP8LGetInfo(data, data_size, width, height, has_alpha)) {
- return VP8_STATUS_BITSTREAM_ERROR;
- }
- }
-
- if (has_alpha != NULL) {
- // If the data did not contain a VP8X/VP8L chunk the only definitive way
- // to set this is by looking for alpha data (from an ALPH chunk).
- *has_alpha |= (hdrs.alpha_data != NULL);
- }
- if (headers != NULL) {
- *headers = hdrs;
- headers->offset = data - headers->data;
- assert((uint64_t)(data - headers->data) < MAX_CHUNK_PAYLOAD);
- assert(headers->offset == headers->data_size - data_size);
- }
- return VP8_STATUS_OK; // Return features from VP8 header.
-}
-
-VP8StatusCode WebPParseHeaders(WebPHeaderStructure* const headers) {
- assert(headers != NULL);
- // fill out headers, ignore width/height/has_alpha.
- return ParseHeadersInternal(headers->data, headers->data_size,
- NULL, NULL, NULL, headers);
-}
-
-//------------------------------------------------------------------------------
-// WebPDecParams
-
-void WebPResetDecParams(WebPDecParams* const params) {
- if (params) {
- memset(params, 0, sizeof(*params));
- }
-}
-
-//------------------------------------------------------------------------------
-// "Into" decoding variants
-
-// Main flow
-static VP8StatusCode DecodeInto(const uint8_t* const data, size_t data_size,
- WebPDecParams* const params) {
- VP8StatusCode status;
- VP8Io io;
- WebPHeaderStructure headers;
-
- headers.data = data;
- headers.data_size = data_size;
- status = WebPParseHeaders(&headers); // Process Pre-VP8 chunks.
- if (status != VP8_STATUS_OK) {
- return status;
- }
-
- assert(params != NULL);
- VP8InitIo(&io);
- io.data = headers.data + headers.offset;
- io.data_size = headers.data_size - headers.offset;
- WebPInitCustomIo(params, &io); // Plug the I/O functions.
-
- if (!headers.is_lossless) {
- VP8Decoder* const dec = VP8New();
- if (dec == NULL) {
- return VP8_STATUS_OUT_OF_MEMORY;
- }
-#ifdef WEBP_USE_THREAD
- dec->use_threads_ = params->options && (params->options->use_threads > 0);
-#else
- dec->use_threads_ = 0;
-#endif
- dec->alpha_data_ = headers.alpha_data;
- dec->alpha_data_size_ = headers.alpha_data_size;
-
- // Decode bitstream header, update io->width/io->height.
- if (!VP8GetHeaders(dec, &io)) {
- status = dec->status_; // An error occurred. Grab error status.
- } else {
- // Allocate/check output buffers.
- status = WebPAllocateDecBuffer(io.width, io.height, params->options,
- params->output);
- if (status == VP8_STATUS_OK) { // Decode
- if (!VP8Decode(dec, &io)) {
- status = dec->status_;
- }
- }
- }
- VP8Delete(dec);
- } else {
- VP8LDecoder* const dec = VP8LNew();
- if (dec == NULL) {
- return VP8_STATUS_OUT_OF_MEMORY;
- }
- if (!VP8LDecodeHeader(dec, &io)) {
- status = dec->status_; // An error occurred. Grab error status.
- } else {
- // Allocate/check output buffers.
- status = WebPAllocateDecBuffer(io.width, io.height, params->options,
- params->output);
- if (status == VP8_STATUS_OK) { // Decode
- if (!VP8LDecodeImage(dec)) {
- status = dec->status_;
- }
- }
- }
- VP8LDelete(dec);
- }
-
- if (status != VP8_STATUS_OK) {
- WebPFreeDecBuffer(params->output);
- }
- return status;
-}
-
-// Helpers
-static uint8_t* DecodeIntoRGBABuffer(WEBP_CSP_MODE colorspace,
- const uint8_t* const data,
- size_t data_size,
- uint8_t* const rgba,
- int stride, size_t size) {
- WebPDecParams params;
- WebPDecBuffer buf;
- if (rgba == NULL) {
- return NULL;
- }
- WebPInitDecBuffer(&buf);
- WebPResetDecParams(&params);
- params.output = &buf;
- buf.colorspace = colorspace;
- buf.u.RGBA.rgba = rgba;
- buf.u.RGBA.stride = stride;
- buf.u.RGBA.size = size;
- buf.is_external_memory = 1;
- if (DecodeInto(data, data_size, &params) != VP8_STATUS_OK) {
- return NULL;
- }
- return rgba;
-}
-
-uint8_t* WebPDecodeRGBInto(const uint8_t* data, size_t data_size,
- uint8_t* output, size_t size, int stride) {
- return DecodeIntoRGBABuffer(MODE_RGB, data, data_size, output, stride, size);
-}
-
-uint8_t* WebPDecodeRGBAInto(const uint8_t* data, size_t data_size,
- uint8_t* output, size_t size, int stride) {
- return DecodeIntoRGBABuffer(MODE_RGBA, data, data_size, output, stride, size);
-}
-
-uint8_t* WebPDecodeARGBInto(const uint8_t* data, size_t data_size,
- uint8_t* output, size_t size, int stride) {
- return DecodeIntoRGBABuffer(MODE_ARGB, data, data_size, output, stride, size);
-}
-
-uint8_t* WebPDecodeBGRInto(const uint8_t* data, size_t data_size,
- uint8_t* output, size_t size, int stride) {
- return DecodeIntoRGBABuffer(MODE_BGR, data, data_size, output, stride, size);
-}
-
-uint8_t* WebPDecodeBGRAInto(const uint8_t* data, size_t data_size,
- uint8_t* output, size_t size, int stride) {
- return DecodeIntoRGBABuffer(MODE_BGRA, data, data_size, output, stride, size);
-}
-
-uint8_t* WebPDecodeYUVInto(const uint8_t* data, size_t data_size,
- uint8_t* luma, size_t luma_size, int luma_stride,
- uint8_t* u, size_t u_size, int u_stride,
- uint8_t* v, size_t v_size, int v_stride) {
- WebPDecParams params;
- WebPDecBuffer output;
- if (luma == NULL) return NULL;
- WebPInitDecBuffer(&output);
- WebPResetDecParams(&params);
- params.output = &output;
- output.colorspace = MODE_YUV;
- output.u.YUVA.y = luma;
- output.u.YUVA.y_stride = luma_stride;
- output.u.YUVA.y_size = luma_size;
- output.u.YUVA.u = u;
- output.u.YUVA.u_stride = u_stride;
- output.u.YUVA.u_size = u_size;
- output.u.YUVA.v = v;
- output.u.YUVA.v_stride = v_stride;
- output.u.YUVA.v_size = v_size;
- output.is_external_memory = 1;
- if (DecodeInto(data, data_size, &params) != VP8_STATUS_OK) {
- return NULL;
- }
- return luma;
-}
-
-//------------------------------------------------------------------------------
-
-static uint8_t* Decode(WEBP_CSP_MODE mode, const uint8_t* const data,
- size_t data_size, int* const width, int* const height,
- WebPDecBuffer* const keep_info) {
- WebPDecParams params;
- WebPDecBuffer output;
-
- WebPInitDecBuffer(&output);
- WebPResetDecParams(&params);
- params.output = &output;
- output.colorspace = mode;
-
- // Retrieve (and report back) the required dimensions from bitstream.
- if (!WebPGetInfo(data, data_size, &output.width, &output.height)) {
- return NULL;
- }
- if (width != NULL) *width = output.width;
- if (height != NULL) *height = output.height;
-
- // Decode
- if (DecodeInto(data, data_size, &params) != VP8_STATUS_OK) {
- return NULL;
- }
- if (keep_info != NULL) { // keep track of the side-info
- WebPCopyDecBuffer(&output, keep_info);
- }
- // return decoded samples (don't clear 'output'!)
- return WebPIsRGBMode(mode) ? output.u.RGBA.rgba : output.u.YUVA.y;
-}
-
-uint8_t* WebPDecodeRGB(const uint8_t* data, size_t data_size,
- int* width, int* height) {
- return Decode(MODE_RGB, data, data_size, width, height, NULL);
-}
-
-uint8_t* WebPDecodeRGBA(const uint8_t* data, size_t data_size,
- int* width, int* height) {
- return Decode(MODE_RGBA, data, data_size, width, height, NULL);
-}
-
-uint8_t* WebPDecodeARGB(const uint8_t* data, size_t data_size,
- int* width, int* height) {
- return Decode(MODE_ARGB, data, data_size, width, height, NULL);
-}
-
-uint8_t* WebPDecodeBGR(const uint8_t* data, size_t data_size,
- int* width, int* height) {
- return Decode(MODE_BGR, data, data_size, width, height, NULL);
-}
-
-uint8_t* WebPDecodeBGRA(const uint8_t* data, size_t data_size,
- int* width, int* height) {
- return Decode(MODE_BGRA, data, data_size, width, height, NULL);
-}
-
-uint8_t* WebPDecodeYUV(const uint8_t* data, size_t data_size,
- int* width, int* height, uint8_t** u, uint8_t** v,
- int* stride, int* uv_stride) {
- WebPDecBuffer output; // only to preserve the side-infos
- uint8_t* const out = Decode(MODE_YUV, data, data_size,
- width, height, &output);
-
- if (out != NULL) {
- const WebPYUVABuffer* const buf = &output.u.YUVA;
- *u = buf->u;
- *v = buf->v;
- *stride = buf->y_stride;
- *uv_stride = buf->u_stride;
- assert(buf->u_stride == buf->v_stride);
- }
- return out;
-}
-
-static void DefaultFeatures(WebPBitstreamFeatures* const features) {
- assert(features != NULL);
- memset(features, 0, sizeof(*features));
- features->bitstream_version = 0;
-}
-
-static VP8StatusCode GetFeatures(const uint8_t* const data, size_t data_size,
- WebPBitstreamFeatures* const features) {
- if (features == NULL || data == NULL) {
- return VP8_STATUS_INVALID_PARAM;
- }
- DefaultFeatures(features);
-
- // Only parse enough of the data to retrieve width/height/has_alpha.
- return ParseHeadersInternal(data, data_size,
- &features->width, &features->height,
- &features->has_alpha, NULL);
-}
-
-//------------------------------------------------------------------------------
-// WebPGetInfo()
-
-int WebPGetInfo(const uint8_t* data, size_t data_size,
- int* width, int* height) {
- WebPBitstreamFeatures features;
-
- if (GetFeatures(data, data_size, &features) != VP8_STATUS_OK) {
- return 0;
- }
-
- if (width != NULL) {
- *width = features.width;
- }
- if (height != NULL) {
- *height = features.height;
- }
-
- return 1;
-}
-
-//------------------------------------------------------------------------------
-// Advance decoding API
-
-int WebPInitDecoderConfigInternal(WebPDecoderConfig* config,
- int version) {
- if (WEBP_ABI_IS_INCOMPATIBLE(version, WEBP_DECODER_ABI_VERSION)) {
- return 0; // version mismatch
- }
- if (config == NULL) {
- return 0;
- }
- memset(config, 0, sizeof(*config));
- DefaultFeatures(&config->input);
- WebPInitDecBuffer(&config->output);
- return 1;
-}
-
-VP8StatusCode WebPGetFeaturesInternal(const uint8_t* data, size_t data_size,
- WebPBitstreamFeatures* features,
- int version) {
- VP8StatusCode status;
- if (WEBP_ABI_IS_INCOMPATIBLE(version, WEBP_DECODER_ABI_VERSION)) {
- return VP8_STATUS_INVALID_PARAM; // version mismatch
- }
- if (features == NULL) {
- return VP8_STATUS_INVALID_PARAM;
- }
-
- status = GetFeatures(data, data_size, features);
- if (status == VP8_STATUS_NOT_ENOUGH_DATA) {
- return VP8_STATUS_BITSTREAM_ERROR; // Not-enough-data treated as error.
- }
- return status;
-}
-
-VP8StatusCode WebPDecode(const uint8_t* data, size_t data_size,
- WebPDecoderConfig* config) {
- WebPDecParams params;
- VP8StatusCode status;
-
- if (config == NULL) {
- return VP8_STATUS_INVALID_PARAM;
- }
-
- status = GetFeatures(data, data_size, &config->input);
- if (status != VP8_STATUS_OK) {
- if (status == VP8_STATUS_NOT_ENOUGH_DATA) {
- return VP8_STATUS_BITSTREAM_ERROR; // Not-enough-data treated as error.
- }
- return status;
- }
-
- WebPResetDecParams(&params);
- params.output = &config->output;
- params.options = &config->options;
- status = DecodeInto(data, data_size, &params);
-
- return status;
-}
-
-//------------------------------------------------------------------------------
-// Cropping and rescaling.
-
-int WebPIoInitFromOptions(const WebPDecoderOptions* const options,
- VP8Io* const io, WEBP_CSP_MODE src_colorspace) {
- const int W = io->width;
- const int H = io->height;
- int x = 0, y = 0, w = W, h = H;
-
- // Cropping
- io->use_cropping = (options != NULL) && (options->use_cropping > 0);
- if (io->use_cropping) {
- w = options->crop_width;
- h = options->crop_height;
- x = options->crop_left;
- y = options->crop_top;
- if (!WebPIsRGBMode(src_colorspace)) { // only snap for YUV420 or YUV422
- x &= ~1;
- y &= ~1; // TODO(later): only for YUV420, not YUV422.
- }
- if (x < 0 || y < 0 || w <= 0 || h <= 0 || x + w > W || y + h > H) {
- return 0; // out of frame boundary error
- }
- }
- io->crop_left = x;
- io->crop_top = y;
- io->crop_right = x + w;
- io->crop_bottom = y + h;
- io->mb_w = w;
- io->mb_h = h;
-
- // Scaling
- io->use_scaling = (options != NULL) && (options->use_scaling > 0);
- if (io->use_scaling) {
- if (options->scaled_width <= 0 || options->scaled_height <= 0) {
- return 0;
- }
- io->scaled_width = options->scaled_width;
- io->scaled_height = options->scaled_height;
- }
-
- // Filter
- io->bypass_filtering = options && options->bypass_filtering;
-
- // Fancy upsampler
-#ifdef FANCY_UPSAMPLING
- io->fancy_upsampling = (options == NULL) || (!options->no_fancy_upsampling);
-#endif
-
- if (io->use_scaling) {
- // disable filter (only for large downscaling ratio).
- io->bypass_filtering = (io->scaled_width < W * 3 / 4) &&
- (io->scaled_height < H * 3 / 4);
- io->fancy_upsampling = 0;
- }
- return 1;
-}
-
-//------------------------------------------------------------------------------
-
-#if defined(__cplusplus) || defined(c_plusplus)
-} // extern "C"
-#endif
diff --git a/drivers/webpold/dec/webpi.h b/drivers/webpold/dec/webpi.h
deleted file mode 100644
index 44e5744411..0000000000
--- a/drivers/webpold/dec/webpi.h
+++ /dev/null
@@ -1,114 +0,0 @@
-// Copyright 2011 Google Inc. All Rights Reserved.
-//
-// This code is licensed under the same terms as WebM:
-// Software License Agreement: http://www.webmproject.org/license/software/
-// Additional IP Rights Grant: http://www.webmproject.org/license/additional/
-// -----------------------------------------------------------------------------
-//
-// Internal header: WebP decoding parameters and custom IO on buffer
-//
-// Author: somnath@google.com (Somnath Banerjee)
-
-#ifndef WEBP_DEC_WEBPI_H_
-#define WEBP_DEC_WEBPI_H_
-
-#if defined(__cplusplus) || defined(c_plusplus)
-extern "C" {
-#endif
-
-#include "../utils/rescaler.h"
-#include "./decode_vp8.h"
-
-//------------------------------------------------------------------------------
-// WebPDecParams: Decoding output parameters. Transient internal object.
-
-typedef struct WebPDecParams WebPDecParams;
-typedef int (*OutputFunc)(const VP8Io* const io, WebPDecParams* const p);
-typedef int (*OutputRowFunc)(WebPDecParams* const p, int y_pos);
-
-struct WebPDecParams {
- WebPDecBuffer* output; // output buffer.
- uint8_t* tmp_y, *tmp_u, *tmp_v; // cache for the fancy upsampler
- // or used for tmp rescaling
-
- int last_y; // coordinate of the line that was last output
- const WebPDecoderOptions* options; // if not NULL, use alt decoding features
- // rescalers
- WebPRescaler scaler_y, scaler_u, scaler_v, scaler_a;
- void* memory; // overall scratch memory for the output work.
-
- OutputFunc emit; // output RGB or YUV samples
- OutputFunc emit_alpha; // output alpha channel
- OutputRowFunc emit_alpha_row; // output one line of rescaled alpha values
-};
-
-// Should be called first, before any use of the WebPDecParams object.
-void WebPResetDecParams(WebPDecParams* const params);
-
-//------------------------------------------------------------------------------
-// Header parsing helpers
-
-// Structure storing a description of the RIFF headers.
-typedef struct {
- const uint8_t* data; // input buffer
- size_t data_size; // input buffer size
- size_t offset; // offset to main data chunk (VP8 or VP8L)
- const uint8_t* alpha_data; // points to alpha chunk (if present)
- size_t alpha_data_size; // alpha chunk size
- size_t compressed_size; // VP8/VP8L compressed data size
- size_t riff_size; // size of the riff payload (or 0 if absent)
- int is_lossless; // true if a VP8L chunk is present
-} WebPHeaderStructure;
-
-// Skips over all valid chunks prior to the first VP8/VP8L frame header.
-// Returns VP8_STATUS_OK on success,
-// VP8_STATUS_BITSTREAM_ERROR if an invalid header/chunk is found, and
-// VP8_STATUS_NOT_ENOUGH_DATA if case of insufficient data.
-// In 'headers', compressed_size, offset, alpha_data, alpha_size and lossless
-// fields are updated appropriately upon success.
-VP8StatusCode WebPParseHeaders(WebPHeaderStructure* const headers);
-
-//------------------------------------------------------------------------------
-// Misc utils
-
-// Initializes VP8Io with custom setup, io and teardown functions. The default
-// hooks will use the supplied 'params' as io->opaque handle.
-void WebPInitCustomIo(WebPDecParams* const params, VP8Io* const io);
-
-// Setup crop_xxx fields, mb_w and mb_h in io. 'src_colorspace' refers
-// to the *compressed* format, not the output one.
-int WebPIoInitFromOptions(const WebPDecoderOptions* const options,
- VP8Io* const io, WEBP_CSP_MODE src_colorspace);
-
-//------------------------------------------------------------------------------
-// Internal functions regarding WebPDecBuffer memory (in buffer.c).
-// Don't really need to be externally visible for now.
-
-// Prepare 'buffer' with the requested initial dimensions width/height.
-// If no external storage is supplied, initializes buffer by allocating output
-// memory and setting up the stride information. Validate the parameters. Return
-// an error code in case of problem (no memory, or invalid stride / size /
-// dimension / etc.). If *options is not NULL, also verify that the options'
-// parameters are valid and apply them to the width/height dimensions of the
-// output buffer. This takes cropping / scaling / rotation into account.
-VP8StatusCode WebPAllocateDecBuffer(int width, int height,
- const WebPDecoderOptions* const options,
- WebPDecBuffer* const buffer);
-
-// Copy 'src' into 'dst' buffer, making sure 'dst' is not marked as owner of the
-// memory (still held by 'src').
-void WebPCopyDecBuffer(const WebPDecBuffer* const src,
- WebPDecBuffer* const dst);
-
-// Copy and transfer ownership from src to dst (beware of parameter order!)
-void WebPGrabDecBuffer(WebPDecBuffer* const src, WebPDecBuffer* const dst);
-
-
-
-//------------------------------------------------------------------------------
-
-#if defined(__cplusplus) || defined(c_plusplus)
-} // extern "C"
-#endif
-
-#endif /* WEBP_DEC_WEBPI_H_ */
diff --git a/drivers/webpold/decode.h b/drivers/webpold/decode.h
deleted file mode 100644
index 43b6c58f4f..0000000000
--- a/drivers/webpold/decode.h
+++ /dev/null
@@ -1,454 +0,0 @@
-// Copyright 2010 Google Inc. All Rights Reserved.
-//
-// This code is licensed under the same terms as WebM:
-// Software License Agreement: http://www.webmproject.org/license/software/
-// Additional IP Rights Grant: http://www.webmproject.org/license/additional/
-// -----------------------------------------------------------------------------
-//
-// Main decoding functions for WebP images.
-//
-// Author: Skal (pascal.massimino@gmail.com)
-
-#ifndef WEBP_WEBP_DECODE_H_
-#define WEBP_WEBP_DECODE_H_
-
-#include "./types.h"
-
-#if defined(__cplusplus) || defined(c_plusplus)
-extern "C" {
-#endif
-
-#define WEBP_DECODER_ABI_VERSION 0x0200 // MAJOR(8b) + MINOR(8b)
-
-// Return the decoder's version number, packed in hexadecimal using 8bits for
-// each of major/minor/revision. E.g: v2.5.7 is 0x020507.
-WEBP_EXTERN(int) WebPGetDecoderVersion(void);
-
-// Retrieve basic header information: width, height.
-// This function will also validate the header and return 0 in
-// case of formatting error.
-// Pointers 'width' and 'height' can be passed NULL if deemed irrelevant.
-WEBP_EXTERN(int) WebPGetInfo(const uint8_t* data, size_t data_size,
- int* width, int* height);
-
-// Decodes WebP images pointed to by 'data' and returns RGBA samples, along
-// with the dimensions in *width and *height. The ordering of samples in
-// memory is R, G, B, A, R, G, B, A... in scan order (endian-independent).
-// The returned pointer should be deleted calling free().
-// Returns NULL in case of error.
-WEBP_EXTERN(uint8_t*) WebPDecodeRGBA(const uint8_t* data, size_t data_size,
- int* width, int* height);
-
-// Same as WebPDecodeRGBA, but returning A, R, G, B, A, R, G, B... ordered data.
-WEBP_EXTERN(uint8_t*) WebPDecodeARGB(const uint8_t* data, size_t data_size,
- int* width, int* height);
-
-// Same as WebPDecodeRGBA, but returning B, G, R, A, B, G, R, A... ordered data.
-WEBP_EXTERN(uint8_t*) WebPDecodeBGRA(const uint8_t* data, size_t data_size,
- int* width, int* height);
-
-// Same as WebPDecodeRGBA, but returning R, G, B, R, G, B... ordered data.
-// If the bitstream contains transparency, it is ignored.
-WEBP_EXTERN(uint8_t*) WebPDecodeRGB(const uint8_t* data, size_t data_size,
- int* width, int* height);
-
-// Same as WebPDecodeRGB, but returning B, G, R, B, G, R... ordered data.
-WEBP_EXTERN(uint8_t*) WebPDecodeBGR(const uint8_t* data, size_t data_size,
- int* width, int* height);
-
-
-// Decode WebP images pointed to by 'data' to Y'UV format(*). The pointer
-// returned is the Y samples buffer. Upon return, *u and *v will point to
-// the U and V chroma data. These U and V buffers need NOT be free()'d,
-// unlike the returned Y luma one. The dimension of the U and V planes
-// are both (*width + 1) / 2 and (*height + 1)/ 2.
-// Upon return, the Y buffer has a stride returned as '*stride', while U and V
-// have a common stride returned as '*uv_stride'.
-// Return NULL in case of error.
-// (*) Also named Y'CbCr. See: http://en.wikipedia.org/wiki/YCbCr
-WEBP_EXTERN(uint8_t*) WebPDecodeYUV(const uint8_t* data, size_t data_size,
- int* width, int* height,
- uint8_t** u, uint8_t** v,
- int* stride, int* uv_stride);
-
-// These five functions are variants of the above ones, that decode the image
-// directly into a pre-allocated buffer 'output_buffer'. The maximum storage
-// available in this buffer is indicated by 'output_buffer_size'. If this
-// storage is not sufficient (or an error occurred), NULL is returned.
-// Otherwise, output_buffer is returned, for convenience.
-// The parameter 'output_stride' specifies the distance (in bytes)
-// between scanlines. Hence, output_buffer_size is expected to be at least
-// output_stride x picture-height.
-WEBP_EXTERN(uint8_t*) WebPDecodeRGBAInto(
- const uint8_t* data, size_t data_size,
- uint8_t* output_buffer, size_t output_buffer_size, int output_stride);
-WEBP_EXTERN(uint8_t*) WebPDecodeARGBInto(
- const uint8_t* data, size_t data_size,
- uint8_t* output_buffer, size_t output_buffer_size, int output_stride);
-WEBP_EXTERN(uint8_t*) WebPDecodeBGRAInto(
- const uint8_t* data, size_t data_size,
- uint8_t* output_buffer, size_t output_buffer_size, int output_stride);
-
-// RGB and BGR variants. Here too the transparency information, if present,
-// will be dropped and ignored.
-WEBP_EXTERN(uint8_t*) WebPDecodeRGBInto(
- const uint8_t* data, size_t data_size,
- uint8_t* output_buffer, size_t output_buffer_size, int output_stride);
-WEBP_EXTERN(uint8_t*) WebPDecodeBGRInto(
- const uint8_t* data, size_t data_size,
- uint8_t* output_buffer, size_t output_buffer_size, int output_stride);
-
-// WebPDecodeYUVInto() is a variant of WebPDecodeYUV() that operates directly
-// into pre-allocated luma/chroma plane buffers. This function requires the
-// strides to be passed: one for the luma plane and one for each of the
-// chroma ones. The size of each plane buffer is passed as 'luma_size',
-// 'u_size' and 'v_size' respectively.
-// Pointer to the luma plane ('*luma') is returned or NULL if an error occurred
-// during decoding (or because some buffers were found to be too small).
-WEBP_EXTERN(uint8_t*) WebPDecodeYUVInto(
- const uint8_t* data, size_t data_size,
- uint8_t* luma, size_t luma_size, int luma_stride,
- uint8_t* u, size_t u_size, int u_stride,
- uint8_t* v, size_t v_size, int v_stride);
-
-//------------------------------------------------------------------------------
-// Output colorspaces and buffer
-
-// Colorspaces
-// Note: the naming describes the byte-ordering of packed samples in memory.
-// For instance, MODE_BGRA relates to samples ordered as B,G,R,A,B,G,R,A,...
-// Non-capital names (e.g.:MODE_Argb) relates to pre-multiplied RGB channels.
-// RGB-565 and RGBA-4444 are also endian-agnostic and byte-oriented.
-typedef enum { MODE_RGB = 0, MODE_RGBA = 1,
- MODE_BGR = 2, MODE_BGRA = 3,
- MODE_ARGB = 4, MODE_RGBA_4444 = 5,
- MODE_RGB_565 = 6,
- // RGB-premultiplied transparent modes (alpha value is preserved)
- MODE_rgbA = 7,
- MODE_bgrA = 8,
- MODE_Argb = 9,
- MODE_rgbA_4444 = 10,
- // YUV modes must come after RGB ones.
- MODE_YUV = 11, MODE_YUVA = 12, // yuv 4:2:0
- MODE_LAST = 13
- } WEBP_CSP_MODE;
-
-// Some useful macros:
-static WEBP_INLINE int WebPIsPremultipliedMode(WEBP_CSP_MODE mode) {
- return (mode == MODE_rgbA || mode == MODE_bgrA || mode == MODE_Argb ||
- mode == MODE_rgbA_4444);
-}
-
-static WEBP_INLINE int WebPIsAlphaMode(WEBP_CSP_MODE mode) {
- return (mode == MODE_RGBA || mode == MODE_BGRA || mode == MODE_ARGB ||
- mode == MODE_RGBA_4444 || mode == MODE_YUVA ||
- WebPIsPremultipliedMode(mode));
-}
-
-static WEBP_INLINE int WebPIsRGBMode(WEBP_CSP_MODE mode) {
- return (mode < MODE_YUV);
-}
-
-//------------------------------------------------------------------------------
-// WebPDecBuffer: Generic structure for describing the output sample buffer.
-
-typedef struct { // view as RGBA
- uint8_t* rgba; // pointer to RGBA samples
- int stride; // stride in bytes from one scanline to the next.
- size_t size; // total size of the *rgba buffer.
-} WebPRGBABuffer;
-
-typedef struct { // view as YUVA
- uint8_t* y, *u, *v, *a; // pointer to luma, chroma U/V, alpha samples
- int y_stride; // luma stride
- int u_stride, v_stride; // chroma strides
- int a_stride; // alpha stride
- size_t y_size; // luma plane size
- size_t u_size, v_size; // chroma planes size
- size_t a_size; // alpha-plane size
-} WebPYUVABuffer;
-
-// Output buffer
-typedef struct {
- WEBP_CSP_MODE colorspace; // Colorspace.
- int width, height; // Dimensions.
- int is_external_memory; // If true, 'internal_memory' pointer is not used.
- union {
- WebPRGBABuffer RGBA;
- WebPYUVABuffer YUVA;
- } u; // Nameless union of buffer parameters.
- uint32_t pad[4]; // padding for later use
-
- uint8_t* private_memory; // Internally allocated memory (only when
- // is_external_memory is false). Should not be used
- // externally, but accessed via the buffer union.
-} WebPDecBuffer;
-
-// Internal, version-checked, entry point
-WEBP_EXTERN(int) WebPInitDecBufferInternal(WebPDecBuffer*, int);
-
-// Initialize the structure as empty. Must be called before any other use.
-// Returns false in case of version mismatch
-static WEBP_INLINE int WebPInitDecBuffer(WebPDecBuffer* buffer) {
- return WebPInitDecBufferInternal(buffer, WEBP_DECODER_ABI_VERSION);
-}
-
-// Free any memory associated with the buffer. Must always be called last.
-// Note: doesn't free the 'buffer' structure itself.
-WEBP_EXTERN(void) WebPFreeDecBuffer(WebPDecBuffer* buffer);
-
-//------------------------------------------------------------------------------
-// Enumeration of the status codes
-
-typedef enum {
- VP8_STATUS_OK = 0,
- VP8_STATUS_OUT_OF_MEMORY,
- VP8_STATUS_INVALID_PARAM,
- VP8_STATUS_BITSTREAM_ERROR,
- VP8_STATUS_UNSUPPORTED_FEATURE,
- VP8_STATUS_SUSPENDED,
- VP8_STATUS_USER_ABORT,
- VP8_STATUS_NOT_ENOUGH_DATA
-} VP8StatusCode;
-
-//------------------------------------------------------------------------------
-// Incremental decoding
-//
-// This API allows streamlined decoding of partial data.
-// Picture can be incrementally decoded as data become available thanks to the
-// WebPIDecoder object. This object can be left in a SUSPENDED state if the
-// picture is only partially decoded, pending additional input.
-// Code example:
-//
-// WebPInitDecBuffer(&buffer);
-// buffer.colorspace = mode;
-// ...
-// WebPIDecoder* idec = WebPINewDecoder(&buffer);
-// while (has_more_data) {
-// // ... (get additional data)
-// status = WebPIAppend(idec, new_data, new_data_size);
-// if (status != VP8_STATUS_SUSPENDED ||
-// break;
-// }
-//
-// // The above call decodes the current available buffer.
-// // Part of the image can now be refreshed by calling to
-// // WebPIDecGetRGB()/WebPIDecGetYUVA() etc.
-// }
-// WebPIDelete(idec);
-
-typedef struct WebPIDecoder WebPIDecoder;
-
-// Creates a new incremental decoder with the supplied buffer parameter.
-// This output_buffer can be passed NULL, in which case a default output buffer
-// is used (with MODE_RGB). Otherwise, an internal reference to 'output_buffer'
-// is kept, which means that the lifespan of 'output_buffer' must be larger than
-// that of the returned WebPIDecoder object.
-// Returns NULL if the allocation failed.
-WEBP_EXTERN(WebPIDecoder*) WebPINewDecoder(WebPDecBuffer* output_buffer);
-
-// This function allocates and initializes an incremental-decoder object, which
-// will output the RGB/A samples specified by 'csp' into a preallocated
-// buffer 'output_buffer'. The size of this buffer is at least
-// 'output_buffer_size' and the stride (distance in bytes between two scanlines)
-// is specified by 'output_stride'. Returns NULL if the allocation failed.
-WEBP_EXTERN(WebPIDecoder*) WebPINewRGB(
- WEBP_CSP_MODE csp,
- uint8_t* output_buffer, size_t output_buffer_size, int output_stride);
-
-// This function allocates and initializes an incremental-decoder object, which
-// will output the raw luma/chroma samples into a preallocated planes. The luma
-// plane is specified by its pointer 'luma', its size 'luma_size' and its stride
-// 'luma_stride'. Similarly, the chroma-u plane is specified by the 'u',
-// 'u_size' and 'u_stride' parameters, and the chroma-v plane by 'v'
-// and 'v_size'. And same for the alpha-plane. The 'a' pointer can be pass
-// NULL in case one is not interested in the transparency plane.
-// Returns NULL if the allocation failed.
-WEBP_EXTERN(WebPIDecoder*) WebPINewYUVA(
- uint8_t* luma, size_t luma_size, int luma_stride,
- uint8_t* u, size_t u_size, int u_stride,
- uint8_t* v, size_t v_size, int v_stride,
- uint8_t* a, size_t a_size, int a_stride);
-
-// Deprecated version of the above, without the alpha plane.
-// Kept for backward compatibility.
-WEBP_EXTERN(WebPIDecoder*) WebPINewYUV(
- uint8_t* luma, size_t luma_size, int luma_stride,
- uint8_t* u, size_t u_size, int u_stride,
- uint8_t* v, size_t v_size, int v_stride);
-
-// Deletes the WebPIDecoder object and associated memory. Must always be called
-// if WebPINewDecoder, WebPINewRGB or WebPINewYUV succeeded.
-WEBP_EXTERN(void) WebPIDelete(WebPIDecoder* idec);
-
-// Copies and decodes the next available data. Returns VP8_STATUS_OK when
-// the image is successfully decoded. Returns VP8_STATUS_SUSPENDED when more
-// data is expected. Returns error in other cases.
-WEBP_EXTERN(VP8StatusCode) WebPIAppend(
- WebPIDecoder* idec, const uint8_t* data, size_t data_size);
-
-// A variant of the above function to be used when data buffer contains
-// partial data from the beginning. In this case data buffer is not copied
-// to the internal memory.
-// Note that the value of the 'data' pointer can change between calls to
-// WebPIUpdate, for instance when the data buffer is resized to fit larger data.
-WEBP_EXTERN(VP8StatusCode) WebPIUpdate(
- WebPIDecoder* idec, const uint8_t* data, size_t data_size);
-
-// Returns the RGB/A image decoded so far. Returns NULL if output params
-// are not initialized yet. The RGB/A output type corresponds to the colorspace
-// specified during call to WebPINewDecoder() or WebPINewRGB().
-// *last_y is the index of last decoded row in raster scan order. Some pointers
-// (*last_y, *width etc.) can be NULL if corresponding information is not
-// needed.
-WEBP_EXTERN(uint8_t*) WebPIDecGetRGB(
- const WebPIDecoder* idec, int* last_y,
- int* width, int* height, int* stride);
-
-// Same as above function to get a YUVA image. Returns pointer to the luma
-// plane or NULL in case of error. If there is no alpha information
-// the alpha pointer '*a' will be returned NULL.
-WEBP_EXTERN(uint8_t*) WebPIDecGetYUVA(
- const WebPIDecoder* idec, int* last_y,
- uint8_t** u, uint8_t** v, uint8_t** a,
- int* width, int* height, int* stride, int* uv_stride, int* a_stride);
-
-// Deprecated alpha-less version of WebPIDecGetYUVA(): it will ignore the
-// alpha information (if present). Kept for backward compatibility.
-static WEBP_INLINE uint8_t* WebPIDecGetYUV(
- const WebPIDecoder* idec, int* last_y, uint8_t** u, uint8_t** v,
- int* width, int* height, int* stride, int* uv_stride) {
- return WebPIDecGetYUVA(idec, last_y, u, v, NULL, width, height,
- stride, uv_stride, NULL);
-}
-
-// Generic call to retrieve information about the displayable area.
-// If non NULL, the left/right/width/height pointers are filled with the visible
-// rectangular area so far.
-// Returns NULL in case the incremental decoder object is in an invalid state.
-// Otherwise returns the pointer to the internal representation. This structure
-// is read-only, tied to WebPIDecoder's lifespan and should not be modified.
-WEBP_EXTERN(const WebPDecBuffer*) WebPIDecodedArea(
- const WebPIDecoder* idec, int* left, int* top, int* width, int* height);
-
-//------------------------------------------------------------------------------
-// Advanced decoding parametrization
-//
-// Code sample for using the advanced decoding API
-/*
- // A) Init a configuration object
- WebPDecoderConfig config;
- CHECK(WebPInitDecoderConfig(&config));
-
- // B) optional: retrieve the bitstream's features.
- CHECK(WebPGetFeatures(data, data_size, &config.input) == VP8_STATUS_OK);
-
- // C) Adjust 'config', if needed
- config.no_fancy = 1;
- config.output.colorspace = MODE_BGRA;
- // etc.
-
- // Note that you can also make config.output point to an externally
- // supplied memory buffer, provided it's big enough to store the decoded
- // picture. Otherwise, config.output will just be used to allocate memory
- // and store the decoded picture.
-
- // D) Decode!
- CHECK(WebPDecode(data, data_size, &config) == VP8_STATUS_OK);
-
- // E) Decoded image is now in config.output (and config.output.u.RGBA)
-
- // F) Reclaim memory allocated in config's object. It's safe to call
- // this function even if the memory is external and wasn't allocated
- // by WebPDecode().
- WebPFreeDecBuffer(&config.output);
-*/
-
-// Features gathered from the bitstream
-typedef struct {
- int width; // Width in pixels, as read from the bitstream.
- int height; // Height in pixels, as read from the bitstream.
- int has_alpha; // True if the bitstream contains an alpha channel.
-
- // Unused for now:
- int bitstream_version; // should be 0 for now. TODO(later)
- int no_incremental_decoding; // if true, using incremental decoding is not
- // recommended.
- int rotate; // TODO(later)
- int uv_sampling; // should be 0 for now. TODO(later)
- uint32_t pad[3]; // padding for later use
-} WebPBitstreamFeatures;
-
-// Internal, version-checked, entry point
-WEBP_EXTERN(VP8StatusCode) WebPGetFeaturesInternal(
- const uint8_t*, size_t, WebPBitstreamFeatures*, int);
-
-// Retrieve features from the bitstream. The *features structure is filled
-// with information gathered from the bitstream.
-// Returns false in case of error or version mismatch.
-// In case of error, features->bitstream_status will reflect the error code.
-static WEBP_INLINE VP8StatusCode WebPGetFeatures(
- const uint8_t* data, size_t data_size,
- WebPBitstreamFeatures* features) {
- return WebPGetFeaturesInternal(data, data_size, features,
- WEBP_DECODER_ABI_VERSION);
-}
-
-// Decoding options
-typedef struct {
- int bypass_filtering; // if true, skip the in-loop filtering
- int no_fancy_upsampling; // if true, use faster pointwise upsampler
- int use_cropping; // if true, cropping is applied _first_
- int crop_left, crop_top; // top-left position for cropping.
- // Will be snapped to even values.
- int crop_width, crop_height; // dimension of the cropping area
- int use_scaling; // if true, scaling is applied _afterward_
- int scaled_width, scaled_height; // final resolution
- int use_threads; // if true, use multi-threaded decoding
-
- // Unused for now:
- int force_rotation; // forced rotation (to be applied _last_)
- int no_enhancement; // if true, discard enhancement layer
- uint32_t pad[6]; // padding for later use
-} WebPDecoderOptions;
-
-// Main object storing the configuration for advanced decoding.
-typedef struct {
- WebPBitstreamFeatures input; // Immutable bitstream features (optional)
- WebPDecBuffer output; // Output buffer (can point to external mem)
- WebPDecoderOptions options; // Decoding options
-} WebPDecoderConfig;
-
-// Internal, version-checked, entry point
-WEBP_EXTERN(int) WebPInitDecoderConfigInternal(WebPDecoderConfig*, int);
-
-// Initialize the configuration as empty. This function must always be
-// called first, unless WebPGetFeatures() is to be called.
-// Returns false in case of mismatched version.
-static WEBP_INLINE int WebPInitDecoderConfig(WebPDecoderConfig* config) {
- return WebPInitDecoderConfigInternal(config, WEBP_DECODER_ABI_VERSION);
-}
-
-// Instantiate a new incremental decoder object with the requested
-// configuration. The bitstream can be passed using 'data' and 'data_size'
-// parameter, in which case the features will be parsed and stored into
-// config->input. Otherwise, 'data' can be NULL and no parsing will occur.
-// Note that 'config' can be NULL too, in which case a default configuration
-// is used.
-// The return WebPIDecoder object must always be deleted calling WebPIDelete().
-// Returns NULL in case of error (and config->status will then reflect
-// the error condition).
-WEBP_EXTERN(WebPIDecoder*) WebPIDecode(const uint8_t* data, size_t data_size,
- WebPDecoderConfig* config);
-
-// Non-incremental version. This version decodes the full data at once, taking
-// 'config' into account. Returns decoding status (which should be VP8_STATUS_OK
-// if the decoding was successful).
-WEBP_EXTERN(VP8StatusCode) WebPDecode(const uint8_t* data, size_t data_size,
- WebPDecoderConfig* config);
-
-#if defined(__cplusplus) || defined(c_plusplus)
-} // extern "C"
-#endif
-
-#endif /* WEBP_WEBP_DECODE_H_ */
diff --git a/drivers/webpold/dsp/cpu.c b/drivers/webpold/dsp/cpu.c
deleted file mode 100644
index 0228734457..0000000000
--- a/drivers/webpold/dsp/cpu.c
+++ /dev/null
@@ -1,85 +0,0 @@
-// Copyright 2011 Google Inc. All Rights Reserved.
-//
-// This code is licensed under the same terms as WebM:
-// Software License Agreement: http://www.webmproject.org/license/software/
-// Additional IP Rights Grant: http://www.webmproject.org/license/additional/
-// -----------------------------------------------------------------------------
-//
-// CPU detection
-//
-// Author: Christian Duvivier (cduvivier@google.com)
-
-#include "./dsp.h"
-
-#if defined(__ANDROID__)
-#include <cpu-features.h>
-#endif
-
-#if defined(__cplusplus) || defined(c_plusplus)
-extern "C" {
-#endif
-
-//------------------------------------------------------------------------------
-// SSE2 detection.
-//
-
-// apple/darwin gcc-4.0.1 defines __PIC__, but not __pic__ with -fPIC.
-#if (defined(__pic__) || defined(__PIC__)) && defined(__i386__)
-static WEBP_INLINE void GetCPUInfo(int cpu_info[4], int info_type) {
- __asm__ volatile (
- "mov %%ebx, %%edi\n"
- "cpuid\n"
- "xchg %%edi, %%ebx\n"
- : "=a"(cpu_info[0]), "=D"(cpu_info[1]), "=c"(cpu_info[2]), "=d"(cpu_info[3])
- : "a"(info_type));
-}
-#elif defined(__i386__) || defined(__x86_64__)
-static WEBP_INLINE void GetCPUInfo(int cpu_info[4], int info_type) {
- __asm__ volatile (
- "cpuid\n"
- : "=a"(cpu_info[0]), "=b"(cpu_info[1]), "=c"(cpu_info[2]), "=d"(cpu_info[3])
- : "a"(info_type));
-}
-#elif defined(WEBP_MSC_SSE2)
-#define GetCPUInfo __cpuid
-#endif
-
-#if defined(__i386__) || defined(__x86_64__) || defined(WEBP_MSC_SSE2)
-static int x86CPUInfo(CPUFeature feature) {
- int cpu_info[4];
- GetCPUInfo(cpu_info, 1);
- if (feature == kSSE2) {
- return 0 != (cpu_info[3] & 0x04000000);
- }
- if (feature == kSSE3) {
- return 0 != (cpu_info[2] & 0x00000001);
- }
- return 0;
-}
-VP8CPUInfo VP8GetCPUInfo = x86CPUInfo;
-#elif defined(WEBP_ANDROID_NEON)
-static int AndroidCPUInfo(CPUFeature feature) {
- const AndroidCpuFamily cpu_family = android_getCpuFamily();
- const uint64_t cpu_features = android_getCpuFeatures();
- if (feature == kNEON) {
- return (cpu_family == ANDROID_CPU_FAMILY_ARM &&
- 0 != (cpu_features & ANDROID_CPU_ARM_FEATURE_NEON));
- }
- return 0;
-}
-VP8CPUInfo VP8GetCPUInfo = AndroidCPUInfo;
-#elif defined(__ARM_NEON__)
-// define a dummy function to enable turning off NEON at runtime by setting
-// VP8DecGetCPUInfo = NULL
-static int armCPUInfo(CPUFeature feature) {
- (void)feature;
- return 1;
-}
-VP8CPUInfo VP8GetCPUInfo = armCPUInfo;
-#else
-VP8CPUInfo VP8GetCPUInfo = NULL;
-#endif
-
-#if defined(__cplusplus) || defined(c_plusplus)
-} // extern "C"
-#endif
diff --git a/drivers/webpold/dsp/dec.c b/drivers/webpold/dsp/dec.c
deleted file mode 100644
index 9ae7b6fa76..0000000000
--- a/drivers/webpold/dsp/dec.c
+++ /dev/null
@@ -1,732 +0,0 @@
-// Copyright 2010 Google Inc. All Rights Reserved.
-//
-// This code is licensed under the same terms as WebM:
-// Software License Agreement: http://www.webmproject.org/license/software/
-// Additional IP Rights Grant: http://www.webmproject.org/license/additional/
-// -----------------------------------------------------------------------------
-//
-// Speed-critical decoding functions.
-//
-// Author: Skal (pascal.massimino@gmail.com)
-
-#include "./dsp.h"
-#include "../dec/vp8i.h"
-
-#if defined(__cplusplus) || defined(c_plusplus)
-extern "C" {
-#endif
-
-//------------------------------------------------------------------------------
-// run-time tables (~4k)
-
-static uint8_t abs0[255 + 255 + 1]; // abs(i)
-static uint8_t abs1[255 + 255 + 1]; // abs(i)>>1
-static int8_t sclip1[1020 + 1020 + 1]; // clips [-1020, 1020] to [-128, 127]
-static int8_t sclip2[112 + 112 + 1]; // clips [-112, 112] to [-16, 15]
-static uint8_t clip1[255 + 510 + 1]; // clips [-255,510] to [0,255]
-
-// We declare this variable 'volatile' to prevent instruction reordering
-// and make sure it's set to true _last_ (so as to be thread-safe)
-static volatile int tables_ok = 0;
-
-static void DspInitTables(void) {
- if (!tables_ok) {
- int i;
- for (i = -255; i <= 255; ++i) {
- abs0[255 + i] = (i < 0) ? -i : i;
- abs1[255 + i] = abs0[255 + i] >> 1;
- }
- for (i = -1020; i <= 1020; ++i) {
- sclip1[1020 + i] = (i < -128) ? -128 : (i > 127) ? 127 : i;
- }
- for (i = -112; i <= 112; ++i) {
- sclip2[112 + i] = (i < -16) ? -16 : (i > 15) ? 15 : i;
- }
- for (i = -255; i <= 255 + 255; ++i) {
- clip1[255 + i] = (i < 0) ? 0 : (i > 255) ? 255 : i;
- }
- tables_ok = 1;
- }
-}
-
-static WEBP_INLINE uint8_t clip_8b(int v) {
- return (!(v & ~0xff)) ? v : (v < 0) ? 0 : 255;
-}
-
-//------------------------------------------------------------------------------
-// Transforms (Paragraph 14.4)
-
-#define STORE(x, y, v) \
- dst[x + y * BPS] = clip_8b(dst[x + y * BPS] + ((v) >> 3))
-
-static const int kC1 = 20091 + (1 << 16);
-static const int kC2 = 35468;
-#define MUL(a, b) (((a) * (b)) >> 16)
-
-static void TransformOne(const int16_t* in, uint8_t* dst) {
- int C[4 * 4], *tmp;
- int i;
- tmp = C;
- for (i = 0; i < 4; ++i) { // vertical pass
- const int a = in[0] + in[8]; // [-4096, 4094]
- const int b = in[0] - in[8]; // [-4095, 4095]
- const int c = MUL(in[4], kC2) - MUL(in[12], kC1); // [-3783, 3783]
- const int d = MUL(in[4], kC1) + MUL(in[12], kC2); // [-3785, 3781]
- tmp[0] = a + d; // [-7881, 7875]
- tmp[1] = b + c; // [-7878, 7878]
- tmp[2] = b - c; // [-7878, 7878]
- tmp[3] = a - d; // [-7877, 7879]
- tmp += 4;
- in++;
- }
- // Each pass is expanding the dynamic range by ~3.85 (upper bound).
- // The exact value is (2. + (kC1 + kC2) / 65536).
- // After the second pass, maximum interval is [-3794, 3794], assuming
- // an input in [-2048, 2047] interval. We then need to add a dst value
- // in the [0, 255] range.
- // In the worst case scenario, the input to clip_8b() can be as large as
- // [-60713, 60968].
- tmp = C;
- for (i = 0; i < 4; ++i) { // horizontal pass
- const int dc = tmp[0] + 4;
- const int a = dc + tmp[8];
- const int b = dc - tmp[8];
- const int c = MUL(tmp[4], kC2) - MUL(tmp[12], kC1);
- const int d = MUL(tmp[4], kC1) + MUL(tmp[12], kC2);
- STORE(0, 0, a + d);
- STORE(1, 0, b + c);
- STORE(2, 0, b - c);
- STORE(3, 0, a - d);
- tmp++;
- dst += BPS;
- }
-}
-#undef MUL
-
-static void TransformTwo(const int16_t* in, uint8_t* dst, int do_two) {
- TransformOne(in, dst);
- if (do_two) {
- TransformOne(in + 16, dst + 4);
- }
-}
-
-static void TransformUV(const int16_t* in, uint8_t* dst) {
- VP8Transform(in + 0 * 16, dst, 1);
- VP8Transform(in + 2 * 16, dst + 4 * BPS, 1);
-}
-
-static void TransformDC(const int16_t *in, uint8_t* dst) {
- const int DC = in[0] + 4;
- int i, j;
- for (j = 0; j < 4; ++j) {
- for (i = 0; i < 4; ++i) {
- STORE(i, j, DC);
- }
- }
-}
-
-static void TransformDCUV(const int16_t* in, uint8_t* dst) {
- if (in[0 * 16]) TransformDC(in + 0 * 16, dst);
- if (in[1 * 16]) TransformDC(in + 1 * 16, dst + 4);
- if (in[2 * 16]) TransformDC(in + 2 * 16, dst + 4 * BPS);
- if (in[3 * 16]) TransformDC(in + 3 * 16, dst + 4 * BPS + 4);
-}
-
-#undef STORE
-
-//------------------------------------------------------------------------------
-// Paragraph 14.3
-
-static void TransformWHT(const int16_t* in, int16_t* out) {
- int tmp[16];
- int i;
- for (i = 0; i < 4; ++i) {
- const int a0 = in[0 + i] + in[12 + i];
- const int a1 = in[4 + i] + in[ 8 + i];
- const int a2 = in[4 + i] - in[ 8 + i];
- const int a3 = in[0 + i] - in[12 + i];
- tmp[0 + i] = a0 + a1;
- tmp[8 + i] = a0 - a1;
- tmp[4 + i] = a3 + a2;
- tmp[12 + i] = a3 - a2;
- }
- for (i = 0; i < 4; ++i) {
- const int dc = tmp[0 + i * 4] + 3; // w/ rounder
- const int a0 = dc + tmp[3 + i * 4];
- const int a1 = tmp[1 + i * 4] + tmp[2 + i * 4];
- const int a2 = tmp[1 + i * 4] - tmp[2 + i * 4];
- const int a3 = dc - tmp[3 + i * 4];
- out[ 0] = (a0 + a1) >> 3;
- out[16] = (a3 + a2) >> 3;
- out[32] = (a0 - a1) >> 3;
- out[48] = (a3 - a2) >> 3;
- out += 64;
- }
-}
-
-void (*VP8TransformWHT)(const int16_t* in, int16_t* out) = TransformWHT;
-
-//------------------------------------------------------------------------------
-// Intra predictions
-
-#define DST(x, y) dst[(x) + (y) * BPS]
-
-static WEBP_INLINE void TrueMotion(uint8_t *dst, int size) {
- const uint8_t* top = dst - BPS;
- const uint8_t* const clip0 = clip1 + 255 - top[-1];
- int y;
- for (y = 0; y < size; ++y) {
- const uint8_t* const clip = clip0 + dst[-1];
- int x;
- for (x = 0; x < size; ++x) {
- dst[x] = clip[top[x]];
- }
- dst += BPS;
- }
-}
-static void TM4(uint8_t *dst) { TrueMotion(dst, 4); }
-static void TM8uv(uint8_t *dst) { TrueMotion(dst, 8); }
-static void TM16(uint8_t *dst) { TrueMotion(dst, 16); }
-
-//------------------------------------------------------------------------------
-// 16x16
-
-static void VE16(uint8_t *dst) { // vertical
- int j;
- for (j = 0; j < 16; ++j) {
- memcpy(dst + j * BPS, dst - BPS, 16);
- }
-}
-
-static void HE16(uint8_t *dst) { // horizontal
- int j;
- for (j = 16; j > 0; --j) {
- memset(dst, dst[-1], 16);
- dst += BPS;
- }
-}
-
-static WEBP_INLINE void Put16(int v, uint8_t* dst) {
- int j;
- for (j = 0; j < 16; ++j) {
- memset(dst + j * BPS, v, 16);
- }
-}
-
-static void DC16(uint8_t *dst) { // DC
- int DC = 16;
- int j;
- for (j = 0; j < 16; ++j) {
- DC += dst[-1 + j * BPS] + dst[j - BPS];
- }
- Put16(DC >> 5, dst);
-}
-
-static void DC16NoTop(uint8_t *dst) { // DC with top samples not available
- int DC = 8;
- int j;
- for (j = 0; j < 16; ++j) {
- DC += dst[-1 + j * BPS];
- }
- Put16(DC >> 4, dst);
-}
-
-static void DC16NoLeft(uint8_t *dst) { // DC with left samples not available
- int DC = 8;
- int i;
- for (i = 0; i < 16; ++i) {
- DC += dst[i - BPS];
- }
- Put16(DC >> 4, dst);
-}
-
-static void DC16NoTopLeft(uint8_t *dst) { // DC with no top and left samples
- Put16(0x80, dst);
-}
-
-//------------------------------------------------------------------------------
-// 4x4
-
-#define AVG3(a, b, c) (((a) + 2 * (b) + (c) + 2) >> 2)
-#define AVG2(a, b) (((a) + (b) + 1) >> 1)
-
-static void VE4(uint8_t *dst) { // vertical
- const uint8_t* top = dst - BPS;
- const uint8_t vals[4] = {
- AVG3(top[-1], top[0], top[1]),
- AVG3(top[ 0], top[1], top[2]),
- AVG3(top[ 1], top[2], top[3]),
- AVG3(top[ 2], top[3], top[4])
- };
- int i;
- for (i = 0; i < 4; ++i) {
- memcpy(dst + i * BPS, vals, sizeof(vals));
- }
-}
-
-static void HE4(uint8_t *dst) { // horizontal
- const int A = dst[-1 - BPS];
- const int B = dst[-1];
- const int C = dst[-1 + BPS];
- const int D = dst[-1 + 2 * BPS];
- const int E = dst[-1 + 3 * BPS];
- *(uint32_t*)(dst + 0 * BPS) = 0x01010101U * AVG3(A, B, C);
- *(uint32_t*)(dst + 1 * BPS) = 0x01010101U * AVG3(B, C, D);
- *(uint32_t*)(dst + 2 * BPS) = 0x01010101U * AVG3(C, D, E);
- *(uint32_t*)(dst + 3 * BPS) = 0x01010101U * AVG3(D, E, E);
-}
-
-static void DC4(uint8_t *dst) { // DC
- uint32_t dc = 4;
- int i;
- for (i = 0; i < 4; ++i) dc += dst[i - BPS] + dst[-1 + i * BPS];
- dc >>= 3;
- for (i = 0; i < 4; ++i) memset(dst + i * BPS, dc, 4);
-}
-
-static void RD4(uint8_t *dst) { // Down-right
- const int I = dst[-1 + 0 * BPS];
- const int J = dst[-1 + 1 * BPS];
- const int K = dst[-1 + 2 * BPS];
- const int L = dst[-1 + 3 * BPS];
- const int X = dst[-1 - BPS];
- const int A = dst[0 - BPS];
- const int B = dst[1 - BPS];
- const int C = dst[2 - BPS];
- const int D = dst[3 - BPS];
- DST(0, 3) = AVG3(J, K, L);
- DST(0, 2) = DST(1, 3) = AVG3(I, J, K);
- DST(0, 1) = DST(1, 2) = DST(2, 3) = AVG3(X, I, J);
- DST(0, 0) = DST(1, 1) = DST(2, 2) = DST(3, 3) = AVG3(A, X, I);
- DST(1, 0) = DST(2, 1) = DST(3, 2) = AVG3(B, A, X);
- DST(2, 0) = DST(3, 1) = AVG3(C, B, A);
- DST(3, 0) = AVG3(D, C, B);
-}
-
-static void LD4(uint8_t *dst) { // Down-Left
- const int A = dst[0 - BPS];
- const int B = dst[1 - BPS];
- const int C = dst[2 - BPS];
- const int D = dst[3 - BPS];
- const int E = dst[4 - BPS];
- const int F = dst[5 - BPS];
- const int G = dst[6 - BPS];
- const int H = dst[7 - BPS];
- DST(0, 0) = AVG3(A, B, C);
- DST(1, 0) = DST(0, 1) = AVG3(B, C, D);
- DST(2, 0) = DST(1, 1) = DST(0, 2) = AVG3(C, D, E);
- DST(3, 0) = DST(2, 1) = DST(1, 2) = DST(0, 3) = AVG3(D, E, F);
- DST(3, 1) = DST(2, 2) = DST(1, 3) = AVG3(E, F, G);
- DST(3, 2) = DST(2, 3) = AVG3(F, G, H);
- DST(3, 3) = AVG3(G, H, H);
-}
-
-static void VR4(uint8_t *dst) { // Vertical-Right
- const int I = dst[-1 + 0 * BPS];
- const int J = dst[-1 + 1 * BPS];
- const int K = dst[-1 + 2 * BPS];
- const int X = dst[-1 - BPS];
- const int A = dst[0 - BPS];
- const int B = dst[1 - BPS];
- const int C = dst[2 - BPS];
- const int D = dst[3 - BPS];
- DST(0, 0) = DST(1, 2) = AVG2(X, A);
- DST(1, 0) = DST(2, 2) = AVG2(A, B);
- DST(2, 0) = DST(3, 2) = AVG2(B, C);
- DST(3, 0) = AVG2(C, D);
-
- DST(0, 3) = AVG3(K, J, I);
- DST(0, 2) = AVG3(J, I, X);
- DST(0, 1) = DST(1, 3) = AVG3(I, X, A);
- DST(1, 1) = DST(2, 3) = AVG3(X, A, B);
- DST(2, 1) = DST(3, 3) = AVG3(A, B, C);
- DST(3, 1) = AVG3(B, C, D);
-}
-
-static void VL4(uint8_t *dst) { // Vertical-Left
- const int A = dst[0 - BPS];
- const int B = dst[1 - BPS];
- const int C = dst[2 - BPS];
- const int D = dst[3 - BPS];
- const int E = dst[4 - BPS];
- const int F = dst[5 - BPS];
- const int G = dst[6 - BPS];
- const int H = dst[7 - BPS];
- DST(0, 0) = AVG2(A, B);
- DST(1, 0) = DST(0, 2) = AVG2(B, C);
- DST(2, 0) = DST(1, 2) = AVG2(C, D);
- DST(3, 0) = DST(2, 2) = AVG2(D, E);
-
- DST(0, 1) = AVG3(A, B, C);
- DST(1, 1) = DST(0, 3) = AVG3(B, C, D);
- DST(2, 1) = DST(1, 3) = AVG3(C, D, E);
- DST(3, 1) = DST(2, 3) = AVG3(D, E, F);
- DST(3, 2) = AVG3(E, F, G);
- DST(3, 3) = AVG3(F, G, H);
-}
-
-static void HU4(uint8_t *dst) { // Horizontal-Up
- const int I = dst[-1 + 0 * BPS];
- const int J = dst[-1 + 1 * BPS];
- const int K = dst[-1 + 2 * BPS];
- const int L = dst[-1 + 3 * BPS];
- DST(0, 0) = AVG2(I, J);
- DST(2, 0) = DST(0, 1) = AVG2(J, K);
- DST(2, 1) = DST(0, 2) = AVG2(K, L);
- DST(1, 0) = AVG3(I, J, K);
- DST(3, 0) = DST(1, 1) = AVG3(J, K, L);
- DST(3, 1) = DST(1, 2) = AVG3(K, L, L);
- DST(3, 2) = DST(2, 2) =
- DST(0, 3) = DST(1, 3) = DST(2, 3) = DST(3, 3) = L;
-}
-
-static void HD4(uint8_t *dst) { // Horizontal-Down
- const int I = dst[-1 + 0 * BPS];
- const int J = dst[-1 + 1 * BPS];
- const int K = dst[-1 + 2 * BPS];
- const int L = dst[-1 + 3 * BPS];
- const int X = dst[-1 - BPS];
- const int A = dst[0 - BPS];
- const int B = dst[1 - BPS];
- const int C = dst[2 - BPS];
-
- DST(0, 0) = DST(2, 1) = AVG2(I, X);
- DST(0, 1) = DST(2, 2) = AVG2(J, I);
- DST(0, 2) = DST(2, 3) = AVG2(K, J);
- DST(0, 3) = AVG2(L, K);
-
- DST(3, 0) = AVG3(A, B, C);
- DST(2, 0) = AVG3(X, A, B);
- DST(1, 0) = DST(3, 1) = AVG3(I, X, A);
- DST(1, 1) = DST(3, 2) = AVG3(J, I, X);
- DST(1, 2) = DST(3, 3) = AVG3(K, J, I);
- DST(1, 3) = AVG3(L, K, J);
-}
-
-#undef DST
-#undef AVG3
-#undef AVG2
-
-//------------------------------------------------------------------------------
-// Chroma
-
-static void VE8uv(uint8_t *dst) { // vertical
- int j;
- for (j = 0; j < 8; ++j) {
- memcpy(dst + j * BPS, dst - BPS, 8);
- }
-}
-
-static void HE8uv(uint8_t *dst) { // horizontal
- int j;
- for (j = 0; j < 8; ++j) {
- memset(dst, dst[-1], 8);
- dst += BPS;
- }
-}
-
-// helper for chroma-DC predictions
-static WEBP_INLINE void Put8x8uv(uint64_t v, uint8_t* dst) {
- int j;
- for (j = 0; j < 8; ++j) {
- *(uint64_t*)(dst + j * BPS) = v;
- }
-}
-
-static void DC8uv(uint8_t *dst) { // DC
- int dc0 = 8;
- int i;
- for (i = 0; i < 8; ++i) {
- dc0 += dst[i - BPS] + dst[-1 + i * BPS];
- }
- Put8x8uv((uint64_t)((dc0 >> 4) * 0x0101010101010101ULL), dst);
-}
-
-static void DC8uvNoLeft(uint8_t *dst) { // DC with no left samples
- int dc0 = 4;
- int i;
- for (i = 0; i < 8; ++i) {
- dc0 += dst[i - BPS];
- }
- Put8x8uv((uint64_t)((dc0 >> 3) * 0x0101010101010101ULL), dst);
-}
-
-static void DC8uvNoTop(uint8_t *dst) { // DC with no top samples
- int dc0 = 4;
- int i;
- for (i = 0; i < 8; ++i) {
- dc0 += dst[-1 + i * BPS];
- }
- Put8x8uv((uint64_t)((dc0 >> 3) * 0x0101010101010101ULL), dst);
-}
-
-static void DC8uvNoTopLeft(uint8_t *dst) { // DC with nothing
- Put8x8uv(0x8080808080808080ULL, dst);
-}
-
-//------------------------------------------------------------------------------
-// default C implementations
-
-const VP8PredFunc VP8PredLuma4[NUM_BMODES] = {
- DC4, TM4, VE4, HE4, RD4, VR4, LD4, VL4, HD4, HU4
-};
-
-const VP8PredFunc VP8PredLuma16[NUM_B_DC_MODES] = {
- DC16, TM16, VE16, HE16,
- DC16NoTop, DC16NoLeft, DC16NoTopLeft
-};
-
-const VP8PredFunc VP8PredChroma8[NUM_B_DC_MODES] = {
- DC8uv, TM8uv, VE8uv, HE8uv,
- DC8uvNoTop, DC8uvNoLeft, DC8uvNoTopLeft
-};
-
-//------------------------------------------------------------------------------
-// Edge filtering functions
-
-// 4 pixels in, 2 pixels out
-static WEBP_INLINE void do_filter2(uint8_t* p, int step) {
- const int p1 = p[-2*step], p0 = p[-step], q0 = p[0], q1 = p[step];
- const int a = 3 * (q0 - p0) + sclip1[1020 + p1 - q1];
- const int a1 = sclip2[112 + ((a + 4) >> 3)];
- const int a2 = sclip2[112 + ((a + 3) >> 3)];
- p[-step] = clip1[255 + p0 + a2];
- p[ 0] = clip1[255 + q0 - a1];
-}
-
-// 4 pixels in, 4 pixels out
-static WEBP_INLINE void do_filter4(uint8_t* p, int step) {
- const int p1 = p[-2*step], p0 = p[-step], q0 = p[0], q1 = p[step];
- const int a = 3 * (q0 - p0);
- const int a1 = sclip2[112 + ((a + 4) >> 3)];
- const int a2 = sclip2[112 + ((a + 3) >> 3)];
- const int a3 = (a1 + 1) >> 1;
- p[-2*step] = clip1[255 + p1 + a3];
- p[- step] = clip1[255 + p0 + a2];
- p[ 0] = clip1[255 + q0 - a1];
- p[ step] = clip1[255 + q1 - a3];
-}
-
-// 6 pixels in, 6 pixels out
-static WEBP_INLINE void do_filter6(uint8_t* p, int step) {
- const int p2 = p[-3*step], p1 = p[-2*step], p0 = p[-step];
- const int q0 = p[0], q1 = p[step], q2 = p[2*step];
- const int a = sclip1[1020 + 3 * (q0 - p0) + sclip1[1020 + p1 - q1]];
- const int a1 = (27 * a + 63) >> 7; // eq. to ((3 * a + 7) * 9) >> 7
- const int a2 = (18 * a + 63) >> 7; // eq. to ((2 * a + 7) * 9) >> 7
- const int a3 = (9 * a + 63) >> 7; // eq. to ((1 * a + 7) * 9) >> 7
- p[-3*step] = clip1[255 + p2 + a3];
- p[-2*step] = clip1[255 + p1 + a2];
- p[- step] = clip1[255 + p0 + a1];
- p[ 0] = clip1[255 + q0 - a1];
- p[ step] = clip1[255 + q1 - a2];
- p[ 2*step] = clip1[255 + q2 - a3];
-}
-
-static WEBP_INLINE int hev(const uint8_t* p, int step, int thresh) {
- const int p1 = p[-2*step], p0 = p[-step], q0 = p[0], q1 = p[step];
- return (abs0[255 + p1 - p0] > thresh) || (abs0[255 + q1 - q0] > thresh);
-}
-
-static WEBP_INLINE int needs_filter(const uint8_t* p, int step, int thresh) {
- const int p1 = p[-2*step], p0 = p[-step], q0 = p[0], q1 = p[step];
- return (2 * abs0[255 + p0 - q0] + abs1[255 + p1 - q1]) <= thresh;
-}
-
-static WEBP_INLINE int needs_filter2(const uint8_t* p,
- int step, int t, int it) {
- const int p3 = p[-4*step], p2 = p[-3*step], p1 = p[-2*step], p0 = p[-step];
- const int q0 = p[0], q1 = p[step], q2 = p[2*step], q3 = p[3*step];
- if ((2 * abs0[255 + p0 - q0] + abs1[255 + p1 - q1]) > t)
- return 0;
- return abs0[255 + p3 - p2] <= it && abs0[255 + p2 - p1] <= it &&
- abs0[255 + p1 - p0] <= it && abs0[255 + q3 - q2] <= it &&
- abs0[255 + q2 - q1] <= it && abs0[255 + q1 - q0] <= it;
-}
-
-//------------------------------------------------------------------------------
-// Simple In-loop filtering (Paragraph 15.2)
-
-static void SimpleVFilter16(uint8_t* p, int stride, int thresh) {
- int i;
- for (i = 0; i < 16; ++i) {
- if (needs_filter(p + i, stride, thresh)) {
- do_filter2(p + i, stride);
- }
- }
-}
-
-static void SimpleHFilter16(uint8_t* p, int stride, int thresh) {
- int i;
- for (i = 0; i < 16; ++i) {
- if (needs_filter(p + i * stride, 1, thresh)) {
- do_filter2(p + i * stride, 1);
- }
- }
-}
-
-static void SimpleVFilter16i(uint8_t* p, int stride, int thresh) {
- int k;
- for (k = 3; k > 0; --k) {
- p += 4 * stride;
- SimpleVFilter16(p, stride, thresh);
- }
-}
-
-static void SimpleHFilter16i(uint8_t* p, int stride, int thresh) {
- int k;
- for (k = 3; k > 0; --k) {
- p += 4;
- SimpleHFilter16(p, stride, thresh);
- }
-}
-
-//------------------------------------------------------------------------------
-// Complex In-loop filtering (Paragraph 15.3)
-
-static WEBP_INLINE void FilterLoop26(uint8_t* p,
- int hstride, int vstride, int size,
- int thresh, int ithresh, int hev_thresh) {
- while (size-- > 0) {
- if (needs_filter2(p, hstride, thresh, ithresh)) {
- if (hev(p, hstride, hev_thresh)) {
- do_filter2(p, hstride);
- } else {
- do_filter6(p, hstride);
- }
- }
- p += vstride;
- }
-}
-
-static WEBP_INLINE void FilterLoop24(uint8_t* p,
- int hstride, int vstride, int size,
- int thresh, int ithresh, int hev_thresh) {
- while (size-- > 0) {
- if (needs_filter2(p, hstride, thresh, ithresh)) {
- if (hev(p, hstride, hev_thresh)) {
- do_filter2(p, hstride);
- } else {
- do_filter4(p, hstride);
- }
- }
- p += vstride;
- }
-}
-
-// on macroblock edges
-static void VFilter16(uint8_t* p, int stride,
- int thresh, int ithresh, int hev_thresh) {
- FilterLoop26(p, stride, 1, 16, thresh, ithresh, hev_thresh);
-}
-
-static void HFilter16(uint8_t* p, int stride,
- int thresh, int ithresh, int hev_thresh) {
- FilterLoop26(p, 1, stride, 16, thresh, ithresh, hev_thresh);
-}
-
-// on three inner edges
-static void VFilter16i(uint8_t* p, int stride,
- int thresh, int ithresh, int hev_thresh) {
- int k;
- for (k = 3; k > 0; --k) {
- p += 4 * stride;
- FilterLoop24(p, stride, 1, 16, thresh, ithresh, hev_thresh);
- }
-}
-
-static void HFilter16i(uint8_t* p, int stride,
- int thresh, int ithresh, int hev_thresh) {
- int k;
- for (k = 3; k > 0; --k) {
- p += 4;
- FilterLoop24(p, 1, stride, 16, thresh, ithresh, hev_thresh);
- }
-}
-
-// 8-pixels wide variant, for chroma filtering
-static void VFilter8(uint8_t* u, uint8_t* v, int stride,
- int thresh, int ithresh, int hev_thresh) {
- FilterLoop26(u, stride, 1, 8, thresh, ithresh, hev_thresh);
- FilterLoop26(v, stride, 1, 8, thresh, ithresh, hev_thresh);
-}
-
-static void HFilter8(uint8_t* u, uint8_t* v, int stride,
- int thresh, int ithresh, int hev_thresh) {
- FilterLoop26(u, 1, stride, 8, thresh, ithresh, hev_thresh);
- FilterLoop26(v, 1, stride, 8, thresh, ithresh, hev_thresh);
-}
-
-static void VFilter8i(uint8_t* u, uint8_t* v, int stride,
- int thresh, int ithresh, int hev_thresh) {
- FilterLoop24(u + 4 * stride, stride, 1, 8, thresh, ithresh, hev_thresh);
- FilterLoop24(v + 4 * stride, stride, 1, 8, thresh, ithresh, hev_thresh);
-}
-
-static void HFilter8i(uint8_t* u, uint8_t* v, int stride,
- int thresh, int ithresh, int hev_thresh) {
- FilterLoop24(u + 4, 1, stride, 8, thresh, ithresh, hev_thresh);
- FilterLoop24(v + 4, 1, stride, 8, thresh, ithresh, hev_thresh);
-}
-
-//------------------------------------------------------------------------------
-
-VP8DecIdct2 VP8Transform;
-VP8DecIdct VP8TransformUV;
-VP8DecIdct VP8TransformDC;
-VP8DecIdct VP8TransformDCUV;
-
-VP8LumaFilterFunc VP8VFilter16;
-VP8LumaFilterFunc VP8HFilter16;
-VP8ChromaFilterFunc VP8VFilter8;
-VP8ChromaFilterFunc VP8HFilter8;
-VP8LumaFilterFunc VP8VFilter16i;
-VP8LumaFilterFunc VP8HFilter16i;
-VP8ChromaFilterFunc VP8VFilter8i;
-VP8ChromaFilterFunc VP8HFilter8i;
-VP8SimpleFilterFunc VP8SimpleVFilter16;
-VP8SimpleFilterFunc VP8SimpleHFilter16;
-VP8SimpleFilterFunc VP8SimpleVFilter16i;
-VP8SimpleFilterFunc VP8SimpleHFilter16i;
-
-extern void VP8DspInitSSE2(void);
-extern void VP8DspInitNEON(void);
-
-void VP8DspInit(void) {
- DspInitTables();
-
- VP8Transform = TransformTwo;
- VP8TransformUV = TransformUV;
- VP8TransformDC = TransformDC;
- VP8TransformDCUV = TransformDCUV;
-
- VP8VFilter16 = VFilter16;
- VP8HFilter16 = HFilter16;
- VP8VFilter8 = VFilter8;
- VP8HFilter8 = HFilter8;
- VP8VFilter16i = VFilter16i;
- VP8HFilter16i = HFilter16i;
- VP8VFilter8i = VFilter8i;
- VP8HFilter8i = HFilter8i;
- VP8SimpleVFilter16 = SimpleVFilter16;
- VP8SimpleHFilter16 = SimpleHFilter16;
- VP8SimpleVFilter16i = SimpleVFilter16i;
- VP8SimpleHFilter16i = SimpleHFilter16i;
-
- // If defined, use CPUInfo() to overwrite some pointers with faster versions.
- if (VP8GetCPUInfo) {
-#if defined(WEBP_USE_SSE2)
- if (VP8GetCPUInfo(kSSE2)) {
- VP8DspInitSSE2();
- }
-#elif defined(WEBP_USE_NEON)
- if (VP8GetCPUInfo(kNEON)) {
- VP8DspInitNEON();
- }
-#endif
- }
-}
-
-#if defined(__cplusplus) || defined(c_plusplus)
-} // extern "C"
-#endif
diff --git a/drivers/webpold/dsp/dec_neon.c b/drivers/webpold/dsp/dec_neon.c
deleted file mode 100644
index ec824b790b..0000000000
--- a/drivers/webpold/dsp/dec_neon.c
+++ /dev/null
@@ -1,329 +0,0 @@
-// Copyright 2012 Google Inc. All Rights Reserved.
-//
-// This code is licensed under the same terms as WebM:
-// Software License Agreement: http://www.webmproject.org/license/software/
-// Additional IP Rights Grant: http://www.webmproject.org/license/additional/
-// -----------------------------------------------------------------------------
-//
-// ARM NEON version of dsp functions and loop filtering.
-//
-// Authors: Somnath Banerjee (somnath@google.com)
-// Johann Koenig (johannkoenig@google.com)
-
-#include "./dsp.h"
-
-#if defined(WEBP_USE_NEON)
-
-#include "../dec/vp8i.h"
-
-#if defined(__cplusplus) || defined(c_plusplus)
-extern "C" {
-#endif
-
-#define QRegs "q0", "q1", "q2", "q3", "q4", "q5", "q6", "q7", \
- "q8", "q9", "q10", "q11", "q12", "q13", "q14", "q15"
-
-#define FLIP_SIGN_BIT2(a, b, s) \
- "veor " #a "," #a "," #s " \n" \
- "veor " #b "," #b "," #s " \n" \
-
-#define FLIP_SIGN_BIT4(a, b, c, d, s) \
- FLIP_SIGN_BIT2(a, b, s) \
- FLIP_SIGN_BIT2(c, d, s) \
-
-#define NEEDS_FILTER(p1, p0, q0, q1, thresh, mask) \
- "vabd.u8 q15," #p0 "," #q0 " \n" /* abs(p0 - q0) */ \
- "vabd.u8 q14," #p1 "," #q1 " \n" /* abs(p1 - q1) */ \
- "vqadd.u8 q15, q15, q15 \n" /* abs(p0 - q0) * 2 */ \
- "vshr.u8 q14, q14, #1 \n" /* abs(p1 - q1) / 2 */ \
- "vqadd.u8 q15, q15, q14 \n" /* abs(p0 - q0) * 2 + abs(p1 - q1) / 2 */ \
- "vdup.8 q14, " #thresh " \n" \
- "vcge.u8 " #mask ", q14, q15 \n" /* mask <= thresh */
-
-#define GET_BASE_DELTA(p1, p0, q0, q1, o) \
- "vqsub.s8 q15," #q0 "," #p0 " \n" /* (q0 - p0) */ \
- "vqsub.s8 " #o "," #p1 "," #q1 " \n" /* (p1 - q1) */ \
- "vqadd.s8 " #o "," #o ", q15 \n" /* (p1 - q1) + 1 * (p0 - q0) */ \
- "vqadd.s8 " #o "," #o ", q15 \n" /* (p1 - q1) + 2 * (p0 - q0) */ \
- "vqadd.s8 " #o "," #o ", q15 \n" /* (p1 - q1) + 3 * (p0 - q0) */
-
-#define DO_SIMPLE_FILTER(p0, q0, fl) \
- "vmov.i8 q15, #0x03 \n" \
- "vqadd.s8 q15, q15, " #fl " \n" /* filter1 = filter + 3 */ \
- "vshr.s8 q15, q15, #3 \n" /* filter1 >> 3 */ \
- "vqadd.s8 " #p0 "," #p0 ", q15 \n" /* p0 += filter1 */ \
- \
- "vmov.i8 q15, #0x04 \n" \
- "vqadd.s8 q15, q15, " #fl " \n" /* filter1 = filter + 4 */ \
- "vshr.s8 q15, q15, #3 \n" /* filter2 >> 3 */ \
- "vqsub.s8 " #q0 "," #q0 ", q15 \n" /* q0 -= filter2 */
-
-// Applies filter on 2 pixels (p0 and q0)
-#define DO_FILTER2(p1, p0, q0, q1, thresh) \
- NEEDS_FILTER(p1, p0, q0, q1, thresh, q9) /* filter mask in q9 */ \
- "vmov.i8 q10, #0x80 \n" /* sign bit */ \
- FLIP_SIGN_BIT4(p1, p0, q0, q1, q10) /* convert to signed value */ \
- GET_BASE_DELTA(p1, p0, q0, q1, q11) /* get filter level */ \
- "vand q9, q9, q11 \n" /* apply filter mask */ \
- DO_SIMPLE_FILTER(p0, q0, q9) /* apply filter */ \
- FLIP_SIGN_BIT2(p0, q0, q10)
-
-// Load/Store vertical edge
-#define LOAD8x4(c1, c2, c3, c4, b1, b2, stride) \
- "vld4.8 {" #c1"[0], " #c2"[0], " #c3"[0], " #c4"[0]}," #b1 "," #stride"\n" \
- "vld4.8 {" #c1"[1], " #c2"[1], " #c3"[1], " #c4"[1]}," #b2 "," #stride"\n" \
- "vld4.8 {" #c1"[2], " #c2"[2], " #c3"[2], " #c4"[2]}," #b1 "," #stride"\n" \
- "vld4.8 {" #c1"[3], " #c2"[3], " #c3"[3], " #c4"[3]}," #b2 "," #stride"\n" \
- "vld4.8 {" #c1"[4], " #c2"[4], " #c3"[4], " #c4"[4]}," #b1 "," #stride"\n" \
- "vld4.8 {" #c1"[5], " #c2"[5], " #c3"[5], " #c4"[5]}," #b2 "," #stride"\n" \
- "vld4.8 {" #c1"[6], " #c2"[6], " #c3"[6], " #c4"[6]}," #b1 "," #stride"\n" \
- "vld4.8 {" #c1"[7], " #c2"[7], " #c3"[7], " #c4"[7]}," #b2 "," #stride"\n"
-
-#define STORE8x2(c1, c2, p,stride) \
- "vst2.8 {" #c1"[0], " #c2"[0]}," #p "," #stride " \n" \
- "vst2.8 {" #c1"[1], " #c2"[1]}," #p "," #stride " \n" \
- "vst2.8 {" #c1"[2], " #c2"[2]}," #p "," #stride " \n" \
- "vst2.8 {" #c1"[3], " #c2"[3]}," #p "," #stride " \n" \
- "vst2.8 {" #c1"[4], " #c2"[4]}," #p "," #stride " \n" \
- "vst2.8 {" #c1"[5], " #c2"[5]}," #p "," #stride " \n" \
- "vst2.8 {" #c1"[6], " #c2"[6]}," #p "," #stride " \n" \
- "vst2.8 {" #c1"[7], " #c2"[7]}," #p "," #stride " \n"
-
-//-----------------------------------------------------------------------------
-// Simple In-loop filtering (Paragraph 15.2)
-
-static void SimpleVFilter16NEON(uint8_t* p, int stride, int thresh) {
- __asm__ volatile (
- "sub %[p], %[p], %[stride], lsl #1 \n" // p -= 2 * stride
-
- "vld1.u8 {q1}, [%[p]], %[stride] \n" // p1
- "vld1.u8 {q2}, [%[p]], %[stride] \n" // p0
- "vld1.u8 {q3}, [%[p]], %[stride] \n" // q0
- "vld1.u8 {q4}, [%[p]] \n" // q1
-
- DO_FILTER2(q1, q2, q3, q4, %[thresh])
-
- "sub %[p], %[p], %[stride], lsl #1 \n" // p -= 2 * stride
-
- "vst1.u8 {q2}, [%[p]], %[stride] \n" // store op0
- "vst1.u8 {q3}, [%[p]] \n" // store oq0
- : [p] "+r"(p)
- : [stride] "r"(stride), [thresh] "r"(thresh)
- : "memory", QRegs
- );
-}
-
-static void SimpleHFilter16NEON(uint8_t* p, int stride, int thresh) {
- __asm__ volatile (
- "sub r4, %[p], #2 \n" // base1 = p - 2
- "lsl r6, %[stride], #1 \n" // r6 = 2 * stride
- "add r5, r4, %[stride] \n" // base2 = base1 + stride
-
- LOAD8x4(d2, d3, d4, d5, [r4], [r5], r6)
- LOAD8x4(d6, d7, d8, d9, [r4], [r5], r6)
- "vswp d3, d6 \n" // p1:q1 p0:q3
- "vswp d5, d8 \n" // q0:q2 q1:q4
- "vswp q2, q3 \n" // p1:q1 p0:q2 q0:q3 q1:q4
-
- DO_FILTER2(q1, q2, q3, q4, %[thresh])
-
- "sub %[p], %[p], #1 \n" // p - 1
-
- "vswp d5, d6 \n"
- STORE8x2(d4, d5, [%[p]], %[stride])
- STORE8x2(d6, d7, [%[p]], %[stride])
-
- : [p] "+r"(p)
- : [stride] "r"(stride), [thresh] "r"(thresh)
- : "memory", "r4", "r5", "r6", QRegs
- );
-}
-
-static void SimpleVFilter16iNEON(uint8_t* p, int stride, int thresh) {
- int k;
- for (k = 3; k > 0; --k) {
- p += 4 * stride;
- SimpleVFilter16NEON(p, stride, thresh);
- }
-}
-
-static void SimpleHFilter16iNEON(uint8_t* p, int stride, int thresh) {
- int k;
- for (k = 3; k > 0; --k) {
- p += 4;
- SimpleHFilter16NEON(p, stride, thresh);
- }
-}
-
-static void TransformOneNEON(const int16_t *in, uint8_t *dst) {
- const int kBPS = BPS;
- const int16_t constants[] = {20091, 17734, 0, 0};
- /* kC1, kC2. Padded because vld1.16 loads 8 bytes
- * Technically these are unsigned but vqdmulh is only available in signed.
- * vqdmulh returns high half (effectively >> 16) but also doubles the value,
- * changing the >> 16 to >> 15 and requiring an additional >> 1.
- * We use this to our advantage with kC2. The canonical value is 35468.
- * However, the high bit is set so treating it as signed will give incorrect
- * results. We avoid this by down shifting by 1 here to clear the highest bit.
- * Combined with the doubling effect of vqdmulh we get >> 16.
- * This can not be applied to kC1 because the lowest bit is set. Down shifting
- * the constant would reduce precision.
- */
-
- /* libwebp uses a trick to avoid some extra addition that libvpx does.
- * Instead of:
- * temp2 = ip[12] + ((ip[12] * cospi8sqrt2minus1) >> 16);
- * libwebp adds 1 << 16 to cospi8sqrt2minus1 (kC1). However, this causes the
- * same issue with kC1 and vqdmulh that we work around by down shifting kC2
- */
-
- /* Adapted from libvpx: vp8/common/arm/neon/shortidct4x4llm_neon.asm */
- __asm__ volatile (
- "vld1.16 {q1, q2}, [%[in]] \n"
- "vld1.16 {d0}, [%[constants]] \n"
-
- /* d2: in[0]
- * d3: in[8]
- * d4: in[4]
- * d5: in[12]
- */
- "vswp d3, d4 \n"
-
- /* q8 = {in[4], in[12]} * kC1 * 2 >> 16
- * q9 = {in[4], in[12]} * kC2 >> 16
- */
- "vqdmulh.s16 q8, q2, d0[0] \n"
- "vqdmulh.s16 q9, q2, d0[1] \n"
-
- /* d22 = a = in[0] + in[8]
- * d23 = b = in[0] - in[8]
- */
- "vqadd.s16 d22, d2, d3 \n"
- "vqsub.s16 d23, d2, d3 \n"
-
- /* The multiplication should be x * kC1 >> 16
- * However, with vqdmulh we get x * kC1 * 2 >> 16
- * (multiply, double, return high half)
- * We avoided this in kC2 by pre-shifting the constant.
- * q8 = in[4]/[12] * kC1 >> 16
- */
- "vshr.s16 q8, q8, #1 \n"
-
- /* Add {in[4], in[12]} back after the multiplication. This is handled by
- * adding 1 << 16 to kC1 in the libwebp C code.
- */
- "vqadd.s16 q8, q2, q8 \n"
-
- /* d20 = c = in[4]*kC2 - in[12]*kC1
- * d21 = d = in[4]*kC1 + in[12]*kC2
- */
- "vqsub.s16 d20, d18, d17 \n"
- "vqadd.s16 d21, d19, d16 \n"
-
- /* d2 = tmp[0] = a + d
- * d3 = tmp[1] = b + c
- * d4 = tmp[2] = b - c
- * d5 = tmp[3] = a - d
- */
- "vqadd.s16 d2, d22, d21 \n"
- "vqadd.s16 d3, d23, d20 \n"
- "vqsub.s16 d4, d23, d20 \n"
- "vqsub.s16 d5, d22, d21 \n"
-
- "vzip.16 q1, q2 \n"
- "vzip.16 q1, q2 \n"
-
- "vswp d3, d4 \n"
-
- /* q8 = {tmp[4], tmp[12]} * kC1 * 2 >> 16
- * q9 = {tmp[4], tmp[12]} * kC2 >> 16
- */
- "vqdmulh.s16 q8, q2, d0[0] \n"
- "vqdmulh.s16 q9, q2, d0[1] \n"
-
- /* d22 = a = tmp[0] + tmp[8]
- * d23 = b = tmp[0] - tmp[8]
- */
- "vqadd.s16 d22, d2, d3 \n"
- "vqsub.s16 d23, d2, d3 \n"
-
- /* See long winded explanations prior */
- "vshr.s16 q8, q8, #1 \n"
- "vqadd.s16 q8, q2, q8 \n"
-
- /* d20 = c = in[4]*kC2 - in[12]*kC1
- * d21 = d = in[4]*kC1 + in[12]*kC2
- */
- "vqsub.s16 d20, d18, d17 \n"
- "vqadd.s16 d21, d19, d16 \n"
-
- /* d2 = tmp[0] = a + d
- * d3 = tmp[1] = b + c
- * d4 = tmp[2] = b - c
- * d5 = tmp[3] = a - d
- */
- "vqadd.s16 d2, d22, d21 \n"
- "vqadd.s16 d3, d23, d20 \n"
- "vqsub.s16 d4, d23, d20 \n"
- "vqsub.s16 d5, d22, d21 \n"
-
- "vld1.32 d6[0], [%[dst]], %[kBPS] \n"
- "vld1.32 d6[1], [%[dst]], %[kBPS] \n"
- "vld1.32 d7[0], [%[dst]], %[kBPS] \n"
- "vld1.32 d7[1], [%[dst]], %[kBPS] \n"
-
- "sub %[dst], %[dst], %[kBPS], lsl #2 \n"
-
- /* (val) + 4 >> 3 */
- "vrshr.s16 d2, d2, #3 \n"
- "vrshr.s16 d3, d3, #3 \n"
- "vrshr.s16 d4, d4, #3 \n"
- "vrshr.s16 d5, d5, #3 \n"
-
- "vzip.16 q1, q2 \n"
- "vzip.16 q1, q2 \n"
-
- /* Must accumulate before saturating */
- "vmovl.u8 q8, d6 \n"
- "vmovl.u8 q9, d7 \n"
-
- "vqadd.s16 q1, q1, q8 \n"
- "vqadd.s16 q2, q2, q9 \n"
-
- "vqmovun.s16 d0, q1 \n"
- "vqmovun.s16 d1, q2 \n"
-
- "vst1.32 d0[0], [%[dst]], %[kBPS] \n"
- "vst1.32 d0[1], [%[dst]], %[kBPS] \n"
- "vst1.32 d1[0], [%[dst]], %[kBPS] \n"
- "vst1.32 d1[1], [%[dst]] \n"
-
- : [in] "+r"(in), [dst] "+r"(dst) /* modified registers */
- : [kBPS] "r"(kBPS), [constants] "r"(constants) /* constants */
- : "memory", "q0", "q1", "q2", "q8", "q9", "q10", "q11" /* clobbered */
- );
-}
-
-static void TransformTwoNEON(const int16_t* in, uint8_t* dst, int do_two) {
- TransformOneNEON(in, dst);
- if (do_two) {
- TransformOneNEON(in + 16, dst + 4);
- }
-}
-
-extern void VP8DspInitNEON(void);
-
-void VP8DspInitNEON(void) {
- VP8Transform = TransformTwoNEON;
-
- VP8SimpleVFilter16 = SimpleVFilter16NEON;
- VP8SimpleHFilter16 = SimpleHFilter16NEON;
- VP8SimpleVFilter16i = SimpleVFilter16iNEON;
- VP8SimpleHFilter16i = SimpleHFilter16iNEON;
-}
-
-#if defined(__cplusplus) || defined(c_plusplus)
-} // extern "C"
-#endif
-
-#endif // WEBP_USE_NEON
diff --git a/drivers/webpold/dsp/dec_sse2.c b/drivers/webpold/dsp/dec_sse2.c
deleted file mode 100644
index 472b68ecb8..0000000000
--- a/drivers/webpold/dsp/dec_sse2.c
+++ /dev/null
@@ -1,903 +0,0 @@
-// Copyright 2011 Google Inc. All Rights Reserved.
-//
-// This code is licensed under the same terms as WebM:
-// Software License Agreement: http://www.webmproject.org/license/software/
-// Additional IP Rights Grant: http://www.webmproject.org/license/additional/
-// -----------------------------------------------------------------------------
-//
-// SSE2 version of some decoding functions (idct, loop filtering).
-//
-// Author: somnath@google.com (Somnath Banerjee)
-// cduvivier@google.com (Christian Duvivier)
-
-#include "./dsp.h"
-
-#if defined(WEBP_USE_SSE2)
-
-#include <emmintrin.h>
-#include "../dec/vp8i.h"
-
-#if defined(__cplusplus) || defined(c_plusplus)
-extern "C" {
-#endif
-
-//------------------------------------------------------------------------------
-// Transforms (Paragraph 14.4)
-
-static void TransformSSE2(const int16_t* in, uint8_t* dst, int do_two) {
- // This implementation makes use of 16-bit fixed point versions of two
- // multiply constants:
- // K1 = sqrt(2) * cos (pi/8) ~= 85627 / 2^16
- // K2 = sqrt(2) * sin (pi/8) ~= 35468 / 2^16
- //
- // To be able to use signed 16-bit integers, we use the following trick to
- // have constants within range:
- // - Associated constants are obtained by subtracting the 16-bit fixed point
- // version of one:
- // k = K - (1 << 16) => K = k + (1 << 16)
- // K1 = 85267 => k1 = 20091
- // K2 = 35468 => k2 = -30068
- // - The multiplication of a variable by a constant become the sum of the
- // variable and the multiplication of that variable by the associated
- // constant:
- // (x * K) >> 16 = (x * (k + (1 << 16))) >> 16 = ((x * k ) >> 16) + x
- const __m128i k1 = _mm_set1_epi16(20091);
- const __m128i k2 = _mm_set1_epi16(-30068);
- __m128i T0, T1, T2, T3;
-
- // Load and concatenate the transform coefficients (we'll do two transforms
- // in parallel). In the case of only one transform, the second half of the
- // vectors will just contain random value we'll never use nor store.
- __m128i in0, in1, in2, in3;
- {
- in0 = _mm_loadl_epi64((__m128i*)&in[0]);
- in1 = _mm_loadl_epi64((__m128i*)&in[4]);
- in2 = _mm_loadl_epi64((__m128i*)&in[8]);
- in3 = _mm_loadl_epi64((__m128i*)&in[12]);
- // a00 a10 a20 a30 x x x x
- // a01 a11 a21 a31 x x x x
- // a02 a12 a22 a32 x x x x
- // a03 a13 a23 a33 x x x x
- if (do_two) {
- const __m128i inB0 = _mm_loadl_epi64((__m128i*)&in[16]);
- const __m128i inB1 = _mm_loadl_epi64((__m128i*)&in[20]);
- const __m128i inB2 = _mm_loadl_epi64((__m128i*)&in[24]);
- const __m128i inB3 = _mm_loadl_epi64((__m128i*)&in[28]);
- in0 = _mm_unpacklo_epi64(in0, inB0);
- in1 = _mm_unpacklo_epi64(in1, inB1);
- in2 = _mm_unpacklo_epi64(in2, inB2);
- in3 = _mm_unpacklo_epi64(in3, inB3);
- // a00 a10 a20 a30 b00 b10 b20 b30
- // a01 a11 a21 a31 b01 b11 b21 b31
- // a02 a12 a22 a32 b02 b12 b22 b32
- // a03 a13 a23 a33 b03 b13 b23 b33
- }
- }
-
- // Vertical pass and subsequent transpose.
- {
- // First pass, c and d calculations are longer because of the "trick"
- // multiplications.
- const __m128i a = _mm_add_epi16(in0, in2);
- const __m128i b = _mm_sub_epi16(in0, in2);
- // c = MUL(in1, K2) - MUL(in3, K1) = MUL(in1, k2) - MUL(in3, k1) + in1 - in3
- const __m128i c1 = _mm_mulhi_epi16(in1, k2);
- const __m128i c2 = _mm_mulhi_epi16(in3, k1);
- const __m128i c3 = _mm_sub_epi16(in1, in3);
- const __m128i c4 = _mm_sub_epi16(c1, c2);
- const __m128i c = _mm_add_epi16(c3, c4);
- // d = MUL(in1, K1) + MUL(in3, K2) = MUL(in1, k1) + MUL(in3, k2) + in1 + in3
- const __m128i d1 = _mm_mulhi_epi16(in1, k1);
- const __m128i d2 = _mm_mulhi_epi16(in3, k2);
- const __m128i d3 = _mm_add_epi16(in1, in3);
- const __m128i d4 = _mm_add_epi16(d1, d2);
- const __m128i d = _mm_add_epi16(d3, d4);
-
- // Second pass.
- const __m128i tmp0 = _mm_add_epi16(a, d);
- const __m128i tmp1 = _mm_add_epi16(b, c);
- const __m128i tmp2 = _mm_sub_epi16(b, c);
- const __m128i tmp3 = _mm_sub_epi16(a, d);
-
- // Transpose the two 4x4.
- // a00 a01 a02 a03 b00 b01 b02 b03
- // a10 a11 a12 a13 b10 b11 b12 b13
- // a20 a21 a22 a23 b20 b21 b22 b23
- // a30 a31 a32 a33 b30 b31 b32 b33
- const __m128i transpose0_0 = _mm_unpacklo_epi16(tmp0, tmp1);
- const __m128i transpose0_1 = _mm_unpacklo_epi16(tmp2, tmp3);
- const __m128i transpose0_2 = _mm_unpackhi_epi16(tmp0, tmp1);
- const __m128i transpose0_3 = _mm_unpackhi_epi16(tmp2, tmp3);
- // a00 a10 a01 a11 a02 a12 a03 a13
- // a20 a30 a21 a31 a22 a32 a23 a33
- // b00 b10 b01 b11 b02 b12 b03 b13
- // b20 b30 b21 b31 b22 b32 b23 b33
- const __m128i transpose1_0 = _mm_unpacklo_epi32(transpose0_0, transpose0_1);
- const __m128i transpose1_1 = _mm_unpacklo_epi32(transpose0_2, transpose0_3);
- const __m128i transpose1_2 = _mm_unpackhi_epi32(transpose0_0, transpose0_1);
- const __m128i transpose1_3 = _mm_unpackhi_epi32(transpose0_2, transpose0_3);
- // a00 a10 a20 a30 a01 a11 a21 a31
- // b00 b10 b20 b30 b01 b11 b21 b31
- // a02 a12 a22 a32 a03 a13 a23 a33
- // b02 b12 a22 b32 b03 b13 b23 b33
- T0 = _mm_unpacklo_epi64(transpose1_0, transpose1_1);
- T1 = _mm_unpackhi_epi64(transpose1_0, transpose1_1);
- T2 = _mm_unpacklo_epi64(transpose1_2, transpose1_3);
- T3 = _mm_unpackhi_epi64(transpose1_2, transpose1_3);
- // a00 a10 a20 a30 b00 b10 b20 b30
- // a01 a11 a21 a31 b01 b11 b21 b31
- // a02 a12 a22 a32 b02 b12 b22 b32
- // a03 a13 a23 a33 b03 b13 b23 b33
- }
-
- // Horizontal pass and subsequent transpose.
- {
- // First pass, c and d calculations are longer because of the "trick"
- // multiplications.
- const __m128i four = _mm_set1_epi16(4);
- const __m128i dc = _mm_add_epi16(T0, four);
- const __m128i a = _mm_add_epi16(dc, T2);
- const __m128i b = _mm_sub_epi16(dc, T2);
- // c = MUL(T1, K2) - MUL(T3, K1) = MUL(T1, k2) - MUL(T3, k1) + T1 - T3
- const __m128i c1 = _mm_mulhi_epi16(T1, k2);
- const __m128i c2 = _mm_mulhi_epi16(T3, k1);
- const __m128i c3 = _mm_sub_epi16(T1, T3);
- const __m128i c4 = _mm_sub_epi16(c1, c2);
- const __m128i c = _mm_add_epi16(c3, c4);
- // d = MUL(T1, K1) + MUL(T3, K2) = MUL(T1, k1) + MUL(T3, k2) + T1 + T3
- const __m128i d1 = _mm_mulhi_epi16(T1, k1);
- const __m128i d2 = _mm_mulhi_epi16(T3, k2);
- const __m128i d3 = _mm_add_epi16(T1, T3);
- const __m128i d4 = _mm_add_epi16(d1, d2);
- const __m128i d = _mm_add_epi16(d3, d4);
-
- // Second pass.
- const __m128i tmp0 = _mm_add_epi16(a, d);
- const __m128i tmp1 = _mm_add_epi16(b, c);
- const __m128i tmp2 = _mm_sub_epi16(b, c);
- const __m128i tmp3 = _mm_sub_epi16(a, d);
- const __m128i shifted0 = _mm_srai_epi16(tmp0, 3);
- const __m128i shifted1 = _mm_srai_epi16(tmp1, 3);
- const __m128i shifted2 = _mm_srai_epi16(tmp2, 3);
- const __m128i shifted3 = _mm_srai_epi16(tmp3, 3);
-
- // Transpose the two 4x4.
- // a00 a01 a02 a03 b00 b01 b02 b03
- // a10 a11 a12 a13 b10 b11 b12 b13
- // a20 a21 a22 a23 b20 b21 b22 b23
- // a30 a31 a32 a33 b30 b31 b32 b33
- const __m128i transpose0_0 = _mm_unpacklo_epi16(shifted0, shifted1);
- const __m128i transpose0_1 = _mm_unpacklo_epi16(shifted2, shifted3);
- const __m128i transpose0_2 = _mm_unpackhi_epi16(shifted0, shifted1);
- const __m128i transpose0_3 = _mm_unpackhi_epi16(shifted2, shifted3);
- // a00 a10 a01 a11 a02 a12 a03 a13
- // a20 a30 a21 a31 a22 a32 a23 a33
- // b00 b10 b01 b11 b02 b12 b03 b13
- // b20 b30 b21 b31 b22 b32 b23 b33
- const __m128i transpose1_0 = _mm_unpacklo_epi32(transpose0_0, transpose0_1);
- const __m128i transpose1_1 = _mm_unpacklo_epi32(transpose0_2, transpose0_3);
- const __m128i transpose1_2 = _mm_unpackhi_epi32(transpose0_0, transpose0_1);
- const __m128i transpose1_3 = _mm_unpackhi_epi32(transpose0_2, transpose0_3);
- // a00 a10 a20 a30 a01 a11 a21 a31
- // b00 b10 b20 b30 b01 b11 b21 b31
- // a02 a12 a22 a32 a03 a13 a23 a33
- // b02 b12 a22 b32 b03 b13 b23 b33
- T0 = _mm_unpacklo_epi64(transpose1_0, transpose1_1);
- T1 = _mm_unpackhi_epi64(transpose1_0, transpose1_1);
- T2 = _mm_unpacklo_epi64(transpose1_2, transpose1_3);
- T3 = _mm_unpackhi_epi64(transpose1_2, transpose1_3);
- // a00 a10 a20 a30 b00 b10 b20 b30
- // a01 a11 a21 a31 b01 b11 b21 b31
- // a02 a12 a22 a32 b02 b12 b22 b32
- // a03 a13 a23 a33 b03 b13 b23 b33
- }
-
- // Add inverse transform to 'dst' and store.
- {
- const __m128i zero = _mm_set1_epi16(0);
- // Load the reference(s).
- __m128i dst0, dst1, dst2, dst3;
- if (do_two) {
- // Load eight bytes/pixels per line.
- dst0 = _mm_loadl_epi64((__m128i*)&dst[0 * BPS]);
- dst1 = _mm_loadl_epi64((__m128i*)&dst[1 * BPS]);
- dst2 = _mm_loadl_epi64((__m128i*)&dst[2 * BPS]);
- dst3 = _mm_loadl_epi64((__m128i*)&dst[3 * BPS]);
- } else {
- // Load four bytes/pixels per line.
- dst0 = _mm_cvtsi32_si128(*(int*)&dst[0 * BPS]);
- dst1 = _mm_cvtsi32_si128(*(int*)&dst[1 * BPS]);
- dst2 = _mm_cvtsi32_si128(*(int*)&dst[2 * BPS]);
- dst3 = _mm_cvtsi32_si128(*(int*)&dst[3 * BPS]);
- }
- // Convert to 16b.
- dst0 = _mm_unpacklo_epi8(dst0, zero);
- dst1 = _mm_unpacklo_epi8(dst1, zero);
- dst2 = _mm_unpacklo_epi8(dst2, zero);
- dst3 = _mm_unpacklo_epi8(dst3, zero);
- // Add the inverse transform(s).
- dst0 = _mm_add_epi16(dst0, T0);
- dst1 = _mm_add_epi16(dst1, T1);
- dst2 = _mm_add_epi16(dst2, T2);
- dst3 = _mm_add_epi16(dst3, T3);
- // Unsigned saturate to 8b.
- dst0 = _mm_packus_epi16(dst0, dst0);
- dst1 = _mm_packus_epi16(dst1, dst1);
- dst2 = _mm_packus_epi16(dst2, dst2);
- dst3 = _mm_packus_epi16(dst3, dst3);
- // Store the results.
- if (do_two) {
- // Store eight bytes/pixels per line.
- _mm_storel_epi64((__m128i*)&dst[0 * BPS], dst0);
- _mm_storel_epi64((__m128i*)&dst[1 * BPS], dst1);
- _mm_storel_epi64((__m128i*)&dst[2 * BPS], dst2);
- _mm_storel_epi64((__m128i*)&dst[3 * BPS], dst3);
- } else {
- // Store four bytes/pixels per line.
- *((int32_t *)&dst[0 * BPS]) = _mm_cvtsi128_si32(dst0);
- *((int32_t *)&dst[1 * BPS]) = _mm_cvtsi128_si32(dst1);
- *((int32_t *)&dst[2 * BPS]) = _mm_cvtsi128_si32(dst2);
- *((int32_t *)&dst[3 * BPS]) = _mm_cvtsi128_si32(dst3);
- }
- }
-}
-
-//------------------------------------------------------------------------------
-// Loop Filter (Paragraph 15)
-
-// Compute abs(p - q) = subs(p - q) OR subs(q - p)
-#define MM_ABS(p, q) _mm_or_si128( \
- _mm_subs_epu8((q), (p)), \
- _mm_subs_epu8((p), (q)))
-
-// Shift each byte of "a" by N bits while preserving by the sign bit.
-//
-// It first shifts the lower bytes of the words and then the upper bytes and
-// then merges the results together.
-#define SIGNED_SHIFT_N(a, N) { \
- __m128i t = a; \
- t = _mm_slli_epi16(t, 8); \
- t = _mm_srai_epi16(t, N); \
- t = _mm_srli_epi16(t, 8); \
- \
- a = _mm_srai_epi16(a, N + 8); \
- a = _mm_slli_epi16(a, 8); \
- \
- a = _mm_or_si128(t, a); \
-}
-
-#define FLIP_SIGN_BIT2(a, b) { \
- a = _mm_xor_si128(a, sign_bit); \
- b = _mm_xor_si128(b, sign_bit); \
-}
-
-#define FLIP_SIGN_BIT4(a, b, c, d) { \
- FLIP_SIGN_BIT2(a, b); \
- FLIP_SIGN_BIT2(c, d); \
-}
-
-#define GET_NOTHEV(p1, p0, q0, q1, hev_thresh, not_hev) { \
- const __m128i zero = _mm_setzero_si128(); \
- const __m128i t1 = MM_ABS(p1, p0); \
- const __m128i t2 = MM_ABS(q1, q0); \
- \
- const __m128i h = _mm_set1_epi8(hev_thresh); \
- const __m128i t3 = _mm_subs_epu8(t1, h); /* abs(p1 - p0) - hev_tresh */ \
- const __m128i t4 = _mm_subs_epu8(t2, h); /* abs(q1 - q0) - hev_tresh */ \
- \
- not_hev = _mm_or_si128(t3, t4); \
- not_hev = _mm_cmpeq_epi8(not_hev, zero); /* not_hev <= t1 && not_hev <= t2 */\
-}
-
-#define GET_BASE_DELTA(p1, p0, q0, q1, o) { \
- const __m128i qp0 = _mm_subs_epi8(q0, p0); /* q0 - p0 */ \
- o = _mm_subs_epi8(p1, q1); /* p1 - q1 */ \
- o = _mm_adds_epi8(o, qp0); /* p1 - q1 + 1 * (q0 - p0) */ \
- o = _mm_adds_epi8(o, qp0); /* p1 - q1 + 2 * (q0 - p0) */ \
- o = _mm_adds_epi8(o, qp0); /* p1 - q1 + 3 * (q0 - p0) */ \
-}
-
-#define DO_SIMPLE_FILTER(p0, q0, fl) { \
- const __m128i three = _mm_set1_epi8(3); \
- const __m128i four = _mm_set1_epi8(4); \
- __m128i v3 = _mm_adds_epi8(fl, three); \
- __m128i v4 = _mm_adds_epi8(fl, four); \
- \
- /* Do +4 side */ \
- SIGNED_SHIFT_N(v4, 3); /* v4 >> 3 */ \
- q0 = _mm_subs_epi8(q0, v4); /* q0 -= v4 */ \
- \
- /* Now do +3 side */ \
- SIGNED_SHIFT_N(v3, 3); /* v3 >> 3 */ \
- p0 = _mm_adds_epi8(p0, v3); /* p0 += v3 */ \
-}
-
-// Updates values of 2 pixels at MB edge during complex filtering.
-// Update operations:
-// q = q - a and p = p + a; where a = [(a_hi >> 7), (a_lo >> 7)]
-#define UPDATE_2PIXELS(pi, qi, a_lo, a_hi) { \
- const __m128i a_lo7 = _mm_srai_epi16(a_lo, 7); \
- const __m128i a_hi7 = _mm_srai_epi16(a_hi, 7); \
- const __m128i a = _mm_packs_epi16(a_lo7, a_hi7); \
- pi = _mm_adds_epi8(pi, a); \
- qi = _mm_subs_epi8(qi, a); \
-}
-
-static void NeedsFilter(const __m128i* p1, const __m128i* p0, const __m128i* q0,
- const __m128i* q1, int thresh, __m128i *mask) {
- __m128i t1 = MM_ABS(*p1, *q1); // abs(p1 - q1)
- *mask = _mm_set1_epi8(0xFE);
- t1 = _mm_and_si128(t1, *mask); // set lsb of each byte to zero
- t1 = _mm_srli_epi16(t1, 1); // abs(p1 - q1) / 2
-
- *mask = MM_ABS(*p0, *q0); // abs(p0 - q0)
- *mask = _mm_adds_epu8(*mask, *mask); // abs(p0 - q0) * 2
- *mask = _mm_adds_epu8(*mask, t1); // abs(p0 - q0) * 2 + abs(p1 - q1) / 2
-
- t1 = _mm_set1_epi8(thresh);
- *mask = _mm_subs_epu8(*mask, t1); // mask <= thresh
- *mask = _mm_cmpeq_epi8(*mask, _mm_setzero_si128());
-}
-
-//------------------------------------------------------------------------------
-// Edge filtering functions
-
-// Applies filter on 2 pixels (p0 and q0)
-static WEBP_INLINE void DoFilter2(const __m128i* p1, __m128i* p0, __m128i* q0,
- const __m128i* q1, int thresh) {
- __m128i a, mask;
- const __m128i sign_bit = _mm_set1_epi8(0x80);
- const __m128i p1s = _mm_xor_si128(*p1, sign_bit);
- const __m128i q1s = _mm_xor_si128(*q1, sign_bit);
-
- NeedsFilter(p1, p0, q0, q1, thresh, &mask);
-
- // convert to signed values
- FLIP_SIGN_BIT2(*p0, *q0);
-
- GET_BASE_DELTA(p1s, *p0, *q0, q1s, a);
- a = _mm_and_si128(a, mask); // mask filter values we don't care about
- DO_SIMPLE_FILTER(*p0, *q0, a);
-
- // unoffset
- FLIP_SIGN_BIT2(*p0, *q0);
-}
-
-// Applies filter on 4 pixels (p1, p0, q0 and q1)
-static WEBP_INLINE void DoFilter4(__m128i* p1, __m128i *p0,
- __m128i* q0, __m128i* q1,
- const __m128i* mask, int hev_thresh) {
- __m128i not_hev;
- __m128i t1, t2, t3;
- const __m128i sign_bit = _mm_set1_epi8(0x80);
-
- // compute hev mask
- GET_NOTHEV(*p1, *p0, *q0, *q1, hev_thresh, not_hev);
-
- // convert to signed values
- FLIP_SIGN_BIT4(*p1, *p0, *q0, *q1);
-
- t1 = _mm_subs_epi8(*p1, *q1); // p1 - q1
- t1 = _mm_andnot_si128(not_hev, t1); // hev(p1 - q1)
- t2 = _mm_subs_epi8(*q0, *p0); // q0 - p0
- t1 = _mm_adds_epi8(t1, t2); // hev(p1 - q1) + 1 * (q0 - p0)
- t1 = _mm_adds_epi8(t1, t2); // hev(p1 - q1) + 2 * (q0 - p0)
- t1 = _mm_adds_epi8(t1, t2); // hev(p1 - q1) + 3 * (q0 - p0)
- t1 = _mm_and_si128(t1, *mask); // mask filter values we don't care about
-
- // Do +4 side
- t2 = _mm_set1_epi8(4);
- t2 = _mm_adds_epi8(t1, t2); // 3 * (q0 - p0) + (p1 - q1) + 4
- SIGNED_SHIFT_N(t2, 3); // (3 * (q0 - p0) + hev(p1 - q1) + 4) >> 3
- t3 = t2; // save t2
- *q0 = _mm_subs_epi8(*q0, t2); // q0 -= t2
-
- // Now do +3 side
- t2 = _mm_set1_epi8(3);
- t2 = _mm_adds_epi8(t1, t2); // +3 instead of +4
- SIGNED_SHIFT_N(t2, 3); // (3 * (q0 - p0) + hev(p1 - q1) + 3) >> 3
- *p0 = _mm_adds_epi8(*p0, t2); // p0 += t2
-
- t2 = _mm_set1_epi8(1);
- t3 = _mm_adds_epi8(t3, t2);
- SIGNED_SHIFT_N(t3, 1); // (3 * (q0 - p0) + hev(p1 - q1) + 4) >> 4
-
- t3 = _mm_and_si128(not_hev, t3); // if !hev
- *q1 = _mm_subs_epi8(*q1, t3); // q1 -= t3
- *p1 = _mm_adds_epi8(*p1, t3); // p1 += t3
-
- // unoffset
- FLIP_SIGN_BIT4(*p1, *p0, *q0, *q1);
-}
-
-// Applies filter on 6 pixels (p2, p1, p0, q0, q1 and q2)
-static WEBP_INLINE void DoFilter6(__m128i *p2, __m128i* p1, __m128i *p0,
- __m128i* q0, __m128i* q1, __m128i *q2,
- const __m128i* mask, int hev_thresh) {
- __m128i a, not_hev;
- const __m128i sign_bit = _mm_set1_epi8(0x80);
-
- // compute hev mask
- GET_NOTHEV(*p1, *p0, *q0, *q1, hev_thresh, not_hev);
-
- // convert to signed values
- FLIP_SIGN_BIT4(*p1, *p0, *q0, *q1);
- FLIP_SIGN_BIT2(*p2, *q2);
-
- GET_BASE_DELTA(*p1, *p0, *q0, *q1, a);
-
- { // do simple filter on pixels with hev
- const __m128i m = _mm_andnot_si128(not_hev, *mask);
- const __m128i f = _mm_and_si128(a, m);
- DO_SIMPLE_FILTER(*p0, *q0, f);
- }
- { // do strong filter on pixels with not hev
- const __m128i zero = _mm_setzero_si128();
- const __m128i nine = _mm_set1_epi16(0x0900);
- const __m128i sixty_three = _mm_set1_epi16(63);
-
- const __m128i m = _mm_and_si128(not_hev, *mask);
- const __m128i f = _mm_and_si128(a, m);
- const __m128i f_lo = _mm_unpacklo_epi8(zero, f);
- const __m128i f_hi = _mm_unpackhi_epi8(zero, f);
-
- const __m128i f9_lo = _mm_mulhi_epi16(f_lo, nine); // Filter (lo) * 9
- const __m128i f9_hi = _mm_mulhi_epi16(f_hi, nine); // Filter (hi) * 9
- const __m128i f18_lo = _mm_add_epi16(f9_lo, f9_lo); // Filter (lo) * 18
- const __m128i f18_hi = _mm_add_epi16(f9_hi, f9_hi); // Filter (hi) * 18
-
- const __m128i a2_lo = _mm_add_epi16(f9_lo, sixty_three); // Filter * 9 + 63
- const __m128i a2_hi = _mm_add_epi16(f9_hi, sixty_three); // Filter * 9 + 63
-
- const __m128i a1_lo = _mm_add_epi16(f18_lo, sixty_three); // F... * 18 + 63
- const __m128i a1_hi = _mm_add_epi16(f18_hi, sixty_three); // F... * 18 + 63
-
- const __m128i a0_lo = _mm_add_epi16(f18_lo, a2_lo); // Filter * 27 + 63
- const __m128i a0_hi = _mm_add_epi16(f18_hi, a2_hi); // Filter * 27 + 63
-
- UPDATE_2PIXELS(*p2, *q2, a2_lo, a2_hi);
- UPDATE_2PIXELS(*p1, *q1, a1_lo, a1_hi);
- UPDATE_2PIXELS(*p0, *q0, a0_lo, a0_hi);
- }
-
- // unoffset
- FLIP_SIGN_BIT4(*p1, *p0, *q0, *q1);
- FLIP_SIGN_BIT2(*p2, *q2);
-}
-
-// reads 8 rows across a vertical edge.
-//
-// TODO(somnath): Investigate _mm_shuffle* also see if it can be broken into
-// two Load4x4() to avoid code duplication.
-static WEBP_INLINE void Load8x4(const uint8_t* b, int stride,
- __m128i* p, __m128i* q) {
- __m128i t1, t2;
-
- // Load 0th, 1st, 4th and 5th rows
- __m128i r0 = _mm_cvtsi32_si128(*((int*)&b[0 * stride])); // 03 02 01 00
- __m128i r1 = _mm_cvtsi32_si128(*((int*)&b[1 * stride])); // 13 12 11 10
- __m128i r4 = _mm_cvtsi32_si128(*((int*)&b[4 * stride])); // 43 42 41 40
- __m128i r5 = _mm_cvtsi32_si128(*((int*)&b[5 * stride])); // 53 52 51 50
-
- r0 = _mm_unpacklo_epi32(r0, r4); // 43 42 41 40 03 02 01 00
- r1 = _mm_unpacklo_epi32(r1, r5); // 53 52 51 50 13 12 11 10
-
- // t1 = 53 43 52 42 51 41 50 40 13 03 12 02 11 01 10 00
- t1 = _mm_unpacklo_epi8(r0, r1);
-
- // Load 2nd, 3rd, 6th and 7th rows
- r0 = _mm_cvtsi32_si128(*((int*)&b[2 * stride])); // 23 22 21 22
- r1 = _mm_cvtsi32_si128(*((int*)&b[3 * stride])); // 33 32 31 30
- r4 = _mm_cvtsi32_si128(*((int*)&b[6 * stride])); // 63 62 61 60
- r5 = _mm_cvtsi32_si128(*((int*)&b[7 * stride])); // 73 72 71 70
-
- r0 = _mm_unpacklo_epi32(r0, r4); // 63 62 61 60 23 22 21 20
- r1 = _mm_unpacklo_epi32(r1, r5); // 73 72 71 70 33 32 31 30
-
- // t2 = 73 63 72 62 71 61 70 60 33 23 32 22 31 21 30 20
- t2 = _mm_unpacklo_epi8(r0, r1);
-
- // t1 = 33 23 13 03 32 22 12 02 31 21 11 01 30 20 10 00
- // t2 = 73 63 53 43 72 62 52 42 71 61 51 41 70 60 50 40
- r0 = t1;
- t1 = _mm_unpacklo_epi16(t1, t2);
- t2 = _mm_unpackhi_epi16(r0, t2);
-
- // *p = 71 61 51 41 31 21 11 01 70 60 50 40 30 20 10 00
- // *q = 73 63 53 43 33 23 13 03 72 62 52 42 32 22 12 02
- *p = _mm_unpacklo_epi32(t1, t2);
- *q = _mm_unpackhi_epi32(t1, t2);
-}
-
-static WEBP_INLINE void Load16x4(const uint8_t* r0, const uint8_t* r8,
- int stride,
- __m128i* p1, __m128i* p0,
- __m128i* q0, __m128i* q1) {
- __m128i t1, t2;
- // Assume the pixels around the edge (|) are numbered as follows
- // 00 01 | 02 03
- // 10 11 | 12 13
- // ... | ...
- // e0 e1 | e2 e3
- // f0 f1 | f2 f3
- //
- // r0 is pointing to the 0th row (00)
- // r8 is pointing to the 8th row (80)
-
- // Load
- // p1 = 71 61 51 41 31 21 11 01 70 60 50 40 30 20 10 00
- // q0 = 73 63 53 43 33 23 13 03 72 62 52 42 32 22 12 02
- // p0 = f1 e1 d1 c1 b1 a1 91 81 f0 e0 d0 c0 b0 a0 90 80
- // q1 = f3 e3 d3 c3 b3 a3 93 83 f2 e2 d2 c2 b2 a2 92 82
- Load8x4(r0, stride, p1, q0);
- Load8x4(r8, stride, p0, q1);
-
- t1 = *p1;
- t2 = *q0;
- // p1 = f0 e0 d0 c0 b0 a0 90 80 70 60 50 40 30 20 10 00
- // p0 = f1 e1 d1 c1 b1 a1 91 81 71 61 51 41 31 21 11 01
- // q0 = f2 e2 d2 c2 b2 a2 92 82 72 62 52 42 32 22 12 02
- // q1 = f3 e3 d3 c3 b3 a3 93 83 73 63 53 43 33 23 13 03
- *p1 = _mm_unpacklo_epi64(t1, *p0);
- *p0 = _mm_unpackhi_epi64(t1, *p0);
- *q0 = _mm_unpacklo_epi64(t2, *q1);
- *q1 = _mm_unpackhi_epi64(t2, *q1);
-}
-
-static WEBP_INLINE void Store4x4(__m128i* x, uint8_t* dst, int stride) {
- int i;
- for (i = 0; i < 4; ++i, dst += stride) {
- *((int32_t*)dst) = _mm_cvtsi128_si32(*x);
- *x = _mm_srli_si128(*x, 4);
- }
-}
-
-// Transpose back and store
-static WEBP_INLINE void Store16x4(uint8_t* r0, uint8_t* r8, int stride,
- __m128i* p1, __m128i* p0,
- __m128i* q0, __m128i* q1) {
- __m128i t1;
-
- // p0 = 71 70 61 60 51 50 41 40 31 30 21 20 11 10 01 00
- // p1 = f1 f0 e1 e0 d1 d0 c1 c0 b1 b0 a1 a0 91 90 81 80
- t1 = *p0;
- *p0 = _mm_unpacklo_epi8(*p1, t1);
- *p1 = _mm_unpackhi_epi8(*p1, t1);
-
- // q0 = 73 72 63 62 53 52 43 42 33 32 23 22 13 12 03 02
- // q1 = f3 f2 e3 e2 d3 d2 c3 c2 b3 b2 a3 a2 93 92 83 82
- t1 = *q0;
- *q0 = _mm_unpacklo_epi8(t1, *q1);
- *q1 = _mm_unpackhi_epi8(t1, *q1);
-
- // p0 = 33 32 31 30 23 22 21 20 13 12 11 10 03 02 01 00
- // q0 = 73 72 71 70 63 62 61 60 53 52 51 50 43 42 41 40
- t1 = *p0;
- *p0 = _mm_unpacklo_epi16(t1, *q0);
- *q0 = _mm_unpackhi_epi16(t1, *q0);
-
- // p1 = b3 b2 b1 b0 a3 a2 a1 a0 93 92 91 90 83 82 81 80
- // q1 = f3 f2 f1 f0 e3 e2 e1 e0 d3 d2 d1 d0 c3 c2 c1 c0
- t1 = *p1;
- *p1 = _mm_unpacklo_epi16(t1, *q1);
- *q1 = _mm_unpackhi_epi16(t1, *q1);
-
- Store4x4(p0, r0, stride);
- r0 += 4 * stride;
- Store4x4(q0, r0, stride);
-
- Store4x4(p1, r8, stride);
- r8 += 4 * stride;
- Store4x4(q1, r8, stride);
-}
-
-//------------------------------------------------------------------------------
-// Simple In-loop filtering (Paragraph 15.2)
-
-static void SimpleVFilter16SSE2(uint8_t* p, int stride, int thresh) {
- // Load
- __m128i p1 = _mm_loadu_si128((__m128i*)&p[-2 * stride]);
- __m128i p0 = _mm_loadu_si128((__m128i*)&p[-stride]);
- __m128i q0 = _mm_loadu_si128((__m128i*)&p[0]);
- __m128i q1 = _mm_loadu_si128((__m128i*)&p[stride]);
-
- DoFilter2(&p1, &p0, &q0, &q1, thresh);
-
- // Store
- _mm_storeu_si128((__m128i*)&p[-stride], p0);
- _mm_storeu_si128((__m128i*)p, q0);
-}
-
-static void SimpleHFilter16SSE2(uint8_t* p, int stride, int thresh) {
- __m128i p1, p0, q0, q1;
-
- p -= 2; // beginning of p1
-
- Load16x4(p, p + 8 * stride, stride, &p1, &p0, &q0, &q1);
- DoFilter2(&p1, &p0, &q0, &q1, thresh);
- Store16x4(p, p + 8 * stride, stride, &p1, &p0, &q0, &q1);
-}
-
-static void SimpleVFilter16iSSE2(uint8_t* p, int stride, int thresh) {
- int k;
- for (k = 3; k > 0; --k) {
- p += 4 * stride;
- SimpleVFilter16SSE2(p, stride, thresh);
- }
-}
-
-static void SimpleHFilter16iSSE2(uint8_t* p, int stride, int thresh) {
- int k;
- for (k = 3; k > 0; --k) {
- p += 4;
- SimpleHFilter16SSE2(p, stride, thresh);
- }
-}
-
-//------------------------------------------------------------------------------
-// Complex In-loop filtering (Paragraph 15.3)
-
-#define MAX_DIFF1(p3, p2, p1, p0, m) { \
- m = MM_ABS(p3, p2); \
- m = _mm_max_epu8(m, MM_ABS(p2, p1)); \
- m = _mm_max_epu8(m, MM_ABS(p1, p0)); \
-}
-
-#define MAX_DIFF2(p3, p2, p1, p0, m) { \
- m = _mm_max_epu8(m, MM_ABS(p3, p2)); \
- m = _mm_max_epu8(m, MM_ABS(p2, p1)); \
- m = _mm_max_epu8(m, MM_ABS(p1, p0)); \
-}
-
-#define LOAD_H_EDGES4(p, stride, e1, e2, e3, e4) { \
- e1 = _mm_loadu_si128((__m128i*)&(p)[0 * stride]); \
- e2 = _mm_loadu_si128((__m128i*)&(p)[1 * stride]); \
- e3 = _mm_loadu_si128((__m128i*)&(p)[2 * stride]); \
- e4 = _mm_loadu_si128((__m128i*)&(p)[3 * stride]); \
-}
-
-#define LOADUV_H_EDGE(p, u, v, stride) { \
- p = _mm_loadl_epi64((__m128i*)&(u)[(stride)]); \
- p = _mm_unpacklo_epi64(p, _mm_loadl_epi64((__m128i*)&(v)[(stride)])); \
-}
-
-#define LOADUV_H_EDGES4(u, v, stride, e1, e2, e3, e4) { \
- LOADUV_H_EDGE(e1, u, v, 0 * stride); \
- LOADUV_H_EDGE(e2, u, v, 1 * stride); \
- LOADUV_H_EDGE(e3, u, v, 2 * stride); \
- LOADUV_H_EDGE(e4, u, v, 3 * stride); \
-}
-
-#define STOREUV(p, u, v, stride) { \
- _mm_storel_epi64((__m128i*)&u[(stride)], p); \
- p = _mm_srli_si128(p, 8); \
- _mm_storel_epi64((__m128i*)&v[(stride)], p); \
-}
-
-#define COMPLEX_FL_MASK(p1, p0, q0, q1, thresh, ithresh, mask) { \
- __m128i fl_yes; \
- const __m128i it = _mm_set1_epi8(ithresh); \
- mask = _mm_subs_epu8(mask, it); \
- mask = _mm_cmpeq_epi8(mask, _mm_setzero_si128()); \
- NeedsFilter(&p1, &p0, &q0, &q1, thresh, &fl_yes); \
- mask = _mm_and_si128(mask, fl_yes); \
-}
-
-// on macroblock edges
-static void VFilter16SSE2(uint8_t* p, int stride,
- int thresh, int ithresh, int hev_thresh) {
- __m128i t1;
- __m128i mask;
- __m128i p2, p1, p0, q0, q1, q2;
-
- // Load p3, p2, p1, p0
- LOAD_H_EDGES4(p - 4 * stride, stride, t1, p2, p1, p0);
- MAX_DIFF1(t1, p2, p1, p0, mask);
-
- // Load q0, q1, q2, q3
- LOAD_H_EDGES4(p, stride, q0, q1, q2, t1);
- MAX_DIFF2(t1, q2, q1, q0, mask);
-
- COMPLEX_FL_MASK(p1, p0, q0, q1, thresh, ithresh, mask);
- DoFilter6(&p2, &p1, &p0, &q0, &q1, &q2, &mask, hev_thresh);
-
- // Store
- _mm_storeu_si128((__m128i*)&p[-3 * stride], p2);
- _mm_storeu_si128((__m128i*)&p[-2 * stride], p1);
- _mm_storeu_si128((__m128i*)&p[-1 * stride], p0);
- _mm_storeu_si128((__m128i*)&p[0 * stride], q0);
- _mm_storeu_si128((__m128i*)&p[1 * stride], q1);
- _mm_storeu_si128((__m128i*)&p[2 * stride], q2);
-}
-
-static void HFilter16SSE2(uint8_t* p, int stride,
- int thresh, int ithresh, int hev_thresh) {
- __m128i mask;
- __m128i p3, p2, p1, p0, q0, q1, q2, q3;
-
- uint8_t* const b = p - 4;
- Load16x4(b, b + 8 * stride, stride, &p3, &p2, &p1, &p0); // p3, p2, p1, p0
- MAX_DIFF1(p3, p2, p1, p0, mask);
-
- Load16x4(p, p + 8 * stride, stride, &q0, &q1, &q2, &q3); // q0, q1, q2, q3
- MAX_DIFF2(q3, q2, q1, q0, mask);
-
- COMPLEX_FL_MASK(p1, p0, q0, q1, thresh, ithresh, mask);
- DoFilter6(&p2, &p1, &p0, &q0, &q1, &q2, &mask, hev_thresh);
-
- Store16x4(b, b + 8 * stride, stride, &p3, &p2, &p1, &p0);
- Store16x4(p, p + 8 * stride, stride, &q0, &q1, &q2, &q3);
-}
-
-// on three inner edges
-static void VFilter16iSSE2(uint8_t* p, int stride,
- int thresh, int ithresh, int hev_thresh) {
- int k;
- __m128i mask;
- __m128i t1, t2, p1, p0, q0, q1;
-
- for (k = 3; k > 0; --k) {
- // Load p3, p2, p1, p0
- LOAD_H_EDGES4(p, stride, t2, t1, p1, p0);
- MAX_DIFF1(t2, t1, p1, p0, mask);
-
- p += 4 * stride;
-
- // Load q0, q1, q2, q3
- LOAD_H_EDGES4(p, stride, q0, q1, t1, t2);
- MAX_DIFF2(t2, t1, q1, q0, mask);
-
- COMPLEX_FL_MASK(p1, p0, q0, q1, thresh, ithresh, mask);
- DoFilter4(&p1, &p0, &q0, &q1, &mask, hev_thresh);
-
- // Store
- _mm_storeu_si128((__m128i*)&p[-2 * stride], p1);
- _mm_storeu_si128((__m128i*)&p[-1 * stride], p0);
- _mm_storeu_si128((__m128i*)&p[0 * stride], q0);
- _mm_storeu_si128((__m128i*)&p[1 * stride], q1);
- }
-}
-
-static void HFilter16iSSE2(uint8_t* p, int stride,
- int thresh, int ithresh, int hev_thresh) {
- int k;
- uint8_t* b;
- __m128i mask;
- __m128i t1, t2, p1, p0, q0, q1;
-
- for (k = 3; k > 0; --k) {
- b = p;
- Load16x4(b, b + 8 * stride, stride, &t2, &t1, &p1, &p0); // p3, p2, p1, p0
- MAX_DIFF1(t2, t1, p1, p0, mask);
-
- b += 4; // beginning of q0
- Load16x4(b, b + 8 * stride, stride, &q0, &q1, &t1, &t2); // q0, q1, q2, q3
- MAX_DIFF2(t2, t1, q1, q0, mask);
-
- COMPLEX_FL_MASK(p1, p0, q0, q1, thresh, ithresh, mask);
- DoFilter4(&p1, &p0, &q0, &q1, &mask, hev_thresh);
-
- b -= 2; // beginning of p1
- Store16x4(b, b + 8 * stride, stride, &p1, &p0, &q0, &q1);
-
- p += 4;
- }
-}
-
-// 8-pixels wide variant, for chroma filtering
-static void VFilter8SSE2(uint8_t* u, uint8_t* v, int stride,
- int thresh, int ithresh, int hev_thresh) {
- __m128i mask;
- __m128i t1, p2, p1, p0, q0, q1, q2;
-
- // Load p3, p2, p1, p0
- LOADUV_H_EDGES4(u - 4 * stride, v - 4 * stride, stride, t1, p2, p1, p0);
- MAX_DIFF1(t1, p2, p1, p0, mask);
-
- // Load q0, q1, q2, q3
- LOADUV_H_EDGES4(u, v, stride, q0, q1, q2, t1);
- MAX_DIFF2(t1, q2, q1, q0, mask);
-
- COMPLEX_FL_MASK(p1, p0, q0, q1, thresh, ithresh, mask);
- DoFilter6(&p2, &p1, &p0, &q0, &q1, &q2, &mask, hev_thresh);
-
- // Store
- STOREUV(p2, u, v, -3 * stride);
- STOREUV(p1, u, v, -2 * stride);
- STOREUV(p0, u, v, -1 * stride);
- STOREUV(q0, u, v, 0 * stride);
- STOREUV(q1, u, v, 1 * stride);
- STOREUV(q2, u, v, 2 * stride);
-}
-
-static void HFilter8SSE2(uint8_t* u, uint8_t* v, int stride,
- int thresh, int ithresh, int hev_thresh) {
- __m128i mask;
- __m128i p3, p2, p1, p0, q0, q1, q2, q3;
-
- uint8_t* const tu = u - 4;
- uint8_t* const tv = v - 4;
- Load16x4(tu, tv, stride, &p3, &p2, &p1, &p0); // p3, p2, p1, p0
- MAX_DIFF1(p3, p2, p1, p0, mask);
-
- Load16x4(u, v, stride, &q0, &q1, &q2, &q3); // q0, q1, q2, q3
- MAX_DIFF2(q3, q2, q1, q0, mask);
-
- COMPLEX_FL_MASK(p1, p0, q0, q1, thresh, ithresh, mask);
- DoFilter6(&p2, &p1, &p0, &q0, &q1, &q2, &mask, hev_thresh);
-
- Store16x4(tu, tv, stride, &p3, &p2, &p1, &p0);
- Store16x4(u, v, stride, &q0, &q1, &q2, &q3);
-}
-
-static void VFilter8iSSE2(uint8_t* u, uint8_t* v, int stride,
- int thresh, int ithresh, int hev_thresh) {
- __m128i mask;
- __m128i t1, t2, p1, p0, q0, q1;
-
- // Load p3, p2, p1, p0
- LOADUV_H_EDGES4(u, v, stride, t2, t1, p1, p0);
- MAX_DIFF1(t2, t1, p1, p0, mask);
-
- u += 4 * stride;
- v += 4 * stride;
-
- // Load q0, q1, q2, q3
- LOADUV_H_EDGES4(u, v, stride, q0, q1, t1, t2);
- MAX_DIFF2(t2, t1, q1, q0, mask);
-
- COMPLEX_FL_MASK(p1, p0, q0, q1, thresh, ithresh, mask);
- DoFilter4(&p1, &p0, &q0, &q1, &mask, hev_thresh);
-
- // Store
- STOREUV(p1, u, v, -2 * stride);
- STOREUV(p0, u, v, -1 * stride);
- STOREUV(q0, u, v, 0 * stride);
- STOREUV(q1, u, v, 1 * stride);
-}
-
-static void HFilter8iSSE2(uint8_t* u, uint8_t* v, int stride,
- int thresh, int ithresh, int hev_thresh) {
- __m128i mask;
- __m128i t1, t2, p1, p0, q0, q1;
- Load16x4(u, v, stride, &t2, &t1, &p1, &p0); // p3, p2, p1, p0
- MAX_DIFF1(t2, t1, p1, p0, mask);
-
- u += 4; // beginning of q0
- v += 4;
- Load16x4(u, v, stride, &q0, &q1, &t1, &t2); // q0, q1, q2, q3
- MAX_DIFF2(t2, t1, q1, q0, mask);
-
- COMPLEX_FL_MASK(p1, p0, q0, q1, thresh, ithresh, mask);
- DoFilter4(&p1, &p0, &q0, &q1, &mask, hev_thresh);
-
- u -= 2; // beginning of p1
- v -= 2;
- Store16x4(u, v, stride, &p1, &p0, &q0, &q1);
-}
-
-extern void VP8DspInitSSE2(void);
-
-void VP8DspInitSSE2(void) {
- VP8Transform = TransformSSE2;
-
- VP8VFilter16 = VFilter16SSE2;
- VP8HFilter16 = HFilter16SSE2;
- VP8VFilter8 = VFilter8SSE2;
- VP8HFilter8 = HFilter8SSE2;
- VP8VFilter16i = VFilter16iSSE2;
- VP8HFilter16i = HFilter16iSSE2;
- VP8VFilter8i = VFilter8iSSE2;
- VP8HFilter8i = HFilter8iSSE2;
-
- VP8SimpleVFilter16 = SimpleVFilter16SSE2;
- VP8SimpleHFilter16 = SimpleHFilter16SSE2;
- VP8SimpleVFilter16i = SimpleVFilter16iSSE2;
- VP8SimpleHFilter16i = SimpleHFilter16iSSE2;
-}
-
-#if defined(__cplusplus) || defined(c_plusplus)
-} // extern "C"
-#endif
-
-#endif // WEBP_USE_SSE2
diff --git a/drivers/webpold/dsp/dsp.h b/drivers/webpold/dsp/dsp.h
deleted file mode 100644
index fd686a8532..0000000000
--- a/drivers/webpold/dsp/dsp.h
+++ /dev/null
@@ -1,210 +0,0 @@
-// Copyright 2011 Google Inc. All Rights Reserved.
-//
-// This code is licensed under the same terms as WebM:
-// Software License Agreement: http://www.webmproject.org/license/software/
-// Additional IP Rights Grant: http://www.webmproject.org/license/additional/
-// -----------------------------------------------------------------------------
-//
-// Speed-critical functions.
-//
-// Author: Skal (pascal.massimino@gmail.com)
-
-#ifndef WEBP_DSP_DSP_H_
-#define WEBP_DSP_DSP_H_
-
-#include "../types.h"
-
-#if defined(__cplusplus) || defined(c_plusplus)
-extern "C" {
-#endif
-
-//------------------------------------------------------------------------------
-// CPU detection
-
-#if defined(_MSC_VER) && (defined(_M_X64) || defined(_M_IX86))
-#define WEBP_MSC_SSE2 // Visual C++ SSE2 targets
-#endif
-
-#if defined(__SSE2__) || defined(WEBP_MSC_SSE2)
-#define WEBP_USE_SSE2
-#endif
-
-#if defined(__ANDROID__) && defined(__ARM_ARCH_7A__) && defined(__ARM_NEON__)
-#define WEBP_ANDROID_NEON // Android targets that might support NEON
-#endif
-
-#if ( (defined(__ARM_NEON__) && !defined(__aarch64__)) || defined(WEBP_ANDROID_NEON)) && !defined(PSP2_ENABLED)
-#define WEBP_USE_NEON
-#endif
-
-typedef enum {
- kSSE2,
- kSSE3,
- kNEON
-} CPUFeature;
-// returns true if the CPU supports the feature.
-typedef int (*VP8CPUInfo)(CPUFeature feature);
-extern VP8CPUInfo VP8GetCPUInfo;
-
-//------------------------------------------------------------------------------
-// Encoding
-
-int VP8GetAlpha(const int histo[]);
-
-// Transforms
-// VP8Idct: Does one of two inverse transforms. If do_two is set, the transforms
-// will be done for (ref, in, dst) and (ref + 4, in + 16, dst + 4).
-typedef void (*VP8Idct)(const uint8_t* ref, const int16_t* in, uint8_t* dst,
- int do_two);
-typedef void (*VP8Fdct)(const uint8_t* src, const uint8_t* ref, int16_t* out);
-typedef void (*VP8WHT)(const int16_t* in, int16_t* out);
-extern VP8Idct VP8ITransform;
-extern VP8Fdct VP8FTransform;
-extern VP8WHT VP8ITransformWHT;
-extern VP8WHT VP8FTransformWHT;
-// Predictions
-// *dst is the destination block. *top and *left can be NULL.
-typedef void (*VP8IntraPreds)(uint8_t *dst, const uint8_t* left,
- const uint8_t* top);
-typedef void (*VP8Intra4Preds)(uint8_t *dst, const uint8_t* top);
-extern VP8Intra4Preds VP8EncPredLuma4;
-extern VP8IntraPreds VP8EncPredLuma16;
-extern VP8IntraPreds VP8EncPredChroma8;
-
-typedef int (*VP8Metric)(const uint8_t* pix, const uint8_t* ref);
-extern VP8Metric VP8SSE16x16, VP8SSE16x8, VP8SSE8x8, VP8SSE4x4;
-typedef int (*VP8WMetric)(const uint8_t* pix, const uint8_t* ref,
- const uint16_t* const weights);
-extern VP8WMetric VP8TDisto4x4, VP8TDisto16x16;
-
-typedef void (*VP8BlockCopy)(const uint8_t* src, uint8_t* dst);
-extern VP8BlockCopy VP8Copy4x4;
-// Quantization
-struct VP8Matrix; // forward declaration
-typedef int (*VP8QuantizeBlock)(int16_t in[16], int16_t out[16],
- int n, const struct VP8Matrix* const mtx);
-extern VP8QuantizeBlock VP8EncQuantizeBlock;
-
-// Compute susceptibility based on DCT-coeff histograms:
-// the higher, the "easier" the macroblock is to compress.
-typedef int (*VP8CHisto)(const uint8_t* ref, const uint8_t* pred,
- int start_block, int end_block);
-extern const int VP8DspScan[16 + 4 + 4];
-extern VP8CHisto VP8CollectHistogram;
-
-void VP8EncDspInit(void); // must be called before using any of the above
-
-//------------------------------------------------------------------------------
-// Decoding
-
-typedef void (*VP8DecIdct)(const int16_t* coeffs, uint8_t* dst);
-// when doing two transforms, coeffs is actually int16_t[2][16].
-typedef void (*VP8DecIdct2)(const int16_t* coeffs, uint8_t* dst, int do_two);
-extern VP8DecIdct2 VP8Transform;
-extern VP8DecIdct VP8TransformUV;
-extern VP8DecIdct VP8TransformDC;
-extern VP8DecIdct VP8TransformDCUV;
-extern void (*VP8TransformWHT)(const int16_t* in, int16_t* out);
-
-// *dst is the destination block, with stride BPS. Boundary samples are
-// assumed accessible when needed.
-typedef void (*VP8PredFunc)(uint8_t* dst);
-extern const VP8PredFunc VP8PredLuma16[/* NUM_B_DC_MODES */];
-extern const VP8PredFunc VP8PredChroma8[/* NUM_B_DC_MODES */];
-extern const VP8PredFunc VP8PredLuma4[/* NUM_BMODES */];
-
-// simple filter (only for luma)
-typedef void (*VP8SimpleFilterFunc)(uint8_t* p, int stride, int thresh);
-extern VP8SimpleFilterFunc VP8SimpleVFilter16;
-extern VP8SimpleFilterFunc VP8SimpleHFilter16;
-extern VP8SimpleFilterFunc VP8SimpleVFilter16i; // filter 3 inner edges
-extern VP8SimpleFilterFunc VP8SimpleHFilter16i;
-
-// regular filter (on both macroblock edges and inner edges)
-typedef void (*VP8LumaFilterFunc)(uint8_t* luma, int stride,
- int thresh, int ithresh, int hev_t);
-typedef void (*VP8ChromaFilterFunc)(uint8_t* u, uint8_t* v, int stride,
- int thresh, int ithresh, int hev_t);
-// on outer edge
-extern VP8LumaFilterFunc VP8VFilter16;
-extern VP8LumaFilterFunc VP8HFilter16;
-extern VP8ChromaFilterFunc VP8VFilter8;
-extern VP8ChromaFilterFunc VP8HFilter8;
-
-// on inner edge
-extern VP8LumaFilterFunc VP8VFilter16i; // filtering 3 inner edges altogether
-extern VP8LumaFilterFunc VP8HFilter16i;
-extern VP8ChromaFilterFunc VP8VFilter8i; // filtering u and v altogether
-extern VP8ChromaFilterFunc VP8HFilter8i;
-
-// must be called before anything using the above
-void VP8DspInit(void);
-
-//------------------------------------------------------------------------------
-// WebP I/O
-
-#define FANCY_UPSAMPLING // undefined to remove fancy upsampling support
-
-typedef void (*WebPUpsampleLinePairFunc)(
- const uint8_t* top_y, const uint8_t* bottom_y,
- const uint8_t* top_u, const uint8_t* top_v,
- const uint8_t* cur_u, const uint8_t* cur_v,
- uint8_t* top_dst, uint8_t* bottom_dst, int len);
-
-#ifdef FANCY_UPSAMPLING
-
-// Fancy upsampling functions to convert YUV to RGB(A) modes
-extern WebPUpsampleLinePairFunc WebPUpsamplers[/* MODE_LAST */];
-
-// Initializes SSE2 version of the fancy upsamplers.
-void WebPInitUpsamplersSSE2(void);
-
-#endif // FANCY_UPSAMPLING
-
-// Point-sampling methods.
-typedef void (*WebPSampleLinePairFunc)(
- const uint8_t* top_y, const uint8_t* bottom_y,
- const uint8_t* u, const uint8_t* v,
- uint8_t* top_dst, uint8_t* bottom_dst, int len);
-
-extern const WebPSampleLinePairFunc WebPSamplers[/* MODE_LAST */];
-
-// General function for converting two lines of ARGB or RGBA.
-// 'alpha_is_last' should be true if 0xff000000 is stored in memory as
-// as 0x00, 0x00, 0x00, 0xff (little endian).
-WebPUpsampleLinePairFunc WebPGetLinePairConverter(int alpha_is_last);
-
-// YUV444->RGB converters
-typedef void (*WebPYUV444Converter)(const uint8_t* y,
- const uint8_t* u, const uint8_t* v,
- uint8_t* dst, int len);
-
-extern const WebPYUV444Converter WebPYUV444Converters[/* MODE_LAST */];
-
-// Main function to be called
-void WebPInitUpsamplers(void);
-
-//------------------------------------------------------------------------------
-// Pre-multiply planes with alpha values
-
-// Apply alpha pre-multiply on an rgba, bgra or argb plane of size w * h.
-// alpha_first should be 0 for argb, 1 for rgba or bgra (where alpha is last).
-extern void (*WebPApplyAlphaMultiply)(
- uint8_t* rgba, int alpha_first, int w, int h, int stride);
-
-// Same, buf specifically for RGBA4444 format
-extern void (*WebPApplyAlphaMultiply4444)(
- uint8_t* rgba4444, int w, int h, int stride);
-
-// To be called first before using the above.
-void WebPInitPremultiply(void);
-
-void WebPInitPremultiplySSE2(void); // should not be called directly.
-
-//------------------------------------------------------------------------------
-
-#if defined(__cplusplus) || defined(c_plusplus)
-} // extern "C"
-#endif
-
-#endif /* WEBP_DSP_DSP_H_ */
diff --git a/drivers/webpold/dsp/enc.c b/drivers/webpold/dsp/enc.c
deleted file mode 100644
index 02234564be..0000000000
--- a/drivers/webpold/dsp/enc.c
+++ /dev/null
@@ -1,743 +0,0 @@
-// Copyright 2011 Google Inc. All Rights Reserved.
-//
-// This code is licensed under the same terms as WebM:
-// Software License Agreement: http://www.webmproject.org/license/software/
-// Additional IP Rights Grant: http://www.webmproject.org/license/additional/
-// -----------------------------------------------------------------------------
-//
-// Speed-critical encoding functions.
-//
-// Author: Skal (pascal.massimino@gmail.com)
-
-#include <stdlib.h> // for abs()
-#include "./dsp.h"
-#include "../enc/vp8enci.h"
-
-#if defined(__cplusplus) || defined(c_plusplus)
-extern "C" {
-#endif
-
-//------------------------------------------------------------------------------
-// Compute susceptibility based on DCT-coeff histograms:
-// the higher, the "easier" the macroblock is to compress.
-
-static int ClipAlpha(int alpha) {
- return alpha < 0 ? 0 : alpha > 255 ? 255 : alpha;
-}
-
-int VP8GetAlpha(const int histo[MAX_COEFF_THRESH + 1]) {
- int num = 0, den = 0, val = 0;
- int k;
- int alpha;
- // note: changing this loop to avoid the numerous "k + 1" slows things down.
- for (k = 0; k < MAX_COEFF_THRESH; ++k) {
- if (histo[k + 1]) {
- val += histo[k + 1];
- num += val * (k + 1);
- den += (k + 1) * (k + 1);
- }
- }
- // we scale the value to a usable [0..255] range
- alpha = den ? 10 * num / den - 5 : 0;
- return ClipAlpha(alpha);
-}
-
-const int VP8DspScan[16 + 4 + 4] = {
- // Luma
- 0 + 0 * BPS, 4 + 0 * BPS, 8 + 0 * BPS, 12 + 0 * BPS,
- 0 + 4 * BPS, 4 + 4 * BPS, 8 + 4 * BPS, 12 + 4 * BPS,
- 0 + 8 * BPS, 4 + 8 * BPS, 8 + 8 * BPS, 12 + 8 * BPS,
- 0 + 12 * BPS, 4 + 12 * BPS, 8 + 12 * BPS, 12 + 12 * BPS,
-
- 0 + 0 * BPS, 4 + 0 * BPS, 0 + 4 * BPS, 4 + 4 * BPS, // U
- 8 + 0 * BPS, 12 + 0 * BPS, 8 + 4 * BPS, 12 + 4 * BPS // V
-};
-
-static int CollectHistogram(const uint8_t* ref, const uint8_t* pred,
- int start_block, int end_block) {
- int histo[MAX_COEFF_THRESH + 1] = { 0 };
- int16_t out[16];
- int j, k;
- for (j = start_block; j < end_block; ++j) {
- VP8FTransform(ref + VP8DspScan[j], pred + VP8DspScan[j], out);
-
- // Convert coefficients to bin (within out[]).
- for (k = 0; k < 16; ++k) {
- const int v = abs(out[k]) >> 2;
- out[k] = (v > MAX_COEFF_THRESH) ? MAX_COEFF_THRESH : v;
- }
-
- // Use bin to update histogram.
- for (k = 0; k < 16; ++k) {
- histo[out[k]]++;
- }
- }
-
- return VP8GetAlpha(histo);
-}
-
-//------------------------------------------------------------------------------
-// run-time tables (~4k)
-
-static uint8_t clip1[255 + 510 + 1]; // clips [-255,510] to [0,255]
-
-// We declare this variable 'volatile' to prevent instruction reordering
-// and make sure it's set to true _last_ (so as to be thread-safe)
-static volatile int tables_ok = 0;
-
-static void InitTables(void) {
- if (!tables_ok) {
- int i;
- for (i = -255; i <= 255 + 255; ++i) {
- clip1[255 + i] = (i < 0) ? 0 : (i > 255) ? 255 : i;
- }
- tables_ok = 1;
- }
-}
-
-static WEBP_INLINE uint8_t clip_8b(int v) {
- return (!(v & ~0xff)) ? v : v < 0 ? 0 : 255;
-}
-
-//------------------------------------------------------------------------------
-// Transforms (Paragraph 14.4)
-
-#define STORE(x, y, v) \
- dst[(x) + (y) * BPS] = clip_8b(ref[(x) + (y) * BPS] + ((v) >> 3))
-
-static const int kC1 = 20091 + (1 << 16);
-static const int kC2 = 35468;
-#define MUL(a, b) (((a) * (b)) >> 16)
-
-static WEBP_INLINE void ITransformOne(const uint8_t* ref, const int16_t* in,
- uint8_t* dst) {
- int C[4 * 4], *tmp;
- int i;
- tmp = C;
- for (i = 0; i < 4; ++i) { // vertical pass
- const int a = in[0] + in[8];
- const int b = in[0] - in[8];
- const int c = MUL(in[4], kC2) - MUL(in[12], kC1);
- const int d = MUL(in[4], kC1) + MUL(in[12], kC2);
- tmp[0] = a + d;
- tmp[1] = b + c;
- tmp[2] = b - c;
- tmp[3] = a - d;
- tmp += 4;
- in++;
- }
-
- tmp = C;
- for (i = 0; i < 4; ++i) { // horizontal pass
- const int dc = tmp[0] + 4;
- const int a = dc + tmp[8];
- const int b = dc - tmp[8];
- const int c = MUL(tmp[4], kC2) - MUL(tmp[12], kC1);
- const int d = MUL(tmp[4], kC1) + MUL(tmp[12], kC2);
- STORE(0, i, a + d);
- STORE(1, i, b + c);
- STORE(2, i, b - c);
- STORE(3, i, a - d);
- tmp++;
- }
-}
-
-static void ITransform(const uint8_t* ref, const int16_t* in, uint8_t* dst,
- int do_two) {
- ITransformOne(ref, in, dst);
- if (do_two) {
- ITransformOne(ref + 4, in + 16, dst + 4);
- }
-}
-
-static void FTransform(const uint8_t* src, const uint8_t* ref, int16_t* out) {
- int i;
- int tmp[16];
- for (i = 0; i < 4; ++i, src += BPS, ref += BPS) {
- const int d0 = src[0] - ref[0];
- const int d1 = src[1] - ref[1];
- const int d2 = src[2] - ref[2];
- const int d3 = src[3] - ref[3];
- const int a0 = (d0 + d3) << 3;
- const int a1 = (d1 + d2) << 3;
- const int a2 = (d1 - d2) << 3;
- const int a3 = (d0 - d3) << 3;
- tmp[0 + i * 4] = (a0 + a1);
- tmp[1 + i * 4] = (a2 * 2217 + a3 * 5352 + 14500) >> 12;
- tmp[2 + i * 4] = (a0 - a1);
- tmp[3 + i * 4] = (a3 * 2217 - a2 * 5352 + 7500) >> 12;
- }
- for (i = 0; i < 4; ++i) {
- const int a0 = (tmp[0 + i] + tmp[12 + i]);
- const int a1 = (tmp[4 + i] + tmp[ 8 + i]);
- const int a2 = (tmp[4 + i] - tmp[ 8 + i]);
- const int a3 = (tmp[0 + i] - tmp[12 + i]);
- out[0 + i] = (a0 + a1 + 7) >> 4;
- out[4 + i] = ((a2 * 2217 + a3 * 5352 + 12000) >> 16) + (a3 != 0);
- out[8 + i] = (a0 - a1 + 7) >> 4;
- out[12+ i] = ((a3 * 2217 - a2 * 5352 + 51000) >> 16);
- }
-}
-
-static void ITransformWHT(const int16_t* in, int16_t* out) {
- int tmp[16];
- int i;
- for (i = 0; i < 4; ++i) {
- const int a0 = in[0 + i] + in[12 + i];
- const int a1 = in[4 + i] + in[ 8 + i];
- const int a2 = in[4 + i] - in[ 8 + i];
- const int a3 = in[0 + i] - in[12 + i];
- tmp[0 + i] = a0 + a1;
- tmp[8 + i] = a0 - a1;
- tmp[4 + i] = a3 + a2;
- tmp[12 + i] = a3 - a2;
- }
- for (i = 0; i < 4; ++i) {
- const int dc = tmp[0 + i * 4] + 3; // w/ rounder
- const int a0 = dc + tmp[3 + i * 4];
- const int a1 = tmp[1 + i * 4] + tmp[2 + i * 4];
- const int a2 = tmp[1 + i * 4] - tmp[2 + i * 4];
- const int a3 = dc - tmp[3 + i * 4];
- out[ 0] = (a0 + a1) >> 3;
- out[16] = (a3 + a2) >> 3;
- out[32] = (a0 - a1) >> 3;
- out[48] = (a3 - a2) >> 3;
- out += 64;
- }
-}
-
-static void FTransformWHT(const int16_t* in, int16_t* out) {
- int tmp[16];
- int i;
- for (i = 0; i < 4; ++i, in += 64) {
- const int a0 = (in[0 * 16] + in[2 * 16]) << 2;
- const int a1 = (in[1 * 16] + in[3 * 16]) << 2;
- const int a2 = (in[1 * 16] - in[3 * 16]) << 2;
- const int a3 = (in[0 * 16] - in[2 * 16]) << 2;
- tmp[0 + i * 4] = (a0 + a1) + (a0 != 0);
- tmp[1 + i * 4] = a3 + a2;
- tmp[2 + i * 4] = a3 - a2;
- tmp[3 + i * 4] = a0 - a1;
- }
- for (i = 0; i < 4; ++i) {
- const int a0 = (tmp[0 + i] + tmp[8 + i]);
- const int a1 = (tmp[4 + i] + tmp[12+ i]);
- const int a2 = (tmp[4 + i] - tmp[12+ i]);
- const int a3 = (tmp[0 + i] - tmp[8 + i]);
- const int b0 = a0 + a1;
- const int b1 = a3 + a2;
- const int b2 = a3 - a2;
- const int b3 = a0 - a1;
- out[ 0 + i] = (b0 + (b0 > 0) + 3) >> 3;
- out[ 4 + i] = (b1 + (b1 > 0) + 3) >> 3;
- out[ 8 + i] = (b2 + (b2 > 0) + 3) >> 3;
- out[12 + i] = (b3 + (b3 > 0) + 3) >> 3;
- }
-}
-
-#undef MUL
-#undef STORE
-
-//------------------------------------------------------------------------------
-// Intra predictions
-
-#define DST(x, y) dst[(x) + (y) * BPS]
-
-static WEBP_INLINE void Fill(uint8_t* dst, int value, int size) {
- int j;
- for (j = 0; j < size; ++j) {
- memset(dst + j * BPS, value, size);
- }
-}
-
-static WEBP_INLINE void VerticalPred(uint8_t* dst,
- const uint8_t* top, int size) {
- int j;
- if (top) {
- for (j = 0; j < size; ++j) memcpy(dst + j * BPS, top, size);
- } else {
- Fill(dst, 127, size);
- }
-}
-
-static WEBP_INLINE void HorizontalPred(uint8_t* dst,
- const uint8_t* left, int size) {
- if (left) {
- int j;
- for (j = 0; j < size; ++j) {
- memset(dst + j * BPS, left[j], size);
- }
- } else {
- Fill(dst, 129, size);
- }
-}
-
-static WEBP_INLINE void TrueMotion(uint8_t* dst, const uint8_t* left,
- const uint8_t* top, int size) {
- int y;
- if (left) {
- if (top) {
- const uint8_t* const clip = clip1 + 255 - left[-1];
- for (y = 0; y < size; ++y) {
- const uint8_t* const clip_table = clip + left[y];
- int x;
- for (x = 0; x < size; ++x) {
- dst[x] = clip_table[top[x]];
- }
- dst += BPS;
- }
- } else {
- HorizontalPred(dst, left, size);
- }
- } else {
- // true motion without left samples (hence: with default 129 value)
- // is equivalent to VE prediction where you just copy the top samples.
- // Note that if top samples are not available, the default value is
- // then 129, and not 127 as in the VerticalPred case.
- if (top) {
- VerticalPred(dst, top, size);
- } else {
- Fill(dst, 129, size);
- }
- }
-}
-
-static WEBP_INLINE void DCMode(uint8_t* dst, const uint8_t* left,
- const uint8_t* top,
- int size, int round, int shift) {
- int DC = 0;
- int j;
- if (top) {
- for (j = 0; j < size; ++j) DC += top[j];
- if (left) { // top and left present
- for (j = 0; j < size; ++j) DC += left[j];
- } else { // top, but no left
- DC += DC;
- }
- DC = (DC + round) >> shift;
- } else if (left) { // left but no top
- for (j = 0; j < size; ++j) DC += left[j];
- DC += DC;
- DC = (DC + round) >> shift;
- } else { // no top, no left, nothing.
- DC = 0x80;
- }
- Fill(dst, DC, size);
-}
-
-//------------------------------------------------------------------------------
-// Chroma 8x8 prediction (paragraph 12.2)
-
-static void IntraChromaPreds(uint8_t* dst, const uint8_t* left,
- const uint8_t* top) {
- // U block
- DCMode(C8DC8 + dst, left, top, 8, 8, 4);
- VerticalPred(C8VE8 + dst, top, 8);
- HorizontalPred(C8HE8 + dst, left, 8);
- TrueMotion(C8TM8 + dst, left, top, 8);
- // V block
- dst += 8;
- if (top) top += 8;
- if (left) left += 16;
- DCMode(C8DC8 + dst, left, top, 8, 8, 4);
- VerticalPred(C8VE8 + dst, top, 8);
- HorizontalPred(C8HE8 + dst, left, 8);
- TrueMotion(C8TM8 + dst, left, top, 8);
-}
-
-//------------------------------------------------------------------------------
-// luma 16x16 prediction (paragraph 12.3)
-
-static void Intra16Preds(uint8_t* dst,
- const uint8_t* left, const uint8_t* top) {
- DCMode(I16DC16 + dst, left, top, 16, 16, 5);
- VerticalPred(I16VE16 + dst, top, 16);
- HorizontalPred(I16HE16 + dst, left, 16);
- TrueMotion(I16TM16 + dst, left, top, 16);
-}
-
-//------------------------------------------------------------------------------
-// luma 4x4 prediction
-
-#define AVG3(a, b, c) (((a) + 2 * (b) + (c) + 2) >> 2)
-#define AVG2(a, b) (((a) + (b) + 1) >> 1)
-
-static void VE4(uint8_t* dst, const uint8_t* top) { // vertical
- const uint8_t vals[4] = {
- AVG3(top[-1], top[0], top[1]),
- AVG3(top[ 0], top[1], top[2]),
- AVG3(top[ 1], top[2], top[3]),
- AVG3(top[ 2], top[3], top[4])
- };
- int i;
- for (i = 0; i < 4; ++i) {
- memcpy(dst + i * BPS, vals, 4);
- }
-}
-
-static void HE4(uint8_t* dst, const uint8_t* top) { // horizontal
- const int X = top[-1];
- const int I = top[-2];
- const int J = top[-3];
- const int K = top[-4];
- const int L = top[-5];
- *(uint32_t*)(dst + 0 * BPS) = 0x01010101U * AVG3(X, I, J);
- *(uint32_t*)(dst + 1 * BPS) = 0x01010101U * AVG3(I, J, K);
- *(uint32_t*)(dst + 2 * BPS) = 0x01010101U * AVG3(J, K, L);
- *(uint32_t*)(dst + 3 * BPS) = 0x01010101U * AVG3(K, L, L);
-}
-
-static void DC4(uint8_t* dst, const uint8_t* top) {
- uint32_t dc = 4;
- int i;
- for (i = 0; i < 4; ++i) dc += top[i] + top[-5 + i];
- Fill(dst, dc >> 3, 4);
-}
-
-static void RD4(uint8_t* dst, const uint8_t* top) {
- const int X = top[-1];
- const int I = top[-2];
- const int J = top[-3];
- const int K = top[-4];
- const int L = top[-5];
- const int A = top[0];
- const int B = top[1];
- const int C = top[2];
- const int D = top[3];
- DST(0, 3) = AVG3(J, K, L);
- DST(0, 2) = DST(1, 3) = AVG3(I, J, K);
- DST(0, 1) = DST(1, 2) = DST(2, 3) = AVG3(X, I, J);
- DST(0, 0) = DST(1, 1) = DST(2, 2) = DST(3, 3) = AVG3(A, X, I);
- DST(1, 0) = DST(2, 1) = DST(3, 2) = AVG3(B, A, X);
- DST(2, 0) = DST(3, 1) = AVG3(C, B, A);
- DST(3, 0) = AVG3(D, C, B);
-}
-
-static void LD4(uint8_t* dst, const uint8_t* top) {
- const int A = top[0];
- const int B = top[1];
- const int C = top[2];
- const int D = top[3];
- const int E = top[4];
- const int F = top[5];
- const int G = top[6];
- const int H = top[7];
- DST(0, 0) = AVG3(A, B, C);
- DST(1, 0) = DST(0, 1) = AVG3(B, C, D);
- DST(2, 0) = DST(1, 1) = DST(0, 2) = AVG3(C, D, E);
- DST(3, 0) = DST(2, 1) = DST(1, 2) = DST(0, 3) = AVG3(D, E, F);
- DST(3, 1) = DST(2, 2) = DST(1, 3) = AVG3(E, F, G);
- DST(3, 2) = DST(2, 3) = AVG3(F, G, H);
- DST(3, 3) = AVG3(G, H, H);
-}
-
-static void VR4(uint8_t* dst, const uint8_t* top) {
- const int X = top[-1];
- const int I = top[-2];
- const int J = top[-3];
- const int K = top[-4];
- const int A = top[0];
- const int B = top[1];
- const int C = top[2];
- const int D = top[3];
- DST(0, 0) = DST(1, 2) = AVG2(X, A);
- DST(1, 0) = DST(2, 2) = AVG2(A, B);
- DST(2, 0) = DST(3, 2) = AVG2(B, C);
- DST(3, 0) = AVG2(C, D);
-
- DST(0, 3) = AVG3(K, J, I);
- DST(0, 2) = AVG3(J, I, X);
- DST(0, 1) = DST(1, 3) = AVG3(I, X, A);
- DST(1, 1) = DST(2, 3) = AVG3(X, A, B);
- DST(2, 1) = DST(3, 3) = AVG3(A, B, C);
- DST(3, 1) = AVG3(B, C, D);
-}
-
-static void VL4(uint8_t* dst, const uint8_t* top) {
- const int A = top[0];
- const int B = top[1];
- const int C = top[2];
- const int D = top[3];
- const int E = top[4];
- const int F = top[5];
- const int G = top[6];
- const int H = top[7];
- DST(0, 0) = AVG2(A, B);
- DST(1, 0) = DST(0, 2) = AVG2(B, C);
- DST(2, 0) = DST(1, 2) = AVG2(C, D);
- DST(3, 0) = DST(2, 2) = AVG2(D, E);
-
- DST(0, 1) = AVG3(A, B, C);
- DST(1, 1) = DST(0, 3) = AVG3(B, C, D);
- DST(2, 1) = DST(1, 3) = AVG3(C, D, E);
- DST(3, 1) = DST(2, 3) = AVG3(D, E, F);
- DST(3, 2) = AVG3(E, F, G);
- DST(3, 3) = AVG3(F, G, H);
-}
-
-static void HU4(uint8_t* dst, const uint8_t* top) {
- const int I = top[-2];
- const int J = top[-3];
- const int K = top[-4];
- const int L = top[-5];
- DST(0, 0) = AVG2(I, J);
- DST(2, 0) = DST(0, 1) = AVG2(J, K);
- DST(2, 1) = DST(0, 2) = AVG2(K, L);
- DST(1, 0) = AVG3(I, J, K);
- DST(3, 0) = DST(1, 1) = AVG3(J, K, L);
- DST(3, 1) = DST(1, 2) = AVG3(K, L, L);
- DST(3, 2) = DST(2, 2) =
- DST(0, 3) = DST(1, 3) = DST(2, 3) = DST(3, 3) = L;
-}
-
-static void HD4(uint8_t* dst, const uint8_t* top) {
- const int X = top[-1];
- const int I = top[-2];
- const int J = top[-3];
- const int K = top[-4];
- const int L = top[-5];
- const int A = top[0];
- const int B = top[1];
- const int C = top[2];
-
- DST(0, 0) = DST(2, 1) = AVG2(I, X);
- DST(0, 1) = DST(2, 2) = AVG2(J, I);
- DST(0, 2) = DST(2, 3) = AVG2(K, J);
- DST(0, 3) = AVG2(L, K);
-
- DST(3, 0) = AVG3(A, B, C);
- DST(2, 0) = AVG3(X, A, B);
- DST(1, 0) = DST(3, 1) = AVG3(I, X, A);
- DST(1, 1) = DST(3, 2) = AVG3(J, I, X);
- DST(1, 2) = DST(3, 3) = AVG3(K, J, I);
- DST(1, 3) = AVG3(L, K, J);
-}
-
-static void TM4(uint8_t* dst, const uint8_t* top) {
- int x, y;
- const uint8_t* const clip = clip1 + 255 - top[-1];
- for (y = 0; y < 4; ++y) {
- const uint8_t* const clip_table = clip + top[-2 - y];
- for (x = 0; x < 4; ++x) {
- dst[x] = clip_table[top[x]];
- }
- dst += BPS;
- }
-}
-
-#undef DST
-#undef AVG3
-#undef AVG2
-
-// Left samples are top[-5 .. -2], top_left is top[-1], top are
-// located at top[0..3], and top right is top[4..7]
-static void Intra4Preds(uint8_t* dst, const uint8_t* top) {
- DC4(I4DC4 + dst, top);
- TM4(I4TM4 + dst, top);
- VE4(I4VE4 + dst, top);
- HE4(I4HE4 + dst, top);
- RD4(I4RD4 + dst, top);
- VR4(I4VR4 + dst, top);
- LD4(I4LD4 + dst, top);
- VL4(I4VL4 + dst, top);
- HD4(I4HD4 + dst, top);
- HU4(I4HU4 + dst, top);
-}
-
-//------------------------------------------------------------------------------
-// Metric
-
-static WEBP_INLINE int GetSSE(const uint8_t* a, const uint8_t* b,
- int w, int h) {
- int count = 0;
- int y, x;
- for (y = 0; y < h; ++y) {
- for (x = 0; x < w; ++x) {
- const int diff = (int)a[x] - b[x];
- count += diff * diff;
- }
- a += BPS;
- b += BPS;
- }
- return count;
-}
-
-static int SSE16x16(const uint8_t* a, const uint8_t* b) {
- return GetSSE(a, b, 16, 16);
-}
-static int SSE16x8(const uint8_t* a, const uint8_t* b) {
- return GetSSE(a, b, 16, 8);
-}
-static int SSE8x8(const uint8_t* a, const uint8_t* b) {
- return GetSSE(a, b, 8, 8);
-}
-static int SSE4x4(const uint8_t* a, const uint8_t* b) {
- return GetSSE(a, b, 4, 4);
-}
-
-//------------------------------------------------------------------------------
-// Texture distortion
-//
-// We try to match the spectral content (weighted) between source and
-// reconstructed samples.
-
-// Hadamard transform
-// Returns the weighted sum of the absolute value of transformed coefficients.
-static int TTransform(const uint8_t* in, const uint16_t* w) {
- int sum = 0;
- int tmp[16];
- int i;
- // horizontal pass
- for (i = 0; i < 4; ++i, in += BPS) {
- const int a0 = (in[0] + in[2]) << 2;
- const int a1 = (in[1] + in[3]) << 2;
- const int a2 = (in[1] - in[3]) << 2;
- const int a3 = (in[0] - in[2]) << 2;
- tmp[0 + i * 4] = a0 + a1 + (a0 != 0);
- tmp[1 + i * 4] = a3 + a2;
- tmp[2 + i * 4] = a3 - a2;
- tmp[3 + i * 4] = a0 - a1;
- }
- // vertical pass
- for (i = 0; i < 4; ++i, ++w) {
- const int a0 = (tmp[0 + i] + tmp[8 + i]);
- const int a1 = (tmp[4 + i] + tmp[12+ i]);
- const int a2 = (tmp[4 + i] - tmp[12+ i]);
- const int a3 = (tmp[0 + i] - tmp[8 + i]);
- const int b0 = a0 + a1;
- const int b1 = a3 + a2;
- const int b2 = a3 - a2;
- const int b3 = a0 - a1;
- // abs((b + (b<0) + 3) >> 3) = (abs(b) + 3) >> 3
- sum += w[ 0] * ((abs(b0) + 3) >> 3);
- sum += w[ 4] * ((abs(b1) + 3) >> 3);
- sum += w[ 8] * ((abs(b2) + 3) >> 3);
- sum += w[12] * ((abs(b3) + 3) >> 3);
- }
- return sum;
-}
-
-static int Disto4x4(const uint8_t* const a, const uint8_t* const b,
- const uint16_t* const w) {
- const int sum1 = TTransform(a, w);
- const int sum2 = TTransform(b, w);
- return (abs(sum2 - sum1) + 8) >> 4;
-}
-
-static int Disto16x16(const uint8_t* const a, const uint8_t* const b,
- const uint16_t* const w) {
- int D = 0;
- int x, y;
- for (y = 0; y < 16 * BPS; y += 4 * BPS) {
- for (x = 0; x < 16; x += 4) {
- D += Disto4x4(a + x + y, b + x + y, w);
- }
- }
- return D;
-}
-
-//------------------------------------------------------------------------------
-// Quantization
-//
-
-static const uint8_t kZigzag[16] = {
- 0, 1, 4, 8, 5, 2, 3, 6, 9, 12, 13, 10, 7, 11, 14, 15
-};
-
-// Simple quantization
-static int QuantizeBlock(int16_t in[16], int16_t out[16],
- int n, const VP8Matrix* const mtx) {
- int last = -1;
- for (; n < 16; ++n) {
- const int j = kZigzag[n];
- const int sign = (in[j] < 0);
- int coeff = (sign ? -in[j] : in[j]) + mtx->sharpen_[j];
- if (coeff > 2047) coeff = 2047;
- if (coeff > mtx->zthresh_[j]) {
- const int Q = mtx->q_[j];
- const int iQ = mtx->iq_[j];
- const int B = mtx->bias_[j];
- out[n] = QUANTDIV(coeff, iQ, B);
- if (sign) out[n] = -out[n];
- in[j] = out[n] * Q;
- if (out[n]) last = n;
- } else {
- out[n] = 0;
- in[j] = 0;
- }
- }
- return (last >= 0);
-}
-
-//------------------------------------------------------------------------------
-// Block copy
-
-static WEBP_INLINE void Copy(const uint8_t* src, uint8_t* dst, int size) {
- int y;
- for (y = 0; y < size; ++y) {
- memcpy(dst, src, size);
- src += BPS;
- dst += BPS;
- }
-}
-
-static void Copy4x4(const uint8_t* src, uint8_t* dst) { Copy(src, dst, 4); }
-
-//------------------------------------------------------------------------------
-// Initialization
-
-// Speed-critical function pointers. We have to initialize them to the default
-// implementations within VP8EncDspInit().
-VP8CHisto VP8CollectHistogram;
-VP8Idct VP8ITransform;
-VP8Fdct VP8FTransform;
-VP8WHT VP8ITransformWHT;
-VP8WHT VP8FTransformWHT;
-VP8Intra4Preds VP8EncPredLuma4;
-VP8IntraPreds VP8EncPredLuma16;
-VP8IntraPreds VP8EncPredChroma8;
-VP8Metric VP8SSE16x16;
-VP8Metric VP8SSE8x8;
-VP8Metric VP8SSE16x8;
-VP8Metric VP8SSE4x4;
-VP8WMetric VP8TDisto4x4;
-VP8WMetric VP8TDisto16x16;
-VP8QuantizeBlock VP8EncQuantizeBlock;
-VP8BlockCopy VP8Copy4x4;
-
-extern void VP8EncDspInitSSE2(void);
-
-void VP8EncDspInit(void) {
- InitTables();
-
- // default C implementations
- VP8CollectHistogram = CollectHistogram;
- VP8ITransform = ITransform;
- VP8FTransform = FTransform;
- VP8ITransformWHT = ITransformWHT;
- VP8FTransformWHT = FTransformWHT;
- VP8EncPredLuma4 = Intra4Preds;
- VP8EncPredLuma16 = Intra16Preds;
- VP8EncPredChroma8 = IntraChromaPreds;
- VP8SSE16x16 = SSE16x16;
- VP8SSE8x8 = SSE8x8;
- VP8SSE16x8 = SSE16x8;
- VP8SSE4x4 = SSE4x4;
- VP8TDisto4x4 = Disto4x4;
- VP8TDisto16x16 = Disto16x16;
- VP8EncQuantizeBlock = QuantizeBlock;
- VP8Copy4x4 = Copy4x4;
-
- // If defined, use CPUInfo() to overwrite some pointers with faster versions.
- if (VP8GetCPUInfo) {
-#if defined(WEBP_USE_SSE2)
- if (VP8GetCPUInfo(kSSE2)) {
- VP8EncDspInitSSE2();
- }
-#endif
- }
-}
-
-#if defined(__cplusplus) || defined(c_plusplus)
-} // extern "C"
-#endif
diff --git a/drivers/webpold/dsp/enc_sse2.c b/drivers/webpold/dsp/enc_sse2.c
deleted file mode 100644
index b046761dc1..0000000000
--- a/drivers/webpold/dsp/enc_sse2.c
+++ /dev/null
@@ -1,837 +0,0 @@
-// Copyright 2011 Google Inc. All Rights Reserved.
-//
-// This code is licensed under the same terms as WebM:
-// Software License Agreement: http://www.webmproject.org/license/software/
-// Additional IP Rights Grant: http://www.webmproject.org/license/additional/
-// -----------------------------------------------------------------------------
-//
-// SSE2 version of speed-critical encoding functions.
-//
-// Author: Christian Duvivier (cduvivier@google.com)
-
-#include "./dsp.h"
-
-#if defined(WEBP_USE_SSE2)
-#include <stdlib.h> // for abs()
-#include <emmintrin.h>
-
-#include "../enc/vp8enci.h"
-
-#if defined(__cplusplus) || defined(c_plusplus)
-extern "C" {
-#endif
-
-//------------------------------------------------------------------------------
-// Compute susceptibility based on DCT-coeff histograms:
-// the higher, the "easier" the macroblock is to compress.
-
-static int CollectHistogramSSE2(const uint8_t* ref, const uint8_t* pred,
- int start_block, int end_block) {
- int histo[MAX_COEFF_THRESH + 1] = { 0 };
- int16_t out[16];
- int j, k;
- const __m128i max_coeff_thresh = _mm_set1_epi16(MAX_COEFF_THRESH);
- for (j = start_block; j < end_block; ++j) {
- VP8FTransform(ref + VP8DspScan[j], pred + VP8DspScan[j], out);
-
- // Convert coefficients to bin (within out[]).
- {
- // Load.
- const __m128i out0 = _mm_loadu_si128((__m128i*)&out[0]);
- const __m128i out1 = _mm_loadu_si128((__m128i*)&out[8]);
- // sign(out) = out >> 15 (0x0000 if positive, 0xffff if negative)
- const __m128i sign0 = _mm_srai_epi16(out0, 15);
- const __m128i sign1 = _mm_srai_epi16(out1, 15);
- // abs(out) = (out ^ sign) - sign
- const __m128i xor0 = _mm_xor_si128(out0, sign0);
- const __m128i xor1 = _mm_xor_si128(out1, sign1);
- const __m128i abs0 = _mm_sub_epi16(xor0, sign0);
- const __m128i abs1 = _mm_sub_epi16(xor1, sign1);
- // v = abs(out) >> 2
- const __m128i v0 = _mm_srai_epi16(abs0, 2);
- const __m128i v1 = _mm_srai_epi16(abs1, 2);
- // bin = min(v, MAX_COEFF_THRESH)
- const __m128i bin0 = _mm_min_epi16(v0, max_coeff_thresh);
- const __m128i bin1 = _mm_min_epi16(v1, max_coeff_thresh);
- // Store.
- _mm_storeu_si128((__m128i*)&out[0], bin0);
- _mm_storeu_si128((__m128i*)&out[8], bin1);
- }
-
- // Use bin to update histogram.
- for (k = 0; k < 16; ++k) {
- histo[out[k]]++;
- }
- }
-
- return VP8GetAlpha(histo);
-}
-
-//------------------------------------------------------------------------------
-// Transforms (Paragraph 14.4)
-
-// Does one or two inverse transforms.
-static void ITransformSSE2(const uint8_t* ref, const int16_t* in, uint8_t* dst,
- int do_two) {
- // This implementation makes use of 16-bit fixed point versions of two
- // multiply constants:
- // K1 = sqrt(2) * cos (pi/8) ~= 85627 / 2^16
- // K2 = sqrt(2) * sin (pi/8) ~= 35468 / 2^16
- //
- // To be able to use signed 16-bit integers, we use the following trick to
- // have constants within range:
- // - Associated constants are obtained by subtracting the 16-bit fixed point
- // version of one:
- // k = K - (1 << 16) => K = k + (1 << 16)
- // K1 = 85267 => k1 = 20091
- // K2 = 35468 => k2 = -30068
- // - The multiplication of a variable by a constant become the sum of the
- // variable and the multiplication of that variable by the associated
- // constant:
- // (x * K) >> 16 = (x * (k + (1 << 16))) >> 16 = ((x * k ) >> 16) + x
- const __m128i k1 = _mm_set1_epi16(20091);
- const __m128i k2 = _mm_set1_epi16(-30068);
- __m128i T0, T1, T2, T3;
-
- // Load and concatenate the transform coefficients (we'll do two inverse
- // transforms in parallel). In the case of only one inverse transform, the
- // second half of the vectors will just contain random value we'll never
- // use nor store.
- __m128i in0, in1, in2, in3;
- {
- in0 = _mm_loadl_epi64((__m128i*)&in[0]);
- in1 = _mm_loadl_epi64((__m128i*)&in[4]);
- in2 = _mm_loadl_epi64((__m128i*)&in[8]);
- in3 = _mm_loadl_epi64((__m128i*)&in[12]);
- // a00 a10 a20 a30 x x x x
- // a01 a11 a21 a31 x x x x
- // a02 a12 a22 a32 x x x x
- // a03 a13 a23 a33 x x x x
- if (do_two) {
- const __m128i inB0 = _mm_loadl_epi64((__m128i*)&in[16]);
- const __m128i inB1 = _mm_loadl_epi64((__m128i*)&in[20]);
- const __m128i inB2 = _mm_loadl_epi64((__m128i*)&in[24]);
- const __m128i inB3 = _mm_loadl_epi64((__m128i*)&in[28]);
- in0 = _mm_unpacklo_epi64(in0, inB0);
- in1 = _mm_unpacklo_epi64(in1, inB1);
- in2 = _mm_unpacklo_epi64(in2, inB2);
- in3 = _mm_unpacklo_epi64(in3, inB3);
- // a00 a10 a20 a30 b00 b10 b20 b30
- // a01 a11 a21 a31 b01 b11 b21 b31
- // a02 a12 a22 a32 b02 b12 b22 b32
- // a03 a13 a23 a33 b03 b13 b23 b33
- }
- }
-
- // Vertical pass and subsequent transpose.
- {
- // First pass, c and d calculations are longer because of the "trick"
- // multiplications.
- const __m128i a = _mm_add_epi16(in0, in2);
- const __m128i b = _mm_sub_epi16(in0, in2);
- // c = MUL(in1, K2) - MUL(in3, K1) = MUL(in1, k2) - MUL(in3, k1) + in1 - in3
- const __m128i c1 = _mm_mulhi_epi16(in1, k2);
- const __m128i c2 = _mm_mulhi_epi16(in3, k1);
- const __m128i c3 = _mm_sub_epi16(in1, in3);
- const __m128i c4 = _mm_sub_epi16(c1, c2);
- const __m128i c = _mm_add_epi16(c3, c4);
- // d = MUL(in1, K1) + MUL(in3, K2) = MUL(in1, k1) + MUL(in3, k2) + in1 + in3
- const __m128i d1 = _mm_mulhi_epi16(in1, k1);
- const __m128i d2 = _mm_mulhi_epi16(in3, k2);
- const __m128i d3 = _mm_add_epi16(in1, in3);
- const __m128i d4 = _mm_add_epi16(d1, d2);
- const __m128i d = _mm_add_epi16(d3, d4);
-
- // Second pass.
- const __m128i tmp0 = _mm_add_epi16(a, d);
- const __m128i tmp1 = _mm_add_epi16(b, c);
- const __m128i tmp2 = _mm_sub_epi16(b, c);
- const __m128i tmp3 = _mm_sub_epi16(a, d);
-
- // Transpose the two 4x4.
- // a00 a01 a02 a03 b00 b01 b02 b03
- // a10 a11 a12 a13 b10 b11 b12 b13
- // a20 a21 a22 a23 b20 b21 b22 b23
- // a30 a31 a32 a33 b30 b31 b32 b33
- const __m128i transpose0_0 = _mm_unpacklo_epi16(tmp0, tmp1);
- const __m128i transpose0_1 = _mm_unpacklo_epi16(tmp2, tmp3);
- const __m128i transpose0_2 = _mm_unpackhi_epi16(tmp0, tmp1);
- const __m128i transpose0_3 = _mm_unpackhi_epi16(tmp2, tmp3);
- // a00 a10 a01 a11 a02 a12 a03 a13
- // a20 a30 a21 a31 a22 a32 a23 a33
- // b00 b10 b01 b11 b02 b12 b03 b13
- // b20 b30 b21 b31 b22 b32 b23 b33
- const __m128i transpose1_0 = _mm_unpacklo_epi32(transpose0_0, transpose0_1);
- const __m128i transpose1_1 = _mm_unpacklo_epi32(transpose0_2, transpose0_3);
- const __m128i transpose1_2 = _mm_unpackhi_epi32(transpose0_0, transpose0_1);
- const __m128i transpose1_3 = _mm_unpackhi_epi32(transpose0_2, transpose0_3);
- // a00 a10 a20 a30 a01 a11 a21 a31
- // b00 b10 b20 b30 b01 b11 b21 b31
- // a02 a12 a22 a32 a03 a13 a23 a33
- // b02 b12 a22 b32 b03 b13 b23 b33
- T0 = _mm_unpacklo_epi64(transpose1_0, transpose1_1);
- T1 = _mm_unpackhi_epi64(transpose1_0, transpose1_1);
- T2 = _mm_unpacklo_epi64(transpose1_2, transpose1_3);
- T3 = _mm_unpackhi_epi64(transpose1_2, transpose1_3);
- // a00 a10 a20 a30 b00 b10 b20 b30
- // a01 a11 a21 a31 b01 b11 b21 b31
- // a02 a12 a22 a32 b02 b12 b22 b32
- // a03 a13 a23 a33 b03 b13 b23 b33
- }
-
- // Horizontal pass and subsequent transpose.
- {
- // First pass, c and d calculations are longer because of the "trick"
- // multiplications.
- const __m128i four = _mm_set1_epi16(4);
- const __m128i dc = _mm_add_epi16(T0, four);
- const __m128i a = _mm_add_epi16(dc, T2);
- const __m128i b = _mm_sub_epi16(dc, T2);
- // c = MUL(T1, K2) - MUL(T3, K1) = MUL(T1, k2) - MUL(T3, k1) + T1 - T3
- const __m128i c1 = _mm_mulhi_epi16(T1, k2);
- const __m128i c2 = _mm_mulhi_epi16(T3, k1);
- const __m128i c3 = _mm_sub_epi16(T1, T3);
- const __m128i c4 = _mm_sub_epi16(c1, c2);
- const __m128i c = _mm_add_epi16(c3, c4);
- // d = MUL(T1, K1) + MUL(T3, K2) = MUL(T1, k1) + MUL(T3, k2) + T1 + T3
- const __m128i d1 = _mm_mulhi_epi16(T1, k1);
- const __m128i d2 = _mm_mulhi_epi16(T3, k2);
- const __m128i d3 = _mm_add_epi16(T1, T3);
- const __m128i d4 = _mm_add_epi16(d1, d2);
- const __m128i d = _mm_add_epi16(d3, d4);
-
- // Second pass.
- const __m128i tmp0 = _mm_add_epi16(a, d);
- const __m128i tmp1 = _mm_add_epi16(b, c);
- const __m128i tmp2 = _mm_sub_epi16(b, c);
- const __m128i tmp3 = _mm_sub_epi16(a, d);
- const __m128i shifted0 = _mm_srai_epi16(tmp0, 3);
- const __m128i shifted1 = _mm_srai_epi16(tmp1, 3);
- const __m128i shifted2 = _mm_srai_epi16(tmp2, 3);
- const __m128i shifted3 = _mm_srai_epi16(tmp3, 3);
-
- // Transpose the two 4x4.
- // a00 a01 a02 a03 b00 b01 b02 b03
- // a10 a11 a12 a13 b10 b11 b12 b13
- // a20 a21 a22 a23 b20 b21 b22 b23
- // a30 a31 a32 a33 b30 b31 b32 b33
- const __m128i transpose0_0 = _mm_unpacklo_epi16(shifted0, shifted1);
- const __m128i transpose0_1 = _mm_unpacklo_epi16(shifted2, shifted3);
- const __m128i transpose0_2 = _mm_unpackhi_epi16(shifted0, shifted1);
- const __m128i transpose0_3 = _mm_unpackhi_epi16(shifted2, shifted3);
- // a00 a10 a01 a11 a02 a12 a03 a13
- // a20 a30 a21 a31 a22 a32 a23 a33
- // b00 b10 b01 b11 b02 b12 b03 b13
- // b20 b30 b21 b31 b22 b32 b23 b33
- const __m128i transpose1_0 = _mm_unpacklo_epi32(transpose0_0, transpose0_1);
- const __m128i transpose1_1 = _mm_unpacklo_epi32(transpose0_2, transpose0_3);
- const __m128i transpose1_2 = _mm_unpackhi_epi32(transpose0_0, transpose0_1);
- const __m128i transpose1_3 = _mm_unpackhi_epi32(transpose0_2, transpose0_3);
- // a00 a10 a20 a30 a01 a11 a21 a31
- // b00 b10 b20 b30 b01 b11 b21 b31
- // a02 a12 a22 a32 a03 a13 a23 a33
- // b02 b12 a22 b32 b03 b13 b23 b33
- T0 = _mm_unpacklo_epi64(transpose1_0, transpose1_1);
- T1 = _mm_unpackhi_epi64(transpose1_0, transpose1_1);
- T2 = _mm_unpacklo_epi64(transpose1_2, transpose1_3);
- T3 = _mm_unpackhi_epi64(transpose1_2, transpose1_3);
- // a00 a10 a20 a30 b00 b10 b20 b30
- // a01 a11 a21 a31 b01 b11 b21 b31
- // a02 a12 a22 a32 b02 b12 b22 b32
- // a03 a13 a23 a33 b03 b13 b23 b33
- }
-
- // Add inverse transform to 'ref' and store.
- {
- const __m128i zero = _mm_set1_epi16(0);
- // Load the reference(s).
- __m128i ref0, ref1, ref2, ref3;
- if (do_two) {
- // Load eight bytes/pixels per line.
- ref0 = _mm_loadl_epi64((__m128i*)&ref[0 * BPS]);
- ref1 = _mm_loadl_epi64((__m128i*)&ref[1 * BPS]);
- ref2 = _mm_loadl_epi64((__m128i*)&ref[2 * BPS]);
- ref3 = _mm_loadl_epi64((__m128i*)&ref[3 * BPS]);
- } else {
- // Load four bytes/pixels per line.
- ref0 = _mm_cvtsi32_si128(*(int*)&ref[0 * BPS]);
- ref1 = _mm_cvtsi32_si128(*(int*)&ref[1 * BPS]);
- ref2 = _mm_cvtsi32_si128(*(int*)&ref[2 * BPS]);
- ref3 = _mm_cvtsi32_si128(*(int*)&ref[3 * BPS]);
- }
- // Convert to 16b.
- ref0 = _mm_unpacklo_epi8(ref0, zero);
- ref1 = _mm_unpacklo_epi8(ref1, zero);
- ref2 = _mm_unpacklo_epi8(ref2, zero);
- ref3 = _mm_unpacklo_epi8(ref3, zero);
- // Add the inverse transform(s).
- ref0 = _mm_add_epi16(ref0, T0);
- ref1 = _mm_add_epi16(ref1, T1);
- ref2 = _mm_add_epi16(ref2, T2);
- ref3 = _mm_add_epi16(ref3, T3);
- // Unsigned saturate to 8b.
- ref0 = _mm_packus_epi16(ref0, ref0);
- ref1 = _mm_packus_epi16(ref1, ref1);
- ref2 = _mm_packus_epi16(ref2, ref2);
- ref3 = _mm_packus_epi16(ref3, ref3);
- // Store the results.
- if (do_two) {
- // Store eight bytes/pixels per line.
- _mm_storel_epi64((__m128i*)&dst[0 * BPS], ref0);
- _mm_storel_epi64((__m128i*)&dst[1 * BPS], ref1);
- _mm_storel_epi64((__m128i*)&dst[2 * BPS], ref2);
- _mm_storel_epi64((__m128i*)&dst[3 * BPS], ref3);
- } else {
- // Store four bytes/pixels per line.
- *((int32_t *)&dst[0 * BPS]) = _mm_cvtsi128_si32(ref0);
- *((int32_t *)&dst[1 * BPS]) = _mm_cvtsi128_si32(ref1);
- *((int32_t *)&dst[2 * BPS]) = _mm_cvtsi128_si32(ref2);
- *((int32_t *)&dst[3 * BPS]) = _mm_cvtsi128_si32(ref3);
- }
- }
-}
-
-static void FTransformSSE2(const uint8_t* src, const uint8_t* ref,
- int16_t* out) {
- const __m128i zero = _mm_setzero_si128();
- const __m128i seven = _mm_set1_epi16(7);
- const __m128i k7500 = _mm_set1_epi32(7500);
- const __m128i k14500 = _mm_set1_epi32(14500);
- const __m128i k51000 = _mm_set1_epi32(51000);
- const __m128i k12000_plus_one = _mm_set1_epi32(12000 + (1 << 16));
- const __m128i k5352_2217 = _mm_set_epi16(5352, 2217, 5352, 2217,
- 5352, 2217, 5352, 2217);
- const __m128i k2217_5352 = _mm_set_epi16(2217, -5352, 2217, -5352,
- 2217, -5352, 2217, -5352);
-
- __m128i v01, v32;
-
- // Difference between src and ref and initial transpose.
- {
- // Load src and convert to 16b.
- const __m128i src0 = _mm_loadl_epi64((__m128i*)&src[0 * BPS]);
- const __m128i src1 = _mm_loadl_epi64((__m128i*)&src[1 * BPS]);
- const __m128i src2 = _mm_loadl_epi64((__m128i*)&src[2 * BPS]);
- const __m128i src3 = _mm_loadl_epi64((__m128i*)&src[3 * BPS]);
- const __m128i src_0 = _mm_unpacklo_epi8(src0, zero);
- const __m128i src_1 = _mm_unpacklo_epi8(src1, zero);
- const __m128i src_2 = _mm_unpacklo_epi8(src2, zero);
- const __m128i src_3 = _mm_unpacklo_epi8(src3, zero);
- // Load ref and convert to 16b.
- const __m128i ref0 = _mm_loadl_epi64((__m128i*)&ref[0 * BPS]);
- const __m128i ref1 = _mm_loadl_epi64((__m128i*)&ref[1 * BPS]);
- const __m128i ref2 = _mm_loadl_epi64((__m128i*)&ref[2 * BPS]);
- const __m128i ref3 = _mm_loadl_epi64((__m128i*)&ref[3 * BPS]);
- const __m128i ref_0 = _mm_unpacklo_epi8(ref0, zero);
- const __m128i ref_1 = _mm_unpacklo_epi8(ref1, zero);
- const __m128i ref_2 = _mm_unpacklo_epi8(ref2, zero);
- const __m128i ref_3 = _mm_unpacklo_epi8(ref3, zero);
- // Compute difference.
- const __m128i diff0 = _mm_sub_epi16(src_0, ref_0);
- const __m128i diff1 = _mm_sub_epi16(src_1, ref_1);
- const __m128i diff2 = _mm_sub_epi16(src_2, ref_2);
- const __m128i diff3 = _mm_sub_epi16(src_3, ref_3);
-
- // Transpose.
- // 00 01 02 03 0 0 0 0
- // 10 11 12 13 0 0 0 0
- // 20 21 22 23 0 0 0 0
- // 30 31 32 33 0 0 0 0
- const __m128i transpose0_0 = _mm_unpacklo_epi16(diff0, diff1);
- const __m128i transpose0_1 = _mm_unpacklo_epi16(diff2, diff3);
- // 00 10 01 11 02 12 03 13
- // 20 30 21 31 22 32 23 33
- const __m128i v23 = _mm_unpackhi_epi32(transpose0_0, transpose0_1);
- v01 = _mm_unpacklo_epi32(transpose0_0, transpose0_1);
- v32 = _mm_shuffle_epi32(v23, _MM_SHUFFLE(1, 0, 3, 2));
- // a02 a12 a22 a32 a03 a13 a23 a33
- // a00 a10 a20 a30 a01 a11 a21 a31
- // a03 a13 a23 a33 a02 a12 a22 a32
- }
-
- // First pass and subsequent transpose.
- {
- // Same operations are done on the (0,3) and (1,2) pairs.
- // b0 = (a0 + a3) << 3
- // b1 = (a1 + a2) << 3
- // b3 = (a0 - a3) << 3
- // b2 = (a1 - a2) << 3
- const __m128i a01 = _mm_add_epi16(v01, v32);
- const __m128i a32 = _mm_sub_epi16(v01, v32);
- const __m128i b01 = _mm_slli_epi16(a01, 3);
- const __m128i b32 = _mm_slli_epi16(a32, 3);
- const __m128i b11 = _mm_unpackhi_epi64(b01, b01);
- const __m128i b22 = _mm_unpackhi_epi64(b32, b32);
-
- // e0 = b0 + b1
- // e2 = b0 - b1
- const __m128i e0 = _mm_add_epi16(b01, b11);
- const __m128i e2 = _mm_sub_epi16(b01, b11);
- const __m128i e02 = _mm_unpacklo_epi64(e0, e2);
-
- // e1 = (b3 * 5352 + b2 * 2217 + 14500) >> 12
- // e3 = (b3 * 2217 - b2 * 5352 + 7500) >> 12
- const __m128i b23 = _mm_unpacklo_epi16(b22, b32);
- const __m128i c1 = _mm_madd_epi16(b23, k5352_2217);
- const __m128i c3 = _mm_madd_epi16(b23, k2217_5352);
- const __m128i d1 = _mm_add_epi32(c1, k14500);
- const __m128i d3 = _mm_add_epi32(c3, k7500);
- const __m128i e1 = _mm_srai_epi32(d1, 12);
- const __m128i e3 = _mm_srai_epi32(d3, 12);
- const __m128i e13 = _mm_packs_epi32(e1, e3);
-
- // Transpose.
- // 00 01 02 03 20 21 22 23
- // 10 11 12 13 30 31 32 33
- const __m128i transpose0_0 = _mm_unpacklo_epi16(e02, e13);
- const __m128i transpose0_1 = _mm_unpackhi_epi16(e02, e13);
- // 00 10 01 11 02 12 03 13
- // 20 30 21 31 22 32 23 33
- const __m128i v23 = _mm_unpackhi_epi32(transpose0_0, transpose0_1);
- v01 = _mm_unpacklo_epi32(transpose0_0, transpose0_1);
- v32 = _mm_shuffle_epi32(v23, _MM_SHUFFLE(1, 0, 3, 2));
- // 02 12 22 32 03 13 23 33
- // 00 10 20 30 01 11 21 31
- // 03 13 23 33 02 12 22 32
- }
-
- // Second pass
- {
- // Same operations are done on the (0,3) and (1,2) pairs.
- // a0 = v0 + v3
- // a1 = v1 + v2
- // a3 = v0 - v3
- // a2 = v1 - v2
- const __m128i a01 = _mm_add_epi16(v01, v32);
- const __m128i a32 = _mm_sub_epi16(v01, v32);
- const __m128i a11 = _mm_unpackhi_epi64(a01, a01);
- const __m128i a22 = _mm_unpackhi_epi64(a32, a32);
-
- // d0 = (a0 + a1 + 7) >> 4;
- // d2 = (a0 - a1 + 7) >> 4;
- const __m128i b0 = _mm_add_epi16(a01, a11);
- const __m128i b2 = _mm_sub_epi16(a01, a11);
- const __m128i c0 = _mm_add_epi16(b0, seven);
- const __m128i c2 = _mm_add_epi16(b2, seven);
- const __m128i d0 = _mm_srai_epi16(c0, 4);
- const __m128i d2 = _mm_srai_epi16(c2, 4);
-
- // f1 = ((b3 * 5352 + b2 * 2217 + 12000) >> 16)
- // f3 = ((b3 * 2217 - b2 * 5352 + 51000) >> 16)
- const __m128i b23 = _mm_unpacklo_epi16(a22, a32);
- const __m128i c1 = _mm_madd_epi16(b23, k5352_2217);
- const __m128i c3 = _mm_madd_epi16(b23, k2217_5352);
- const __m128i d1 = _mm_add_epi32(c1, k12000_plus_one);
- const __m128i d3 = _mm_add_epi32(c3, k51000);
- const __m128i e1 = _mm_srai_epi32(d1, 16);
- const __m128i e3 = _mm_srai_epi32(d3, 16);
- const __m128i f1 = _mm_packs_epi32(e1, e1);
- const __m128i f3 = _mm_packs_epi32(e3, e3);
- // f1 = f1 + (a3 != 0);
- // The compare will return (0xffff, 0) for (==0, !=0). To turn that into the
- // desired (0, 1), we add one earlier through k12000_plus_one.
- const __m128i g1 = _mm_add_epi16(f1, _mm_cmpeq_epi16(a32, zero));
-
- _mm_storel_epi64((__m128i*)&out[ 0], d0);
- _mm_storel_epi64((__m128i*)&out[ 4], g1);
- _mm_storel_epi64((__m128i*)&out[ 8], d2);
- _mm_storel_epi64((__m128i*)&out[12], f3);
- }
-}
-
-//------------------------------------------------------------------------------
-// Metric
-
-static int SSE4x4SSE2(const uint8_t* a, const uint8_t* b) {
- const __m128i zero = _mm_set1_epi16(0);
-
- // Load values.
- const __m128i a0 = _mm_loadl_epi64((__m128i*)&a[BPS * 0]);
- const __m128i a1 = _mm_loadl_epi64((__m128i*)&a[BPS * 1]);
- const __m128i a2 = _mm_loadl_epi64((__m128i*)&a[BPS * 2]);
- const __m128i a3 = _mm_loadl_epi64((__m128i*)&a[BPS * 3]);
- const __m128i b0 = _mm_loadl_epi64((__m128i*)&b[BPS * 0]);
- const __m128i b1 = _mm_loadl_epi64((__m128i*)&b[BPS * 1]);
- const __m128i b2 = _mm_loadl_epi64((__m128i*)&b[BPS * 2]);
- const __m128i b3 = _mm_loadl_epi64((__m128i*)&b[BPS * 3]);
-
- // Combine pair of lines and convert to 16b.
- const __m128i a01 = _mm_unpacklo_epi32(a0, a1);
- const __m128i a23 = _mm_unpacklo_epi32(a2, a3);
- const __m128i b01 = _mm_unpacklo_epi32(b0, b1);
- const __m128i b23 = _mm_unpacklo_epi32(b2, b3);
- const __m128i a01s = _mm_unpacklo_epi8(a01, zero);
- const __m128i a23s = _mm_unpacklo_epi8(a23, zero);
- const __m128i b01s = _mm_unpacklo_epi8(b01, zero);
- const __m128i b23s = _mm_unpacklo_epi8(b23, zero);
-
- // Compute differences; (a-b)^2 = (abs(a-b))^2 = (sat8(a-b) + sat8(b-a))^2
- // TODO(cduvivier): Dissassemble and figure out why this is fastest. We don't
- // need absolute values, there is no need to do calculation
- // in 8bit as we are already in 16bit, ... Yet this is what
- // benchmarks the fastest!
- const __m128i d0 = _mm_subs_epu8(a01s, b01s);
- const __m128i d1 = _mm_subs_epu8(b01s, a01s);
- const __m128i d2 = _mm_subs_epu8(a23s, b23s);
- const __m128i d3 = _mm_subs_epu8(b23s, a23s);
-
- // Square and add them all together.
- const __m128i madd0 = _mm_madd_epi16(d0, d0);
- const __m128i madd1 = _mm_madd_epi16(d1, d1);
- const __m128i madd2 = _mm_madd_epi16(d2, d2);
- const __m128i madd3 = _mm_madd_epi16(d3, d3);
- const __m128i sum0 = _mm_add_epi32(madd0, madd1);
- const __m128i sum1 = _mm_add_epi32(madd2, madd3);
- const __m128i sum2 = _mm_add_epi32(sum0, sum1);
- int32_t tmp[4];
- _mm_storeu_si128((__m128i*)tmp, sum2);
- return (tmp[3] + tmp[2] + tmp[1] + tmp[0]);
-}
-
-//------------------------------------------------------------------------------
-// Texture distortion
-//
-// We try to match the spectral content (weighted) between source and
-// reconstructed samples.
-
-// Hadamard transform
-// Returns the difference between the weighted sum of the absolute value of
-// transformed coefficients.
-static int TTransformSSE2(const uint8_t* inA, const uint8_t* inB,
- const uint16_t* const w) {
- int32_t sum[4];
- __m128i tmp_0, tmp_1, tmp_2, tmp_3;
- const __m128i zero = _mm_setzero_si128();
- const __m128i one = _mm_set1_epi16(1);
- const __m128i three = _mm_set1_epi16(3);
-
- // Load, combine and tranpose inputs.
- {
- const __m128i inA_0 = _mm_loadl_epi64((__m128i*)&inA[BPS * 0]);
- const __m128i inA_1 = _mm_loadl_epi64((__m128i*)&inA[BPS * 1]);
- const __m128i inA_2 = _mm_loadl_epi64((__m128i*)&inA[BPS * 2]);
- const __m128i inA_3 = _mm_loadl_epi64((__m128i*)&inA[BPS * 3]);
- const __m128i inB_0 = _mm_loadl_epi64((__m128i*)&inB[BPS * 0]);
- const __m128i inB_1 = _mm_loadl_epi64((__m128i*)&inB[BPS * 1]);
- const __m128i inB_2 = _mm_loadl_epi64((__m128i*)&inB[BPS * 2]);
- const __m128i inB_3 = _mm_loadl_epi64((__m128i*)&inB[BPS * 3]);
-
- // Combine inA and inB (we'll do two transforms in parallel).
- const __m128i inAB_0 = _mm_unpacklo_epi8(inA_0, inB_0);
- const __m128i inAB_1 = _mm_unpacklo_epi8(inA_1, inB_1);
- const __m128i inAB_2 = _mm_unpacklo_epi8(inA_2, inB_2);
- const __m128i inAB_3 = _mm_unpacklo_epi8(inA_3, inB_3);
- // a00 b00 a01 b01 a02 b03 a03 b03 0 0 0 0 0 0 0 0
- // a10 b10 a11 b11 a12 b12 a13 b13 0 0 0 0 0 0 0 0
- // a20 b20 a21 b21 a22 b22 a23 b23 0 0 0 0 0 0 0 0
- // a30 b30 a31 b31 a32 b32 a33 b33 0 0 0 0 0 0 0 0
-
- // Transpose the two 4x4, discarding the filling zeroes.
- const __m128i transpose0_0 = _mm_unpacklo_epi8(inAB_0, inAB_2);
- const __m128i transpose0_1 = _mm_unpacklo_epi8(inAB_1, inAB_3);
- // a00 a20 b00 b20 a01 a21 b01 b21 a02 a22 b02 b22 a03 a23 b03 b23
- // a10 a30 b10 b30 a11 a31 b11 b31 a12 a32 b12 b32 a13 a33 b13 b33
- const __m128i transpose1_0 = _mm_unpacklo_epi8(transpose0_0, transpose0_1);
- const __m128i transpose1_1 = _mm_unpackhi_epi8(transpose0_0, transpose0_1);
- // a00 a10 a20 a30 b00 b10 b20 b30 a01 a11 a21 a31 b01 b11 b21 b31
- // a02 a12 a22 a32 b02 b12 b22 b32 a03 a13 a23 a33 b03 b13 b23 b33
-
- // Convert to 16b.
- tmp_0 = _mm_unpacklo_epi8(transpose1_0, zero);
- tmp_1 = _mm_unpackhi_epi8(transpose1_0, zero);
- tmp_2 = _mm_unpacklo_epi8(transpose1_1, zero);
- tmp_3 = _mm_unpackhi_epi8(transpose1_1, zero);
- // a00 a10 a20 a30 b00 b10 b20 b30
- // a01 a11 a21 a31 b01 b11 b21 b31
- // a02 a12 a22 a32 b02 b12 b22 b32
- // a03 a13 a23 a33 b03 b13 b23 b33
- }
-
- // Horizontal pass and subsequent transpose.
- {
- // Calculate a and b (two 4x4 at once).
- const __m128i a0 = _mm_slli_epi16(_mm_add_epi16(tmp_0, tmp_2), 2);
- const __m128i a1 = _mm_slli_epi16(_mm_add_epi16(tmp_1, tmp_3), 2);
- const __m128i a2 = _mm_slli_epi16(_mm_sub_epi16(tmp_1, tmp_3), 2);
- const __m128i a3 = _mm_slli_epi16(_mm_sub_epi16(tmp_0, tmp_2), 2);
- // b0_extra = (a0 != 0);
- const __m128i b0_extra = _mm_andnot_si128(_mm_cmpeq_epi16 (a0, zero), one);
- const __m128i b0_base = _mm_add_epi16(a0, a1);
- const __m128i b1 = _mm_add_epi16(a3, a2);
- const __m128i b2 = _mm_sub_epi16(a3, a2);
- const __m128i b3 = _mm_sub_epi16(a0, a1);
- const __m128i b0 = _mm_add_epi16(b0_base, b0_extra);
- // a00 a01 a02 a03 b00 b01 b02 b03
- // a10 a11 a12 a13 b10 b11 b12 b13
- // a20 a21 a22 a23 b20 b21 b22 b23
- // a30 a31 a32 a33 b30 b31 b32 b33
-
- // Transpose the two 4x4.
- const __m128i transpose0_0 = _mm_unpacklo_epi16(b0, b1);
- const __m128i transpose0_1 = _mm_unpacklo_epi16(b2, b3);
- const __m128i transpose0_2 = _mm_unpackhi_epi16(b0, b1);
- const __m128i transpose0_3 = _mm_unpackhi_epi16(b2, b3);
- // a00 a10 a01 a11 a02 a12 a03 a13
- // a20 a30 a21 a31 a22 a32 a23 a33
- // b00 b10 b01 b11 b02 b12 b03 b13
- // b20 b30 b21 b31 b22 b32 b23 b33
- const __m128i transpose1_0 = _mm_unpacklo_epi32(transpose0_0, transpose0_1);
- const __m128i transpose1_1 = _mm_unpacklo_epi32(transpose0_2, transpose0_3);
- const __m128i transpose1_2 = _mm_unpackhi_epi32(transpose0_0, transpose0_1);
- const __m128i transpose1_3 = _mm_unpackhi_epi32(transpose0_2, transpose0_3);
- // a00 a10 a20 a30 a01 a11 a21 a31
- // b00 b10 b20 b30 b01 b11 b21 b31
- // a02 a12 a22 a32 a03 a13 a23 a33
- // b02 b12 a22 b32 b03 b13 b23 b33
- tmp_0 = _mm_unpacklo_epi64(transpose1_0, transpose1_1);
- tmp_1 = _mm_unpackhi_epi64(transpose1_0, transpose1_1);
- tmp_2 = _mm_unpacklo_epi64(transpose1_2, transpose1_3);
- tmp_3 = _mm_unpackhi_epi64(transpose1_2, transpose1_3);
- // a00 a10 a20 a30 b00 b10 b20 b30
- // a01 a11 a21 a31 b01 b11 b21 b31
- // a02 a12 a22 a32 b02 b12 b22 b32
- // a03 a13 a23 a33 b03 b13 b23 b33
- }
-
- // Vertical pass and difference of weighted sums.
- {
- // Load all inputs.
- // TODO(cduvivier): Make variable declarations and allocations aligned so
- // we can use _mm_load_si128 instead of _mm_loadu_si128.
- const __m128i w_0 = _mm_loadu_si128((__m128i*)&w[0]);
- const __m128i w_8 = _mm_loadu_si128((__m128i*)&w[8]);
-
- // Calculate a and b (two 4x4 at once).
- const __m128i a0 = _mm_add_epi16(tmp_0, tmp_2);
- const __m128i a1 = _mm_add_epi16(tmp_1, tmp_3);
- const __m128i a2 = _mm_sub_epi16(tmp_1, tmp_3);
- const __m128i a3 = _mm_sub_epi16(tmp_0, tmp_2);
- const __m128i b0 = _mm_add_epi16(a0, a1);
- const __m128i b1 = _mm_add_epi16(a3, a2);
- const __m128i b2 = _mm_sub_epi16(a3, a2);
- const __m128i b3 = _mm_sub_epi16(a0, a1);
-
- // Separate the transforms of inA and inB.
- __m128i A_b0 = _mm_unpacklo_epi64(b0, b1);
- __m128i A_b2 = _mm_unpacklo_epi64(b2, b3);
- __m128i B_b0 = _mm_unpackhi_epi64(b0, b1);
- __m128i B_b2 = _mm_unpackhi_epi64(b2, b3);
-
- {
- // sign(b) = b >> 15 (0x0000 if positive, 0xffff if negative)
- const __m128i sign_A_b0 = _mm_srai_epi16(A_b0, 15);
- const __m128i sign_A_b2 = _mm_srai_epi16(A_b2, 15);
- const __m128i sign_B_b0 = _mm_srai_epi16(B_b0, 15);
- const __m128i sign_B_b2 = _mm_srai_epi16(B_b2, 15);
-
- // b = abs(b) = (b ^ sign) - sign
- A_b0 = _mm_xor_si128(A_b0, sign_A_b0);
- A_b2 = _mm_xor_si128(A_b2, sign_A_b2);
- B_b0 = _mm_xor_si128(B_b0, sign_B_b0);
- B_b2 = _mm_xor_si128(B_b2, sign_B_b2);
- A_b0 = _mm_sub_epi16(A_b0, sign_A_b0);
- A_b2 = _mm_sub_epi16(A_b2, sign_A_b2);
- B_b0 = _mm_sub_epi16(B_b0, sign_B_b0);
- B_b2 = _mm_sub_epi16(B_b2, sign_B_b2);
- }
-
- // b = abs(b) + 3
- A_b0 = _mm_add_epi16(A_b0, three);
- A_b2 = _mm_add_epi16(A_b2, three);
- B_b0 = _mm_add_epi16(B_b0, three);
- B_b2 = _mm_add_epi16(B_b2, three);
-
- // abs((b + (b<0) + 3) >> 3) = (abs(b) + 3) >> 3
- // b = (abs(b) + 3) >> 3
- A_b0 = _mm_srai_epi16(A_b0, 3);
- A_b2 = _mm_srai_epi16(A_b2, 3);
- B_b0 = _mm_srai_epi16(B_b0, 3);
- B_b2 = _mm_srai_epi16(B_b2, 3);
-
- // weighted sums
- A_b0 = _mm_madd_epi16(A_b0, w_0);
- A_b2 = _mm_madd_epi16(A_b2, w_8);
- B_b0 = _mm_madd_epi16(B_b0, w_0);
- B_b2 = _mm_madd_epi16(B_b2, w_8);
- A_b0 = _mm_add_epi32(A_b0, A_b2);
- B_b0 = _mm_add_epi32(B_b0, B_b2);
-
- // difference of weighted sums
- A_b0 = _mm_sub_epi32(A_b0, B_b0);
- _mm_storeu_si128((__m128i*)&sum[0], A_b0);
- }
- return sum[0] + sum[1] + sum[2] + sum[3];
-}
-
-static int Disto4x4SSE2(const uint8_t* const a, const uint8_t* const b,
- const uint16_t* const w) {
- const int diff_sum = TTransformSSE2(a, b, w);
- return (abs(diff_sum) + 8) >> 4;
-}
-
-static int Disto16x16SSE2(const uint8_t* const a, const uint8_t* const b,
- const uint16_t* const w) {
- int D = 0;
- int x, y;
- for (y = 0; y < 16 * BPS; y += 4 * BPS) {
- for (x = 0; x < 16; x += 4) {
- D += Disto4x4SSE2(a + x + y, b + x + y, w);
- }
- }
- return D;
-}
-
-
-//------------------------------------------------------------------------------
-// Quantization
-//
-
-// Simple quantization
-static int QuantizeBlockSSE2(int16_t in[16], int16_t out[16],
- int n, const VP8Matrix* const mtx) {
- const __m128i max_coeff_2047 = _mm_set1_epi16(2047);
- const __m128i zero = _mm_set1_epi16(0);
- __m128i sign0, sign8;
- __m128i coeff0, coeff8;
- __m128i out0, out8;
- __m128i packed_out;
-
- // Load all inputs.
- // TODO(cduvivier): Make variable declarations and allocations aligned so that
- // we can use _mm_load_si128 instead of _mm_loadu_si128.
- __m128i in0 = _mm_loadu_si128((__m128i*)&in[0]);
- __m128i in8 = _mm_loadu_si128((__m128i*)&in[8]);
- const __m128i sharpen0 = _mm_loadu_si128((__m128i*)&mtx->sharpen_[0]);
- const __m128i sharpen8 = _mm_loadu_si128((__m128i*)&mtx->sharpen_[8]);
- const __m128i iq0 = _mm_loadu_si128((__m128i*)&mtx->iq_[0]);
- const __m128i iq8 = _mm_loadu_si128((__m128i*)&mtx->iq_[8]);
- const __m128i bias0 = _mm_loadu_si128((__m128i*)&mtx->bias_[0]);
- const __m128i bias8 = _mm_loadu_si128((__m128i*)&mtx->bias_[8]);
- const __m128i q0 = _mm_loadu_si128((__m128i*)&mtx->q_[0]);
- const __m128i q8 = _mm_loadu_si128((__m128i*)&mtx->q_[8]);
- const __m128i zthresh0 = _mm_loadu_si128((__m128i*)&mtx->zthresh_[0]);
- const __m128i zthresh8 = _mm_loadu_si128((__m128i*)&mtx->zthresh_[8]);
-
- // sign(in) = in >> 15 (0x0000 if positive, 0xffff if negative)
- sign0 = _mm_srai_epi16(in0, 15);
- sign8 = _mm_srai_epi16(in8, 15);
-
- // coeff = abs(in) = (in ^ sign) - sign
- coeff0 = _mm_xor_si128(in0, sign0);
- coeff8 = _mm_xor_si128(in8, sign8);
- coeff0 = _mm_sub_epi16(coeff0, sign0);
- coeff8 = _mm_sub_epi16(coeff8, sign8);
-
- // coeff = abs(in) + sharpen
- coeff0 = _mm_add_epi16(coeff0, sharpen0);
- coeff8 = _mm_add_epi16(coeff8, sharpen8);
-
- // if (coeff > 2047) coeff = 2047
- coeff0 = _mm_min_epi16(coeff0, max_coeff_2047);
- coeff8 = _mm_min_epi16(coeff8, max_coeff_2047);
-
- // out = (coeff * iQ + B) >> QFIX;
- {
- // doing calculations with 32b precision (QFIX=17)
- // out = (coeff * iQ)
- __m128i coeff_iQ0H = _mm_mulhi_epu16(coeff0, iq0);
- __m128i coeff_iQ0L = _mm_mullo_epi16(coeff0, iq0);
- __m128i coeff_iQ8H = _mm_mulhi_epu16(coeff8, iq8);
- __m128i coeff_iQ8L = _mm_mullo_epi16(coeff8, iq8);
- __m128i out_00 = _mm_unpacklo_epi16(coeff_iQ0L, coeff_iQ0H);
- __m128i out_04 = _mm_unpackhi_epi16(coeff_iQ0L, coeff_iQ0H);
- __m128i out_08 = _mm_unpacklo_epi16(coeff_iQ8L, coeff_iQ8H);
- __m128i out_12 = _mm_unpackhi_epi16(coeff_iQ8L, coeff_iQ8H);
- // expand bias from 16b to 32b
- __m128i bias_00 = _mm_unpacklo_epi16(bias0, zero);
- __m128i bias_04 = _mm_unpackhi_epi16(bias0, zero);
- __m128i bias_08 = _mm_unpacklo_epi16(bias8, zero);
- __m128i bias_12 = _mm_unpackhi_epi16(bias8, zero);
- // out = (coeff * iQ + B)
- out_00 = _mm_add_epi32(out_00, bias_00);
- out_04 = _mm_add_epi32(out_04, bias_04);
- out_08 = _mm_add_epi32(out_08, bias_08);
- out_12 = _mm_add_epi32(out_12, bias_12);
- // out = (coeff * iQ + B) >> QFIX;
- out_00 = _mm_srai_epi32(out_00, QFIX);
- out_04 = _mm_srai_epi32(out_04, QFIX);
- out_08 = _mm_srai_epi32(out_08, QFIX);
- out_12 = _mm_srai_epi32(out_12, QFIX);
- // pack result as 16b
- out0 = _mm_packs_epi32(out_00, out_04);
- out8 = _mm_packs_epi32(out_08, out_12);
- }
-
- // get sign back (if (sign[j]) out_n = -out_n)
- out0 = _mm_xor_si128(out0, sign0);
- out8 = _mm_xor_si128(out8, sign8);
- out0 = _mm_sub_epi16(out0, sign0);
- out8 = _mm_sub_epi16(out8, sign8);
-
- // in = out * Q
- in0 = _mm_mullo_epi16(out0, q0);
- in8 = _mm_mullo_epi16(out8, q8);
-
- // if (coeff <= mtx->zthresh_) {in=0; out=0;}
- {
- __m128i cmp0 = _mm_cmpgt_epi16(coeff0, zthresh0);
- __m128i cmp8 = _mm_cmpgt_epi16(coeff8, zthresh8);
- in0 = _mm_and_si128(in0, cmp0);
- in8 = _mm_and_si128(in8, cmp8);
- _mm_storeu_si128((__m128i*)&in[0], in0);
- _mm_storeu_si128((__m128i*)&in[8], in8);
- out0 = _mm_and_si128(out0, cmp0);
- out8 = _mm_and_si128(out8, cmp8);
- }
-
- // zigzag the output before storing it.
- //
- // The zigzag pattern can almost be reproduced with a small sequence of
- // shuffles. After it, we only need to swap the 7th (ending up in third
- // position instead of twelfth) and 8th values.
- {
- __m128i outZ0, outZ8;
- outZ0 = _mm_shufflehi_epi16(out0, _MM_SHUFFLE(2, 1, 3, 0));
- outZ0 = _mm_shuffle_epi32 (outZ0, _MM_SHUFFLE(3, 1, 2, 0));
- outZ0 = _mm_shufflehi_epi16(outZ0, _MM_SHUFFLE(3, 1, 0, 2));
- outZ8 = _mm_shufflelo_epi16(out8, _MM_SHUFFLE(3, 0, 2, 1));
- outZ8 = _mm_shuffle_epi32 (outZ8, _MM_SHUFFLE(3, 1, 2, 0));
- outZ8 = _mm_shufflelo_epi16(outZ8, _MM_SHUFFLE(1, 3, 2, 0));
- _mm_storeu_si128((__m128i*)&out[0], outZ0);
- _mm_storeu_si128((__m128i*)&out[8], outZ8);
- packed_out = _mm_packs_epi16(outZ0, outZ8);
- }
- {
- const int16_t outZ_12 = out[12];
- const int16_t outZ_3 = out[3];
- out[3] = outZ_12;
- out[12] = outZ_3;
- }
-
- // detect if all 'out' values are zeroes or not
- {
- int32_t tmp[4];
- _mm_storeu_si128((__m128i*)tmp, packed_out);
- if (n) {
- tmp[0] &= ~0xff;
- }
- return (tmp[3] || tmp[2] || tmp[1] || tmp[0]);
- }
-}
-
-extern void VP8EncDspInitSSE2(void);
-void VP8EncDspInitSSE2(void) {
- VP8CollectHistogram = CollectHistogramSSE2;
- VP8EncQuantizeBlock = QuantizeBlockSSE2;
- VP8ITransform = ITransformSSE2;
- VP8FTransform = FTransformSSE2;
- VP8SSE4x4 = SSE4x4SSE2;
- VP8TDisto4x4 = Disto4x4SSE2;
- VP8TDisto16x16 = Disto16x16SSE2;
-}
-
-#if defined(__cplusplus) || defined(c_plusplus)
-} // extern "C"
-#endif
-
-#endif // WEBP_USE_SSE2
diff --git a/drivers/webpold/dsp/lossless.c b/drivers/webpold/dsp/lossless.c
deleted file mode 100644
index 62a6b7b15a..0000000000
--- a/drivers/webpold/dsp/lossless.c
+++ /dev/null
@@ -1,1138 +0,0 @@
-// Copyright 2012 Google Inc. All Rights Reserved.
-//
-// This code is licensed under the same terms as WebM:
-// Software License Agreement: http://www.webmproject.org/license/software/
-// Additional IP Rights Grant: http://www.webmproject.org/license/additional/
-// -----------------------------------------------------------------------------
-//
-// Image transforms and color space conversion methods for lossless decoder.
-//
-// Authors: Vikas Arora (vikaas.arora@gmail.com)
-// Jyrki Alakuijala (jyrki@google.com)
-// Urvang Joshi (urvang@google.com)
-
-#if defined(__cplusplus) || defined(c_plusplus)
-extern "C" {
-#endif
-
-#include <math.h>
-#include <stdlib.h>
-#include "./lossless.h"
-#include "../dec/vp8li.h"
-#include "../dsp/yuv.h"
-#include "../dsp/dsp.h"
-#include "../enc/histogram.h"
-
-#define MAX_DIFF_COST (1e30f)
-
-// lookup table for small values of log2(int)
-#define APPROX_LOG_MAX 4096
-#define LOG_2_RECIPROCAL 1.44269504088896338700465094007086
-#define LOG_LOOKUP_IDX_MAX 256
-static const float kLog2Table[LOG_LOOKUP_IDX_MAX] = {
- 0.0000000000000000f, 0.0000000000000000f,
- 1.0000000000000000f, 1.5849625007211560f,
- 2.0000000000000000f, 2.3219280948873621f,
- 2.5849625007211560f, 2.8073549220576041f,
- 3.0000000000000000f, 3.1699250014423121f,
- 3.3219280948873621f, 3.4594316186372973f,
- 3.5849625007211560f, 3.7004397181410921f,
- 3.8073549220576041f, 3.9068905956085187f,
- 4.0000000000000000f, 4.0874628412503390f,
- 4.1699250014423121f, 4.2479275134435852f,
- 4.3219280948873626f, 4.3923174227787606f,
- 4.4594316186372973f, 4.5235619560570130f,
- 4.5849625007211560f, 4.6438561897747243f,
- 4.7004397181410917f, 4.7548875021634682f,
- 4.8073549220576037f, 4.8579809951275718f,
- 4.9068905956085187f, 4.9541963103868749f,
- 5.0000000000000000f, 5.0443941193584533f,
- 5.0874628412503390f, 5.1292830169449663f,
- 5.1699250014423121f, 5.2094533656289501f,
- 5.2479275134435852f, 5.2854022188622487f,
- 5.3219280948873626f, 5.3575520046180837f,
- 5.3923174227787606f, 5.4262647547020979f,
- 5.4594316186372973f, 5.4918530963296747f,
- 5.5235619560570130f, 5.5545888516776376f,
- 5.5849625007211560f, 5.6147098441152083f,
- 5.6438561897747243f, 5.6724253419714951f,
- 5.7004397181410917f, 5.7279204545631987f,
- 5.7548875021634682f, 5.7813597135246599f,
- 5.8073549220576037f, 5.8328900141647412f,
- 5.8579809951275718f, 5.8826430493618415f,
- 5.9068905956085187f, 5.9307373375628866f,
- 5.9541963103868749f, 5.9772799234999167f,
- 6.0000000000000000f, 6.0223678130284543f,
- 6.0443941193584533f, 6.0660891904577720f,
- 6.0874628412503390f, 6.1085244567781691f,
- 6.1292830169449663f, 6.1497471195046822f,
- 6.1699250014423121f, 6.1898245588800175f,
- 6.2094533656289501f, 6.2288186904958804f,
- 6.2479275134435852f, 6.2667865406949010f,
- 6.2854022188622487f, 6.3037807481771030f,
- 6.3219280948873626f, 6.3398500028846243f,
- 6.3575520046180837f, 6.3750394313469245f,
- 6.3923174227787606f, 6.4093909361377017f,
- 6.4262647547020979f, 6.4429434958487279f,
- 6.4594316186372973f, 6.4757334309663976f,
- 6.4918530963296747f, 6.5077946401986963f,
- 6.5235619560570130f, 6.5391588111080309f,
- 6.5545888516776376f, 6.5698556083309478f,
- 6.5849625007211560f, 6.5999128421871278f,
- 6.6147098441152083f, 6.6293566200796094f,
- 6.6438561897747243f, 6.6582114827517946f,
- 6.6724253419714951f, 6.6865005271832185f,
- 6.7004397181410917f, 6.7142455176661224f,
- 6.7279204545631987f, 6.7414669864011464f,
- 6.7548875021634682f, 6.7681843247769259f,
- 6.7813597135246599f, 6.7944158663501061f,
- 6.8073549220576037f, 6.8201789624151878f,
- 6.8328900141647412f, 6.8454900509443747f,
- 6.8579809951275718f, 6.8703647195834047f,
- 6.8826430493618415f, 6.8948177633079437f,
- 6.9068905956085187f, 6.9188632372745946f,
- 6.9307373375628866f, 6.9425145053392398f,
- 6.9541963103868749f, 6.9657842846620869f,
- 6.9772799234999167f, 6.9886846867721654f,
- 7.0000000000000000f, 7.0112272554232539f,
- 7.0223678130284543f, 7.0334230015374501f,
- 7.0443941193584533f, 7.0552824355011898f,
- 7.0660891904577720f, 7.0768155970508308f,
- 7.0874628412503390f, 7.0980320829605263f,
- 7.1085244567781691f, 7.1189410727235076f,
- 7.1292830169449663f, 7.1395513523987936f,
- 7.1497471195046822f, 7.1598713367783890f,
- 7.1699250014423121f, 7.1799090900149344f,
- 7.1898245588800175f, 7.1996723448363644f,
- 7.2094533656289501f, 7.2191685204621611f,
- 7.2288186904958804f, 7.2384047393250785f,
- 7.2479275134435852f, 7.2573878426926521f,
- 7.2667865406949010f, 7.2761244052742375f,
- 7.2854022188622487f, 7.2946207488916270f,
- 7.3037807481771030f, 7.3128829552843557f,
- 7.3219280948873626f, 7.3309168781146167f,
- 7.3398500028846243f, 7.3487281542310771f,
- 7.3575520046180837f, 7.3663222142458160f,
- 7.3750394313469245f, 7.3837042924740519f,
- 7.3923174227787606f, 7.4008794362821843f,
- 7.4093909361377017f, 7.4178525148858982f,
- 7.4262647547020979f, 7.4346282276367245f,
- 7.4429434958487279f, 7.4512111118323289f,
- 7.4594316186372973f, 7.4676055500829976f,
- 7.4757334309663976f, 7.4838157772642563f,
- 7.4918530963296747f, 7.4998458870832056f,
- 7.5077946401986963f, 7.5156998382840427f,
- 7.5235619560570130f, 7.5313814605163118f,
- 7.5391588111080309f, 7.5468944598876364f,
- 7.5545888516776376f, 7.5622424242210728f,
- 7.5698556083309478f, 7.5774288280357486f,
- 7.5849625007211560f, 7.5924570372680806f,
- 7.5999128421871278f, 7.6073303137496104f,
- 7.6147098441152083f, 7.6220518194563764f,
- 7.6293566200796094f, 7.6366246205436487f,
- 7.6438561897747243f, 7.6510516911789281f,
- 7.6582114827517946f, 7.6653359171851764f,
- 7.6724253419714951f, 7.6794800995054464f,
- 7.6865005271832185f, 7.6934869574993252f,
- 7.7004397181410917f, 7.7073591320808825f,
- 7.7142455176661224f, 7.7210991887071855f,
- 7.7279204545631987f, 7.7347096202258383f,
- 7.7414669864011464f, 7.7481928495894605f,
- 7.7548875021634682f, 7.7615512324444795f,
- 7.7681843247769259f, 7.7747870596011736f,
- 7.7813597135246599f, 7.7879025593914317f,
- 7.7944158663501061f, 7.8008998999203047f,
- 7.8073549220576037f, 7.8137811912170374f,
- 7.8201789624151878f, 7.8265484872909150f,
- 7.8328900141647412f, 7.8392037880969436f,
- 7.8454900509443747f, 7.8517490414160571f,
- 7.8579809951275718f, 7.8641861446542797f,
- 7.8703647195834047f, 7.8765169465649993f,
- 7.8826430493618415f, 7.8887432488982591f,
- 7.8948177633079437f, 7.9008668079807486f,
- 7.9068905956085187f, 7.9128893362299619f,
- 7.9188632372745946f, 7.9248125036057812f,
- 7.9307373375628866f, 7.9366379390025709f,
- 7.9425145053392398f, 7.9483672315846778f,
- 7.9541963103868749f, 7.9600019320680805f,
- 7.9657842846620869f, 7.9715435539507719f,
- 7.9772799234999167f, 7.9829935746943103f,
- 7.9886846867721654f, 7.9943534368588577f
-};
-
-float VP8LFastLog2(int v) {
- if (v < LOG_LOOKUP_IDX_MAX) {
- return kLog2Table[v];
- } else if (v < APPROX_LOG_MAX) {
- int log_cnt = 0;
- while (v >= LOG_LOOKUP_IDX_MAX) {
- ++log_cnt;
- v = v >> 1;
- }
- return kLog2Table[v] + (float)log_cnt;
- } else {
- return (float)(LOG_2_RECIPROCAL * log((double)v));
- }
-}
-
-//------------------------------------------------------------------------------
-// Image transforms.
-
-// In-place sum of each component with mod 256.
-static WEBP_INLINE void AddPixelsEq(uint32_t* a, uint32_t b) {
- const uint32_t alpha_and_green = (*a & 0xff00ff00u) + (b & 0xff00ff00u);
- const uint32_t red_and_blue = (*a & 0x00ff00ffu) + (b & 0x00ff00ffu);
- *a = (alpha_and_green & 0xff00ff00u) | (red_and_blue & 0x00ff00ffu);
-}
-
-static WEBP_INLINE uint32_t Average2(uint32_t a0, uint32_t a1) {
- return (((a0 ^ a1) & 0xfefefefeL) >> 1) + (a0 & a1);
-}
-
-static WEBP_INLINE uint32_t Average3(uint32_t a0, uint32_t a1, uint32_t a2) {
- return Average2(Average2(a0, a2), a1);
-}
-
-static WEBP_INLINE uint32_t Average4(uint32_t a0, uint32_t a1,
- uint32_t a2, uint32_t a3) {
- return Average2(Average2(a0, a1), Average2(a2, a3));
-}
-
-static WEBP_INLINE uint32_t Clip255(uint32_t a) {
- if (a < 256) {
- return a;
- }
- // return 0, when a is a negative integer.
- // return 255, when a is positive.
- return ~a >> 24;
-}
-
-static WEBP_INLINE int AddSubtractComponentFull(int a, int b, int c) {
- return Clip255(a + b - c);
-}
-
-static WEBP_INLINE uint32_t ClampedAddSubtractFull(uint32_t c0, uint32_t c1,
- uint32_t c2) {
- const int a = AddSubtractComponentFull(c0 >> 24, c1 >> 24, c2 >> 24);
- const int r = AddSubtractComponentFull((c0 >> 16) & 0xff,
- (c1 >> 16) & 0xff,
- (c2 >> 16) & 0xff);
- const int g = AddSubtractComponentFull((c0 >> 8) & 0xff,
- (c1 >> 8) & 0xff,
- (c2 >> 8) & 0xff);
- const int b = AddSubtractComponentFull(c0 & 0xff, c1 & 0xff, c2 & 0xff);
- return (a << 24) | (r << 16) | (g << 8) | b;
-}
-
-static WEBP_INLINE int AddSubtractComponentHalf(int a, int b) {
- return Clip255(a + (a - b) / 2);
-}
-
-static WEBP_INLINE uint32_t ClampedAddSubtractHalf(uint32_t c0, uint32_t c1,
- uint32_t c2) {
- const uint32_t ave = Average2(c0, c1);
- const int a = AddSubtractComponentHalf(ave >> 24, c2 >> 24);
- const int r = AddSubtractComponentHalf((ave >> 16) & 0xff, (c2 >> 16) & 0xff);
- const int g = AddSubtractComponentHalf((ave >> 8) & 0xff, (c2 >> 8) & 0xff);
- const int b = AddSubtractComponentHalf((ave >> 0) & 0xff, (c2 >> 0) & 0xff);
- return (a << 24) | (r << 16) | (g << 8) | b;
-}
-
-static WEBP_INLINE int Sub3(int a, int b, int c) {
- const int pa = b - c;
- const int pb = a - c;
- return abs(pa) - abs(pb);
-}
-
-static WEBP_INLINE uint32_t Select(uint32_t a, uint32_t b, uint32_t c) {
- const int pa_minus_pb =
- Sub3((a >> 24) , (b >> 24) , (c >> 24) ) +
- Sub3((a >> 16) & 0xff, (b >> 16) & 0xff, (c >> 16) & 0xff) +
- Sub3((a >> 8) & 0xff, (b >> 8) & 0xff, (c >> 8) & 0xff) +
- Sub3((a ) & 0xff, (b ) & 0xff, (c ) & 0xff);
-
- return (pa_minus_pb <= 0) ? a : b;
-}
-
-//------------------------------------------------------------------------------
-// Predictors
-
-static uint32_t Predictor0(uint32_t left, const uint32_t* const top) {
- (void)top;
- (void)left;
- return ARGB_BLACK;
-}
-static uint32_t Predictor1(uint32_t left, const uint32_t* const top) {
- (void)top;
- return left;
-}
-static uint32_t Predictor2(uint32_t left, const uint32_t* const top) {
- (void)left;
- return top[0];
-}
-static uint32_t Predictor3(uint32_t left, const uint32_t* const top) {
- (void)left;
- return top[1];
-}
-static uint32_t Predictor4(uint32_t left, const uint32_t* const top) {
- (void)left;
- return top[-1];
-}
-static uint32_t Predictor5(uint32_t left, const uint32_t* const top) {
- const uint32_t pred = Average3(left, top[0], top[1]);
- return pred;
-}
-static uint32_t Predictor6(uint32_t left, const uint32_t* const top) {
- const uint32_t pred = Average2(left, top[-1]);
- return pred;
-}
-static uint32_t Predictor7(uint32_t left, const uint32_t* const top) {
- const uint32_t pred = Average2(left, top[0]);
- return pred;
-}
-static uint32_t Predictor8(uint32_t left, const uint32_t* const top) {
- const uint32_t pred = Average2(top[-1], top[0]);
- (void)left;
- return pred;
-}
-static uint32_t Predictor9(uint32_t left, const uint32_t* const top) {
- const uint32_t pred = Average2(top[0], top[1]);
- (void)left;
- return pred;
-}
-static uint32_t Predictor10(uint32_t left, const uint32_t* const top) {
- const uint32_t pred = Average4(left, top[-1], top[0], top[1]);
- return pred;
-}
-static uint32_t Predictor11(uint32_t left, const uint32_t* const top) {
- const uint32_t pred = Select(top[0], left, top[-1]);
- return pred;
-}
-static uint32_t Predictor12(uint32_t left, const uint32_t* const top) {
- const uint32_t pred = ClampedAddSubtractFull(left, top[0], top[-1]);
- return pred;
-}
-static uint32_t Predictor13(uint32_t left, const uint32_t* const top) {
- const uint32_t pred = ClampedAddSubtractHalf(left, top[0], top[-1]);
- return pred;
-}
-
-typedef uint32_t (*PredictorFunc)(uint32_t left, const uint32_t* const top);
-static const PredictorFunc kPredictors[16] = {
- Predictor0, Predictor1, Predictor2, Predictor3,
- Predictor4, Predictor5, Predictor6, Predictor7,
- Predictor8, Predictor9, Predictor10, Predictor11,
- Predictor12, Predictor13,
- Predictor0, Predictor0 // <- padding security sentinels
-};
-
-// TODO(vikasa): Replace 256 etc with defines.
-static float PredictionCostSpatial(const int* counts,
- int weight_0, double exp_val) {
- const int significant_symbols = 16;
- const double exp_decay_factor = 0.6;
- double bits = weight_0 * counts[0];
- int i;
- for (i = 1; i < significant_symbols; ++i) {
- bits += exp_val * (counts[i] + counts[256 - i]);
- exp_val *= exp_decay_factor;
- }
- return (float)(-0.1 * bits);
-}
-
-// Compute the Shanon's entropy: Sum(p*log2(p))
-static float ShannonEntropy(const int* const array, int n) {
- int i;
- float retval = 0.f;
- int sum = 0;
- for (i = 0; i < n; ++i) {
- if (array[i] != 0) {
- sum += array[i];
- retval -= VP8LFastSLog2(array[i]);
- }
- }
- retval += VP8LFastSLog2(sum);
- return retval;
-}
-
-static float PredictionCostSpatialHistogram(int accumulated[4][256],
- int tile[4][256]) {
- int i;
- int k;
- int combo[256];
- double retval = 0;
- for (i = 0; i < 4; ++i) {
- const double exp_val = 0.94;
- retval += PredictionCostSpatial(&tile[i][0], 1, exp_val);
- retval += ShannonEntropy(&tile[i][0], 256);
- for (k = 0; k < 256; ++k) {
- combo[k] = accumulated[i][k] + tile[i][k];
- }
- retval += ShannonEntropy(&combo[0], 256);
- }
- return (float)retval;
-}
-
-static int GetBestPredictorForTile(int width, int height,
- int tile_x, int tile_y, int bits,
- int accumulated[4][256],
- const uint32_t* const argb_scratch) {
- const int kNumPredModes = 14;
- const int col_start = tile_x << bits;
- const int row_start = tile_y << bits;
- const int tile_size = 1 << bits;
- const int ymax = (tile_size <= height - row_start) ?
- tile_size : height - row_start;
- const int xmax = (tile_size <= width - col_start) ?
- tile_size : width - col_start;
- int histo[4][256];
- float best_diff = MAX_DIFF_COST;
- int best_mode = 0;
-
- int mode;
- for (mode = 0; mode < kNumPredModes; ++mode) {
- const uint32_t* current_row = argb_scratch;
- const PredictorFunc pred_func = kPredictors[mode];
- float cur_diff;
- int y;
- memset(&histo[0][0], 0, sizeof(histo));
- for (y = 0; y < ymax; ++y) {
- int x;
- const int row = row_start + y;
- const uint32_t* const upper_row = current_row;
- current_row = upper_row + width;
- for (x = 0; x < xmax; ++x) {
- const int col = col_start + x;
- uint32_t predict;
- uint32_t predict_diff;
- if (row == 0) {
- predict = (col == 0) ? ARGB_BLACK : current_row[col - 1]; // Left.
- } else if (col == 0) {
- predict = upper_row[col]; // Top.
- } else {
- predict = pred_func(current_row[col - 1], upper_row + col);
- }
- predict_diff = VP8LSubPixels(current_row[col], predict);
- ++histo[0][predict_diff >> 24];
- ++histo[1][((predict_diff >> 16) & 0xff)];
- ++histo[2][((predict_diff >> 8) & 0xff)];
- ++histo[3][(predict_diff & 0xff)];
- }
- }
- cur_diff = PredictionCostSpatialHistogram(accumulated, histo);
- if (cur_diff < best_diff) {
- best_diff = cur_diff;
- best_mode = mode;
- }
- }
-
- return best_mode;
-}
-
-static void CopyTileWithPrediction(int width, int height,
- int tile_x, int tile_y, int bits, int mode,
- const uint32_t* const argb_scratch,
- uint32_t* const argb) {
- const int col_start = tile_x << bits;
- const int row_start = tile_y << bits;
- const int tile_size = 1 << bits;
- const int ymax = (tile_size <= height - row_start) ?
- tile_size : height - row_start;
- const int xmax = (tile_size <= width - col_start) ?
- tile_size : width - col_start;
- const PredictorFunc pred_func = kPredictors[mode];
- const uint32_t* current_row = argb_scratch;
-
- int y;
- for (y = 0; y < ymax; ++y) {
- int x;
- const int row = row_start + y;
- const uint32_t* const upper_row = current_row;
- current_row = upper_row + width;
- for (x = 0; x < xmax; ++x) {
- const int col = col_start + x;
- const int pix = row * width + col;
- uint32_t predict;
- if (row == 0) {
- predict = (col == 0) ? ARGB_BLACK : current_row[col - 1]; // Left.
- } else if (col == 0) {
- predict = upper_row[col]; // Top.
- } else {
- predict = pred_func(current_row[col - 1], upper_row + col);
- }
- argb[pix] = VP8LSubPixels(current_row[col], predict);
- }
- }
-}
-
-void VP8LResidualImage(int width, int height, int bits,
- uint32_t* const argb, uint32_t* const argb_scratch,
- uint32_t* const image) {
- const int max_tile_size = 1 << bits;
- const int tiles_per_row = VP8LSubSampleSize(width, bits);
- const int tiles_per_col = VP8LSubSampleSize(height, bits);
- uint32_t* const upper_row = argb_scratch;
- uint32_t* const current_tile_rows = argb_scratch + width;
- int tile_y;
- int histo[4][256];
- memset(histo, 0, sizeof(histo));
- for (tile_y = 0; tile_y < tiles_per_col; ++tile_y) {
- const int tile_y_offset = tile_y * max_tile_size;
- const int this_tile_height =
- (tile_y < tiles_per_col - 1) ? max_tile_size : height - tile_y_offset;
- int tile_x;
- if (tile_y > 0) {
- memcpy(upper_row, current_tile_rows + (max_tile_size - 1) * width,
- width * sizeof(*upper_row));
- }
- memcpy(current_tile_rows, &argb[tile_y_offset * width],
- this_tile_height * width * sizeof(*current_tile_rows));
- for (tile_x = 0; tile_x < tiles_per_row; ++tile_x) {
- int pred;
- int y;
- const int tile_x_offset = tile_x * max_tile_size;
- int all_x_max = tile_x_offset + max_tile_size;
- if (all_x_max > width) {
- all_x_max = width;
- }
- pred = GetBestPredictorForTile(width, height, tile_x, tile_y, bits, histo,
- argb_scratch);
- image[tile_y * tiles_per_row + tile_x] = 0xff000000u | (pred << 8);
- CopyTileWithPrediction(width, height, tile_x, tile_y, bits, pred,
- argb_scratch, argb);
- for (y = 0; y < max_tile_size; ++y) {
- int ix;
- int all_x;
- int all_y = tile_y_offset + y;
- if (all_y >= height) {
- break;
- }
- ix = all_y * width + tile_x_offset;
- for (all_x = tile_x_offset; all_x < all_x_max; ++all_x, ++ix) {
- const uint32_t a = argb[ix];
- ++histo[0][a >> 24];
- ++histo[1][((a >> 16) & 0xff)];
- ++histo[2][((a >> 8) & 0xff)];
- ++histo[3][(a & 0xff)];
- }
- }
- }
- }
-}
-
-// Inverse prediction.
-static void PredictorInverseTransform(const VP8LTransform* const transform,
- int y_start, int y_end, uint32_t* data) {
- const int width = transform->xsize_;
- if (y_start == 0) { // First Row follows the L (mode=1) mode.
- int x;
- const uint32_t pred0 = Predictor0(data[-1], NULL);
- AddPixelsEq(data, pred0);
- for (x = 1; x < width; ++x) {
- const uint32_t pred1 = Predictor1(data[x - 1], NULL);
- AddPixelsEq(data + x, pred1);
- }
- data += width;
- ++y_start;
- }
-
- {
- int y = y_start;
- const int mask = (1 << transform->bits_) - 1;
- const int tiles_per_row = VP8LSubSampleSize(width, transform->bits_);
- const uint32_t* pred_mode_base =
- transform->data_ + (y >> transform->bits_) * tiles_per_row;
-
- while (y < y_end) {
- int x;
- const uint32_t pred2 = Predictor2(data[-1], data - width);
- const uint32_t* pred_mode_src = pred_mode_base;
- PredictorFunc pred_func;
-
- // First pixel follows the T (mode=2) mode.
- AddPixelsEq(data, pred2);
-
- // .. the rest:
- pred_func = kPredictors[((*pred_mode_src++) >> 8) & 0xf];
- for (x = 1; x < width; ++x) {
- uint32_t pred;
- if ((x & mask) == 0) { // start of tile. Read predictor function.
- pred_func = kPredictors[((*pred_mode_src++) >> 8) & 0xf];
- }
- pred = pred_func(data[x - 1], data + x - width);
- AddPixelsEq(data + x, pred);
- }
- data += width;
- ++y;
- if ((y & mask) == 0) { // Use the same mask, since tiles are squares.
- pred_mode_base += tiles_per_row;
- }
- }
- }
-}
-
-void VP8LSubtractGreenFromBlueAndRed(uint32_t* argb_data, int num_pixs) {
- int i;
- for (i = 0; i < num_pixs; ++i) {
- const uint32_t argb = argb_data[i];
- const uint32_t green = (argb >> 8) & 0xff;
- const uint32_t new_r = (((argb >> 16) & 0xff) - green) & 0xff;
- const uint32_t new_b = ((argb & 0xff) - green) & 0xff;
- argb_data[i] = (argb & 0xff00ff00) | (new_r << 16) | new_b;
- }
-}
-
-// Add green to blue and red channels (i.e. perform the inverse transform of
-// 'subtract green').
-static void AddGreenToBlueAndRed(const VP8LTransform* const transform,
- int y_start, int y_end, uint32_t* data) {
- const int width = transform->xsize_;
- const uint32_t* const data_end = data + (y_end - y_start) * width;
- while (data < data_end) {
- const uint32_t argb = *data;
- // "* 0001001u" is equivalent to "(green << 16) + green)"
- const uint32_t green = ((argb >> 8) & 0xff);
- uint32_t red_blue = (argb & 0x00ff00ffu);
- red_blue += (green << 16) | green;
- red_blue &= 0x00ff00ffu;
- *data++ = (argb & 0xff00ff00u) | red_blue;
- }
-}
-
-typedef struct {
- // Note: the members are uint8_t, so that any negative values are
- // automatically converted to "mod 256" values.
- uint8_t green_to_red_;
- uint8_t green_to_blue_;
- uint8_t red_to_blue_;
-} Multipliers;
-
-static WEBP_INLINE void MultipliersClear(Multipliers* m) {
- m->green_to_red_ = 0;
- m->green_to_blue_ = 0;
- m->red_to_blue_ = 0;
-}
-
-static WEBP_INLINE uint32_t ColorTransformDelta(int8_t color_pred,
- int8_t color) {
- return (uint32_t)((int)(color_pred) * color) >> 5;
-}
-
-static WEBP_INLINE void ColorCodeToMultipliers(uint32_t color_code,
- Multipliers* const m) {
- m->green_to_red_ = (color_code >> 0) & 0xff;
- m->green_to_blue_ = (color_code >> 8) & 0xff;
- m->red_to_blue_ = (color_code >> 16) & 0xff;
-}
-
-static WEBP_INLINE uint32_t MultipliersToColorCode(Multipliers* const m) {
- return 0xff000000u |
- ((uint32_t)(m->red_to_blue_) << 16) |
- ((uint32_t)(m->green_to_blue_) << 8) |
- m->green_to_red_;
-}
-
-static WEBP_INLINE uint32_t TransformColor(const Multipliers* const m,
- uint32_t argb, int inverse) {
- const uint32_t green = argb >> 8;
- const uint32_t red = argb >> 16;
- uint32_t new_red = red;
- uint32_t new_blue = argb;
-
- if (inverse) {
- new_red += ColorTransformDelta(m->green_to_red_, green);
- new_red &= 0xff;
- new_blue += ColorTransformDelta(m->green_to_blue_, green);
- new_blue += ColorTransformDelta(m->red_to_blue_, new_red);
- new_blue &= 0xff;
- } else {
- new_red -= ColorTransformDelta(m->green_to_red_, green);
- new_red &= 0xff;
- new_blue -= ColorTransformDelta(m->green_to_blue_, green);
- new_blue -= ColorTransformDelta(m->red_to_blue_, red);
- new_blue &= 0xff;
- }
- return (argb & 0xff00ff00u) | (new_red << 16) | (new_blue);
-}
-
-static WEBP_INLINE int SkipRepeatedPixels(const uint32_t* const argb,
- int ix, int xsize) {
- const uint32_t v = argb[ix];
- if (ix >= xsize + 3) {
- if (v == argb[ix - xsize] &&
- argb[ix - 1] == argb[ix - xsize - 1] &&
- argb[ix - 2] == argb[ix - xsize - 2] &&
- argb[ix - 3] == argb[ix - xsize - 3]) {
- return 1;
- }
- return v == argb[ix - 3] && v == argb[ix - 2] && v == argb[ix - 1];
- } else if (ix >= 3) {
- return v == argb[ix - 3] && v == argb[ix - 2] && v == argb[ix - 1];
- }
- return 0;
-}
-
-static float PredictionCostCrossColor(const int accumulated[256],
- const int counts[256]) {
- // Favor low entropy, locally and globally.
- int i;
- int combo[256];
- for (i = 0; i < 256; ++i) {
- combo[i] = accumulated[i] + counts[i];
- }
- return ShannonEntropy(combo, 256) +
- ShannonEntropy(counts, 256) +
- PredictionCostSpatial(counts, 3, 2.4); // Favor small absolute values.
-}
-
-static Multipliers GetBestColorTransformForTile(
- int tile_x, int tile_y, int bits,
- Multipliers prevX,
- Multipliers prevY,
- int step, int xsize, int ysize,
- int* accumulated_red_histo,
- int* accumulated_blue_histo,
- const uint32_t* const argb) {
- float best_diff = MAX_DIFF_COST;
- float cur_diff;
- const int halfstep = step / 2;
- const int max_tile_size = 1 << bits;
- const int tile_y_offset = tile_y * max_tile_size;
- const int tile_x_offset = tile_x * max_tile_size;
- int green_to_red;
- int green_to_blue;
- int red_to_blue;
- int all_x_max = tile_x_offset + max_tile_size;
- int all_y_max = tile_y_offset + max_tile_size;
- Multipliers best_tx;
- MultipliersClear(&best_tx);
- if (all_x_max > xsize) {
- all_x_max = xsize;
- }
- if (all_y_max > ysize) {
- all_y_max = ysize;
- }
- for (green_to_red = -64; green_to_red <= 64; green_to_red += halfstep) {
- int histo[256] = { 0 };
- int all_y;
- Multipliers tx;
- MultipliersClear(&tx);
- tx.green_to_red_ = green_to_red & 0xff;
-
- for (all_y = tile_y_offset; all_y < all_y_max; ++all_y) {
- uint32_t predict;
- int ix = all_y * xsize + tile_x_offset;
- int all_x;
- for (all_x = tile_x_offset; all_x < all_x_max; ++all_x, ++ix) {
- if (SkipRepeatedPixels(argb, ix, xsize)) {
- continue;
- }
- predict = TransformColor(&tx, argb[ix], 0);
- ++histo[(predict >> 16) & 0xff]; // red.
- }
- }
- cur_diff = PredictionCostCrossColor(&accumulated_red_histo[0], &histo[0]);
- if (tx.green_to_red_ == prevX.green_to_red_) {
- cur_diff -= 3; // favor keeping the areas locally similar
- }
- if (tx.green_to_red_ == prevY.green_to_red_) {
- cur_diff -= 3; // favor keeping the areas locally similar
- }
- if (tx.green_to_red_ == 0) {
- cur_diff -= 3;
- }
- if (cur_diff < best_diff) {
- best_diff = cur_diff;
- best_tx = tx;
- }
- }
- best_diff = MAX_DIFF_COST;
- green_to_red = best_tx.green_to_red_;
- for (green_to_blue = -32; green_to_blue <= 32; green_to_blue += step) {
- for (red_to_blue = -32; red_to_blue <= 32; red_to_blue += step) {
- int all_y;
- int histo[256] = { 0 };
- Multipliers tx;
- tx.green_to_red_ = green_to_red;
- tx.green_to_blue_ = green_to_blue;
- tx.red_to_blue_ = red_to_blue;
- for (all_y = tile_y_offset; all_y < all_y_max; ++all_y) {
- uint32_t predict;
- int all_x;
- int ix = all_y * xsize + tile_x_offset;
- for (all_x = tile_x_offset; all_x < all_x_max; ++all_x, ++ix) {
- if (SkipRepeatedPixels(argb, ix, xsize)) {
- continue;
- }
- predict = TransformColor(&tx, argb[ix], 0);
- ++histo[predict & 0xff]; // blue.
- }
- }
- cur_diff =
- PredictionCostCrossColor(&accumulated_blue_histo[0], &histo[0]);
- if (tx.green_to_blue_ == prevX.green_to_blue_) {
- cur_diff -= 3; // favor keeping the areas locally similar
- }
- if (tx.green_to_blue_ == prevY.green_to_blue_) {
- cur_diff -= 3; // favor keeping the areas locally similar
- }
- if (tx.red_to_blue_ == prevX.red_to_blue_) {
- cur_diff -= 3; // favor keeping the areas locally similar
- }
- if (tx.red_to_blue_ == prevY.red_to_blue_) {
- cur_diff -= 3; // favor keeping the areas locally similar
- }
- if (tx.green_to_blue_ == 0) {
- cur_diff -= 3;
- }
- if (tx.red_to_blue_ == 0) {
- cur_diff -= 3;
- }
- if (cur_diff < best_diff) {
- best_diff = cur_diff;
- best_tx = tx;
- }
- }
- }
- return best_tx;
-}
-
-static void CopyTileWithColorTransform(int xsize, int ysize,
- int tile_x, int tile_y, int bits,
- Multipliers color_transform,
- uint32_t* const argb) {
- int y;
- int xscan = 1 << bits;
- int yscan = 1 << bits;
- tile_x <<= bits;
- tile_y <<= bits;
- if (xscan > xsize - tile_x) {
- xscan = xsize - tile_x;
- }
- if (yscan > ysize - tile_y) {
- yscan = ysize - tile_y;
- }
- yscan += tile_y;
- for (y = tile_y; y < yscan; ++y) {
- int ix = y * xsize + tile_x;
- const int end_ix = ix + xscan;
- for (; ix < end_ix; ++ix) {
- argb[ix] = TransformColor(&color_transform, argb[ix], 0);
- }
- }
-}
-
-void VP8LColorSpaceTransform(int width, int height, int bits, int step,
- uint32_t* const argb, uint32_t* image) {
- const int max_tile_size = 1 << bits;
- int tile_xsize = VP8LSubSampleSize(width, bits);
- int tile_ysize = VP8LSubSampleSize(height, bits);
- int accumulated_red_histo[256] = { 0 };
- int accumulated_blue_histo[256] = { 0 };
- int tile_y;
- int tile_x;
- Multipliers prevX;
- Multipliers prevY;
- MultipliersClear(&prevY);
- MultipliersClear(&prevX);
- for (tile_y = 0; tile_y < tile_ysize; ++tile_y) {
- for (tile_x = 0; tile_x < tile_xsize; ++tile_x) {
- Multipliers color_transform;
- int all_x_max;
- int y;
- const int tile_y_offset = tile_y * max_tile_size;
- const int tile_x_offset = tile_x * max_tile_size;
- if (tile_y != 0) {
- ColorCodeToMultipliers(image[tile_y * tile_xsize + tile_x - 1], &prevX);
- ColorCodeToMultipliers(image[(tile_y - 1) * tile_xsize + tile_x],
- &prevY);
- } else if (tile_x != 0) {
- ColorCodeToMultipliers(image[tile_y * tile_xsize + tile_x - 1], &prevX);
- }
- color_transform =
- GetBestColorTransformForTile(tile_x, tile_y, bits,
- prevX, prevY,
- step, width, height,
- &accumulated_red_histo[0],
- &accumulated_blue_histo[0],
- argb);
- image[tile_y * tile_xsize + tile_x] =
- MultipliersToColorCode(&color_transform);
- CopyTileWithColorTransform(width, height, tile_x, tile_y, bits,
- color_transform, argb);
-
- // Gather accumulated histogram data.
- all_x_max = tile_x_offset + max_tile_size;
- if (all_x_max > width) {
- all_x_max = width;
- }
- for (y = 0; y < max_tile_size; ++y) {
- int ix;
- int all_x;
- int all_y = tile_y_offset + y;
- if (all_y >= height) {
- break;
- }
- ix = all_y * width + tile_x_offset;
- for (all_x = tile_x_offset; all_x < all_x_max; ++all_x, ++ix) {
- if (ix >= 2 &&
- argb[ix] == argb[ix - 2] &&
- argb[ix] == argb[ix - 1]) {
- continue; // repeated pixels are handled by backward references
- }
- if (ix >= width + 2 &&
- argb[ix - 2] == argb[ix - width - 2] &&
- argb[ix - 1] == argb[ix - width - 1] &&
- argb[ix] == argb[ix - width]) {
- continue; // repeated pixels are handled by backward references
- }
- ++accumulated_red_histo[(argb[ix] >> 16) & 0xff];
- ++accumulated_blue_histo[argb[ix] & 0xff];
- }
- }
- }
- }
-}
-
-// Color space inverse transform.
-static void ColorSpaceInverseTransform(const VP8LTransform* const transform,
- int y_start, int y_end, uint32_t* data) {
- const int width = transform->xsize_;
- const int mask = (1 << transform->bits_) - 1;
- const int tiles_per_row = VP8LSubSampleSize(width, transform->bits_);
- int y = y_start;
- const uint32_t* pred_row =
- transform->data_ + (y >> transform->bits_) * tiles_per_row;
-
- while (y < y_end) {
- const uint32_t* pred = pred_row;
- Multipliers m = { 0, 0, 0 };
- int x;
-
- for (x = 0; x < width; ++x) {
- if ((x & mask) == 0) ColorCodeToMultipliers(*pred++, &m);
- data[x] = TransformColor(&m, data[x], 1);
- }
- data += width;
- ++y;
- if ((y & mask) == 0) pred_row += tiles_per_row;;
- }
-}
-
-// Separate out pixels packed together using pixel-bundling.
-static void ColorIndexInverseTransform(
- const VP8LTransform* const transform,
- int y_start, int y_end, const uint32_t* src, uint32_t* dst) {
- int y;
- const int bits_per_pixel = 8 >> transform->bits_;
- const int width = transform->xsize_;
- const uint32_t* const color_map = transform->data_;
- if (bits_per_pixel < 8) {
- const int pixels_per_byte = 1 << transform->bits_;
- const int count_mask = pixels_per_byte - 1;
- const uint32_t bit_mask = (1 << bits_per_pixel) - 1;
- for (y = y_start; y < y_end; ++y) {
- uint32_t packed_pixels = 0;
- int x;
- for (x = 0; x < width; ++x) {
- // We need to load fresh 'packed_pixels' once every 'pixels_per_byte'
- // increments of x. Fortunately, pixels_per_byte is a power of 2, so
- // can just use a mask for that, instead of decrementing a counter.
- if ((x & count_mask) == 0) packed_pixels = ((*src++) >> 8) & 0xff;
- *dst++ = color_map[packed_pixels & bit_mask];
- packed_pixels >>= bits_per_pixel;
- }
- }
- } else {
- for (y = y_start; y < y_end; ++y) {
- int x;
- for (x = 0; x < width; ++x) {
- *dst++ = color_map[((*src++) >> 8) & 0xff];
- }
- }
- }
-}
-
-void VP8LInverseTransform(const VP8LTransform* const transform,
- int row_start, int row_end,
- const uint32_t* const in, uint32_t* const out) {
- assert(row_start < row_end);
- assert(row_end <= transform->ysize_);
- switch (transform->type_) {
- case SUBTRACT_GREEN:
- AddGreenToBlueAndRed(transform, row_start, row_end, out);
- break;
- case PREDICTOR_TRANSFORM:
- PredictorInverseTransform(transform, row_start, row_end, out);
- if (row_end != transform->ysize_) {
- // The last predicted row in this iteration will be the top-pred row
- // for the first row in next iteration.
- const int width = transform->xsize_;
- memcpy(out - width, out + (row_end - row_start - 1) * width,
- width * sizeof(*out));
- }
- break;
- case CROSS_COLOR_TRANSFORM:
- ColorSpaceInverseTransform(transform, row_start, row_end, out);
- break;
- case COLOR_INDEXING_TRANSFORM:
- if (in == out && transform->bits_ > 0) {
- // Move packed pixels to the end of unpacked region, so that unpacking
- // can occur seamlessly.
- // Also, note that this is the only transform that applies on
- // the effective width of VP8LSubSampleSize(xsize_, bits_). All other
- // transforms work on effective width of xsize_.
- const int out_stride = (row_end - row_start) * transform->xsize_;
- const int in_stride = (row_end - row_start) *
- VP8LSubSampleSize(transform->xsize_, transform->bits_);
- uint32_t* const src = out + out_stride - in_stride;
- memmove(src, out, in_stride * sizeof(*src));
- ColorIndexInverseTransform(transform, row_start, row_end, src, out);
- } else {
- ColorIndexInverseTransform(transform, row_start, row_end, in, out);
- }
- break;
- }
-}
-
-//------------------------------------------------------------------------------
-// Color space conversion.
-
-static int is_big_endian(void) {
- static const union {
- uint16_t w;
- uint8_t b[2];
- } tmp = { 1 };
- return (tmp.b[0] != 1);
-}
-
-static void ConvertBGRAToRGB(const uint32_t* src,
- int num_pixels, uint8_t* dst) {
- const uint32_t* const src_end = src + num_pixels;
- while (src < src_end) {
- const uint32_t argb = *src++;
- *dst++ = (argb >> 16) & 0xff;
- *dst++ = (argb >> 8) & 0xff;
- *dst++ = (argb >> 0) & 0xff;
- }
-}
-
-static void ConvertBGRAToRGBA(const uint32_t* src,
- int num_pixels, uint8_t* dst) {
- const uint32_t* const src_end = src + num_pixels;
- while (src < src_end) {
- const uint32_t argb = *src++;
- *dst++ = (argb >> 16) & 0xff;
- *dst++ = (argb >> 8) & 0xff;
- *dst++ = (argb >> 0) & 0xff;
- *dst++ = (argb >> 24) & 0xff;
- }
-}
-
-static void ConvertBGRAToRGBA4444(const uint32_t* src,
- int num_pixels, uint8_t* dst) {
- const uint32_t* const src_end = src + num_pixels;
- while (src < src_end) {
- const uint32_t argb = *src++;
- *dst++ = ((argb >> 16) & 0xf0) | ((argb >> 12) & 0xf);
- *dst++ = ((argb >> 0) & 0xf0) | ((argb >> 28) & 0xf);
- }
-}
-
-static void ConvertBGRAToRGB565(const uint32_t* src,
- int num_pixels, uint8_t* dst) {
- const uint32_t* const src_end = src + num_pixels;
- while (src < src_end) {
- const uint32_t argb = *src++;
- *dst++ = ((argb >> 16) & 0xf8) | ((argb >> 13) & 0x7);
- *dst++ = ((argb >> 5) & 0xe0) | ((argb >> 3) & 0x1f);
- }
-}
-
-static void ConvertBGRAToBGR(const uint32_t* src,
- int num_pixels, uint8_t* dst) {
- const uint32_t* const src_end = src + num_pixels;
- while (src < src_end) {
- const uint32_t argb = *src++;
- *dst++ = (argb >> 0) & 0xff;
- *dst++ = (argb >> 8) & 0xff;
- *dst++ = (argb >> 16) & 0xff;
- }
-}
-
-static void CopyOrSwap(const uint32_t* src, int num_pixels, uint8_t* dst,
- int swap_on_big_endian) {
- if (is_big_endian() == swap_on_big_endian) {
- const uint32_t* const src_end = src + num_pixels;
- while (src < src_end) {
- uint32_t argb = *src++;
-#if !defined(__BIG_ENDIAN__) && (defined(__i386__) || defined(__x86_64__))
- __asm__ volatile("bswap %0" : "=r"(argb) : "0"(argb));
- *(uint32_t*)dst = argb;
- dst += sizeof(argb);
-#elif !defined(__BIG_ENDIAN__) && defined(_MSC_VER)
- argb = _byteswap_ulong(argb);
- *(uint32_t*)dst = argb;
- dst += sizeof(argb);
-#else
- *dst++ = (argb >> 24) & 0xff;
- *dst++ = (argb >> 16) & 0xff;
- *dst++ = (argb >> 8) & 0xff;
- *dst++ = (argb >> 0) & 0xff;
-#endif
- }
- } else {
- memcpy(dst, src, num_pixels * sizeof(*src));
- }
-}
-
-void VP8LConvertFromBGRA(const uint32_t* const in_data, int num_pixels,
- WEBP_CSP_MODE out_colorspace, uint8_t* const rgba) {
- switch (out_colorspace) {
- case MODE_RGB:
- ConvertBGRAToRGB(in_data, num_pixels, rgba);
- break;
- case MODE_RGBA:
- ConvertBGRAToRGBA(in_data, num_pixels, rgba);
- break;
- case MODE_rgbA:
- ConvertBGRAToRGBA(in_data, num_pixels, rgba);
- WebPApplyAlphaMultiply(rgba, 0, num_pixels, 1, 0);
- break;
- case MODE_BGR:
- ConvertBGRAToBGR(in_data, num_pixels, rgba);
- break;
- case MODE_BGRA:
- CopyOrSwap(in_data, num_pixels, rgba, 1);
- break;
- case MODE_bgrA:
- CopyOrSwap(in_data, num_pixels, rgba, 1);
- WebPApplyAlphaMultiply(rgba, 0, num_pixels, 1, 0);
- break;
- case MODE_ARGB:
- CopyOrSwap(in_data, num_pixels, rgba, 0);
- break;
- case MODE_Argb:
- CopyOrSwap(in_data, num_pixels, rgba, 0);
- WebPApplyAlphaMultiply(rgba, 1, num_pixels, 1, 0);
- break;
- case MODE_RGBA_4444:
- ConvertBGRAToRGBA4444(in_data, num_pixels, rgba);
- break;
- case MODE_rgbA_4444:
- ConvertBGRAToRGBA4444(in_data, num_pixels, rgba);
- WebPApplyAlphaMultiply4444(rgba, num_pixels, 1, 0);
- break;
- case MODE_RGB_565:
- ConvertBGRAToRGB565(in_data, num_pixels, rgba);
- break;
- default:
- assert(0); // Code flow should not reach here.
- }
-}
-
-//------------------------------------------------------------------------------
-
-#if defined(__cplusplus) || defined(c_plusplus)
-} // extern "C"
-#endif
diff --git a/drivers/webpold/dsp/lossless.h b/drivers/webpold/dsp/lossless.h
deleted file mode 100644
index 7c7d5555ed..0000000000
--- a/drivers/webpold/dsp/lossless.h
+++ /dev/null
@@ -1,82 +0,0 @@
-// Copyright 2012 Google Inc. All Rights Reserved.
-//
-// This code is licensed under the same terms as WebM:
-// Software License Agreement: http://www.webmproject.org/license/software/
-// Additional IP Rights Grant: http://www.webmproject.org/license/additional/
-// -----------------------------------------------------------------------------
-//
-// Image transforms and color space conversion methods for lossless decoder.
-//
-// Authors: Vikas Arora (vikaas.arora@gmail.com)
-// Jyrki Alakuijala (jyrki@google.com)
-
-#ifndef WEBP_DSP_LOSSLESS_H_
-#define WEBP_DSP_LOSSLESS_H_
-
-#include "../types.h"
-#include "../decode.h"
-
-#if defined(__cplusplus) || defined(c_plusplus)
-extern "C" {
-#endif
-
-//------------------------------------------------------------------------------
-// Image transforms.
-
-struct VP8LTransform; // Defined in dec/vp8li.h.
-
-// Performs inverse transform of data given transform information, start and end
-// rows. Transform will be applied to rows [row_start, row_end[.
-// The *in and *out pointers refer to source and destination data respectively
-// corresponding to the intermediate row (row_start).
-void VP8LInverseTransform(const struct VP8LTransform* const transform,
- int row_start, int row_end,
- const uint32_t* const in, uint32_t* const out);
-
-// Subtracts green from blue and red channels.
-void VP8LSubtractGreenFromBlueAndRed(uint32_t* argb_data, int num_pixs);
-
-void VP8LResidualImage(int width, int height, int bits,
- uint32_t* const argb, uint32_t* const argb_scratch,
- uint32_t* const image);
-
-void VP8LColorSpaceTransform(int width, int height, int bits, int step,
- uint32_t* const argb, uint32_t* image);
-
-//------------------------------------------------------------------------------
-// Color space conversion.
-
-// Converts from BGRA to other color spaces.
-void VP8LConvertFromBGRA(const uint32_t* const in_data, int num_pixels,
- WEBP_CSP_MODE out_colorspace, uint8_t* const rgba);
-
-//------------------------------------------------------------------------------
-// Misc methods.
-
-// Computes sampled size of 'size' when sampling using 'sampling bits'.
-static WEBP_INLINE uint32_t VP8LSubSampleSize(uint32_t size,
- uint32_t sampling_bits) {
- return (size + (1 << sampling_bits) - 1) >> sampling_bits;
-}
-
-// Faster logarithm for integers, with the property of log2(0) == 0.
-float VP8LFastLog2(int v);
-// Fast calculation of v * log2(v) for integer input.
-static WEBP_INLINE float VP8LFastSLog2(int v) { return VP8LFastLog2(v) * v; }
-
-// In-place difference of each component with mod 256.
-static WEBP_INLINE uint32_t VP8LSubPixels(uint32_t a, uint32_t b) {
- const uint32_t alpha_and_green =
- 0x00ff00ffu + (a & 0xff00ff00u) - (b & 0xff00ff00u);
- const uint32_t red_and_blue =
- 0xff00ff00u + (a & 0x00ff00ffu) - (b & 0x00ff00ffu);
- return (alpha_and_green & 0xff00ff00u) | (red_and_blue & 0x00ff00ffu);
-}
-
-//------------------------------------------------------------------------------
-
-#if defined(__cplusplus) || defined(c_plusplus)
-} // extern "C"
-#endif
-
-#endif // WEBP_DSP_LOSSLESS_H_
diff --git a/drivers/webpold/dsp/upsampling.c b/drivers/webpold/dsp/upsampling.c
deleted file mode 100644
index 4855eb1432..0000000000
--- a/drivers/webpold/dsp/upsampling.c
+++ /dev/null
@@ -1,357 +0,0 @@
-// Copyright 2011 Google Inc. All Rights Reserved.
-//
-// This code is licensed under the same terms as WebM:
-// Software License Agreement: http://www.webmproject.org/license/software/
-// Additional IP Rights Grant: http://www.webmproject.org/license/additional/
-// -----------------------------------------------------------------------------
-//
-// YUV to RGB upsampling functions.
-//
-// Author: somnath@google.com (Somnath Banerjee)
-
-#include "./dsp.h"
-#include "./yuv.h"
-
-#if defined(__cplusplus) || defined(c_plusplus)
-extern "C" {
-#endif
-
-//------------------------------------------------------------------------------
-// Fancy upsampler
-
-#ifdef FANCY_UPSAMPLING
-
-// Fancy upsampling functions to convert YUV to RGB
-WebPUpsampleLinePairFunc WebPUpsamplers[MODE_LAST];
-
-// Given samples laid out in a square as:
-// [a b]
-// [c d]
-// we interpolate u/v as:
-// ([9*a + 3*b + 3*c + d 3*a + 9*b + 3*c + d] + [8 8]) / 16
-// ([3*a + b + 9*c + 3*d a + 3*b + 3*c + 9*d] [8 8]) / 16
-
-// We process u and v together stashed into 32bit (16bit each).
-#define LOAD_UV(u,v) ((u) | ((v) << 16))
-
-#define UPSAMPLE_FUNC(FUNC_NAME, FUNC, XSTEP) \
-static void FUNC_NAME(const uint8_t* top_y, const uint8_t* bottom_y, \
- const uint8_t* top_u, const uint8_t* top_v, \
- const uint8_t* cur_u, const uint8_t* cur_v, \
- uint8_t* top_dst, uint8_t* bottom_dst, int len) { \
- int x; \
- const int last_pixel_pair = (len - 1) >> 1; \
- uint32_t tl_uv = LOAD_UV(top_u[0], top_v[0]); /* top-left sample */ \
- uint32_t l_uv = LOAD_UV(cur_u[0], cur_v[0]); /* left-sample */ \
- if (top_y) { \
- const uint32_t uv0 = (3 * tl_uv + l_uv + 0x00020002u) >> 2; \
- FUNC(top_y[0], uv0 & 0xff, (uv0 >> 16), top_dst); \
- } \
- if (bottom_y) { \
- const uint32_t uv0 = (3 * l_uv + tl_uv + 0x00020002u) >> 2; \
- FUNC(bottom_y[0], uv0 & 0xff, (uv0 >> 16), bottom_dst); \
- } \
- for (x = 1; x <= last_pixel_pair; ++x) { \
- const uint32_t t_uv = LOAD_UV(top_u[x], top_v[x]); /* top sample */ \
- const uint32_t uv = LOAD_UV(cur_u[x], cur_v[x]); /* sample */ \
- /* precompute invariant values associated with first and second diagonals*/\
- const uint32_t avg = tl_uv + t_uv + l_uv + uv + 0x00080008u; \
- const uint32_t diag_12 = (avg + 2 * (t_uv + l_uv)) >> 3; \
- const uint32_t diag_03 = (avg + 2 * (tl_uv + uv)) >> 3; \
- if (top_y) { \
- const uint32_t uv0 = (diag_12 + tl_uv) >> 1; \
- const uint32_t uv1 = (diag_03 + t_uv) >> 1; \
- FUNC(top_y[2 * x - 1], uv0 & 0xff, (uv0 >> 16), \
- top_dst + (2 * x - 1) * XSTEP); \
- FUNC(top_y[2 * x - 0], uv1 & 0xff, (uv1 >> 16), \
- top_dst + (2 * x - 0) * XSTEP); \
- } \
- if (bottom_y) { \
- const uint32_t uv0 = (diag_03 + l_uv) >> 1; \
- const uint32_t uv1 = (diag_12 + uv) >> 1; \
- FUNC(bottom_y[2 * x - 1], uv0 & 0xff, (uv0 >> 16), \
- bottom_dst + (2 * x - 1) * XSTEP); \
- FUNC(bottom_y[2 * x + 0], uv1 & 0xff, (uv1 >> 16), \
- bottom_dst + (2 * x + 0) * XSTEP); \
- } \
- tl_uv = t_uv; \
- l_uv = uv; \
- } \
- if (!(len & 1)) { \
- if (top_y) { \
- const uint32_t uv0 = (3 * tl_uv + l_uv + 0x00020002u) >> 2; \
- FUNC(top_y[len - 1], uv0 & 0xff, (uv0 >> 16), \
- top_dst + (len - 1) * XSTEP); \
- } \
- if (bottom_y) { \
- const uint32_t uv0 = (3 * l_uv + tl_uv + 0x00020002u) >> 2; \
- FUNC(bottom_y[len - 1], uv0 & 0xff, (uv0 >> 16), \
- bottom_dst + (len - 1) * XSTEP); \
- } \
- } \
-}
-
-// All variants implemented.
-UPSAMPLE_FUNC(UpsampleRgbLinePair, VP8YuvToRgb, 3)
-UPSAMPLE_FUNC(UpsampleBgrLinePair, VP8YuvToBgr, 3)
-UPSAMPLE_FUNC(UpsampleRgbaLinePair, VP8YuvToRgba, 4)
-UPSAMPLE_FUNC(UpsampleBgraLinePair, VP8YuvToBgra, 4)
-UPSAMPLE_FUNC(UpsampleArgbLinePair, VP8YuvToArgb, 4)
-UPSAMPLE_FUNC(UpsampleRgba4444LinePair, VP8YuvToRgba4444, 2)
-UPSAMPLE_FUNC(UpsampleRgb565LinePair, VP8YuvToRgb565, 2)
-
-#undef LOAD_UV
-#undef UPSAMPLE_FUNC
-
-#endif // FANCY_UPSAMPLING
-
-//------------------------------------------------------------------------------
-// simple point-sampling
-
-#define SAMPLE_FUNC(FUNC_NAME, FUNC, XSTEP) \
-static void FUNC_NAME(const uint8_t* top_y, const uint8_t* bottom_y, \
- const uint8_t* u, const uint8_t* v, \
- uint8_t* top_dst, uint8_t* bottom_dst, int len) { \
- int i; \
- for (i = 0; i < len - 1; i += 2) { \
- FUNC(top_y[0], u[0], v[0], top_dst); \
- FUNC(top_y[1], u[0], v[0], top_dst + XSTEP); \
- FUNC(bottom_y[0], u[0], v[0], bottom_dst); \
- FUNC(bottom_y[1], u[0], v[0], bottom_dst + XSTEP); \
- top_y += 2; \
- bottom_y += 2; \
- u++; \
- v++; \
- top_dst += 2 * XSTEP; \
- bottom_dst += 2 * XSTEP; \
- } \
- if (i == len - 1) { /* last one */ \
- FUNC(top_y[0], u[0], v[0], top_dst); \
- FUNC(bottom_y[0], u[0], v[0], bottom_dst); \
- } \
-}
-
-// All variants implemented.
-SAMPLE_FUNC(SampleRgbLinePair, VP8YuvToRgb, 3)
-SAMPLE_FUNC(SampleBgrLinePair, VP8YuvToBgr, 3)
-SAMPLE_FUNC(SampleRgbaLinePair, VP8YuvToRgba, 4)
-SAMPLE_FUNC(SampleBgraLinePair, VP8YuvToBgra, 4)
-SAMPLE_FUNC(SampleArgbLinePair, VP8YuvToArgb, 4)
-SAMPLE_FUNC(SampleRgba4444LinePair, VP8YuvToRgba4444, 2)
-SAMPLE_FUNC(SampleRgb565LinePair, VP8YuvToRgb565, 2)
-
-#undef SAMPLE_FUNC
-
-const WebPSampleLinePairFunc WebPSamplers[MODE_LAST] = {
- SampleRgbLinePair, // MODE_RGB
- SampleRgbaLinePair, // MODE_RGBA
- SampleBgrLinePair, // MODE_BGR
- SampleBgraLinePair, // MODE_BGRA
- SampleArgbLinePair, // MODE_ARGB
- SampleRgba4444LinePair, // MODE_RGBA_4444
- SampleRgb565LinePair, // MODE_RGB_565
- SampleRgbaLinePair, // MODE_rgbA
- SampleBgraLinePair, // MODE_bgrA
- SampleArgbLinePair, // MODE_Argb
- SampleRgba4444LinePair // MODE_rgbA_4444
-};
-
-//------------------------------------------------------------------------------
-
-#if !defined(FANCY_UPSAMPLING)
-#define DUAL_SAMPLE_FUNC(FUNC_NAME, FUNC) \
-static void FUNC_NAME(const uint8_t* top_y, const uint8_t* bot_y, \
- const uint8_t* top_u, const uint8_t* top_v, \
- const uint8_t* bot_u, const uint8_t* bot_v, \
- uint8_t* top_dst, uint8_t* bot_dst, int len) { \
- const int half_len = len >> 1; \
- int x; \
- if (top_dst != NULL) { \
- for (x = 0; x < half_len; ++x) { \
- FUNC(top_y[2 * x + 0], top_u[x], top_v[x], top_dst + 8 * x + 0); \
- FUNC(top_y[2 * x + 1], top_u[x], top_v[x], top_dst + 8 * x + 4); \
- } \
- if (len & 1) FUNC(top_y[2 * x + 0], top_u[x], top_v[x], top_dst + 8 * x); \
- } \
- if (bot_dst != NULL) { \
- for (x = 0; x < half_len; ++x) { \
- FUNC(bot_y[2 * x + 0], bot_u[x], bot_v[x], bot_dst + 8 * x + 0); \
- FUNC(bot_y[2 * x + 1], bot_u[x], bot_v[x], bot_dst + 8 * x + 4); \
- } \
- if (len & 1) FUNC(bot_y[2 * x + 0], bot_u[x], bot_v[x], bot_dst + 8 * x); \
- } \
-}
-
-DUAL_SAMPLE_FUNC(DualLineSamplerBGRA, VP8YuvToBgra)
-DUAL_SAMPLE_FUNC(DualLineSamplerARGB, VP8YuvToArgb)
-#undef DUAL_SAMPLE_FUNC
-
-#endif // !FANCY_UPSAMPLING
-
-WebPUpsampleLinePairFunc WebPGetLinePairConverter(int alpha_is_last) {
- WebPInitUpsamplers();
- VP8YUVInit();
-#ifdef FANCY_UPSAMPLING
- return WebPUpsamplers[alpha_is_last ? MODE_BGRA : MODE_ARGB];
-#else
- return (alpha_is_last ? DualLineSamplerBGRA : DualLineSamplerARGB);
-#endif
-}
-
-//------------------------------------------------------------------------------
-// YUV444 converter
-
-#define YUV444_FUNC(FUNC_NAME, FUNC, XSTEP) \
-static void FUNC_NAME(const uint8_t* y, const uint8_t* u, const uint8_t* v, \
- uint8_t* dst, int len) { \
- int i; \
- for (i = 0; i < len; ++i) FUNC(y[i], u[i], v[i], &dst[i * XSTEP]); \
-}
-
-YUV444_FUNC(Yuv444ToRgb, VP8YuvToRgb, 3)
-YUV444_FUNC(Yuv444ToBgr, VP8YuvToBgr, 3)
-YUV444_FUNC(Yuv444ToRgba, VP8YuvToRgba, 4)
-YUV444_FUNC(Yuv444ToBgra, VP8YuvToBgra, 4)
-YUV444_FUNC(Yuv444ToArgb, VP8YuvToArgb, 4)
-YUV444_FUNC(Yuv444ToRgba4444, VP8YuvToRgba4444, 2)
-YUV444_FUNC(Yuv444ToRgb565, VP8YuvToRgb565, 2)
-
-#undef YUV444_FUNC
-
-const WebPYUV444Converter WebPYUV444Converters[MODE_LAST] = {
- Yuv444ToRgb, // MODE_RGB
- Yuv444ToRgba, // MODE_RGBA
- Yuv444ToBgr, // MODE_BGR
- Yuv444ToBgra, // MODE_BGRA
- Yuv444ToArgb, // MODE_ARGB
- Yuv444ToRgba4444, // MODE_RGBA_4444
- Yuv444ToRgb565, // MODE_RGB_565
- Yuv444ToRgba, // MODE_rgbA
- Yuv444ToBgra, // MODE_bgrA
- Yuv444ToArgb, // MODE_Argb
- Yuv444ToRgba4444 // MODE_rgbA_4444
-};
-
-//------------------------------------------------------------------------------
-// Premultiplied modes
-
-// non dithered-modes
-
-// (x * a * 32897) >> 23 is bit-wise equivalent to (int)(x * a / 255.)
-// for all 8bit x or a. For bit-wise equivalence to (int)(x * a / 255. + .5),
-// one can use instead: (x * a * 65793 + (1 << 23)) >> 24
-#if 1 // (int)(x * a / 255.)
-#define MULTIPLIER(a) ((a) * 32897UL)
-#define PREMULTIPLY(x, m) (((x) * (m)) >> 23)
-#else // (int)(x * a / 255. + .5)
-#define MULTIPLIER(a) ((a) * 65793UL)
-#define PREMULTIPLY(x, m) (((x) * (m) + (1UL << 23)) >> 24)
-#endif
-
-static void ApplyAlphaMultiply(uint8_t* rgba, int alpha_first,
- int w, int h, int stride) {
- while (h-- > 0) {
- uint8_t* const rgb = rgba + (alpha_first ? 1 : 0);
- const uint8_t* const alpha = rgba + (alpha_first ? 0 : 3);
- int i;
- for (i = 0; i < w; ++i) {
- const uint32_t a = alpha[4 * i];
- if (a != 0xff) {
- const uint32_t mult = MULTIPLIER(a);
- rgb[4 * i + 0] = PREMULTIPLY(rgb[4 * i + 0], mult);
- rgb[4 * i + 1] = PREMULTIPLY(rgb[4 * i + 1], mult);
- rgb[4 * i + 2] = PREMULTIPLY(rgb[4 * i + 2], mult);
- }
- }
- rgba += stride;
- }
-}
-#undef MULTIPLIER
-#undef PREMULTIPLY
-
-// rgbA4444
-
-#define MULTIPLIER(a) ((a) * 0x1111) // 0x1111 ~= (1 << 16) / 15
-
-static WEBP_INLINE uint8_t dither_hi(uint8_t x) {
- return (x & 0xf0) | (x >> 4);
-}
-
-static WEBP_INLINE uint8_t dither_lo(uint8_t x) {
- return (x & 0x0f) | (x << 4);
-}
-
-static WEBP_INLINE uint8_t multiply(uint8_t x, uint32_t m) {
- return (x * m) >> 16;
-}
-
-static void ApplyAlphaMultiply4444(uint8_t* rgba4444,
- int w, int h, int stride) {
- while (h-- > 0) {
- int i;
- for (i = 0; i < w; ++i) {
- const uint8_t a = (rgba4444[2 * i + 1] & 0x0f);
- const uint32_t mult = MULTIPLIER(a);
- const uint8_t r = multiply(dither_hi(rgba4444[2 * i + 0]), mult);
- const uint8_t g = multiply(dither_lo(rgba4444[2 * i + 0]), mult);
- const uint8_t b = multiply(dither_hi(rgba4444[2 * i + 1]), mult);
- rgba4444[2 * i + 0] = (r & 0xf0) | ((g >> 4) & 0x0f);
- rgba4444[2 * i + 1] = (b & 0xf0) | a;
- }
- rgba4444 += stride;
- }
-}
-#undef MULTIPLIER
-
-void (*WebPApplyAlphaMultiply)(uint8_t*, int, int, int, int)
- = ApplyAlphaMultiply;
-void (*WebPApplyAlphaMultiply4444)(uint8_t*, int, int, int)
- = ApplyAlphaMultiply4444;
-
-//------------------------------------------------------------------------------
-// Main call
-
-void WebPInitUpsamplers(void) {
-#ifdef FANCY_UPSAMPLING
- WebPUpsamplers[MODE_RGB] = UpsampleRgbLinePair;
- WebPUpsamplers[MODE_RGBA] = UpsampleRgbaLinePair;
- WebPUpsamplers[MODE_BGR] = UpsampleBgrLinePair;
- WebPUpsamplers[MODE_BGRA] = UpsampleBgraLinePair;
- WebPUpsamplers[MODE_ARGB] = UpsampleArgbLinePair;
- WebPUpsamplers[MODE_RGBA_4444] = UpsampleRgba4444LinePair;
- WebPUpsamplers[MODE_RGB_565] = UpsampleRgb565LinePair;
-
- // If defined, use CPUInfo() to overwrite some pointers with faster versions.
- if (VP8GetCPUInfo != NULL) {
-#if defined(WEBP_USE_SSE2)
- if (VP8GetCPUInfo(kSSE2)) {
- WebPInitUpsamplersSSE2();
- }
-#endif
- }
-#endif // FANCY_UPSAMPLING
-}
-
-void WebPInitPremultiply(void) {
- WebPApplyAlphaMultiply = ApplyAlphaMultiply;
- WebPApplyAlphaMultiply4444 = ApplyAlphaMultiply4444;
-
-#ifdef FANCY_UPSAMPLING
- WebPUpsamplers[MODE_rgbA] = UpsampleRgbaLinePair;
- WebPUpsamplers[MODE_bgrA] = UpsampleBgraLinePair;
- WebPUpsamplers[MODE_Argb] = UpsampleArgbLinePair;
- WebPUpsamplers[MODE_rgbA_4444] = UpsampleRgba4444LinePair;
-
- if (VP8GetCPUInfo != NULL) {
-#if defined(WEBP_USE_SSE2)
- if (VP8GetCPUInfo(kSSE2)) {
- WebPInitPremultiplySSE2();
- }
-#endif
- }
-#endif // FANCY_UPSAMPLING
-}
-
-#if defined(__cplusplus) || defined(c_plusplus)
-} // extern "C"
-#endif
diff --git a/drivers/webpold/dsp/upsampling_sse2.c b/drivers/webpold/dsp/upsampling_sse2.c
deleted file mode 100644
index 8cb275a02b..0000000000
--- a/drivers/webpold/dsp/upsampling_sse2.c
+++ /dev/null
@@ -1,209 +0,0 @@
-// Copyright 2011 Google Inc. All Rights Reserved.
-//
-// This code is licensed under the same terms as WebM:
-// Software License Agreement: http://www.webmproject.org/license/software/
-// Additional IP Rights Grant: http://www.webmproject.org/license/additional/
-// -----------------------------------------------------------------------------
-//
-// SSE2 version of YUV to RGB upsampling functions.
-//
-// Author: somnath@google.com (Somnath Banerjee)
-
-#include "./dsp.h"
-
-#if defined(WEBP_USE_SSE2)
-
-#include <assert.h>
-#include <emmintrin.h>
-#include <string.h>
-#include "./yuv.h"
-
-#if defined(__cplusplus) || defined(c_plusplus)
-extern "C" {
-#endif
-
-#ifdef FANCY_UPSAMPLING
-
-// We compute (9*a + 3*b + 3*c + d + 8) / 16 as follows
-// u = (9*a + 3*b + 3*c + d + 8) / 16
-// = (a + (a + 3*b + 3*c + d) / 8 + 1) / 2
-// = (a + m + 1) / 2
-// where m = (a + 3*b + 3*c + d) / 8
-// = ((a + b + c + d) / 2 + b + c) / 4
-//
-// Let's say k = (a + b + c + d) / 4.
-// We can compute k as
-// k = (s + t + 1) / 2 - ((a^d) | (b^c) | (s^t)) & 1
-// where s = (a + d + 1) / 2 and t = (b + c + 1) / 2
-//
-// Then m can be written as
-// m = (k + t + 1) / 2 - (((b^c) & (s^t)) | (k^t)) & 1
-
-// Computes out = (k + in + 1) / 2 - ((ij & (s^t)) | (k^in)) & 1
-#define GET_M(ij, in, out) do { \
- const __m128i tmp0 = _mm_avg_epu8(k, (in)); /* (k + in + 1) / 2 */ \
- const __m128i tmp1 = _mm_and_si128((ij), st); /* (ij) & (s^t) */ \
- const __m128i tmp2 = _mm_xor_si128(k, (in)); /* (k^in) */ \
- const __m128i tmp3 = _mm_or_si128(tmp1, tmp2); /* ((ij) & (s^t)) | (k^in) */\
- const __m128i tmp4 = _mm_and_si128(tmp3, one); /* & 1 -> lsb_correction */ \
- (out) = _mm_sub_epi8(tmp0, tmp4); /* (k + in + 1) / 2 - lsb_correction */ \
-} while (0)
-
-// pack and store two alterning pixel rows
-#define PACK_AND_STORE(a, b, da, db, out) do { \
- const __m128i ta = _mm_avg_epu8(a, da); /* (9a + 3b + 3c + d + 8) / 16 */ \
- const __m128i tb = _mm_avg_epu8(b, db); /* (3a + 9b + c + 3d + 8) / 16 */ \
- const __m128i t1 = _mm_unpacklo_epi8(ta, tb); \
- const __m128i t2 = _mm_unpackhi_epi8(ta, tb); \
- _mm_store_si128(((__m128i*)(out)) + 0, t1); \
- _mm_store_si128(((__m128i*)(out)) + 1, t2); \
-} while (0)
-
-// Loads 17 pixels each from rows r1 and r2 and generates 32 pixels.
-#define UPSAMPLE_32PIXELS(r1, r2, out) { \
- const __m128i one = _mm_set1_epi8(1); \
- const __m128i a = _mm_loadu_si128((__m128i*)&(r1)[0]); \
- const __m128i b = _mm_loadu_si128((__m128i*)&(r1)[1]); \
- const __m128i c = _mm_loadu_si128((__m128i*)&(r2)[0]); \
- const __m128i d = _mm_loadu_si128((__m128i*)&(r2)[1]); \
- \
- const __m128i s = _mm_avg_epu8(a, d); /* s = (a + d + 1) / 2 */ \
- const __m128i t = _mm_avg_epu8(b, c); /* t = (b + c + 1) / 2 */ \
- const __m128i st = _mm_xor_si128(s, t); /* st = s^t */ \
- \
- const __m128i ad = _mm_xor_si128(a, d); /* ad = a^d */ \
- const __m128i bc = _mm_xor_si128(b, c); /* bc = b^c */ \
- \
- const __m128i t1 = _mm_or_si128(ad, bc); /* (a^d) | (b^c) */ \
- const __m128i t2 = _mm_or_si128(t1, st); /* (a^d) | (b^c) | (s^t) */ \
- const __m128i t3 = _mm_and_si128(t2, one); /* (a^d) | (b^c) | (s^t) & 1 */ \
- const __m128i t4 = _mm_avg_epu8(s, t); \
- const __m128i k = _mm_sub_epi8(t4, t3); /* k = (a + b + c + d) / 4 */ \
- __m128i diag1, diag2; \
- \
- GET_M(bc, t, diag1); /* diag1 = (a + 3b + 3c + d) / 8 */ \
- GET_M(ad, s, diag2); /* diag2 = (3a + b + c + 3d) / 8 */ \
- \
- /* pack the alternate pixels */ \
- PACK_AND_STORE(a, b, diag1, diag2, &(out)[0 * 32]); \
- PACK_AND_STORE(c, d, diag2, diag1, &(out)[2 * 32]); \
-}
-
-// Turn the macro into a function for reducing code-size when non-critical
-static void Upsample32Pixels(const uint8_t r1[], const uint8_t r2[],
- uint8_t* const out) {
- UPSAMPLE_32PIXELS(r1, r2, out);
-}
-
-#define UPSAMPLE_LAST_BLOCK(tb, bb, num_pixels, out) { \
- uint8_t r1[17], r2[17]; \
- memcpy(r1, (tb), (num_pixels)); \
- memcpy(r2, (bb), (num_pixels)); \
- /* replicate last byte */ \
- memset(r1 + (num_pixels), r1[(num_pixels) - 1], 17 - (num_pixels)); \
- memset(r2 + (num_pixels), r2[(num_pixels) - 1], 17 - (num_pixels)); \
- /* using the shared function instead of the macro saves ~3k code size */ \
- Upsample32Pixels(r1, r2, out); \
-}
-
-#define CONVERT2RGB(FUNC, XSTEP, top_y, bottom_y, uv, \
- top_dst, bottom_dst, cur_x, num_pixels) { \
- int n; \
- if (top_y) { \
- for (n = 0; n < (num_pixels); ++n) { \
- FUNC(top_y[(cur_x) + n], (uv)[n], (uv)[32 + n], \
- top_dst + ((cur_x) + n) * XSTEP); \
- } \
- } \
- if (bottom_y) { \
- for (n = 0; n < (num_pixels); ++n) { \
- FUNC(bottom_y[(cur_x) + n], (uv)[64 + n], (uv)[64 + 32 + n], \
- bottom_dst + ((cur_x) + n) * XSTEP); \
- } \
- } \
-}
-
-#define SSE2_UPSAMPLE_FUNC(FUNC_NAME, FUNC, XSTEP) \
-static void FUNC_NAME(const uint8_t* top_y, const uint8_t* bottom_y, \
- const uint8_t* top_u, const uint8_t* top_v, \
- const uint8_t* cur_u, const uint8_t* cur_v, \
- uint8_t* top_dst, uint8_t* bottom_dst, int len) { \
- int b; \
- /* 16 byte aligned array to cache reconstructed u and v */ \
- uint8_t uv_buf[4 * 32 + 15]; \
- uint8_t* const r_uv = (uint8_t*)((uintptr_t)(uv_buf + 15) & ~15); \
- const int uv_len = (len + 1) >> 1; \
- /* 17 pixels must be read-able for each block */ \
- const int num_blocks = (uv_len - 1) >> 4; \
- const int leftover = uv_len - num_blocks * 16; \
- const int last_pos = 1 + 32 * num_blocks; \
- \
- const int u_diag = ((top_u[0] + cur_u[0]) >> 1) + 1; \
- const int v_diag = ((top_v[0] + cur_v[0]) >> 1) + 1; \
- \
- assert(len > 0); \
- /* Treat the first pixel in regular way */ \
- if (top_y) { \
- const int u0 = (top_u[0] + u_diag) >> 1; \
- const int v0 = (top_v[0] + v_diag) >> 1; \
- FUNC(top_y[0], u0, v0, top_dst); \
- } \
- if (bottom_y) { \
- const int u0 = (cur_u[0] + u_diag) >> 1; \
- const int v0 = (cur_v[0] + v_diag) >> 1; \
- FUNC(bottom_y[0], u0, v0, bottom_dst); \
- } \
- \
- for (b = 0; b < num_blocks; ++b) { \
- UPSAMPLE_32PIXELS(top_u, cur_u, r_uv + 0 * 32); \
- UPSAMPLE_32PIXELS(top_v, cur_v, r_uv + 1 * 32); \
- CONVERT2RGB(FUNC, XSTEP, top_y, bottom_y, r_uv, top_dst, bottom_dst, \
- 32 * b + 1, 32) \
- top_u += 16; \
- cur_u += 16; \
- top_v += 16; \
- cur_v += 16; \
- } \
- \
- UPSAMPLE_LAST_BLOCK(top_u, cur_u, leftover, r_uv + 0 * 32); \
- UPSAMPLE_LAST_BLOCK(top_v, cur_v, leftover, r_uv + 1 * 32); \
- CONVERT2RGB(FUNC, XSTEP, top_y, bottom_y, r_uv, top_dst, bottom_dst, \
- last_pos, len - last_pos); \
-}
-
-// SSE2 variants of the fancy upsampler.
-SSE2_UPSAMPLE_FUNC(UpsampleRgbLinePairSSE2, VP8YuvToRgb, 3)
-SSE2_UPSAMPLE_FUNC(UpsampleBgrLinePairSSE2, VP8YuvToBgr, 3)
-SSE2_UPSAMPLE_FUNC(UpsampleRgbaLinePairSSE2, VP8YuvToRgba, 4)
-SSE2_UPSAMPLE_FUNC(UpsampleBgraLinePairSSE2, VP8YuvToBgra, 4)
-
-#undef GET_M
-#undef PACK_AND_STORE
-#undef UPSAMPLE_32PIXELS
-#undef UPSAMPLE_LAST_BLOCK
-#undef CONVERT2RGB
-#undef SSE2_UPSAMPLE_FUNC
-
-//------------------------------------------------------------------------------
-
-extern WebPUpsampleLinePairFunc WebPUpsamplers[/* MODE_LAST */];
-
-void WebPInitUpsamplersSSE2(void) {
- WebPUpsamplers[MODE_RGB] = UpsampleRgbLinePairSSE2;
- WebPUpsamplers[MODE_RGBA] = UpsampleRgbaLinePairSSE2;
- WebPUpsamplers[MODE_BGR] = UpsampleBgrLinePairSSE2;
- WebPUpsamplers[MODE_BGRA] = UpsampleBgraLinePairSSE2;
-}
-
-void WebPInitPremultiplySSE2(void) {
- WebPUpsamplers[MODE_rgbA] = UpsampleRgbaLinePairSSE2;
- WebPUpsamplers[MODE_bgrA] = UpsampleBgraLinePairSSE2;
-}
-
-#endif // FANCY_UPSAMPLING
-
-#if defined(__cplusplus) || defined(c_plusplus)
-} // extern "C"
-#endif
-
-#endif // WEBP_USE_SSE2
diff --git a/drivers/webpold/dsp/yuv.c b/drivers/webpold/dsp/yuv.c
deleted file mode 100644
index 7f05f9a3aa..0000000000
--- a/drivers/webpold/dsp/yuv.c
+++ /dev/null
@@ -1,52 +0,0 @@
-// Copyright 2010 Google Inc. All Rights Reserved.
-//
-// This code is licensed under the same terms as WebM:
-// Software License Agreement: http://www.webmproject.org/license/software/
-// Additional IP Rights Grant: http://www.webmproject.org/license/additional/
-// -----------------------------------------------------------------------------
-//
-// YUV->RGB conversion function
-//
-// Author: Skal (pascal.massimino@gmail.com)
-
-#include "./yuv.h"
-
-#if defined(__cplusplus) || defined(c_plusplus)
-extern "C" {
-#endif
-
-enum { YUV_HALF = 1 << (YUV_FIX - 1) };
-
-int16_t VP8kVToR[256], VP8kUToB[256];
-int32_t VP8kVToG[256], VP8kUToG[256];
-uint8_t VP8kClip[YUV_RANGE_MAX - YUV_RANGE_MIN];
-uint8_t VP8kClip4Bits[YUV_RANGE_MAX - YUV_RANGE_MIN];
-
-static int done = 0;
-
-static WEBP_INLINE uint8_t clip(int v, int max_value) {
- return v < 0 ? 0 : v > max_value ? max_value : v;
-}
-
-void VP8YUVInit(void) {
- int i;
- if (done) {
- return;
- }
- for (i = 0; i < 256; ++i) {
- VP8kVToR[i] = (89858 * (i - 128) + YUV_HALF) >> YUV_FIX;
- VP8kUToG[i] = -22014 * (i - 128) + YUV_HALF;
- VP8kVToG[i] = -45773 * (i - 128);
- VP8kUToB[i] = (113618 * (i - 128) + YUV_HALF) >> YUV_FIX;
- }
- for (i = YUV_RANGE_MIN; i < YUV_RANGE_MAX; ++i) {
- const int k = ((i - 16) * 76283 + YUV_HALF) >> YUV_FIX;
- VP8kClip[i - YUV_RANGE_MIN] = clip(k, 255);
- VP8kClip4Bits[i - YUV_RANGE_MIN] = clip((k + 8) >> 4, 15);
- }
- done = 1;
-}
-
-#if defined(__cplusplus) || defined(c_plusplus)
-} // extern "C"
-#endif
diff --git a/drivers/webpold/dsp/yuv.h b/drivers/webpold/dsp/yuv.h
deleted file mode 100644
index a569109c54..0000000000
--- a/drivers/webpold/dsp/yuv.h
+++ /dev/null
@@ -1,128 +0,0 @@
-// Copyright 2010 Google Inc. All Rights Reserved.
-//
-// This code is licensed under the same terms as WebM:
-// Software License Agreement: http://www.webmproject.org/license/software/
-// Additional IP Rights Grant: http://www.webmproject.org/license/additional/
-// -----------------------------------------------------------------------------
-//
-// inline YUV<->RGB conversion function
-//
-// Author: Skal (pascal.massimino@gmail.com)
-
-#ifndef WEBP_DSP_YUV_H_
-#define WEBP_DSP_YUV_H_
-
-#include "../dec/decode_vp8.h"
-
-//------------------------------------------------------------------------------
-// YUV -> RGB conversion
-
-#if defined(__cplusplus) || defined(c_plusplus)
-extern "C" {
-#endif
-
-enum { YUV_FIX = 16, // fixed-point precision
- YUV_RANGE_MIN = -227, // min value of r/g/b output
- YUV_RANGE_MAX = 256 + 226 // max value of r/g/b output
-};
-extern int16_t VP8kVToR[256], VP8kUToB[256];
-extern int32_t VP8kVToG[256], VP8kUToG[256];
-extern uint8_t VP8kClip[YUV_RANGE_MAX - YUV_RANGE_MIN];
-extern uint8_t VP8kClip4Bits[YUV_RANGE_MAX - YUV_RANGE_MIN];
-
-static WEBP_INLINE void VP8YuvToRgb(uint8_t y, uint8_t u, uint8_t v,
- uint8_t* const rgb) {
- const int r_off = VP8kVToR[v];
- const int g_off = (VP8kVToG[v] + VP8kUToG[u]) >> YUV_FIX;
- const int b_off = VP8kUToB[u];
- rgb[0] = VP8kClip[y + r_off - YUV_RANGE_MIN];
- rgb[1] = VP8kClip[y + g_off - YUV_RANGE_MIN];
- rgb[2] = VP8kClip[y + b_off - YUV_RANGE_MIN];
-}
-
-static WEBP_INLINE void VP8YuvToRgb565(uint8_t y, uint8_t u, uint8_t v,
- uint8_t* const rgb) {
- const int r_off = VP8kVToR[v];
- const int g_off = (VP8kVToG[v] + VP8kUToG[u]) >> YUV_FIX;
- const int b_off = VP8kUToB[u];
- rgb[0] = ((VP8kClip[y + r_off - YUV_RANGE_MIN] & 0xf8) |
- (VP8kClip[y + g_off - YUV_RANGE_MIN] >> 5));
- rgb[1] = (((VP8kClip[y + g_off - YUV_RANGE_MIN] << 3) & 0xe0) |
- (VP8kClip[y + b_off - YUV_RANGE_MIN] >> 3));
-}
-
-static WEBP_INLINE void VP8YuvToArgb(uint8_t y, uint8_t u, uint8_t v,
- uint8_t* const argb) {
- argb[0] = 0xff;
- VP8YuvToRgb(y, u, v, argb + 1);
-}
-
-static WEBP_INLINE void VP8YuvToRgba4444(uint8_t y, uint8_t u, uint8_t v,
- uint8_t* const argb) {
- const int r_off = VP8kVToR[v];
- const int g_off = (VP8kVToG[v] + VP8kUToG[u]) >> YUV_FIX;
- const int b_off = VP8kUToB[u];
- // Don't update alpha (last 4 bits of argb[1])
- argb[0] = ((VP8kClip4Bits[y + r_off - YUV_RANGE_MIN] << 4) |
- VP8kClip4Bits[y + g_off - YUV_RANGE_MIN]);
- argb[1] = 0x0f | (VP8kClip4Bits[y + b_off - YUV_RANGE_MIN] << 4);
-}
-
-static WEBP_INLINE void VP8YuvToBgr(uint8_t y, uint8_t u, uint8_t v,
- uint8_t* const bgr) {
- const int r_off = VP8kVToR[v];
- const int g_off = (VP8kVToG[v] + VP8kUToG[u]) >> YUV_FIX;
- const int b_off = VP8kUToB[u];
- bgr[0] = VP8kClip[y + b_off - YUV_RANGE_MIN];
- bgr[1] = VP8kClip[y + g_off - YUV_RANGE_MIN];
- bgr[2] = VP8kClip[y + r_off - YUV_RANGE_MIN];
-}
-
-static WEBP_INLINE void VP8YuvToBgra(uint8_t y, uint8_t u, uint8_t v,
- uint8_t* const bgra) {
- VP8YuvToBgr(y, u, v, bgra);
- bgra[3] = 0xff;
-}
-
-static WEBP_INLINE void VP8YuvToRgba(uint8_t y, uint8_t u, uint8_t v,
- uint8_t* const rgba) {
- VP8YuvToRgb(y, u, v, rgba);
- rgba[3] = 0xff;
-}
-
-// Must be called before everything, to initialize the tables.
-void VP8YUVInit(void);
-
-//------------------------------------------------------------------------------
-// RGB -> YUV conversion
-// The exact naming is Y'CbCr, following the ITU-R BT.601 standard.
-// More information at: http://en.wikipedia.org/wiki/YCbCr
-// Y = 0.2569 * R + 0.5044 * G + 0.0979 * B + 16
-// U = -0.1483 * R - 0.2911 * G + 0.4394 * B + 128
-// V = 0.4394 * R - 0.3679 * G - 0.0715 * B + 128
-// We use 16bit fixed point operations.
-
-static WEBP_INLINE int VP8ClipUV(int v) {
- v = (v + (257 << (YUV_FIX + 2 - 1))) >> (YUV_FIX + 2);
- return ((v & ~0xff) == 0) ? v : (v < 0) ? 0 : 255;
-}
-
-static WEBP_INLINE int VP8RGBToY(int r, int g, int b) {
- const int kRound = (1 << (YUV_FIX - 1)) + (16 << YUV_FIX);
- const int luma = 16839 * r + 33059 * g + 6420 * b;
- return (luma + kRound) >> YUV_FIX; // no need to clip
-}
-
-static WEBP_INLINE int VP8RGBToU(int r, int g, int b) {
- return VP8ClipUV(-9719 * r - 19081 * g + 28800 * b);
-}
-
-static WEBP_INLINE int VP8RGBToV(int r, int g, int b) {
- return VP8ClipUV(+28800 * r - 24116 * g - 4684 * b);
-}
-
-#if defined(__cplusplus) || defined(c_plusplus)
-} // extern "C"
-#endif
-
-#endif /* WEBP_DSP_YUV_H_ */
diff --git a/drivers/webpold/enc/alpha.c b/drivers/webpold/enc/alpha.c
deleted file mode 100644
index e554eb7f30..0000000000
--- a/drivers/webpold/enc/alpha.c
+++ /dev/null
@@ -1,330 +0,0 @@
-// Copyright 2011 Google Inc. All Rights Reserved.
-//
-// This code is licensed under the same terms as WebM:
-// Software License Agreement: http://www.webmproject.org/license/software/
-// Additional IP Rights Grant: http://www.webmproject.org/license/additional/
-// -----------------------------------------------------------------------------
-//
-// Alpha-plane compression.
-//
-// Author: Skal (pascal.massimino@gmail.com)
-
-#include <assert.h>
-#include <stdlib.h>
-
-#include "./vp8enci.h"
-#include "../utils/filters.h"
-#include "../utils/quant_levels.h"
-#include "../format_constants.h"
-
-#if defined(__cplusplus) || defined(c_plusplus)
-extern "C" {
-#endif
-
-// -----------------------------------------------------------------------------
-// Encodes the given alpha data via specified compression method 'method'.
-// The pre-processing (quantization) is performed if 'quality' is less than 100.
-// For such cases, the encoding is lossy. The valid range is [0, 100] for
-// 'quality' and [0, 1] for 'method':
-// 'method = 0' - No compression;
-// 'method = 1' - Use lossless coder on the alpha plane only
-// 'filter' values [0, 4] correspond to prediction modes none, horizontal,
-// vertical & gradient filters. The prediction mode 4 will try all the
-// prediction modes 0 to 3 and pick the best one.
-// 'effort_level': specifies how much effort must be spent to try and reduce
-// the compressed output size. In range 0 (quick) to 6 (slow).
-//
-// 'output' corresponds to the buffer containing compressed alpha data.
-// This buffer is allocated by this method and caller should call
-// free(*output) when done.
-// 'output_size' corresponds to size of this compressed alpha buffer.
-//
-// Returns 1 on successfully encoding the alpha and
-// 0 if either:
-// invalid quality or method, or
-// memory allocation for the compressed data fails.
-
-#include "../enc/vp8li.h"
-
-static int EncodeLossless(const uint8_t* const data, int width, int height,
- int effort_level, // in [0..6] range
- VP8BitWriter* const bw,
- WebPAuxStats* const stats) {
- int ok = 0;
- WebPConfig config;
- WebPPicture picture;
- VP8LBitWriter tmp_bw;
-
- WebPPictureInit(&picture);
- picture.width = width;
- picture.height = height;
- picture.use_argb = 1;
- picture.stats = stats;
- if (!WebPPictureAlloc(&picture)) return 0;
-
- // Transfer the alpha values to the green channel.
- {
- int i, j;
- uint32_t* dst = picture.argb;
- const uint8_t* src = data;
- for (j = 0; j < picture.height; ++j) {
- for (i = 0; i < picture.width; ++i) {
- dst[i] = (src[i] << 8) | 0xff000000u;
- }
- src += width;
- dst += picture.argb_stride;
- }
- }
-
- WebPConfigInit(&config);
- config.lossless = 1;
- config.method = effort_level; // impact is very small
- // Set moderate default quality setting for alpha. Higher qualities (80 and
- // above) could be very slow.
- config.quality = 10.f + 15.f * effort_level;
- if (config.quality > 100.f) config.quality = 100.f;
-
- ok = VP8LBitWriterInit(&tmp_bw, (width * height) >> 3);
- ok = ok && (VP8LEncodeStream(&config, &picture, &tmp_bw) == VP8_ENC_OK);
- WebPPictureFree(&picture);
- if (ok) {
- const uint8_t* const data = VP8LBitWriterFinish(&tmp_bw);
- const size_t data_size = VP8LBitWriterNumBytes(&tmp_bw);
- VP8BitWriterAppend(bw, data, data_size);
- }
- VP8LBitWriterDestroy(&tmp_bw);
- return ok && !bw->error_;
-}
-
-// -----------------------------------------------------------------------------
-
-static int EncodeAlphaInternal(const uint8_t* const data, int width, int height,
- int method, int filter, int reduce_levels,
- int effort_level, // in [0..6] range
- uint8_t* const tmp_alpha,
- VP8BitWriter* const bw,
- WebPAuxStats* const stats) {
- int ok = 0;
- const uint8_t* alpha_src;
- WebPFilterFunc filter_func;
- uint8_t header;
- size_t expected_size;
- const size_t data_size = width * height;
-
- assert((uint64_t)data_size == (uint64_t)width * height); // as per spec
- assert(filter >= 0 && filter < WEBP_FILTER_LAST);
- assert(method >= ALPHA_NO_COMPRESSION);
- assert(method <= ALPHA_LOSSLESS_COMPRESSION);
- assert(sizeof(header) == ALPHA_HEADER_LEN);
- // TODO(skal): have a common function and #define's to validate alpha params.
-
- expected_size =
- (method == ALPHA_NO_COMPRESSION) ? (ALPHA_HEADER_LEN + data_size)
- : (data_size >> 5);
- header = method | (filter << 2);
- if (reduce_levels) header |= ALPHA_PREPROCESSED_LEVELS << 4;
-
- VP8BitWriterInit(bw, expected_size);
- VP8BitWriterAppend(bw, &header, ALPHA_HEADER_LEN);
-
- filter_func = WebPFilters[filter];
- if (filter_func) {
- filter_func(data, width, height, 1, width, tmp_alpha);
- alpha_src = tmp_alpha;
- } else {
- alpha_src = data;
- }
-
- if (method == ALPHA_NO_COMPRESSION) {
- ok = VP8BitWriterAppend(bw, alpha_src, width * height);
- ok = ok && !bw->error_;
- } else {
- ok = EncodeLossless(alpha_src, width, height, effort_level, bw, stats);
- VP8BitWriterFinish(bw);
- }
- return ok;
-}
-
-// -----------------------------------------------------------------------------
-
-// TODO(skal): move to dsp/ ?
-static void CopyPlane(const uint8_t* src, int src_stride,
- uint8_t* dst, int dst_stride, int width, int height) {
- while (height-- > 0) {
- memcpy(dst, src, width);
- src += src_stride;
- dst += dst_stride;
- }
-}
-
-static int EncodeAlpha(VP8Encoder* const enc,
- int quality, int method, int filter,
- int effort_level,
- uint8_t** const output, size_t* const output_size) {
- const WebPPicture* const pic = enc->pic_;
- const int width = pic->width;
- const int height = pic->height;
-
- uint8_t* quant_alpha = NULL;
- const size_t data_size = width * height;
- uint64_t sse = 0;
- int ok = 1;
- const int reduce_levels = (quality < 100);
-
- // quick sanity checks
- assert((uint64_t)data_size == (uint64_t)width * height); // as per spec
- assert(enc != NULL && pic != NULL && pic->a != NULL);
- assert(output != NULL && output_size != NULL);
- assert(width > 0 && height > 0);
- assert(pic->a_stride >= width);
- assert(filter >= WEBP_FILTER_NONE && filter <= WEBP_FILTER_FAST);
-
- if (quality < 0 || quality > 100) {
- return 0;
- }
-
- if (method < ALPHA_NO_COMPRESSION || method > ALPHA_LOSSLESS_COMPRESSION) {
- return 0;
- }
-
- quant_alpha = (uint8_t*)malloc(data_size);
- if (quant_alpha == NULL) {
- return 0;
- }
-
- // Extract alpha data (width x height) from raw_data (stride x height).
- CopyPlane(pic->a, pic->a_stride, quant_alpha, width, width, height);
-
- if (reduce_levels) { // No Quantization required for 'quality = 100'.
- // 16 alpha levels gives quite a low MSE w.r.t original alpha plane hence
- // mapped to moderate quality 70. Hence Quality:[0, 70] -> Levels:[2, 16]
- // and Quality:]70, 100] -> Levels:]16, 256].
- const int alpha_levels = (quality <= 70) ? (2 + quality / 5)
- : (16 + (quality - 70) * 8);
- ok = QuantizeLevels(quant_alpha, width, height, alpha_levels, &sse);
- }
-
- if (ok) {
- VP8BitWriter bw;
- int test_filter;
- uint8_t* filtered_alpha = NULL;
-
- // We always test WEBP_FILTER_NONE first.
- ok = EncodeAlphaInternal(quant_alpha, width, height,
- method, WEBP_FILTER_NONE, reduce_levels,
- effort_level, NULL, &bw, pic->stats);
- if (!ok) {
- VP8BitWriterWipeOut(&bw);
- goto End;
- }
-
- if (filter == WEBP_FILTER_FAST) { // Quick estimate of a second candidate?
- filter = EstimateBestFilter(quant_alpha, width, height, width);
- }
- // Stop?
- if (filter == WEBP_FILTER_NONE) {
- goto Ok;
- }
-
- filtered_alpha = (uint8_t*)malloc(data_size);
- ok = (filtered_alpha != NULL);
- if (!ok) {
- goto End;
- }
-
- // Try the other mode(s).
- {
- WebPAuxStats best_stats;
- size_t best_score = VP8BitWriterSize(&bw);
-
- memset(&best_stats, 0, sizeof(best_stats)); // prevent spurious warning
- if (pic->stats != NULL) best_stats = *pic->stats;
- for (test_filter = WEBP_FILTER_HORIZONTAL;
- ok && (test_filter <= WEBP_FILTER_GRADIENT);
- ++test_filter) {
- VP8BitWriter tmp_bw;
- if (filter != WEBP_FILTER_BEST && test_filter != filter) {
- continue;
- }
- ok = EncodeAlphaInternal(quant_alpha, width, height,
- method, test_filter, reduce_levels,
- effort_level, filtered_alpha, &tmp_bw,
- pic->stats);
- if (ok) {
- const size_t score = VP8BitWriterSize(&tmp_bw);
- if (score < best_score) {
- // swap bitwriter objects.
- VP8BitWriter tmp = tmp_bw;
- tmp_bw = bw;
- bw = tmp;
- best_score = score;
- if (pic->stats != NULL) best_stats = *pic->stats;
- }
- } else {
- VP8BitWriterWipeOut(&bw);
- }
- VP8BitWriterWipeOut(&tmp_bw);
- }
- if (pic->stats != NULL) *pic->stats = best_stats;
- }
- Ok:
- if (ok) {
- *output_size = VP8BitWriterSize(&bw);
- *output = VP8BitWriterBuf(&bw);
- if (pic->stats != NULL) { // need stats?
- pic->stats->coded_size += (int)(*output_size);
- enc->sse_[3] = sse;
- }
- }
- free(filtered_alpha);
- }
- End:
- free(quant_alpha);
- return ok;
-}
-
-
-//------------------------------------------------------------------------------
-// Main calls
-
-void VP8EncInitAlpha(VP8Encoder* const enc) {
- enc->has_alpha_ = WebPPictureHasTransparency(enc->pic_);
- enc->alpha_data_ = NULL;
- enc->alpha_data_size_ = 0;
-}
-
-int VP8EncFinishAlpha(VP8Encoder* const enc) {
- if (enc->has_alpha_) {
- const WebPConfig* config = enc->config_;
- uint8_t* tmp_data = NULL;
- size_t tmp_size = 0;
- const int effort_level = config->method; // maps to [0..6]
- const WEBP_FILTER_TYPE filter =
- (config->alpha_filtering == 0) ? WEBP_FILTER_NONE :
- (config->alpha_filtering == 1) ? WEBP_FILTER_FAST :
- WEBP_FILTER_BEST;
-
- if (!EncodeAlpha(enc, config->alpha_quality, config->alpha_compression,
- filter, effort_level, &tmp_data, &tmp_size)) {
- return 0;
- }
- if (tmp_size != (uint32_t)tmp_size) { // Sanity check.
- free(tmp_data);
- return 0;
- }
- enc->alpha_data_size_ = (uint32_t)tmp_size;
- enc->alpha_data_ = tmp_data;
- }
- return WebPReportProgress(enc->pic_, enc->percent_ + 20, &enc->percent_);
-}
-
-void VP8EncDeleteAlpha(VP8Encoder* const enc) {
- free(enc->alpha_data_);
- enc->alpha_data_ = NULL;
- enc->alpha_data_size_ = 0;
- enc->has_alpha_ = 0;
-}
-
-#if defined(__cplusplus) || defined(c_plusplus)
-} // extern "C"
-#endif
diff --git a/drivers/webpold/enc/analysis.c b/drivers/webpold/enc/analysis.c
deleted file mode 100644
index 22cfb492e7..0000000000
--- a/drivers/webpold/enc/analysis.c
+++ /dev/null
@@ -1,364 +0,0 @@
-// Copyright 2011 Google Inc. All Rights Reserved.
-//
-// This code is licensed under the same terms as WebM:
-// Software License Agreement: http://www.webmproject.org/license/software/
-// Additional IP Rights Grant: http://www.webmproject.org/license/additional/
-// -----------------------------------------------------------------------------
-//
-// Macroblock analysis
-//
-// Author: Skal (pascal.massimino@gmail.com)
-
-#include <stdlib.h>
-#include <string.h>
-#include <assert.h>
-
-#include "./vp8enci.h"
-#include "./cost.h"
-#include "../utils/utils.h"
-
-#if defined(__cplusplus) || defined(c_plusplus)
-extern "C" {
-#endif
-
-#define MAX_ITERS_K_MEANS 6
-
-static int ClipAlpha(int alpha) {
- return alpha < 0 ? 0 : alpha > 255 ? 255 : alpha;
-}
-
-//------------------------------------------------------------------------------
-// Smooth the segment map by replacing isolated block by the majority of its
-// neighbours.
-
-static void SmoothSegmentMap(VP8Encoder* const enc) {
- int n, x, y;
- const int w = enc->mb_w_;
- const int h = enc->mb_h_;
- const int majority_cnt_3_x_3_grid = 5;
- uint8_t* const tmp = (uint8_t*)WebPSafeMalloc((uint64_t)w * h, sizeof(*tmp));
- assert((uint64_t)(w * h) == (uint64_t)w * h); // no overflow, as per spec
-
- if (tmp == NULL) return;
- for (y = 1; y < h - 1; ++y) {
- for (x = 1; x < w - 1; ++x) {
- int cnt[NUM_MB_SEGMENTS] = { 0 };
- const VP8MBInfo* const mb = &enc->mb_info_[x + w * y];
- int majority_seg = mb->segment_;
- // Check the 8 neighbouring segment values.
- cnt[mb[-w - 1].segment_]++; // top-left
- cnt[mb[-w + 0].segment_]++; // top
- cnt[mb[-w + 1].segment_]++; // top-right
- cnt[mb[ - 1].segment_]++; // left
- cnt[mb[ + 1].segment_]++; // right
- cnt[mb[ w - 1].segment_]++; // bottom-left
- cnt[mb[ w + 0].segment_]++; // bottom
- cnt[mb[ w + 1].segment_]++; // bottom-right
- for (n = 0; n < NUM_MB_SEGMENTS; ++n) {
- if (cnt[n] >= majority_cnt_3_x_3_grid) {
- majority_seg = n;
- }
- }
- tmp[x + y * w] = majority_seg;
- }
- }
- for (y = 1; y < h - 1; ++y) {
- for (x = 1; x < w - 1; ++x) {
- VP8MBInfo* const mb = &enc->mb_info_[x + w * y];
- mb->segment_ = tmp[x + y * w];
- }
- }
- free(tmp);
-}
-
-//------------------------------------------------------------------------------
-// Finalize Segment probability based on the coding tree
-
-static int GetProba(int a, int b) {
- int proba;
- const int total = a + b;
- if (total == 0) return 255; // that's the default probability.
- proba = (255 * a + total / 2) / total;
- return proba;
-}
-
-static void SetSegmentProbas(VP8Encoder* const enc) {
- int p[NUM_MB_SEGMENTS] = { 0 };
- int n;
-
- for (n = 0; n < enc->mb_w_ * enc->mb_h_; ++n) {
- const VP8MBInfo* const mb = &enc->mb_info_[n];
- p[mb->segment_]++;
- }
- if (enc->pic_->stats) {
- for (n = 0; n < NUM_MB_SEGMENTS; ++n) {
- enc->pic_->stats->segment_size[n] = p[n];
- }
- }
- if (enc->segment_hdr_.num_segments_ > 1) {
- uint8_t* const probas = enc->proba_.segments_;
- probas[0] = GetProba(p[0] + p[1], p[2] + p[3]);
- probas[1] = GetProba(p[0], p[1]);
- probas[2] = GetProba(p[2], p[3]);
-
- enc->segment_hdr_.update_map_ =
- (probas[0] != 255) || (probas[1] != 255) || (probas[2] != 255);
- enc->segment_hdr_.size_ =
- p[0] * (VP8BitCost(0, probas[0]) + VP8BitCost(0, probas[1])) +
- p[1] * (VP8BitCost(0, probas[0]) + VP8BitCost(1, probas[1])) +
- p[2] * (VP8BitCost(1, probas[0]) + VP8BitCost(0, probas[2])) +
- p[3] * (VP8BitCost(1, probas[0]) + VP8BitCost(1, probas[2]));
- } else {
- enc->segment_hdr_.update_map_ = 0;
- enc->segment_hdr_.size_ = 0;
- }
-}
-
-static WEBP_INLINE int clip(int v, int m, int M) {
- return v < m ? m : v > M ? M : v;
-}
-
-static void SetSegmentAlphas(VP8Encoder* const enc,
- const int centers[NUM_MB_SEGMENTS],
- int mid) {
- const int nb = enc->segment_hdr_.num_segments_;
- int min = centers[0], max = centers[0];
- int n;
-
- if (nb > 1) {
- for (n = 0; n < nb; ++n) {
- if (min > centers[n]) min = centers[n];
- if (max < centers[n]) max = centers[n];
- }
- }
- if (max == min) max = min + 1;
- assert(mid <= max && mid >= min);
- for (n = 0; n < nb; ++n) {
- const int alpha = 255 * (centers[n] - mid) / (max - min);
- const int beta = 255 * (centers[n] - min) / (max - min);
- enc->dqm_[n].alpha_ = clip(alpha, -127, 127);
- enc->dqm_[n].beta_ = clip(beta, 0, 255);
- }
-}
-
-//------------------------------------------------------------------------------
-// Simplified k-Means, to assign Nb segments based on alpha-histogram
-
-static void AssignSegments(VP8Encoder* const enc, const int alphas[256]) {
- const int nb = enc->segment_hdr_.num_segments_;
- int centers[NUM_MB_SEGMENTS];
- int weighted_average = 0;
- int map[256];
- int a, n, k;
- int min_a = 0, max_a = 255, range_a;
- // 'int' type is ok for histo, and won't overflow
- int accum[NUM_MB_SEGMENTS], dist_accum[NUM_MB_SEGMENTS];
-
- // bracket the input
- for (n = 0; n < 256 && alphas[n] == 0; ++n) {}
- min_a = n;
- for (n = 255; n > min_a && alphas[n] == 0; --n) {}
- max_a = n;
- range_a = max_a - min_a;
-
- // Spread initial centers evenly
- for (n = 1, k = 0; n < 2 * nb; n += 2) {
- centers[k++] = min_a + (n * range_a) / (2 * nb);
- }
-
- for (k = 0; k < MAX_ITERS_K_MEANS; ++k) { // few iters are enough
- int total_weight;
- int displaced;
- // Reset stats
- for (n = 0; n < nb; ++n) {
- accum[n] = 0;
- dist_accum[n] = 0;
- }
- // Assign nearest center for each 'a'
- n = 0; // track the nearest center for current 'a'
- for (a = min_a; a <= max_a; ++a) {
- if (alphas[a]) {
- while (n < nb - 1 && abs(a - centers[n + 1]) < abs(a - centers[n])) {
- n++;
- }
- map[a] = n;
- // accumulate contribution into best centroid
- dist_accum[n] += a * alphas[a];
- accum[n] += alphas[a];
- }
- }
- // All point are classified. Move the centroids to the
- // center of their respective cloud.
- displaced = 0;
- weighted_average = 0;
- total_weight = 0;
- for (n = 0; n < nb; ++n) {
- if (accum[n]) {
- const int new_center = (dist_accum[n] + accum[n] / 2) / accum[n];
- displaced += abs(centers[n] - new_center);
- centers[n] = new_center;
- weighted_average += new_center * accum[n];
- total_weight += accum[n];
- }
- }
- weighted_average = (weighted_average + total_weight / 2) / total_weight;
- if (displaced < 5) break; // no need to keep on looping...
- }
-
- // Map each original value to the closest centroid
- for (n = 0; n < enc->mb_w_ * enc->mb_h_; ++n) {
- VP8MBInfo* const mb = &enc->mb_info_[n];
- const int alpha = mb->alpha_;
- mb->segment_ = map[alpha];
- mb->alpha_ = centers[map[alpha]]; // just for the record.
- }
-
- if (nb > 1) {
- const int smooth = (enc->config_->preprocessing & 1);
- if (smooth) SmoothSegmentMap(enc);
- }
-
- SetSegmentProbas(enc); // Assign final proba
- SetSegmentAlphas(enc, centers, weighted_average); // pick some alphas.
-}
-
-//------------------------------------------------------------------------------
-// Macroblock analysis: collect histogram for each mode, deduce the maximal
-// susceptibility and set best modes for this macroblock.
-// Segment assignment is done later.
-
-// Number of modes to inspect for alpha_ evaluation. For high-quality settings,
-// we don't need to test all the possible modes during the analysis phase.
-#define MAX_INTRA16_MODE 2
-#define MAX_INTRA4_MODE 2
-#define MAX_UV_MODE 2
-
-static int MBAnalyzeBestIntra16Mode(VP8EncIterator* const it) {
- const int max_mode = (it->enc_->method_ >= 3) ? MAX_INTRA16_MODE : 4;
- int mode;
- int best_alpha = -1;
- int best_mode = 0;
-
- VP8MakeLuma16Preds(it);
- for (mode = 0; mode < max_mode; ++mode) {
- const int alpha = VP8CollectHistogram(it->yuv_in_ + Y_OFF,
- it->yuv_p_ + VP8I16ModeOffsets[mode],
- 0, 16);
- if (alpha > best_alpha) {
- best_alpha = alpha;
- best_mode = mode;
- }
- }
- VP8SetIntra16Mode(it, best_mode);
- return best_alpha;
-}
-
-static int MBAnalyzeBestIntra4Mode(VP8EncIterator* const it,
- int best_alpha) {
- uint8_t modes[16];
- const int max_mode = (it->enc_->method_ >= 3) ? MAX_INTRA4_MODE : NUM_BMODES;
- int i4_alpha = 0;
- VP8IteratorStartI4(it);
- do {
- int mode;
- int best_mode_alpha = -1;
- const uint8_t* const src = it->yuv_in_ + Y_OFF + VP8Scan[it->i4_];
-
- VP8MakeIntra4Preds(it);
- for (mode = 0; mode < max_mode; ++mode) {
- const int alpha = VP8CollectHistogram(src,
- it->yuv_p_ + VP8I4ModeOffsets[mode],
- 0, 1);
- if (alpha > best_mode_alpha) {
- best_mode_alpha = alpha;
- modes[it->i4_] = mode;
- }
- }
- i4_alpha += best_mode_alpha;
- // Note: we reuse the original samples for predictors
- } while (VP8IteratorRotateI4(it, it->yuv_in_ + Y_OFF));
-
- if (i4_alpha > best_alpha) {
- VP8SetIntra4Mode(it, modes);
- best_alpha = ClipAlpha(i4_alpha);
- }
- return best_alpha;
-}
-
-static int MBAnalyzeBestUVMode(VP8EncIterator* const it) {
- int best_alpha = -1;
- int best_mode = 0;
- const int max_mode = (it->enc_->method_ >= 3) ? MAX_UV_MODE : 4;
- int mode;
- VP8MakeChroma8Preds(it);
- for (mode = 0; mode < max_mode; ++mode) {
- const int alpha = VP8CollectHistogram(it->yuv_in_ + U_OFF,
- it->yuv_p_ + VP8UVModeOffsets[mode],
- 16, 16 + 4 + 4);
- if (alpha > best_alpha) {
- best_alpha = alpha;
- best_mode = mode;
- }
- }
- VP8SetIntraUVMode(it, best_mode);
- return best_alpha;
-}
-
-static void MBAnalyze(VP8EncIterator* const it,
- int alphas[256], int* const uv_alpha) {
- const VP8Encoder* const enc = it->enc_;
- int best_alpha, best_uv_alpha;
-
- VP8SetIntra16Mode(it, 0); // default: Intra16, DC_PRED
- VP8SetSkip(it, 0); // not skipped
- VP8SetSegment(it, 0); // default segment, spec-wise.
-
- best_alpha = MBAnalyzeBestIntra16Mode(it);
- if (enc->method_ != 3) {
- // We go and make a fast decision for intra4/intra16.
- // It's usually not a good and definitive pick, but helps seeding the stats
- // about level bit-cost.
- // TODO(skal): improve criterion.
- best_alpha = MBAnalyzeBestIntra4Mode(it, best_alpha);
- }
- best_uv_alpha = MBAnalyzeBestUVMode(it);
-
- // Final susceptibility mix
- best_alpha = (best_alpha + best_uv_alpha + 1) / 2;
- alphas[best_alpha]++;
- *uv_alpha += best_uv_alpha;
- it->mb_->alpha_ = best_alpha; // Informative only.
-}
-
-//------------------------------------------------------------------------------
-// Main analysis loop:
-// Collect all susceptibilities for each macroblock and record their
-// distribution in alphas[]. Segments is assigned a-posteriori, based on
-// this histogram.
-// We also pick an intra16 prediction mode, which shouldn't be considered
-// final except for fast-encode settings. We can also pick some intra4 modes
-// and decide intra4/intra16, but that's usually almost always a bad choice at
-// this stage.
-
-int VP8EncAnalyze(VP8Encoder* const enc) {
- int ok = 1;
- int alphas[256] = { 0 };
- VP8EncIterator it;
-
- VP8IteratorInit(enc, &it);
- enc->uv_alpha_ = 0;
- do {
- VP8IteratorImport(&it);
- MBAnalyze(&it, alphas, &enc->uv_alpha_);
- ok = VP8IteratorProgress(&it, 20);
- // Let's pretend we have perfect lossless reconstruction.
- } while (ok && VP8IteratorNext(&it, it.yuv_in_));
- enc->uv_alpha_ /= enc->mb_w_ * enc->mb_h_;
- if (ok) AssignSegments(enc, alphas);
-
- return ok;
-}
-
-#if defined(__cplusplus) || defined(c_plusplus)
-} // extern "C"
-#endif
diff --git a/drivers/webpold/enc/backward_references.c b/drivers/webpold/enc/backward_references.c
deleted file mode 100644
index b8c8ece806..0000000000
--- a/drivers/webpold/enc/backward_references.c
+++ /dev/null
@@ -1,874 +0,0 @@
-// Copyright 2012 Google Inc. All Rights Reserved.
-//
-// This code is licensed under the same terms as WebM:
-// Software License Agreement: http://www.webmproject.org/license/software/
-// Additional IP Rights Grant: http://www.webmproject.org/license/additional/
-// -----------------------------------------------------------------------------
-//
-// Author: Jyrki Alakuijala (jyrki@google.com)
-//
-
-#include <assert.h>
-#include <math.h>
-#include <stdio.h>
-
-#include "./backward_references.h"
-#include "./histogram.h"
-#include "../dsp/lossless.h"
-#include "../utils/color_cache.h"
-#include "../utils/utils.h"
-
-#define VALUES_IN_BYTE 256
-
-#define HASH_BITS 18
-#define HASH_SIZE (1 << HASH_BITS)
-#define HASH_MULTIPLIER (0xc6a4a7935bd1e995ULL)
-
-// 1M window (4M bytes) minus 120 special codes for short distances.
-#define WINDOW_SIZE ((1 << 20) - 120)
-
-// Bounds for the match length.
-#define MIN_LENGTH 2
-#define MAX_LENGTH 4096
-
-typedef struct {
- // Stores the most recently added position with the given hash value.
- int32_t hash_to_first_index_[HASH_SIZE];
- // chain_[pos] stores the previous position with the same hash value
- // for every pixel in the image.
- int32_t* chain_;
-} HashChain;
-
-// -----------------------------------------------------------------------------
-
-static const uint8_t plane_to_code_lut[128] = {
- 96, 73, 55, 39, 23, 13, 5, 1, 255, 255, 255, 255, 255, 255, 255, 255,
- 101, 78, 58, 42, 26, 16, 8, 2, 0, 3, 9, 17, 27, 43, 59, 79,
- 102, 86, 62, 46, 32, 20, 10, 6, 4, 7, 11, 21, 33, 47, 63, 87,
- 105, 90, 70, 52, 37, 28, 18, 14, 12, 15, 19, 29, 38, 53, 71, 91,
- 110, 99, 82, 66, 48, 35, 30, 24, 22, 25, 31, 36, 49, 67, 83, 100,
- 115, 108, 94, 76, 64, 50, 44, 40, 34, 41, 45, 51, 65, 77, 95, 109,
- 118, 113, 103, 92, 80, 68, 60, 56, 54, 57, 61, 69, 81, 93, 104, 114,
- 119, 116, 111, 106, 97, 88, 84, 74, 72, 75, 85, 89, 98, 107, 112, 117
-};
-
-static int DistanceToPlaneCode(int xsize, int dist) {
- const int yoffset = dist / xsize;
- const int xoffset = dist - yoffset * xsize;
- if (xoffset <= 8 && yoffset < 8) {
- return plane_to_code_lut[yoffset * 16 + 8 - xoffset] + 1;
- } else if (xoffset > xsize - 8 && yoffset < 7) {
- return plane_to_code_lut[(yoffset + 1) * 16 + 8 + (xsize - xoffset)] + 1;
- }
- return dist + 120;
-}
-
-static WEBP_INLINE int FindMatchLength(const uint32_t* const array1,
- const uint32_t* const array2,
- const int max_limit) {
- int match_len = 0;
- while (match_len < max_limit && array1[match_len] == array2[match_len]) {
- ++match_len;
- }
- return match_len;
-}
-
-// -----------------------------------------------------------------------------
-// VP8LBackwardRefs
-
-void VP8LInitBackwardRefs(VP8LBackwardRefs* const refs) {
- if (refs != NULL) {
- refs->refs = NULL;
- refs->size = 0;
- refs->max_size = 0;
- }
-}
-
-void VP8LClearBackwardRefs(VP8LBackwardRefs* const refs) {
- if (refs != NULL) {
- free(refs->refs);
- VP8LInitBackwardRefs(refs);
- }
-}
-
-int VP8LBackwardRefsAlloc(VP8LBackwardRefs* const refs, int max_size) {
- assert(refs != NULL);
- refs->size = 0;
- refs->max_size = 0;
- refs->refs = (PixOrCopy*)WebPSafeMalloc((uint64_t)max_size,
- sizeof(*refs->refs));
- if (refs->refs == NULL) return 0;
- refs->max_size = max_size;
- return 1;
-}
-
-// -----------------------------------------------------------------------------
-// Hash chains
-
-static WEBP_INLINE uint64_t GetPixPairHash64(const uint32_t* const argb) {
- uint64_t key = ((uint64_t)(argb[1]) << 32) | argb[0];
- key = (key * HASH_MULTIPLIER) >> (64 - HASH_BITS);
- return key;
-}
-
-static int HashChainInit(HashChain* const p, int size) {
- int i;
- p->chain_ = (int*)WebPSafeMalloc((uint64_t)size, sizeof(*p->chain_));
- if (p->chain_ == NULL) {
- return 0;
- }
- for (i = 0; i < size; ++i) {
- p->chain_[i] = -1;
- }
- for (i = 0; i < HASH_SIZE; ++i) {
- p->hash_to_first_index_[i] = -1;
- }
- return 1;
-}
-
-static void HashChainDelete(HashChain* const p) {
- if (p != NULL) {
- free(p->chain_);
- free(p);
- }
-}
-
-// Insertion of two pixels at a time.
-static void HashChainInsert(HashChain* const p,
- const uint32_t* const argb, int pos) {
- const uint64_t hash_code = GetPixPairHash64(argb);
- p->chain_[pos] = p->hash_to_first_index_[hash_code];
- p->hash_to_first_index_[hash_code] = pos;
-}
-
-static int HashChainFindCopy(const HashChain* const p,
- int quality, int index, int xsize,
- const uint32_t* const argb, int maxlen,
- int* const distance_ptr,
- int* const length_ptr) {
- const uint64_t hash_code = GetPixPairHash64(&argb[index]);
- int prev_length = 0;
- int64_t best_val = 0;
- int best_length = 0;
- int best_distance = 0;
- const uint32_t* const argb_start = argb + index;
- const int iter_min_mult = (quality < 50) ? 2 : (quality < 75) ? 4 : 8;
- const int iter_min = -quality * iter_min_mult;
- int iter_cnt = 10 + (quality >> 1);
- const int min_pos = (index > WINDOW_SIZE) ? index - WINDOW_SIZE : 0;
- int pos;
-
- assert(xsize > 0);
- for (pos = p->hash_to_first_index_[hash_code];
- pos >= min_pos;
- pos = p->chain_[pos]) {
- int64_t val;
- int curr_length;
- if (iter_cnt < 0) {
- if (iter_cnt < iter_min || best_val >= 0xff0000) {
- break;
- }
- }
- --iter_cnt;
- if (best_length != 0 &&
- argb[pos + best_length - 1] != argb_start[best_length - 1]) {
- continue;
- }
- curr_length = FindMatchLength(argb + pos, argb_start, maxlen);
- if (curr_length < prev_length) {
- continue;
- }
- val = 65536 * curr_length;
- // Favoring 2d locality here gives savings for certain images.
- if (index - pos < 9 * xsize) {
- const int y = (index - pos) / xsize;
- int x = (index - pos) % xsize;
- if (x > xsize / 2) {
- x = xsize - x;
- }
- if (x <= 7 && x >= -8) {
- val -= y * y + x * x;
- } else {
- val -= 9 * 9 + 9 * 9;
- }
- } else {
- val -= 9 * 9 + 9 * 9;
- }
- if (best_val < val) {
- prev_length = curr_length;
- best_val = val;
- best_length = curr_length;
- best_distance = index - pos;
- if (curr_length >= MAX_LENGTH) {
- break;
- }
- if ((best_distance == 1 || best_distance == xsize) &&
- best_length >= 128) {
- break;
- }
- }
- }
- *distance_ptr = best_distance;
- *length_ptr = best_length;
- return (best_length >= MIN_LENGTH);
-}
-
-static WEBP_INLINE void PushBackCopy(VP8LBackwardRefs* const refs, int length) {
- int size = refs->size;
- while (length >= MAX_LENGTH) {
- refs->refs[size++] = PixOrCopyCreateCopy(1, MAX_LENGTH);
- length -= MAX_LENGTH;
- }
- if (length > 0) {
- refs->refs[size++] = PixOrCopyCreateCopy(1, length);
- }
- refs->size = size;
-}
-
-static void BackwardReferencesRle(int xsize, int ysize,
- const uint32_t* const argb,
- VP8LBackwardRefs* const refs) {
- const int pix_count = xsize * ysize;
- int match_len = 0;
- int i;
- refs->size = 0;
- PushBackCopy(refs, match_len); // i=0 case
- refs->refs[refs->size++] = PixOrCopyCreateLiteral(argb[0]);
- for (i = 1; i < pix_count; ++i) {
- if (argb[i] == argb[i - 1]) {
- ++match_len;
- } else {
- PushBackCopy(refs, match_len);
- match_len = 0;
- refs->refs[refs->size++] = PixOrCopyCreateLiteral(argb[i]);
- }
- }
- PushBackCopy(refs, match_len);
-}
-
-static int BackwardReferencesHashChain(int xsize, int ysize,
- const uint32_t* const argb,
- int cache_bits, int quality,
- VP8LBackwardRefs* const refs) {
- int i;
- int ok = 0;
- int cc_init = 0;
- const int use_color_cache = (cache_bits > 0);
- const int pix_count = xsize * ysize;
- HashChain* const hash_chain = (HashChain*)malloc(sizeof(*hash_chain));
- VP8LColorCache hashers;
-
- if (hash_chain == NULL) return 0;
- if (use_color_cache) {
- cc_init = VP8LColorCacheInit(&hashers, cache_bits);
- if (!cc_init) goto Error;
- }
-
- if (!HashChainInit(hash_chain, pix_count)) goto Error;
-
- refs->size = 0;
- for (i = 0; i < pix_count; ) {
- // Alternative#1: Code the pixels starting at 'i' using backward reference.
- int offset = 0;
- int len = 0;
- if (i < pix_count - 1) { // FindCopy(i,..) reads pixels at [i] and [i + 1].
- int maxlen = pix_count - i;
- if (maxlen > MAX_LENGTH) {
- maxlen = MAX_LENGTH;
- }
- HashChainFindCopy(hash_chain, quality, i, xsize, argb, maxlen,
- &offset, &len);
- }
- if (len >= MIN_LENGTH) {
- // Alternative#2: Insert the pixel at 'i' as literal, and code the
- // pixels starting at 'i + 1' using backward reference.
- int offset2 = 0;
- int len2 = 0;
- int k;
- HashChainInsert(hash_chain, &argb[i], i);
- if (i < pix_count - 2) { // FindCopy(i+1,..) reads [i + 1] and [i + 2].
- int maxlen = pix_count - (i + 1);
- if (maxlen > MAX_LENGTH) {
- maxlen = MAX_LENGTH;
- }
- HashChainFindCopy(hash_chain, quality,
- i + 1, xsize, argb, maxlen, &offset2, &len2);
- if (len2 > len + 1) {
- const uint32_t pixel = argb[i];
- // Alternative#2 is a better match. So push pixel at 'i' as literal.
- if (use_color_cache && VP8LColorCacheContains(&hashers, pixel)) {
- const int ix = VP8LColorCacheGetIndex(&hashers, pixel);
- refs->refs[refs->size] = PixOrCopyCreateCacheIdx(ix);
- } else {
- refs->refs[refs->size] = PixOrCopyCreateLiteral(pixel);
- }
- ++refs->size;
- if (use_color_cache) VP8LColorCacheInsert(&hashers, pixel);
- i++; // Backward reference to be done for next pixel.
- len = len2;
- offset = offset2;
- }
- }
- if (len >= MAX_LENGTH) {
- len = MAX_LENGTH - 1;
- }
- refs->refs[refs->size++] = PixOrCopyCreateCopy(offset, len);
- if (use_color_cache) {
- for (k = 0; k < len; ++k) {
- VP8LColorCacheInsert(&hashers, argb[i + k]);
- }
- }
- // Add to the hash_chain (but cannot add the last pixel).
- {
- const int last = (len < pix_count - 1 - i) ? len : pix_count - 1 - i;
- for (k = 1; k < last; ++k) {
- HashChainInsert(hash_chain, &argb[i + k], i + k);
- }
- }
- i += len;
- } else {
- const uint32_t pixel = argb[i];
- if (use_color_cache && VP8LColorCacheContains(&hashers, pixel)) {
- // push pixel as a PixOrCopyCreateCacheIdx pixel
- const int ix = VP8LColorCacheGetIndex(&hashers, pixel);
- refs->refs[refs->size] = PixOrCopyCreateCacheIdx(ix);
- } else {
- refs->refs[refs->size] = PixOrCopyCreateLiteral(pixel);
- }
- ++refs->size;
- if (use_color_cache) VP8LColorCacheInsert(&hashers, pixel);
- if (i + 1 < pix_count) {
- HashChainInsert(hash_chain, &argb[i], i);
- }
- ++i;
- }
- }
- ok = 1;
-Error:
- if (cc_init) VP8LColorCacheClear(&hashers);
- HashChainDelete(hash_chain);
- return ok;
-}
-
-// -----------------------------------------------------------------------------
-
-typedef struct {
- double alpha_[VALUES_IN_BYTE];
- double red_[VALUES_IN_BYTE];
- double literal_[PIX_OR_COPY_CODES_MAX];
- double blue_[VALUES_IN_BYTE];
- double distance_[NUM_DISTANCE_CODES];
-} CostModel;
-
-static int BackwardReferencesTraceBackwards(
- int xsize, int ysize, int recursive_cost_model,
- const uint32_t* const argb, int cache_bits, VP8LBackwardRefs* const refs);
-
-static void ConvertPopulationCountTableToBitEstimates(
- int num_symbols, const int population_counts[], double output[]) {
- int sum = 0;
- int nonzeros = 0;
- int i;
- for (i = 0; i < num_symbols; ++i) {
- sum += population_counts[i];
- if (population_counts[i] > 0) {
- ++nonzeros;
- }
- }
- if (nonzeros <= 1) {
- memset(output, 0, num_symbols * sizeof(*output));
- } else {
- const double logsum = VP8LFastLog2(sum);
- for (i = 0; i < num_symbols; ++i) {
- output[i] = logsum - VP8LFastLog2(population_counts[i]);
- }
- }
-}
-
-static int CostModelBuild(CostModel* const m, int xsize, int ysize,
- int recursion_level, const uint32_t* const argb,
- int cache_bits) {
- int ok = 0;
- VP8LHistogram histo;
- VP8LBackwardRefs refs;
- const int quality = 100;
-
- if (!VP8LBackwardRefsAlloc(&refs, xsize * ysize)) goto Error;
-
- if (recursion_level > 0) {
- if (!BackwardReferencesTraceBackwards(xsize, ysize, recursion_level - 1,
- argb, cache_bits, &refs)) {
- goto Error;
- }
- } else {
- if (!BackwardReferencesHashChain(xsize, ysize, argb, cache_bits, quality,
- &refs)) {
- goto Error;
- }
- }
- VP8LHistogramCreate(&histo, &refs, cache_bits);
- ConvertPopulationCountTableToBitEstimates(
- VP8LHistogramNumCodes(&histo), histo.literal_, m->literal_);
- ConvertPopulationCountTableToBitEstimates(
- VALUES_IN_BYTE, histo.red_, m->red_);
- ConvertPopulationCountTableToBitEstimates(
- VALUES_IN_BYTE, histo.blue_, m->blue_);
- ConvertPopulationCountTableToBitEstimates(
- VALUES_IN_BYTE, histo.alpha_, m->alpha_);
- ConvertPopulationCountTableToBitEstimates(
- NUM_DISTANCE_CODES, histo.distance_, m->distance_);
- ok = 1;
-
- Error:
- VP8LClearBackwardRefs(&refs);
- return ok;
-}
-
-static WEBP_INLINE double GetLiteralCost(const CostModel* const m, uint32_t v) {
- return m->alpha_[v >> 24] +
- m->red_[(v >> 16) & 0xff] +
- m->literal_[(v >> 8) & 0xff] +
- m->blue_[v & 0xff];
-}
-
-static WEBP_INLINE double GetCacheCost(const CostModel* const m, uint32_t idx) {
- const int literal_idx = VALUES_IN_BYTE + NUM_LENGTH_CODES + idx;
- return m->literal_[literal_idx];
-}
-
-static WEBP_INLINE double GetLengthCost(const CostModel* const m,
- uint32_t length) {
- int code, extra_bits_count, extra_bits_value;
- PrefixEncode(length, &code, &extra_bits_count, &extra_bits_value);
- return m->literal_[VALUES_IN_BYTE + code] + extra_bits_count;
-}
-
-static WEBP_INLINE double GetDistanceCost(const CostModel* const m,
- uint32_t distance) {
- int code, extra_bits_count, extra_bits_value;
- PrefixEncode(distance, &code, &extra_bits_count, &extra_bits_value);
- return m->distance_[code] + extra_bits_count;
-}
-
-static int BackwardReferencesHashChainDistanceOnly(
- int xsize, int ysize, int recursive_cost_model, const uint32_t* const argb,
- int cache_bits, uint32_t* const dist_array) {
- int i;
- int ok = 0;
- int cc_init = 0;
- const int quality = 100;
- const int pix_count = xsize * ysize;
- const int use_color_cache = (cache_bits > 0);
- double* const cost =
- (double*)WebPSafeMalloc((uint64_t)pix_count, sizeof(*cost));
- CostModel* cost_model = (CostModel*)malloc(sizeof(*cost_model));
- HashChain* hash_chain = (HashChain*)malloc(sizeof(*hash_chain));
- VP8LColorCache hashers;
- const double mul0 = (recursive_cost_model != 0) ? 1.0 : 0.68;
- const double mul1 = (recursive_cost_model != 0) ? 1.0 : 0.82;
-
- if (cost == NULL || cost_model == NULL || hash_chain == NULL) goto Error;
-
- if (!HashChainInit(hash_chain, pix_count)) goto Error;
-
- if (use_color_cache) {
- cc_init = VP8LColorCacheInit(&hashers, cache_bits);
- if (!cc_init) goto Error;
- }
-
- if (!CostModelBuild(cost_model, xsize, ysize, recursive_cost_model, argb,
- cache_bits)) {
- goto Error;
- }
-
- for (i = 0; i < pix_count; ++i) cost[i] = 1e100;
-
- // We loop one pixel at a time, but store all currently best points to
- // non-processed locations from this point.
- dist_array[0] = 0;
- for (i = 0; i < pix_count; ++i) {
- double prev_cost = 0.0;
- int shortmax;
- if (i > 0) {
- prev_cost = cost[i - 1];
- }
- for (shortmax = 0; shortmax < 2; ++shortmax) {
- int offset = 0;
- int len = 0;
- if (i < pix_count - 1) { // FindCopy reads pixels at [i] and [i + 1].
- int maxlen = shortmax ? 2 : MAX_LENGTH;
- if (maxlen > pix_count - i) {
- maxlen = pix_count - i;
- }
- HashChainFindCopy(hash_chain, quality, i, xsize, argb, maxlen,
- &offset, &len);
- }
- if (len >= MIN_LENGTH) {
- const int code = DistanceToPlaneCode(xsize, offset);
- const double distance_cost =
- prev_cost + GetDistanceCost(cost_model, code);
- int k;
- for (k = 1; k < len; ++k) {
- const double cost_val =
- distance_cost + GetLengthCost(cost_model, k);
- if (cost[i + k] > cost_val) {
- cost[i + k] = cost_val;
- dist_array[i + k] = k + 1;
- }
- }
- // This if is for speedup only. It roughly doubles the speed, and
- // makes compression worse by .1 %.
- if (len >= 128 && code < 2) {
- // Long copy for short distances, let's skip the middle
- // lookups for better copies.
- // 1) insert the hashes.
- if (use_color_cache) {
- for (k = 0; k < len; ++k) {
- VP8LColorCacheInsert(&hashers, argb[i + k]);
- }
- }
- // 2) Add to the hash_chain (but cannot add the last pixel)
- {
- const int last = (len < pix_count - 1 - i) ? len
- : pix_count - 1 - i;
- for (k = 0; k < last; ++k) {
- HashChainInsert(hash_chain, &argb[i + k], i + k);
- }
- }
- // 3) jump.
- i += len - 1; // for loop does ++i, thus -1 here.
- goto next_symbol;
- }
- }
- }
- if (i < pix_count - 1) {
- HashChainInsert(hash_chain, &argb[i], i);
- }
- {
- // inserting a literal pixel
- double cost_val = prev_cost;
- if (use_color_cache && VP8LColorCacheContains(&hashers, argb[i])) {
- const int ix = VP8LColorCacheGetIndex(&hashers, argb[i]);
- cost_val += GetCacheCost(cost_model, ix) * mul0;
- } else {
- cost_val += GetLiteralCost(cost_model, argb[i]) * mul1;
- }
- if (cost[i] > cost_val) {
- cost[i] = cost_val;
- dist_array[i] = 1; // only one is inserted.
- }
- if (use_color_cache) VP8LColorCacheInsert(&hashers, argb[i]);
- }
- next_symbol: ;
- }
- // Last pixel still to do, it can only be a single step if not reached
- // through cheaper means already.
- ok = 1;
-Error:
- if (cc_init) VP8LColorCacheClear(&hashers);
- HashChainDelete(hash_chain);
- free(cost_model);
- free(cost);
- return ok;
-}
-
-static int TraceBackwards(const uint32_t* const dist_array,
- int dist_array_size,
- uint32_t** const chosen_path,
- int* const chosen_path_size) {
- int i;
- // Count how many.
- int count = 0;
- for (i = dist_array_size - 1; i >= 0; ) {
- int k = dist_array[i];
- assert(k >= 1);
- ++count;
- i -= k;
- }
- // Allocate.
- *chosen_path_size = count;
- *chosen_path =
- (uint32_t*)WebPSafeMalloc((uint64_t)count, sizeof(**chosen_path));
- if (*chosen_path == NULL) return 0;
-
- // Write in reverse order.
- for (i = dist_array_size - 1; i >= 0; ) {
- int k = dist_array[i];
- assert(k >= 1);
- (*chosen_path)[--count] = k;
- i -= k;
- }
- return 1;
-}
-
-static int BackwardReferencesHashChainFollowChosenPath(
- int xsize, int ysize, const uint32_t* const argb, int cache_bits,
- const uint32_t* const chosen_path, int chosen_path_size,
- VP8LBackwardRefs* const refs) {
- const int quality = 100;
- const int pix_count = xsize * ysize;
- const int use_color_cache = (cache_bits > 0);
- int size = 0;
- int i = 0;
- int k;
- int ix;
- int ok = 0;
- int cc_init = 0;
- HashChain* hash_chain = (HashChain*)malloc(sizeof(*hash_chain));
- VP8LColorCache hashers;
-
- if (hash_chain == NULL || !HashChainInit(hash_chain, pix_count)) {
- goto Error;
- }
- if (use_color_cache) {
- cc_init = VP8LColorCacheInit(&hashers, cache_bits);
- if (!cc_init) goto Error;
- }
-
- refs->size = 0;
- for (ix = 0; ix < chosen_path_size; ++ix, ++size) {
- int offset = 0;
- int len = 0;
- int maxlen = chosen_path[ix];
- if (maxlen != 1) {
- HashChainFindCopy(hash_chain, quality,
- i, xsize, argb, maxlen, &offset, &len);
- assert(len == maxlen);
- refs->refs[size] = PixOrCopyCreateCopy(offset, len);
- if (use_color_cache) {
- for (k = 0; k < len; ++k) {
- VP8LColorCacheInsert(&hashers, argb[i + k]);
- }
- }
- {
- const int last = (len < pix_count - 1 - i) ? len : pix_count - 1 - i;
- for (k = 0; k < last; ++k) {
- HashChainInsert(hash_chain, &argb[i + k], i + k);
- }
- }
- i += len;
- } else {
- if (use_color_cache && VP8LColorCacheContains(&hashers, argb[i])) {
- // push pixel as a color cache index
- const int idx = VP8LColorCacheGetIndex(&hashers, argb[i]);
- refs->refs[size] = PixOrCopyCreateCacheIdx(idx);
- } else {
- refs->refs[size] = PixOrCopyCreateLiteral(argb[i]);
- }
- if (use_color_cache) VP8LColorCacheInsert(&hashers, argb[i]);
- if (i + 1 < pix_count) {
- HashChainInsert(hash_chain, &argb[i], i);
- }
- ++i;
- }
- }
- assert(size <= refs->max_size);
- refs->size = size;
- ok = 1;
-Error:
- if (cc_init) VP8LColorCacheClear(&hashers);
- HashChainDelete(hash_chain);
- return ok;
-}
-
-// Returns 1 on success.
-static int BackwardReferencesTraceBackwards(int xsize, int ysize,
- int recursive_cost_model,
- const uint32_t* const argb,
- int cache_bits,
- VP8LBackwardRefs* const refs) {
- int ok = 0;
- const int dist_array_size = xsize * ysize;
- uint32_t* chosen_path = NULL;
- int chosen_path_size = 0;
- uint32_t* dist_array =
- (uint32_t*)WebPSafeMalloc((uint64_t)dist_array_size, sizeof(*dist_array));
-
- if (dist_array == NULL) goto Error;
-
- if (!BackwardReferencesHashChainDistanceOnly(
- xsize, ysize, recursive_cost_model, argb, cache_bits, dist_array)) {
- goto Error;
- }
- if (!TraceBackwards(dist_array, dist_array_size,
- &chosen_path, &chosen_path_size)) {
- goto Error;
- }
- free(dist_array); // no need to retain this memory any longer
- dist_array = NULL;
- if (!BackwardReferencesHashChainFollowChosenPath(
- xsize, ysize, argb, cache_bits, chosen_path, chosen_path_size, refs)) {
- goto Error;
- }
- ok = 1;
- Error:
- free(chosen_path);
- free(dist_array);
- return ok;
-}
-
-static void BackwardReferences2DLocality(int xsize,
- VP8LBackwardRefs* const refs) {
- int i;
- for (i = 0; i < refs->size; ++i) {
- if (PixOrCopyIsCopy(&refs->refs[i])) {
- const int dist = refs->refs[i].argb_or_distance;
- const int transformed_dist = DistanceToPlaneCode(xsize, dist);
- refs->refs[i].argb_or_distance = transformed_dist;
- }
- }
-}
-
-int VP8LGetBackwardReferences(int width, int height,
- const uint32_t* const argb,
- int quality, int cache_bits, int use_2d_locality,
- VP8LBackwardRefs* const best) {
- int ok = 0;
- int lz77_is_useful;
- VP8LBackwardRefs refs_rle, refs_lz77;
- const int num_pix = width * height;
-
- VP8LBackwardRefsAlloc(&refs_rle, num_pix);
- VP8LBackwardRefsAlloc(&refs_lz77, num_pix);
- VP8LInitBackwardRefs(best);
- if (refs_rle.refs == NULL || refs_lz77.refs == NULL) {
- Error1:
- VP8LClearBackwardRefs(&refs_rle);
- VP8LClearBackwardRefs(&refs_lz77);
- goto End;
- }
-
- if (!BackwardReferencesHashChain(width, height, argb, cache_bits, quality,
- &refs_lz77)) {
- goto End;
- }
- // Backward Reference using RLE only.
- BackwardReferencesRle(width, height, argb, &refs_rle);
-
- {
- double bit_cost_lz77, bit_cost_rle;
- VP8LHistogram* const histo = (VP8LHistogram*)malloc(sizeof(*histo));
- if (histo == NULL) goto Error1;
- // Evaluate lz77 coding
- VP8LHistogramCreate(histo, &refs_lz77, cache_bits);
- bit_cost_lz77 = VP8LHistogramEstimateBits(histo);
- // Evaluate RLE coding
- VP8LHistogramCreate(histo, &refs_rle, cache_bits);
- bit_cost_rle = VP8LHistogramEstimateBits(histo);
- // Decide if LZ77 is useful.
- lz77_is_useful = (bit_cost_lz77 < bit_cost_rle);
- free(histo);
- }
-
- // Choose appropriate backward reference.
- if (lz77_is_useful) {
- // TraceBackwards is costly. Run it for higher qualities.
- const int try_lz77_trace_backwards = (quality >= 75);
- *best = refs_lz77; // default guess: lz77 is better
- VP8LClearBackwardRefs(&refs_rle);
- if (try_lz77_trace_backwards) {
- const int recursion_level = (num_pix < 320 * 200) ? 1 : 0;
- VP8LBackwardRefs refs_trace;
- if (!VP8LBackwardRefsAlloc(&refs_trace, num_pix)) {
- goto End;
- }
- if (BackwardReferencesTraceBackwards(
- width, height, recursion_level, argb, cache_bits, &refs_trace)) {
- VP8LClearBackwardRefs(&refs_lz77);
- *best = refs_trace;
- }
- }
- } else {
- VP8LClearBackwardRefs(&refs_lz77);
- *best = refs_rle;
- }
-
- if (use_2d_locality) BackwardReferences2DLocality(width, best);
-
- ok = 1;
-
- End:
- if (!ok) {
- VP8LClearBackwardRefs(best);
- }
- return ok;
-}
-
-// Returns 1 on success.
-static int ComputeCacheHistogram(const uint32_t* const argb,
- int xsize, int ysize,
- const VP8LBackwardRefs* const refs,
- int cache_bits,
- VP8LHistogram* const histo) {
- int pixel_index = 0;
- int i;
- uint32_t k;
- VP8LColorCache hashers;
- const int use_color_cache = (cache_bits > 0);
- int cc_init = 0;
-
- if (use_color_cache) {
- cc_init = VP8LColorCacheInit(&hashers, cache_bits);
- if (!cc_init) return 0;
- }
-
- for (i = 0; i < refs->size; ++i) {
- const PixOrCopy* const v = &refs->refs[i];
- if (PixOrCopyIsLiteral(v)) {
- if (use_color_cache &&
- VP8LColorCacheContains(&hashers, argb[pixel_index])) {
- // push pixel as a cache index
- const int ix = VP8LColorCacheGetIndex(&hashers, argb[pixel_index]);
- const PixOrCopy token = PixOrCopyCreateCacheIdx(ix);
- VP8LHistogramAddSinglePixOrCopy(histo, &token);
- } else {
- VP8LHistogramAddSinglePixOrCopy(histo, v);
- }
- } else {
- VP8LHistogramAddSinglePixOrCopy(histo, v);
- }
- if (use_color_cache) {
- for (k = 0; k < PixOrCopyLength(v); ++k) {
- VP8LColorCacheInsert(&hashers, argb[pixel_index + k]);
- }
- }
- pixel_index += PixOrCopyLength(v);
- }
- assert(pixel_index == xsize * ysize);
- (void)xsize; // xsize is not used in non-debug compilations otherwise.
- (void)ysize; // ysize is not used in non-debug compilations otherwise.
- if (cc_init) VP8LColorCacheClear(&hashers);
- return 1;
-}
-
-// Returns how many bits are to be used for a color cache.
-int VP8LCalculateEstimateForCacheSize(const uint32_t* const argb,
- int xsize, int ysize,
- int* const best_cache_bits) {
- int ok = 0;
- int cache_bits;
- double lowest_entropy = 1e99;
- VP8LBackwardRefs refs;
- static const double kSmallPenaltyForLargeCache = 4.0;
- static const int quality = 30;
- if (!VP8LBackwardRefsAlloc(&refs, xsize * ysize) ||
- !BackwardReferencesHashChain(xsize, ysize, argb, 0, quality, &refs)) {
- goto Error;
- }
- for (cache_bits = 0; cache_bits <= MAX_COLOR_CACHE_BITS; ++cache_bits) {
- double cur_entropy;
- VP8LHistogram histo;
- VP8LHistogramInit(&histo, cache_bits);
- ComputeCacheHistogram(argb, xsize, ysize, &refs, cache_bits, &histo);
- cur_entropy = VP8LHistogramEstimateBits(&histo) +
- kSmallPenaltyForLargeCache * cache_bits;
- if (cache_bits == 0 || cur_entropy < lowest_entropy) {
- *best_cache_bits = cache_bits;
- lowest_entropy = cur_entropy;
- }
- }
- ok = 1;
- Error:
- VP8LClearBackwardRefs(&refs);
- return ok;
-}
diff --git a/drivers/webpold/enc/backward_references.h b/drivers/webpold/enc/backward_references.h
deleted file mode 100644
index 8006a56ba1..0000000000
--- a/drivers/webpold/enc/backward_references.h
+++ /dev/null
@@ -1,212 +0,0 @@
-// Copyright 2012 Google Inc. All Rights Reserved.
-//
-// This code is licensed under the same terms as WebM:
-// Software License Agreement: http://www.webmproject.org/license/software/
-// Additional IP Rights Grant: http://www.webmproject.org/license/additional/
-// -----------------------------------------------------------------------------
-//
-// Author: Jyrki Alakuijala (jyrki@google.com)
-//
-
-#ifndef WEBP_ENC_BACKWARD_REFERENCES_H_
-#define WEBP_ENC_BACKWARD_REFERENCES_H_
-
-#include <assert.h>
-#include <stdlib.h>
-#include "../types.h"
-#include "../format_constants.h"
-
-#if defined(__cplusplus) || defined(c_plusplus)
-extern "C" {
-#endif
-
-// The spec allows 11, we use 9 bits to reduce memory consumption in encoding.
-// Having 9 instead of 11 only removes about 0.25 % of compression density.
-#define MAX_COLOR_CACHE_BITS 9
-
-// Max ever number of codes we'll use:
-#define PIX_OR_COPY_CODES_MAX \
- (NUM_LITERAL_CODES + NUM_LENGTH_CODES + (1 << MAX_COLOR_CACHE_BITS))
-
-// -----------------------------------------------------------------------------
-// PrefixEncode()
-
-// use GNU builtins where available.
-#if defined(__GNUC__) && \
- ((__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || __GNUC__ >= 4)
-static WEBP_INLINE int BitsLog2Floor(uint32_t n) {
- return n == 0 ? -1 : 31 ^ __builtin_clz(n);
-}
-#elif defined(_MSC_VER) && (defined(_M_X64) || defined(_M_IX86))
-#include <intrin.h>
-#pragma intrinsic(_BitScanReverse)
-
-static WEBP_INLINE int BitsLog2Floor(uint32_t n) {
- unsigned long first_set_bit;
- return _BitScanReverse(&first_set_bit, n) ? first_set_bit : -1;
-}
-#else
-static WEBP_INLINE int BitsLog2Floor(uint32_t n) {
- int log = 0;
- uint32_t value = n;
- int i;
-
- if (value == 0) return -1;
- for (i = 4; i >= 0; --i) {
- const int shift = (1 << i);
- const uint32_t x = value >> shift;
- if (x != 0) {
- value = x;
- log += shift;
- }
- }
- return log;
-}
-#endif
-
-static WEBP_INLINE int VP8LBitsLog2Ceiling(uint32_t n) {
- const int floor = BitsLog2Floor(n);
- if (n == (n & ~(n - 1))) // zero or a power of two.
- return floor;
- else
- return floor + 1;
-}
-
-// Splitting of distance and length codes into prefixes and
-// extra bits. The prefixes are encoded with an entropy code
-// while the extra bits are stored just as normal bits.
-static WEBP_INLINE void PrefixEncode(int distance, int* const code,
- int* const extra_bits_count,
- int* const extra_bits_value) {
- // Collect the two most significant bits where the highest bit is 1.
- const int highest_bit = BitsLog2Floor(--distance);
- // & 0x3f is to make behavior well defined when highest_bit
- // does not exist or is the least significant bit.
- const int second_highest_bit =
- (distance >> ((highest_bit - 1) & 0x3f)) & 1;
- *extra_bits_count = (highest_bit > 0) ? (highest_bit - 1) : 0;
- *extra_bits_value = distance & ((1 << *extra_bits_count) - 1);
- *code = (highest_bit > 0) ? (2 * highest_bit + second_highest_bit)
- : (highest_bit == 0) ? 1 : 0;
-}
-
-// -----------------------------------------------------------------------------
-// PixOrCopy
-
-enum Mode {
- kLiteral,
- kCacheIdx,
- kCopy,
- kNone
-};
-
-typedef struct {
- // mode as uint8_t to make the memory layout to be exactly 8 bytes.
- uint8_t mode;
- uint16_t len;
- uint32_t argb_or_distance;
-} PixOrCopy;
-
-static WEBP_INLINE PixOrCopy PixOrCopyCreateCopy(uint32_t distance,
- uint16_t len) {
- PixOrCopy retval;
- retval.mode = kCopy;
- retval.argb_or_distance = distance;
- retval.len = len;
- return retval;
-}
-
-static WEBP_INLINE PixOrCopy PixOrCopyCreateCacheIdx(int idx) {
- PixOrCopy retval;
- assert(idx >= 0);
- assert(idx < (1 << MAX_COLOR_CACHE_BITS));
- retval.mode = kCacheIdx;
- retval.argb_or_distance = idx;
- retval.len = 1;
- return retval;
-}
-
-static WEBP_INLINE PixOrCopy PixOrCopyCreateLiteral(uint32_t argb) {
- PixOrCopy retval;
- retval.mode = kLiteral;
- retval.argb_or_distance = argb;
- retval.len = 1;
- return retval;
-}
-
-static WEBP_INLINE int PixOrCopyIsLiteral(const PixOrCopy* const p) {
- return (p->mode == kLiteral);
-}
-
-static WEBP_INLINE int PixOrCopyIsCacheIdx(const PixOrCopy* const p) {
- return (p->mode == kCacheIdx);
-}
-
-static WEBP_INLINE int PixOrCopyIsCopy(const PixOrCopy* const p) {
- return (p->mode == kCopy);
-}
-
-static WEBP_INLINE uint32_t PixOrCopyLiteral(const PixOrCopy* const p,
- int component) {
- assert(p->mode == kLiteral);
- return (p->argb_or_distance >> (component * 8)) & 0xff;
-}
-
-static WEBP_INLINE uint32_t PixOrCopyLength(const PixOrCopy* const p) {
- return p->len;
-}
-
-static WEBP_INLINE uint32_t PixOrCopyArgb(const PixOrCopy* const p) {
- assert(p->mode == kLiteral);
- return p->argb_or_distance;
-}
-
-static WEBP_INLINE uint32_t PixOrCopyCacheIdx(const PixOrCopy* const p) {
- assert(p->mode == kCacheIdx);
- assert(p->argb_or_distance < (1U << MAX_COLOR_CACHE_BITS));
- return p->argb_or_distance;
-}
-
-static WEBP_INLINE uint32_t PixOrCopyDistance(const PixOrCopy* const p) {
- assert(p->mode == kCopy);
- return p->argb_or_distance;
-}
-
-// -----------------------------------------------------------------------------
-// VP8LBackwardRefs
-
-typedef struct {
- PixOrCopy* refs;
- int size; // currently used
- int max_size; // maximum capacity
-} VP8LBackwardRefs;
-
-// Initialize the object. Must be called first. 'refs' can be NULL.
-void VP8LInitBackwardRefs(VP8LBackwardRefs* const refs);
-
-// Release memory and re-initialize the object. 'refs' can be NULL.
-void VP8LClearBackwardRefs(VP8LBackwardRefs* const refs);
-
-// Allocate 'max_size' references. Returns false in case of memory error.
-int VP8LBackwardRefsAlloc(VP8LBackwardRefs* const refs, int max_size);
-
-// -----------------------------------------------------------------------------
-// Main entry points
-
-// Evaluates best possible backward references for specified quality.
-// Further optimize for 2D locality if use_2d_locality flag is set.
-int VP8LGetBackwardReferences(int width, int height,
- const uint32_t* const argb,
- int quality, int cache_bits, int use_2d_locality,
- VP8LBackwardRefs* const best);
-
-// Produce an estimate for a good color cache size for the image.
-int VP8LCalculateEstimateForCacheSize(const uint32_t* const argb,
- int xsize, int ysize,
- int* const best_cache_bits);
-
-#if defined(__cplusplus) || defined(c_plusplus)
-}
-#endif
-
-#endif // WEBP_ENC_BACKWARD_REFERENCES_H_
diff --git a/drivers/webpold/enc/config.c b/drivers/webpold/enc/config.c
deleted file mode 100644
index 4136f6c227..0000000000
--- a/drivers/webpold/enc/config.c
+++ /dev/null
@@ -1,132 +0,0 @@
-// Copyright 2011 Google Inc. All Rights Reserved.
-//
-// This code is licensed under the same terms as WebM:
-// Software License Agreement: http://www.webmproject.org/license/software/
-// Additional IP Rights Grant: http://www.webmproject.org/license/additional/
-// -----------------------------------------------------------------------------
-//
-// Coding tools configuration
-//
-// Author: Skal (pascal.massimino@gmail.com)
-
-#include "../encode.h"
-
-#if defined(__cplusplus) || defined(c_plusplus)
-extern "C" {
-#endif
-
-//------------------------------------------------------------------------------
-// WebPConfig
-//------------------------------------------------------------------------------
-
-int WebPConfigInitInternal(WebPConfig* config,
- WebPPreset preset, float quality, int version) {
- if (WEBP_ABI_IS_INCOMPATIBLE(version, WEBP_ENCODER_ABI_VERSION)) {
- return 0; // caller/system version mismatch!
- }
- if (config == NULL) return 0;
-
- config->quality = quality;
- config->target_size = 0;
- config->target_PSNR = 0.;
- config->method = 4;
- config->sns_strength = 50;
- config->filter_strength = 20; // default: light filtering
- config->filter_sharpness = 0;
- config->filter_type = 0; // default: simple
- config->partitions = 0;
- config->segments = 4;
- config->pass = 1;
- config->show_compressed = 0;
- config->preprocessing = 0;
- config->autofilter = 0;
- config->partition_limit = 0;
- config->alpha_compression = 1;
- config->alpha_filtering = 1;
- config->alpha_quality = 100;
- config->lossless = 0;
- config->image_hint = WEBP_HINT_DEFAULT;
-
- // TODO(skal): tune.
- switch (preset) {
- case WEBP_PRESET_PICTURE:
- config->sns_strength = 80;
- config->filter_sharpness = 4;
- config->filter_strength = 35;
- break;
- case WEBP_PRESET_PHOTO:
- config->sns_strength = 80;
- config->filter_sharpness = 3;
- config->filter_strength = 30;
- break;
- case WEBP_PRESET_DRAWING:
- config->sns_strength = 25;
- config->filter_sharpness = 6;
- config->filter_strength = 10;
- break;
- case WEBP_PRESET_ICON:
- config->sns_strength = 0;
- config->filter_strength = 0; // disable filtering to retain sharpness
- break;
- case WEBP_PRESET_TEXT:
- config->sns_strength = 0;
- config->filter_strength = 0; // disable filtering to retain sharpness
- config->segments = 2;
- break;
- case WEBP_PRESET_DEFAULT:
- default:
- break;
- }
- return WebPValidateConfig(config);
-}
-
-int WebPValidateConfig(const WebPConfig* config) {
- if (config == NULL) return 0;
- if (config->quality < 0 || config->quality > 100)
- return 0;
- if (config->target_size < 0)
- return 0;
- if (config->target_PSNR < 0)
- return 0;
- if (config->method < 0 || config->method > 6)
- return 0;
- if (config->segments < 1 || config->segments > 4)
- return 0;
- if (config->sns_strength < 0 || config->sns_strength > 100)
- return 0;
- if (config->filter_strength < 0 || config->filter_strength > 100)
- return 0;
- if (config->filter_sharpness < 0 || config->filter_sharpness > 7)
- return 0;
- if (config->filter_type < 0 || config->filter_type > 1)
- return 0;
- if (config->autofilter < 0 || config->autofilter > 1)
- return 0;
- if (config->pass < 1 || config->pass > 10)
- return 0;
- if (config->show_compressed < 0 || config->show_compressed > 1)
- return 0;
- if (config->preprocessing < 0 || config->preprocessing > 1)
- return 0;
- if (config->partitions < 0 || config->partitions > 3)
- return 0;
- if (config->partition_limit < 0 || config->partition_limit > 100)
- return 0;
- if (config->alpha_compression < 0)
- return 0;
- if (config->alpha_filtering < 0)
- return 0;
- if (config->alpha_quality < 0 || config->alpha_quality > 100)
- return 0;
- if (config->lossless < 0 || config->lossless > 1)
- return 0;
- if (config->image_hint >= WEBP_HINT_LAST)
- return 0;
- return 1;
-}
-
-//------------------------------------------------------------------------------
-
-#if defined(__cplusplus) || defined(c_plusplus)
-} // extern "C"
-#endif
diff --git a/drivers/webpold/enc/cost.c b/drivers/webpold/enc/cost.c
deleted file mode 100644
index 92e0cc713c..0000000000
--- a/drivers/webpold/enc/cost.c
+++ /dev/null
@@ -1,494 +0,0 @@
-// Copyright 2011 Google Inc. All Rights Reserved.
-//
-// This code is licensed under the same terms as WebM:
-// Software License Agreement: http://www.webmproject.org/license/software/
-// Additional IP Rights Grant: http://www.webmproject.org/license/additional/
-// -----------------------------------------------------------------------------
-//
-// Cost tables for level and modes
-//
-// Author: Skal (pascal.massimino@gmail.com)
-
-#include "./cost.h"
-
-#if defined(__cplusplus) || defined(c_plusplus)
-extern "C" {
-#endif
-
-//------------------------------------------------------------------------------
-// Boolean-cost cost table
-
-const uint16_t VP8EntropyCost[256] = {
- 1792, 1792, 1792, 1536, 1536, 1408, 1366, 1280, 1280, 1216,
- 1178, 1152, 1110, 1076, 1061, 1024, 1024, 992, 968, 951,
- 939, 911, 896, 878, 871, 854, 838, 820, 811, 794,
- 786, 768, 768, 752, 740, 732, 720, 709, 704, 690,
- 683, 672, 666, 655, 647, 640, 631, 622, 615, 607,
- 598, 592, 586, 576, 572, 564, 559, 555, 547, 541,
- 534, 528, 522, 512, 512, 504, 500, 494, 488, 483,
- 477, 473, 467, 461, 458, 452, 448, 443, 438, 434,
- 427, 424, 419, 415, 410, 406, 403, 399, 394, 390,
- 384, 384, 377, 374, 370, 366, 362, 359, 355, 351,
- 347, 342, 342, 336, 333, 330, 326, 323, 320, 316,
- 312, 308, 305, 302, 299, 296, 293, 288, 287, 283,
- 280, 277, 274, 272, 268, 266, 262, 256, 256, 256,
- 251, 248, 245, 242, 240, 237, 234, 232, 228, 226,
- 223, 221, 218, 216, 214, 211, 208, 205, 203, 201,
- 198, 196, 192, 191, 188, 187, 183, 181, 179, 176,
- 175, 171, 171, 168, 165, 163, 160, 159, 156, 154,
- 152, 150, 148, 146, 144, 142, 139, 138, 135, 133,
- 131, 128, 128, 125, 123, 121, 119, 117, 115, 113,
- 111, 110, 107, 105, 103, 102, 100, 98, 96, 94,
- 92, 91, 89, 86, 86, 83, 82, 80, 77, 76,
- 74, 73, 71, 69, 67, 66, 64, 63, 61, 59,
- 57, 55, 54, 52, 51, 49, 47, 46, 44, 43,
- 41, 40, 38, 36, 35, 33, 32, 30, 29, 27,
- 25, 24, 22, 21, 19, 18, 16, 15, 13, 12,
- 10, 9, 7, 6, 4, 3
-};
-
-//------------------------------------------------------------------------------
-// Level cost tables
-
-// For each given level, the following table gives the pattern of contexts to
-// use for coding it (in [][0]) as well as the bit value to use for each
-// context (in [][1]).
-const uint16_t VP8LevelCodes[MAX_VARIABLE_LEVEL][2] = {
- {0x001, 0x000}, {0x007, 0x001}, {0x00f, 0x005},
- {0x00f, 0x00d}, {0x033, 0x003}, {0x033, 0x003}, {0x033, 0x023},
- {0x033, 0x023}, {0x033, 0x023}, {0x033, 0x023}, {0x0d3, 0x013},
- {0x0d3, 0x013}, {0x0d3, 0x013}, {0x0d3, 0x013}, {0x0d3, 0x013},
- {0x0d3, 0x013}, {0x0d3, 0x013}, {0x0d3, 0x013}, {0x0d3, 0x093},
- {0x0d3, 0x093}, {0x0d3, 0x093}, {0x0d3, 0x093}, {0x0d3, 0x093},
- {0x0d3, 0x093}, {0x0d3, 0x093}, {0x0d3, 0x093}, {0x0d3, 0x093},
- {0x0d3, 0x093}, {0x0d3, 0x093}, {0x0d3, 0x093}, {0x0d3, 0x093},
- {0x0d3, 0x093}, {0x0d3, 0x093}, {0x0d3, 0x093}, {0x153, 0x053},
- {0x153, 0x053}, {0x153, 0x053}, {0x153, 0x053}, {0x153, 0x053},
- {0x153, 0x053}, {0x153, 0x053}, {0x153, 0x053}, {0x153, 0x053},
- {0x153, 0x053}, {0x153, 0x053}, {0x153, 0x053}, {0x153, 0x053},
- {0x153, 0x053}, {0x153, 0x053}, {0x153, 0x053}, {0x153, 0x053},
- {0x153, 0x053}, {0x153, 0x053}, {0x153, 0x053}, {0x153, 0x053},
- {0x153, 0x053}, {0x153, 0x053}, {0x153, 0x053}, {0x153, 0x053},
- {0x153, 0x053}, {0x153, 0x053}, {0x153, 0x053}, {0x153, 0x053},
- {0x153, 0x053}, {0x153, 0x053}, {0x153, 0x053}, {0x153, 0x153}
-};
-
-// fixed costs for coding levels, deduce from the coding tree.
-// This is only the part that doesn't depend on the probability state.
-const uint16_t VP8LevelFixedCosts[2048] = {
- 0, 256, 256, 256, 256, 432, 618, 630,
- 731, 640, 640, 828, 901, 948, 1021, 1101,
- 1174, 1221, 1294, 1042, 1085, 1115, 1158, 1202,
- 1245, 1275, 1318, 1337, 1380, 1410, 1453, 1497,
- 1540, 1570, 1613, 1280, 1295, 1317, 1332, 1358,
- 1373, 1395, 1410, 1454, 1469, 1491, 1506, 1532,
- 1547, 1569, 1584, 1601, 1616, 1638, 1653, 1679,
- 1694, 1716, 1731, 1775, 1790, 1812, 1827, 1853,
- 1868, 1890, 1905, 1727, 1733, 1742, 1748, 1759,
- 1765, 1774, 1780, 1800, 1806, 1815, 1821, 1832,
- 1838, 1847, 1853, 1878, 1884, 1893, 1899, 1910,
- 1916, 1925, 1931, 1951, 1957, 1966, 1972, 1983,
- 1989, 1998, 2004, 2027, 2033, 2042, 2048, 2059,
- 2065, 2074, 2080, 2100, 2106, 2115, 2121, 2132,
- 2138, 2147, 2153, 2178, 2184, 2193, 2199, 2210,
- 2216, 2225, 2231, 2251, 2257, 2266, 2272, 2283,
- 2289, 2298, 2304, 2168, 2174, 2183, 2189, 2200,
- 2206, 2215, 2221, 2241, 2247, 2256, 2262, 2273,
- 2279, 2288, 2294, 2319, 2325, 2334, 2340, 2351,
- 2357, 2366, 2372, 2392, 2398, 2407, 2413, 2424,
- 2430, 2439, 2445, 2468, 2474, 2483, 2489, 2500,
- 2506, 2515, 2521, 2541, 2547, 2556, 2562, 2573,
- 2579, 2588, 2594, 2619, 2625, 2634, 2640, 2651,
- 2657, 2666, 2672, 2692, 2698, 2707, 2713, 2724,
- 2730, 2739, 2745, 2540, 2546, 2555, 2561, 2572,
- 2578, 2587, 2593, 2613, 2619, 2628, 2634, 2645,
- 2651, 2660, 2666, 2691, 2697, 2706, 2712, 2723,
- 2729, 2738, 2744, 2764, 2770, 2779, 2785, 2796,
- 2802, 2811, 2817, 2840, 2846, 2855, 2861, 2872,
- 2878, 2887, 2893, 2913, 2919, 2928, 2934, 2945,
- 2951, 2960, 2966, 2991, 2997, 3006, 3012, 3023,
- 3029, 3038, 3044, 3064, 3070, 3079, 3085, 3096,
- 3102, 3111, 3117, 2981, 2987, 2996, 3002, 3013,
- 3019, 3028, 3034, 3054, 3060, 3069, 3075, 3086,
- 3092, 3101, 3107, 3132, 3138, 3147, 3153, 3164,
- 3170, 3179, 3185, 3205, 3211, 3220, 3226, 3237,
- 3243, 3252, 3258, 3281, 3287, 3296, 3302, 3313,
- 3319, 3328, 3334, 3354, 3360, 3369, 3375, 3386,
- 3392, 3401, 3407, 3432, 3438, 3447, 3453, 3464,
- 3470, 3479, 3485, 3505, 3511, 3520, 3526, 3537,
- 3543, 3552, 3558, 2816, 2822, 2831, 2837, 2848,
- 2854, 2863, 2869, 2889, 2895, 2904, 2910, 2921,
- 2927, 2936, 2942, 2967, 2973, 2982, 2988, 2999,
- 3005, 3014, 3020, 3040, 3046, 3055, 3061, 3072,
- 3078, 3087, 3093, 3116, 3122, 3131, 3137, 3148,
- 3154, 3163, 3169, 3189, 3195, 3204, 3210, 3221,
- 3227, 3236, 3242, 3267, 3273, 3282, 3288, 3299,
- 3305, 3314, 3320, 3340, 3346, 3355, 3361, 3372,
- 3378, 3387, 3393, 3257, 3263, 3272, 3278, 3289,
- 3295, 3304, 3310, 3330, 3336, 3345, 3351, 3362,
- 3368, 3377, 3383, 3408, 3414, 3423, 3429, 3440,
- 3446, 3455, 3461, 3481, 3487, 3496, 3502, 3513,
- 3519, 3528, 3534, 3557, 3563, 3572, 3578, 3589,
- 3595, 3604, 3610, 3630, 3636, 3645, 3651, 3662,
- 3668, 3677, 3683, 3708, 3714, 3723, 3729, 3740,
- 3746, 3755, 3761, 3781, 3787, 3796, 3802, 3813,
- 3819, 3828, 3834, 3629, 3635, 3644, 3650, 3661,
- 3667, 3676, 3682, 3702, 3708, 3717, 3723, 3734,
- 3740, 3749, 3755, 3780, 3786, 3795, 3801, 3812,
- 3818, 3827, 3833, 3853, 3859, 3868, 3874, 3885,
- 3891, 3900, 3906, 3929, 3935, 3944, 3950, 3961,
- 3967, 3976, 3982, 4002, 4008, 4017, 4023, 4034,
- 4040, 4049, 4055, 4080, 4086, 4095, 4101, 4112,
- 4118, 4127, 4133, 4153, 4159, 4168, 4174, 4185,
- 4191, 4200, 4206, 4070, 4076, 4085, 4091, 4102,
- 4108, 4117, 4123, 4143, 4149, 4158, 4164, 4175,
- 4181, 4190, 4196, 4221, 4227, 4236, 4242, 4253,
- 4259, 4268, 4274, 4294, 4300, 4309, 4315, 4326,
- 4332, 4341, 4347, 4370, 4376, 4385, 4391, 4402,
- 4408, 4417, 4423, 4443, 4449, 4458, 4464, 4475,
- 4481, 4490, 4496, 4521, 4527, 4536, 4542, 4553,
- 4559, 4568, 4574, 4594, 4600, 4609, 4615, 4626,
- 4632, 4641, 4647, 3515, 3521, 3530, 3536, 3547,
- 3553, 3562, 3568, 3588, 3594, 3603, 3609, 3620,
- 3626, 3635, 3641, 3666, 3672, 3681, 3687, 3698,
- 3704, 3713, 3719, 3739, 3745, 3754, 3760, 3771,
- 3777, 3786, 3792, 3815, 3821, 3830, 3836, 3847,
- 3853, 3862, 3868, 3888, 3894, 3903, 3909, 3920,
- 3926, 3935, 3941, 3966, 3972, 3981, 3987, 3998,
- 4004, 4013, 4019, 4039, 4045, 4054, 4060, 4071,
- 4077, 4086, 4092, 3956, 3962, 3971, 3977, 3988,
- 3994, 4003, 4009, 4029, 4035, 4044, 4050, 4061,
- 4067, 4076, 4082, 4107, 4113, 4122, 4128, 4139,
- 4145, 4154, 4160, 4180, 4186, 4195, 4201, 4212,
- 4218, 4227, 4233, 4256, 4262, 4271, 4277, 4288,
- 4294, 4303, 4309, 4329, 4335, 4344, 4350, 4361,
- 4367, 4376, 4382, 4407, 4413, 4422, 4428, 4439,
- 4445, 4454, 4460, 4480, 4486, 4495, 4501, 4512,
- 4518, 4527, 4533, 4328, 4334, 4343, 4349, 4360,
- 4366, 4375, 4381, 4401, 4407, 4416, 4422, 4433,
- 4439, 4448, 4454, 4479, 4485, 4494, 4500, 4511,
- 4517, 4526, 4532, 4552, 4558, 4567, 4573, 4584,
- 4590, 4599, 4605, 4628, 4634, 4643, 4649, 4660,
- 4666, 4675, 4681, 4701, 4707, 4716, 4722, 4733,
- 4739, 4748, 4754, 4779, 4785, 4794, 4800, 4811,
- 4817, 4826, 4832, 4852, 4858, 4867, 4873, 4884,
- 4890, 4899, 4905, 4769, 4775, 4784, 4790, 4801,
- 4807, 4816, 4822, 4842, 4848, 4857, 4863, 4874,
- 4880, 4889, 4895, 4920, 4926, 4935, 4941, 4952,
- 4958, 4967, 4973, 4993, 4999, 5008, 5014, 5025,
- 5031, 5040, 5046, 5069, 5075, 5084, 5090, 5101,
- 5107, 5116, 5122, 5142, 5148, 5157, 5163, 5174,
- 5180, 5189, 5195, 5220, 5226, 5235, 5241, 5252,
- 5258, 5267, 5273, 5293, 5299, 5308, 5314, 5325,
- 5331, 5340, 5346, 4604, 4610, 4619, 4625, 4636,
- 4642, 4651, 4657, 4677, 4683, 4692, 4698, 4709,
- 4715, 4724, 4730, 4755, 4761, 4770, 4776, 4787,
- 4793, 4802, 4808, 4828, 4834, 4843, 4849, 4860,
- 4866, 4875, 4881, 4904, 4910, 4919, 4925, 4936,
- 4942, 4951, 4957, 4977, 4983, 4992, 4998, 5009,
- 5015, 5024, 5030, 5055, 5061, 5070, 5076, 5087,
- 5093, 5102, 5108, 5128, 5134, 5143, 5149, 5160,
- 5166, 5175, 5181, 5045, 5051, 5060, 5066, 5077,
- 5083, 5092, 5098, 5118, 5124, 5133, 5139, 5150,
- 5156, 5165, 5171, 5196, 5202, 5211, 5217, 5228,
- 5234, 5243, 5249, 5269, 5275, 5284, 5290, 5301,
- 5307, 5316, 5322, 5345, 5351, 5360, 5366, 5377,
- 5383, 5392, 5398, 5418, 5424, 5433, 5439, 5450,
- 5456, 5465, 5471, 5496, 5502, 5511, 5517, 5528,
- 5534, 5543, 5549, 5569, 5575, 5584, 5590, 5601,
- 5607, 5616, 5622, 5417, 5423, 5432, 5438, 5449,
- 5455, 5464, 5470, 5490, 5496, 5505, 5511, 5522,
- 5528, 5537, 5543, 5568, 5574, 5583, 5589, 5600,
- 5606, 5615, 5621, 5641, 5647, 5656, 5662, 5673,
- 5679, 5688, 5694, 5717, 5723, 5732, 5738, 5749,
- 5755, 5764, 5770, 5790, 5796, 5805, 5811, 5822,
- 5828, 5837, 5843, 5868, 5874, 5883, 5889, 5900,
- 5906, 5915, 5921, 5941, 5947, 5956, 5962, 5973,
- 5979, 5988, 5994, 5858, 5864, 5873, 5879, 5890,
- 5896, 5905, 5911, 5931, 5937, 5946, 5952, 5963,
- 5969, 5978, 5984, 6009, 6015, 6024, 6030, 6041,
- 6047, 6056, 6062, 6082, 6088, 6097, 6103, 6114,
- 6120, 6129, 6135, 6158, 6164, 6173, 6179, 6190,
- 6196, 6205, 6211, 6231, 6237, 6246, 6252, 6263,
- 6269, 6278, 6284, 6309, 6315, 6324, 6330, 6341,
- 6347, 6356, 6362, 6382, 6388, 6397, 6403, 6414,
- 6420, 6429, 6435, 3515, 3521, 3530, 3536, 3547,
- 3553, 3562, 3568, 3588, 3594, 3603, 3609, 3620,
- 3626, 3635, 3641, 3666, 3672, 3681, 3687, 3698,
- 3704, 3713, 3719, 3739, 3745, 3754, 3760, 3771,
- 3777, 3786, 3792, 3815, 3821, 3830, 3836, 3847,
- 3853, 3862, 3868, 3888, 3894, 3903, 3909, 3920,
- 3926, 3935, 3941, 3966, 3972, 3981, 3987, 3998,
- 4004, 4013, 4019, 4039, 4045, 4054, 4060, 4071,
- 4077, 4086, 4092, 3956, 3962, 3971, 3977, 3988,
- 3994, 4003, 4009, 4029, 4035, 4044, 4050, 4061,
- 4067, 4076, 4082, 4107, 4113, 4122, 4128, 4139,
- 4145, 4154, 4160, 4180, 4186, 4195, 4201, 4212,
- 4218, 4227, 4233, 4256, 4262, 4271, 4277, 4288,
- 4294, 4303, 4309, 4329, 4335, 4344, 4350, 4361,
- 4367, 4376, 4382, 4407, 4413, 4422, 4428, 4439,
- 4445, 4454, 4460, 4480, 4486, 4495, 4501, 4512,
- 4518, 4527, 4533, 4328, 4334, 4343, 4349, 4360,
- 4366, 4375, 4381, 4401, 4407, 4416, 4422, 4433,
- 4439, 4448, 4454, 4479, 4485, 4494, 4500, 4511,
- 4517, 4526, 4532, 4552, 4558, 4567, 4573, 4584,
- 4590, 4599, 4605, 4628, 4634, 4643, 4649, 4660,
- 4666, 4675, 4681, 4701, 4707, 4716, 4722, 4733,
- 4739, 4748, 4754, 4779, 4785, 4794, 4800, 4811,
- 4817, 4826, 4832, 4852, 4858, 4867, 4873, 4884,
- 4890, 4899, 4905, 4769, 4775, 4784, 4790, 4801,
- 4807, 4816, 4822, 4842, 4848, 4857, 4863, 4874,
- 4880, 4889, 4895, 4920, 4926, 4935, 4941, 4952,
- 4958, 4967, 4973, 4993, 4999, 5008, 5014, 5025,
- 5031, 5040, 5046, 5069, 5075, 5084, 5090, 5101,
- 5107, 5116, 5122, 5142, 5148, 5157, 5163, 5174,
- 5180, 5189, 5195, 5220, 5226, 5235, 5241, 5252,
- 5258, 5267, 5273, 5293, 5299, 5308, 5314, 5325,
- 5331, 5340, 5346, 4604, 4610, 4619, 4625, 4636,
- 4642, 4651, 4657, 4677, 4683, 4692, 4698, 4709,
- 4715, 4724, 4730, 4755, 4761, 4770, 4776, 4787,
- 4793, 4802, 4808, 4828, 4834, 4843, 4849, 4860,
- 4866, 4875, 4881, 4904, 4910, 4919, 4925, 4936,
- 4942, 4951, 4957, 4977, 4983, 4992, 4998, 5009,
- 5015, 5024, 5030, 5055, 5061, 5070, 5076, 5087,
- 5093, 5102, 5108, 5128, 5134, 5143, 5149, 5160,
- 5166, 5175, 5181, 5045, 5051, 5060, 5066, 5077,
- 5083, 5092, 5098, 5118, 5124, 5133, 5139, 5150,
- 5156, 5165, 5171, 5196, 5202, 5211, 5217, 5228,
- 5234, 5243, 5249, 5269, 5275, 5284, 5290, 5301,
- 5307, 5316, 5322, 5345, 5351, 5360, 5366, 5377,
- 5383, 5392, 5398, 5418, 5424, 5433, 5439, 5450,
- 5456, 5465, 5471, 5496, 5502, 5511, 5517, 5528,
- 5534, 5543, 5549, 5569, 5575, 5584, 5590, 5601,
- 5607, 5616, 5622, 5417, 5423, 5432, 5438, 5449,
- 5455, 5464, 5470, 5490, 5496, 5505, 5511, 5522,
- 5528, 5537, 5543, 5568, 5574, 5583, 5589, 5600,
- 5606, 5615, 5621, 5641, 5647, 5656, 5662, 5673,
- 5679, 5688, 5694, 5717, 5723, 5732, 5738, 5749,
- 5755, 5764, 5770, 5790, 5796, 5805, 5811, 5822,
- 5828, 5837, 5843, 5868, 5874, 5883, 5889, 5900,
- 5906, 5915, 5921, 5941, 5947, 5956, 5962, 5973,
- 5979, 5988, 5994, 5858, 5864, 5873, 5879, 5890,
- 5896, 5905, 5911, 5931, 5937, 5946, 5952, 5963,
- 5969, 5978, 5984, 6009, 6015, 6024, 6030, 6041,
- 6047, 6056, 6062, 6082, 6088, 6097, 6103, 6114,
- 6120, 6129, 6135, 6158, 6164, 6173, 6179, 6190,
- 6196, 6205, 6211, 6231, 6237, 6246, 6252, 6263,
- 6269, 6278, 6284, 6309, 6315, 6324, 6330, 6341,
- 6347, 6356, 6362, 6382, 6388, 6397, 6403, 6414,
- 6420, 6429, 6435, 5303, 5309, 5318, 5324, 5335,
- 5341, 5350, 5356, 5376, 5382, 5391, 5397, 5408,
- 5414, 5423, 5429, 5454, 5460, 5469, 5475, 5486,
- 5492, 5501, 5507, 5527, 5533, 5542, 5548, 5559,
- 5565, 5574, 5580, 5603, 5609, 5618, 5624, 5635,
- 5641, 5650, 5656, 5676, 5682, 5691, 5697, 5708,
- 5714, 5723, 5729, 5754, 5760, 5769, 5775, 5786,
- 5792, 5801, 5807, 5827, 5833, 5842, 5848, 5859,
- 5865, 5874, 5880, 5744, 5750, 5759, 5765, 5776,
- 5782, 5791, 5797, 5817, 5823, 5832, 5838, 5849,
- 5855, 5864, 5870, 5895, 5901, 5910, 5916, 5927,
- 5933, 5942, 5948, 5968, 5974, 5983, 5989, 6000,
- 6006, 6015, 6021, 6044, 6050, 6059, 6065, 6076,
- 6082, 6091, 6097, 6117, 6123, 6132, 6138, 6149,
- 6155, 6164, 6170, 6195, 6201, 6210, 6216, 6227,
- 6233, 6242, 6248, 6268, 6274, 6283, 6289, 6300,
- 6306, 6315, 6321, 6116, 6122, 6131, 6137, 6148,
- 6154, 6163, 6169, 6189, 6195, 6204, 6210, 6221,
- 6227, 6236, 6242, 6267, 6273, 6282, 6288, 6299,
- 6305, 6314, 6320, 6340, 6346, 6355, 6361, 6372,
- 6378, 6387, 6393, 6416, 6422, 6431, 6437, 6448,
- 6454, 6463, 6469, 6489, 6495, 6504, 6510, 6521,
- 6527, 6536, 6542, 6567, 6573, 6582, 6588, 6599,
- 6605, 6614, 6620, 6640, 6646, 6655, 6661, 6672,
- 6678, 6687, 6693, 6557, 6563, 6572, 6578, 6589,
- 6595, 6604, 6610, 6630, 6636, 6645, 6651, 6662,
- 6668, 6677, 6683, 6708, 6714, 6723, 6729, 6740,
- 6746, 6755, 6761, 6781, 6787, 6796, 6802, 6813,
- 6819, 6828, 6834, 6857, 6863, 6872, 6878, 6889,
- 6895, 6904, 6910, 6930, 6936, 6945, 6951, 6962,
- 6968, 6977, 6983, 7008, 7014, 7023, 7029, 7040,
- 7046, 7055, 7061, 7081, 7087, 7096, 7102, 7113,
- 7119, 7128, 7134, 6392, 6398, 6407, 6413, 6424,
- 6430, 6439, 6445, 6465, 6471, 6480, 6486, 6497,
- 6503, 6512, 6518, 6543, 6549, 6558, 6564, 6575,
- 6581, 6590, 6596, 6616, 6622, 6631, 6637, 6648,
- 6654, 6663, 6669, 6692, 6698, 6707, 6713, 6724,
- 6730, 6739, 6745, 6765, 6771, 6780, 6786, 6797,
- 6803, 6812, 6818, 6843, 6849, 6858, 6864, 6875,
- 6881, 6890, 6896, 6916, 6922, 6931, 6937, 6948,
- 6954, 6963, 6969, 6833, 6839, 6848, 6854, 6865,
- 6871, 6880, 6886, 6906, 6912, 6921, 6927, 6938,
- 6944, 6953, 6959, 6984, 6990, 6999, 7005, 7016,
- 7022, 7031, 7037, 7057, 7063, 7072, 7078, 7089,
- 7095, 7104, 7110, 7133, 7139, 7148, 7154, 7165,
- 7171, 7180, 7186, 7206, 7212, 7221, 7227, 7238,
- 7244, 7253, 7259, 7284, 7290, 7299, 7305, 7316,
- 7322, 7331, 7337, 7357, 7363, 7372, 7378, 7389,
- 7395, 7404, 7410, 7205, 7211, 7220, 7226, 7237,
- 7243, 7252, 7258, 7278, 7284, 7293, 7299, 7310,
- 7316, 7325, 7331, 7356, 7362, 7371, 7377, 7388,
- 7394, 7403, 7409, 7429, 7435, 7444, 7450, 7461,
- 7467, 7476, 7482, 7505, 7511, 7520, 7526, 7537,
- 7543, 7552, 7558, 7578, 7584, 7593, 7599, 7610,
- 7616, 7625, 7631, 7656, 7662, 7671, 7677, 7688,
- 7694, 7703, 7709, 7729, 7735, 7744, 7750, 7761
-};
-
-static int VariableLevelCost(int level, const uint8_t probas[NUM_PROBAS]) {
- int pattern = VP8LevelCodes[level - 1][0];
- int bits = VP8LevelCodes[level - 1][1];
- int cost = 0;
- int i;
- for (i = 2; pattern; ++i) {
- if (pattern & 1) {
- cost += VP8BitCost(bits & 1, probas[i]);
- }
- bits >>= 1;
- pattern >>= 1;
- }
- return cost;
-}
-
-//------------------------------------------------------------------------------
-// Pre-calc level costs once for all
-
-void VP8CalculateLevelCosts(VP8Proba* const proba) {
- int ctype, band, ctx;
-
- if (!proba->dirty_) return; // nothing to do.
-
- for (ctype = 0; ctype < NUM_TYPES; ++ctype) {
- for (band = 0; band < NUM_BANDS; ++band) {
- for(ctx = 0; ctx < NUM_CTX; ++ctx) {
- const uint8_t* const p = proba->coeffs_[ctype][band][ctx];
- uint16_t* const table = proba->level_cost_[ctype][band][ctx];
- const int cost_base = VP8BitCost(1, p[1]);
- int v;
- table[0] = VP8BitCost(0, p[1]);
- for (v = 1; v <= MAX_VARIABLE_LEVEL; ++v) {
- table[v] = cost_base + VariableLevelCost(v, p);
- }
- // Starting at level 67 and up, the variable part of the cost is
- // actually constant.
- }
- }
- }
- proba->dirty_ = 0;
-}
-
-//------------------------------------------------------------------------------
-// Mode cost tables.
-
-// These are the fixed probabilities (in the coding trees) turned into bit-cost
-// by calling VP8BitCost().
-const uint16_t VP8FixedCostsUV[4] = { 302, 984, 439, 642 };
-// note: these values include the fixed VP8BitCost(1, 145) mode selection cost.
-const uint16_t VP8FixedCostsI16[4] = { 663, 919, 872, 919 };
-const uint16_t VP8FixedCostsI4[NUM_BMODES][NUM_BMODES][NUM_BMODES] = {
- { { 251, 1362, 1934, 2085, 2314, 2230, 1839, 1988, 2437, 2348 },
- { 403, 680, 1507, 1519, 2060, 2005, 1992, 1914, 1924, 1733 },
- { 353, 1121, 973, 1895, 2060, 1787, 1671, 1516, 2012, 1868 },
- { 770, 852, 1581, 632, 1393, 1780, 1823, 1936, 1074, 1218 },
- { 510, 1270, 1467, 1319, 847, 1279, 1792, 2094, 1080, 1353 },
- { 488, 1322, 918, 1573, 1300, 883, 1814, 1752, 1756, 1502 },
- { 425, 992, 1820, 1514, 1843, 2440, 937, 1771, 1924, 1129 },
- { 363, 1248, 1257, 1970, 2194, 2385, 1569, 953, 1951, 1601 },
- { 723, 1257, 1631, 964, 963, 1508, 1697, 1824, 671, 1418 },
- { 635, 1038, 1573, 930, 1673, 1413, 1410, 1687, 1410, 749 } },
- { { 451, 613, 1345, 1702, 1870, 1716, 1728, 1766, 2190, 2310 },
- { 678, 453, 1171, 1443, 1925, 1831, 2045, 1781, 1887, 1602 },
- { 711, 666, 674, 1718, 1910, 1493, 1775, 1193, 2325, 2325 },
- { 883, 854, 1583, 542, 1800, 1878, 1664, 2149, 1207, 1087 },
- { 669, 994, 1248, 1122, 949, 1179, 1376, 1729, 1070, 1244 },
- { 715, 1026, 715, 1350, 1430, 930, 1717, 1296, 1479, 1479 },
- { 544, 841, 1656, 1450, 2094, 3883, 1010, 1759, 2076, 809 },
- { 610, 855, 957, 1553, 2067, 1561, 1704, 824, 2066, 1226 },
- { 833, 960, 1416, 819, 1277, 1619, 1501, 1617, 757, 1182 },
- { 711, 964, 1252, 879, 1441, 1828, 1508, 1636, 1594, 734 } },
- { { 605, 764, 734, 1713, 1747, 1192, 1819, 1353, 1877, 2392 },
- { 866, 641, 586, 1622, 2072, 1431, 1888, 1346, 2189, 1764 },
- { 901, 851, 456, 2165, 2281, 1405, 1739, 1193, 2183, 2443 },
- { 770, 1045, 952, 1078, 1342, 1191, 1436, 1063, 1303, 995 },
- { 901, 1086, 727, 1170, 884, 1105, 1267, 1401, 1739, 1337 },
- { 951, 1162, 595, 1488, 1388, 703, 1790, 1366, 2057, 1724 },
- { 534, 986, 1273, 1987, 3273, 1485, 1024, 1399, 1583, 866 },
- { 699, 1182, 695, 1978, 1726, 1986, 1326, 714, 1750, 1672 },
- { 951, 1217, 1209, 920, 1062, 1441, 1548, 999, 952, 932 },
- { 733, 1284, 784, 1256, 1557, 1098, 1257, 1357, 1414, 908 } },
- { { 316, 1075, 1653, 1220, 2145, 2051, 1730, 2131, 1884, 1790 },
- { 745, 516, 1404, 894, 1599, 2375, 2013, 2105, 1475, 1381 },
- { 516, 729, 1088, 1319, 1637, 3426, 1636, 1275, 1531, 1453 },
- { 894, 943, 2138, 468, 1704, 2259, 2069, 1763, 1266, 1158 },
- { 605, 1025, 1235, 871, 1170, 1767, 1493, 1500, 1104, 1258 },
- { 739, 826, 1207, 1151, 1412, 846, 1305, 2726, 1014, 1569 },
- { 558, 825, 1820, 1398, 3344, 1556, 1218, 1550, 1228, 878 },
- { 429, 951, 1089, 1816, 3861, 3861, 1556, 969, 1568, 1828 },
- { 883, 961, 1752, 769, 1468, 1810, 2081, 2346, 613, 1298 },
- { 803, 895, 1372, 641, 1303, 1708, 1686, 1700, 1306, 1033 } },
- { { 439, 1267, 1270, 1579, 963, 1193, 1723, 1729, 1198, 1993 },
- { 705, 725, 1029, 1153, 1176, 1103, 1821, 1567, 1259, 1574 },
- { 723, 859, 802, 1253, 972, 1202, 1407, 1665, 1520, 1674 },
- { 894, 960, 1254, 887, 1052, 1607, 1344, 1349, 865, 1150 },
- { 833, 1312, 1337, 1205, 572, 1288, 1414, 1529, 1088, 1430 },
- { 842, 1279, 1068, 1861, 862, 688, 1861, 1630, 1039, 1381 },
- { 766, 938, 1279, 1546, 3338, 1550, 1031, 1542, 1288, 640 },
- { 715, 1090, 835, 1609, 1100, 1100, 1603, 1019, 1102, 1617 },
- { 894, 1813, 1500, 1188, 789, 1194, 1491, 1919, 617, 1333 },
- { 610, 1076, 1644, 1281, 1283, 975, 1179, 1688, 1434, 889 } },
- { { 544, 971, 1146, 1849, 1221, 740, 1857, 1621, 1683, 2430 },
- { 723, 705, 961, 1371, 1426, 821, 2081, 2079, 1839, 1380 },
- { 783, 857, 703, 2145, 1419, 814, 1791, 1310, 1609, 2206 },
- { 997, 1000, 1153, 792, 1229, 1162, 1810, 1418, 942, 979 },
- { 901, 1226, 883, 1289, 793, 715, 1904, 1649, 1319, 3108 },
- { 979, 1478, 782, 2216, 1454, 455, 3092, 1591, 1997, 1664 },
- { 663, 1110, 1504, 1114, 1522, 3311, 676, 1522, 1530, 1024 },
- { 605, 1138, 1153, 1314, 1569, 1315, 1157, 804, 1574, 1320 },
- { 770, 1216, 1218, 1227, 869, 1384, 1232, 1375, 834, 1239 },
- { 775, 1007, 843, 1216, 1225, 1074, 2527, 1479, 1149, 975 } },
- { { 477, 817, 1309, 1439, 1708, 1454, 1159, 1241, 1945, 1672 },
- { 577, 796, 1112, 1271, 1618, 1458, 1087, 1345, 1831, 1265 },
- { 663, 776, 753, 1940, 1690, 1690, 1227, 1097, 3149, 1361 },
- { 766, 1299, 1744, 1161, 1565, 1106, 1045, 1230, 1232, 707 },
- { 915, 1026, 1404, 1182, 1184, 851, 1428, 2425, 1043, 789 },
- { 883, 1456, 790, 1082, 1086, 985, 1083, 1484, 1238, 1160 },
- { 507, 1345, 2261, 1995, 1847, 3636, 653, 1761, 2287, 933 },
- { 553, 1193, 1470, 2057, 2059, 2059, 833, 779, 2058, 1263 },
- { 766, 1275, 1515, 1039, 957, 1554, 1286, 1540, 1289, 705 },
- { 499, 1378, 1496, 1385, 1850, 1850, 1044, 2465, 1515, 720 } },
- { { 553, 930, 978, 2077, 1968, 1481, 1457, 761, 1957, 2362 },
- { 694, 864, 905, 1720, 1670, 1621, 1429, 718, 2125, 1477 },
- { 699, 968, 658, 3190, 2024, 1479, 1865, 750, 2060, 2320 },
- { 733, 1308, 1296, 1062, 1576, 1322, 1062, 1112, 1172, 816 },
- { 920, 927, 1052, 939, 947, 1156, 1152, 1073, 3056, 1268 },
- { 723, 1534, 711, 1547, 1294, 892, 1553, 928, 1815, 1561 },
- { 663, 1366, 1583, 2111, 1712, 3501, 522, 1155, 2130, 1133 },
- { 614, 1731, 1188, 2343, 1944, 3733, 1287, 487, 3546, 1758 },
- { 770, 1585, 1312, 826, 884, 2673, 1185, 1006, 1195, 1195 },
- { 758, 1333, 1273, 1023, 1621, 1162, 1351, 833, 1479, 862 } },
- { { 376, 1193, 1446, 1149, 1545, 1577, 1870, 1789, 1175, 1823 },
- { 803, 633, 1136, 1058, 1350, 1323, 1598, 2247, 1072, 1252 },
- { 614, 1048, 943, 981, 1152, 1869, 1461, 1020, 1618, 1618 },
- { 1107, 1085, 1282, 592, 1779, 1933, 1648, 2403, 691, 1246 },
- { 851, 1309, 1223, 1243, 895, 1593, 1792, 2317, 627, 1076 },
- { 770, 1216, 1030, 1125, 921, 981, 1629, 1131, 1049, 1646 },
- { 626, 1469, 1456, 1081, 1489, 3278, 981, 1232, 1498, 733 },
- { 617, 1201, 812, 1220, 1476, 1476, 1478, 970, 1228, 1488 },
- { 1179, 1393, 1540, 999, 1243, 1503, 1916, 1925, 414, 1614 },
- { 943, 1088, 1490, 682, 1112, 1372, 1756, 1505, 966, 966 } },
- { { 322, 1142, 1589, 1396, 2144, 1859, 1359, 1925, 2084, 1518 },
- { 617, 625, 1241, 1234, 2121, 1615, 1524, 1858, 1720, 1004 },
- { 553, 851, 786, 1299, 1452, 1560, 1372, 1561, 1967, 1713 },
- { 770, 977, 1396, 568, 1893, 1639, 1540, 2108, 1430, 1013 },
- { 684, 1120, 1375, 982, 930, 2719, 1638, 1643, 933, 993 },
- { 553, 1103, 996, 1356, 1361, 1005, 1507, 1761, 1184, 1268 },
- { 419, 1247, 1537, 1554, 1817, 3606, 1026, 1666, 1829, 923 },
- { 439, 1139, 1101, 1257, 3710, 1922, 1205, 1040, 1931, 1529 },
- { 979, 935, 1269, 847, 1202, 1286, 1530, 1535, 827, 1036 },
- { 516, 1378, 1569, 1110, 1798, 1798, 1198, 2199, 1543, 712 } },
-};
-
-//------------------------------------------------------------------------------
-
-#if defined(__cplusplus) || defined(c_plusplus)
-} // extern "C"
-#endif
diff --git a/drivers/webpold/enc/cost.h b/drivers/webpold/enc/cost.h
deleted file mode 100644
index 09b75b699d..0000000000
--- a/drivers/webpold/enc/cost.h
+++ /dev/null
@@ -1,48 +0,0 @@
-// Copyright 2011 Google Inc. All Rights Reserved.
-//
-// This code is licensed under the same terms as WebM:
-// Software License Agreement: http://www.webmproject.org/license/software/
-// Additional IP Rights Grant: http://www.webmproject.org/license/additional/
-// -----------------------------------------------------------------------------
-//
-// Cost tables for level and modes.
-//
-// Author: Skal (pascal.massimino@gmail.com)
-
-#ifndef WEBP_ENC_COST_H_
-#define WEBP_ENC_COST_H_
-
-#include "./vp8enci.h"
-
-#if defined(__cplusplus) || defined(c_plusplus)
-extern "C" {
-#endif
-
-extern const uint16_t VP8LevelFixedCosts[2048]; // approximate cost per level
-extern const uint16_t VP8EntropyCost[256]; // 8bit fixed-point log(p)
-
-// Cost of coding one event with probability 'proba'.
-static WEBP_INLINE int VP8BitCost(int bit, uint8_t proba) {
- return !bit ? VP8EntropyCost[proba] : VP8EntropyCost[255 - proba];
-}
-
-// Level cost calculations
-extern const uint16_t VP8LevelCodes[MAX_VARIABLE_LEVEL][2];
-void VP8CalculateLevelCosts(VP8Proba* const proba);
-static WEBP_INLINE int VP8LevelCost(const uint16_t* const table, int level) {
- return VP8LevelFixedCosts[level]
- + table[(level > MAX_VARIABLE_LEVEL) ? MAX_VARIABLE_LEVEL : level];
-}
-
-// Mode costs
-extern const uint16_t VP8FixedCostsUV[4];
-extern const uint16_t VP8FixedCostsI16[4];
-extern const uint16_t VP8FixedCostsI4[NUM_BMODES][NUM_BMODES][NUM_BMODES];
-
-//------------------------------------------------------------------------------
-
-#if defined(__cplusplus) || defined(c_plusplus)
-} // extern "C"
-#endif
-
-#endif /* WEBP_ENC_COST_H_ */
diff --git a/drivers/webpold/enc/filter.c b/drivers/webpold/enc/filter.c
deleted file mode 100644
index 7fb78a3949..0000000000
--- a/drivers/webpold/enc/filter.c
+++ /dev/null
@@ -1,409 +0,0 @@
-// Copyright 2011 Google Inc. All Rights Reserved.
-//
-// This code is licensed under the same terms as WebM:
-// Software License Agreement: http://www.webmproject.org/license/software/
-// Additional IP Rights Grant: http://www.webmproject.org/license/additional/
-// -----------------------------------------------------------------------------
-//
-// Selecting filter level
-//
-// Author: somnath@google.com (Somnath Banerjee)
-
-#include "./vp8enci.h"
-
-#if defined(__cplusplus) || defined(c_plusplus)
-extern "C" {
-#endif
-
-// NOTE: clip1, tables and InitTables are repeated entries of dsp.c
-static uint8_t abs0[255 + 255 + 1]; // abs(i)
-static uint8_t abs1[255 + 255 + 1]; // abs(i)>>1
-static int8_t sclip1[1020 + 1020 + 1]; // clips [-1020, 1020] to [-128, 127]
-static int8_t sclip2[112 + 112 + 1]; // clips [-112, 112] to [-16, 15]
-static uint8_t clip1[255 + 510 + 1]; // clips [-255,510] to [0,255]
-
-static int tables_ok = 0;
-
-static void InitTables(void) {
- if (!tables_ok) {
- int i;
- for (i = -255; i <= 255; ++i) {
- abs0[255 + i] = (i < 0) ? -i : i;
- abs1[255 + i] = abs0[255 + i] >> 1;
- }
- for (i = -1020; i <= 1020; ++i) {
- sclip1[1020 + i] = (i < -128) ? -128 : (i > 127) ? 127 : i;
- }
- for (i = -112; i <= 112; ++i) {
- sclip2[112 + i] = (i < -16) ? -16 : (i > 15) ? 15 : i;
- }
- for (i = -255; i <= 255 + 255; ++i) {
- clip1[255 + i] = (i < 0) ? 0 : (i > 255) ? 255 : i;
- }
- tables_ok = 1;
- }
-}
-
-//------------------------------------------------------------------------------
-// Edge filtering functions
-
-// 4 pixels in, 2 pixels out
-static WEBP_INLINE void do_filter2(uint8_t* p, int step) {
- const int p1 = p[-2*step], p0 = p[-step], q0 = p[0], q1 = p[step];
- const int a = 3 * (q0 - p0) + sclip1[1020 + p1 - q1];
- const int a1 = sclip2[112 + ((a + 4) >> 3)];
- const int a2 = sclip2[112 + ((a + 3) >> 3)];
- p[-step] = clip1[255 + p0 + a2];
- p[ 0] = clip1[255 + q0 - a1];
-}
-
-// 4 pixels in, 4 pixels out
-static WEBP_INLINE void do_filter4(uint8_t* p, int step) {
- const int p1 = p[-2*step], p0 = p[-step], q0 = p[0], q1 = p[step];
- const int a = 3 * (q0 - p0);
- const int a1 = sclip2[112 + ((a + 4) >> 3)];
- const int a2 = sclip2[112 + ((a + 3) >> 3)];
- const int a3 = (a1 + 1) >> 1;
- p[-2*step] = clip1[255 + p1 + a3];
- p[- step] = clip1[255 + p0 + a2];
- p[ 0] = clip1[255 + q0 - a1];
- p[ step] = clip1[255 + q1 - a3];
-}
-
-// high edge-variance
-static WEBP_INLINE int hev(const uint8_t* p, int step, int thresh) {
- const int p1 = p[-2*step], p0 = p[-step], q0 = p[0], q1 = p[step];
- return (abs0[255 + p1 - p0] > thresh) || (abs0[255 + q1 - q0] > thresh);
-}
-
-static WEBP_INLINE int needs_filter(const uint8_t* p, int step, int thresh) {
- const int p1 = p[-2*step], p0 = p[-step], q0 = p[0], q1 = p[step];
- return (2 * abs0[255 + p0 - q0] + abs1[255 + p1 - q1]) <= thresh;
-}
-
-static WEBP_INLINE int needs_filter2(const uint8_t* p,
- int step, int t, int it) {
- const int p3 = p[-4*step], p2 = p[-3*step], p1 = p[-2*step], p0 = p[-step];
- const int q0 = p[0], q1 = p[step], q2 = p[2*step], q3 = p[3*step];
- if ((2 * abs0[255 + p0 - q0] + abs1[255 + p1 - q1]) > t)
- return 0;
- return abs0[255 + p3 - p2] <= it && abs0[255 + p2 - p1] <= it &&
- abs0[255 + p1 - p0] <= it && abs0[255 + q3 - q2] <= it &&
- abs0[255 + q2 - q1] <= it && abs0[255 + q1 - q0] <= it;
-}
-
-//------------------------------------------------------------------------------
-// Simple In-loop filtering (Paragraph 15.2)
-
-static void SimpleVFilter16(uint8_t* p, int stride, int thresh) {
- int i;
- for (i = 0; i < 16; ++i) {
- if (needs_filter(p + i, stride, thresh)) {
- do_filter2(p + i, stride);
- }
- }
-}
-
-static void SimpleHFilter16(uint8_t* p, int stride, int thresh) {
- int i;
- for (i = 0; i < 16; ++i) {
- if (needs_filter(p + i * stride, 1, thresh)) {
- do_filter2(p + i * stride, 1);
- }
- }
-}
-
-static void SimpleVFilter16i(uint8_t* p, int stride, int thresh) {
- int k;
- for (k = 3; k > 0; --k) {
- p += 4 * stride;
- SimpleVFilter16(p, stride, thresh);
- }
-}
-
-static void SimpleHFilter16i(uint8_t* p, int stride, int thresh) {
- int k;
- for (k = 3; k > 0; --k) {
- p += 4;
- SimpleHFilter16(p, stride, thresh);
- }
-}
-
-//------------------------------------------------------------------------------
-// Complex In-loop filtering (Paragraph 15.3)
-
-static WEBP_INLINE void FilterLoop24(uint8_t* p,
- int hstride, int vstride, int size,
- int thresh, int ithresh, int hev_thresh) {
- while (size-- > 0) {
- if (needs_filter2(p, hstride, thresh, ithresh)) {
- if (hev(p, hstride, hev_thresh)) {
- do_filter2(p, hstride);
- } else {
- do_filter4(p, hstride);
- }
- }
- p += vstride;
- }
-}
-
-// on three inner edges
-static void VFilter16i(uint8_t* p, int stride,
- int thresh, int ithresh, int hev_thresh) {
- int k;
- for (k = 3; k > 0; --k) {
- p += 4 * stride;
- FilterLoop24(p, stride, 1, 16, thresh, ithresh, hev_thresh);
- }
-}
-
-static void HFilter16i(uint8_t* p, int stride,
- int thresh, int ithresh, int hev_thresh) {
- int k;
- for (k = 3; k > 0; --k) {
- p += 4;
- FilterLoop24(p, 1, stride, 16, thresh, ithresh, hev_thresh);
- }
-}
-
-static void VFilter8i(uint8_t* u, uint8_t* v, int stride,
- int thresh, int ithresh, int hev_thresh) {
- FilterLoop24(u + 4 * stride, stride, 1, 8, thresh, ithresh, hev_thresh);
- FilterLoop24(v + 4 * stride, stride, 1, 8, thresh, ithresh, hev_thresh);
-}
-
-static void HFilter8i(uint8_t* u, uint8_t* v, int stride,
- int thresh, int ithresh, int hev_thresh) {
- FilterLoop24(u + 4, 1, stride, 8, thresh, ithresh, hev_thresh);
- FilterLoop24(v + 4, 1, stride, 8, thresh, ithresh, hev_thresh);
-}
-
-//------------------------------------------------------------------------------
-
-void (*VP8EncVFilter16i)(uint8_t*, int, int, int, int) = VFilter16i;
-void (*VP8EncHFilter16i)(uint8_t*, int, int, int, int) = HFilter16i;
-void (*VP8EncVFilter8i)(uint8_t*, uint8_t*, int, int, int, int) = VFilter8i;
-void (*VP8EncHFilter8i)(uint8_t*, uint8_t*, int, int, int, int) = HFilter8i;
-
-void (*VP8EncSimpleVFilter16i)(uint8_t*, int, int) = SimpleVFilter16i;
-void (*VP8EncSimpleHFilter16i)(uint8_t*, int, int) = SimpleHFilter16i;
-
-//------------------------------------------------------------------------------
-// Paragraph 15.4: compute the inner-edge filtering strength
-
-static int GetILevel(int sharpness, int level) {
- if (sharpness > 0) {
- if (sharpness > 4) {
- level >>= 2;
- } else {
- level >>= 1;
- }
- if (level > 9 - sharpness) {
- level = 9 - sharpness;
- }
- }
- if (level < 1) level = 1;
- return level;
-}
-
-static void DoFilter(const VP8EncIterator* const it, int level) {
- const VP8Encoder* const enc = it->enc_;
- const int ilevel = GetILevel(enc->config_->filter_sharpness, level);
- const int limit = 2 * level + ilevel;
-
- uint8_t* const y_dst = it->yuv_out2_ + Y_OFF;
- uint8_t* const u_dst = it->yuv_out2_ + U_OFF;
- uint8_t* const v_dst = it->yuv_out2_ + V_OFF;
-
- // copy current block to yuv_out2_
- memcpy(y_dst, it->yuv_out_, YUV_SIZE * sizeof(uint8_t));
-
- if (enc->filter_hdr_.simple_ == 1) { // simple
- VP8EncSimpleHFilter16i(y_dst, BPS, limit);
- VP8EncSimpleVFilter16i(y_dst, BPS, limit);
- } else { // complex
- const int hev_thresh = (level >= 40) ? 2 : (level >= 15) ? 1 : 0;
- VP8EncHFilter16i(y_dst, BPS, limit, ilevel, hev_thresh);
- VP8EncHFilter8i(u_dst, v_dst, BPS, limit, ilevel, hev_thresh);
- VP8EncVFilter16i(y_dst, BPS, limit, ilevel, hev_thresh);
- VP8EncVFilter8i(u_dst, v_dst, BPS, limit, ilevel, hev_thresh);
- }
-}
-
-//------------------------------------------------------------------------------
-// SSIM metric
-
-enum { KERNEL = 3 };
-static const double kMinValue = 1.e-10; // minimal threshold
-
-void VP8SSIMAddStats(const DistoStats* const src, DistoStats* const dst) {
- dst->w += src->w;
- dst->xm += src->xm;
- dst->ym += src->ym;
- dst->xxm += src->xxm;
- dst->xym += src->xym;
- dst->yym += src->yym;
-}
-
-static void VP8SSIMAccumulate(const uint8_t* src1, int stride1,
- const uint8_t* src2, int stride2,
- int xo, int yo, int W, int H,
- DistoStats* const stats) {
- const int ymin = (yo - KERNEL < 0) ? 0 : yo - KERNEL;
- const int ymax = (yo + KERNEL > H - 1) ? H - 1 : yo + KERNEL;
- const int xmin = (xo - KERNEL < 0) ? 0 : xo - KERNEL;
- const int xmax = (xo + KERNEL > W - 1) ? W - 1 : xo + KERNEL;
- int x, y;
- src1 += ymin * stride1;
- src2 += ymin * stride2;
- for (y = ymin; y <= ymax; ++y, src1 += stride1, src2 += stride2) {
- for (x = xmin; x <= xmax; ++x) {
- const int s1 = src1[x];
- const int s2 = src2[x];
- stats->w += 1;
- stats->xm += s1;
- stats->ym += s2;
- stats->xxm += s1 * s1;
- stats->xym += s1 * s2;
- stats->yym += s2 * s2;
- }
- }
-}
-
-double VP8SSIMGet(const DistoStats* const stats) {
- const double xmxm = stats->xm * stats->xm;
- const double ymym = stats->ym * stats->ym;
- const double xmym = stats->xm * stats->ym;
- const double w2 = stats->w * stats->w;
- double sxx = stats->xxm * stats->w - xmxm;
- double syy = stats->yym * stats->w - ymym;
- double sxy = stats->xym * stats->w - xmym;
- double C1, C2;
- double fnum;
- double fden;
- // small errors are possible, due to rounding. Clamp to zero.
- if (sxx < 0.) sxx = 0.;
- if (syy < 0.) syy = 0.;
- C1 = 6.5025 * w2;
- C2 = 58.5225 * w2;
- fnum = (2 * xmym + C1) * (2 * sxy + C2);
- fden = (xmxm + ymym + C1) * (sxx + syy + C2);
- return (fden != 0.) ? fnum / fden : kMinValue;
-}
-
-double VP8SSIMGetSquaredError(const DistoStats* const s) {
- if (s->w > 0.) {
- const double iw2 = 1. / (s->w * s->w);
- const double sxx = s->xxm * s->w - s->xm * s->xm;
- const double syy = s->yym * s->w - s->ym * s->ym;
- const double sxy = s->xym * s->w - s->xm * s->ym;
- const double SSE = iw2 * (sxx + syy - 2. * sxy);
- if (SSE > kMinValue) return SSE;
- }
- return kMinValue;
-}
-
-void VP8SSIMAccumulatePlane(const uint8_t* src1, int stride1,
- const uint8_t* src2, int stride2,
- int W, int H, DistoStats* const stats) {
- int x, y;
- for (y = 0; y < H; ++y) {
- for (x = 0; x < W; ++x) {
- VP8SSIMAccumulate(src1, stride1, src2, stride2, x, y, W, H, stats);
- }
- }
-}
-
-static double GetMBSSIM(const uint8_t* yuv1, const uint8_t* yuv2) {
- int x, y;
- DistoStats s = { .0, .0, .0, .0, .0, .0 };
-
- // compute SSIM in a 10 x 10 window
- for (x = 3; x < 13; x++) {
- for (y = 3; y < 13; y++) {
- VP8SSIMAccumulate(yuv1 + Y_OFF, BPS, yuv2 + Y_OFF, BPS, x, y, 16, 16, &s);
- }
- }
- for (x = 1; x < 7; x++) {
- for (y = 1; y < 7; y++) {
- VP8SSIMAccumulate(yuv1 + U_OFF, BPS, yuv2 + U_OFF, BPS, x, y, 8, 8, &s);
- VP8SSIMAccumulate(yuv1 + V_OFF, BPS, yuv2 + V_OFF, BPS, x, y, 8, 8, &s);
- }
- }
- return VP8SSIMGet(&s);
-}
-
-//------------------------------------------------------------------------------
-// Exposed APIs: Encoder should call the following 3 functions to adjust
-// loop filter strength
-
-void VP8InitFilter(VP8EncIterator* const it) {
- int s, i;
- if (!it->lf_stats_) return;
-
- InitTables();
- for (s = 0; s < NUM_MB_SEGMENTS; s++) {
- for (i = 0; i < MAX_LF_LEVELS; i++) {
- (*it->lf_stats_)[s][i] = 0;
- }
- }
-}
-
-void VP8StoreFilterStats(VP8EncIterator* const it) {
- int d;
- const int s = it->mb_->segment_;
- const int level0 = it->enc_->dqm_[s].fstrength_; // TODO: ref_lf_delta[]
-
- // explore +/-quant range of values around level0
- const int delta_min = -it->enc_->dqm_[s].quant_;
- const int delta_max = it->enc_->dqm_[s].quant_;
- const int step_size = (delta_max - delta_min >= 4) ? 4 : 1;
-
- if (!it->lf_stats_) return;
-
- // NOTE: Currently we are applying filter only across the sublock edges
- // There are two reasons for that.
- // 1. Applying filter on macro block edges will change the pixels in
- // the left and top macro blocks. That will be hard to restore
- // 2. Macro Blocks on the bottom and right are not yet compressed. So we
- // cannot apply filter on the right and bottom macro block edges.
- if (it->mb_->type_ == 1 && it->mb_->skip_) return;
-
- // Always try filter level zero
- (*it->lf_stats_)[s][0] += GetMBSSIM(it->yuv_in_, it->yuv_out_);
-
- for (d = delta_min; d <= delta_max; d += step_size) {
- const int level = level0 + d;
- if (level <= 0 || level >= MAX_LF_LEVELS) {
- continue;
- }
- DoFilter(it, level);
- (*it->lf_stats_)[s][level] += GetMBSSIM(it->yuv_in_, it->yuv_out2_);
- }
-}
-
-void VP8AdjustFilterStrength(VP8EncIterator* const it) {
- int s;
- VP8Encoder* const enc = it->enc_;
-
- if (!it->lf_stats_) {
- return;
- }
- for (s = 0; s < NUM_MB_SEGMENTS; s++) {
- int i, best_level = 0;
- // Improvement over filter level 0 should be at least 1e-5 (relatively)
- double best_v = 1.00001 * (*it->lf_stats_)[s][0];
- for (i = 1; i < MAX_LF_LEVELS; i++) {
- const double v = (*it->lf_stats_)[s][i];
- if (v > best_v) {
- best_v = v;
- best_level = i;
- }
- }
- enc->dqm_[s].fstrength_ = best_level;
- }
-}
-
-#if defined(__cplusplus) || defined(c_plusplus)
-} // extern "C"
-#endif
diff --git a/drivers/webpold/enc/frame.c b/drivers/webpold/enc/frame.c
deleted file mode 100644
index bdd360069b..0000000000
--- a/drivers/webpold/enc/frame.c
+++ /dev/null
@@ -1,939 +0,0 @@
-// Copyright 2011 Google Inc. All Rights Reserved.
-//
-// This code is licensed under the same terms as WebM:
-// Software License Agreement: http://www.webmproject.org/license/software/
-// Additional IP Rights Grant: http://www.webmproject.org/license/additional/
-// -----------------------------------------------------------------------------
-//
-// frame coding and analysis
-//
-// Author: Skal (pascal.massimino@gmail.com)
-
-#include <assert.h>
-#include <stdlib.h>
-#include <string.h>
-#include <math.h>
-
-#include "./vp8enci.h"
-#include "./cost.h"
-
-#if defined(__cplusplus) || defined(c_plusplus)
-extern "C" {
-#endif
-
-#define SEGMENT_VISU 0
-#define DEBUG_SEARCH 0 // useful to track search convergence
-
-// On-the-fly info about the current set of residuals. Handy to avoid
-// passing zillions of params.
-typedef struct {
- int first;
- int last;
- const int16_t* coeffs;
-
- int coeff_type;
- ProbaArray* prob;
- StatsArray* stats;
- CostArray* cost;
-} VP8Residual;
-
-//------------------------------------------------------------------------------
-// Tables for level coding
-
-const uint8_t VP8EncBands[16 + 1] = {
- 0, 1, 2, 3, 6, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7,
- 0 // sentinel
-};
-
-static const uint8_t kCat3[] = { 173, 148, 140 };
-static const uint8_t kCat4[] = { 176, 155, 140, 135 };
-static const uint8_t kCat5[] = { 180, 157, 141, 134, 130 };
-static const uint8_t kCat6[] =
- { 254, 254, 243, 230, 196, 177, 153, 140, 133, 130, 129 };
-
-//------------------------------------------------------------------------------
-// Reset the statistics about: number of skips, token proba, level cost,...
-
-static void ResetStats(VP8Encoder* const enc) {
- VP8Proba* const proba = &enc->proba_;
- VP8CalculateLevelCosts(proba);
- proba->nb_skip_ = 0;
-}
-
-//------------------------------------------------------------------------------
-// Skip decision probability
-
-#define SKIP_PROBA_THRESHOLD 250 // value below which using skip_proba is OK.
-
-static int CalcSkipProba(uint64_t nb, uint64_t total) {
- return (int)(total ? (total - nb) * 255 / total : 255);
-}
-
-// Returns the bit-cost for coding the skip probability.
-static int FinalizeSkipProba(VP8Encoder* const enc) {
- VP8Proba* const proba = &enc->proba_;
- const int nb_mbs = enc->mb_w_ * enc->mb_h_;
- const int nb_events = proba->nb_skip_;
- int size;
- proba->skip_proba_ = CalcSkipProba(nb_events, nb_mbs);
- proba->use_skip_proba_ = (proba->skip_proba_ < SKIP_PROBA_THRESHOLD);
- size = 256; // 'use_skip_proba' bit
- if (proba->use_skip_proba_) {
- size += nb_events * VP8BitCost(1, proba->skip_proba_)
- + (nb_mbs - nb_events) * VP8BitCost(0, proba->skip_proba_);
- size += 8 * 256; // cost of signaling the skip_proba_ itself.
- }
- return size;
-}
-
-//------------------------------------------------------------------------------
-// Recording of token probabilities.
-
-static void ResetTokenStats(VP8Encoder* const enc) {
- VP8Proba* const proba = &enc->proba_;
- memset(proba->stats_, 0, sizeof(proba->stats_));
-}
-
-// Record proba context used
-static int Record(int bit, proba_t* const stats) {
- proba_t p = *stats;
- if (p >= 0xffff0000u) { // an overflow is inbound.
- p = ((p + 1u) >> 1) & 0x7fff7fffu; // -> divide the stats by 2.
- }
- // record bit count (lower 16 bits) and increment total count (upper 16 bits).
- p += 0x00010000u + bit;
- *stats = p;
- return bit;
-}
-
-// We keep the table free variant around for reference, in case.
-#define USE_LEVEL_CODE_TABLE
-
-// Simulate block coding, but only record statistics.
-// Note: no need to record the fixed probas.
-static int RecordCoeffs(int ctx, const VP8Residual* const res) {
- int n = res->first;
- proba_t* s = res->stats[VP8EncBands[n]][ctx];
- if (res->last < 0) {
- Record(0, s + 0);
- return 0;
- }
- while (n <= res->last) {
- int v;
- Record(1, s + 0);
- while ((v = res->coeffs[n++]) == 0) {
- Record(0, s + 1);
- s = res->stats[VP8EncBands[n]][0];
- }
- Record(1, s + 1);
- if (!Record(2u < (unsigned int)(v + 1), s + 2)) { // v = -1 or 1
- s = res->stats[VP8EncBands[n]][1];
- } else {
- v = abs(v);
-#if !defined(USE_LEVEL_CODE_TABLE)
- if (!Record(v > 4, s + 3)) {
- if (Record(v != 2, s + 4))
- Record(v == 4, s + 5);
- } else if (!Record(v > 10, s + 6)) {
- Record(v > 6, s + 7);
- } else if (!Record((v >= 3 + (8 << 2)), s + 8)) {
- Record((v >= 3 + (8 << 1)), s + 9);
- } else {
- Record((v >= 3 + (8 << 3)), s + 10);
- }
-#else
- if (v > MAX_VARIABLE_LEVEL)
- v = MAX_VARIABLE_LEVEL;
-
- {
- const int bits = VP8LevelCodes[v - 1][1];
- int pattern = VP8LevelCodes[v - 1][0];
- int i;
- for (i = 0; (pattern >>= 1) != 0; ++i) {
- const int mask = 2 << i;
- if (pattern & 1) Record(!!(bits & mask), s + 3 + i);
- }
- }
-#endif
- s = res->stats[VP8EncBands[n]][2];
- }
- }
- if (n < 16) Record(0, s + 0);
- return 1;
-}
-
-// Collect statistics and deduce probabilities for next coding pass.
-// Return the total bit-cost for coding the probability updates.
-static int CalcTokenProba(int nb, int total) {
- assert(nb <= total);
- return nb ? (255 - nb * 255 / total) : 255;
-}
-
-// Cost of coding 'nb' 1's and 'total-nb' 0's using 'proba' probability.
-static int BranchCost(int nb, int total, int proba) {
- return nb * VP8BitCost(1, proba) + (total - nb) * VP8BitCost(0, proba);
-}
-
-static int FinalizeTokenProbas(VP8Encoder* const enc) {
- VP8Proba* const proba = &enc->proba_;
- int has_changed = 0;
- int size = 0;
- int t, b, c, p;
- for (t = 0; t < NUM_TYPES; ++t) {
- for (b = 0; b < NUM_BANDS; ++b) {
- for (c = 0; c < NUM_CTX; ++c) {
- for (p = 0; p < NUM_PROBAS; ++p) {
- const proba_t stats = proba->stats_[t][b][c][p];
- const int nb = (stats >> 0) & 0xffff;
- const int total = (stats >> 16) & 0xffff;
- const int update_proba = VP8CoeffsUpdateProba[t][b][c][p];
- const int old_p = VP8CoeffsProba0[t][b][c][p];
- const int new_p = CalcTokenProba(nb, total);
- const int old_cost = BranchCost(nb, total, old_p)
- + VP8BitCost(0, update_proba);
- const int new_cost = BranchCost(nb, total, new_p)
- + VP8BitCost(1, update_proba)
- + 8 * 256;
- const int use_new_p = (old_cost > new_cost);
- size += VP8BitCost(use_new_p, update_proba);
- if (use_new_p) { // only use proba that seem meaningful enough.
- proba->coeffs_[t][b][c][p] = new_p;
- has_changed |= (new_p != old_p);
- size += 8 * 256;
- } else {
- proba->coeffs_[t][b][c][p] = old_p;
- }
- }
- }
- }
- }
- proba->dirty_ = has_changed;
- return size;
-}
-
-//------------------------------------------------------------------------------
-// helper functions for residuals struct VP8Residual.
-
-static void InitResidual(int first, int coeff_type,
- VP8Encoder* const enc, VP8Residual* const res) {
- res->coeff_type = coeff_type;
- res->prob = enc->proba_.coeffs_[coeff_type];
- res->stats = enc->proba_.stats_[coeff_type];
- res->cost = enc->proba_.level_cost_[coeff_type];
- res->first = first;
-}
-
-static void SetResidualCoeffs(const int16_t* const coeffs,
- VP8Residual* const res) {
- int n;
- res->last = -1;
- for (n = 15; n >= res->first; --n) {
- if (coeffs[n]) {
- res->last = n;
- break;
- }
- }
- res->coeffs = coeffs;
-}
-
-//------------------------------------------------------------------------------
-// Mode costs
-
-static int GetResidualCost(int ctx, const VP8Residual* const res) {
- int n = res->first;
- int p0 = res->prob[VP8EncBands[n]][ctx][0];
- const uint16_t* t = res->cost[VP8EncBands[n]][ctx];
- int cost;
-
- if (res->last < 0) {
- return VP8BitCost(0, p0);
- }
- cost = 0;
- while (n <= res->last) {
- const int v = res->coeffs[n];
- const int b = VP8EncBands[n + 1];
- ++n;
- if (v == 0) {
- // short-case for VP8LevelCost(t, 0) (note: VP8LevelFixedCosts[0] == 0):
- cost += t[0];
- t = res->cost[b][0];
- continue;
- }
- cost += VP8BitCost(1, p0);
- if (2u >= (unsigned int)(v + 1)) { // v = -1 or 1
- // short-case for "VP8LevelCost(t, 1)" (256 is VP8LevelFixedCosts[1]):
- cost += 256 + t[1];
- p0 = res->prob[b][1][0];
- t = res->cost[b][1];
- } else {
- cost += VP8LevelCost(t, abs(v));
- p0 = res->prob[b][2][0];
- t = res->cost[b][2];
- }
- }
- if (n < 16) cost += VP8BitCost(0, p0);
- return cost;
-}
-
-int VP8GetCostLuma4(VP8EncIterator* const it, const int16_t levels[16]) {
- const int x = (it->i4_ & 3), y = (it->i4_ >> 2);
- VP8Residual res;
- VP8Encoder* const enc = it->enc_;
- int R = 0;
- int ctx;
-
- InitResidual(0, 3, enc, &res);
- ctx = it->top_nz_[x] + it->left_nz_[y];
- SetResidualCoeffs(levels, &res);
- R += GetResidualCost(ctx, &res);
- return R;
-}
-
-int VP8GetCostLuma16(VP8EncIterator* const it, const VP8ModeScore* const rd) {
- VP8Residual res;
- VP8Encoder* const enc = it->enc_;
- int x, y;
- int R = 0;
-
- VP8IteratorNzToBytes(it); // re-import the non-zero context
-
- // DC
- InitResidual(0, 1, enc, &res);
- SetResidualCoeffs(rd->y_dc_levels, &res);
- R += GetResidualCost(it->top_nz_[8] + it->left_nz_[8], &res);
-
- // AC
- InitResidual(1, 0, enc, &res);
- for (y = 0; y < 4; ++y) {
- for (x = 0; x < 4; ++x) {
- const int ctx = it->top_nz_[x] + it->left_nz_[y];
- SetResidualCoeffs(rd->y_ac_levels[x + y * 4], &res);
- R += GetResidualCost(ctx, &res);
- it->top_nz_[x] = it->left_nz_[y] = (res.last >= 0);
- }
- }
- return R;
-}
-
-int VP8GetCostUV(VP8EncIterator* const it, const VP8ModeScore* const rd) {
- VP8Residual res;
- VP8Encoder* const enc = it->enc_;
- int ch, x, y;
- int R = 0;
-
- VP8IteratorNzToBytes(it); // re-import the non-zero context
-
- InitResidual(0, 2, enc, &res);
- for (ch = 0; ch <= 2; ch += 2) {
- for (y = 0; y < 2; ++y) {
- for (x = 0; x < 2; ++x) {
- const int ctx = it->top_nz_[4 + ch + x] + it->left_nz_[4 + ch + y];
- SetResidualCoeffs(rd->uv_levels[ch * 2 + x + y * 2], &res);
- R += GetResidualCost(ctx, &res);
- it->top_nz_[4 + ch + x] = it->left_nz_[4 + ch + y] = (res.last >= 0);
- }
- }
- }
- return R;
-}
-
-//------------------------------------------------------------------------------
-// Coefficient coding
-
-static int PutCoeffs(VP8BitWriter* const bw, int ctx, const VP8Residual* res) {
- int n = res->first;
- const uint8_t* p = res->prob[VP8EncBands[n]][ctx];
- if (!VP8PutBit(bw, res->last >= 0, p[0])) {
- return 0;
- }
-
- while (n < 16) {
- const int c = res->coeffs[n++];
- const int sign = c < 0;
- int v = sign ? -c : c;
- if (!VP8PutBit(bw, v != 0, p[1])) {
- p = res->prob[VP8EncBands[n]][0];
- continue;
- }
- if (!VP8PutBit(bw, v > 1, p[2])) {
- p = res->prob[VP8EncBands[n]][1];
- } else {
- if (!VP8PutBit(bw, v > 4, p[3])) {
- if (VP8PutBit(bw, v != 2, p[4]))
- VP8PutBit(bw, v == 4, p[5]);
- } else if (!VP8PutBit(bw, v > 10, p[6])) {
- if (!VP8PutBit(bw, v > 6, p[7])) {
- VP8PutBit(bw, v == 6, 159);
- } else {
- VP8PutBit(bw, v >= 9, 165);
- VP8PutBit(bw, !(v & 1), 145);
- }
- } else {
- int mask;
- const uint8_t* tab;
- if (v < 3 + (8 << 1)) { // kCat3 (3b)
- VP8PutBit(bw, 0, p[8]);
- VP8PutBit(bw, 0, p[9]);
- v -= 3 + (8 << 0);
- mask = 1 << 2;
- tab = kCat3;
- } else if (v < 3 + (8 << 2)) { // kCat4 (4b)
- VP8PutBit(bw, 0, p[8]);
- VP8PutBit(bw, 1, p[9]);
- v -= 3 + (8 << 1);
- mask = 1 << 3;
- tab = kCat4;
- } else if (v < 3 + (8 << 3)) { // kCat5 (5b)
- VP8PutBit(bw, 1, p[8]);
- VP8PutBit(bw, 0, p[10]);
- v -= 3 + (8 << 2);
- mask = 1 << 4;
- tab = kCat5;
- } else { // kCat6 (11b)
- VP8PutBit(bw, 1, p[8]);
- VP8PutBit(bw, 1, p[10]);
- v -= 3 + (8 << 3);
- mask = 1 << 10;
- tab = kCat6;
- }
- while (mask) {
- VP8PutBit(bw, !!(v & mask), *tab++);
- mask >>= 1;
- }
- }
- p = res->prob[VP8EncBands[n]][2];
- }
- VP8PutBitUniform(bw, sign);
- if (n == 16 || !VP8PutBit(bw, n <= res->last, p[0])) {
- return 1; // EOB
- }
- }
- return 1;
-}
-
-static void CodeResiduals(VP8BitWriter* const bw,
- VP8EncIterator* const it,
- const VP8ModeScore* const rd) {
- int x, y, ch;
- VP8Residual res;
- uint64_t pos1, pos2, pos3;
- const int i16 = (it->mb_->type_ == 1);
- const int segment = it->mb_->segment_;
- VP8Encoder* const enc = it->enc_;
-
- VP8IteratorNzToBytes(it);
-
- pos1 = VP8BitWriterPos(bw);
- if (i16) {
- InitResidual(0, 1, enc, &res);
- SetResidualCoeffs(rd->y_dc_levels, &res);
- it->top_nz_[8] = it->left_nz_[8] =
- PutCoeffs(bw, it->top_nz_[8] + it->left_nz_[8], &res);
- InitResidual(1, 0, enc, &res);
- } else {
- InitResidual(0, 3, enc, &res);
- }
-
- // luma-AC
- for (y = 0; y < 4; ++y) {
- for (x = 0; x < 4; ++x) {
- const int ctx = it->top_nz_[x] + it->left_nz_[y];
- SetResidualCoeffs(rd->y_ac_levels[x + y * 4], &res);
- it->top_nz_[x] = it->left_nz_[y] = PutCoeffs(bw, ctx, &res);
- }
- }
- pos2 = VP8BitWriterPos(bw);
-
- // U/V
- InitResidual(0, 2, enc, &res);
- for (ch = 0; ch <= 2; ch += 2) {
- for (y = 0; y < 2; ++y) {
- for (x = 0; x < 2; ++x) {
- const int ctx = it->top_nz_[4 + ch + x] + it->left_nz_[4 + ch + y];
- SetResidualCoeffs(rd->uv_levels[ch * 2 + x + y * 2], &res);
- it->top_nz_[4 + ch + x] = it->left_nz_[4 + ch + y] =
- PutCoeffs(bw, ctx, &res);
- }
- }
- }
- pos3 = VP8BitWriterPos(bw);
- it->luma_bits_ = pos2 - pos1;
- it->uv_bits_ = pos3 - pos2;
- it->bit_count_[segment][i16] += it->luma_bits_;
- it->bit_count_[segment][2] += it->uv_bits_;
- VP8IteratorBytesToNz(it);
-}
-
-// Same as CodeResiduals, but doesn't actually write anything.
-// Instead, it just records the event distribution.
-static void RecordResiduals(VP8EncIterator* const it,
- const VP8ModeScore* const rd) {
- int x, y, ch;
- VP8Residual res;
- VP8Encoder* const enc = it->enc_;
-
- VP8IteratorNzToBytes(it);
-
- if (it->mb_->type_ == 1) { // i16x16
- InitResidual(0, 1, enc, &res);
- SetResidualCoeffs(rd->y_dc_levels, &res);
- it->top_nz_[8] = it->left_nz_[8] =
- RecordCoeffs(it->top_nz_[8] + it->left_nz_[8], &res);
- InitResidual(1, 0, enc, &res);
- } else {
- InitResidual(0, 3, enc, &res);
- }
-
- // luma-AC
- for (y = 0; y < 4; ++y) {
- for (x = 0; x < 4; ++x) {
- const int ctx = it->top_nz_[x] + it->left_nz_[y];
- SetResidualCoeffs(rd->y_ac_levels[x + y * 4], &res);
- it->top_nz_[x] = it->left_nz_[y] = RecordCoeffs(ctx, &res);
- }
- }
-
- // U/V
- InitResidual(0, 2, enc, &res);
- for (ch = 0; ch <= 2; ch += 2) {
- for (y = 0; y < 2; ++y) {
- for (x = 0; x < 2; ++x) {
- const int ctx = it->top_nz_[4 + ch + x] + it->left_nz_[4 + ch + y];
- SetResidualCoeffs(rd->uv_levels[ch * 2 + x + y * 2], &res);
- it->top_nz_[4 + ch + x] = it->left_nz_[4 + ch + y] =
- RecordCoeffs(ctx, &res);
- }
- }
- }
-
- VP8IteratorBytesToNz(it);
-}
-
-//------------------------------------------------------------------------------
-// Token buffer
-
-#ifdef USE_TOKEN_BUFFER
-
-void VP8TBufferInit(VP8TBuffer* const b) {
- b->rows_ = NULL;
- b->tokens_ = NULL;
- b->last_ = &b->rows_;
- b->left_ = 0;
- b->error_ = 0;
-}
-
-int VP8TBufferNewPage(VP8TBuffer* const b) {
- VP8Tokens* const page = b->error_ ? NULL : (VP8Tokens*)malloc(sizeof(*page));
- if (page == NULL) {
- b->error_ = 1;
- return 0;
- }
- *b->last_ = page;
- b->last_ = &page->next_;
- b->left_ = MAX_NUM_TOKEN;
- b->tokens_ = page->tokens_;
- return 1;
-}
-
-void VP8TBufferClear(VP8TBuffer* const b) {
- if (b != NULL) {
- const VP8Tokens* p = b->rows_;
- while (p != NULL) {
- const VP8Tokens* const next = p->next_;
- free((void*)p);
- p = next;
- }
- VP8TBufferInit(b);
- }
-}
-
-int VP8EmitTokens(const VP8TBuffer* const b, VP8BitWriter* const bw,
- const uint8_t* const probas) {
- VP8Tokens* p = b->rows_;
- if (b->error_) return 0;
- while (p != NULL) {
- const int N = (p->next_ == NULL) ? b->left_ : 0;
- int n = MAX_NUM_TOKEN;
- while (n-- > N) {
- VP8PutBit(bw, (p->tokens_[n] >> 15) & 1, probas[p->tokens_[n] & 0x7fff]);
- }
- p = p->next_;
- }
- return 1;
-}
-
-#define TOKEN_ID(b, ctx, p) ((p) + NUM_PROBAS * ((ctx) + (b) * NUM_CTX))
-
-static int RecordCoeffTokens(int ctx, const VP8Residual* const res,
- VP8TBuffer* tokens) {
- int n = res->first;
- int b = VP8EncBands[n];
- if (!VP8AddToken(tokens, res->last >= 0, TOKEN_ID(b, ctx, 0))) {
- return 0;
- }
-
- while (n < 16) {
- const int c = res->coeffs[n++];
- const int sign = c < 0;
- int v = sign ? -c : c;
- const int base_id = TOKEN_ID(b, ctx, 0);
- if (!VP8AddToken(tokens, v != 0, base_id + 1)) {
- b = VP8EncBands[n];
- ctx = 0;
- continue;
- }
- if (!VP8AddToken(tokens, v > 1, base_id + 2)) {
- b = VP8EncBands[n];
- ctx = 1;
- } else {
- if (!VP8AddToken(tokens, v > 4, base_id + 3)) {
- if (VP8AddToken(tokens, v != 2, base_id + 4))
- VP8AddToken(tokens, v == 4, base_id + 5);
- } else if (!VP8AddToken(tokens, v > 10, base_id + 6)) {
- if (!VP8AddToken(tokens, v > 6, base_id + 7)) {
-// VP8AddToken(tokens, v == 6, 159);
- } else {
-// VP8AddToken(tokens, v >= 9, 165);
-// VP8AddToken(tokens, !(v & 1), 145);
- }
- } else {
- int mask;
- const uint8_t* tab;
- if (v < 3 + (8 << 1)) { // kCat3 (3b)
- VP8AddToken(tokens, 0, base_id + 8);
- VP8AddToken(tokens, 0, base_id + 9);
- v -= 3 + (8 << 0);
- mask = 1 << 2;
- tab = kCat3;
- } else if (v < 3 + (8 << 2)) { // kCat4 (4b)
- VP8AddToken(tokens, 0, base_id + 8);
- VP8AddToken(tokens, 1, base_id + 9);
- v -= 3 + (8 << 1);
- mask = 1 << 3;
- tab = kCat4;
- } else if (v < 3 + (8 << 3)) { // kCat5 (5b)
- VP8AddToken(tokens, 1, base_id + 8);
- VP8AddToken(tokens, 0, base_id + 10);
- v -= 3 + (8 << 2);
- mask = 1 << 4;
- tab = kCat5;
- } else { // kCat6 (11b)
- VP8AddToken(tokens, 1, base_id + 8);
- VP8AddToken(tokens, 1, base_id + 10);
- v -= 3 + (8 << 3);
- mask = 1 << 10;
- tab = kCat6;
- }
- while (mask) {
- // VP8AddToken(tokens, !!(v & mask), *tab++);
- mask >>= 1;
- }
- }
- ctx = 2;
- }
- b = VP8EncBands[n];
- // VP8PutBitUniform(bw, sign);
- if (n == 16 || !VP8AddToken(tokens, n <= res->last, TOKEN_ID(b, ctx, 0))) {
- return 1; // EOB
- }
- }
- return 1;
-}
-
-static void RecordTokens(VP8EncIterator* const it,
- const VP8ModeScore* const rd, VP8TBuffer tokens[2]) {
- int x, y, ch;
- VP8Residual res;
- VP8Encoder* const enc = it->enc_;
-
- VP8IteratorNzToBytes(it);
- if (it->mb_->type_ == 1) { // i16x16
- InitResidual(0, 1, enc, &res);
- SetResidualCoeffs(rd->y_dc_levels, &res);
-// TODO(skal): FIX -> it->top_nz_[8] = it->left_nz_[8] =
- RecordCoeffTokens(it->top_nz_[8] + it->left_nz_[8], &res, &tokens[0]);
- InitResidual(1, 0, enc, &res);
- } else {
- InitResidual(0, 3, enc, &res);
- }
-
- // luma-AC
- for (y = 0; y < 4; ++y) {
- for (x = 0; x < 4; ++x) {
- const int ctx = it->top_nz_[x] + it->left_nz_[y];
- SetResidualCoeffs(rd->y_ac_levels[x + y * 4], &res);
- it->top_nz_[x] = it->left_nz_[y] =
- RecordCoeffTokens(ctx, &res, &tokens[0]);
- }
- }
-
- // U/V
- InitResidual(0, 2, enc, &res);
- for (ch = 0; ch <= 2; ch += 2) {
- for (y = 0; y < 2; ++y) {
- for (x = 0; x < 2; ++x) {
- const int ctx = it->top_nz_[4 + ch + x] + it->left_nz_[4 + ch + y];
- SetResidualCoeffs(rd->uv_levels[ch * 2 + x + y * 2], &res);
- it->top_nz_[4 + ch + x] = it->left_nz_[4 + ch + y] =
- RecordCoeffTokens(ctx, &res, &tokens[1]);
- }
- }
- }
-}
-
-#endif // USE_TOKEN_BUFFER
-
-//------------------------------------------------------------------------------
-// ExtraInfo map / Debug function
-
-#if SEGMENT_VISU
-static void SetBlock(uint8_t* p, int value, int size) {
- int y;
- for (y = 0; y < size; ++y) {
- memset(p, value, size);
- p += BPS;
- }
-}
-#endif
-
-static void ResetSSE(VP8Encoder* const enc) {
- memset(enc->sse_, 0, sizeof(enc->sse_));
- enc->sse_count_ = 0;
-}
-
-static void StoreSSE(const VP8EncIterator* const it) {
- VP8Encoder* const enc = it->enc_;
- const uint8_t* const in = it->yuv_in_;
- const uint8_t* const out = it->yuv_out_;
- // Note: not totally accurate at boundary. And doesn't include in-loop filter.
- enc->sse_[0] += VP8SSE16x16(in + Y_OFF, out + Y_OFF);
- enc->sse_[1] += VP8SSE8x8(in + U_OFF, out + U_OFF);
- enc->sse_[2] += VP8SSE8x8(in + V_OFF, out + V_OFF);
- enc->sse_count_ += 16 * 16;
-}
-
-static void StoreSideInfo(const VP8EncIterator* const it) {
- VP8Encoder* const enc = it->enc_;
- const VP8MBInfo* const mb = it->mb_;
- WebPPicture* const pic = enc->pic_;
-
- if (pic->stats != NULL) {
- StoreSSE(it);
- enc->block_count_[0] += (mb->type_ == 0);
- enc->block_count_[1] += (mb->type_ == 1);
- enc->block_count_[2] += (mb->skip_ != 0);
- }
-
- if (pic->extra_info != NULL) {
- uint8_t* const info = &pic->extra_info[it->x_ + it->y_ * enc->mb_w_];
- switch (pic->extra_info_type) {
- case 1: *info = mb->type_; break;
- case 2: *info = mb->segment_; break;
- case 3: *info = enc->dqm_[mb->segment_].quant_; break;
- case 4: *info = (mb->type_ == 1) ? it->preds_[0] : 0xff; break;
- case 5: *info = mb->uv_mode_; break;
- case 6: {
- const int b = (int)((it->luma_bits_ + it->uv_bits_ + 7) >> 3);
- *info = (b > 255) ? 255 : b; break;
- }
- default: *info = 0; break;
- };
- }
-#if SEGMENT_VISU // visualize segments and prediction modes
- SetBlock(it->yuv_out_ + Y_OFF, mb->segment_ * 64, 16);
- SetBlock(it->yuv_out_ + U_OFF, it->preds_[0] * 64, 8);
- SetBlock(it->yuv_out_ + V_OFF, mb->uv_mode_ * 64, 8);
-#endif
-}
-
-//------------------------------------------------------------------------------
-// Main loops
-//
-// VP8EncLoop(): does the final bitstream coding.
-
-static void ResetAfterSkip(VP8EncIterator* const it) {
- if (it->mb_->type_ == 1) {
- *it->nz_ = 0; // reset all predictors
- it->left_nz_[8] = 0;
- } else {
- *it->nz_ &= (1 << 24); // preserve the dc_nz bit
- }
-}
-
-int VP8EncLoop(VP8Encoder* const enc) {
- int i, s, p;
- int ok = 1;
- VP8EncIterator it;
- VP8ModeScore info;
- const int dont_use_skip = !enc->proba_.use_skip_proba_;
- const int rd_opt = enc->rd_opt_level_;
- const int kAverageBytesPerMB = 5; // TODO: have a kTable[quality/10]
- const int bytes_per_parts =
- enc->mb_w_ * enc->mb_h_ * kAverageBytesPerMB / enc->num_parts_;
-
- // Initialize the bit-writers
- for (p = 0; p < enc->num_parts_; ++p) {
- VP8BitWriterInit(enc->parts_ + p, bytes_per_parts);
- }
-
- ResetStats(enc);
- ResetSSE(enc);
-
- VP8IteratorInit(enc, &it);
- VP8InitFilter(&it);
- do {
- VP8IteratorImport(&it);
- // Warning! order is important: first call VP8Decimate() and
- // *then* decide how to code the skip decision if there's one.
- if (!VP8Decimate(&it, &info, rd_opt) || dont_use_skip) {
- CodeResiduals(it.bw_, &it, &info);
- } else { // reset predictors after a skip
- ResetAfterSkip(&it);
- }
-#ifdef WEBP_EXPERIMENTAL_FEATURES
- if (enc->use_layer_) {
- VP8EncCodeLayerBlock(&it);
- }
-#endif
- StoreSideInfo(&it);
- VP8StoreFilterStats(&it);
- VP8IteratorExport(&it);
- ok = VP8IteratorProgress(&it, 20);
- } while (ok && VP8IteratorNext(&it, it.yuv_out_));
-
- if (ok) { // Finalize the partitions, check for extra errors.
- for (p = 0; p < enc->num_parts_; ++p) {
- VP8BitWriterFinish(enc->parts_ + p);
- ok &= !enc->parts_[p].error_;
- }
- }
-
- if (ok) { // All good. Finish up.
- if (enc->pic_->stats) { // finalize byte counters...
- for (i = 0; i <= 2; ++i) {
- for (s = 0; s < NUM_MB_SEGMENTS; ++s) {
- enc->residual_bytes_[i][s] = (int)((it.bit_count_[s][i] + 7) >> 3);
- }
- }
- }
- VP8AdjustFilterStrength(&it); // ...and store filter stats.
- } else {
- // Something bad happened -> need to do some memory cleanup.
- VP8EncFreeBitWriters(enc);
- }
-
- return ok;
-}
-
-//------------------------------------------------------------------------------
-// VP8StatLoop(): only collect statistics (number of skips, token usage, ...)
-// This is used for deciding optimal probabilities. It also
-// modifies the quantizer value if some target (size, PNSR)
-// was specified.
-
-#define kHeaderSizeEstimate (15 + 20 + 10) // TODO: fix better
-
-static int OneStatPass(VP8Encoder* const enc, float q, int rd_opt, int nb_mbs,
- float* const PSNR, int percent_delta) {
- VP8EncIterator it;
- uint64_t size = 0;
- uint64_t distortion = 0;
- const uint64_t pixel_count = nb_mbs * 384;
-
- // Make sure the quality parameter is inside valid bounds
- if (q < 0.) {
- q = 0;
- } else if (q > 100.) {
- q = 100;
- }
-
- VP8SetSegmentParams(enc, q); // setup segment quantizations and filters
-
- ResetStats(enc);
- ResetTokenStats(enc);
-
- VP8IteratorInit(enc, &it);
- do {
- VP8ModeScore info;
- VP8IteratorImport(&it);
- if (VP8Decimate(&it, &info, rd_opt)) {
- // Just record the number of skips and act like skip_proba is not used.
- enc->proba_.nb_skip_++;
- }
- RecordResiduals(&it, &info);
- size += info.R;
- distortion += info.D;
- if (percent_delta && !VP8IteratorProgress(&it, percent_delta))
- return 0;
- } while (VP8IteratorNext(&it, it.yuv_out_) && --nb_mbs > 0);
- size += FinalizeSkipProba(enc);
- size += FinalizeTokenProbas(enc);
- size += enc->segment_hdr_.size_;
- size = ((size + 1024) >> 11) + kHeaderSizeEstimate;
-
- if (PSNR) {
- *PSNR = (float)(10.* log10(255. * 255. * pixel_count / distortion));
- }
- return (int)size;
-}
-
-// successive refinement increments.
-static const int dqs[] = { 20, 15, 10, 8, 6, 4, 2, 1, 0 };
-
-int VP8StatLoop(VP8Encoder* const enc) {
- const int do_search =
- (enc->config_->target_size > 0 || enc->config_->target_PSNR > 0);
- const int fast_probe = (enc->method_ < 2 && !do_search);
- float q = enc->config_->quality;
- const int max_passes = enc->config_->pass;
- const int task_percent = 20;
- const int percent_per_pass = (task_percent + max_passes / 2) / max_passes;
- const int final_percent = enc->percent_ + task_percent;
- int pass;
- int nb_mbs;
-
- // Fast mode: quick analysis pass over few mbs. Better than nothing.
- nb_mbs = enc->mb_w_ * enc->mb_h_;
- if (fast_probe && nb_mbs > 100) nb_mbs = 100;
-
- // No target size: just do several pass without changing 'q'
- if (!do_search) {
- for (pass = 0; pass < max_passes; ++pass) {
- const int rd_opt = (enc->method_ > 2);
- if (!OneStatPass(enc, q, rd_opt, nb_mbs, NULL, percent_per_pass)) {
- return 0;
- }
- }
- } else {
- // binary search for a size close to target
- for (pass = 0; pass < max_passes && (dqs[pass] > 0); ++pass) {
- const int rd_opt = 1;
- float PSNR;
- int criterion;
- const int size = OneStatPass(enc, q, rd_opt, nb_mbs, &PSNR,
- percent_per_pass);
-#if DEBUG_SEARCH
- printf("#%d size=%d PSNR=%.2f q=%.2f\n", pass, size, PSNR, q);
-#endif
- if (!size) return 0;
- if (enc->config_->target_PSNR > 0) {
- criterion = (PSNR < enc->config_->target_PSNR);
- } else {
- criterion = (size < enc->config_->target_size);
- }
- // dichotomize
- if (criterion) {
- q += dqs[pass];
- } else {
- q -= dqs[pass];
- }
- }
- }
- return WebPReportProgress(enc->pic_, final_percent, &enc->percent_);
-}
-
-//------------------------------------------------------------------------------
-
-#if defined(__cplusplus) || defined(c_plusplus)
-} // extern "C"
-#endif
diff --git a/drivers/webpold/enc/histogram.c b/drivers/webpold/enc/histogram.c
deleted file mode 100644
index ca838e064d..0000000000
--- a/drivers/webpold/enc/histogram.c
+++ /dev/null
@@ -1,406 +0,0 @@
-// Copyright 2012 Google Inc. All Rights Reserved.
-//
-// This code is licensed under the same terms as WebM:
-// Software License Agreement: http://www.webmproject.org/license/software/
-// Additional IP Rights Grant: http://www.webmproject.org/license/additional/
-// -----------------------------------------------------------------------------
-//
-// Author: Jyrki Alakuijala (jyrki@google.com)
-//
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <math.h>
-#include <stdio.h>
-
-#include "./backward_references.h"
-#include "./histogram.h"
-#include "../dsp/lossless.h"
-#include "../utils/utils.h"
-
-static void HistogramClear(VP8LHistogram* const p) {
- memset(p->literal_, 0, sizeof(p->literal_));
- memset(p->red_, 0, sizeof(p->red_));
- memset(p->blue_, 0, sizeof(p->blue_));
- memset(p->alpha_, 0, sizeof(p->alpha_));
- memset(p->distance_, 0, sizeof(p->distance_));
- p->bit_cost_ = 0;
-}
-
-void VP8LHistogramStoreRefs(const VP8LBackwardRefs* const refs,
- VP8LHistogram* const histo) {
- int i;
- for (i = 0; i < refs->size; ++i) {
- VP8LHistogramAddSinglePixOrCopy(histo, &refs->refs[i]);
- }
-}
-
-void VP8LHistogramCreate(VP8LHistogram* const p,
- const VP8LBackwardRefs* const refs,
- int palette_code_bits) {
- if (palette_code_bits >= 0) {
- p->palette_code_bits_ = palette_code_bits;
- }
- HistogramClear(p);
- VP8LHistogramStoreRefs(refs, p);
-}
-
-void VP8LHistogramInit(VP8LHistogram* const p, int palette_code_bits) {
- p->palette_code_bits_ = palette_code_bits;
- HistogramClear(p);
-}
-
-VP8LHistogramSet* VP8LAllocateHistogramSet(int size, int cache_bits) {
- int i;
- VP8LHistogramSet* set;
- VP8LHistogram* bulk;
- const uint64_t total_size = (uint64_t)sizeof(*set)
- + size * sizeof(*set->histograms)
- + size * sizeof(**set->histograms);
- uint8_t* memory = (uint8_t*)WebPSafeMalloc(total_size, sizeof(*memory));
- if (memory == NULL) return NULL;
-
- set = (VP8LHistogramSet*)memory;
- memory += sizeof(*set);
- set->histograms = (VP8LHistogram**)memory;
- memory += size * sizeof(*set->histograms);
- bulk = (VP8LHistogram*)memory;
- set->max_size = size;
- set->size = size;
- for (i = 0; i < size; ++i) {
- set->histograms[i] = bulk + i;
- VP8LHistogramInit(set->histograms[i], cache_bits);
- }
- return set;
-}
-
-// -----------------------------------------------------------------------------
-
-void VP8LHistogramAddSinglePixOrCopy(VP8LHistogram* const histo,
- const PixOrCopy* const v) {
- if (PixOrCopyIsLiteral(v)) {
- ++histo->alpha_[PixOrCopyLiteral(v, 3)];
- ++histo->red_[PixOrCopyLiteral(v, 2)];
- ++histo->literal_[PixOrCopyLiteral(v, 1)];
- ++histo->blue_[PixOrCopyLiteral(v, 0)];
- } else if (PixOrCopyIsCacheIdx(v)) {
- int literal_ix = 256 + NUM_LENGTH_CODES + PixOrCopyCacheIdx(v);
- ++histo->literal_[literal_ix];
- } else {
- int code, extra_bits_count, extra_bits_value;
- PrefixEncode(PixOrCopyLength(v),
- &code, &extra_bits_count, &extra_bits_value);
- ++histo->literal_[256 + code];
- PrefixEncode(PixOrCopyDistance(v),
- &code, &extra_bits_count, &extra_bits_value);
- ++histo->distance_[code];
- }
-}
-
-
-
-static double BitsEntropy(const int* const array, int n) {
- double retval = 0.;
- int sum = 0;
- int nonzeros = 0;
- int max_val = 0;
- int i;
- double mix;
- for (i = 0; i < n; ++i) {
- if (array[i] != 0) {
- sum += array[i];
- ++nonzeros;
- retval -= VP8LFastSLog2(array[i]);
- if (max_val < array[i]) {
- max_val = array[i];
- }
- }
- }
- retval += VP8LFastSLog2(sum);
-
- if (nonzeros < 5) {
- if (nonzeros <= 1) {
- return 0;
- }
- // Two symbols, they will be 0 and 1 in a Huffman code.
- // Let's mix in a bit of entropy to favor good clustering when
- // distributions of these are combined.
- if (nonzeros == 2) {
- return 0.99 * sum + 0.01 * retval;
- }
- // No matter what the entropy says, we cannot be better than min_limit
- // with Huffman coding. I am mixing a bit of entropy into the
- // min_limit since it produces much better (~0.5 %) compression results
- // perhaps because of better entropy clustering.
- if (nonzeros == 3) {
- mix = 0.95;
- } else {
- mix = 0.7; // nonzeros == 4.
- }
- } else {
- mix = 0.627;
- }
-
- {
- double min_limit = 2 * sum - max_val;
- min_limit = mix * min_limit + (1.0 - mix) * retval;
- return (retval < min_limit) ? min_limit : retval;
- }
-}
-
-double VP8LHistogramEstimateBitsBulk(const VP8LHistogram* const p) {
- double retval = BitsEntropy(&p->literal_[0], VP8LHistogramNumCodes(p))
- + BitsEntropy(&p->red_[0], 256)
- + BitsEntropy(&p->blue_[0], 256)
- + BitsEntropy(&p->alpha_[0], 256)
- + BitsEntropy(&p->distance_[0], NUM_DISTANCE_CODES);
- // Compute the extra bits cost.
- int i;
- for (i = 2; i < NUM_LENGTH_CODES - 2; ++i) {
- retval +=
- (i >> 1) * p->literal_[256 + i + 2];
- }
- for (i = 2; i < NUM_DISTANCE_CODES - 2; ++i) {
- retval += (i >> 1) * p->distance_[i + 2];
- }
- return retval;
-}
-
-
-// Returns the cost encode the rle-encoded entropy code.
-// The constants in this function are experimental.
-static double HuffmanCost(const int* const population, int length) {
- // Small bias because Huffman code length is typically not stored in
- // full length.
- static const int kHuffmanCodeOfHuffmanCodeSize = CODE_LENGTH_CODES * 3;
- static const double kSmallBias = 9.1;
- double retval = kHuffmanCodeOfHuffmanCodeSize - kSmallBias;
- int streak = 0;
- int i = 0;
- for (; i < length - 1; ++i) {
- ++streak;
- if (population[i] == population[i + 1]) {
- continue;
- }
- last_streak_hack:
- // population[i] points now to the symbol in the streak of same values.
- if (streak > 3) {
- if (population[i] == 0) {
- retval += 1.5625 + 0.234375 * streak;
- } else {
- retval += 2.578125 + 0.703125 * streak;
- }
- } else {
- if (population[i] == 0) {
- retval += 1.796875 * streak;
- } else {
- retval += 3.28125 * streak;
- }
- }
- streak = 0;
- }
- if (i == length - 1) {
- ++streak;
- goto last_streak_hack;
- }
- return retval;
-}
-
-// Estimates the Huffman dictionary + other block overhead size.
-static double HistogramEstimateBitsHeader(const VP8LHistogram* const p) {
- return HuffmanCost(&p->alpha_[0], 256) +
- HuffmanCost(&p->red_[0], 256) +
- HuffmanCost(&p->literal_[0], VP8LHistogramNumCodes(p)) +
- HuffmanCost(&p->blue_[0], 256) +
- HuffmanCost(&p->distance_[0], NUM_DISTANCE_CODES);
-}
-
-double VP8LHistogramEstimateBits(const VP8LHistogram* const p) {
- return HistogramEstimateBitsHeader(p) + VP8LHistogramEstimateBitsBulk(p);
-}
-
-static void HistogramBuildImage(int xsize, int histo_bits,
- const VP8LBackwardRefs* const backward_refs,
- VP8LHistogramSet* const image) {
- int i;
- int x = 0, y = 0;
- const int histo_xsize = VP8LSubSampleSize(xsize, histo_bits);
- VP8LHistogram** const histograms = image->histograms;
- assert(histo_bits > 0);
- for (i = 0; i < backward_refs->size; ++i) {
- const PixOrCopy* const v = &backward_refs->refs[i];
- const int ix = (y >> histo_bits) * histo_xsize + (x >> histo_bits);
- VP8LHistogramAddSinglePixOrCopy(histograms[ix], v);
- x += PixOrCopyLength(v);
- while (x >= xsize) {
- x -= xsize;
- ++y;
- }
- }
-}
-
-static uint32_t MyRand(uint32_t *seed) {
- *seed *= 16807U;
- if (*seed == 0) {
- *seed = 1;
- }
- return *seed;
-}
-
-static int HistogramCombine(const VP8LHistogramSet* const in,
- VP8LHistogramSet* const out, int num_pairs) {
- int ok = 0;
- int i, iter;
- uint32_t seed = 0;
- int tries_with_no_success = 0;
- const int min_cluster_size = 2;
- int out_size = in->size;
- const int outer_iters = in->size * 3;
- VP8LHistogram* const histos = (VP8LHistogram*)malloc(2 * sizeof(*histos));
- VP8LHistogram* cur_combo = histos + 0; // trial merged histogram
- VP8LHistogram* best_combo = histos + 1; // best merged histogram so far
- if (histos == NULL) goto End;
-
- // Copy histograms from in[] to out[].
- assert(in->size <= out->size);
- for (i = 0; i < in->size; ++i) {
- in->histograms[i]->bit_cost_ = VP8LHistogramEstimateBits(in->histograms[i]);
- *out->histograms[i] = *in->histograms[i];
- }
-
- // Collapse similar histograms in 'out'.
- for (iter = 0; iter < outer_iters && out_size >= min_cluster_size; ++iter) {
- // We pick the best pair to be combined out of 'inner_iters' pairs.
- double best_cost_diff = 0.;
- int best_idx1 = 0, best_idx2 = 1;
- int j;
- seed += iter;
- for (j = 0; j < num_pairs; ++j) {
- double curr_cost_diff;
- // Choose two histograms at random and try to combine them.
- const uint32_t idx1 = MyRand(&seed) % out_size;
- const uint32_t tmp = ((j & 7) + 1) % (out_size - 1);
- const uint32_t diff = (tmp < 3) ? tmp : MyRand(&seed) % (out_size - 1);
- const uint32_t idx2 = (idx1 + diff + 1) % out_size;
- if (idx1 == idx2) {
- continue;
- }
- *cur_combo = *out->histograms[idx1];
- VP8LHistogramAdd(cur_combo, out->histograms[idx2]);
- cur_combo->bit_cost_ = VP8LHistogramEstimateBits(cur_combo);
- // Calculate cost reduction on combining.
- curr_cost_diff = cur_combo->bit_cost_
- - out->histograms[idx1]->bit_cost_
- - out->histograms[idx2]->bit_cost_;
- if (best_cost_diff > curr_cost_diff) { // found a better pair?
- { // swap cur/best combo histograms
- VP8LHistogram* const tmp_histo = cur_combo;
- cur_combo = best_combo;
- best_combo = tmp_histo;
- }
- best_cost_diff = curr_cost_diff;
- best_idx1 = idx1;
- best_idx2 = idx2;
- }
- }
-
- if (best_cost_diff < 0.0) {
- *out->histograms[best_idx1] = *best_combo;
- // swap best_idx2 slot with last one (which is now unused)
- --out_size;
- if (best_idx2 != out_size) {
- out->histograms[best_idx2] = out->histograms[out_size];
- out->histograms[out_size] = NULL; // just for sanity check.
- }
- tries_with_no_success = 0;
- }
- if (++tries_with_no_success >= 50) {
- break;
- }
- }
- out->size = out_size;
- ok = 1;
-
- End:
- free(histos);
- return ok;
-}
-
-// -----------------------------------------------------------------------------
-// Histogram refinement
-
-// What is the bit cost of moving square_histogram from
-// cur_symbol to candidate_symbol.
-// TODO(skal): we don't really need to copy the histogram and Add(). Instead
-// we just need VP8LDualHistogramEstimateBits(A, B) estimation function.
-static double HistogramDistance(const VP8LHistogram* const square_histogram,
- const VP8LHistogram* const candidate) {
- const double previous_bit_cost = candidate->bit_cost_;
- double new_bit_cost;
- VP8LHistogram modified_histo;
- modified_histo = *candidate;
- VP8LHistogramAdd(&modified_histo, square_histogram);
- new_bit_cost = VP8LHistogramEstimateBits(&modified_histo);
-
- return new_bit_cost - previous_bit_cost;
-}
-
-// Find the best 'out' histogram for each of the 'in' histograms.
-// Note: we assume that out[]->bit_cost_ is already up-to-date.
-static void HistogramRemap(const VP8LHistogramSet* const in,
- const VP8LHistogramSet* const out,
- uint16_t* const symbols) {
- int i;
- for (i = 0; i < in->size; ++i) {
- int best_out = 0;
- double best_bits = HistogramDistance(in->histograms[i], out->histograms[0]);
- int k;
- for (k = 1; k < out->size; ++k) {
- const double cur_bits =
- HistogramDistance(in->histograms[i], out->histograms[k]);
- if (cur_bits < best_bits) {
- best_bits = cur_bits;
- best_out = k;
- }
- }
- symbols[i] = best_out;
- }
-
- // Recompute each out based on raw and symbols.
- for (i = 0; i < out->size; ++i) {
- HistogramClear(out->histograms[i]);
- }
- for (i = 0; i < in->size; ++i) {
- VP8LHistogramAdd(out->histograms[symbols[i]], in->histograms[i]);
- }
-}
-
-int VP8LGetHistoImageSymbols(int xsize, int ysize,
- const VP8LBackwardRefs* const refs,
- int quality, int histo_bits, int cache_bits,
- VP8LHistogramSet* const image_in,
- uint16_t* const histogram_symbols) {
- int ok = 0;
- const int histo_xsize = histo_bits ? VP8LSubSampleSize(xsize, histo_bits) : 1;
- const int histo_ysize = histo_bits ? VP8LSubSampleSize(ysize, histo_bits) : 1;
- const int num_histo_pairs = 10 + quality / 2; // For HistogramCombine().
- const int histo_image_raw_size = histo_xsize * histo_ysize;
- VP8LHistogramSet* const image_out =
- VP8LAllocateHistogramSet(histo_image_raw_size, cache_bits);
- if (image_out == NULL) return 0;
-
- // Build histogram image.
- HistogramBuildImage(xsize, histo_bits, refs, image_out);
- // Collapse similar histograms.
- if (!HistogramCombine(image_out, image_in, num_histo_pairs)) {
- goto Error;
- }
- // Find the optimal map from original histograms to the final ones.
- HistogramRemap(image_out, image_in, histogram_symbols);
- ok = 1;
-
-Error:
- free(image_out);
- return ok;
-}
diff --git a/drivers/webpold/enc/histogram.h b/drivers/webpold/enc/histogram.h
deleted file mode 100644
index 5b5de25539..0000000000
--- a/drivers/webpold/enc/histogram.h
+++ /dev/null
@@ -1,115 +0,0 @@
-// Copyright 2012 Google Inc. All Rights Reserved.
-//
-// This code is licensed under the same terms as WebM:
-// Software License Agreement: http://www.webmproject.org/license/software/
-// Additional IP Rights Grant: http://www.webmproject.org/license/additional/
-// -----------------------------------------------------------------------------
-//
-// Author: Jyrki Alakuijala (jyrki@google.com)
-//
-// Models the histograms of literal and distance codes.
-
-#ifndef WEBP_ENC_HISTOGRAM_H_
-#define WEBP_ENC_HISTOGRAM_H_
-
-#include <assert.h>
-#include <stddef.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-
-#include "./backward_references.h"
-#include "../format_constants.h"
-#include "../types.h"
-
-#if defined(__cplusplus) || defined(c_plusplus)
-extern "C" {
-#endif
-
-// A simple container for histograms of data.
-typedef struct {
- // literal_ contains green literal, palette-code and
- // copy-length-prefix histogram
- int literal_[PIX_OR_COPY_CODES_MAX];
- int red_[256];
- int blue_[256];
- int alpha_[256];
- // Backward reference prefix-code histogram.
- int distance_[NUM_DISTANCE_CODES];
- int palette_code_bits_;
- double bit_cost_; // cached value of VP8LHistogramEstimateBits(this)
-} VP8LHistogram;
-
-// Collection of histograms with fixed capacity, allocated as one
-// big memory chunk. Can be destroyed by simply calling 'free()'.
-typedef struct {
- int size; // number of slots currently in use
- int max_size; // maximum capacity
- VP8LHistogram** histograms;
-} VP8LHistogramSet;
-
-// Create the histogram.
-//
-// The input data is the PixOrCopy data, which models the literals, stop
-// codes and backward references (both distances and lengths). Also: if
-// palette_code_bits is >= 0, initialize the histogram with this value.
-void VP8LHistogramCreate(VP8LHistogram* const p,
- const VP8LBackwardRefs* const refs,
- int palette_code_bits);
-
-// Set the palette_code_bits and reset the stats.
-void VP8LHistogramInit(VP8LHistogram* const p, int palette_code_bits);
-
-// Collect all the references into a histogram (without reset)
-void VP8LHistogramStoreRefs(const VP8LBackwardRefs* const refs,
- VP8LHistogram* const histo);
-
-// Allocate an array of pointer to histograms, allocated and initialized
-// using 'cache_bits'. Return NULL in case of memory error.
-VP8LHistogramSet* VP8LAllocateHistogramSet(int size, int cache_bits);
-
-// Accumulate a token 'v' into a histogram.
-void VP8LHistogramAddSinglePixOrCopy(VP8LHistogram* const histo,
- const PixOrCopy* const v);
-
-// Estimate how many bits the combined entropy of literals and distance
-// approximately maps to.
-double VP8LHistogramEstimateBits(const VP8LHistogram* const p);
-
-// This function estimates the cost in bits excluding the bits needed to
-// represent the entropy code itself.
-double VP8LHistogramEstimateBitsBulk(const VP8LHistogram* const p);
-
-static WEBP_INLINE void VP8LHistogramAdd(VP8LHistogram* const p,
- const VP8LHistogram* const a) {
- int i;
- for (i = 0; i < PIX_OR_COPY_CODES_MAX; ++i) {
- p->literal_[i] += a->literal_[i];
- }
- for (i = 0; i < NUM_DISTANCE_CODES; ++i) {
- p->distance_[i] += a->distance_[i];
- }
- for (i = 0; i < 256; ++i) {
- p->red_[i] += a->red_[i];
- p->blue_[i] += a->blue_[i];
- p->alpha_[i] += a->alpha_[i];
- }
-}
-
-static WEBP_INLINE int VP8LHistogramNumCodes(const VP8LHistogram* const p) {
- return 256 + NUM_LENGTH_CODES +
- ((p->palette_code_bits_ > 0) ? (1 << p->palette_code_bits_) : 0);
-}
-
-// Builds the histogram image.
-int VP8LGetHistoImageSymbols(int xsize, int ysize,
- const VP8LBackwardRefs* const refs,
- int quality, int histogram_bits, int cache_bits,
- VP8LHistogramSet* const image_in,
- uint16_t* const histogram_symbols);
-
-#if defined(__cplusplus) || defined(c_plusplus)
-}
-#endif
-
-#endif // WEBP_ENC_HISTOGRAM_H_
diff --git a/drivers/webpold/enc/iterator.c b/drivers/webpold/enc/iterator.c
deleted file mode 100644
index 86e473bcf0..0000000000
--- a/drivers/webpold/enc/iterator.c
+++ /dev/null
@@ -1,422 +0,0 @@
-// Copyright 2011 Google Inc. All Rights Reserved.
-//
-// This code is licensed under the same terms as WebM:
-// Software License Agreement: http://www.webmproject.org/license/software/
-// Additional IP Rights Grant: http://www.webmproject.org/license/additional/
-// -----------------------------------------------------------------------------
-//
-// VP8Iterator: block iterator
-//
-// Author: Skal (pascal.massimino@gmail.com)
-
-#include <string.h>
-
-#include "./vp8enci.h"
-
-#if defined(__cplusplus) || defined(c_plusplus)
-extern "C" {
-#endif
-
-//------------------------------------------------------------------------------
-// VP8Iterator
-//------------------------------------------------------------------------------
-
-static void InitLeft(VP8EncIterator* const it) {
- const VP8Encoder* const enc = it->enc_;
- enc->y_left_[-1] = enc->u_left_[-1] = enc->v_left_[-1] =
- (it->y_ > 0) ? 129 : 127;
- memset(enc->y_left_, 129, 16);
- memset(enc->u_left_, 129, 8);
- memset(enc->v_left_, 129, 8);
- it->left_nz_[8] = 0;
-}
-
-static void InitTop(VP8EncIterator* const it) {
- const VP8Encoder* const enc = it->enc_;
- const size_t top_size = enc->mb_w_ * 16;
- memset(enc->y_top_, 127, 2 * top_size);
- memset(enc->nz_, 0, enc->mb_w_ * sizeof(*enc->nz_));
-}
-
-void VP8IteratorReset(VP8EncIterator* const it) {
- VP8Encoder* const enc = it->enc_;
- it->x_ = 0;
- it->y_ = 0;
- it->y_offset_ = 0;
- it->uv_offset_ = 0;
- it->mb_ = enc->mb_info_;
- it->preds_ = enc->preds_;
- it->nz_ = enc->nz_;
- it->bw_ = &enc->parts_[0];
- it->done_ = enc->mb_w_* enc->mb_h_;
- InitTop(it);
- InitLeft(it);
- memset(it->bit_count_, 0, sizeof(it->bit_count_));
- it->do_trellis_ = 0;
-}
-
-void VP8IteratorInit(VP8Encoder* const enc, VP8EncIterator* const it) {
- it->enc_ = enc;
- it->y_stride_ = enc->pic_->y_stride;
- it->uv_stride_ = enc->pic_->uv_stride;
- // TODO(later): for multithreading, these should be owned by 'it'.
- it->yuv_in_ = enc->yuv_in_;
- it->yuv_out_ = enc->yuv_out_;
- it->yuv_out2_ = enc->yuv_out2_;
- it->yuv_p_ = enc->yuv_p_;
- it->lf_stats_ = enc->lf_stats_;
- it->percent0_ = enc->percent_;
- VP8IteratorReset(it);
-}
-
-int VP8IteratorProgress(const VP8EncIterator* const it, int delta) {
- VP8Encoder* const enc = it->enc_;
- if (delta && enc->pic_->progress_hook) {
- const int percent = (enc->mb_h_ <= 1)
- ? it->percent0_
- : it->percent0_ + delta * it->y_ / (enc->mb_h_ - 1);
- return WebPReportProgress(enc->pic_, percent, &enc->percent_);
- }
- return 1;
-}
-
-//------------------------------------------------------------------------------
-// Import the source samples into the cache. Takes care of replicating
-// boundary pixels if necessary.
-
-static void ImportBlock(const uint8_t* src, int src_stride,
- uint8_t* dst, int w, int h, int size) {
- int i;
- for (i = 0; i < h; ++i) {
- memcpy(dst, src, w);
- if (w < size) {
- memset(dst + w, dst[w - 1], size - w);
- }
- dst += BPS;
- src += src_stride;
- }
- for (i = h; i < size; ++i) {
- memcpy(dst, dst - BPS, size);
- dst += BPS;
- }
-}
-
-void VP8IteratorImport(const VP8EncIterator* const it) {
- const VP8Encoder* const enc = it->enc_;
- const int x = it->x_, y = it->y_;
- const WebPPicture* const pic = enc->pic_;
- const uint8_t* const ysrc = pic->y + (y * pic->y_stride + x) * 16;
- const uint8_t* const usrc = pic->u + (y * pic->uv_stride + x) * 8;
- const uint8_t* const vsrc = pic->v + (y * pic->uv_stride + x) * 8;
- uint8_t* const ydst = it->yuv_in_ + Y_OFF;
- uint8_t* const udst = it->yuv_in_ + U_OFF;
- uint8_t* const vdst = it->yuv_in_ + V_OFF;
- int w = (pic->width - x * 16);
- int h = (pic->height - y * 16);
-
- if (w > 16) w = 16;
- if (h > 16) h = 16;
-
- // Luma plane
- ImportBlock(ysrc, pic->y_stride, ydst, w, h, 16);
-
- { // U/V planes
- const int uv_w = (w + 1) >> 1;
- const int uv_h = (h + 1) >> 1;
- ImportBlock(usrc, pic->uv_stride, udst, uv_w, uv_h, 8);
- ImportBlock(vsrc, pic->uv_stride, vdst, uv_w, uv_h, 8);
- }
-}
-
-//------------------------------------------------------------------------------
-// Copy back the compressed samples into user space if requested.
-
-static void ExportBlock(const uint8_t* src, uint8_t* dst, int dst_stride,
- int w, int h) {
- while (h-- > 0) {
- memcpy(dst, src, w);
- dst += dst_stride;
- src += BPS;
- }
-}
-
-void VP8IteratorExport(const VP8EncIterator* const it) {
- const VP8Encoder* const enc = it->enc_;
- if (enc->config_->show_compressed) {
- const int x = it->x_, y = it->y_;
- const uint8_t* const ysrc = it->yuv_out_ + Y_OFF;
- const uint8_t* const usrc = it->yuv_out_ + U_OFF;
- const uint8_t* const vsrc = it->yuv_out_ + V_OFF;
- const WebPPicture* const pic = enc->pic_;
- uint8_t* const ydst = pic->y + (y * pic->y_stride + x) * 16;
- uint8_t* const udst = pic->u + (y * pic->uv_stride + x) * 8;
- uint8_t* const vdst = pic->v + (y * pic->uv_stride + x) * 8;
- int w = (pic->width - x * 16);
- int h = (pic->height - y * 16);
-
- if (w > 16) w = 16;
- if (h > 16) h = 16;
-
- // Luma plane
- ExportBlock(ysrc, ydst, pic->y_stride, w, h);
-
- { // U/V planes
- const int uv_w = (w + 1) >> 1;
- const int uv_h = (h + 1) >> 1;
- ExportBlock(usrc, udst, pic->uv_stride, uv_w, uv_h);
- ExportBlock(vsrc, vdst, pic->uv_stride, uv_w, uv_h);
- }
- }
-}
-
-//------------------------------------------------------------------------------
-// Non-zero contexts setup/teardown
-
-// Nz bits:
-// 0 1 2 3 Y
-// 4 5 6 7
-// 8 9 10 11
-// 12 13 14 15
-// 16 17 U
-// 18 19
-// 20 21 V
-// 22 23
-// 24 DC-intra16
-
-// Convert packed context to byte array
-#define BIT(nz, n) (!!((nz) & (1 << (n))))
-
-void VP8IteratorNzToBytes(VP8EncIterator* const it) {
- const int tnz = it->nz_[0], lnz = it->nz_[-1];
- int* const top_nz = it->top_nz_;
- int* const left_nz = it->left_nz_;
-
- // Top-Y
- top_nz[0] = BIT(tnz, 12);
- top_nz[1] = BIT(tnz, 13);
- top_nz[2] = BIT(tnz, 14);
- top_nz[3] = BIT(tnz, 15);
- // Top-U
- top_nz[4] = BIT(tnz, 18);
- top_nz[5] = BIT(tnz, 19);
- // Top-V
- top_nz[6] = BIT(tnz, 22);
- top_nz[7] = BIT(tnz, 23);
- // DC
- top_nz[8] = BIT(tnz, 24);
-
- // left-Y
- left_nz[0] = BIT(lnz, 3);
- left_nz[1] = BIT(lnz, 7);
- left_nz[2] = BIT(lnz, 11);
- left_nz[3] = BIT(lnz, 15);
- // left-U
- left_nz[4] = BIT(lnz, 17);
- left_nz[5] = BIT(lnz, 19);
- // left-V
- left_nz[6] = BIT(lnz, 21);
- left_nz[7] = BIT(lnz, 23);
- // left-DC is special, iterated separately
-}
-
-void VP8IteratorBytesToNz(VP8EncIterator* const it) {
- uint32_t nz = 0;
- const int* const top_nz = it->top_nz_;
- const int* const left_nz = it->left_nz_;
- // top
- nz |= (top_nz[0] << 12) | (top_nz[1] << 13);
- nz |= (top_nz[2] << 14) | (top_nz[3] << 15);
- nz |= (top_nz[4] << 18) | (top_nz[5] << 19);
- nz |= (top_nz[6] << 22) | (top_nz[7] << 23);
- nz |= (top_nz[8] << 24); // we propagate the _top_ bit, esp. for intra4
- // left
- nz |= (left_nz[0] << 3) | (left_nz[1] << 7);
- nz |= (left_nz[2] << 11);
- nz |= (left_nz[4] << 17) | (left_nz[6] << 21);
-
- *it->nz_ = nz;
-}
-
-#undef BIT
-
-//------------------------------------------------------------------------------
-// Advance to the next position, doing the bookeeping.
-
-int VP8IteratorNext(VP8EncIterator* const it,
- const uint8_t* const block_to_save) {
- VP8Encoder* const enc = it->enc_;
- if (block_to_save) {
- const int x = it->x_, y = it->y_;
- const uint8_t* const ysrc = block_to_save + Y_OFF;
- const uint8_t* const usrc = block_to_save + U_OFF;
- if (x < enc->mb_w_ - 1) { // left
- int i;
- for (i = 0; i < 16; ++i) {
- enc->y_left_[i] = ysrc[15 + i * BPS];
- }
- for (i = 0; i < 8; ++i) {
- enc->u_left_[i] = usrc[7 + i * BPS];
- enc->v_left_[i] = usrc[15 + i * BPS];
- }
- // top-left (before 'top'!)
- enc->y_left_[-1] = enc->y_top_[x * 16 + 15];
- enc->u_left_[-1] = enc->uv_top_[x * 16 + 0 + 7];
- enc->v_left_[-1] = enc->uv_top_[x * 16 + 8 + 7];
- }
- if (y < enc->mb_h_ - 1) { // top
- memcpy(enc->y_top_ + x * 16, ysrc + 15 * BPS, 16);
- memcpy(enc->uv_top_ + x * 16, usrc + 7 * BPS, 8 + 8);
- }
- }
-
- it->mb_++;
- it->preds_ += 4;
- it->nz_++;
- it->x_++;
- if (it->x_ == enc->mb_w_) {
- it->x_ = 0;
- it->y_++;
- it->bw_ = &enc->parts_[it->y_ & (enc->num_parts_ - 1)];
- it->preds_ = enc->preds_ + it->y_ * 4 * enc->preds_w_;
- it->nz_ = enc->nz_;
- InitLeft(it);
- }
- return (0 < --it->done_);
-}
-
-//------------------------------------------------------------------------------
-// Helper function to set mode properties
-
-void VP8SetIntra16Mode(const VP8EncIterator* const it, int mode) {
- uint8_t* preds = it->preds_;
- int y;
- for (y = 0; y < 4; ++y) {
- memset(preds, mode, 4);
- preds += it->enc_->preds_w_;
- }
- it->mb_->type_ = 1;
-}
-
-void VP8SetIntra4Mode(const VP8EncIterator* const it, const uint8_t* modes) {
- uint8_t* preds = it->preds_;
- int y;
- for (y = 4; y > 0; --y) {
- memcpy(preds, modes, 4 * sizeof(*modes));
- preds += it->enc_->preds_w_;
- modes += 4;
- }
- it->mb_->type_ = 0;
-}
-
-void VP8SetIntraUVMode(const VP8EncIterator* const it, int mode) {
- it->mb_->uv_mode_ = mode;
-}
-
-void VP8SetSkip(const VP8EncIterator* const it, int skip) {
- it->mb_->skip_ = skip;
-}
-
-void VP8SetSegment(const VP8EncIterator* const it, int segment) {
- it->mb_->segment_ = segment;
-}
-
-//------------------------------------------------------------------------------
-// Intra4x4 sub-blocks iteration
-//
-// We store and update the boundary samples into an array of 37 pixels. They
-// are updated as we iterate and reconstructs each intra4x4 blocks in turn.
-// The position of the samples has the following snake pattern:
-//
-// 16|17 18 19 20|21 22 23 24|25 26 27 28|29 30 31 32|33 34 35 36 <- Top-right
-// --+-----------+-----------+-----------+-----------+
-// 15| 19| 23| 27| 31|
-// 14| 18| 22| 26| 30|
-// 13| 17| 21| 25| 29|
-// 12|13 14 15 16|17 18 19 20|21 22 23 24|25 26 27 28|
-// --+-----------+-----------+-----------+-----------+
-// 11| 15| 19| 23| 27|
-// 10| 14| 18| 22| 26|
-// 9| 13| 17| 21| 25|
-// 8| 9 10 11 12|13 14 15 16|17 18 19 20|21 22 23 24|
-// --+-----------+-----------+-----------+-----------+
-// 7| 11| 15| 19| 23|
-// 6| 10| 14| 18| 22|
-// 5| 9| 13| 17| 21|
-// 4| 5 6 7 8| 9 10 11 12|13 14 15 16|17 18 19 20|
-// --+-----------+-----------+-----------+-----------+
-// 3| 7| 11| 15| 19|
-// 2| 6| 10| 14| 18|
-// 1| 5| 9| 13| 17|
-// 0| 1 2 3 4| 5 6 7 8| 9 10 11 12|13 14 15 16|
-// --+-----------+-----------+-----------+-----------+
-
-// Array to record the position of the top sample to pass to the prediction
-// functions in dsp.c.
-static const uint8_t VP8TopLeftI4[16] = {
- 17, 21, 25, 29,
- 13, 17, 21, 25,
- 9, 13, 17, 21,
- 5, 9, 13, 17
-};
-
-void VP8IteratorStartI4(VP8EncIterator* const it) {
- const VP8Encoder* const enc = it->enc_;
- int i;
-
- it->i4_ = 0; // first 4x4 sub-block
- it->i4_top_ = it->i4_boundary_ + VP8TopLeftI4[0];
-
- // Import the boundary samples
- for (i = 0; i < 17; ++i) { // left
- it->i4_boundary_[i] = enc->y_left_[15 - i];
- }
- for (i = 0; i < 16; ++i) { // top
- it->i4_boundary_[17 + i] = enc->y_top_[it->x_ * 16 + i];
- }
- // top-right samples have a special case on the far right of the picture
- if (it->x_ < enc->mb_w_ - 1) {
- for (i = 16; i < 16 + 4; ++i) {
- it->i4_boundary_[17 + i] = enc->y_top_[it->x_ * 16 + i];
- }
- } else { // else, replicate the last valid pixel four times
- for (i = 16; i < 16 + 4; ++i) {
- it->i4_boundary_[17 + i] = it->i4_boundary_[17 + 15];
- }
- }
- VP8IteratorNzToBytes(it); // import the non-zero context
-}
-
-int VP8IteratorRotateI4(VP8EncIterator* const it,
- const uint8_t* const yuv_out) {
- const uint8_t* const blk = yuv_out + VP8Scan[it->i4_];
- uint8_t* const top = it->i4_top_;
- int i;
-
- // Update the cache with 7 fresh samples
- for (i = 0; i <= 3; ++i) {
- top[-4 + i] = blk[i + 3 * BPS]; // store future top samples
- }
- if ((it->i4_ & 3) != 3) { // if not on the right sub-blocks #3, #7, #11, #15
- for (i = 0; i <= 2; ++i) { // store future left samples
- top[i] = blk[3 + (2 - i) * BPS];
- }
- } else { // else replicate top-right samples, as says the specs.
- for (i = 0; i <= 3; ++i) {
- top[i] = top[i + 4];
- }
- }
- // move pointers to next sub-block
- ++it->i4_;
- if (it->i4_ == 16) { // we're done
- return 0;
- }
-
- it->i4_top_ = it->i4_boundary_ + VP8TopLeftI4[it->i4_];
- return 1;
-}
-
-//------------------------------------------------------------------------------
-
-#if defined(__cplusplus) || defined(c_plusplus)
-} // extern "C"
-#endif
diff --git a/drivers/webpold/enc/layer.c b/drivers/webpold/enc/layer.c
deleted file mode 100644
index 423127df63..0000000000
--- a/drivers/webpold/enc/layer.c
+++ /dev/null
@@ -1,49 +0,0 @@
-// Copyright 2011 Google Inc. All Rights Reserved.
-//
-// This code is licensed under the same terms as WebM:
-// Software License Agreement: http://www.webmproject.org/license/software/
-// Additional IP Rights Grant: http://www.webmproject.org/license/additional/
-// -----------------------------------------------------------------------------
-//
-// Enhancement layer (for YUV444/422)
-//
-// Author: Skal (pascal.massimino@gmail.com)
-
-#include <stdlib.h>
-
-#include "./vp8enci.h"
-
-#if defined(__cplusplus) || defined(c_plusplus)
-extern "C" {
-#endif
-
-//------------------------------------------------------------------------------
-
-void VP8EncInitLayer(VP8Encoder* const enc) {
- enc->use_layer_ = (enc->pic_->u0 != NULL);
- enc->layer_data_size_ = 0;
- enc->layer_data_ = NULL;
- if (enc->use_layer_) {
- VP8BitWriterInit(&enc->layer_bw_, enc->mb_w_ * enc->mb_h_ * 3);
- }
-}
-
-void VP8EncCodeLayerBlock(VP8EncIterator* it) {
- (void)it; // remove a warning
-}
-
-int VP8EncFinishLayer(VP8Encoder* const enc) {
- if (enc->use_layer_) {
- enc->layer_data_ = VP8BitWriterFinish(&enc->layer_bw_);
- enc->layer_data_size_ = VP8BitWriterSize(&enc->layer_bw_);
- }
- return 1;
-}
-
-void VP8EncDeleteLayer(VP8Encoder* enc) {
- free(enc->layer_data_);
-}
-
-#if defined(__cplusplus) || defined(c_plusplus)
-} // extern "C"
-#endif
diff --git a/drivers/webpold/enc/picture.c b/drivers/webpold/enc/picture.c
deleted file mode 100644
index 44eed06083..0000000000
--- a/drivers/webpold/enc/picture.c
+++ /dev/null
@@ -1,1041 +0,0 @@
-// Copyright 2011 Google Inc. All Rights Reserved.
-//
-// This code is licensed under the same terms as WebM:
-// Software License Agreement: http://www.webmproject.org/license/software/
-// Additional IP Rights Grant: http://www.webmproject.org/license/additional/
-// -----------------------------------------------------------------------------
-//
-// WebPPicture utils: colorspace conversion, crop, ...
-//
-// Author: Skal (pascal.massimino@gmail.com)
-
-#include <assert.h>
-#include <stdlib.h>
-#include <math.h>
-
-#include "./vp8enci.h"
-#include "../utils/rescaler.h"
-#include "../utils/utils.h"
-#include "../dsp/dsp.h"
-#include "../dsp/yuv.h"
-
-#if defined(__cplusplus) || defined(c_plusplus)
-extern "C" {
-#endif
-
-#define HALVE(x) (((x) + 1) >> 1)
-#define IS_YUV_CSP(csp, YUV_CSP) (((csp) & WEBP_CSP_UV_MASK) == (YUV_CSP))
-
-static const union {
- uint32_t argb;
- uint8_t bytes[4];
-} test_endian = { 0xff000000u };
-#define ALPHA_IS_LAST (test_endian.bytes[3] == 0xff)
-
-//------------------------------------------------------------------------------
-// WebPPicture
-//------------------------------------------------------------------------------
-
-int WebPPictureAlloc(WebPPicture* picture) {
- if (picture != NULL) {
- const WebPEncCSP uv_csp = picture->colorspace & WEBP_CSP_UV_MASK;
- const int has_alpha = picture->colorspace & WEBP_CSP_ALPHA_BIT;
- const int width = picture->width;
- const int height = picture->height;
-
- if (!picture->use_argb) {
- const int y_stride = width;
- const int uv_width = HALVE(width);
- const int uv_height = HALVE(height);
- const int uv_stride = uv_width;
- int uv0_stride = 0;
- int a_width, a_stride;
- uint64_t y_size, uv_size, uv0_size, a_size, total_size;
- uint8_t* mem;
-
- // U/V
- switch (uv_csp) {
- case WEBP_YUV420:
- break;
-#ifdef WEBP_EXPERIMENTAL_FEATURES
- case WEBP_YUV400: // for now, we'll just reset the U/V samples
- break;
- case WEBP_YUV422:
- uv0_stride = uv_width;
- break;
- case WEBP_YUV444:
- uv0_stride = width;
- break;
-#endif
- default:
- return 0;
- }
- uv0_size = height * uv0_stride;
-
- // alpha
- a_width = has_alpha ? width : 0;
- a_stride = a_width;
- y_size = (uint64_t)y_stride * height;
- uv_size = (uint64_t)uv_stride * uv_height;
- a_size = (uint64_t)a_stride * height;
-
- total_size = y_size + a_size + 2 * uv_size + 2 * uv0_size;
-
- // Security and validation checks
- if (width <= 0 || height <= 0 || // luma/alpha param error
- uv_width < 0 || uv_height < 0) { // u/v param error
- return 0;
- }
- // Clear previous buffer and allocate a new one.
- WebPPictureFree(picture); // erase previous buffer
- mem = (uint8_t*)WebPSafeMalloc(total_size, sizeof(*mem));
- if (mem == NULL) return 0;
-
- // From now on, we're in the clear, we can no longer fail...
- picture->memory_ = (void*)mem;
- picture->y_stride = y_stride;
- picture->uv_stride = uv_stride;
- picture->a_stride = a_stride;
- picture->uv0_stride = uv0_stride;
- // TODO(skal): we could align the y/u/v planes and adjust stride.
- picture->y = mem;
- mem += y_size;
-
- picture->u = mem;
- mem += uv_size;
- picture->v = mem;
- mem += uv_size;
-
- if (a_size) {
- picture->a = mem;
- mem += a_size;
- }
- if (uv0_size) {
- picture->u0 = mem;
- mem += uv0_size;
- picture->v0 = mem;
- mem += uv0_size;
- }
- } else {
- void* memory;
- const uint64_t argb_size = (uint64_t)width * height;
- if (width <= 0 || height <= 0) {
- return 0;
- }
- // Clear previous buffer and allocate a new one.
- WebPPictureFree(picture); // erase previous buffer
- memory = WebPSafeMalloc(argb_size, sizeof(*picture->argb));
- if (memory == NULL) return 0;
-
- // TODO(skal): align plane to cache line?
- picture->memory_argb_ = memory;
- picture->argb = (uint32_t*)memory;
- picture->argb_stride = width;
- }
- }
- return 1;
-}
-
-// Remove reference to the ARGB buffer (doesn't free anything).
-static void PictureResetARGB(WebPPicture* const picture) {
- picture->memory_argb_ = NULL;
- picture->argb = NULL;
- picture->argb_stride = 0;
-}
-
-// Remove reference to the YUVA buffer (doesn't free anything).
-static void PictureResetYUVA(WebPPicture* const picture) {
- picture->memory_ = NULL;
- picture->y = picture->u = picture->v = picture->a = NULL;
- picture->u0 = picture->v0 = NULL;
- picture->y_stride = picture->uv_stride = 0;
- picture->a_stride = 0;
- picture->uv0_stride = 0;
-}
-
-// Grab the 'specs' (writer, *opaque, width, height...) from 'src' and copy them
-// into 'dst'. Mark 'dst' as not owning any memory.
-static void WebPPictureGrabSpecs(const WebPPicture* const src,
- WebPPicture* const dst) {
- assert(src != NULL && dst != NULL);
- *dst = *src;
- PictureResetYUVA(dst);
- PictureResetARGB(dst);
-}
-
-// Allocate a new argb buffer, discarding any existing one and preserving
-// the other YUV(A) buffer.
-static int PictureAllocARGB(WebPPicture* const picture) {
- WebPPicture tmp;
- free(picture->memory_argb_);
- PictureResetARGB(picture);
- picture->use_argb = 1;
- WebPPictureGrabSpecs(picture, &tmp);
- if (!WebPPictureAlloc(&tmp)) {
- return WebPEncodingSetError(picture, VP8_ENC_ERROR_OUT_OF_MEMORY);
- }
- picture->memory_argb_ = tmp.memory_argb_;
- picture->argb = tmp.argb;
- picture->argb_stride = tmp.argb_stride;
- return 1;
-}
-
-// Release memory owned by 'picture' (both YUV and ARGB buffers).
-void WebPPictureFree(WebPPicture* picture) {
- if (picture != NULL) {
- free(picture->memory_);
- free(picture->memory_argb_);
- PictureResetYUVA(picture);
- PictureResetARGB(picture);
- }
-}
-
-//------------------------------------------------------------------------------
-// Picture copying
-
-// Not worth moving to dsp/enc.c (only used here).
-static void CopyPlane(const uint8_t* src, int src_stride,
- uint8_t* dst, int dst_stride, int width, int height) {
- while (height-- > 0) {
- memcpy(dst, src, width);
- src += src_stride;
- dst += dst_stride;
- }
-}
-
-// Adjust top-left corner to chroma sample position.
-static void SnapTopLeftPosition(const WebPPicture* const pic,
- int* const left, int* const top) {
- if (!pic->use_argb) {
- const int is_yuv422 = IS_YUV_CSP(pic->colorspace, WEBP_YUV422);
- if (IS_YUV_CSP(pic->colorspace, WEBP_YUV420) || is_yuv422) {
- *left &= ~1;
- if (!is_yuv422) *top &= ~1;
- }
- }
-}
-
-// Adjust top-left corner and verify that the sub-rectangle is valid.
-static int AdjustAndCheckRectangle(const WebPPicture* const pic,
- int* const left, int* const top,
- int width, int height) {
- SnapTopLeftPosition(pic, left, top);
- if ((*left) < 0 || (*top) < 0) return 0;
- if (width <= 0 || height <= 0) return 0;
- if ((*left) + width > pic->width) return 0;
- if ((*top) + height > pic->height) return 0;
- return 1;
-}
-
-int WebPPictureCopy(const WebPPicture* src, WebPPicture* dst) {
- if (src == NULL || dst == NULL) return 0;
- if (src == dst) return 1;
-
- WebPPictureGrabSpecs(src, dst);
- if (!WebPPictureAlloc(dst)) return 0;
-
- if (!src->use_argb) {
- CopyPlane(src->y, src->y_stride,
- dst->y, dst->y_stride, dst->width, dst->height);
- CopyPlane(src->u, src->uv_stride,
- dst->u, dst->uv_stride, HALVE(dst->width), HALVE(dst->height));
- CopyPlane(src->v, src->uv_stride,
- dst->v, dst->uv_stride, HALVE(dst->width), HALVE(dst->height));
- if (dst->a != NULL) {
- CopyPlane(src->a, src->a_stride,
- dst->a, dst->a_stride, dst->width, dst->height);
- }
-#ifdef WEBP_EXPERIMENTAL_FEATURES
- if (dst->u0 != NULL) {
- int uv0_width = src->width;
- if (IS_YUV_CSP(dst->colorspace, WEBP_YUV422)) {
- uv0_width = HALVE(uv0_width);
- }
- CopyPlane(src->u0, src->uv0_stride,
- dst->u0, dst->uv0_stride, uv0_width, dst->height);
- CopyPlane(src->v0, src->uv0_stride,
- dst->v0, dst->uv0_stride, uv0_width, dst->height);
- }
-#endif
- } else {
- CopyPlane((const uint8_t*)src->argb, 4 * src->argb_stride,
- (uint8_t*)dst->argb, 4 * dst->argb_stride,
- 4 * dst->width, dst->height);
- }
- return 1;
-}
-
-int WebPPictureIsView(const WebPPicture* picture) {
- if (picture == NULL) return 0;
- if (picture->use_argb) {
- return (picture->memory_argb_ == NULL);
- }
- return (picture->memory_ == NULL);
-}
-
-int WebPPictureView(const WebPPicture* src,
- int left, int top, int width, int height,
- WebPPicture* dst) {
- if (src == NULL || dst == NULL) return 0;
-
- // verify rectangle position.
- if (!AdjustAndCheckRectangle(src, &left, &top, width, height)) return 0;
-
- if (src != dst) { // beware of aliasing! We don't want to leak 'memory_'.
- WebPPictureGrabSpecs(src, dst);
- }
- dst->width = width;
- dst->height = height;
- if (!src->use_argb) {
- dst->y = src->y + top * src->y_stride + left;
- dst->u = src->u + (top >> 1) * src->uv_stride + (left >> 1);
- dst->v = src->v + (top >> 1) * src->uv_stride + (left >> 1);
- if (src->a != NULL) {
- dst->a = src->a + top * src->a_stride + left;
- }
-#ifdef WEBP_EXPERIMENTAL_FEATURES
- if (src->u0 != NULL) {
- const int left_pos =
- IS_YUV_CSP(dst->colorspace, WEBP_YUV422) ? (left >> 1) : left;
- dst->u0 = src->u0 + top * src->uv0_stride + left_pos;
- dst->v0 = src->v0 + top * src->uv0_stride + left_pos;
- }
-#endif
- } else {
- dst->argb = src->argb + top * src->argb_stride + left;
- }
- return 1;
-}
-
-//------------------------------------------------------------------------------
-// Picture cropping
-
-int WebPPictureCrop(WebPPicture* pic,
- int left, int top, int width, int height) {
- WebPPicture tmp;
-
- if (pic == NULL) return 0;
- if (!AdjustAndCheckRectangle(pic, &left, &top, width, height)) return 0;
-
- WebPPictureGrabSpecs(pic, &tmp);
- tmp.width = width;
- tmp.height = height;
- if (!WebPPictureAlloc(&tmp)) return 0;
-
- if (!pic->use_argb) {
- const int y_offset = top * pic->y_stride + left;
- const int uv_offset = (top / 2) * pic->uv_stride + left / 2;
- CopyPlane(pic->y + y_offset, pic->y_stride,
- tmp.y, tmp.y_stride, width, height);
- CopyPlane(pic->u + uv_offset, pic->uv_stride,
- tmp.u, tmp.uv_stride, HALVE(width), HALVE(height));
- CopyPlane(pic->v + uv_offset, pic->uv_stride,
- tmp.v, tmp.uv_stride, HALVE(width), HALVE(height));
-
- if (tmp.a != NULL) {
- const int a_offset = top * pic->a_stride + left;
- CopyPlane(pic->a + a_offset, pic->a_stride,
- tmp.a, tmp.a_stride, width, height);
- }
-#ifdef WEBP_EXPERIMENTAL_FEATURES
- if (tmp.u0 != NULL) {
- int w = width;
- int left_pos = left;
- if (IS_YUV_CSP(tmp.colorspace, WEBP_YUV422)) {
- w = HALVE(w);
- left_pos = HALVE(left_pos);
- }
- CopyPlane(pic->u0 + top * pic->uv0_stride + left_pos, pic->uv0_stride,
- tmp.u0, tmp.uv0_stride, w, height);
- CopyPlane(pic->v0 + top * pic->uv0_stride + left_pos, pic->uv0_stride,
- tmp.v0, tmp.uv0_stride, w, height);
- }
-#endif
- } else {
- const uint8_t* const src =
- (const uint8_t*)(pic->argb + top * pic->argb_stride + left);
- CopyPlane(src, pic->argb_stride * 4,
- (uint8_t*)tmp.argb, tmp.argb_stride * 4,
- width * 4, height);
- }
- WebPPictureFree(pic);
- *pic = tmp;
- return 1;
-}
-
-//------------------------------------------------------------------------------
-// Simple picture rescaler
-
-static void RescalePlane(const uint8_t* src,
- int src_width, int src_height, int src_stride,
- uint8_t* dst,
- int dst_width, int dst_height, int dst_stride,
- int32_t* const work,
- int num_channels) {
- WebPRescaler rescaler;
- int y = 0;
- WebPRescalerInit(&rescaler, src_width, src_height,
- dst, dst_width, dst_height, dst_stride,
- num_channels,
- src_width, dst_width,
- src_height, dst_height,
- work);
- memset(work, 0, 2 * dst_width * num_channels * sizeof(*work));
- while (y < src_height) {
- y += WebPRescalerImport(&rescaler, src_height - y,
- src + y * src_stride, src_stride);
- WebPRescalerExport(&rescaler);
- }
-}
-
-int WebPPictureRescale(WebPPicture* pic, int width, int height) {
- WebPPicture tmp;
- int prev_width, prev_height;
- int32_t* work;
-
- if (pic == NULL) return 0;
- prev_width = pic->width;
- prev_height = pic->height;
- // if width is unspecified, scale original proportionally to height ratio.
- if (width == 0) {
- width = (prev_width * height + prev_height / 2) / prev_height;
- }
- // if height is unspecified, scale original proportionally to width ratio.
- if (height == 0) {
- height = (prev_height * width + prev_width / 2) / prev_width;
- }
- // Check if the overall dimensions still make sense.
- if (width <= 0 || height <= 0) return 0;
-
- WebPPictureGrabSpecs(pic, &tmp);
- tmp.width = width;
- tmp.height = height;
- if (!WebPPictureAlloc(&tmp)) return 0;
-
- if (!pic->use_argb) {
- work = (int32_t*)WebPSafeMalloc(2ULL * width, sizeof(*work));
- if (work == NULL) {
- WebPPictureFree(&tmp);
- return 0;
- }
-
- RescalePlane(pic->y, prev_width, prev_height, pic->y_stride,
- tmp.y, width, height, tmp.y_stride, work, 1);
- RescalePlane(pic->u,
- HALVE(prev_width), HALVE(prev_height), pic->uv_stride,
- tmp.u,
- HALVE(width), HALVE(height), tmp.uv_stride, work, 1);
- RescalePlane(pic->v,
- HALVE(prev_width), HALVE(prev_height), pic->uv_stride,
- tmp.v,
- HALVE(width), HALVE(height), tmp.uv_stride, work, 1);
-
- if (tmp.a != NULL) {
- RescalePlane(pic->a, prev_width, prev_height, pic->a_stride,
- tmp.a, width, height, tmp.a_stride, work, 1);
- }
-#ifdef WEBP_EXPERIMENTAL_FEATURES
- if (tmp.u0 != NULL) {
- const int s = IS_YUV_CSP(tmp.colorspace, WEBP_YUV422) ? 2 : 1;
- RescalePlane(
- pic->u0, (prev_width + s / 2) / s, prev_height, pic->uv0_stride,
- tmp.u0, (width + s / 2) / s, height, tmp.uv0_stride, work, 1);
- RescalePlane(
- pic->v0, (prev_width + s / 2) / s, prev_height, pic->uv0_stride,
- tmp.v0, (width + s / 2) / s, height, tmp.uv0_stride, work, 1);
- }
-#endif
- } else {
- work = (int32_t*)WebPSafeMalloc(2ULL * width * 4, sizeof(*work));
- if (work == NULL) {
- WebPPictureFree(&tmp);
- return 0;
- }
-
- RescalePlane((const uint8_t*)pic->argb, prev_width, prev_height,
- pic->argb_stride * 4,
- (uint8_t*)tmp.argb, width, height,
- tmp.argb_stride * 4,
- work, 4);
-
- }
- WebPPictureFree(pic);
- free(work);
- *pic = tmp;
- return 1;
-}
-
-//------------------------------------------------------------------------------
-// WebPMemoryWriter: Write-to-memory
-
-void WebPMemoryWriterInit(WebPMemoryWriter* writer) {
- writer->mem = NULL;
- writer->size = 0;
- writer->max_size = 0;
-}
-
-int WebPMemoryWrite(const uint8_t* data, size_t data_size,
- const WebPPicture* picture) {
- WebPMemoryWriter* const w = (WebPMemoryWriter*)picture->custom_ptr;
- uint64_t next_size;
- if (w == NULL) {
- return 1;
- }
- next_size = (uint64_t)w->size + data_size;
- if (next_size > w->max_size) {
- uint8_t* new_mem;
- uint64_t next_max_size = 2ULL * w->max_size;
- if (next_max_size < next_size) next_max_size = next_size;
- if (next_max_size < 8192ULL) next_max_size = 8192ULL;
- new_mem = (uint8_t*)WebPSafeMalloc(next_max_size, 1);
- if (new_mem == NULL) {
- return 0;
- }
- if (w->size > 0) {
- memcpy(new_mem, w->mem, w->size);
- }
- free(w->mem);
- w->mem = new_mem;
- // down-cast is ok, thanks to WebPSafeMalloc
- w->max_size = (size_t)next_max_size;
- }
- if (data_size > 0) {
- memcpy(w->mem + w->size, data, data_size);
- w->size += data_size;
- }
- return 1;
-}
-
-//------------------------------------------------------------------------------
-// Detection of non-trivial transparency
-
-// Returns true if alpha[] has non-0xff values.
-static int CheckNonOpaque(const uint8_t* alpha, int width, int height,
- int x_step, int y_step) {
- if (alpha == NULL) return 0;
- while (height-- > 0) {
- int x;
- for (x = 0; x < width * x_step; x += x_step) {
- if (alpha[x] != 0xff) return 1; // TODO(skal): check 4/8 bytes at a time.
- }
- alpha += y_step;
- }
- return 0;
-}
-
-// Checking for the presence of non-opaque alpha.
-int WebPPictureHasTransparency(const WebPPicture* picture) {
- if (picture == NULL) return 0;
- if (!picture->use_argb) {
- return CheckNonOpaque(picture->a, picture->width, picture->height,
- 1, picture->a_stride);
- } else {
- int x, y;
- const uint32_t* argb = picture->argb;
- if (argb == NULL) return 0;
- for (y = 0; y < picture->height; ++y) {
- for (x = 0; x < picture->width; ++x) {
- if (argb[x] < 0xff000000u) return 1; // test any alpha values != 0xff
- }
- argb += picture->argb_stride;
- }
- }
- return 0;
-}
-
-//------------------------------------------------------------------------------
-// RGB -> YUV conversion
-
-// TODO: we can do better than simply 2x2 averaging on U/V samples.
-#define SUM4(ptr) ((ptr)[0] + (ptr)[step] + \
- (ptr)[rgb_stride] + (ptr)[rgb_stride + step])
-#define SUM2H(ptr) (2 * (ptr)[0] + 2 * (ptr)[step])
-#define SUM2V(ptr) (2 * (ptr)[0] + 2 * (ptr)[rgb_stride])
-#define SUM1(ptr) (4 * (ptr)[0])
-#define RGB_TO_UV(x, y, SUM) { \
- const int src = (2 * (step * (x) + (y) * rgb_stride)); \
- const int dst = (x) + (y) * picture->uv_stride; \
- const int r = SUM(r_ptr + src); \
- const int g = SUM(g_ptr + src); \
- const int b = SUM(b_ptr + src); \
- picture->u[dst] = VP8RGBToU(r, g, b); \
- picture->v[dst] = VP8RGBToV(r, g, b); \
-}
-
-#define RGB_TO_UV0(x_in, x_out, y, SUM) { \
- const int src = (step * (x_in) + (y) * rgb_stride); \
- const int dst = (x_out) + (y) * picture->uv0_stride; \
- const int r = SUM(r_ptr + src); \
- const int g = SUM(g_ptr + src); \
- const int b = SUM(b_ptr + src); \
- picture->u0[dst] = VP8RGBToU(r, g, b); \
- picture->v0[dst] = VP8RGBToV(r, g, b); \
-}
-
-static void MakeGray(WebPPicture* const picture) {
- int y;
- const int uv_width = HALVE(picture->width);
- const int uv_height = HALVE(picture->height);
- for (y = 0; y < uv_height; ++y) {
- memset(picture->u + y * picture->uv_stride, 128, uv_width);
- memset(picture->v + y * picture->uv_stride, 128, uv_width);
- }
-}
-
-static int ImportYUVAFromRGBA(const uint8_t* const r_ptr,
- const uint8_t* const g_ptr,
- const uint8_t* const b_ptr,
- const uint8_t* const a_ptr,
- int step, // bytes per pixel
- int rgb_stride, // bytes per scanline
- WebPPicture* const picture) {
- const WebPEncCSP uv_csp = picture->colorspace & WEBP_CSP_UV_MASK;
- int x, y;
- const int width = picture->width;
- const int height = picture->height;
- const int has_alpha = CheckNonOpaque(a_ptr, width, height, step, rgb_stride);
-
- picture->colorspace = uv_csp;
- picture->use_argb = 0;
- if (has_alpha) {
- picture->colorspace |= WEBP_CSP_ALPHA_BIT;
- }
- if (!WebPPictureAlloc(picture)) return 0;
-
- // Import luma plane
- for (y = 0; y < height; ++y) {
- for (x = 0; x < width; ++x) {
- const int offset = step * x + y * rgb_stride;
- picture->y[x + y * picture->y_stride] =
- VP8RGBToY(r_ptr[offset], g_ptr[offset], b_ptr[offset]);
- }
- }
-
- // Downsample U/V plane
- if (uv_csp != WEBP_YUV400) {
- for (y = 0; y < (height >> 1); ++y) {
- for (x = 0; x < (width >> 1); ++x) {
- RGB_TO_UV(x, y, SUM4);
- }
- if (width & 1) {
- RGB_TO_UV(x, y, SUM2V);
- }
- }
- if (height & 1) {
- for (x = 0; x < (width >> 1); ++x) {
- RGB_TO_UV(x, y, SUM2H);
- }
- if (width & 1) {
- RGB_TO_UV(x, y, SUM1);
- }
- }
-
-#ifdef WEBP_EXPERIMENTAL_FEATURES
- // Store original U/V samples too
- if (uv_csp == WEBP_YUV422) {
- for (y = 0; y < height; ++y) {
- for (x = 0; x < (width >> 1); ++x) {
- RGB_TO_UV0(2 * x, x, y, SUM2H);
- }
- if (width & 1) {
- RGB_TO_UV0(2 * x, x, y, SUM1);
- }
- }
- } else if (uv_csp == WEBP_YUV444) {
- for (y = 0; y < height; ++y) {
- for (x = 0; x < width; ++x) {
- RGB_TO_UV0(x, x, y, SUM1);
- }
- }
- }
-#endif
- } else {
- MakeGray(picture);
- }
-
- if (has_alpha) {
- assert(step >= 4);
- for (y = 0; y < height; ++y) {
- for (x = 0; x < width; ++x) {
- picture->a[x + y * picture->a_stride] =
- a_ptr[step * x + y * rgb_stride];
- }
- }
- }
- return 1;
-}
-
-static int Import(WebPPicture* const picture,
- const uint8_t* const rgb, int rgb_stride,
- int step, int swap_rb, int import_alpha) {
- const uint8_t* const r_ptr = rgb + (swap_rb ? 2 : 0);
- const uint8_t* const g_ptr = rgb + 1;
- const uint8_t* const b_ptr = rgb + (swap_rb ? 0 : 2);
- const uint8_t* const a_ptr = import_alpha ? rgb + 3 : NULL;
- const int width = picture->width;
- const int height = picture->height;
-
- if (!picture->use_argb) {
- return ImportYUVAFromRGBA(r_ptr, g_ptr, b_ptr, a_ptr, step, rgb_stride,
- picture);
- }
- if (import_alpha) {
- picture->colorspace |= WEBP_CSP_ALPHA_BIT;
- } else {
- picture->colorspace &= ~WEBP_CSP_ALPHA_BIT;
- }
- if (!WebPPictureAlloc(picture)) return 0;
-
- if (!import_alpha) {
- int x, y;
- for (y = 0; y < height; ++y) {
- for (x = 0; x < width; ++x) {
- const int offset = step * x + y * rgb_stride;
- const uint32_t argb =
- 0xff000000u |
- (r_ptr[offset] << 16) |
- (g_ptr[offset] << 8) |
- (b_ptr[offset]);
- picture->argb[x + y * picture->argb_stride] = argb;
- }
- }
- } else {
- int x, y;
- assert(step >= 4);
- for (y = 0; y < height; ++y) {
- for (x = 0; x < width; ++x) {
- const int offset = step * x + y * rgb_stride;
- const uint32_t argb = (a_ptr[offset] << 24) |
- (r_ptr[offset] << 16) |
- (g_ptr[offset] << 8) |
- (b_ptr[offset]);
- picture->argb[x + y * picture->argb_stride] = argb;
- }
- }
- }
- return 1;
-}
-#undef SUM4
-#undef SUM2V
-#undef SUM2H
-#undef SUM1
-#undef RGB_TO_UV
-
-int WebPPictureImportRGB(WebPPicture* picture,
- const uint8_t* rgb, int rgb_stride) {
- return Import(picture, rgb, rgb_stride, 3, 0, 0);
-}
-
-int WebPPictureImportBGR(WebPPicture* picture,
- const uint8_t* rgb, int rgb_stride) {
- return Import(picture, rgb, rgb_stride, 3, 1, 0);
-}
-
-int WebPPictureImportRGBA(WebPPicture* picture,
- const uint8_t* rgba, int rgba_stride) {
- return Import(picture, rgba, rgba_stride, 4, 0, 1);
-}
-
-int WebPPictureImportBGRA(WebPPicture* picture,
- const uint8_t* rgba, int rgba_stride) {
- return Import(picture, rgba, rgba_stride, 4, 1, 1);
-}
-
-int WebPPictureImportRGBX(WebPPicture* picture,
- const uint8_t* rgba, int rgba_stride) {
- return Import(picture, rgba, rgba_stride, 4, 0, 0);
-}
-
-int WebPPictureImportBGRX(WebPPicture* picture,
- const uint8_t* rgba, int rgba_stride) {
- return Import(picture, rgba, rgba_stride, 4, 1, 0);
-}
-
-//------------------------------------------------------------------------------
-// Automatic YUV <-> ARGB conversions.
-
-int WebPPictureYUVAToARGB(WebPPicture* picture) {
- if (picture == NULL) return 0;
- if (picture->memory_ == NULL || picture->y == NULL ||
- picture->u == NULL || picture->v == NULL) {
- return WebPEncodingSetError(picture, VP8_ENC_ERROR_NULL_PARAMETER);
- }
- if ((picture->colorspace & WEBP_CSP_ALPHA_BIT) && picture->a == NULL) {
- return WebPEncodingSetError(picture, VP8_ENC_ERROR_NULL_PARAMETER);
- }
- if ((picture->colorspace & WEBP_CSP_UV_MASK) != WEBP_YUV420) {
- return WebPEncodingSetError(picture, VP8_ENC_ERROR_INVALID_CONFIGURATION);
- }
- // Allocate a new argb buffer (discarding the previous one).
- if (!PictureAllocARGB(picture)) return 0;
-
- // Convert
- {
- int y;
- const int width = picture->width;
- const int height = picture->height;
- const int argb_stride = 4 * picture->argb_stride;
- uint8_t* dst = (uint8_t*)picture->argb;
- const uint8_t *cur_u = picture->u, *cur_v = picture->v, *cur_y = picture->y;
- WebPUpsampleLinePairFunc upsample = WebPGetLinePairConverter(ALPHA_IS_LAST);
-
- // First row, with replicated top samples.
- upsample(NULL, cur_y, cur_u, cur_v, cur_u, cur_v, NULL, dst, width);
- cur_y += picture->y_stride;
- dst += argb_stride;
- // Center rows.
- for (y = 1; y + 1 < height; y += 2) {
- const uint8_t* const top_u = cur_u;
- const uint8_t* const top_v = cur_v;
- cur_u += picture->uv_stride;
- cur_v += picture->uv_stride;
- upsample(cur_y, cur_y + picture->y_stride, top_u, top_v, cur_u, cur_v,
- dst, dst + argb_stride, width);
- cur_y += 2 * picture->y_stride;
- dst += 2 * argb_stride;
- }
- // Last row (if needed), with replicated bottom samples.
- if (height > 1 && !(height & 1)) {
- upsample(cur_y, NULL, cur_u, cur_v, cur_u, cur_v, dst, NULL, width);
- }
- // Insert alpha values if needed, in replacement for the default 0xff ones.
- if (picture->colorspace & WEBP_CSP_ALPHA_BIT) {
- for (y = 0; y < height; ++y) {
- uint32_t* const dst = picture->argb + y * picture->argb_stride;
- const uint8_t* const src = picture->a + y * picture->a_stride;
- int x;
- for (x = 0; x < width; ++x) {
- dst[x] = (dst[x] & 0x00ffffffu) | (src[x] << 24);
- }
- }
- }
- }
- return 1;
-}
-
-int WebPPictureARGBToYUVA(WebPPicture* picture, WebPEncCSP colorspace) {
- if (picture == NULL) return 0;
- if (picture->argb == NULL) {
- return WebPEncodingSetError(picture, VP8_ENC_ERROR_NULL_PARAMETER);
- } else {
- const uint8_t* const argb = (const uint8_t*)picture->argb;
- const uint8_t* const r = ALPHA_IS_LAST ? argb + 2 : argb + 1;
- const uint8_t* const g = ALPHA_IS_LAST ? argb + 1 : argb + 2;
- const uint8_t* const b = ALPHA_IS_LAST ? argb + 0 : argb + 3;
- const uint8_t* const a = ALPHA_IS_LAST ? argb + 3 : argb + 0;
- // We work on a tmp copy of 'picture', because ImportYUVAFromRGBA()
- // would be calling WebPPictureFree(picture) otherwise.
- WebPPicture tmp = *picture;
- PictureResetARGB(&tmp); // reset ARGB buffer so that it's not free()'d.
- tmp.use_argb = 0;
- tmp.colorspace = colorspace & WEBP_CSP_UV_MASK;
- if (!ImportYUVAFromRGBA(r, g, b, a, 4, 4 * picture->argb_stride, &tmp)) {
- return WebPEncodingSetError(picture, VP8_ENC_ERROR_OUT_OF_MEMORY);
- }
- // Copy back the YUV specs into 'picture'.
- tmp.argb = picture->argb;
- tmp.argb_stride = picture->argb_stride;
- tmp.memory_argb_ = picture->memory_argb_;
- *picture = tmp;
- }
- return 1;
-}
-
-//------------------------------------------------------------------------------
-// Helper: clean up fully transparent area to help compressibility.
-
-#define SIZE 8
-#define SIZE2 (SIZE / 2)
-static int is_transparent_area(const uint8_t* ptr, int stride, int size) {
- int y, x;
- for (y = 0; y < size; ++y) {
- for (x = 0; x < size; ++x) {
- if (ptr[x]) {
- return 0;
- }
- }
- ptr += stride;
- }
- return 1;
-}
-
-static WEBP_INLINE void flatten(uint8_t* ptr, int v, int stride, int size) {
- int y;
- for (y = 0; y < size; ++y) {
- memset(ptr, v, size);
- ptr += stride;
- }
-}
-
-void WebPCleanupTransparentArea(WebPPicture* pic) {
- int x, y, w, h;
- const uint8_t* a_ptr;
- int values[3] = { 0 };
-
- if (pic == NULL) return;
-
- a_ptr = pic->a;
- if (a_ptr == NULL) return; // nothing to do
-
- w = pic->width / SIZE;
- h = pic->height / SIZE;
- for (y = 0; y < h; ++y) {
- int need_reset = 1;
- for (x = 0; x < w; ++x) {
- const int off_a = (y * pic->a_stride + x) * SIZE;
- const int off_y = (y * pic->y_stride + x) * SIZE;
- const int off_uv = (y * pic->uv_stride + x) * SIZE2;
- if (is_transparent_area(a_ptr + off_a, pic->a_stride, SIZE)) {
- if (need_reset) {
- values[0] = pic->y[off_y];
- values[1] = pic->u[off_uv];
- values[2] = pic->v[off_uv];
- need_reset = 0;
- }
- flatten(pic->y + off_y, values[0], pic->y_stride, SIZE);
- flatten(pic->u + off_uv, values[1], pic->uv_stride, SIZE2);
- flatten(pic->v + off_uv, values[2], pic->uv_stride, SIZE2);
- } else {
- need_reset = 1;
- }
- }
- // ignore the left-overs on right/bottom
- }
-}
-
-#undef SIZE
-#undef SIZE2
-
-
-//------------------------------------------------------------------------------
-// Distortion
-
-// Max value returned in case of exact similarity.
-static const double kMinDistortion_dB = 99.;
-
-int WebPPictureDistortion(const WebPPicture* pic1, const WebPPicture* pic2,
- int type, float result[5]) {
- int c;
- DistoStats stats[5];
- int has_alpha;
-
- if (pic1 == NULL || pic2 == NULL ||
- pic1->width != pic2->width || pic1->height != pic2->height ||
- pic1->y == NULL || pic2->y == NULL ||
- pic1->u == NULL || pic2->u == NULL ||
- pic1->v == NULL || pic2->v == NULL ||
- result == NULL) {
- return 0;
- }
- // TODO(skal): provide distortion for ARGB too.
- if (pic1->use_argb == 1 || pic1->use_argb != pic2->use_argb) {
- return 0;
- }
-
- has_alpha = !!(pic1->colorspace & WEBP_CSP_ALPHA_BIT);
- if (has_alpha != !!(pic2->colorspace & WEBP_CSP_ALPHA_BIT) ||
- (has_alpha && (pic1->a == NULL || pic2->a == NULL))) {
- return 0;
- }
-
- memset(stats, 0, sizeof(stats));
- VP8SSIMAccumulatePlane(pic1->y, pic1->y_stride,
- pic2->y, pic2->y_stride,
- pic1->width, pic1->height, &stats[0]);
- VP8SSIMAccumulatePlane(pic1->u, pic1->uv_stride,
- pic2->u, pic2->uv_stride,
- (pic1->width + 1) >> 1, (pic1->height + 1) >> 1,
- &stats[1]);
- VP8SSIMAccumulatePlane(pic1->v, pic1->uv_stride,
- pic2->v, pic2->uv_stride,
- (pic1->width + 1) >> 1, (pic1->height + 1) >> 1,
- &stats[2]);
- if (has_alpha) {
- VP8SSIMAccumulatePlane(pic1->a, pic1->a_stride,
- pic2->a, pic2->a_stride,
- pic1->width, pic1->height, &stats[3]);
- }
- for (c = 0; c <= 4; ++c) {
- if (type == 1) {
- const double v = VP8SSIMGet(&stats[c]);
- result[c] = (float)((v < 1.) ? -10.0 * log10(1. - v)
- : kMinDistortion_dB);
- } else {
- const double v = VP8SSIMGetSquaredError(&stats[c]);
- result[c] = (float)((v > 0.) ? -4.3429448 * log(v / (255 * 255.))
- : kMinDistortion_dB);
- }
- // Accumulate forward
- if (c < 4) VP8SSIMAddStats(&stats[c], &stats[4]);
- }
- return 1;
-}
-
-//------------------------------------------------------------------------------
-// Simplest high-level calls:
-
-typedef int (*Importer)(WebPPicture* const, const uint8_t* const, int);
-
-static size_t Encode(const uint8_t* rgba, int width, int height, int stride,
- Importer import, float quality_factor, int lossless,
- uint8_t** output) {
- WebPPicture pic;
- WebPConfig config;
- WebPMemoryWriter wrt;
- int ok;
-
- if (!WebPConfigPreset(&config, WEBP_PRESET_DEFAULT, quality_factor) ||
- !WebPPictureInit(&pic)) {
- return 0; // shouldn't happen, except if system installation is broken
- }
-
- config.lossless = !!lossless;
- pic.use_argb = !!lossless;
- pic.width = width;
- pic.height = height;
- pic.writer = WebPMemoryWrite;
- pic.custom_ptr = &wrt;
- WebPMemoryWriterInit(&wrt);
-
- ok = import(&pic, rgba, stride) && WebPEncode(&config, &pic);
- WebPPictureFree(&pic);
- if (!ok) {
- free(wrt.mem);
- *output = NULL;
- return 0;
- }
- *output = wrt.mem;
- return wrt.size;
-}
-
-#define ENCODE_FUNC(NAME, IMPORTER) \
-size_t NAME(const uint8_t* in, int w, int h, int bps, float q, \
- uint8_t** out) { \
- return Encode(in, w, h, bps, IMPORTER, q, 0, out); \
-}
-
-ENCODE_FUNC(WebPEncodeRGB, WebPPictureImportRGB);
-ENCODE_FUNC(WebPEncodeBGR, WebPPictureImportBGR);
-ENCODE_FUNC(WebPEncodeRGBA, WebPPictureImportRGBA);
-ENCODE_FUNC(WebPEncodeBGRA, WebPPictureImportBGRA);
-
-#undef ENCODE_FUNC
-
-#define LOSSLESS_DEFAULT_QUALITY 70.
-#define LOSSLESS_ENCODE_FUNC(NAME, IMPORTER) \
-size_t NAME(const uint8_t* in, int w, int h, int bps, uint8_t** out) { \
- return Encode(in, w, h, bps, IMPORTER, LOSSLESS_DEFAULT_QUALITY, 1, out); \
-}
-
-LOSSLESS_ENCODE_FUNC(WebPEncodeLosslessRGB, WebPPictureImportRGB);
-LOSSLESS_ENCODE_FUNC(WebPEncodeLosslessBGR, WebPPictureImportBGR);
-LOSSLESS_ENCODE_FUNC(WebPEncodeLosslessRGBA, WebPPictureImportRGBA);
-LOSSLESS_ENCODE_FUNC(WebPEncodeLosslessBGRA, WebPPictureImportBGRA);
-
-#undef LOSSLESS_ENCODE_FUNC
-
-//------------------------------------------------------------------------------
-
-#if defined(__cplusplus) || defined(c_plusplus)
-} // extern "C"
-#endif
diff --git a/drivers/webpold/enc/quant.c b/drivers/webpold/enc/quant.c
deleted file mode 100644
index ea153849c8..0000000000
--- a/drivers/webpold/enc/quant.c
+++ /dev/null
@@ -1,930 +0,0 @@
-// Copyright 2011 Google Inc. All Rights Reserved.
-//
-// This code is licensed under the same terms as WebM:
-// Software License Agreement: http://www.webmproject.org/license/software/
-// Additional IP Rights Grant: http://www.webmproject.org/license/additional/
-// -----------------------------------------------------------------------------
-//
-// Quantization
-//
-// Author: Skal (pascal.massimino@gmail.com)
-
-#include <assert.h>
-#include <math.h>
-
-#include "./vp8enci.h"
-#include "./cost.h"
-
-#define DO_TRELLIS_I4 1
-#define DO_TRELLIS_I16 1 // not a huge gain, but ok at low bitrate.
-#define DO_TRELLIS_UV 0 // disable trellis for UV. Risky. Not worth.
-#define USE_TDISTO 1
-
-#define MID_ALPHA 64 // neutral value for susceptibility
-#define MIN_ALPHA 30 // lowest usable value for susceptibility
-#define MAX_ALPHA 100 // higher meaninful value for susceptibility
-
-#define SNS_TO_DQ 0.9 // Scaling constant between the sns value and the QP
- // power-law modulation. Must be strictly less than 1.
-
-#define MULT_8B(a, b) (((a) * (b) + 128) >> 8)
-
-#if defined(__cplusplus) || defined(c_plusplus)
-extern "C" {
-#endif
-
-//------------------------------------------------------------------------------
-
-static WEBP_INLINE int clip(int v, int m, int M) {
- return v < m ? m : v > M ? M : v;
-}
-
-static const uint8_t kZigzag[16] = {
- 0, 1, 4, 8, 5, 2, 3, 6, 9, 12, 13, 10, 7, 11, 14, 15
-};
-
-static const uint8_t kDcTable[128] = {
- 4, 5, 6, 7, 8, 9, 10, 10,
- 11, 12, 13, 14, 15, 16, 17, 17,
- 18, 19, 20, 20, 21, 21, 22, 22,
- 23, 23, 24, 25, 25, 26, 27, 28,
- 29, 30, 31, 32, 33, 34, 35, 36,
- 37, 37, 38, 39, 40, 41, 42, 43,
- 44, 45, 46, 46, 47, 48, 49, 50,
- 51, 52, 53, 54, 55, 56, 57, 58,
- 59, 60, 61, 62, 63, 64, 65, 66,
- 67, 68, 69, 70, 71, 72, 73, 74,
- 75, 76, 76, 77, 78, 79, 80, 81,
- 82, 83, 84, 85, 86, 87, 88, 89,
- 91, 93, 95, 96, 98, 100, 101, 102,
- 104, 106, 108, 110, 112, 114, 116, 118,
- 122, 124, 126, 128, 130, 132, 134, 136,
- 138, 140, 143, 145, 148, 151, 154, 157
-};
-
-static const uint16_t kAcTable[128] = {
- 4, 5, 6, 7, 8, 9, 10, 11,
- 12, 13, 14, 15, 16, 17, 18, 19,
- 20, 21, 22, 23, 24, 25, 26, 27,
- 28, 29, 30, 31, 32, 33, 34, 35,
- 36, 37, 38, 39, 40, 41, 42, 43,
- 44, 45, 46, 47, 48, 49, 50, 51,
- 52, 53, 54, 55, 56, 57, 58, 60,
- 62, 64, 66, 68, 70, 72, 74, 76,
- 78, 80, 82, 84, 86, 88, 90, 92,
- 94, 96, 98, 100, 102, 104, 106, 108,
- 110, 112, 114, 116, 119, 122, 125, 128,
- 131, 134, 137, 140, 143, 146, 149, 152,
- 155, 158, 161, 164, 167, 170, 173, 177,
- 181, 185, 189, 193, 197, 201, 205, 209,
- 213, 217, 221, 225, 229, 234, 239, 245,
- 249, 254, 259, 264, 269, 274, 279, 284
-};
-
-static const uint16_t kAcTable2[128] = {
- 8, 8, 9, 10, 12, 13, 15, 17,
- 18, 20, 21, 23, 24, 26, 27, 29,
- 31, 32, 34, 35, 37, 38, 40, 41,
- 43, 44, 46, 48, 49, 51, 52, 54,
- 55, 57, 58, 60, 62, 63, 65, 66,
- 68, 69, 71, 72, 74, 75, 77, 79,
- 80, 82, 83, 85, 86, 88, 89, 93,
- 96, 99, 102, 105, 108, 111, 114, 117,
- 120, 124, 127, 130, 133, 136, 139, 142,
- 145, 148, 151, 155, 158, 161, 164, 167,
- 170, 173, 176, 179, 184, 189, 193, 198,
- 203, 207, 212, 217, 221, 226, 230, 235,
- 240, 244, 249, 254, 258, 263, 268, 274,
- 280, 286, 292, 299, 305, 311, 317, 323,
- 330, 336, 342, 348, 354, 362, 370, 379,
- 385, 393, 401, 409, 416, 424, 432, 440
-};
-
-static const uint16_t kCoeffThresh[16] = {
- 0, 10, 20, 30,
- 10, 20, 30, 30,
- 20, 30, 30, 30,
- 30, 30, 30, 30
-};
-
-// TODO(skal): tune more. Coeff thresholding?
-static const uint8_t kBiasMatrices[3][16] = { // [3] = [luma-ac,luma-dc,chroma]
- { 96, 96, 96, 96,
- 96, 96, 96, 96,
- 96, 96, 96, 96,
- 96, 96, 96, 96 },
- { 96, 96, 96, 96,
- 96, 96, 96, 96,
- 96, 96, 96, 96,
- 96, 96, 96, 96 },
- { 96, 96, 96, 96,
- 96, 96, 96, 96,
- 96, 96, 96, 96,
- 96, 96, 96, 96 }
-};
-
-// Sharpening by (slightly) raising the hi-frequency coeffs (only for trellis).
-// Hack-ish but helpful for mid-bitrate range. Use with care.
-static const uint8_t kFreqSharpening[16] = {
- 0, 30, 60, 90,
- 30, 60, 90, 90,
- 60, 90, 90, 90,
- 90, 90, 90, 90
-};
-
-//------------------------------------------------------------------------------
-// Initialize quantization parameters in VP8Matrix
-
-// Returns the average quantizer
-static int ExpandMatrix(VP8Matrix* const m, int type) {
- int i;
- int sum = 0;
- for (i = 2; i < 16; ++i) {
- m->q_[i] = m->q_[1];
- }
- for (i = 0; i < 16; ++i) {
- const int j = kZigzag[i];
- const int bias = kBiasMatrices[type][j];
- m->iq_[j] = (1 << QFIX) / m->q_[j];
- m->bias_[j] = BIAS(bias);
- // TODO(skal): tune kCoeffThresh[]
- m->zthresh_[j] = ((256 /*+ kCoeffThresh[j]*/ - bias) * m->q_[j] + 127) >> 8;
- m->sharpen_[j] = (kFreqSharpening[j] * m->q_[j]) >> 11;
- sum += m->q_[j];
- }
- return (sum + 8) >> 4;
-}
-
-static void SetupMatrices(VP8Encoder* enc) {
- int i;
- const int tlambda_scale =
- (enc->method_ >= 4) ? enc->config_->sns_strength
- : 0;
- const int num_segments = enc->segment_hdr_.num_segments_;
- for (i = 0; i < num_segments; ++i) {
- VP8SegmentInfo* const m = &enc->dqm_[i];
- const int q = m->quant_;
- int q4, q16, quv;
- m->y1_.q_[0] = kDcTable[clip(q + enc->dq_y1_dc_, 0, 127)];
- m->y1_.q_[1] = kAcTable[clip(q, 0, 127)];
-
- m->y2_.q_[0] = kDcTable[ clip(q + enc->dq_y2_dc_, 0, 127)] * 2;
- m->y2_.q_[1] = kAcTable2[clip(q + enc->dq_y2_ac_, 0, 127)];
-
- m->uv_.q_[0] = kDcTable[clip(q + enc->dq_uv_dc_, 0, 117)];
- m->uv_.q_[1] = kAcTable[clip(q + enc->dq_uv_ac_, 0, 127)];
-
- q4 = ExpandMatrix(&m->y1_, 0);
- q16 = ExpandMatrix(&m->y2_, 1);
- quv = ExpandMatrix(&m->uv_, 2);
-
- // TODO: Switch to kLambda*[] tables?
- {
- m->lambda_i4_ = (3 * q4 * q4) >> 7;
- m->lambda_i16_ = (3 * q16 * q16);
- m->lambda_uv_ = (3 * quv * quv) >> 6;
- m->lambda_mode_ = (1 * q4 * q4) >> 7;
- m->lambda_trellis_i4_ = (7 * q4 * q4) >> 3;
- m->lambda_trellis_i16_ = (q16 * q16) >> 2;
- m->lambda_trellis_uv_ = (quv *quv) << 1;
- m->tlambda_ = (tlambda_scale * q4) >> 5;
- }
- }
-}
-
-//------------------------------------------------------------------------------
-// Initialize filtering parameters
-
-// Very small filter-strength values have close to no visual effect. So we can
-// save a little decoding-CPU by turning filtering off for these.
-#define FSTRENGTH_CUTOFF 3
-
-static void SetupFilterStrength(VP8Encoder* const enc) {
- int i;
- const int level0 = enc->config_->filter_strength;
- for (i = 0; i < NUM_MB_SEGMENTS; ++i) {
- // Segments with lower quantizer will be less filtered. TODO: tune (wrt SNS)
- const int level = level0 * 256 * enc->dqm_[i].quant_ / 128;
- const int f = level / (256 + enc->dqm_[i].beta_);
- enc->dqm_[i].fstrength_ = (f < FSTRENGTH_CUTOFF) ? 0 : (f > 63) ? 63 : f;
- }
- // We record the initial strength (mainly for the case of 1-segment only).
- enc->filter_hdr_.level_ = enc->dqm_[0].fstrength_;
- enc->filter_hdr_.simple_ = (enc->config_->filter_type == 0);
- enc->filter_hdr_.sharpness_ = enc->config_->filter_sharpness;
-}
-
-//------------------------------------------------------------------------------
-
-// Note: if you change the values below, remember that the max range
-// allowed by the syntax for DQ_UV is [-16,16].
-#define MAX_DQ_UV (6)
-#define MIN_DQ_UV (-4)
-
-// We want to emulate jpeg-like behaviour where the expected "good" quality
-// is around q=75. Internally, our "good" middle is around c=50. So we
-// map accordingly using linear piece-wise function
-static double QualityToCompression(double q) {
- const double c = q / 100.;
- return (c < 0.75) ? c * (2. / 3.) : 2. * c - 1.;
-}
-
-void VP8SetSegmentParams(VP8Encoder* const enc, float quality) {
- int i;
- int dq_uv_ac, dq_uv_dc;
- const int num_segments = enc->config_->segments;
- const double amp = SNS_TO_DQ * enc->config_->sns_strength / 100. / 128.;
- const double c_base = QualityToCompression(quality);
- for (i = 0; i < num_segments; ++i) {
- // The file size roughly scales as pow(quantizer, 3.). Actually, the
- // exponent is somewhere between 2.8 and 3.2, but we're mostly interested
- // in the mid-quant range. So we scale the compressibility inversely to
- // this power-law: quant ~= compression ^ 1/3. This law holds well for
- // low quant. Finer modelling for high-quant would make use of kAcTable[]
- // more explicitely.
- // Additionally, we modulate the base exponent 1/3 to accommodate for the
- // quantization susceptibility and allow denser segments to be quantized
- // more.
- const double expn = (1. - amp * enc->dqm_[i].alpha_) / 3.;
- const double c = pow(c_base, expn);
- const int q = (int)(127. * (1. - c));
- assert(expn > 0.);
- enc->dqm_[i].quant_ = clip(q, 0, 127);
- }
-
- // purely indicative in the bitstream (except for the 1-segment case)
- enc->base_quant_ = enc->dqm_[0].quant_;
-
- // fill-in values for the unused segments (required by the syntax)
- for (i = num_segments; i < NUM_MB_SEGMENTS; ++i) {
- enc->dqm_[i].quant_ = enc->base_quant_;
- }
-
- // uv_alpha_ is normally spread around ~60. The useful range is
- // typically ~30 (quite bad) to ~100 (ok to decimate UV more).
- // We map it to the safe maximal range of MAX/MIN_DQ_UV for dq_uv.
- dq_uv_ac = (enc->uv_alpha_ - MID_ALPHA) * (MAX_DQ_UV - MIN_DQ_UV)
- / (MAX_ALPHA - MIN_ALPHA);
- // we rescale by the user-defined strength of adaptation
- dq_uv_ac = dq_uv_ac * enc->config_->sns_strength / 100;
- // and make it safe.
- dq_uv_ac = clip(dq_uv_ac, MIN_DQ_UV, MAX_DQ_UV);
- // We also boost the dc-uv-quant a little, based on sns-strength, since
- // U/V channels are quite more reactive to high quants (flat DC-blocks
- // tend to appear, and are displeasant).
- dq_uv_dc = -4 * enc->config_->sns_strength / 100;
- dq_uv_dc = clip(dq_uv_dc, -15, 15); // 4bit-signed max allowed
-
- enc->dq_y1_dc_ = 0; // TODO(skal): dq-lum
- enc->dq_y2_dc_ = 0;
- enc->dq_y2_ac_ = 0;
- enc->dq_uv_dc_ = dq_uv_dc;
- enc->dq_uv_ac_ = dq_uv_ac;
-
- SetupMatrices(enc);
-
- SetupFilterStrength(enc); // initialize segments' filtering, eventually
-}
-
-//------------------------------------------------------------------------------
-// Form the predictions in cache
-
-// Must be ordered using {DC_PRED, TM_PRED, V_PRED, H_PRED} as index
-const int VP8I16ModeOffsets[4] = { I16DC16, I16TM16, I16VE16, I16HE16 };
-const int VP8UVModeOffsets[4] = { C8DC8, C8TM8, C8VE8, C8HE8 };
-
-// Must be indexed using {B_DC_PRED -> B_HU_PRED} as index
-const int VP8I4ModeOffsets[NUM_BMODES] = {
- I4DC4, I4TM4, I4VE4, I4HE4, I4RD4, I4VR4, I4LD4, I4VL4, I4HD4, I4HU4
-};
-
-void VP8MakeLuma16Preds(const VP8EncIterator* const it) {
- const VP8Encoder* const enc = it->enc_;
- const uint8_t* const left = it->x_ ? enc->y_left_ : NULL;
- const uint8_t* const top = it->y_ ? enc->y_top_ + it->x_ * 16 : NULL;
- VP8EncPredLuma16(it->yuv_p_, left, top);
-}
-
-void VP8MakeChroma8Preds(const VP8EncIterator* const it) {
- const VP8Encoder* const enc = it->enc_;
- const uint8_t* const left = it->x_ ? enc->u_left_ : NULL;
- const uint8_t* const top = it->y_ ? enc->uv_top_ + it->x_ * 16 : NULL;
- VP8EncPredChroma8(it->yuv_p_, left, top);
-}
-
-void VP8MakeIntra4Preds(const VP8EncIterator* const it) {
- VP8EncPredLuma4(it->yuv_p_, it->i4_top_);
-}
-
-//------------------------------------------------------------------------------
-// Quantize
-
-// Layout:
-// +----+
-// |YYYY| 0
-// |YYYY| 4
-// |YYYY| 8
-// |YYYY| 12
-// +----+
-// |UUVV| 16
-// |UUVV| 20
-// +----+
-
-const int VP8Scan[16 + 4 + 4] = {
- // Luma
- 0 + 0 * BPS, 4 + 0 * BPS, 8 + 0 * BPS, 12 + 0 * BPS,
- 0 + 4 * BPS, 4 + 4 * BPS, 8 + 4 * BPS, 12 + 4 * BPS,
- 0 + 8 * BPS, 4 + 8 * BPS, 8 + 8 * BPS, 12 + 8 * BPS,
- 0 + 12 * BPS, 4 + 12 * BPS, 8 + 12 * BPS, 12 + 12 * BPS,
-
- 0 + 0 * BPS, 4 + 0 * BPS, 0 + 4 * BPS, 4 + 4 * BPS, // U
- 8 + 0 * BPS, 12 + 0 * BPS, 8 + 4 * BPS, 12 + 4 * BPS // V
-};
-
-//------------------------------------------------------------------------------
-// Distortion measurement
-
-static const uint16_t kWeightY[16] = {
- 38, 32, 20, 9, 32, 28, 17, 7, 20, 17, 10, 4, 9, 7, 4, 2
-};
-
-static const uint16_t kWeightTrellis[16] = {
-#if USE_TDISTO == 0
- 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16
-#else
- 30, 27, 19, 11,
- 27, 24, 17, 10,
- 19, 17, 12, 8,
- 11, 10, 8, 6
-#endif
-};
-
-// Init/Copy the common fields in score.
-static void InitScore(VP8ModeScore* const rd) {
- rd->D = 0;
- rd->SD = 0;
- rd->R = 0;
- rd->nz = 0;
- rd->score = MAX_COST;
-}
-
-static void CopyScore(VP8ModeScore* const dst, const VP8ModeScore* const src) {
- dst->D = src->D;
- dst->SD = src->SD;
- dst->R = src->R;
- dst->nz = src->nz; // note that nz is not accumulated, but just copied.
- dst->score = src->score;
-}
-
-static void AddScore(VP8ModeScore* const dst, const VP8ModeScore* const src) {
- dst->D += src->D;
- dst->SD += src->SD;
- dst->R += src->R;
- dst->nz |= src->nz; // here, new nz bits are accumulated.
- dst->score += src->score;
-}
-
-//------------------------------------------------------------------------------
-// Performs trellis-optimized quantization.
-
-// Trellis
-
-typedef struct {
- int prev; // best previous
- int level; // level
- int sign; // sign of coeff_i
- score_t cost; // bit cost
- score_t error; // distortion = sum of (|coeff_i| - level_i * Q_i)^2
- int ctx; // context (only depends on 'level'. Could be spared.)
-} Node;
-
-// If a coefficient was quantized to a value Q (using a neutral bias),
-// we test all alternate possibilities between [Q-MIN_DELTA, Q+MAX_DELTA]
-// We don't test negative values though.
-#define MIN_DELTA 0 // how much lower level to try
-#define MAX_DELTA 1 // how much higher
-#define NUM_NODES (MIN_DELTA + 1 + MAX_DELTA)
-#define NODE(n, l) (nodes[(n) + 1][(l) + MIN_DELTA])
-
-static WEBP_INLINE void SetRDScore(int lambda, VP8ModeScore* const rd) {
- // TODO: incorporate the "* 256" in the tables?
- rd->score = rd->R * lambda + 256 * (rd->D + rd->SD);
-}
-
-static WEBP_INLINE score_t RDScoreTrellis(int lambda, score_t rate,
- score_t distortion) {
- return rate * lambda + 256 * distortion;
-}
-
-static int TrellisQuantizeBlock(const VP8EncIterator* const it,
- int16_t in[16], int16_t out[16],
- int ctx0, int coeff_type,
- const VP8Matrix* const mtx,
- int lambda) {
- ProbaArray* const last_costs = it->enc_->proba_.coeffs_[coeff_type];
- CostArray* const costs = it->enc_->proba_.level_cost_[coeff_type];
- const int first = (coeff_type == 0) ? 1 : 0;
- Node nodes[17][NUM_NODES];
- int best_path[3] = {-1, -1, -1}; // store best-last/best-level/best-previous
- score_t best_score;
- int best_node;
- int last = first - 1;
- int n, m, p, nz;
-
- {
- score_t cost;
- score_t max_error;
- const int thresh = mtx->q_[1] * mtx->q_[1] / 4;
- const int last_proba = last_costs[VP8EncBands[first]][ctx0][0];
-
- // compute maximal distortion.
- max_error = 0;
- for (n = first; n < 16; ++n) {
- const int j = kZigzag[n];
- const int err = in[j] * in[j];
- max_error += kWeightTrellis[j] * err;
- if (err > thresh) last = n;
- }
- // we don't need to go inspect up to n = 16 coeffs. We can just go up
- // to last + 1 (inclusive) without losing much.
- if (last < 15) ++last;
-
- // compute 'skip' score. This is the max score one can do.
- cost = VP8BitCost(0, last_proba);
- best_score = RDScoreTrellis(lambda, cost, max_error);
-
- // initialize source node.
- n = first - 1;
- for (m = -MIN_DELTA; m <= MAX_DELTA; ++m) {
- NODE(n, m).cost = 0;
- NODE(n, m).error = max_error;
- NODE(n, m).ctx = ctx0;
- }
- }
-
- // traverse trellis.
- for (n = first; n <= last; ++n) {
- const int j = kZigzag[n];
- const int Q = mtx->q_[j];
- const int iQ = mtx->iq_[j];
- const int B = BIAS(0x00); // neutral bias
- // note: it's important to take sign of the _original_ coeff,
- // so we don't have to consider level < 0 afterward.
- const int sign = (in[j] < 0);
- int coeff0 = (sign ? -in[j] : in[j]) + mtx->sharpen_[j];
- int level0;
- if (coeff0 > 2047) coeff0 = 2047;
-
- level0 = QUANTDIV(coeff0, iQ, B);
- // test all alternate level values around level0.
- for (m = -MIN_DELTA; m <= MAX_DELTA; ++m) {
- Node* const cur = &NODE(n, m);
- int delta_error, new_error;
- score_t cur_score = MAX_COST;
- int level = level0 + m;
- int last_proba;
-
- cur->sign = sign;
- cur->level = level;
- cur->ctx = (level == 0) ? 0 : (level == 1) ? 1 : 2;
- if (level >= 2048 || level < 0) { // node is dead?
- cur->cost = MAX_COST;
- continue;
- }
- last_proba = last_costs[VP8EncBands[n + 1]][cur->ctx][0];
-
- // Compute delta_error = how much coding this level will
- // subtract as distortion to max_error
- new_error = coeff0 - level * Q;
- delta_error =
- kWeightTrellis[j] * (coeff0 * coeff0 - new_error * new_error);
-
- // Inspect all possible non-dead predecessors. Retain only the best one.
- for (p = -MIN_DELTA; p <= MAX_DELTA; ++p) {
- const Node* const prev = &NODE(n - 1, p);
- const int prev_ctx = prev->ctx;
- const uint16_t* const tcost = costs[VP8EncBands[n]][prev_ctx];
- const score_t total_error = prev->error - delta_error;
- score_t cost, base_cost, score;
-
- if (prev->cost >= MAX_COST) { // dead node?
- continue;
- }
-
- // Base cost of both terminal/non-terminal
- base_cost = prev->cost + VP8LevelCost(tcost, level);
-
- // Examine node assuming it's a non-terminal one.
- cost = base_cost;
- if (level && n < 15) {
- cost += VP8BitCost(1, last_proba);
- }
- score = RDScoreTrellis(lambda, cost, total_error);
- if (score < cur_score) {
- cur_score = score;
- cur->cost = cost;
- cur->error = total_error;
- cur->prev = p;
- }
-
- // Now, record best terminal node (and thus best entry in the graph).
- if (level) {
- cost = base_cost;
- if (n < 15) cost += VP8BitCost(0, last_proba);
- score = RDScoreTrellis(lambda, cost, total_error);
- if (score < best_score) {
- best_score = score;
- best_path[0] = n; // best eob position
- best_path[1] = m; // best level
- best_path[2] = p; // best predecessor
- }
- }
- }
- }
- }
-
- // Fresh start
- memset(in + first, 0, (16 - first) * sizeof(*in));
- memset(out + first, 0, (16 - first) * sizeof(*out));
- if (best_path[0] == -1) {
- return 0; // skip!
- }
-
- // Unwind the best path.
- // Note: best-prev on terminal node is not necessarily equal to the
- // best_prev for non-terminal. So we patch best_path[2] in.
- n = best_path[0];
- best_node = best_path[1];
- NODE(n, best_node).prev = best_path[2]; // force best-prev for terminal
- nz = 0;
-
- for (; n >= first; --n) {
- const Node* const node = &NODE(n, best_node);
- const int j = kZigzag[n];
- out[n] = node->sign ? -node->level : node->level;
- nz |= (node->level != 0);
- in[j] = out[n] * mtx->q_[j];
- best_node = node->prev;
- }
- return nz;
-}
-
-#undef NODE
-
-//------------------------------------------------------------------------------
-// Performs: difference, transform, quantize, back-transform, add
-// all at once. Output is the reconstructed block in *yuv_out, and the
-// quantized levels in *levels.
-
-static int ReconstructIntra16(VP8EncIterator* const it,
- VP8ModeScore* const rd,
- uint8_t* const yuv_out,
- int mode) {
- const VP8Encoder* const enc = it->enc_;
- const uint8_t* const ref = it->yuv_p_ + VP8I16ModeOffsets[mode];
- const uint8_t* const src = it->yuv_in_ + Y_OFF;
- const VP8SegmentInfo* const dqm = &enc->dqm_[it->mb_->segment_];
- int nz = 0;
- int n;
- int16_t tmp[16][16], dc_tmp[16];
-
- for (n = 0; n < 16; ++n) {
- VP8FTransform(src + VP8Scan[n], ref + VP8Scan[n], tmp[n]);
- }
- VP8FTransformWHT(tmp[0], dc_tmp);
- nz |= VP8EncQuantizeBlock(dc_tmp, rd->y_dc_levels, 0, &dqm->y2_) << 24;
-
- if (DO_TRELLIS_I16 && it->do_trellis_) {
- int x, y;
- VP8IteratorNzToBytes(it);
- for (y = 0, n = 0; y < 4; ++y) {
- for (x = 0; x < 4; ++x, ++n) {
- const int ctx = it->top_nz_[x] + it->left_nz_[y];
- const int non_zero =
- TrellisQuantizeBlock(it, tmp[n], rd->y_ac_levels[n], ctx, 0,
- &dqm->y1_, dqm->lambda_trellis_i16_);
- it->top_nz_[x] = it->left_nz_[y] = non_zero;
- nz |= non_zero << n;
- }
- }
- } else {
- for (n = 0; n < 16; ++n) {
- nz |= VP8EncQuantizeBlock(tmp[n], rd->y_ac_levels[n], 1, &dqm->y1_) << n;
- }
- }
-
- // Transform back
- VP8ITransformWHT(dc_tmp, tmp[0]);
- for (n = 0; n < 16; n += 2) {
- VP8ITransform(ref + VP8Scan[n], tmp[n], yuv_out + VP8Scan[n], 1);
- }
-
- return nz;
-}
-
-static int ReconstructIntra4(VP8EncIterator* const it,
- int16_t levels[16],
- const uint8_t* const src,
- uint8_t* const yuv_out,
- int mode) {
- const VP8Encoder* const enc = it->enc_;
- const uint8_t* const ref = it->yuv_p_ + VP8I4ModeOffsets[mode];
- const VP8SegmentInfo* const dqm = &enc->dqm_[it->mb_->segment_];
- int nz = 0;
- int16_t tmp[16];
-
- VP8FTransform(src, ref, tmp);
- if (DO_TRELLIS_I4 && it->do_trellis_) {
- const int x = it->i4_ & 3, y = it->i4_ >> 2;
- const int ctx = it->top_nz_[x] + it->left_nz_[y];
- nz = TrellisQuantizeBlock(it, tmp, levels, ctx, 3, &dqm->y1_,
- dqm->lambda_trellis_i4_);
- } else {
- nz = VP8EncQuantizeBlock(tmp, levels, 0, &dqm->y1_);
- }
- VP8ITransform(ref, tmp, yuv_out, 0);
- return nz;
-}
-
-static int ReconstructUV(VP8EncIterator* const it, VP8ModeScore* const rd,
- uint8_t* const yuv_out, int mode) {
- const VP8Encoder* const enc = it->enc_;
- const uint8_t* const ref = it->yuv_p_ + VP8UVModeOffsets[mode];
- const uint8_t* const src = it->yuv_in_ + U_OFF;
- const VP8SegmentInfo* const dqm = &enc->dqm_[it->mb_->segment_];
- int nz = 0;
- int n;
- int16_t tmp[8][16];
-
- for (n = 0; n < 8; ++n) {
- VP8FTransform(src + VP8Scan[16 + n], ref + VP8Scan[16 + n], tmp[n]);
- }
- if (DO_TRELLIS_UV && it->do_trellis_) {
- int ch, x, y;
- for (ch = 0, n = 0; ch <= 2; ch += 2) {
- for (y = 0; y < 2; ++y) {
- for (x = 0; x < 2; ++x, ++n) {
- const int ctx = it->top_nz_[4 + ch + x] + it->left_nz_[4 + ch + y];
- const int non_zero =
- TrellisQuantizeBlock(it, tmp[n], rd->uv_levels[n], ctx, 2,
- &dqm->uv_, dqm->lambda_trellis_uv_);
- it->top_nz_[4 + ch + x] = it->left_nz_[4 + ch + y] = non_zero;
- nz |= non_zero << n;
- }
- }
- }
- } else {
- for (n = 0; n < 8; ++n) {
- nz |= VP8EncQuantizeBlock(tmp[n], rd->uv_levels[n], 0, &dqm->uv_) << n;
- }
- }
-
- for (n = 0; n < 8; n += 2) {
- VP8ITransform(ref + VP8Scan[16 + n], tmp[n], yuv_out + VP8Scan[16 + n], 1);
- }
- return (nz << 16);
-}
-
-//------------------------------------------------------------------------------
-// RD-opt decision. Reconstruct each modes, evalue distortion and bit-cost.
-// Pick the mode is lower RD-cost = Rate + lamba * Distortion.
-
-static void SwapPtr(uint8_t** a, uint8_t** b) {
- uint8_t* const tmp = *a;
- *a = *b;
- *b = tmp;
-}
-
-static void SwapOut(VP8EncIterator* const it) {
- SwapPtr(&it->yuv_out_, &it->yuv_out2_);
-}
-
-static void PickBestIntra16(VP8EncIterator* const it, VP8ModeScore* const rd) {
- const VP8Encoder* const enc = it->enc_;
- const VP8SegmentInfo* const dqm = &enc->dqm_[it->mb_->segment_];
- const int lambda = dqm->lambda_i16_;
- const int tlambda = dqm->tlambda_;
- const uint8_t* const src = it->yuv_in_ + Y_OFF;
- VP8ModeScore rd16;
- int mode;
-
- rd->mode_i16 = -1;
- for (mode = 0; mode < 4; ++mode) {
- uint8_t* const tmp_dst = it->yuv_out2_ + Y_OFF; // scratch buffer
- int nz;
-
- // Reconstruct
- nz = ReconstructIntra16(it, &rd16, tmp_dst, mode);
-
- // Measure RD-score
- rd16.D = VP8SSE16x16(src, tmp_dst);
- rd16.SD = tlambda ? MULT_8B(tlambda, VP8TDisto16x16(src, tmp_dst, kWeightY))
- : 0;
- rd16.R = VP8GetCostLuma16(it, &rd16);
- rd16.R += VP8FixedCostsI16[mode];
-
- // Since we always examine Intra16 first, we can overwrite *rd directly.
- SetRDScore(lambda, &rd16);
- if (mode == 0 || rd16.score < rd->score) {
- CopyScore(rd, &rd16);
- rd->mode_i16 = mode;
- rd->nz = nz;
- memcpy(rd->y_ac_levels, rd16.y_ac_levels, sizeof(rd16.y_ac_levels));
- memcpy(rd->y_dc_levels, rd16.y_dc_levels, sizeof(rd16.y_dc_levels));
- SwapOut(it);
- }
- }
- SetRDScore(dqm->lambda_mode_, rd); // finalize score for mode decision.
- VP8SetIntra16Mode(it, rd->mode_i16);
-}
-
-//------------------------------------------------------------------------------
-
-// return the cost array corresponding to the surrounding prediction modes.
-static const uint16_t* GetCostModeI4(VP8EncIterator* const it,
- const uint8_t modes[16]) {
- const int preds_w = it->enc_->preds_w_;
- const int x = (it->i4_ & 3), y = it->i4_ >> 2;
- const int left = (x == 0) ? it->preds_[y * preds_w - 1] : modes[it->i4_ - 1];
- const int top = (y == 0) ? it->preds_[-preds_w + x] : modes[it->i4_ - 4];
- return VP8FixedCostsI4[top][left];
-}
-
-static int PickBestIntra4(VP8EncIterator* const it, VP8ModeScore* const rd) {
- const VP8Encoder* const enc = it->enc_;
- const VP8SegmentInfo* const dqm = &enc->dqm_[it->mb_->segment_];
- const int lambda = dqm->lambda_i4_;
- const int tlambda = dqm->tlambda_;
- const uint8_t* const src0 = it->yuv_in_ + Y_OFF;
- uint8_t* const best_blocks = it->yuv_out2_ + Y_OFF;
- int total_header_bits = 0;
- VP8ModeScore rd_best;
-
- if (enc->max_i4_header_bits_ == 0) {
- return 0;
- }
-
- InitScore(&rd_best);
- rd_best.score = 211; // '211' is the value of VP8BitCost(0, 145)
- VP8IteratorStartI4(it);
- do {
- VP8ModeScore rd_i4;
- int mode;
- int best_mode = -1;
- const uint8_t* const src = src0 + VP8Scan[it->i4_];
- const uint16_t* const mode_costs = GetCostModeI4(it, rd->modes_i4);
- uint8_t* best_block = best_blocks + VP8Scan[it->i4_];
- uint8_t* tmp_dst = it->yuv_p_ + I4TMP; // scratch buffer.
-
- InitScore(&rd_i4);
- VP8MakeIntra4Preds(it);
- for (mode = 0; mode < NUM_BMODES; ++mode) {
- VP8ModeScore rd_tmp;
- int16_t tmp_levels[16];
-
- // Reconstruct
- rd_tmp.nz =
- ReconstructIntra4(it, tmp_levels, src, tmp_dst, mode) << it->i4_;
-
- // Compute RD-score
- rd_tmp.D = VP8SSE4x4(src, tmp_dst);
- rd_tmp.SD =
- tlambda ? MULT_8B(tlambda, VP8TDisto4x4(src, tmp_dst, kWeightY))
- : 0;
- rd_tmp.R = VP8GetCostLuma4(it, tmp_levels);
- rd_tmp.R += mode_costs[mode];
-
- SetRDScore(lambda, &rd_tmp);
- if (best_mode < 0 || rd_tmp.score < rd_i4.score) {
- CopyScore(&rd_i4, &rd_tmp);
- best_mode = mode;
- SwapPtr(&tmp_dst, &best_block);
- memcpy(rd_best.y_ac_levels[it->i4_], tmp_levels, sizeof(tmp_levels));
- }
- }
- SetRDScore(dqm->lambda_mode_, &rd_i4);
- AddScore(&rd_best, &rd_i4);
- total_header_bits += mode_costs[best_mode];
- if (rd_best.score >= rd->score ||
- total_header_bits > enc->max_i4_header_bits_) {
- return 0;
- }
- // Copy selected samples if not in the right place already.
- if (best_block != best_blocks + VP8Scan[it->i4_])
- VP8Copy4x4(best_block, best_blocks + VP8Scan[it->i4_]);
- rd->modes_i4[it->i4_] = best_mode;
- it->top_nz_[it->i4_ & 3] = it->left_nz_[it->i4_ >> 2] = (rd_i4.nz ? 1 : 0);
- } while (VP8IteratorRotateI4(it, best_blocks));
-
- // finalize state
- CopyScore(rd, &rd_best);
- VP8SetIntra4Mode(it, rd->modes_i4);
- SwapOut(it);
- memcpy(rd->y_ac_levels, rd_best.y_ac_levels, sizeof(rd->y_ac_levels));
- return 1; // select intra4x4 over intra16x16
-}
-
-//------------------------------------------------------------------------------
-
-static void PickBestUV(VP8EncIterator* const it, VP8ModeScore* const rd) {
- const VP8Encoder* const enc = it->enc_;
- const VP8SegmentInfo* const dqm = &enc->dqm_[it->mb_->segment_];
- const int lambda = dqm->lambda_uv_;
- const uint8_t* const src = it->yuv_in_ + U_OFF;
- uint8_t* const tmp_dst = it->yuv_out2_ + U_OFF; // scratch buffer
- uint8_t* const dst0 = it->yuv_out_ + U_OFF;
- VP8ModeScore rd_best;
- int mode;
-
- rd->mode_uv = -1;
- InitScore(&rd_best);
- for (mode = 0; mode < 4; ++mode) {
- VP8ModeScore rd_uv;
-
- // Reconstruct
- rd_uv.nz = ReconstructUV(it, &rd_uv, tmp_dst, mode);
-
- // Compute RD-score
- rd_uv.D = VP8SSE16x8(src, tmp_dst);
- rd_uv.SD = 0; // TODO: should we call TDisto? it tends to flatten areas.
- rd_uv.R = VP8GetCostUV(it, &rd_uv);
- rd_uv.R += VP8FixedCostsUV[mode];
-
- SetRDScore(lambda, &rd_uv);
- if (mode == 0 || rd_uv.score < rd_best.score) {
- CopyScore(&rd_best, &rd_uv);
- rd->mode_uv = mode;
- memcpy(rd->uv_levels, rd_uv.uv_levels, sizeof(rd->uv_levels));
- memcpy(dst0, tmp_dst, UV_SIZE); // TODO: SwapUVOut() ?
- }
- }
- VP8SetIntraUVMode(it, rd->mode_uv);
- AddScore(rd, &rd_best);
-}
-
-//------------------------------------------------------------------------------
-// Final reconstruction and quantization.
-
-static void SimpleQuantize(VP8EncIterator* const it, VP8ModeScore* const rd) {
- const VP8Encoder* const enc = it->enc_;
- const int i16 = (it->mb_->type_ == 1);
- int nz = 0;
-
- if (i16) {
- nz = ReconstructIntra16(it, rd, it->yuv_out_ + Y_OFF, it->preds_[0]);
- } else {
- VP8IteratorStartI4(it);
- do {
- const int mode =
- it->preds_[(it->i4_ & 3) + (it->i4_ >> 2) * enc->preds_w_];
- const uint8_t* const src = it->yuv_in_ + Y_OFF + VP8Scan[it->i4_];
- uint8_t* const dst = it->yuv_out_ + Y_OFF + VP8Scan[it->i4_];
- VP8MakeIntra4Preds(it);
- nz |= ReconstructIntra4(it, rd->y_ac_levels[it->i4_],
- src, dst, mode) << it->i4_;
- } while (VP8IteratorRotateI4(it, it->yuv_out_ + Y_OFF));
- }
-
- nz |= ReconstructUV(it, rd, it->yuv_out_ + U_OFF, it->mb_->uv_mode_);
- rd->nz = nz;
-}
-
-//------------------------------------------------------------------------------
-// Entry point
-
-int VP8Decimate(VP8EncIterator* const it, VP8ModeScore* const rd, int rd_opt) {
- int is_skipped;
-
- InitScore(rd);
-
- // We can perform predictions for Luma16x16 and Chroma8x8 already.
- // Luma4x4 predictions needs to be done as-we-go.
- VP8MakeLuma16Preds(it);
- VP8MakeChroma8Preds(it);
-
- // for rd_opt = 2, we perform trellis-quant on the final decision only.
- // for rd_opt > 2, we use it for every scoring (=much slower).
- if (rd_opt > 0) {
- it->do_trellis_ = (rd_opt > 2);
- PickBestIntra16(it, rd);
- if (it->enc_->method_ >= 2) {
- PickBestIntra4(it, rd);
- }
- PickBestUV(it, rd);
- if (rd_opt == 2) {
- it->do_trellis_ = 1;
- SimpleQuantize(it, rd);
- }
- } else {
- // TODO: for method_ == 2, pick the best intra4/intra16 based on SSE
- it->do_trellis_ = (it->enc_->method_ == 2);
- SimpleQuantize(it, rd);
- }
- is_skipped = (rd->nz == 0);
- VP8SetSkip(it, is_skipped);
- return is_skipped;
-}
-
-#if defined(__cplusplus) || defined(c_plusplus)
-} // extern "C"
-#endif
diff --git a/drivers/webpold/enc/syntax.c b/drivers/webpold/enc/syntax.c
deleted file mode 100644
index 4221436ff9..0000000000
--- a/drivers/webpold/enc/syntax.c
+++ /dev/null
@@ -1,437 +0,0 @@
-// Copyright 2011 Google Inc. All Rights Reserved.
-//
-// This code is licensed under the same terms as WebM:
-// Software License Agreement: http://www.webmproject.org/license/software/
-// Additional IP Rights Grant: http://www.webmproject.org/license/additional/
-// -----------------------------------------------------------------------------
-//
-// Header syntax writing
-//
-// Author: Skal (pascal.massimino@gmail.com)
-
-#include <assert.h>
-
-#include "../format_constants.h"
-#include "./vp8enci.h"
-
-#if defined(__cplusplus) || defined(c_plusplus)
-extern "C" {
-#endif
-
-//------------------------------------------------------------------------------
-// Helper functions
-
-// TODO(later): Move to webp/format_constants.h?
-static void PutLE24(uint8_t* const data, uint32_t val) {
- data[0] = (val >> 0) & 0xff;
- data[1] = (val >> 8) & 0xff;
- data[2] = (val >> 16) & 0xff;
-}
-
-static void PutLE32(uint8_t* const data, uint32_t val) {
- PutLE24(data, val);
- data[3] = (val >> 24) & 0xff;
-}
-
-static int IsVP8XNeeded(const VP8Encoder* const enc) {
- return !!enc->has_alpha_; // Currently the only case when VP8X is needed.
- // This could change in the future.
-}
-
-static int PutPaddingByte(const WebPPicture* const pic) {
-
- const uint8_t pad_byte[1] = { 0 };
- return !!pic->writer(pad_byte, 1, pic);
-}
-
-//------------------------------------------------------------------------------
-// Writers for header's various pieces (in order of appearance)
-
-static WebPEncodingError PutRIFFHeader(const VP8Encoder* const enc,
- size_t riff_size) {
- const WebPPicture* const pic = enc->pic_;
- uint8_t riff[RIFF_HEADER_SIZE] = {
- 'R', 'I', 'F', 'F', 0, 0, 0, 0, 'W', 'E', 'B', 'P'
- };
- assert(riff_size == (uint32_t)riff_size);
- PutLE32(riff + TAG_SIZE, (uint32_t)riff_size);
- if (!pic->writer(riff, sizeof(riff), pic)) {
- return VP8_ENC_ERROR_BAD_WRITE;
- }
- return VP8_ENC_OK;
-}
-
-static WebPEncodingError PutVP8XHeader(const VP8Encoder* const enc) {
- const WebPPicture* const pic = enc->pic_;
- uint8_t vp8x[CHUNK_HEADER_SIZE + VP8X_CHUNK_SIZE] = {
- 'V', 'P', '8', 'X'
- };
- uint32_t flags = 0;
-
- assert(IsVP8XNeeded(enc));
- assert(pic->width >= 1 && pic->height >= 1);
- assert(pic->width <= MAX_CANVAS_SIZE && pic->height <= MAX_CANVAS_SIZE);
-
- if (enc->has_alpha_) {
- flags |= ALPHA_FLAG_BIT;
- }
-
- PutLE32(vp8x + TAG_SIZE, VP8X_CHUNK_SIZE);
- PutLE32(vp8x + CHUNK_HEADER_SIZE, flags);
- PutLE24(vp8x + CHUNK_HEADER_SIZE + 4, pic->width - 1);
- PutLE24(vp8x + CHUNK_HEADER_SIZE + 7, pic->height - 1);
- if(!pic->writer(vp8x, sizeof(vp8x), pic)) {
- return VP8_ENC_ERROR_BAD_WRITE;
- }
- return VP8_ENC_OK;
-}
-
-static WebPEncodingError PutAlphaChunk(const VP8Encoder* const enc) {
- const WebPPicture* const pic = enc->pic_;
- uint8_t alpha_chunk_hdr[CHUNK_HEADER_SIZE] = {
- 'A', 'L', 'P', 'H'
- };
-
- assert(enc->has_alpha_);
-
- // Alpha chunk header.
- PutLE32(alpha_chunk_hdr + TAG_SIZE, enc->alpha_data_size_);
- if (!pic->writer(alpha_chunk_hdr, sizeof(alpha_chunk_hdr), pic)) {
- return VP8_ENC_ERROR_BAD_WRITE;
- }
-
- // Alpha chunk data.
- if (!pic->writer(enc->alpha_data_, enc->alpha_data_size_, pic)) {
- return VP8_ENC_ERROR_BAD_WRITE;
- }
-
- // Padding.
- if ((enc->alpha_data_size_ & 1) && !PutPaddingByte(pic)) {
- return VP8_ENC_ERROR_BAD_WRITE;
- }
- return VP8_ENC_OK;
-}
-
-static WebPEncodingError PutVP8Header(const WebPPicture* const pic,
- size_t vp8_size) {
- uint8_t vp8_chunk_hdr[CHUNK_HEADER_SIZE] = {
- 'V', 'P', '8', ' '
- };
- assert(vp8_size == (uint32_t)vp8_size);
- PutLE32(vp8_chunk_hdr + TAG_SIZE, (uint32_t)vp8_size);
- if (!pic->writer(vp8_chunk_hdr, sizeof(vp8_chunk_hdr), pic)) {
- return VP8_ENC_ERROR_BAD_WRITE;
- }
- return VP8_ENC_OK;
-}
-
-static WebPEncodingError PutVP8FrameHeader(const WebPPicture* const pic,
- int profile, size_t size0) {
- uint8_t vp8_frm_hdr[VP8_FRAME_HEADER_SIZE];
- uint32_t bits;
-
- if (size0 >= VP8_MAX_PARTITION0_SIZE) { // partition #0 is too big to fit
- return VP8_ENC_ERROR_PARTITION0_OVERFLOW;
- }
-
- // Paragraph 9.1.
- bits = 0 // keyframe (1b)
- | (profile << 1) // profile (3b)
- | (1 << 4) // visible (1b)
- | ((uint32_t)size0 << 5); // partition length (19b)
- vp8_frm_hdr[0] = (bits >> 0) & 0xff;
- vp8_frm_hdr[1] = (bits >> 8) & 0xff;
- vp8_frm_hdr[2] = (bits >> 16) & 0xff;
- // signature
- vp8_frm_hdr[3] = (VP8_SIGNATURE >> 16) & 0xff;
- vp8_frm_hdr[4] = (VP8_SIGNATURE >> 8) & 0xff;
- vp8_frm_hdr[5] = (VP8_SIGNATURE >> 0) & 0xff;
- // dimensions
- vp8_frm_hdr[6] = pic->width & 0xff;
- vp8_frm_hdr[7] = pic->width >> 8;
- vp8_frm_hdr[8] = pic->height & 0xff;
- vp8_frm_hdr[9] = pic->height >> 8;
-
- if (!pic->writer(vp8_frm_hdr, sizeof(vp8_frm_hdr), pic)) {
- return VP8_ENC_ERROR_BAD_WRITE;
- }
- return VP8_ENC_OK;
-}
-
-// WebP Headers.
-static int PutWebPHeaders(const VP8Encoder* const enc, size_t size0,
- size_t vp8_size, size_t riff_size) {
- WebPPicture* const pic = enc->pic_;
- WebPEncodingError err = VP8_ENC_OK;
-
- // RIFF header.
- err = PutRIFFHeader(enc, riff_size);
- if (err != VP8_ENC_OK) goto Error;
-
- // VP8X.
- if (IsVP8XNeeded(enc)) {
- err = PutVP8XHeader(enc);
- if (err != VP8_ENC_OK) goto Error;
- }
-
- // Alpha.
- if (enc->has_alpha_) {
- err = PutAlphaChunk(enc);
- if (err != VP8_ENC_OK) goto Error;
- }
-
- // VP8 header.
- err = PutVP8Header(pic, vp8_size);
- if (err != VP8_ENC_OK) goto Error;
-
- // VP8 frame header.
- err = PutVP8FrameHeader(pic, enc->profile_, size0);
- if (err != VP8_ENC_OK) goto Error;
-
- // All OK.
- return 1;
-
- // Error.
- Error:
- return WebPEncodingSetError(pic, err);
-}
-
-// Segmentation header
-static void PutSegmentHeader(VP8BitWriter* const bw,
- const VP8Encoder* const enc) {
- const VP8SegmentHeader* const hdr = &enc->segment_hdr_;
- const VP8Proba* const proba = &enc->proba_;
- if (VP8PutBitUniform(bw, (hdr->num_segments_ > 1))) {
- // We always 'update' the quant and filter strength values
- const int update_data = 1;
- int s;
- VP8PutBitUniform(bw, hdr->update_map_);
- if (VP8PutBitUniform(bw, update_data)) {
- // we always use absolute values, not relative ones
- VP8PutBitUniform(bw, 1); // (segment_feature_mode = 1. Paragraph 9.3.)
- for (s = 0; s < NUM_MB_SEGMENTS; ++s) {
- VP8PutSignedValue(bw, enc->dqm_[s].quant_, 7);
- }
- for (s = 0; s < NUM_MB_SEGMENTS; ++s) {
- VP8PutSignedValue(bw, enc->dqm_[s].fstrength_, 6);
- }
- }
- if (hdr->update_map_) {
- for (s = 0; s < 3; ++s) {
- if (VP8PutBitUniform(bw, (proba->segments_[s] != 255u))) {
- VP8PutValue(bw, proba->segments_[s], 8);
- }
- }
- }
- }
-}
-
-// Filtering parameters header
-static void PutFilterHeader(VP8BitWriter* const bw,
- const VP8FilterHeader* const hdr) {
- const int use_lf_delta = (hdr->i4x4_lf_delta_ != 0);
- VP8PutBitUniform(bw, hdr->simple_);
- VP8PutValue(bw, hdr->level_, 6);
- VP8PutValue(bw, hdr->sharpness_, 3);
- if (VP8PutBitUniform(bw, use_lf_delta)) {
- // '0' is the default value for i4x4_lf_delta_ at frame #0.
- const int need_update = (hdr->i4x4_lf_delta_ != 0);
- if (VP8PutBitUniform(bw, need_update)) {
- // we don't use ref_lf_delta => emit four 0 bits
- VP8PutValue(bw, 0, 4);
- // we use mode_lf_delta for i4x4
- VP8PutSignedValue(bw, hdr->i4x4_lf_delta_, 6);
- VP8PutValue(bw, 0, 3); // all others unused
- }
- }
-}
-
-// Nominal quantization parameters
-static void PutQuant(VP8BitWriter* const bw,
- const VP8Encoder* const enc) {
- VP8PutValue(bw, enc->base_quant_, 7);
- VP8PutSignedValue(bw, enc->dq_y1_dc_, 4);
- VP8PutSignedValue(bw, enc->dq_y2_dc_, 4);
- VP8PutSignedValue(bw, enc->dq_y2_ac_, 4);
- VP8PutSignedValue(bw, enc->dq_uv_dc_, 4);
- VP8PutSignedValue(bw, enc->dq_uv_ac_, 4);
-}
-
-// Partition sizes
-static int EmitPartitionsSize(const VP8Encoder* const enc,
- WebPPicture* const pic) {
- uint8_t buf[3 * (MAX_NUM_PARTITIONS - 1)];
- int p;
- for (p = 0; p < enc->num_parts_ - 1; ++p) {
- const size_t part_size = VP8BitWriterSize(enc->parts_ + p);
- if (part_size >= VP8_MAX_PARTITION_SIZE) {
- return WebPEncodingSetError(pic, VP8_ENC_ERROR_PARTITION_OVERFLOW);
- }
- buf[3 * p + 0] = (part_size >> 0) & 0xff;
- buf[3 * p + 1] = (part_size >> 8) & 0xff;
- buf[3 * p + 2] = (part_size >> 16) & 0xff;
- }
- return p ? pic->writer(buf, 3 * p, pic) : 1;
-}
-
-//------------------------------------------------------------------------------
-
-#ifdef WEBP_EXPERIMENTAL_FEATURES
-
-#define KTRAILER_SIZE 8
-
-static int WriteExtensions(VP8Encoder* const enc) {
- uint8_t buffer[KTRAILER_SIZE];
- VP8BitWriter* const bw = &enc->bw_;
- WebPPicture* const pic = enc->pic_;
-
- // Layer (bytes 0..3)
- PutLE24(buffer + 0, enc->layer_data_size_);
- buffer[3] = enc->pic_->colorspace & WEBP_CSP_UV_MASK;
- if (enc->layer_data_size_ > 0) {
- assert(enc->use_layer_);
- // append layer data to last partition
- if (!VP8BitWriterAppend(&enc->parts_[enc->num_parts_ - 1],
- enc->layer_data_, enc->layer_data_size_)) {
- return WebPEncodingSetError(pic, VP8_ENC_ERROR_BITSTREAM_OUT_OF_MEMORY);
- }
- }
-
- buffer[KTRAILER_SIZE - 1] = 0x01; // marker
- if (!VP8BitWriterAppend(bw, buffer, KTRAILER_SIZE)) {
- return WebPEncodingSetError(pic, VP8_ENC_ERROR_BITSTREAM_OUT_OF_MEMORY);
- }
- return 1;
-}
-
-#endif /* WEBP_EXPERIMENTAL_FEATURES */
-
-//------------------------------------------------------------------------------
-
-static size_t GeneratePartition0(VP8Encoder* const enc) {
- VP8BitWriter* const bw = &enc->bw_;
- const int mb_size = enc->mb_w_ * enc->mb_h_;
- uint64_t pos1, pos2, pos3;
-#ifdef WEBP_EXPERIMENTAL_FEATURES
- const int need_extensions = enc->use_layer_;
-#endif
-
- pos1 = VP8BitWriterPos(bw);
- VP8BitWriterInit(bw, mb_size * 7 / 8); // ~7 bits per macroblock
-#ifdef WEBP_EXPERIMENTAL_FEATURES
- VP8PutBitUniform(bw, need_extensions); // extensions
-#else
- VP8PutBitUniform(bw, 0); // colorspace
-#endif
- VP8PutBitUniform(bw, 0); // clamp type
-
- PutSegmentHeader(bw, enc);
- PutFilterHeader(bw, &enc->filter_hdr_);
- VP8PutValue(bw, enc->config_->partitions, 2);
- PutQuant(bw, enc);
- VP8PutBitUniform(bw, 0); // no proba update
- VP8WriteProbas(bw, &enc->proba_);
- pos2 = VP8BitWriterPos(bw);
- VP8CodeIntraModes(enc);
- VP8BitWriterFinish(bw);
-
-#ifdef WEBP_EXPERIMENTAL_FEATURES
- if (need_extensions && !WriteExtensions(enc)) {
- return 0;
- }
-#endif
-
- pos3 = VP8BitWriterPos(bw);
-
- if (enc->pic_->stats) {
- enc->pic_->stats->header_bytes[0] = (int)((pos2 - pos1 + 7) >> 3);
- enc->pic_->stats->header_bytes[1] = (int)((pos3 - pos2 + 7) >> 3);
- enc->pic_->stats->alpha_data_size = (int)enc->alpha_data_size_;
- enc->pic_->stats->layer_data_size = (int)enc->layer_data_size_;
- }
- return !bw->error_;
-}
-
-void VP8EncFreeBitWriters(VP8Encoder* const enc) {
- int p;
- VP8BitWriterWipeOut(&enc->bw_);
- for (p = 0; p < enc->num_parts_; ++p) {
- VP8BitWriterWipeOut(enc->parts_ + p);
- }
-}
-
-int VP8EncWrite(VP8Encoder* const enc) {
- WebPPicture* const pic = enc->pic_;
- VP8BitWriter* const bw = &enc->bw_;
- const int task_percent = 19;
- const int percent_per_part = task_percent / enc->num_parts_;
- const int final_percent = enc->percent_ + task_percent;
- int ok = 0;
- size_t vp8_size, pad, riff_size;
- int p;
-
- // Partition #0 with header and partition sizes
- ok = !!GeneratePartition0(enc);
-
- // Compute VP8 size
- vp8_size = VP8_FRAME_HEADER_SIZE +
- VP8BitWriterSize(bw) +
- 3 * (enc->num_parts_ - 1);
- for (p = 0; p < enc->num_parts_; ++p) {
- vp8_size += VP8BitWriterSize(enc->parts_ + p);
- }
- pad = vp8_size & 1;
- vp8_size += pad;
-
- // Compute RIFF size
- // At the minimum it is: "WEBPVP8 nnnn" + VP8 data size.
- riff_size = TAG_SIZE + CHUNK_HEADER_SIZE + vp8_size;
- if (IsVP8XNeeded(enc)) { // Add size for: VP8X header + data.
- riff_size += CHUNK_HEADER_SIZE + VP8X_CHUNK_SIZE;
- }
- if (enc->has_alpha_) { // Add size for: ALPH header + data.
- const uint32_t padded_alpha_size = enc->alpha_data_size_ +
- (enc->alpha_data_size_ & 1);
- riff_size += CHUNK_HEADER_SIZE + padded_alpha_size;
- }
- // Sanity check.
- if (riff_size > 0xfffffffeU) {
- return WebPEncodingSetError(pic, VP8_ENC_ERROR_FILE_TOO_BIG);
- }
-
- // Emit headers and partition #0
- {
- const uint8_t* const part0 = VP8BitWriterBuf(bw);
- const size_t size0 = VP8BitWriterSize(bw);
- ok = ok && PutWebPHeaders(enc, size0, vp8_size, riff_size)
- && pic->writer(part0, size0, pic)
- && EmitPartitionsSize(enc, pic);
- VP8BitWriterWipeOut(bw); // will free the internal buffer.
- }
-
- // Token partitions
- for (p = 0; p < enc->num_parts_; ++p) {
- const uint8_t* const buf = VP8BitWriterBuf(enc->parts_ + p);
- const size_t size = VP8BitWriterSize(enc->parts_ + p);
- if (size)
- ok = ok && pic->writer(buf, size, pic);
- VP8BitWriterWipeOut(enc->parts_ + p); // will free the internal buffer.
- ok = ok && WebPReportProgress(pic, enc->percent_ + percent_per_part,
- &enc->percent_);
- }
-
- // Padding byte
- if (ok && pad) {
- ok = PutPaddingByte(pic);
- }
-
- enc->coded_size_ = (int)(CHUNK_HEADER_SIZE + riff_size);
- ok = ok && WebPReportProgress(pic, final_percent, &enc->percent_);
- return ok;
-}
-
-//------------------------------------------------------------------------------
-
-#if defined(__cplusplus) || defined(c_plusplus)
-} // extern "C"
-#endif
diff --git a/drivers/webpold/enc/tree.c b/drivers/webpold/enc/tree.c
deleted file mode 100644
index 8b25e5e488..0000000000
--- a/drivers/webpold/enc/tree.c
+++ /dev/null
@@ -1,510 +0,0 @@
-// Copyright 2011 Google Inc. All Rights Reserved.
-//
-// This code is licensed under the same terms as WebM:
-// Software License Agreement: http://www.webmproject.org/license/software/
-// Additional IP Rights Grant: http://www.webmproject.org/license/additional/
-// -----------------------------------------------------------------------------
-//
-// Token probabilities
-//
-// Author: Skal (pascal.massimino@gmail.com)
-
-#include "./vp8enci.h"
-
-#if defined(__cplusplus) || defined(c_plusplus)
-extern "C" {
-#endif
-
-//------------------------------------------------------------------------------
-// Default probabilities
-
-// Paragraph 13.5
-const uint8_t
- VP8CoeffsProba0[NUM_TYPES][NUM_BANDS][NUM_CTX][NUM_PROBAS] = {
- // genereated using vp8_default_coef_probs() in entropy.c:129
- { { { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 },
- { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 },
- { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }
- },
- { { 253, 136, 254, 255, 228, 219, 128, 128, 128, 128, 128 },
- { 189, 129, 242, 255, 227, 213, 255, 219, 128, 128, 128 },
- { 106, 126, 227, 252, 214, 209, 255, 255, 128, 128, 128 }
- },
- { { 1, 98, 248, 255, 236, 226, 255, 255, 128, 128, 128 },
- { 181, 133, 238, 254, 221, 234, 255, 154, 128, 128, 128 },
- { 78, 134, 202, 247, 198, 180, 255, 219, 128, 128, 128 },
- },
- { { 1, 185, 249, 255, 243, 255, 128, 128, 128, 128, 128 },
- { 184, 150, 247, 255, 236, 224, 128, 128, 128, 128, 128 },
- { 77, 110, 216, 255, 236, 230, 128, 128, 128, 128, 128 },
- },
- { { 1, 101, 251, 255, 241, 255, 128, 128, 128, 128, 128 },
- { 170, 139, 241, 252, 236, 209, 255, 255, 128, 128, 128 },
- { 37, 116, 196, 243, 228, 255, 255, 255, 128, 128, 128 }
- },
- { { 1, 204, 254, 255, 245, 255, 128, 128, 128, 128, 128 },
- { 207, 160, 250, 255, 238, 128, 128, 128, 128, 128, 128 },
- { 102, 103, 231, 255, 211, 171, 128, 128, 128, 128, 128 }
- },
- { { 1, 152, 252, 255, 240, 255, 128, 128, 128, 128, 128 },
- { 177, 135, 243, 255, 234, 225, 128, 128, 128, 128, 128 },
- { 80, 129, 211, 255, 194, 224, 128, 128, 128, 128, 128 }
- },
- { { 1, 1, 255, 128, 128, 128, 128, 128, 128, 128, 128 },
- { 246, 1, 255, 128, 128, 128, 128, 128, 128, 128, 128 },
- { 255, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }
- }
- },
- { { { 198, 35, 237, 223, 193, 187, 162, 160, 145, 155, 62 },
- { 131, 45, 198, 221, 172, 176, 220, 157, 252, 221, 1 },
- { 68, 47, 146, 208, 149, 167, 221, 162, 255, 223, 128 }
- },
- { { 1, 149, 241, 255, 221, 224, 255, 255, 128, 128, 128 },
- { 184, 141, 234, 253, 222, 220, 255, 199, 128, 128, 128 },
- { 81, 99, 181, 242, 176, 190, 249, 202, 255, 255, 128 }
- },
- { { 1, 129, 232, 253, 214, 197, 242, 196, 255, 255, 128 },
- { 99, 121, 210, 250, 201, 198, 255, 202, 128, 128, 128 },
- { 23, 91, 163, 242, 170, 187, 247, 210, 255, 255, 128 }
- },
- { { 1, 200, 246, 255, 234, 255, 128, 128, 128, 128, 128 },
- { 109, 178, 241, 255, 231, 245, 255, 255, 128, 128, 128 },
- { 44, 130, 201, 253, 205, 192, 255, 255, 128, 128, 128 }
- },
- { { 1, 132, 239, 251, 219, 209, 255, 165, 128, 128, 128 },
- { 94, 136, 225, 251, 218, 190, 255, 255, 128, 128, 128 },
- { 22, 100, 174, 245, 186, 161, 255, 199, 128, 128, 128 }
- },
- { { 1, 182, 249, 255, 232, 235, 128, 128, 128, 128, 128 },
- { 124, 143, 241, 255, 227, 234, 128, 128, 128, 128, 128 },
- { 35, 77, 181, 251, 193, 211, 255, 205, 128, 128, 128 }
- },
- { { 1, 157, 247, 255, 236, 231, 255, 255, 128, 128, 128 },
- { 121, 141, 235, 255, 225, 227, 255, 255, 128, 128, 128 },
- { 45, 99, 188, 251, 195, 217, 255, 224, 128, 128, 128 }
- },
- { { 1, 1, 251, 255, 213, 255, 128, 128, 128, 128, 128 },
- { 203, 1, 248, 255, 255, 128, 128, 128, 128, 128, 128 },
- { 137, 1, 177, 255, 224, 255, 128, 128, 128, 128, 128 }
- }
- },
- { { { 253, 9, 248, 251, 207, 208, 255, 192, 128, 128, 128 },
- { 175, 13, 224, 243, 193, 185, 249, 198, 255, 255, 128 },
- { 73, 17, 171, 221, 161, 179, 236, 167, 255, 234, 128 }
- },
- { { 1, 95, 247, 253, 212, 183, 255, 255, 128, 128, 128 },
- { 239, 90, 244, 250, 211, 209, 255, 255, 128, 128, 128 },
- { 155, 77, 195, 248, 188, 195, 255, 255, 128, 128, 128 }
- },
- { { 1, 24, 239, 251, 218, 219, 255, 205, 128, 128, 128 },
- { 201, 51, 219, 255, 196, 186, 128, 128, 128, 128, 128 },
- { 69, 46, 190, 239, 201, 218, 255, 228, 128, 128, 128 }
- },
- { { 1, 191, 251, 255, 255, 128, 128, 128, 128, 128, 128 },
- { 223, 165, 249, 255, 213, 255, 128, 128, 128, 128, 128 },
- { 141, 124, 248, 255, 255, 128, 128, 128, 128, 128, 128 }
- },
- { { 1, 16, 248, 255, 255, 128, 128, 128, 128, 128, 128 },
- { 190, 36, 230, 255, 236, 255, 128, 128, 128, 128, 128 },
- { 149, 1, 255, 128, 128, 128, 128, 128, 128, 128, 128 }
- },
- { { 1, 226, 255, 128, 128, 128, 128, 128, 128, 128, 128 },
- { 247, 192, 255, 128, 128, 128, 128, 128, 128, 128, 128 },
- { 240, 128, 255, 128, 128, 128, 128, 128, 128, 128, 128 }
- },
- { { 1, 134, 252, 255, 255, 128, 128, 128, 128, 128, 128 },
- { 213, 62, 250, 255, 255, 128, 128, 128, 128, 128, 128 },
- { 55, 93, 255, 128, 128, 128, 128, 128, 128, 128, 128 }
- },
- { { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 },
- { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 },
- { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }
- }
- },
- { { { 202, 24, 213, 235, 186, 191, 220, 160, 240, 175, 255 },
- { 126, 38, 182, 232, 169, 184, 228, 174, 255, 187, 128 },
- { 61, 46, 138, 219, 151, 178, 240, 170, 255, 216, 128 }
- },
- { { 1, 112, 230, 250, 199, 191, 247, 159, 255, 255, 128 },
- { 166, 109, 228, 252, 211, 215, 255, 174, 128, 128, 128 },
- { 39, 77, 162, 232, 172, 180, 245, 178, 255, 255, 128 }
- },
- { { 1, 52, 220, 246, 198, 199, 249, 220, 255, 255, 128 },
- { 124, 74, 191, 243, 183, 193, 250, 221, 255, 255, 128 },
- { 24, 71, 130, 219, 154, 170, 243, 182, 255, 255, 128 }
- },
- { { 1, 182, 225, 249, 219, 240, 255, 224, 128, 128, 128 },
- { 149, 150, 226, 252, 216, 205, 255, 171, 128, 128, 128 },
- { 28, 108, 170, 242, 183, 194, 254, 223, 255, 255, 128 }
- },
- { { 1, 81, 230, 252, 204, 203, 255, 192, 128, 128, 128 },
- { 123, 102, 209, 247, 188, 196, 255, 233, 128, 128, 128 },
- { 20, 95, 153, 243, 164, 173, 255, 203, 128, 128, 128 }
- },
- { { 1, 222, 248, 255, 216, 213, 128, 128, 128, 128, 128 },
- { 168, 175, 246, 252, 235, 205, 255, 255, 128, 128, 128 },
- { 47, 116, 215, 255, 211, 212, 255, 255, 128, 128, 128 }
- },
- { { 1, 121, 236, 253, 212, 214, 255, 255, 128, 128, 128 },
- { 141, 84, 213, 252, 201, 202, 255, 219, 128, 128, 128 },
- { 42, 80, 160, 240, 162, 185, 255, 205, 128, 128, 128 }
- },
- { { 1, 1, 255, 128, 128, 128, 128, 128, 128, 128, 128 },
- { 244, 1, 255, 128, 128, 128, 128, 128, 128, 128, 128 },
- { 238, 1, 255, 128, 128, 128, 128, 128, 128, 128, 128 }
- }
- }
-};
-
-void VP8DefaultProbas(VP8Encoder* const enc) {
- VP8Proba* const probas = &enc->proba_;
- probas->use_skip_proba_ = 0;
- memset(probas->segments_, 255u, sizeof(probas->segments_));
- memcpy(probas->coeffs_, VP8CoeffsProba0, sizeof(VP8CoeffsProba0));
- // Note: we could hard-code the level_costs_ corresponding to VP8CoeffsProba0,
- // but that's ~11k of static data. Better call VP8CalculateLevelCosts() later.
- probas->dirty_ = 1;
-}
-
-// Paragraph 11.5. 900bytes.
-static const uint8_t kBModesProba[NUM_BMODES][NUM_BMODES][NUM_BMODES - 1] = {
- { { 231, 120, 48, 89, 115, 113, 120, 152, 112 },
- { 152, 179, 64, 126, 170, 118, 46, 70, 95 },
- { 175, 69, 143, 80, 85, 82, 72, 155, 103 },
- { 56, 58, 10, 171, 218, 189, 17, 13, 152 },
- { 114, 26, 17, 163, 44, 195, 21, 10, 173 },
- { 121, 24, 80, 195, 26, 62, 44, 64, 85 },
- { 144, 71, 10, 38, 171, 213, 144, 34, 26 },
- { 170, 46, 55, 19, 136, 160, 33, 206, 71 },
- { 63, 20, 8, 114, 114, 208, 12, 9, 226 },
- { 81, 40, 11, 96, 182, 84, 29, 16, 36 } },
- { { 134, 183, 89, 137, 98, 101, 106, 165, 148 },
- { 72, 187, 100, 130, 157, 111, 32, 75, 80 },
- { 66, 102, 167, 99, 74, 62, 40, 234, 128 },
- { 41, 53, 9, 178, 241, 141, 26, 8, 107 },
- { 74, 43, 26, 146, 73, 166, 49, 23, 157 },
- { 65, 38, 105, 160, 51, 52, 31, 115, 128 },
- { 104, 79, 12, 27, 217, 255, 87, 17, 7 },
- { 87, 68, 71, 44, 114, 51, 15, 186, 23 },
- { 47, 41, 14, 110, 182, 183, 21, 17, 194 },
- { 66, 45, 25, 102, 197, 189, 23, 18, 22 } },
- { { 88, 88, 147, 150, 42, 46, 45, 196, 205 },
- { 43, 97, 183, 117, 85, 38, 35, 179, 61 },
- { 39, 53, 200, 87, 26, 21, 43, 232, 171 },
- { 56, 34, 51, 104, 114, 102, 29, 93, 77 },
- { 39, 28, 85, 171, 58, 165, 90, 98, 64 },
- { 34, 22, 116, 206, 23, 34, 43, 166, 73 },
- { 107, 54, 32, 26, 51, 1, 81, 43, 31 },
- { 68, 25, 106, 22, 64, 171, 36, 225, 114 },
- { 34, 19, 21, 102, 132, 188, 16, 76, 124 },
- { 62, 18, 78, 95, 85, 57, 50, 48, 51 } },
- { { 193, 101, 35, 159, 215, 111, 89, 46, 111 },
- { 60, 148, 31, 172, 219, 228, 21, 18, 111 },
- { 112, 113, 77, 85, 179, 255, 38, 120, 114 },
- { 40, 42, 1, 196, 245, 209, 10, 25, 109 },
- { 88, 43, 29, 140, 166, 213, 37, 43, 154 },
- { 61, 63, 30, 155, 67, 45, 68, 1, 209 },
- { 100, 80, 8, 43, 154, 1, 51, 26, 71 },
- { 142, 78, 78, 16, 255, 128, 34, 197, 171 },
- { 41, 40, 5, 102, 211, 183, 4, 1, 221 },
- { 51, 50, 17, 168, 209, 192, 23, 25, 82 } },
- { { 138, 31, 36, 171, 27, 166, 38, 44, 229 },
- { 67, 87, 58, 169, 82, 115, 26, 59, 179 },
- { 63, 59, 90, 180, 59, 166, 93, 73, 154 },
- { 40, 40, 21, 116, 143, 209, 34, 39, 175 },
- { 47, 15, 16, 183, 34, 223, 49, 45, 183 },
- { 46, 17, 33, 183, 6, 98, 15, 32, 183 },
- { 57, 46, 22, 24, 128, 1, 54, 17, 37 },
- { 65, 32, 73, 115, 28, 128, 23, 128, 205 },
- { 40, 3, 9, 115, 51, 192, 18, 6, 223 },
- { 87, 37, 9, 115, 59, 77, 64, 21, 47 } },
- { { 104, 55, 44, 218, 9, 54, 53, 130, 226 },
- { 64, 90, 70, 205, 40, 41, 23, 26, 57 },
- { 54, 57, 112, 184, 5, 41, 38, 166, 213 },
- { 30, 34, 26, 133, 152, 116, 10, 32, 134 },
- { 39, 19, 53, 221, 26, 114, 32, 73, 255 },
- { 31, 9, 65, 234, 2, 15, 1, 118, 73 },
- { 75, 32, 12, 51, 192, 255, 160, 43, 51 },
- { 88, 31, 35, 67, 102, 85, 55, 186, 85 },
- { 56, 21, 23, 111, 59, 205, 45, 37, 192 },
- { 55, 38, 70, 124, 73, 102, 1, 34, 98 } },
- { { 125, 98, 42, 88, 104, 85, 117, 175, 82 },
- { 95, 84, 53, 89, 128, 100, 113, 101, 45 },
- { 75, 79, 123, 47, 51, 128, 81, 171, 1 },
- { 57, 17, 5, 71, 102, 57, 53, 41, 49 },
- { 38, 33, 13, 121, 57, 73, 26, 1, 85 },
- { 41, 10, 67, 138, 77, 110, 90, 47, 114 },
- { 115, 21, 2, 10, 102, 255, 166, 23, 6 },
- { 101, 29, 16, 10, 85, 128, 101, 196, 26 },
- { 57, 18, 10, 102, 102, 213, 34, 20, 43 },
- { 117, 20, 15, 36, 163, 128, 68, 1, 26 } },
- { { 102, 61, 71, 37, 34, 53, 31, 243, 192 },
- { 69, 60, 71, 38, 73, 119, 28, 222, 37 },
- { 68, 45, 128, 34, 1, 47, 11, 245, 171 },
- { 62, 17, 19, 70, 146, 85, 55, 62, 70 },
- { 37, 43, 37, 154, 100, 163, 85, 160, 1 },
- { 63, 9, 92, 136, 28, 64, 32, 201, 85 },
- { 75, 15, 9, 9, 64, 255, 184, 119, 16 },
- { 86, 6, 28, 5, 64, 255, 25, 248, 1 },
- { 56, 8, 17, 132, 137, 255, 55, 116, 128 },
- { 58, 15, 20, 82, 135, 57, 26, 121, 40 } },
- { { 164, 50, 31, 137, 154, 133, 25, 35, 218 },
- { 51, 103, 44, 131, 131, 123, 31, 6, 158 },
- { 86, 40, 64, 135, 148, 224, 45, 183, 128 },
- { 22, 26, 17, 131, 240, 154, 14, 1, 209 },
- { 45, 16, 21, 91, 64, 222, 7, 1, 197 },
- { 56, 21, 39, 155, 60, 138, 23, 102, 213 },
- { 83, 12, 13, 54, 192, 255, 68, 47, 28 },
- { 85, 26, 85, 85, 128, 128, 32, 146, 171 },
- { 18, 11, 7, 63, 144, 171, 4, 4, 246 },
- { 35, 27, 10, 146, 174, 171, 12, 26, 128 } },
- { { 190, 80, 35, 99, 180, 80, 126, 54, 45 },
- { 85, 126, 47, 87, 176, 51, 41, 20, 32 },
- { 101, 75, 128, 139, 118, 146, 116, 128, 85 },
- { 56, 41, 15, 176, 236, 85, 37, 9, 62 },
- { 71, 30, 17, 119, 118, 255, 17, 18, 138 },
- { 101, 38, 60, 138, 55, 70, 43, 26, 142 },
- { 146, 36, 19, 30, 171, 255, 97, 27, 20 },
- { 138, 45, 61, 62, 219, 1, 81, 188, 64 },
- { 32, 41, 20, 117, 151, 142, 20, 21, 163 },
- { 112, 19, 12, 61, 195, 128, 48, 4, 24 } }
-};
-
-static int PutI4Mode(VP8BitWriter* const bw, int mode,
- const uint8_t* const prob) {
- if (VP8PutBit(bw, mode != B_DC_PRED, prob[0])) {
- if (VP8PutBit(bw, mode != B_TM_PRED, prob[1])) {
- if (VP8PutBit(bw, mode != B_VE_PRED, prob[2])) {
- if (!VP8PutBit(bw, mode >= B_LD_PRED, prob[3])) {
- if (VP8PutBit(bw, mode != B_HE_PRED, prob[4])) {
- VP8PutBit(bw, mode != B_RD_PRED, prob[5]);
- }
- } else {
- if (VP8PutBit(bw, mode != B_LD_PRED, prob[6])) {
- if (VP8PutBit(bw, mode != B_VL_PRED, prob[7])) {
- VP8PutBit(bw, mode != B_HD_PRED, prob[8]);
- }
- }
- }
- }
- }
- }
- return mode;
-}
-
-static void PutI16Mode(VP8BitWriter* const bw, int mode) {
- if (VP8PutBit(bw, (mode == TM_PRED || mode == H_PRED), 156)) {
- VP8PutBit(bw, mode == TM_PRED, 128); // TM or HE
- } else {
- VP8PutBit(bw, mode == V_PRED, 163); // VE or DC
- }
-}
-
-static void PutUVMode(VP8BitWriter* const bw, int uv_mode) {
- if (VP8PutBit(bw, uv_mode != DC_PRED, 142)) {
- if (VP8PutBit(bw, uv_mode != V_PRED, 114)) {
- VP8PutBit(bw, uv_mode != H_PRED, 183); // else: TM_PRED
- }
- }
-}
-
-static void PutSegment(VP8BitWriter* const bw, int s, const uint8_t* p) {
- if (VP8PutBit(bw, s >= 2, p[0])) p += 1;
- VP8PutBit(bw, s & 1, p[1]);
-}
-
-void VP8CodeIntraModes(VP8Encoder* const enc) {
- VP8BitWriter* const bw = &enc->bw_;
- VP8EncIterator it;
- VP8IteratorInit(enc, &it);
- do {
- const VP8MBInfo* mb = it.mb_;
- const uint8_t* preds = it.preds_;
- if (enc->segment_hdr_.update_map_) {
- PutSegment(bw, mb->segment_, enc->proba_.segments_);
- }
- if (enc->proba_.use_skip_proba_) {
- VP8PutBit(bw, mb->skip_, enc->proba_.skip_proba_);
- }
- if (VP8PutBit(bw, (mb->type_ != 0), 145)) { // i16x16
- PutI16Mode(bw, preds[0]);
- } else {
- const int preds_w = enc->preds_w_;
- const uint8_t* top_pred = preds - preds_w;
- int x, y;
- for (y = 0; y < 4; ++y) {
- int left = preds[-1];
- for (x = 0; x < 4; ++x) {
- const uint8_t* const probas = kBModesProba[top_pred[x]][left];
- left = PutI4Mode(bw, preds[x], probas);
- }
- top_pred = preds;
- preds += preds_w;
- }
- }
- PutUVMode(bw, mb->uv_mode_);
- } while (VP8IteratorNext(&it, 0));
-}
-
-//------------------------------------------------------------------------------
-// Paragraph 13
-
-const uint8_t
- VP8CoeffsUpdateProba[NUM_TYPES][NUM_BANDS][NUM_CTX][NUM_PROBAS] = {
- { { { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
- { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
- { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }
- },
- { { 176, 246, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
- { 223, 241, 252, 255, 255, 255, 255, 255, 255, 255, 255 },
- { 249, 253, 253, 255, 255, 255, 255, 255, 255, 255, 255 }
- },
- { { 255, 244, 252, 255, 255, 255, 255, 255, 255, 255, 255 },
- { 234, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255 },
- { 253, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }
- },
- { { 255, 246, 254, 255, 255, 255, 255, 255, 255, 255, 255 },
- { 239, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255 },
- { 254, 255, 254, 255, 255, 255, 255, 255, 255, 255, 255 }
- },
- { { 255, 248, 254, 255, 255, 255, 255, 255, 255, 255, 255 },
- { 251, 255, 254, 255, 255, 255, 255, 255, 255, 255, 255 },
- { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }
- },
- { { 255, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255 },
- { 251, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255 },
- { 254, 255, 254, 255, 255, 255, 255, 255, 255, 255, 255 }
- },
- { { 255, 254, 253, 255, 254, 255, 255, 255, 255, 255, 255 },
- { 250, 255, 254, 255, 254, 255, 255, 255, 255, 255, 255 },
- { 254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }
- },
- { { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
- { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
- { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }
- }
- },
- { { { 217, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
- { 225, 252, 241, 253, 255, 255, 254, 255, 255, 255, 255 },
- { 234, 250, 241, 250, 253, 255, 253, 254, 255, 255, 255 }
- },
- { { 255, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
- { 223, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255 },
- { 238, 253, 254, 254, 255, 255, 255, 255, 255, 255, 255 }
- },
- { { 255, 248, 254, 255, 255, 255, 255, 255, 255, 255, 255 },
- { 249, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
- { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }
- },
- { { 255, 253, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
- { 247, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
- { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }
- },
- { { 255, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255 },
- { 252, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
- { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }
- },
- { { 255, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255 },
- { 253, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
- { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }
- },
- { { 255, 254, 253, 255, 255, 255, 255, 255, 255, 255, 255 },
- { 250, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
- { 254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }
- },
- { { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
- { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
- { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }
- }
- },
- { { { 186, 251, 250, 255, 255, 255, 255, 255, 255, 255, 255 },
- { 234, 251, 244, 254, 255, 255, 255, 255, 255, 255, 255 },
- { 251, 251, 243, 253, 254, 255, 254, 255, 255, 255, 255 }
- },
- { { 255, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255 },
- { 236, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255 },
- { 251, 253, 253, 254, 254, 255, 255, 255, 255, 255, 255 }
- },
- { { 255, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255 },
- { 254, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255 },
- { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }
- },
- { { 255, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
- { 254, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
- { 254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }
- },
- { { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
- { 254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
- { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }
- },
- { { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
- { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
- { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }
- },
- { { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
- { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
- { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }
- },
- { { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
- { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
- { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }
- }
- },
- { { { 248, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
- { 250, 254, 252, 254, 255, 255, 255, 255, 255, 255, 255 },
- { 248, 254, 249, 253, 255, 255, 255, 255, 255, 255, 255 }
- },
- { { 255, 253, 253, 255, 255, 255, 255, 255, 255, 255, 255 },
- { 246, 253, 253, 255, 255, 255, 255, 255, 255, 255, 255 },
- { 252, 254, 251, 254, 254, 255, 255, 255, 255, 255, 255 }
- },
- { { 255, 254, 252, 255, 255, 255, 255, 255, 255, 255, 255 },
- { 248, 254, 253, 255, 255, 255, 255, 255, 255, 255, 255 },
- { 253, 255, 254, 254, 255, 255, 255, 255, 255, 255, 255 }
- },
- { { 255, 251, 254, 255, 255, 255, 255, 255, 255, 255, 255 },
- { 245, 251, 254, 255, 255, 255, 255, 255, 255, 255, 255 },
- { 253, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255 }
- },
- { { 255, 251, 253, 255, 255, 255, 255, 255, 255, 255, 255 },
- { 252, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255 },
- { 255, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255 }
- },
- { { 255, 252, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
- { 249, 255, 254, 255, 255, 255, 255, 255, 255, 255, 255 },
- { 255, 255, 254, 255, 255, 255, 255, 255, 255, 255, 255 }
- },
- { { 255, 255, 253, 255, 255, 255, 255, 255, 255, 255, 255 },
- { 250, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
- { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }
- },
- { { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
- { 254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
- { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }
- }
- }
-};
-
-void VP8WriteProbas(VP8BitWriter* const bw, const VP8Proba* const probas) {
- int t, b, c, p;
- for (t = 0; t < NUM_TYPES; ++t) {
- for (b = 0; b < NUM_BANDS; ++b) {
- for (c = 0; c < NUM_CTX; ++c) {
- for (p = 0; p < NUM_PROBAS; ++p) {
- const uint8_t p0 = probas->coeffs_[t][b][c][p];
- const int update = (p0 != VP8CoeffsProba0[t][b][c][p]);
- if (VP8PutBit(bw, update, VP8CoeffsUpdateProba[t][b][c][p])) {
- VP8PutValue(bw, p0, 8);
- }
- }
- }
- }
- }
- if (VP8PutBitUniform(bw, probas->use_skip_proba_)) {
- VP8PutValue(bw, probas->skip_proba_, 8);
- }
-}
-
-#if defined(__cplusplus) || defined(c_plusplus)
-} // extern "C"
-#endif
diff --git a/drivers/webpold/enc/vp8enci.h b/drivers/webpold/enc/vp8enci.h
deleted file mode 100644
index 936e1c18ce..0000000000
--- a/drivers/webpold/enc/vp8enci.h
+++ /dev/null
@@ -1,525 +0,0 @@
-// Copyright 2011 Google Inc. All Rights Reserved.
-//
-// This code is licensed under the same terms as WebM:
-// Software License Agreement: http://www.webmproject.org/license/software/
-// Additional IP Rights Grant: http://www.webmproject.org/license/additional/
-// -----------------------------------------------------------------------------
-//
-// WebP encoder: internal header.
-//
-// Author: Skal (pascal.massimino@gmail.com)
-
-#ifndef WEBP_ENC_VP8ENCI_H_
-#define WEBP_ENC_VP8ENCI_H_
-
-#include <string.h> // for memcpy()
-#include "../encode.h"
-#include "../dsp/dsp.h"
-#include "../utils/bit_writer.h"
-
-#if defined(__cplusplus) || defined(c_plusplus)
-extern "C" {
-#endif
-
-//------------------------------------------------------------------------------
-// Various defines and enums
-
-// version numbers
-#define ENC_MAJ_VERSION 0
-#define ENC_MIN_VERSION 2
-#define ENC_REV_VERSION 0
-
-// size of histogram used by CollectHistogram.
-#define MAX_COEFF_THRESH 64
-
-// intra prediction modes
-enum { B_DC_PRED = 0, // 4x4 modes
- B_TM_PRED = 1,
- B_VE_PRED = 2,
- B_HE_PRED = 3,
- B_RD_PRED = 4,
- B_VR_PRED = 5,
- B_LD_PRED = 6,
- B_VL_PRED = 7,
- B_HD_PRED = 8,
- B_HU_PRED = 9,
- NUM_BMODES = B_HU_PRED + 1 - B_DC_PRED, // = 10
-
- // Luma16 or UV modes
- DC_PRED = B_DC_PRED, V_PRED = B_VE_PRED,
- H_PRED = B_HE_PRED, TM_PRED = B_TM_PRED
- };
-
-enum { NUM_MB_SEGMENTS = 4,
- MAX_NUM_PARTITIONS = 8,
- NUM_TYPES = 4, // 0: i16-AC, 1: i16-DC, 2:chroma-AC, 3:i4-AC
- NUM_BANDS = 8,
- NUM_CTX = 3,
- NUM_PROBAS = 11,
- MAX_LF_LEVELS = 64, // Maximum loop filter level
- MAX_VARIABLE_LEVEL = 67 // last (inclusive) level with variable cost
- };
-
-// YUV-cache parameters. Cache is 16-pixels wide.
-// The original or reconstructed samples can be accessed using VP8Scan[]
-// The predicted blocks can be accessed using offsets to yuv_p_ and
-// the arrays VP8*ModeOffsets[];
-// +----+ YUV Samples area. See VP8Scan[] for accessing the blocks.
-// Y_OFF |YYYY| <- original samples (enc->yuv_in_)
-// |YYYY|
-// |YYYY|
-// |YYYY|
-// U_OFF |UUVV| V_OFF (=U_OFF + 8)
-// |UUVV|
-// +----+
-// Y_OFF |YYYY| <- compressed/decoded samples ('yuv_out_')
-// |YYYY| There are two buffers like this ('yuv_out_'/'yuv_out2_')
-// |YYYY|
-// |YYYY|
-// U_OFF |UUVV| V_OFF
-// |UUVV|
-// x2 (for yuv_out2_)
-// +----+ Prediction area ('yuv_p_', size = PRED_SIZE)
-// I16DC16 |YYYY| Intra16 predictions (16x16 block each)
-// |YYYY|
-// |YYYY|
-// |YYYY|
-// I16TM16 |YYYY|
-// |YYYY|
-// |YYYY|
-// |YYYY|
-// I16VE16 |YYYY|
-// |YYYY|
-// |YYYY|
-// |YYYY|
-// I16HE16 |YYYY|
-// |YYYY|
-// |YYYY|
-// |YYYY|
-// +----+ Chroma U/V predictions (16x8 block each)
-// C8DC8 |UUVV|
-// |UUVV|
-// C8TM8 |UUVV|
-// |UUVV|
-// C8VE8 |UUVV|
-// |UUVV|
-// C8HE8 |UUVV|
-// |UUVV|
-// +----+ Intra 4x4 predictions (4x4 block each)
-// |YYYY| I4DC4 I4TM4 I4VE4 I4HE4
-// |YYYY| I4RD4 I4VR4 I4LD4 I4VL4
-// |YY..| I4HD4 I4HU4 I4TMP
-// +----+
-#define BPS 16 // this is the common stride
-#define Y_SIZE (BPS * 16)
-#define UV_SIZE (BPS * 8)
-#define YUV_SIZE (Y_SIZE + UV_SIZE)
-#define PRED_SIZE (6 * 16 * BPS + 12 * BPS)
-#define Y_OFF (0)
-#define U_OFF (Y_SIZE)
-#define V_OFF (U_OFF + 8)
-#define ALIGN_CST 15
-#define DO_ALIGN(PTR) ((uintptr_t)((PTR) + ALIGN_CST) & ~ALIGN_CST)
-
-extern const int VP8Scan[16 + 4 + 4]; // in quant.c
-extern const int VP8UVModeOffsets[4]; // in analyze.c
-extern const int VP8I16ModeOffsets[4];
-extern const int VP8I4ModeOffsets[NUM_BMODES];
-
-// Layout of prediction blocks
-// intra 16x16
-#define I16DC16 (0 * 16 * BPS)
-#define I16TM16 (1 * 16 * BPS)
-#define I16VE16 (2 * 16 * BPS)
-#define I16HE16 (3 * 16 * BPS)
-// chroma 8x8, two U/V blocks side by side (hence: 16x8 each)
-#define C8DC8 (4 * 16 * BPS)
-#define C8TM8 (4 * 16 * BPS + 8 * BPS)
-#define C8VE8 (5 * 16 * BPS)
-#define C8HE8 (5 * 16 * BPS + 8 * BPS)
-// intra 4x4
-#define I4DC4 (6 * 16 * BPS + 0)
-#define I4TM4 (6 * 16 * BPS + 4)
-#define I4VE4 (6 * 16 * BPS + 8)
-#define I4HE4 (6 * 16 * BPS + 12)
-#define I4RD4 (6 * 16 * BPS + 4 * BPS + 0)
-#define I4VR4 (6 * 16 * BPS + 4 * BPS + 4)
-#define I4LD4 (6 * 16 * BPS + 4 * BPS + 8)
-#define I4VL4 (6 * 16 * BPS + 4 * BPS + 12)
-#define I4HD4 (6 * 16 * BPS + 8 * BPS + 0)
-#define I4HU4 (6 * 16 * BPS + 8 * BPS + 4)
-#define I4TMP (6 * 16 * BPS + 8 * BPS + 8)
-
-typedef int64_t score_t; // type used for scores, rate, distortion
-#define MAX_COST ((score_t)0x7fffffffffffffLL)
-
-#define QFIX 17
-#define BIAS(b) ((b) << (QFIX - 8))
-// Fun fact: this is the _only_ line where we're actually being lossy and
-// discarding bits.
-static WEBP_INLINE int QUANTDIV(int n, int iQ, int B) {
- return (n * iQ + B) >> QFIX;
-}
-extern const uint8_t VP8Zigzag[16];
-
-//------------------------------------------------------------------------------
-// Headers
-
-typedef uint32_t proba_t; // 16b + 16b
-typedef uint8_t ProbaArray[NUM_CTX][NUM_PROBAS];
-typedef proba_t StatsArray[NUM_CTX][NUM_PROBAS];
-typedef uint16_t CostArray[NUM_CTX][MAX_VARIABLE_LEVEL + 1];
-typedef double LFStats[NUM_MB_SEGMENTS][MAX_LF_LEVELS]; // filter stats
-
-typedef struct VP8Encoder VP8Encoder;
-
-// segment features
-typedef struct {
- int num_segments_; // Actual number of segments. 1 segment only = unused.
- int update_map_; // whether to update the segment map or not.
- // must be 0 if there's only 1 segment.
- int size_; // bit-cost for transmitting the segment map
-} VP8SegmentHeader;
-
-// Struct collecting all frame-persistent probabilities.
-typedef struct {
- uint8_t segments_[3]; // probabilities for segment tree
- uint8_t skip_proba_; // final probability of being skipped.
- ProbaArray coeffs_[NUM_TYPES][NUM_BANDS]; // 924 bytes
- StatsArray stats_[NUM_TYPES][NUM_BANDS]; // 4224 bytes
- CostArray level_cost_[NUM_TYPES][NUM_BANDS]; // 11.4k
- int dirty_; // if true, need to call VP8CalculateLevelCosts()
- int use_skip_proba_; // Note: we always use skip_proba for now.
- int nb_skip_; // number of skipped blocks
-} VP8Proba;
-
-// Filter parameters. Not actually used in the code (we don't perform
-// the in-loop filtering), but filled from user's config
-typedef struct {
- int simple_; // filtering type: 0=complex, 1=simple
- int level_; // base filter level [0..63]
- int sharpness_; // [0..7]
- int i4x4_lf_delta_; // delta filter level for i4x4 relative to i16x16
-} VP8FilterHeader;
-
-//------------------------------------------------------------------------------
-// Informations about the macroblocks.
-
-typedef struct {
- // block type
- unsigned int type_:2; // 0=i4x4, 1=i16x16
- unsigned int uv_mode_:2;
- unsigned int skip_:1;
- unsigned int segment_:2;
- uint8_t alpha_; // quantization-susceptibility
-} VP8MBInfo;
-
-typedef struct VP8Matrix {
- uint16_t q_[16]; // quantizer steps
- uint16_t iq_[16]; // reciprocals, fixed point.
- uint16_t bias_[16]; // rounding bias
- uint16_t zthresh_[16]; // value under which a coefficient is zeroed
- uint16_t sharpen_[16]; // frequency boosters for slight sharpening
-} VP8Matrix;
-
-typedef struct {
- VP8Matrix y1_, y2_, uv_; // quantization matrices
- int alpha_; // quant-susceptibility, range [-127,127]. Zero is neutral.
- // Lower values indicate a lower risk of blurriness.
- int beta_; // filter-susceptibility, range [0,255].
- int quant_; // final segment quantizer.
- int fstrength_; // final in-loop filtering strength
- // reactivities
- int lambda_i16_, lambda_i4_, lambda_uv_;
- int lambda_mode_, lambda_trellis_, tlambda_;
- int lambda_trellis_i16_, lambda_trellis_i4_, lambda_trellis_uv_;
-} VP8SegmentInfo;
-
-// Handy transcient struct to accumulate score and info during RD-optimization
-// and mode evaluation.
-typedef struct {
- score_t D, SD, R, score; // Distortion, spectral distortion, rate, score.
- int16_t y_dc_levels[16]; // Quantized levels for luma-DC, luma-AC, chroma.
- int16_t y_ac_levels[16][16];
- int16_t uv_levels[4 + 4][16];
- int mode_i16; // mode number for intra16 prediction
- uint8_t modes_i4[16]; // mode numbers for intra4 predictions
- int mode_uv; // mode number of chroma prediction
- uint32_t nz; // non-zero blocks
-} VP8ModeScore;
-
-// Iterator structure to iterate through macroblocks, pointing to the
-// right neighbouring data (samples, predictions, contexts, ...)
-typedef struct {
- int x_, y_; // current macroblock
- int y_offset_, uv_offset_; // offset to the luma / chroma planes
- int y_stride_, uv_stride_; // respective strides
- uint8_t* yuv_in_; // borrowed from enc_ (for now)
- uint8_t* yuv_out_; // ''
- uint8_t* yuv_out2_; // ''
- uint8_t* yuv_p_; // ''
- VP8Encoder* enc_; // back-pointer
- VP8MBInfo* mb_; // current macroblock
- VP8BitWriter* bw_; // current bit-writer
- uint8_t* preds_; // intra mode predictors (4x4 blocks)
- uint32_t* nz_; // non-zero pattern
- uint8_t i4_boundary_[37]; // 32+5 boundary samples needed by intra4x4
- uint8_t* i4_top_; // pointer to the current top boundary sample
- int i4_; // current intra4x4 mode being tested
- int top_nz_[9]; // top-non-zero context.
- int left_nz_[9]; // left-non-zero. left_nz[8] is independent.
- uint64_t bit_count_[4][3]; // bit counters for coded levels.
- uint64_t luma_bits_; // macroblock bit-cost for luma
- uint64_t uv_bits_; // macroblock bit-cost for chroma
- LFStats* lf_stats_; // filter stats (borrowed from enc_)
- int do_trellis_; // if true, perform extra level optimisation
- int done_; // true when scan is finished
- int percent0_; // saved initial progress percent
-} VP8EncIterator;
-
- // in iterator.c
-// must be called first.
-void VP8IteratorInit(VP8Encoder* const enc, VP8EncIterator* const it);
-// restart a scan.
-void VP8IteratorReset(VP8EncIterator* const it);
-// import samples from source
-void VP8IteratorImport(const VP8EncIterator* const it);
-// export decimated samples
-void VP8IteratorExport(const VP8EncIterator* const it);
-// go to next macroblock. Returns !done_. If *block_to_save is non-null, will
-// save the boundary values to top_/left_ arrays. block_to_save can be
-// it->yuv_out_ or it->yuv_in_.
-int VP8IteratorNext(VP8EncIterator* const it,
- const uint8_t* const block_to_save);
-// Report progression based on macroblock rows. Return 0 for user-abort request.
-int VP8IteratorProgress(const VP8EncIterator* const it,
- int final_delta_percent);
-// Intra4x4 iterations
-void VP8IteratorStartI4(VP8EncIterator* const it);
-// returns true if not done.
-int VP8IteratorRotateI4(VP8EncIterator* const it,
- const uint8_t* const yuv_out);
-
-// Non-zero context setup/teardown
-void VP8IteratorNzToBytes(VP8EncIterator* const it);
-void VP8IteratorBytesToNz(VP8EncIterator* const it);
-
-// Helper functions to set mode properties
-void VP8SetIntra16Mode(const VP8EncIterator* const it, int mode);
-void VP8SetIntra4Mode(const VP8EncIterator* const it, const uint8_t* modes);
-void VP8SetIntraUVMode(const VP8EncIterator* const it, int mode);
-void VP8SetSkip(const VP8EncIterator* const it, int skip);
-void VP8SetSegment(const VP8EncIterator* const it, int segment);
-
-//------------------------------------------------------------------------------
-// Paginated token buffer
-
-// WIP: #define USE_TOKEN_BUFFER
-
-#ifdef USE_TOKEN_BUFFER
-
-#define MAX_NUM_TOKEN 2048
-
-typedef struct VP8Tokens VP8Tokens;
-struct VP8Tokens {
- uint16_t tokens_[MAX_NUM_TOKEN]; // bit#15: bit, bits 0..14: slot
- int left_;
- VP8Tokens* next_;
-};
-
-typedef struct {
- VP8Tokens* rows_;
- uint16_t* tokens_; // set to (*last_)->tokens_
- VP8Tokens** last_;
- int left_;
- int error_; // true in case of malloc error
-} VP8TBuffer;
-
-void VP8TBufferInit(VP8TBuffer* const b); // initialize an empty buffer
-int VP8TBufferNewPage(VP8TBuffer* const b); // allocate a new page
-void VP8TBufferClear(VP8TBuffer* const b); // de-allocate memory
-
-int VP8EmitTokens(const VP8TBuffer* const b, VP8BitWriter* const bw,
- const uint8_t* const probas);
-
-static WEBP_INLINE int VP8AddToken(VP8TBuffer* const b,
- int bit, int proba_idx) {
- if (b->left_ > 0 || VP8TBufferNewPage(b)) {
- const int slot = --b->left_;
- b->tokens_[slot] = (bit << 15) | proba_idx;
- }
- return bit;
-}
-
-#endif // USE_TOKEN_BUFFER
-
-//------------------------------------------------------------------------------
-// VP8Encoder
-
-struct VP8Encoder {
- const WebPConfig* config_; // user configuration and parameters
- WebPPicture* pic_; // input / output picture
-
- // headers
- VP8FilterHeader filter_hdr_; // filtering information
- VP8SegmentHeader segment_hdr_; // segment information
-
- int profile_; // VP8's profile, deduced from Config.
-
- // dimension, in macroblock units.
- int mb_w_, mb_h_;
- int preds_w_; // stride of the *preds_ prediction plane (=4*mb_w + 1)
-
- // number of partitions (1, 2, 4 or 8 = MAX_NUM_PARTITIONS)
- int num_parts_;
-
- // per-partition boolean decoders.
- VP8BitWriter bw_; // part0
- VP8BitWriter parts_[MAX_NUM_PARTITIONS]; // token partitions
-
- int percent_; // for progress
-
- // transparency blob
- int has_alpha_;
- uint8_t* alpha_data_; // non-NULL if transparency is present
- uint32_t alpha_data_size_;
-
- // enhancement layer
- int use_layer_;
- VP8BitWriter layer_bw_;
- uint8_t* layer_data_;
- size_t layer_data_size_;
-
- // quantization info (one set of DC/AC dequant factor per segment)
- VP8SegmentInfo dqm_[NUM_MB_SEGMENTS];
- int base_quant_; // nominal quantizer value. Only used
- // for relative coding of segments' quant.
- int uv_alpha_; // U/V quantization susceptibility
- // global offset of quantizers, shared by all segments
- int dq_y1_dc_;
- int dq_y2_dc_, dq_y2_ac_;
- int dq_uv_dc_, dq_uv_ac_;
-
- // probabilities and statistics
- VP8Proba proba_;
- uint64_t sse_[4]; // sum of Y/U/V/A squared errors for all macroblocks
- uint64_t sse_count_; // pixel count for the sse_[] stats
- int coded_size_;
- int residual_bytes_[3][4];
- int block_count_[3];
-
- // quality/speed settings
- int method_; // 0=fastest, 6=best/slowest.
- int rd_opt_level_; // Deduced from method_.
- int max_i4_header_bits_; // partition #0 safeness factor
-
- // Memory
- VP8MBInfo* mb_info_; // contextual macroblock infos (mb_w_ + 1)
- uint8_t* preds_; // predictions modes: (4*mb_w+1) * (4*mb_h+1)
- uint32_t* nz_; // non-zero bit context: mb_w+1
- uint8_t* yuv_in_; // input samples
- uint8_t* yuv_out_; // output samples
- uint8_t* yuv_out2_; // secondary scratch out-buffer. swapped with yuv_out_.
- uint8_t* yuv_p_; // scratch buffer for prediction
- uint8_t *y_top_; // top luma samples.
- uint8_t *uv_top_; // top u/v samples.
- // U and V are packed into 16 pixels (8 U + 8 V)
- uint8_t *y_left_; // left luma samples (adressable from index -1 to 15).
- uint8_t *u_left_; // left u samples (adressable from index -1 to 7)
- uint8_t *v_left_; // left v samples (adressable from index -1 to 7)
-
- LFStats *lf_stats_; // autofilter stats (if NULL, autofilter is off)
-};
-
-//------------------------------------------------------------------------------
-// internal functions. Not public.
-
- // in tree.c
-extern const uint8_t VP8CoeffsProba0[NUM_TYPES][NUM_BANDS][NUM_CTX][NUM_PROBAS];
-extern const uint8_t
- VP8CoeffsUpdateProba[NUM_TYPES][NUM_BANDS][NUM_CTX][NUM_PROBAS];
-// Reset the token probabilities to their initial (default) values
-void VP8DefaultProbas(VP8Encoder* const enc);
-// Write the token probabilities
-void VP8WriteProbas(VP8BitWriter* const bw, const VP8Proba* const probas);
-// Writes the partition #0 modes (that is: all intra modes)
-void VP8CodeIntraModes(VP8Encoder* const enc);
-
- // in syntax.c
-// Generates the final bitstream by coding the partition0 and headers,
-// and appending an assembly of all the pre-coded token partitions.
-// Return true if everything is ok.
-int VP8EncWrite(VP8Encoder* const enc);
-// Release memory allocated for bit-writing in VP8EncLoop & seq.
-void VP8EncFreeBitWriters(VP8Encoder* const enc);
-
- // in frame.c
-extern const uint8_t VP8EncBands[16 + 1];
-// Form all the four Intra16x16 predictions in the yuv_p_ cache
-void VP8MakeLuma16Preds(const VP8EncIterator* const it);
-// Form all the four Chroma8x8 predictions in the yuv_p_ cache
-void VP8MakeChroma8Preds(const VP8EncIterator* const it);
-// Form all the ten Intra4x4 predictions in the yuv_p_ cache
-// for the 4x4 block it->i4_
-void VP8MakeIntra4Preds(const VP8EncIterator* const it);
-// Rate calculation
-int VP8GetCostLuma16(VP8EncIterator* const it, const VP8ModeScore* const rd);
-int VP8GetCostLuma4(VP8EncIterator* const it, const int16_t levels[16]);
-int VP8GetCostUV(VP8EncIterator* const it, const VP8ModeScore* const rd);
-// Main stat / coding passes
-int VP8EncLoop(VP8Encoder* const enc);
-int VP8StatLoop(VP8Encoder* const enc);
-
- // in webpenc.c
-// Assign an error code to a picture. Return false for convenience.
-int WebPEncodingSetError(const WebPPicture* const pic, WebPEncodingError error);
-int WebPReportProgress(const WebPPicture* const pic,
- int percent, int* const percent_store);
-
- // in analysis.c
-// Main analysis loop. Decides the segmentations and complexity.
-// Assigns a first guess for Intra16 and uvmode_ prediction modes.
-int VP8EncAnalyze(VP8Encoder* const enc);
-
- // in quant.c
-// Sets up segment's quantization values, base_quant_ and filter strengths.
-void VP8SetSegmentParams(VP8Encoder* const enc, float quality);
-// Pick best modes and fills the levels. Returns true if skipped.
-int VP8Decimate(VP8EncIterator* const it, VP8ModeScore* const rd, int rd_opt);
-
- // in alpha.c
-void VP8EncInitAlpha(VP8Encoder* const enc); // initialize alpha compression
-int VP8EncFinishAlpha(VP8Encoder* const enc); // finalize compressed data
-void VP8EncDeleteAlpha(VP8Encoder* const enc); // delete compressed data
-
- // in layer.c
-void VP8EncInitLayer(VP8Encoder* const enc); // init everything
-void VP8EncCodeLayerBlock(VP8EncIterator* it); // code one more macroblock
-int VP8EncFinishLayer(VP8Encoder* const enc); // finalize coding
-void VP8EncDeleteLayer(VP8Encoder* enc); // reclaim memory
-
- // in filter.c
-
-// SSIM utils
-typedef struct {
- double w, xm, ym, xxm, xym, yym;
-} DistoStats;
-void VP8SSIMAddStats(const DistoStats* const src, DistoStats* const dst);
-void VP8SSIMAccumulatePlane(const uint8_t* src1, int stride1,
- const uint8_t* src2, int stride2,
- int W, int H, DistoStats* const stats);
-double VP8SSIMGet(const DistoStats* const stats);
-double VP8SSIMGetSquaredError(const DistoStats* const stats);
-
-// autofilter
-void VP8InitFilter(VP8EncIterator* const it);
-void VP8StoreFilterStats(VP8EncIterator* const it);
-void VP8AdjustFilterStrength(VP8EncIterator* const it);
-
-//------------------------------------------------------------------------------
-
-#if defined(__cplusplus) || defined(c_plusplus)
-} // extern "C"
-#endif
-
-#endif /* WEBP_ENC_VP8ENCI_H_ */
diff --git a/drivers/webpold/enc/vp8l.c b/drivers/webpold/enc/vp8l.c
deleted file mode 100644
index f4eb6e783f..0000000000
--- a/drivers/webpold/enc/vp8l.c
+++ /dev/null
@@ -1,1150 +0,0 @@
-// Copyright 2012 Google Inc. All Rights Reserved.
-//
-// This code is licensed under the same terms as WebM:
-// Software License Agreement: http://www.webmproject.org/license/software/
-// Additional IP Rights Grant: http://www.webmproject.org/license/additional/
-// -----------------------------------------------------------------------------
-//
-// main entry for the lossless encoder.
-//
-// Author: Vikas Arora (vikaas.arora@gmail.com)
-//
-
-#include <assert.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-#include "./backward_references.h"
-#include "./vp8enci.h"
-#include "./vp8li.h"
-#include "../dsp/lossless.h"
-#include "../utils/bit_writer.h"
-#include "../utils/huffman_encode.h"
-#include "../utils/utils.h"
-#include "../format_constants.h"
-
-#if defined(__cplusplus) || defined(c_plusplus)
-extern "C" {
-#endif
-
-#define PALETTE_KEY_RIGHT_SHIFT 22 // Key for 1K buffer.
-#define MAX_HUFF_IMAGE_SIZE (16 * 1024 * 1024)
-#define MAX_COLORS_FOR_GRAPH 64
-
-// -----------------------------------------------------------------------------
-// Palette
-
-static int CompareColors(const void* p1, const void* p2) {
- const uint32_t a = *(const uint32_t*)p1;
- const uint32_t b = *(const uint32_t*)p2;
- return (a < b) ? -1 : (a > b) ? 1 : 0;
-}
-
-// If number of colors in the image is less than or equal to MAX_PALETTE_SIZE,
-// creates a palette and returns true, else returns false.
-static int AnalyzeAndCreatePalette(const WebPPicture* const pic,
- uint32_t palette[MAX_PALETTE_SIZE],
- int* const palette_size) {
- int i, x, y, key;
- int num_colors = 0;
- uint8_t in_use[MAX_PALETTE_SIZE * 4] = { 0 };
- uint32_t colors[MAX_PALETTE_SIZE * 4];
- static const uint32_t kHashMul = 0x1e35a7bd;
- const uint32_t* argb = pic->argb;
- const int width = pic->width;
- const int height = pic->height;
- uint32_t last_pix = ~argb[0]; // so we're sure that last_pix != argb[0]
-
- for (y = 0; y < height; ++y) {
- for (x = 0; x < width; ++x) {
- if (argb[x] == last_pix) {
- continue;
- }
- last_pix = argb[x];
- key = (kHashMul * last_pix) >> PALETTE_KEY_RIGHT_SHIFT;
- while (1) {
- if (!in_use[key]) {
- colors[key] = last_pix;
- in_use[key] = 1;
- ++num_colors;
- if (num_colors > MAX_PALETTE_SIZE) {
- return 0;
- }
- break;
- } else if (colors[key] == last_pix) {
- // The color is already there.
- break;
- } else {
- // Some other color sits there.
- // Do linear conflict resolution.
- ++key;
- key &= (MAX_PALETTE_SIZE * 4 - 1); // key mask for 1K buffer.
- }
- }
- }
- argb += pic->argb_stride;
- }
-
- // TODO(skal): could we reuse in_use[] to speed up ApplyPalette()?
- num_colors = 0;
- for (i = 0; i < (int)(sizeof(in_use) / sizeof(in_use[0])); ++i) {
- if (in_use[i]) {
- palette[num_colors] = colors[i];
- ++num_colors;
- }
- }
-
- qsort(palette, num_colors, sizeof(*palette), CompareColors);
- *palette_size = num_colors;
- return 1;
-}
-
-static int AnalyzeEntropy(const uint32_t* argb,
- int width, int height, int argb_stride,
- double* const nonpredicted_bits,
- double* const predicted_bits) {
- int x, y;
- const uint32_t* last_line = NULL;
- uint32_t last_pix = argb[0]; // so we're sure that pix_diff == 0
-
- VP8LHistogram* nonpredicted = NULL;
- VP8LHistogram* predicted =
- (VP8LHistogram*)malloc(2 * sizeof(*predicted));
- if (predicted == NULL) return 0;
- nonpredicted = predicted + 1;
-
- VP8LHistogramInit(predicted, 0);
- VP8LHistogramInit(nonpredicted, 0);
- for (y = 0; y < height; ++y) {
- for (x = 0; x < width; ++x) {
- const uint32_t pix = argb[x];
- const uint32_t pix_diff = VP8LSubPixels(pix, last_pix);
- if (pix_diff == 0) continue;
- if (last_line != NULL && pix == last_line[x]) {
- continue;
- }
- last_pix = pix;
- {
- const PixOrCopy pix_token = PixOrCopyCreateLiteral(pix);
- const PixOrCopy pix_diff_token = PixOrCopyCreateLiteral(pix_diff);
- VP8LHistogramAddSinglePixOrCopy(nonpredicted, &pix_token);
- VP8LHistogramAddSinglePixOrCopy(predicted, &pix_diff_token);
- }
- }
- last_line = argb;
- argb += argb_stride;
- }
- *nonpredicted_bits = VP8LHistogramEstimateBitsBulk(nonpredicted);
- *predicted_bits = VP8LHistogramEstimateBitsBulk(predicted);
- free(predicted);
- return 1;
-}
-
-static int VP8LEncAnalyze(VP8LEncoder* const enc, WebPImageHint image_hint) {
- const WebPPicture* const pic = enc->pic_;
- assert(pic != NULL && pic->argb != NULL);
-
- enc->use_palette_ =
- AnalyzeAndCreatePalette(pic, enc->palette_, &enc->palette_size_);
-
- if (image_hint == WEBP_HINT_GRAPH) {
- if (enc->use_palette_ && enc->palette_size_ < MAX_COLORS_FOR_GRAPH) {
- enc->use_palette_ = 0;
- }
- }
-
- if (!enc->use_palette_) {
- if (image_hint == WEBP_HINT_PHOTO) {
- enc->use_predict_ = 1;
- enc->use_cross_color_ = 1;
- } else {
- double non_pred_entropy, pred_entropy;
- if (!AnalyzeEntropy(pic->argb, pic->width, pic->height, pic->argb_stride,
- &non_pred_entropy, &pred_entropy)) {
- return 0;
- }
- if (pred_entropy < 0.95 * non_pred_entropy) {
- enc->use_predict_ = 1;
- // TODO(vikasa): Observed some correlation of cross_color transform with
- // predict. Need to investigate this further and add separate heuristic
- // for setting use_cross_color flag.
- enc->use_cross_color_ = 1;
- }
- }
- }
-
- return 1;
-}
-
-static int GetHuffBitLengthsAndCodes(
- const VP8LHistogramSet* const histogram_image,
- HuffmanTreeCode* const huffman_codes) {
- int i, k;
- int ok = 1;
- uint64_t total_length_size = 0;
- uint8_t* mem_buf = NULL;
- const int histogram_image_size = histogram_image->size;
-
- // Iterate over all histograms and get the aggregate number of codes used.
- for (i = 0; i < histogram_image_size; ++i) {
- const VP8LHistogram* const histo = histogram_image->histograms[i];
- HuffmanTreeCode* const codes = &huffman_codes[5 * i];
- for (k = 0; k < 5; ++k) {
- const int num_symbols = (k == 0) ? VP8LHistogramNumCodes(histo)
- : (k == 4) ? NUM_DISTANCE_CODES
- : 256;
- codes[k].num_symbols = num_symbols;
- total_length_size += num_symbols;
- }
- }
-
- // Allocate and Set Huffman codes.
- {
- uint16_t* codes;
- uint8_t* lengths;
- mem_buf = (uint8_t*)WebPSafeCalloc(total_length_size,
- sizeof(*lengths) + sizeof(*codes));
- if (mem_buf == NULL) {
- ok = 0;
- goto End;
- }
- codes = (uint16_t*)mem_buf;
- lengths = (uint8_t*)&codes[total_length_size];
- for (i = 0; i < 5 * histogram_image_size; ++i) {
- const int bit_length = huffman_codes[i].num_symbols;
- huffman_codes[i].codes = codes;
- huffman_codes[i].code_lengths = lengths;
- codes += bit_length;
- lengths += bit_length;
- }
- }
-
- // Create Huffman trees.
- for (i = 0; i < histogram_image_size; ++i) {
- HuffmanTreeCode* const codes = &huffman_codes[5 * i];
- VP8LHistogram* const histo = histogram_image->histograms[i];
- ok = ok && VP8LCreateHuffmanTree(histo->literal_, 15, codes + 0);
- ok = ok && VP8LCreateHuffmanTree(histo->red_, 15, codes + 1);
- ok = ok && VP8LCreateHuffmanTree(histo->blue_, 15, codes + 2);
- ok = ok && VP8LCreateHuffmanTree(histo->alpha_, 15, codes + 3);
- ok = ok && VP8LCreateHuffmanTree(histo->distance_, 15, codes + 4);
- }
-
- End:
- if (!ok) free(mem_buf);
- return ok;
-}
-
-static void StoreHuffmanTreeOfHuffmanTreeToBitMask(
- VP8LBitWriter* const bw, const uint8_t* code_length_bitdepth) {
- // RFC 1951 will calm you down if you are worried about this funny sequence.
- // This sequence is tuned from that, but more weighted for lower symbol count,
- // and more spiking histograms.
- static const uint8_t kStorageOrder[CODE_LENGTH_CODES] = {
- 17, 18, 0, 1, 2, 3, 4, 5, 16, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15
- };
- int i;
- // Throw away trailing zeros:
- int codes_to_store = CODE_LENGTH_CODES;
- for (; codes_to_store > 4; --codes_to_store) {
- if (code_length_bitdepth[kStorageOrder[codes_to_store - 1]] != 0) {
- break;
- }
- }
- VP8LWriteBits(bw, 4, codes_to_store - 4);
- for (i = 0; i < codes_to_store; ++i) {
- VP8LWriteBits(bw, 3, code_length_bitdepth[kStorageOrder[i]]);
- }
-}
-
-static void ClearHuffmanTreeIfOnlyOneSymbol(
- HuffmanTreeCode* const huffman_code) {
- int k;
- int count = 0;
- for (k = 0; k < huffman_code->num_symbols; ++k) {
- if (huffman_code->code_lengths[k] != 0) {
- ++count;
- if (count > 1) return;
- }
- }
- for (k = 0; k < huffman_code->num_symbols; ++k) {
- huffman_code->code_lengths[k] = 0;
- huffman_code->codes[k] = 0;
- }
-}
-
-static void StoreHuffmanTreeToBitMask(
- VP8LBitWriter* const bw,
- const HuffmanTreeToken* const tokens, const int num_tokens,
- const HuffmanTreeCode* const huffman_code) {
- int i;
- for (i = 0; i < num_tokens; ++i) {
- const int ix = tokens[i].code;
- const int extra_bits = tokens[i].extra_bits;
- VP8LWriteBits(bw, huffman_code->code_lengths[ix], huffman_code->codes[ix]);
- switch (ix) {
- case 16:
- VP8LWriteBits(bw, 2, extra_bits);
- break;
- case 17:
- VP8LWriteBits(bw, 3, extra_bits);
- break;
- case 18:
- VP8LWriteBits(bw, 7, extra_bits);
- break;
- }
- }
-}
-
-static int StoreFullHuffmanCode(VP8LBitWriter* const bw,
- const HuffmanTreeCode* const tree) {
- int ok = 0;
- uint8_t code_length_bitdepth[CODE_LENGTH_CODES] = { 0 };
- uint16_t code_length_bitdepth_symbols[CODE_LENGTH_CODES] = { 0 };
- const int max_tokens = tree->num_symbols;
- int num_tokens;
- HuffmanTreeCode huffman_code;
- HuffmanTreeToken* const tokens =
- (HuffmanTreeToken*)WebPSafeMalloc((uint64_t)max_tokens, sizeof(*tokens));
- if (tokens == NULL) return 0;
-
- huffman_code.num_symbols = CODE_LENGTH_CODES;
- huffman_code.code_lengths = code_length_bitdepth;
- huffman_code.codes = code_length_bitdepth_symbols;
-
- VP8LWriteBits(bw, 1, 0);
- num_tokens = VP8LCreateCompressedHuffmanTree(tree, tokens, max_tokens);
- {
- int histogram[CODE_LENGTH_CODES] = { 0 };
- int i;
- for (i = 0; i < num_tokens; ++i) {
- ++histogram[tokens[i].code];
- }
-
- if (!VP8LCreateHuffmanTree(histogram, 7, &huffman_code)) {
- goto End;
- }
- }
-
- StoreHuffmanTreeOfHuffmanTreeToBitMask(bw, code_length_bitdepth);
- ClearHuffmanTreeIfOnlyOneSymbol(&huffman_code);
- {
- int trailing_zero_bits = 0;
- int trimmed_length = num_tokens;
- int write_trimmed_length;
- int length;
- int i = num_tokens;
- while (i-- > 0) {
- const int ix = tokens[i].code;
- if (ix == 0 || ix == 17 || ix == 18) {
- --trimmed_length; // discount trailing zeros
- trailing_zero_bits += code_length_bitdepth[ix];
- if (ix == 17) {
- trailing_zero_bits += 3;
- } else if (ix == 18) {
- trailing_zero_bits += 7;
- }
- } else {
- break;
- }
- }
- write_trimmed_length = (trimmed_length > 1 && trailing_zero_bits > 12);
- length = write_trimmed_length ? trimmed_length : num_tokens;
- VP8LWriteBits(bw, 1, write_trimmed_length);
- if (write_trimmed_length) {
- const int nbits = VP8LBitsLog2Ceiling(trimmed_length - 1);
- const int nbitpairs = (nbits == 0) ? 1 : (nbits + 1) / 2;
- VP8LWriteBits(bw, 3, nbitpairs - 1);
- assert(trimmed_length >= 2);
- VP8LWriteBits(bw, nbitpairs * 2, trimmed_length - 2);
- }
- StoreHuffmanTreeToBitMask(bw, tokens, length, &huffman_code);
- }
- ok = 1;
- End:
- free(tokens);
- return ok;
-}
-
-static int StoreHuffmanCode(VP8LBitWriter* const bw,
- const HuffmanTreeCode* const huffman_code) {
- int i;
- int count = 0;
- int symbols[2] = { 0, 0 };
- const int kMaxBits = 8;
- const int kMaxSymbol = 1 << kMaxBits;
-
- // Check whether it's a small tree.
- for (i = 0; i < huffman_code->num_symbols && count < 3; ++i) {
- if (huffman_code->code_lengths[i] != 0) {
- if (count < 2) symbols[count] = i;
- ++count;
- }
- }
-
- if (count == 0) { // emit minimal tree for empty cases
- // bits: small tree marker: 1, count-1: 0, large 8-bit code: 0, code: 0
- VP8LWriteBits(bw, 4, 0x01);
- return 1;
- } else if (count <= 2 && symbols[0] < kMaxSymbol && symbols[1] < kMaxSymbol) {
- VP8LWriteBits(bw, 1, 1); // Small tree marker to encode 1 or 2 symbols.
- VP8LWriteBits(bw, 1, count - 1);
- if (symbols[0] <= 1) {
- VP8LWriteBits(bw, 1, 0); // Code bit for small (1 bit) symbol value.
- VP8LWriteBits(bw, 1, symbols[0]);
- } else {
- VP8LWriteBits(bw, 1, 1);
- VP8LWriteBits(bw, 8, symbols[0]);
- }
- if (count == 2) {
- VP8LWriteBits(bw, 8, symbols[1]);
- }
- return 1;
- } else {
- return StoreFullHuffmanCode(bw, huffman_code);
- }
-}
-
-static void WriteHuffmanCode(VP8LBitWriter* const bw,
- const HuffmanTreeCode* const code, int index) {
- const int depth = code->code_lengths[index];
- const int symbol = code->codes[index];
- VP8LWriteBits(bw, depth, symbol);
-}
-
-static void StoreImageToBitMask(
- VP8LBitWriter* const bw, int width, int histo_bits,
- const VP8LBackwardRefs* const refs,
- const uint16_t* histogram_symbols,
- const HuffmanTreeCode* const huffman_codes) {
- // x and y trace the position in the image.
- int x = 0;
- int y = 0;
- const int histo_xsize = histo_bits ? VP8LSubSampleSize(width, histo_bits) : 1;
- int i;
- for (i = 0; i < refs->size; ++i) {
- const PixOrCopy* const v = &refs->refs[i];
- const int histogram_ix = histogram_symbols[histo_bits ?
- (y >> histo_bits) * histo_xsize +
- (x >> histo_bits) : 0];
- const HuffmanTreeCode* const codes = huffman_codes + 5 * histogram_ix;
- if (PixOrCopyIsCacheIdx(v)) {
- const int code = PixOrCopyCacheIdx(v);
- const int literal_ix = 256 + NUM_LENGTH_CODES + code;
- WriteHuffmanCode(bw, codes, literal_ix);
- } else if (PixOrCopyIsLiteral(v)) {
- static const int order[] = { 1, 2, 0, 3 };
- int k;
- for (k = 0; k < 4; ++k) {
- const int code = PixOrCopyLiteral(v, order[k]);
- WriteHuffmanCode(bw, codes + k, code);
- }
- } else {
- int bits, n_bits;
- int code, distance;
-
- PrefixEncode(v->len, &code, &n_bits, &bits);
- WriteHuffmanCode(bw, codes, 256 + code);
- VP8LWriteBits(bw, n_bits, bits);
-
- distance = PixOrCopyDistance(v);
- PrefixEncode(distance, &code, &n_bits, &bits);
- WriteHuffmanCode(bw, codes + 4, code);
- VP8LWriteBits(bw, n_bits, bits);
- }
- x += PixOrCopyLength(v);
- while (x >= width) {
- x -= width;
- ++y;
- }
- }
-}
-
-// Special case of EncodeImageInternal() for cache-bits=0, histo_bits=31
-static int EncodeImageNoHuffman(VP8LBitWriter* const bw,
- const uint32_t* const argb,
- int width, int height, int quality) {
- int i;
- int ok = 0;
- VP8LBackwardRefs refs;
- HuffmanTreeCode huffman_codes[5] = { { 0, NULL, NULL } };
- const uint16_t histogram_symbols[1] = { 0 }; // only one tree, one symbol
- VP8LHistogramSet* const histogram_image = VP8LAllocateHistogramSet(1, 0);
- if (histogram_image == NULL) return 0;
-
- // Calculate backward references from ARGB image.
- if (!VP8LGetBackwardReferences(width, height, argb, quality, 0, 1, &refs)) {
- goto Error;
- }
- // Build histogram image and symbols from backward references.
- VP8LHistogramStoreRefs(&refs, histogram_image->histograms[0]);
-
- // Create Huffman bit lengths and codes for each histogram image.
- assert(histogram_image->size == 1);
- if (!GetHuffBitLengthsAndCodes(histogram_image, huffman_codes)) {
- goto Error;
- }
-
- // No color cache, no Huffman image.
- VP8LWriteBits(bw, 1, 0);
-
- // Store Huffman codes.
- for (i = 0; i < 5; ++i) {
- HuffmanTreeCode* const codes = &huffman_codes[i];
- if (!StoreHuffmanCode(bw, codes)) {
- goto Error;
- }
- ClearHuffmanTreeIfOnlyOneSymbol(codes);
- }
-
- // Store actual literals.
- StoreImageToBitMask(bw, width, 0, &refs, histogram_symbols, huffman_codes);
- ok = 1;
-
- Error:
- free(histogram_image);
- VP8LClearBackwardRefs(&refs);
- free(huffman_codes[0].codes);
- return ok;
-}
-
-static int EncodeImageInternal(VP8LBitWriter* const bw,
- const uint32_t* const argb,
- int width, int height, int quality,
- int cache_bits, int histogram_bits) {
- int ok = 0;
- const int use_2d_locality = 1;
- const int use_color_cache = (cache_bits > 0);
- const uint32_t histogram_image_xysize =
- VP8LSubSampleSize(width, histogram_bits) *
- VP8LSubSampleSize(height, histogram_bits);
- VP8LHistogramSet* histogram_image =
- VP8LAllocateHistogramSet(histogram_image_xysize, 0);
- int histogram_image_size = 0;
- size_t bit_array_size = 0;
- HuffmanTreeCode* huffman_codes = NULL;
- VP8LBackwardRefs refs;
- uint16_t* const histogram_symbols =
- (uint16_t*)WebPSafeMalloc((uint64_t)histogram_image_xysize,
- sizeof(*histogram_symbols));
- assert(histogram_bits >= MIN_HUFFMAN_BITS);
- assert(histogram_bits <= MAX_HUFFMAN_BITS);
- if (histogram_image == NULL || histogram_symbols == NULL) goto Error;
-
- // Calculate backward references from ARGB image.
- if (!VP8LGetBackwardReferences(width, height, argb, quality, cache_bits,
- use_2d_locality, &refs)) {
- goto Error;
- }
- // Build histogram image and symbols from backward references.
- if (!VP8LGetHistoImageSymbols(width, height, &refs,
- quality, histogram_bits, cache_bits,
- histogram_image,
- histogram_symbols)) {
- goto Error;
- }
- // Create Huffman bit lengths and codes for each histogram image.
- histogram_image_size = histogram_image->size;
- bit_array_size = 5 * histogram_image_size;
- huffman_codes = (HuffmanTreeCode*)WebPSafeCalloc(bit_array_size,
- sizeof(*huffman_codes));
- if (huffman_codes == NULL ||
- !GetHuffBitLengthsAndCodes(histogram_image, huffman_codes)) {
- goto Error;
- }
-
- // Color Cache parameters.
- VP8LWriteBits(bw, 1, use_color_cache);
- if (use_color_cache) {
- VP8LWriteBits(bw, 4, cache_bits);
- }
-
- // Huffman image + meta huffman.
- {
- const int write_histogram_image = (histogram_image_size > 1);
- VP8LWriteBits(bw, 1, write_histogram_image);
- if (write_histogram_image) {
- uint32_t* const histogram_argb =
- (uint32_t*)WebPSafeMalloc((uint64_t)histogram_image_xysize,
- sizeof(*histogram_argb));
- int max_index = 0;
- uint32_t i;
- if (histogram_argb == NULL) goto Error;
- for (i = 0; i < histogram_image_xysize; ++i) {
- const int index = histogram_symbols[i] & 0xffff;
- histogram_argb[i] = 0xff000000 | (index << 8);
- if (index >= max_index) {
- max_index = index + 1;
- }
- }
- histogram_image_size = max_index;
-
- VP8LWriteBits(bw, 3, histogram_bits - 2);
- ok = EncodeImageNoHuffman(bw, histogram_argb,
- VP8LSubSampleSize(width, histogram_bits),
- VP8LSubSampleSize(height, histogram_bits),
- quality);
- free(histogram_argb);
- if (!ok) goto Error;
- }
- }
-
- // Store Huffman codes.
- {
- int i;
- for (i = 0; i < 5 * histogram_image_size; ++i) {
- HuffmanTreeCode* const codes = &huffman_codes[i];
- if (!StoreHuffmanCode(bw, codes)) goto Error;
- ClearHuffmanTreeIfOnlyOneSymbol(codes);
- }
- }
- // Free combined histograms.
- free(histogram_image);
- histogram_image = NULL;
-
- // Store actual literals.
- StoreImageToBitMask(bw, width, histogram_bits, &refs,
- histogram_symbols, huffman_codes);
- ok = 1;
-
- Error:
- if (!ok) free(histogram_image);
-
- VP8LClearBackwardRefs(&refs);
- if (huffman_codes != NULL) {
- free(huffman_codes->codes);
- free(huffman_codes);
- }
- free(histogram_symbols);
- return ok;
-}
-
-// -----------------------------------------------------------------------------
-// Transforms
-
-// Check if it would be a good idea to subtract green from red and blue. We
-// only impact entropy in red/blue components, don't bother to look at others.
-static int EvalAndApplySubtractGreen(VP8LEncoder* const enc,
- int width, int height,
- VP8LBitWriter* const bw) {
- if (!enc->use_palette_) {
- int i;
- const uint32_t* const argb = enc->argb_;
- double bit_cost_before, bit_cost_after;
- VP8LHistogram* const histo = (VP8LHistogram*)malloc(sizeof(*histo));
- if (histo == NULL) return 0;
-
- VP8LHistogramInit(histo, 1);
- for (i = 0; i < width * height; ++i) {
- const uint32_t c = argb[i];
- ++histo->red_[(c >> 16) & 0xff];
- ++histo->blue_[(c >> 0) & 0xff];
- }
- bit_cost_before = VP8LHistogramEstimateBits(histo);
-
- VP8LHistogramInit(histo, 1);
- for (i = 0; i < width * height; ++i) {
- const uint32_t c = argb[i];
- const int green = (c >> 8) & 0xff;
- ++histo->red_[((c >> 16) - green) & 0xff];
- ++histo->blue_[((c >> 0) - green) & 0xff];
- }
- bit_cost_after = VP8LHistogramEstimateBits(histo);
- free(histo);
-
- // Check if subtracting green yields low entropy.
- enc->use_subtract_green_ = (bit_cost_after < bit_cost_before);
- if (enc->use_subtract_green_) {
- VP8LWriteBits(bw, 1, TRANSFORM_PRESENT);
- VP8LWriteBits(bw, 2, SUBTRACT_GREEN);
- VP8LSubtractGreenFromBlueAndRed(enc->argb_, width * height);
- }
- }
- return 1;
-}
-
-static int ApplyPredictFilter(const VP8LEncoder* const enc,
- int width, int height, int quality,
- VP8LBitWriter* const bw) {
- const int pred_bits = enc->transform_bits_;
- const int transform_width = VP8LSubSampleSize(width, pred_bits);
- const int transform_height = VP8LSubSampleSize(height, pred_bits);
-
- VP8LResidualImage(width, height, pred_bits, enc->argb_, enc->argb_scratch_,
- enc->transform_data_);
- VP8LWriteBits(bw, 1, TRANSFORM_PRESENT);
- VP8LWriteBits(bw, 2, PREDICTOR_TRANSFORM);
- assert(pred_bits >= 2);
- VP8LWriteBits(bw, 3, pred_bits - 2);
- if (!EncodeImageNoHuffman(bw, enc->transform_data_,
- transform_width, transform_height, quality)) {
- return 0;
- }
- return 1;
-}
-
-static int ApplyCrossColorFilter(const VP8LEncoder* const enc,
- int width, int height, int quality,
- VP8LBitWriter* const bw) {
- const int ccolor_transform_bits = enc->transform_bits_;
- const int transform_width = VP8LSubSampleSize(width, ccolor_transform_bits);
- const int transform_height = VP8LSubSampleSize(height, ccolor_transform_bits);
- const int step = (quality == 0) ? 32 : 8;
-
- VP8LColorSpaceTransform(width, height, ccolor_transform_bits, step,
- enc->argb_, enc->transform_data_);
- VP8LWriteBits(bw, 1, TRANSFORM_PRESENT);
- VP8LWriteBits(bw, 2, CROSS_COLOR_TRANSFORM);
- assert(ccolor_transform_bits >= 2);
- VP8LWriteBits(bw, 3, ccolor_transform_bits - 2);
- if (!EncodeImageNoHuffman(bw, enc->transform_data_,
- transform_width, transform_height, quality)) {
- return 0;
- }
- return 1;
-}
-
-// -----------------------------------------------------------------------------
-
-static void PutLE32(uint8_t* const data, uint32_t val) {
- data[0] = (val >> 0) & 0xff;
- data[1] = (val >> 8) & 0xff;
- data[2] = (val >> 16) & 0xff;
- data[3] = (val >> 24) & 0xff;
-}
-
-static WebPEncodingError WriteRiffHeader(const WebPPicture* const pic,
- size_t riff_size, size_t vp8l_size) {
- uint8_t riff[RIFF_HEADER_SIZE + CHUNK_HEADER_SIZE + VP8L_SIGNATURE_SIZE] = {
- 'R', 'I', 'F', 'F', 0, 0, 0, 0, 'W', 'E', 'B', 'P',
- 'V', 'P', '8', 'L', 0, 0, 0, 0, VP8L_MAGIC_BYTE,
- };
- PutLE32(riff + TAG_SIZE, (uint32_t)riff_size);
- PutLE32(riff + RIFF_HEADER_SIZE + TAG_SIZE, (uint32_t)vp8l_size);
- if (!pic->writer(riff, sizeof(riff), pic)) {
- return VP8_ENC_ERROR_BAD_WRITE;
- }
- return VP8_ENC_OK;
-}
-
-static int WriteImageSize(const WebPPicture* const pic,
- VP8LBitWriter* const bw) {
- const int width = pic->width - 1;
- const int height = pic->height - 1;
- assert(width < WEBP_MAX_DIMENSION && height < WEBP_MAX_DIMENSION);
-
- VP8LWriteBits(bw, VP8L_IMAGE_SIZE_BITS, width);
- VP8LWriteBits(bw, VP8L_IMAGE_SIZE_BITS, height);
- return !bw->error_;
-}
-
-static int WriteRealAlphaAndVersion(VP8LBitWriter* const bw, int has_alpha) {
- VP8LWriteBits(bw, 1, has_alpha);
- VP8LWriteBits(bw, VP8L_VERSION_BITS, VP8L_VERSION);
- return !bw->error_;
-}
-
-static WebPEncodingError WriteImage(const WebPPicture* const pic,
- VP8LBitWriter* const bw,
- size_t* const coded_size) {
- WebPEncodingError err = VP8_ENC_OK;
- const uint8_t* const webpll_data = VP8LBitWriterFinish(bw);
- const size_t webpll_size = VP8LBitWriterNumBytes(bw);
- const size_t vp8l_size = VP8L_SIGNATURE_SIZE + webpll_size;
- const size_t pad = vp8l_size & 1;
- const size_t riff_size = TAG_SIZE + CHUNK_HEADER_SIZE + vp8l_size + pad;
-
- err = WriteRiffHeader(pic, riff_size, vp8l_size);
- if (err != VP8_ENC_OK) goto Error;
-
- if (!pic->writer(webpll_data, webpll_size, pic)) {
- err = VP8_ENC_ERROR_BAD_WRITE;
- goto Error;
- }
-
- if (pad) {
- const uint8_t pad_byte[1] = { 0 };
- if (!pic->writer(pad_byte, 1, pic)) {
- err = VP8_ENC_ERROR_BAD_WRITE;
- goto Error;
- }
- }
- *coded_size = CHUNK_HEADER_SIZE + riff_size;
- return VP8_ENC_OK;
-
- Error:
- return err;
-}
-
-// -----------------------------------------------------------------------------
-
-// Allocates the memory for argb (W x H) buffer, 2 rows of context for
-// prediction and transform data.
-static WebPEncodingError AllocateTransformBuffer(VP8LEncoder* const enc,
- int width, int height) {
- WebPEncodingError err = VP8_ENC_OK;
- const int tile_size = 1 << enc->transform_bits_;
- const uint64_t image_size = width * height;
- const uint64_t argb_scratch_size = tile_size * width + width;
- const uint64_t transform_data_size =
- (uint64_t)VP8LSubSampleSize(width, enc->transform_bits_) *
- (uint64_t)VP8LSubSampleSize(height, enc->transform_bits_);
- const uint64_t total_size =
- image_size + argb_scratch_size + transform_data_size;
- uint32_t* mem = (uint32_t*)WebPSafeMalloc(total_size, sizeof(*mem));
- if (mem == NULL) {
- err = VP8_ENC_ERROR_OUT_OF_MEMORY;
- goto Error;
- }
- enc->argb_ = mem;
- mem += image_size;
- enc->argb_scratch_ = mem;
- mem += argb_scratch_size;
- enc->transform_data_ = mem;
- enc->current_width_ = width;
-
- Error:
- return err;
-}
-
-// Bundles multiple (2, 4 or 8) pixels into a single pixel.
-// Returns the new xsize.
-static void BundleColorMap(const WebPPicture* const pic,
- int xbits, uint32_t* bundled_argb, int xs) {
- int y;
- const int bit_depth = 1 << (3 - xbits);
- uint32_t code = 0;
- const uint32_t* argb = pic->argb;
- const int width = pic->width;
- const int height = pic->height;
-
- for (y = 0; y < height; ++y) {
- int x;
- for (x = 0; x < width; ++x) {
- const int mask = (1 << xbits) - 1;
- const int xsub = x & mask;
- if (xsub == 0) {
- code = 0;
- }
- // TODO(vikasa): simplify the bundling logic.
- code |= (argb[x] & 0xff00) << (bit_depth * xsub);
- bundled_argb[y * xs + (x >> xbits)] = 0xff000000 | code;
- }
- argb += pic->argb_stride;
- }
-}
-
-// Note: Expects "enc->palette_" to be set properly.
-// Also, "enc->palette_" will be modified after this call and should not be used
-// later.
-static WebPEncodingError ApplyPalette(VP8LBitWriter* const bw,
- VP8LEncoder* const enc, int quality) {
- WebPEncodingError err = VP8_ENC_OK;
- int i, x, y;
- const WebPPicture* const pic = enc->pic_;
- uint32_t* argb = pic->argb;
- const int width = pic->width;
- const int height = pic->height;
- uint32_t* const palette = enc->palette_;
- const int palette_size = enc->palette_size_;
-
- // Replace each input pixel by corresponding palette index.
- for (y = 0; y < height; ++y) {
- for (x = 0; x < width; ++x) {
- const uint32_t pix = argb[x];
- for (i = 0; i < palette_size; ++i) {
- if (pix == palette[i]) {
- argb[x] = 0xff000000u | (i << 8);
- break;
- }
- }
- }
- argb += pic->argb_stride;
- }
-
- // Save palette to bitstream.
- VP8LWriteBits(bw, 1, TRANSFORM_PRESENT);
- VP8LWriteBits(bw, 2, COLOR_INDEXING_TRANSFORM);
- assert(palette_size >= 1);
- VP8LWriteBits(bw, 8, palette_size - 1);
- for (i = palette_size - 1; i >= 1; --i) {
- palette[i] = VP8LSubPixels(palette[i], palette[i - 1]);
- }
- if (!EncodeImageNoHuffman(bw, palette, palette_size, 1, quality)) {
- err = VP8_ENC_ERROR_INVALID_CONFIGURATION;
- goto Error;
- }
-
- if (palette_size <= 16) {
- // Image can be packed (multiple pixels per uint32_t).
- int xbits = 1;
- if (palette_size <= 2) {
- xbits = 3;
- } else if (palette_size <= 4) {
- xbits = 2;
- }
- err = AllocateTransformBuffer(enc, VP8LSubSampleSize(width, xbits), height);
- if (err != VP8_ENC_OK) goto Error;
- BundleColorMap(pic, xbits, enc->argb_, enc->current_width_);
- }
-
- Error:
- return err;
-}
-
-// -----------------------------------------------------------------------------
-
-static int GetHistoBits(const WebPConfig* const config,
- const WebPPicture* const pic) {
- const int width = pic->width;
- const int height = pic->height;
- const size_t hist_size = sizeof(VP8LHistogram);
- // Make tile size a function of encoding method (Range: 0 to 6).
- int histo_bits = 7 - config->method;
- while (1) {
- const size_t huff_image_size = VP8LSubSampleSize(width, histo_bits) *
- VP8LSubSampleSize(height, histo_bits) *
- hist_size;
- if (huff_image_size <= MAX_HUFF_IMAGE_SIZE) break;
- ++histo_bits;
- }
- return (histo_bits < MIN_HUFFMAN_BITS) ? MIN_HUFFMAN_BITS :
- (histo_bits > MAX_HUFFMAN_BITS) ? MAX_HUFFMAN_BITS : histo_bits;
-}
-
-static void InitEncParams(VP8LEncoder* const enc) {
- const WebPConfig* const config = enc->config_;
- const WebPPicture* const picture = enc->pic_;
- const int method = config->method;
- const float quality = config->quality;
- enc->transform_bits_ = (method < 4) ? 5 : (method > 4) ? 3 : 4;
- enc->histo_bits_ = GetHistoBits(config, picture);
- enc->cache_bits_ = (quality <= 25.f) ? 0 : 7;
-}
-
-// -----------------------------------------------------------------------------
-// VP8LEncoder
-
-static VP8LEncoder* VP8LEncoderNew(const WebPConfig* const config,
- const WebPPicture* const picture) {
- VP8LEncoder* const enc = (VP8LEncoder*)calloc(1, sizeof(*enc));
- if (enc == NULL) {
- WebPEncodingSetError(picture, VP8_ENC_ERROR_OUT_OF_MEMORY);
- return NULL;
- }
- enc->config_ = config;
- enc->pic_ = picture;
- return enc;
-}
-
-static void VP8LEncoderDelete(VP8LEncoder* enc) {
- free(enc->argb_);
- free(enc);
-}
-
-// -----------------------------------------------------------------------------
-// Main call
-
-WebPEncodingError VP8LEncodeStream(const WebPConfig* const config,
- const WebPPicture* const picture,
- VP8LBitWriter* const bw) {
- WebPEncodingError err = VP8_ENC_OK;
- const int quality = (int)config->quality;
- const int width = picture->width;
- const int height = picture->height;
- VP8LEncoder* const enc = VP8LEncoderNew(config, picture);
- const size_t byte_position = VP8LBitWriterNumBytes(bw);
-
- if (enc == NULL) {
- err = VP8_ENC_ERROR_OUT_OF_MEMORY;
- goto Error;
- }
-
- InitEncParams(enc);
-
- // ---------------------------------------------------------------------------
- // Analyze image (entropy, num_palettes etc)
-
- if (!VP8LEncAnalyze(enc, config->image_hint)) {
- err = VP8_ENC_ERROR_OUT_OF_MEMORY;
- goto Error;
- }
-
- if (enc->use_palette_) {
- err = ApplyPalette(bw, enc, quality);
- if (err != VP8_ENC_OK) goto Error;
- // Color cache is disabled for palette.
- enc->cache_bits_ = 0;
- }
-
- // In case image is not packed.
- if (enc->argb_ == NULL) {
- int y;
- err = AllocateTransformBuffer(enc, width, height);
- if (err != VP8_ENC_OK) goto Error;
- for (y = 0; y < height; ++y) {
- memcpy(enc->argb_ + y * width,
- picture->argb + y * picture->argb_stride,
- width * sizeof(*enc->argb_));
- }
- enc->current_width_ = width;
- }
-
- // ---------------------------------------------------------------------------
- // Apply transforms and write transform data.
-
- if (!EvalAndApplySubtractGreen(enc, enc->current_width_, height, bw)) {
- err = VP8_ENC_ERROR_OUT_OF_MEMORY;
- goto Error;
- }
-
- if (enc->use_predict_) {
- if (!ApplyPredictFilter(enc, enc->current_width_, height, quality, bw)) {
- err = VP8_ENC_ERROR_INVALID_CONFIGURATION;
- goto Error;
- }
- }
-
- if (enc->use_cross_color_) {
- if (!ApplyCrossColorFilter(enc, enc->current_width_, height, quality, bw)) {
- err = VP8_ENC_ERROR_INVALID_CONFIGURATION;
- goto Error;
- }
- }
-
- VP8LWriteBits(bw, 1, !TRANSFORM_PRESENT); // No more transforms.
-
- // ---------------------------------------------------------------------------
- // Estimate the color cache size.
-
- if (enc->cache_bits_ > 0) {
- if (!VP8LCalculateEstimateForCacheSize(enc->argb_, enc->current_width_,
- height, &enc->cache_bits_)) {
- err = VP8_ENC_ERROR_INVALID_CONFIGURATION;
- goto Error;
- }
- }
-
- // ---------------------------------------------------------------------------
- // Encode and write the transformed image.
-
- if (!EncodeImageInternal(bw, enc->argb_, enc->current_width_, height,
- quality, enc->cache_bits_, enc->histo_bits_)) {
- err = VP8_ENC_ERROR_OUT_OF_MEMORY;
- goto Error;
- }
-
- if (picture->stats != NULL) {
- WebPAuxStats* const stats = picture->stats;
- stats->lossless_features = 0;
- if (enc->use_predict_) stats->lossless_features |= 1;
- if (enc->use_cross_color_) stats->lossless_features |= 2;
- if (enc->use_subtract_green_) stats->lossless_features |= 4;
- if (enc->use_palette_) stats->lossless_features |= 8;
- stats->histogram_bits = enc->histo_bits_;
- stats->transform_bits = enc->transform_bits_;
- stats->cache_bits = enc->cache_bits_;
- stats->palette_size = enc->palette_size_;
- stats->lossless_size = (int)(VP8LBitWriterNumBytes(bw) - byte_position);
- }
-
- Error:
- VP8LEncoderDelete(enc);
- return err;
-}
-
-int VP8LEncodeImage(const WebPConfig* const config,
- const WebPPicture* const picture) {
- int width, height;
- int has_alpha;
- size_t coded_size;
- int percent = 0;
- WebPEncodingError err = VP8_ENC_OK;
- VP8LBitWriter bw;
-
- if (picture == NULL) return 0;
-
- if (config == NULL || picture->argb == NULL) {
- err = VP8_ENC_ERROR_NULL_PARAMETER;
- WebPEncodingSetError(picture, err);
- return 0;
- }
-
- width = picture->width;
- height = picture->height;
- if (!VP8LBitWriterInit(&bw, (width * height) >> 1)) {
- err = VP8_ENC_ERROR_OUT_OF_MEMORY;
- goto Error;
- }
-
- if (!WebPReportProgress(picture, 1, &percent)) {
- UserAbort:
- err = VP8_ENC_ERROR_USER_ABORT;
- goto Error;
- }
- // Reset stats (for pure lossless coding)
- if (picture->stats != NULL) {
- WebPAuxStats* const stats = picture->stats;
- memset(stats, 0, sizeof(*stats));
- stats->PSNR[0] = 99.f;
- stats->PSNR[1] = 99.f;
- stats->PSNR[2] = 99.f;
- stats->PSNR[3] = 99.f;
- stats->PSNR[4] = 99.f;
- }
-
- // Write image size.
- if (!WriteImageSize(picture, &bw)) {
- err = VP8_ENC_ERROR_OUT_OF_MEMORY;
- goto Error;
- }
-
- has_alpha = WebPPictureHasTransparency(picture);
- // Write the non-trivial Alpha flag and lossless version.
- if (!WriteRealAlphaAndVersion(&bw, has_alpha)) {
- err = VP8_ENC_ERROR_OUT_OF_MEMORY;
- goto Error;
- }
-
- if (!WebPReportProgress(picture, 5, &percent)) goto UserAbort;
-
- // Encode main image stream.
- err = VP8LEncodeStream(config, picture, &bw);
- if (err != VP8_ENC_OK) goto Error;
-
- // TODO(skal): have a fine-grained progress report in VP8LEncodeStream().
- if (!WebPReportProgress(picture, 90, &percent)) goto UserAbort;
-
- // Finish the RIFF chunk.
- err = WriteImage(picture, &bw, &coded_size);
- if (err != VP8_ENC_OK) goto Error;
-
- if (!WebPReportProgress(picture, 100, &percent)) goto UserAbort;
-
- // Save size.
- if (picture->stats != NULL) {
- picture->stats->coded_size += (int)coded_size;
- picture->stats->lossless_size = (int)coded_size;
- }
-
- if (picture->extra_info != NULL) {
- const int mb_w = (width + 15) >> 4;
- const int mb_h = (height + 15) >> 4;
- memset(picture->extra_info, 0, mb_w * mb_h * sizeof(*picture->extra_info));
- }
-
- Error:
- if (bw.error_) err = VP8_ENC_ERROR_OUT_OF_MEMORY;
- VP8LBitWriterDestroy(&bw);
- if (err != VP8_ENC_OK) {
- WebPEncodingSetError(picture, err);
- return 0;
- }
- return 1;
-}
-
-//------------------------------------------------------------------------------
-
-#if defined(__cplusplus) || defined(c_plusplus)
-} // extern "C"
-#endif
diff --git a/drivers/webpold/enc/vp8li.h b/drivers/webpold/enc/vp8li.h
deleted file mode 100644
index bb111aec33..0000000000
--- a/drivers/webpold/enc/vp8li.h
+++ /dev/null
@@ -1,68 +0,0 @@
-// Copyright 2012 Google Inc. All Rights Reserved.
-//
-// This code is licensed under the same terms as WebM:
-// Software License Agreement: http://www.webmproject.org/license/software/
-// Additional IP Rights Grant: http://www.webmproject.org/license/additional/
-// -----------------------------------------------------------------------------
-//
-// Lossless encoder: internal header.
-//
-// Author: Vikas Arora (vikaas.arora@gmail.com)
-
-#ifndef WEBP_ENC_VP8LI_H_
-#define WEBP_ENC_VP8LI_H_
-
-#include "./histogram.h"
-#include "../utils/bit_writer.h"
-#include "../encode.h"
-#include "../format_constants.h"
-
-#if defined(__cplusplus) || defined(c_plusplus)
-extern "C" {
-#endif
-
-typedef struct {
- const WebPConfig* config_; // user configuration and parameters
- const WebPPicture* pic_; // input picture.
-
- uint32_t* argb_; // Transformed argb image data.
- uint32_t* argb_scratch_; // Scratch memory for argb rows
- // (used for prediction).
- uint32_t* transform_data_; // Scratch memory for transform data.
- int current_width_; // Corresponds to packed image width.
-
- // Encoding parameters derived from quality parameter.
- int histo_bits_;
- int transform_bits_;
- int cache_bits_; // If equal to 0, don't use color cache.
-
- // Encoding parameters derived from image characteristics.
- int use_cross_color_;
- int use_subtract_green_;
- int use_predict_;
- int use_palette_;
- int palette_size_;
- uint32_t palette_[MAX_PALETTE_SIZE];
-} VP8LEncoder;
-
-//------------------------------------------------------------------------------
-// internal functions. Not public.
-
-// Encodes the picture.
-// Returns 0 if config or picture is NULL or picture doesn't have valid argb
-// input.
-int VP8LEncodeImage(const WebPConfig* const config,
- const WebPPicture* const picture);
-
-// Encodes the main image stream using the supplied bit writer.
-WebPEncodingError VP8LEncodeStream(const WebPConfig* const config,
- const WebPPicture* const picture,
- VP8LBitWriter* const bw);
-
-//------------------------------------------------------------------------------
-
-#if defined(__cplusplus) || defined(c_plusplus)
-} // extern "C"
-#endif
-
-#endif /* WEBP_ENC_VP8LI_H_ */
diff --git a/drivers/webpold/enc/webpenc.c b/drivers/webpold/enc/webpenc.c
deleted file mode 100644
index 3c275589fc..0000000000
--- a/drivers/webpold/enc/webpenc.c
+++ /dev/null
@@ -1,389 +0,0 @@
-// Copyright 2011 Google Inc. All Rights Reserved.
-//
-// This code is licensed under the same terms as WebM:
-// Software License Agreement: http://www.webmproject.org/license/software/
-// Additional IP Rights Grant: http://www.webmproject.org/license/additional/
-// -----------------------------------------------------------------------------
-//
-// WebP encoder: main entry point
-//
-// Author: Skal (pascal.massimino@gmail.com)
-
-#include <assert.h>
-#include <stdlib.h>
-#include <string.h>
-#include <math.h>
-
-#include "./vp8enci.h"
-#include "./vp8li.h"
-#include "../utils/utils.h"
-
-// #define PRINT_MEMORY_INFO
-
-#if defined(__cplusplus) || defined(c_plusplus)
-extern "C" {
-#endif
-
-#ifdef PRINT_MEMORY_INFO
-#include <stdio.h>
-#endif
-
-//------------------------------------------------------------------------------
-
-int WebPGetEncoderVersion(void) {
- return (ENC_MAJ_VERSION << 16) | (ENC_MIN_VERSION << 8) | ENC_REV_VERSION;
-}
-
-//------------------------------------------------------------------------------
-// WebPPicture
-//------------------------------------------------------------------------------
-
-static int DummyWriter(const uint8_t* data, size_t data_size,
- const WebPPicture* const picture) {
- // The following are to prevent 'unused variable' error message.
- (void)data;
- (void)data_size;
- (void)picture;
- return 1;
-}
-
-int WebPPictureInitInternal(WebPPicture* picture, int version) {
- if (WEBP_ABI_IS_INCOMPATIBLE(version, WEBP_ENCODER_ABI_VERSION)) {
- return 0; // caller/system version mismatch!
- }
- if (picture != NULL) {
- memset(picture, 0, sizeof(*picture));
- picture->writer = DummyWriter;
- WebPEncodingSetError(picture, VP8_ENC_OK);
- }
- return 1;
-}
-
-//------------------------------------------------------------------------------
-// VP8Encoder
-//------------------------------------------------------------------------------
-
-static void ResetSegmentHeader(VP8Encoder* const enc) {
- VP8SegmentHeader* const hdr = &enc->segment_hdr_;
- hdr->num_segments_ = enc->config_->segments;
- hdr->update_map_ = (hdr->num_segments_ > 1);
- hdr->size_ = 0;
-}
-
-static void ResetFilterHeader(VP8Encoder* const enc) {
- VP8FilterHeader* const hdr = &enc->filter_hdr_;
- hdr->simple_ = 1;
- hdr->level_ = 0;
- hdr->sharpness_ = 0;
- hdr->i4x4_lf_delta_ = 0;
-}
-
-static void ResetBoundaryPredictions(VP8Encoder* const enc) {
- // init boundary values once for all
- // Note: actually, initializing the preds_[] is only needed for intra4.
- int i;
- uint8_t* const top = enc->preds_ - enc->preds_w_;
- uint8_t* const left = enc->preds_ - 1;
- for (i = -1; i < 4 * enc->mb_w_; ++i) {
- top[i] = B_DC_PRED;
- }
- for (i = 0; i < 4 * enc->mb_h_; ++i) {
- left[i * enc->preds_w_] = B_DC_PRED;
- }
- enc->nz_[-1] = 0; // constant
-}
-
-// Map configured quality level to coding tools used.
-//-------------+---+---+---+---+---+---+
-// Quality | 0 | 1 | 2 | 3 | 4 | 5 +
-//-------------+---+---+---+---+---+---+
-// dynamic prob| ~ | x | x | x | x | x |
-//-------------+---+---+---+---+---+---+
-// rd-opt modes| | | x | x | x | x |
-//-------------+---+---+---+---+---+---+
-// fast i4/i16 | x | x | | | | |
-//-------------+---+---+---+---+---+---+
-// rd-opt i4/16| | | x | x | x | x |
-//-------------+---+---+---+---+---+---+
-// Trellis | | x | | | x | x |
-//-------------+---+---+---+---+---+---+
-// full-SNS | | | | | | x |
-//-------------+---+---+---+---+---+---+
-
-static void MapConfigToTools(VP8Encoder* const enc) {
- const int method = enc->config_->method;
- const int limit = 100 - enc->config_->partition_limit;
- enc->method_ = method;
- enc->rd_opt_level_ = (method >= 6) ? 3
- : (method >= 5) ? 2
- : (method >= 3) ? 1
- : 0;
- enc->max_i4_header_bits_ =
- 256 * 16 * 16 * // upper bound: up to 16bit per 4x4 block
- (limit * limit) / (100 * 100); // ... modulated with a quadratic curve.
-}
-
-// Memory scaling with dimensions:
-// memory (bytes) ~= 2.25 * w + 0.0625 * w * h
-//
-// Typical memory footprint (768x510 picture)
-// Memory used:
-// encoder: 33919
-// block cache: 2880
-// info: 3072
-// preds: 24897
-// top samples: 1623
-// non-zero: 196
-// lf-stats: 2048
-// total: 68635
-// Transcient object sizes:
-// VP8EncIterator: 352
-// VP8ModeScore: 912
-// VP8SegmentInfo: 532
-// VP8Proba: 31032
-// LFStats: 2048
-// Picture size (yuv): 589824
-
-static VP8Encoder* InitVP8Encoder(const WebPConfig* const config,
- WebPPicture* const picture) {
- const int use_filter =
- (config->filter_strength > 0) || (config->autofilter > 0);
- const int mb_w = (picture->width + 15) >> 4;
- const int mb_h = (picture->height + 15) >> 4;
- const int preds_w = 4 * mb_w + 1;
- const int preds_h = 4 * mb_h + 1;
- const size_t preds_size = preds_w * preds_h * sizeof(uint8_t);
- const int top_stride = mb_w * 16;
- const size_t nz_size = (mb_w + 1) * sizeof(uint32_t);
- const size_t cache_size = (3 * YUV_SIZE + PRED_SIZE) * sizeof(uint8_t);
- const size_t info_size = mb_w * mb_h * sizeof(VP8MBInfo);
- const size_t samples_size = (2 * top_stride + // top-luma/u/v
- 16 + 16 + 16 + 8 + 1 + // left y/u/v
- 2 * ALIGN_CST) // align all
- * sizeof(uint8_t);
- const size_t lf_stats_size =
- config->autofilter ? sizeof(LFStats) + ALIGN_CST : 0;
- VP8Encoder* enc;
- uint8_t* mem;
- const uint64_t size = (uint64_t)sizeof(VP8Encoder) // main struct
- + ALIGN_CST // cache alignment
- + cache_size // working caches
- + info_size // modes info
- + preds_size // prediction modes
- + samples_size // top/left samples
- + nz_size // coeff context bits
- + lf_stats_size; // autofilter stats
-
-#ifdef PRINT_MEMORY_INFO
- printf("===================================\n");
- printf("Memory used:\n"
- " encoder: %ld\n"
- " block cache: %ld\n"
- " info: %ld\n"
- " preds: %ld\n"
- " top samples: %ld\n"
- " non-zero: %ld\n"
- " lf-stats: %ld\n"
- " total: %ld\n",
- sizeof(VP8Encoder) + ALIGN_CST, cache_size, info_size,
- preds_size, samples_size, nz_size, lf_stats_size, size);
- printf("Transcient object sizes:\n"
- " VP8EncIterator: %ld\n"
- " VP8ModeScore: %ld\n"
- " VP8SegmentInfo: %ld\n"
- " VP8Proba: %ld\n"
- " LFStats: %ld\n",
- sizeof(VP8EncIterator), sizeof(VP8ModeScore),
- sizeof(VP8SegmentInfo), sizeof(VP8Proba),
- sizeof(LFStats));
- printf("Picture size (yuv): %ld\n",
- mb_w * mb_h * 384 * sizeof(uint8_t));
- printf("===================================\n");
-#endif
- mem = (uint8_t*)WebPSafeMalloc(size, sizeof(*mem));
- if (mem == NULL) {
- WebPEncodingSetError(picture, VP8_ENC_ERROR_OUT_OF_MEMORY);
- return NULL;
- }
- enc = (VP8Encoder*)mem;
- mem = (uint8_t*)DO_ALIGN(mem + sizeof(*enc));
- memset(enc, 0, sizeof(*enc));
- enc->num_parts_ = 1 << config->partitions;
- enc->mb_w_ = mb_w;
- enc->mb_h_ = mb_h;
- enc->preds_w_ = preds_w;
- enc->yuv_in_ = (uint8_t*)mem;
- mem += YUV_SIZE;
- enc->yuv_out_ = (uint8_t*)mem;
- mem += YUV_SIZE;
- enc->yuv_out2_ = (uint8_t*)mem;
- mem += YUV_SIZE;
- enc->yuv_p_ = (uint8_t*)mem;
- mem += PRED_SIZE;
- enc->mb_info_ = (VP8MBInfo*)mem;
- mem += info_size;
- enc->preds_ = ((uint8_t*)mem) + 1 + enc->preds_w_;
- mem += preds_w * preds_h * sizeof(uint8_t);
- enc->nz_ = 1 + (uint32_t*)mem;
- mem += nz_size;
- enc->lf_stats_ = lf_stats_size ? (LFStats*)DO_ALIGN(mem) : NULL;
- mem += lf_stats_size;
-
- // top samples (all 16-aligned)
- mem = (uint8_t*)DO_ALIGN(mem);
- enc->y_top_ = (uint8_t*)mem;
- enc->uv_top_ = enc->y_top_ + top_stride;
- mem += 2 * top_stride;
- mem = (uint8_t*)DO_ALIGN(mem + 1);
- enc->y_left_ = (uint8_t*)mem;
- mem += 16 + 16;
- enc->u_left_ = (uint8_t*)mem;
- mem += 16;
- enc->v_left_ = (uint8_t*)mem;
- mem += 8;
-
- enc->config_ = config;
- enc->profile_ = use_filter ? ((config->filter_type == 1) ? 0 : 1) : 2;
- enc->pic_ = picture;
- enc->percent_ = 0;
-
- MapConfigToTools(enc);
- VP8EncDspInit();
- VP8DefaultProbas(enc);
- ResetSegmentHeader(enc);
- ResetFilterHeader(enc);
- ResetBoundaryPredictions(enc);
-
- VP8EncInitAlpha(enc);
-#ifdef WEBP_EXPERIMENTAL_FEATURES
- VP8EncInitLayer(enc);
-#endif
-
- return enc;
-}
-
-static void DeleteVP8Encoder(VP8Encoder* enc) {
- if (enc != NULL) {
- VP8EncDeleteAlpha(enc);
-#ifdef WEBP_EXPERIMENTAL_FEATURES
- VP8EncDeleteLayer(enc);
-#endif
- free(enc);
- }
-}
-
-//------------------------------------------------------------------------------
-
-static double GetPSNR(uint64_t err, uint64_t size) {
- return err ? 10. * log10(255. * 255. * size / err) : 99.;
-}
-
-static void FinalizePSNR(const VP8Encoder* const enc) {
- WebPAuxStats* stats = enc->pic_->stats;
- const uint64_t size = enc->sse_count_;
- const uint64_t* const sse = enc->sse_;
- stats->PSNR[0] = (float)GetPSNR(sse[0], size);
- stats->PSNR[1] = (float)GetPSNR(sse[1], size / 4);
- stats->PSNR[2] = (float)GetPSNR(sse[2], size / 4);
- stats->PSNR[3] = (float)GetPSNR(sse[0] + sse[1] + sse[2], size * 3 / 2);
- stats->PSNR[4] = (float)GetPSNR(sse[3], size);
-}
-
-static void StoreStats(VP8Encoder* const enc) {
- WebPAuxStats* const stats = enc->pic_->stats;
- if (stats != NULL) {
- int i, s;
- for (i = 0; i < NUM_MB_SEGMENTS; ++i) {
- stats->segment_level[i] = enc->dqm_[i].fstrength_;
- stats->segment_quant[i] = enc->dqm_[i].quant_;
- for (s = 0; s <= 2; ++s) {
- stats->residual_bytes[s][i] = enc->residual_bytes_[s][i];
- }
- }
- FinalizePSNR(enc);
- stats->coded_size = enc->coded_size_;
- for (i = 0; i < 3; ++i) {
- stats->block_count[i] = enc->block_count_[i];
- }
- }
- WebPReportProgress(enc->pic_, 100, &enc->percent_); // done!
-}
-
-int WebPEncodingSetError(const WebPPicture* const pic,
- WebPEncodingError error) {
- assert((int)error < VP8_ENC_ERROR_LAST);
- assert((int)error >= VP8_ENC_OK);
- ((WebPPicture*)pic)->error_code = error;
- return 0;
-}
-
-int WebPReportProgress(const WebPPicture* const pic,
- int percent, int* const percent_store) {
- if (percent_store != NULL && percent != *percent_store) {
- *percent_store = percent;
- if (pic->progress_hook && !pic->progress_hook(percent, pic)) {
- // user abort requested
- WebPEncodingSetError(pic, VP8_ENC_ERROR_USER_ABORT);
- return 0;
- }
- }
- return 1; // ok
-}
-//------------------------------------------------------------------------------
-
-int WebPEncode(const WebPConfig* config, WebPPicture* pic) {
- int ok;
-
- if (pic == NULL)
- return 0;
- WebPEncodingSetError(pic, VP8_ENC_OK); // all ok so far
- if (config == NULL) // bad params
- return WebPEncodingSetError(pic, VP8_ENC_ERROR_NULL_PARAMETER);
- if (!WebPValidateConfig(config))
- return WebPEncodingSetError(pic, VP8_ENC_ERROR_INVALID_CONFIGURATION);
- if (pic->width <= 0 || pic->height <= 0)
- return WebPEncodingSetError(pic, VP8_ENC_ERROR_BAD_DIMENSION);
- if (pic->width > WEBP_MAX_DIMENSION || pic->height > WEBP_MAX_DIMENSION)
- return WebPEncodingSetError(pic, VP8_ENC_ERROR_BAD_DIMENSION);
-
- if (pic->stats != NULL) memset(pic->stats, 0, sizeof(*pic->stats));
-
- if (!config->lossless) {
- VP8Encoder* enc = NULL;
- if (pic->y == NULL || pic->u == NULL || pic->v == NULL) {
- if (pic->argb != NULL) {
- if (!WebPPictureARGBToYUVA(pic, WEBP_YUV420)) return 0;
- } else {
- return WebPEncodingSetError(pic, VP8_ENC_ERROR_NULL_PARAMETER);
- }
- }
-
- enc = InitVP8Encoder(config, pic);
- if (enc == NULL) return 0; // pic->error is already set.
- // Note: each of the tasks below account for 20% in the progress report.
- ok = VP8EncAnalyze(enc)
- && VP8StatLoop(enc)
- && VP8EncLoop(enc)
- && VP8EncFinishAlpha(enc)
-#ifdef WEBP_EXPERIMENTAL_FEATURES
- && VP8EncFinishLayer(enc)
-#endif
- && VP8EncWrite(enc);
- StoreStats(enc);
- if (!ok) {
- VP8EncFreeBitWriters(enc);
- }
- DeleteVP8Encoder(enc);
- } else {
- if (pic->argb == NULL)
- return WebPEncodingSetError(pic, VP8_ENC_ERROR_NULL_PARAMETER);
-
- ok = VP8LEncodeImage(config, pic); // Sets pic->error in case of problem.
- }
-
- return ok;
-}
-
-#if defined(__cplusplus) || defined(c_plusplus)
-} // extern "C"
-#endif
diff --git a/drivers/webpold/encode.h b/drivers/webpold/encode.h
deleted file mode 100644
index 2e37cfabe7..0000000000
--- a/drivers/webpold/encode.h
+++ /dev/null
@@ -1,463 +0,0 @@
-// Copyright 2011 Google Inc. All Rights Reserved.
-//
-// This code is licensed under the same terms as WebM:
-// Software License Agreement: http://www.webmproject.org/license/software/
-// Additional IP Rights Grant: http://www.webmproject.org/license/additional/
-// -----------------------------------------------------------------------------
-//
-// WebP encoder: main interface
-//
-// Author: Skal (pascal.massimino@gmail.com)
-
-#ifndef WEBP_WEBP_ENCODE_H_
-#define WEBP_WEBP_ENCODE_H_
-
-#include "./types.h"
-
-#if defined(__cplusplus) || defined(c_plusplus)
-extern "C" {
-#endif
-
-#define WEBP_ENCODER_ABI_VERSION 0x0200 // MAJOR(8b) + MINOR(8b)
-
-// Return the encoder's version number, packed in hexadecimal using 8bits for
-// each of major/minor/revision. E.g: v2.5.7 is 0x020507.
-WEBP_EXTERN(int) WebPGetEncoderVersion(void);
-
-//------------------------------------------------------------------------------
-// One-stop-shop call! No questions asked:
-
-// Returns the size of the compressed data (pointed to by *output), or 0 if
-// an error occurred. The compressed data must be released by the caller
-// using the call 'free(*output)'.
-// These functions compress using the lossy format, and the quality_factor
-// can go from 0 (smaller output, lower quality) to 100 (best quality,
-// larger output).
-WEBP_EXTERN(size_t) WebPEncodeRGB(const uint8_t* rgb,
- int width, int height, int stride,
- float quality_factor, uint8_t** output);
-WEBP_EXTERN(size_t) WebPEncodeBGR(const uint8_t* bgr,
- int width, int height, int stride,
- float quality_factor, uint8_t** output);
-WEBP_EXTERN(size_t) WebPEncodeRGBA(const uint8_t* rgba,
- int width, int height, int stride,
- float quality_factor, uint8_t** output);
-WEBP_EXTERN(size_t) WebPEncodeBGRA(const uint8_t* bgra,
- int width, int height, int stride,
- float quality_factor, uint8_t** output);
-
-// These functions are the equivalent of the above, but compressing in a
-// lossless manner. Files are usually larger than lossy format, but will
-// not suffer any compression loss.
-WEBP_EXTERN(size_t) WebPEncodeLosslessRGB(const uint8_t* rgb,
- int width, int height, int stride,
- uint8_t** output);
-WEBP_EXTERN(size_t) WebPEncodeLosslessBGR(const uint8_t* bgr,
- int width, int height, int stride,
- uint8_t** output);
-WEBP_EXTERN(size_t) WebPEncodeLosslessRGBA(const uint8_t* rgba,
- int width, int height, int stride,
- uint8_t** output);
-WEBP_EXTERN(size_t) WebPEncodeLosslessBGRA(const uint8_t* bgra,
- int width, int height, int stride,
- uint8_t** output);
-
-//------------------------------------------------------------------------------
-// Coding parameters
-
-// Image characteristics hint for the underlying encoder.
-typedef enum {
- WEBP_HINT_DEFAULT = 0, // default preset.
- WEBP_HINT_PICTURE, // digital picture, like portrait, inner shot
- WEBP_HINT_PHOTO, // outdoor photograph, with natural lighting
- WEBP_HINT_GRAPH, // Discrete tone image (graph, map-tile etc).
- WEBP_HINT_LAST
-} WebPImageHint;
-
-typedef struct {
- int lossless; // Lossless encoding (0=lossy(default), 1=lossless).
- float quality; // between 0 (smallest file) and 100 (biggest)
- int method; // quality/speed trade-off (0=fast, 6=slower-better)
-
- WebPImageHint image_hint; // Hint for image type (lossless only for now).
-
- // Parameters related to lossy compression only:
- int target_size; // if non-zero, set the desired target size in bytes.
- // Takes precedence over the 'compression' parameter.
- float target_PSNR; // if non-zero, specifies the minimal distortion to
- // try to achieve. Takes precedence over target_size.
- int segments; // maximum number of segments to use, in [1..4]
- int sns_strength; // Spatial Noise Shaping. 0=off, 100=maximum.
- int filter_strength; // range: [0 = off .. 100 = strongest]
- int filter_sharpness; // range: [0 = off .. 7 = least sharp]
- int filter_type; // filtering type: 0 = simple, 1 = strong (only used
- // if filter_strength > 0 or autofilter > 0)
- int autofilter; // Auto adjust filter's strength [0 = off, 1 = on]
- int alpha_compression; // Algorithm for encoding the alpha plane (0 = none,
- // 1 = compressed with WebP lossless). Default is 1.
- int alpha_filtering; // Predictive filtering method for alpha plane.
- // 0: none, 1: fast, 2: best. Default if 1.
- int alpha_quality; // Between 0 (smallest size) and 100 (lossless).
- // Default is 100.
- int pass; // number of entropy-analysis passes (in [1..10]).
-
- int show_compressed; // if true, export the compressed picture back.
- // In-loop filtering is not applied.
- int preprocessing; // preprocessing filter (0=none, 1=segment-smooth)
- int partitions; // log2(number of token partitions) in [0..3]. Default
- // is set to 0 for easier progressive decoding.
- int partition_limit; // quality degradation allowed to fit the 512k limit
- // on prediction modes coding (0: no degradation,
- // 100: maximum possible degradation).
-
- uint32_t pad[8]; // padding for later use
-} WebPConfig;
-
-// Enumerate some predefined settings for WebPConfig, depending on the type
-// of source picture. These presets are used when calling WebPConfigPreset().
-typedef enum {
- WEBP_PRESET_DEFAULT = 0, // default preset.
- WEBP_PRESET_PICTURE, // digital picture, like portrait, inner shot
- WEBP_PRESET_PHOTO, // outdoor photograph, with natural lighting
- WEBP_PRESET_DRAWING, // hand or line drawing, with high-contrast details
- WEBP_PRESET_ICON, // small-sized colorful images
- WEBP_PRESET_TEXT // text-like
-} WebPPreset;
-
-// Internal, version-checked, entry point
-WEBP_EXTERN(int) WebPConfigInitInternal(WebPConfig*, WebPPreset, float, int);
-
-// Should always be called, to initialize a fresh WebPConfig structure before
-// modification. Returns false in case of version mismatch. WebPConfigInit()
-// must have succeeded before using the 'config' object.
-// Note that the default values are lossless=0 and quality=75.
-static WEBP_INLINE int WebPConfigInit(WebPConfig* config) {
- return WebPConfigInitInternal(config, WEBP_PRESET_DEFAULT, 75.f,
- WEBP_ENCODER_ABI_VERSION);
-}
-
-// This function will initialize the configuration according to a predefined
-// set of parameters (referred to by 'preset') and a given quality factor.
-// This function can be called as a replacement to WebPConfigInit(). Will
-// return false in case of error.
-static WEBP_INLINE int WebPConfigPreset(WebPConfig* config,
- WebPPreset preset, float quality) {
- return WebPConfigInitInternal(config, preset, quality,
- WEBP_ENCODER_ABI_VERSION);
-}
-
-// Returns true if 'config' is non-NULL and all configuration parameters are
-// within their valid ranges.
-WEBP_EXTERN(int) WebPValidateConfig(const WebPConfig* config);
-
-//------------------------------------------------------------------------------
-// Input / Output
-
-typedef struct WebPPicture WebPPicture; // main structure for I/O
-
-// Structure for storing auxiliary statistics (mostly for lossy encoding).
-typedef struct {
- int coded_size; // final size
-
- float PSNR[5]; // peak-signal-to-noise ratio for Y/U/V/All/Alpha
- int block_count[3]; // number of intra4/intra16/skipped macroblocks
- int header_bytes[2]; // approximate number of bytes spent for header
- // and mode-partition #0
- int residual_bytes[3][4]; // approximate number of bytes spent for
- // DC/AC/uv coefficients for each (0..3) segments.
- int segment_size[4]; // number of macroblocks in each segments
- int segment_quant[4]; // quantizer values for each segments
- int segment_level[4]; // filtering strength for each segments [0..63]
-
- int alpha_data_size; // size of the transparency data
- int layer_data_size; // size of the enhancement layer data
-
- // lossless encoder statistics
- uint32_t lossless_features; // bit0:predictor bit1:cross-color transform
- // bit2:subtract-green bit3:color indexing
- int histogram_bits; // number of precision bits of histogram
- int transform_bits; // precision bits for transform
- int cache_bits; // number of bits for color cache lookup
- int palette_size; // number of color in palette, if used
- int lossless_size; // final lossless size
-
- uint32_t pad[4]; // padding for later use
-} WebPAuxStats;
-
-// Signature for output function. Should return true if writing was successful.
-// data/data_size is the segment of data to write, and 'picture' is for
-// reference (and so one can make use of picture->custom_ptr).
-typedef int (*WebPWriterFunction)(const uint8_t* data, size_t data_size,
- const WebPPicture* picture);
-
-// WebPMemoryWrite: a special WebPWriterFunction that writes to memory using
-// the following WebPMemoryWriter object (to be set as a custom_ptr).
-typedef struct {
- uint8_t* mem; // final buffer (of size 'max_size', larger than 'size').
- size_t size; // final size
- size_t max_size; // total capacity
- uint32_t pad[1]; // padding for later use
-} WebPMemoryWriter;
-
-// The following must be called first before any use.
-WEBP_EXTERN(void) WebPMemoryWriterInit(WebPMemoryWriter* writer);
-
-// The custom writer to be used with WebPMemoryWriter as custom_ptr. Upon
-// completion, writer.mem and writer.size will hold the coded data.
-WEBP_EXTERN(int) WebPMemoryWrite(const uint8_t* data, size_t data_size,
- const WebPPicture* picture);
-
-// Progress hook, called from time to time to report progress. It can return
-// false to request an abort of the encoding process, or true otherwise if
-// everything is OK.
-typedef int (*WebPProgressHook)(int percent, const WebPPicture* picture);
-
-typedef enum {
- // chroma sampling
- WEBP_YUV420 = 0, // 4:2:0
- WEBP_YUV422 = 1, // 4:2:2
- WEBP_YUV444 = 2, // 4:4:4
- WEBP_YUV400 = 3, // grayscale
- WEBP_CSP_UV_MASK = 3, // bit-mask to get the UV sampling factors
- // alpha channel variants
- WEBP_YUV420A = 4,
- WEBP_YUV422A = 5,
- WEBP_YUV444A = 6,
- WEBP_YUV400A = 7, // grayscale + alpha
- WEBP_CSP_ALPHA_BIT = 4 // bit that is set if alpha is present
-} WebPEncCSP;
-
-// Encoding error conditions.
-typedef enum {
- VP8_ENC_OK = 0,
- VP8_ENC_ERROR_OUT_OF_MEMORY, // memory error allocating objects
- VP8_ENC_ERROR_BITSTREAM_OUT_OF_MEMORY, // memory error while flushing bits
- VP8_ENC_ERROR_NULL_PARAMETER, // a pointer parameter is NULL
- VP8_ENC_ERROR_INVALID_CONFIGURATION, // configuration is invalid
- VP8_ENC_ERROR_BAD_DIMENSION, // picture has invalid width/height
- VP8_ENC_ERROR_PARTITION0_OVERFLOW, // partition is bigger than 512k
- VP8_ENC_ERROR_PARTITION_OVERFLOW, // partition is bigger than 16M
- VP8_ENC_ERROR_BAD_WRITE, // error while flushing bytes
- VP8_ENC_ERROR_FILE_TOO_BIG, // file is bigger than 4G
- VP8_ENC_ERROR_USER_ABORT, // abort request by user
- VP8_ENC_ERROR_LAST // list terminator. always last.
-} WebPEncodingError;
-
-// maximum width/height allowed (inclusive), in pixels
-#define WEBP_MAX_DIMENSION 16383
-
-// Main exchange structure (input samples, output bytes, statistics)
-struct WebPPicture {
-
- // INPUT
- //////////////
- // Main flag for encoder selecting between ARGB or YUV input.
- // It is recommended to use ARGB input (*argb, argb_stride) for lossless
- // compression, and YUV input (*y, *u, *v, etc.) for lossy compression
- // since these are the respective native colorspace for these formats.
- int use_argb;
-
- // YUV input (mostly used for input to lossy compression)
- WebPEncCSP colorspace; // colorspace: should be YUV420 for now (=Y'CbCr).
- int width, height; // dimensions (less or equal to WEBP_MAX_DIMENSION)
- uint8_t *y, *u, *v; // pointers to luma/chroma planes.
- int y_stride, uv_stride; // luma/chroma strides.
- uint8_t* a; // pointer to the alpha plane
- int a_stride; // stride of the alpha plane
- uint32_t pad1[2]; // padding for later use
-
- // ARGB input (mostly used for input to lossless compression)
- uint32_t* argb; // Pointer to argb (32 bit) plane.
- int argb_stride; // This is stride in pixels units, not bytes.
- uint32_t pad2[3]; // padding for later use
-
- // OUTPUT
- ///////////////
- // Byte-emission hook, to store compressed bytes as they are ready.
- WebPWriterFunction writer; // can be NULL
- void* custom_ptr; // can be used by the writer.
-
- // map for extra information (only for lossy compression mode)
- int extra_info_type; // 1: intra type, 2: segment, 3: quant
- // 4: intra-16 prediction mode,
- // 5: chroma prediction mode,
- // 6: bit cost, 7: distortion
- uint8_t* extra_info; // if not NULL, points to an array of size
- // ((width + 15) / 16) * ((height + 15) / 16) that
- // will be filled with a macroblock map, depending
- // on extra_info_type.
-
- // STATS AND REPORTS
- ///////////////////////////
- // Pointer to side statistics (updated only if not NULL)
- WebPAuxStats* stats;
-
- // Error code for the latest error encountered during encoding
- WebPEncodingError error_code;
-
- // If not NULL, report progress during encoding.
- WebPProgressHook progress_hook;
-
- void* user_data; // this field is free to be set to any value and
- // used during callbacks (like progress-report e.g.).
-
- uint32_t pad3[3]; // padding for later use
-
- // Unused for now: original samples (for non-YUV420 modes)
- uint8_t *u0, *v0;
- int uv0_stride;
-
- uint32_t pad4[7]; // padding for later use
-
- // PRIVATE FIELDS
- ////////////////////
- void* memory_; // row chunk of memory for yuva planes
- void* memory_argb_; // and for argb too.
- void* pad5[2]; // padding for later use
-};
-
-// Internal, version-checked, entry point
-WEBP_EXTERN(int) WebPPictureInitInternal(WebPPicture*, int);
-
-// Should always be called, to initialize the structure. Returns false in case
-// of version mismatch. WebPPictureInit() must have succeeded before using the
-// 'picture' object.
-// Note that, by default, use_argb is false and colorspace is WEBP_YUV420.
-static WEBP_INLINE int WebPPictureInit(WebPPicture* picture) {
- return WebPPictureInitInternal(picture, WEBP_ENCODER_ABI_VERSION);
-}
-
-//------------------------------------------------------------------------------
-// WebPPicture utils
-
-// Convenience allocation / deallocation based on picture->width/height:
-// Allocate y/u/v buffers as per colorspace/width/height specification.
-// Note! This function will free the previous buffer if needed.
-// Returns false in case of memory error.
-WEBP_EXTERN(int) WebPPictureAlloc(WebPPicture* picture);
-
-// Release the memory allocated by WebPPictureAlloc() or WebPPictureImport*().
-// Note that this function does _not_ free the memory used by the 'picture'
-// object itself.
-// Besides memory (which is reclaimed) all other fields of 'picture' are
-// preserved.
-WEBP_EXTERN(void) WebPPictureFree(WebPPicture* picture);
-
-// Copy the pixels of *src into *dst, using WebPPictureAlloc. Upon return,
-// *dst will fully own the copied pixels (this is not a view).
-// Returns false in case of memory allocation error.
-WEBP_EXTERN(int) WebPPictureCopy(const WebPPicture* src, WebPPicture* dst);
-
-// Compute PSNR or SSIM distortion between two pictures.
-// Result is in dB, stores in result[] in the Y/U/V/Alpha/All order.
-// Returns false in case of error (pic1 and pic2 don't have same dimension, ...)
-// Warning: this function is rather CPU-intensive.
-WEBP_EXTERN(int) WebPPictureDistortion(
- const WebPPicture* pic1, const WebPPicture* pic2,
- int metric_type, // 0 = PSNR, 1 = SSIM
- float result[5]);
-
-// self-crops a picture to the rectangle defined by top/left/width/height.
-// Returns false in case of memory allocation error, or if the rectangle is
-// outside of the source picture.
-// The rectangle for the view is defined by the top-left corner pixel
-// coordinates (left, top) as well as its width and height. This rectangle
-// must be fully be comprised inside the 'src' source picture. If the source
-// picture uses the YUV420 colorspace, the top and left coordinates will be
-// snapped to even values.
-WEBP_EXTERN(int) WebPPictureCrop(WebPPicture* picture,
- int left, int top, int width, int height);
-
-// Extracts a view from 'src' picture into 'dst'. The rectangle for the view
-// is defined by the top-left corner pixel coordinates (left, top) as well
-// as its width and height. This rectangle must be fully be comprised inside
-// the 'src' source picture. If the source picture uses the YUV420 colorspace,
-// the top and left coordinates will be snapped to even values.
-// Picture 'src' must out-live 'dst' picture. Self-extraction of view is allowed
-// ('src' equal to 'dst') as a mean of fast-cropping (but note that doing so,
-// the original dimension will be lost).
-// Returns false in case of memory allocation error or invalid parameters.
-WEBP_EXTERN(int) WebPPictureView(const WebPPicture* src,
- int left, int top, int width, int height,
- WebPPicture* dst);
-
-// Returns true if the 'picture' is actually a view and therefore does
-// not own the memory for pixels.
-WEBP_EXTERN(int) WebPPictureIsView(const WebPPicture* picture);
-
-// Rescale a picture to new dimension width x height.
-// Now gamma correction is applied.
-// Returns false in case of error (invalid parameter or insufficient memory).
-WEBP_EXTERN(int) WebPPictureRescale(WebPPicture* pic, int width, int height);
-
-// Colorspace conversion function to import RGB samples.
-// Previous buffer will be free'd, if any.
-// *rgb buffer should have a size of at least height * rgb_stride.
-// Returns false in case of memory error.
-WEBP_EXTERN(int) WebPPictureImportRGB(
- WebPPicture* picture, const uint8_t* rgb, int rgb_stride);
-// Same, but for RGBA buffer.
-WEBP_EXTERN(int) WebPPictureImportRGBA(
- WebPPicture* picture, const uint8_t* rgba, int rgba_stride);
-// Same, but for RGBA buffer. Imports the RGB direct from the 32-bit format
-// input buffer ignoring the alpha channel. Avoids needing to copy the data
-// to a temporary 24-bit RGB buffer to import the RGB only.
-WEBP_EXTERN(int) WebPPictureImportRGBX(
- WebPPicture* picture, const uint8_t* rgbx, int rgbx_stride);
-
-// Variants of the above, but taking BGR(A|X) input.
-WEBP_EXTERN(int) WebPPictureImportBGR(
- WebPPicture* picture, const uint8_t* bgr, int bgr_stride);
-WEBP_EXTERN(int) WebPPictureImportBGRA(
- WebPPicture* picture, const uint8_t* bgra, int bgra_stride);
-WEBP_EXTERN(int) WebPPictureImportBGRX(
- WebPPicture* picture, const uint8_t* bgrx, int bgrx_stride);
-
-// Converts picture->argb data to the YUVA format specified by 'colorspace'.
-// Upon return, picture->use_argb is set to false. The presence of real
-// non-opaque transparent values is detected, and 'colorspace' will be
-// adjusted accordingly. Note that this method is lossy.
-// Returns false in case of error.
-WEBP_EXTERN(int) WebPPictureARGBToYUVA(WebPPicture* picture,
- WebPEncCSP colorspace);
-
-// Converts picture->yuv to picture->argb and sets picture->use_argb to true.
-// The input format must be YUV_420 or YUV_420A.
-// Note that the use of this method is discouraged if one has access to the
-// raw ARGB samples, since using YUV420 is comparatively lossy. Also, the
-// conversion from YUV420 to ARGB incurs a small loss too.
-// Returns false in case of error.
-WEBP_EXTERN(int) WebPPictureYUVAToARGB(WebPPicture* picture);
-
-// Helper function: given a width x height plane of YUV(A) samples
-// (with stride 'stride'), clean-up the YUV samples under fully transparent
-// area, to help compressibility (no guarantee, though).
-WEBP_EXTERN(void) WebPCleanupTransparentArea(WebPPicture* picture);
-
-// Scan the picture 'picture' for the presence of non fully opaque alpha values.
-// Returns true in such case. Otherwise returns false (indicating that the
-// alpha plane can be ignored altogether e.g.).
-WEBP_EXTERN(int) WebPPictureHasTransparency(const WebPPicture* picture);
-
-//------------------------------------------------------------------------------
-// Main call
-
-// Main encoding call, after config and picture have been initialized.
-// 'picture' must be less than 16384x16384 in dimension (cf WEBP_MAX_DIMENSION),
-// and the 'config' object must be a valid one.
-// Returns false in case of error, true otherwise.
-// In case of error, picture->error_code is updated accordingly.
-// 'picture' can hold the source samples in both YUV(A) or ARGB input, depending
-// on the value of 'picture->use_argb'. It is highly recommended to use
-// the former for lossy encoding, and the latter for lossless encoding
-// (when config.lossless is true). Automatic conversion from one format to
-// another is provided but they both incur some loss.
-WEBP_EXTERN(int) WebPEncode(const WebPConfig* config, WebPPicture* picture);
-
-//------------------------------------------------------------------------------
-
-#if defined(__cplusplus) || defined(c_plusplus)
-} // extern "C"
-#endif
-
-#endif /* WEBP_WEBP_ENCODE_H_ */
diff --git a/drivers/webpold/format_constants.h b/drivers/webpold/format_constants.h
deleted file mode 100644
index 7ce498f672..0000000000
--- a/drivers/webpold/format_constants.h
+++ /dev/null
@@ -1,90 +0,0 @@
-// Copyright 2012 Google Inc. All Rights Reserved.
-//
-// This code is licensed under the same terms as WebM:
-// Software License Agreement: http://www.webmproject.org/license/software/
-// Additional IP Rights Grant: http://www.webmproject.org/license/additional/
-// -----------------------------------------------------------------------------
-//
-// Internal header for constants related to WebP file format.
-//
-// Author: Urvang (urvang@google.com)
-
-#ifndef WEBP_WEBP_FORMAT_CONSTANTS_H_
-#define WEBP_WEBP_FORMAT_CONSTANTS_H_
-
-// VP8 related constants.
-#define VP8_SIGNATURE 0x9d012a // Signature in VP8 data.
-#define VP8_MAX_PARTITION0_SIZE (1 << 19) // max size of mode partition
-#define VP8_MAX_PARTITION_SIZE (1 << 24) // max size for token partition
-#define VP8_FRAME_HEADER_SIZE 10 // Size of the frame header within VP8 data.
-
-// VP8L related constants.
-#define VP8L_SIGNATURE_SIZE 1 // VP8L signature size.
-#define VP8L_MAGIC_BYTE 0x2f // VP8L signature byte.
-#define VP8L_IMAGE_SIZE_BITS 14 // Number of bits used to store
- // width and height.
-#define VP8L_VERSION_BITS 3 // 3 bits reserved for version.
-#define VP8L_VERSION 0 // version 0
-#define VP8L_FRAME_HEADER_SIZE 5 // Size of the VP8L frame header.
-
-#define MAX_PALETTE_SIZE 256
-#define MAX_CACHE_BITS 11
-#define HUFFMAN_CODES_PER_META_CODE 5
-#define ARGB_BLACK 0xff000000
-
-#define DEFAULT_CODE_LENGTH 8
-#define MAX_ALLOWED_CODE_LENGTH 15
-
-#define NUM_LITERAL_CODES 256
-#define NUM_LENGTH_CODES 24
-#define NUM_DISTANCE_CODES 40
-#define CODE_LENGTH_CODES 19
-
-#define MIN_HUFFMAN_BITS 2 // min number of Huffman bits
-#define MAX_HUFFMAN_BITS 9 // max number of Huffman bits
-
-#define TRANSFORM_PRESENT 1 // The bit to be written when next data
- // to be read is a transform.
-#define NUM_TRANSFORMS 4 // Maximum number of allowed transform
- // in a bitstream.
-typedef enum {
- PREDICTOR_TRANSFORM = 0,
- CROSS_COLOR_TRANSFORM = 1,
- SUBTRACT_GREEN = 2,
- COLOR_INDEXING_TRANSFORM = 3
-} VP8LImageTransformType;
-
-// Alpha related constants.
-#define ALPHA_HEADER_LEN 1
-#define ALPHA_NO_COMPRESSION 0
-#define ALPHA_LOSSLESS_COMPRESSION 1
-#define ALPHA_PREPROCESSED_LEVELS 1
-
-// Mux related constants.
-#define TAG_SIZE 4 // Size of a chunk tag (e.g. "VP8L").
-#define CHUNK_SIZE_BYTES 4 // Size needed to store chunk's size.
-#define CHUNK_HEADER_SIZE 8 // Size of a chunk header.
-#define RIFF_HEADER_SIZE 12 // Size of the RIFF header ("RIFFnnnnWEBP").
-#define FRAME_CHUNK_SIZE 15 // Size of a FRM chunk.
-#define LOOP_CHUNK_SIZE 2 // Size of a LOOP chunk.
-#define TILE_CHUNK_SIZE 6 // Size of a TILE chunk.
-#define VP8X_CHUNK_SIZE 10 // Size of a VP8X chunk.
-
-#define TILING_FLAG_BIT 0x01 // Set if tiles are possibly used.
-#define ANIMATION_FLAG_BIT 0x02 // Set if some animation is expected
-#define ICC_FLAG_BIT 0x04 // Whether ICC is present or not.
-#define METADATA_FLAG_BIT 0x08 // Set if some META chunk is possibly present.
-#define ALPHA_FLAG_BIT 0x10 // Should be same as the ALPHA_FLAG in mux.h
-#define ROTATION_FLAG_BITS 0xe0 // all 3 bits for rotation + symmetry
-
-#define MAX_CANVAS_SIZE (1 << 24) // 24-bit max for VP8X width/height.
-#define MAX_IMAGE_AREA (1ULL << 32) // 32-bit max for width x height.
-#define MAX_LOOP_COUNT (1 << 16) // maximum value for loop-count
-#define MAX_DURATION (1 << 24) // maximum duration
-#define MAX_POSITION_OFFSET (1 << 24) // maximum frame/tile x/y offset
-
-// Maximum chunk payload is such that adding the header and padding won't
-// overflow a uint32_t.
-#define MAX_CHUNK_PAYLOAD (~0U - CHUNK_HEADER_SIZE - 1)
-
-#endif /* WEBP_WEBP_FORMAT_CONSTANTS_H_ */
diff --git a/drivers/webpold/image_loader_webp.cpp b/drivers/webpold/image_loader_webp.cpp
deleted file mode 100644
index 68bb857293..0000000000
--- a/drivers/webpold/image_loader_webp.cpp
+++ /dev/null
@@ -1,182 +0,0 @@
-/*************************************************************************/
-/* image_loader_webp.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* http://www.godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
-#include "image_loader_webp.h"
-
-#include "print_string.h"
-#include "os/os.h"
-#include "drivers/webp/decode.h"
-#include "drivers/webp/encode.h"
-#include "io/marshalls.h"
-#include <stdlib.h>
-
-static DVector<uint8_t> _webp_lossy_pack(const Image& p_image,float p_quality) {
-
- ERR_FAIL_COND_V(p_image.empty(),DVector<uint8_t>());
-
- Image img=p_image;
- if (img.detect_alpha())
- img.convert(Image::FORMAT_RGBA);
- else
- img.convert(Image::FORMAT_RGB);
-
- Size2 s(img.get_width(),img.get_height());
- DVector<uint8_t> data = img.get_data();
- DVector<uint8_t>::Read r = data.read();
-
- uint8_t *dst_buff=NULL;
- size_t dst_size=0;
- if (img.get_format()==Image::FORMAT_RGB) {
-
- dst_size = WebPEncodeRGB(r.ptr(),s.width,s.height,3*s.width,CLAMP(p_quality*100.0,0,100.0),&dst_buff);
- } else {
- dst_size = WebPEncodeRGBA(r.ptr(),s.width,s.height,4*s.width,CLAMP(p_quality*100.0,0,100.0),&dst_buff);
- }
-
- ERR_FAIL_COND_V(dst_size==0,DVector<uint8_t>());
- DVector<uint8_t> dst;
- dst.resize(4+dst_size);
- DVector<uint8_t>::Write w = dst.write();
- w[0]='W';
- w[1]='E';
- w[2]='B';
- w[3]='P';
- copymem(&w[4],dst_buff,dst_size);
- free(dst_buff);
- w=DVector<uint8_t>::Write();
- return dst;
-}
-
-static Image _webp_lossy_unpack(const DVector<uint8_t>& p_buffer) {
-
- int size = p_buffer.size()-4;
- ERR_FAIL_COND_V(size<=0,Image());
- DVector<uint8_t>::Read r = p_buffer.read();
-
- ERR_FAIL_COND_V(r[0]!='W' || r[1]!='E' || r[2]!='B' || r[3]!='P',Image());
- WebPBitstreamFeatures features;
- if (WebPGetFeatures(&r[4],size,&features)!=VP8_STATUS_OK) {
- ERR_EXPLAIN("Error unpacking WEBP image:");
- ERR_FAIL_V(Image());
- }
-
- //print_line("width: "+itos(features.width));
- //print_line("height: "+itos(features.height));
- //print_line("alpha: "+itos(features.has_alpha));
-
- DVector<uint8_t> dst_image;
- int datasize = features.width*features.height*(features.has_alpha?4:3);
- dst_image.resize(datasize);
-
- DVector<uint8_t>::Write dst_w = dst_image.write();
-
- bool errdec=false;
- if (features.has_alpha) {
- errdec = WebPDecodeRGBAInto(&r[4],size,dst_w.ptr(),datasize,4*features.width)==NULL;
- } else {
- errdec = WebPDecodeRGBInto(&r[4],size,dst_w.ptr(),datasize,3*features.width)==NULL;
-
- }
-
- //ERR_EXPLAIN("Error decoding webp! - "+p_file);
- ERR_FAIL_COND_V(errdec,Image());
-
- dst_w = DVector<uint8_t>::Write();
-
- return Image(features.width,features.height,0,features.has_alpha?Image::FORMAT_RGBA:Image::FORMAT_RGB,dst_image);
-
-}
-
-
-Error ImageLoaderWEBP::load_image(Image *p_image,FileAccess *f) {
-
-
- uint32_t size = f->get_len();
- DVector<uint8_t> src_image;
- src_image.resize(size);
-
- WebPBitstreamFeatures features;
-
- DVector<uint8_t>::Write src_w = src_image.write();
- f->get_buffer(src_w.ptr(),size);
- ERR_FAIL_COND_V(f->eof_reached(), ERR_FILE_EOF);
-
- if (WebPGetFeatures(src_w.ptr(),size,&features)!=VP8_STATUS_OK) {
- f->close();
- //ERR_EXPLAIN("Error decoding WEBP image: "+p_file);
- ERR_FAIL_V(ERR_FILE_CORRUPT);
- }
-
- print_line("width: "+itos(features.width));
- print_line("height: "+itos(features.height));
- print_line("alpha: "+itos(features.has_alpha));
-
- src_w = DVector<uint8_t>::Write();
-
- DVector<uint8_t> dst_image;
- int datasize = features.width*features.height*(features.has_alpha?4:3);
- dst_image.resize(datasize);
-
- DVector<uint8_t>::Read src_r = src_image.read();
- DVector<uint8_t>::Write dst_w = dst_image.write();
-
-
- bool errdec=false;
- if (features.has_alpha) {
- errdec = WebPDecodeRGBAInto(src_r.ptr(),size,dst_w.ptr(),datasize,4*features.width)==NULL;
- } else {
- errdec = WebPDecodeRGBInto(src_r.ptr(),size,dst_w.ptr(),datasize,3*features.width)==NULL;
-
- }
-
- //ERR_EXPLAIN("Error decoding webp! - "+p_file);
- ERR_FAIL_COND_V(errdec,ERR_FILE_CORRUPT);
-
- src_r = DVector<uint8_t>::Read();
- dst_w = DVector<uint8_t>::Write();
-
- *p_image = Image(features.width,features.height,0,features.has_alpha?Image::FORMAT_RGBA:Image::FORMAT_RGB,dst_image);
-
-
- return OK;
-
-}
-
-void ImageLoaderWEBP::get_recognized_extensions(List<String> *p_extensions) const {
-
- p_extensions->push_back("webp");
-}
-
-
-ImageLoaderWEBP::ImageLoaderWEBP() {
-
- Image::lossy_packer=_webp_lossy_pack;
- Image::lossy_unpacker=_webp_lossy_unpack;
-}
-
-
diff --git a/drivers/webpold/image_loader_webp.h b/drivers/webpold/image_loader_webp.h
deleted file mode 100644
index 24f79708db..0000000000
--- a/drivers/webpold/image_loader_webp.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/*************************************************************************/
-/* image_loader_webp.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* http://www.godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
-#ifndef IMAGE_LOADER_WEBP_H
-#define IMAGE_LOADER_WEBP_H
-
-#include "io/image_loader.h"
-
-/**
- @author Juan Linietsky <reduzio@gmail.com>
-*/
-class ImageLoaderWEBP : public ImageFormatLoader {
-
-
-public:
-
- virtual Error load_image(Image *p_image,FileAccess *f);
- virtual void get_recognized_extensions(List<String> *p_extensions) const;
- ImageLoaderWEBP();
-};
-
-
-
-#endif
diff --git a/drivers/webpold/mux.h b/drivers/webpold/mux.h
deleted file mode 100644
index 5139af80fa..0000000000
--- a/drivers/webpold/mux.h
+++ /dev/null
@@ -1,604 +0,0 @@
-// Copyright 2011 Google Inc. All Rights Reserved.
-//
-// This code is licensed under the same terms as WebM:
-// Software License Agreement: http://www.webmproject.org/license/software/
-// Additional IP Rights Grant: http://www.webmproject.org/license/additional/
-// -----------------------------------------------------------------------------
-//
-// RIFF container manipulation for WEBP images.
-//
-// Authors: Urvang (urvang@google.com)
-// Vikas (vikasa@google.com)
-
-// This API allows manipulation of WebP container images containing features
-// like Color profile, XMP metadata, Animation and Tiling.
-//
-// Code Example#1: Creating a MUX with image data, color profile and XMP
-// metadata.
-//
-// int copy_data = 0;
-// WebPMux* mux = WebPMuxNew();
-// // ... (Prepare image data).
-// WebPMuxSetImage(mux, &image, copy_data);
-// // ... (Prepare ICCP color profile data).
-// WebPMuxSetColorProfile(mux, &icc_profile, copy_data);
-// // ... (Prepare XMP metadata).
-// WebPMuxSetMetadata(mux, &xmp, copy_data);
-// // Get data from mux in WebP RIFF format.
-// WebPMuxAssemble(mux, &output_data);
-// WebPMuxDelete(mux);
-// // ... (Consume output_data; e.g. write output_data.bytes_ to file).
-// WebPDataClear(&output_data);
-//
-// Code Example#2: Get image and color profile data from a WebP file.
-//
-// int copy_data = 0;
-// // ... (Read data from file).
-// WebPMux* mux = WebPMuxCreate(&data, copy_data);
-// WebPMuxGetImage(mux, &image);
-// // ... (Consume image; e.g. call WebPDecode() to decode the data).
-// WebPMuxGetColorProfile(mux, &icc_profile);
-// // ... (Consume icc_data).
-// WebPMuxDelete(mux);
-// free(data);
-
-#ifndef WEBP_WEBP_MUX_H_
-#define WEBP_WEBP_MUX_H_
-
-#include "./types.h"
-
-#if defined(__cplusplus) || defined(c_plusplus)
-extern "C" {
-#endif
-
-#define WEBP_MUX_ABI_VERSION 0x0100 // MAJOR(8b) + MINOR(8b)
-
-// Error codes
-typedef enum {
- WEBP_MUX_OK = 1,
- WEBP_MUX_NOT_FOUND = 0,
- WEBP_MUX_INVALID_ARGUMENT = -1,
- WEBP_MUX_BAD_DATA = -2,
- WEBP_MUX_MEMORY_ERROR = -3,
- WEBP_MUX_NOT_ENOUGH_DATA = -4
-} WebPMuxError;
-
-// Flag values for different features used in VP8X chunk.
-typedef enum {
- TILE_FLAG = 0x00000001,
- ANIMATION_FLAG = 0x00000002,
- ICCP_FLAG = 0x00000004,
- META_FLAG = 0x00000008,
- ALPHA_FLAG = 0x00000010
-} WebPFeatureFlags;
-
-// IDs for different types of chunks.
-typedef enum {
- WEBP_CHUNK_VP8X, // VP8X
- WEBP_CHUNK_ICCP, // ICCP
- WEBP_CHUNK_LOOP, // LOOP
- WEBP_CHUNK_FRAME, // FRM
- WEBP_CHUNK_TILE, // TILE
- WEBP_CHUNK_ALPHA, // ALPH
- WEBP_CHUNK_IMAGE, // VP8/VP8L
- WEBP_CHUNK_META, // META
- WEBP_CHUNK_UNKNOWN, // Other chunks.
- WEBP_CHUNK_NIL
-} WebPChunkId;
-
-typedef struct WebPMux WebPMux; // main opaque object.
-
-// Data type used to describe 'raw' data, e.g., chunk data
-// (ICC profile, metadata) and WebP compressed image data.
-typedef struct {
- const uint8_t* bytes_;
- size_t size_;
-} WebPData;
-
-//------------------------------------------------------------------------------
-// Manipulation of a WebPData object.
-
-// Initializes the contents of the 'webp_data' object with default values.
-WEBP_EXTERN(void) WebPDataInit(WebPData* webp_data);
-
-// Clears the contents of the 'webp_data' object by calling free(). Does not
-// deallocate the object itself.
-WEBP_EXTERN(void) WebPDataClear(WebPData* webp_data);
-
-// Allocates necessary storage for 'dst' and copies the contents of 'src'.
-// Returns true on success.
-WEBP_EXTERN(int) WebPDataCopy(const WebPData* src, WebPData* dst);
-
-//------------------------------------------------------------------------------
-// Life of a Mux object
-
-// Internal, version-checked, entry point
-WEBP_EXTERN(WebPMux*) WebPNewInternal(int);
-
-// Creates an empty mux object.
-// Returns:
-// A pointer to the newly created empty mux object.
-static WEBP_INLINE WebPMux* WebPMuxNew(void) {
- return WebPNewInternal(WEBP_MUX_ABI_VERSION);
-}
-
-// Deletes the mux object.
-// Parameters:
-// mux - (in/out) object to be deleted
-WEBP_EXTERN(void) WebPMuxDelete(WebPMux* mux);
-
-//------------------------------------------------------------------------------
-// Mux creation.
-
-// Internal, version-checked, entry point
-WEBP_EXTERN(WebPMux*) WebPMuxCreateInternal(const WebPData*, int, int);
-
-// Creates a mux object from raw data given in WebP RIFF format.
-// Parameters:
-// bitstream - (in) the bitstream data in WebP RIFF format
-// copy_data - (in) value 1 indicates given data WILL copied to the mux, and
-// value 0 indicates data will NOT be copied.
-// Returns:
-// A pointer to the mux object created from given data - on success.
-// NULL - In case of invalid data or memory error.
-static WEBP_INLINE WebPMux* WebPMuxCreate(const WebPData* bitstream,
- int copy_data) {
- return WebPMuxCreateInternal(bitstream, copy_data, WEBP_MUX_ABI_VERSION);
-}
-
-//------------------------------------------------------------------------------
-// Single Image.
-
-// Sets the image in the mux object. Any existing images (including frame/tile)
-// will be removed.
-// Parameters:
-// mux - (in/out) object in which the image is to be set
-// bitstream - (in) can either be a raw VP8/VP8L bitstream or a single-image
-// WebP file (non-animated and non-tiled)
-// copy_data - (in) value 1 indicates given data WILL copied to the mux, and
-// value 0 indicates data will NOT be copied.
-// Returns:
-// WEBP_MUX_INVALID_ARGUMENT - if mux is NULL or bitstream is NULL.
-// WEBP_MUX_MEMORY_ERROR - on memory allocation error.
-// WEBP_MUX_OK - on success.
-WEBP_EXTERN(WebPMuxError) WebPMuxSetImage(WebPMux* mux,
- const WebPData* bitstream,
- int copy_data);
-
-// Gets image data from the mux object.
-// The content of 'bitstream' is allocated using malloc(), and NOT
-// owned by the 'mux' object. It MUST be deallocated by the caller by calling
-// WebPDataClear().
-// Parameters:
-// mux - (in) object from which the image is to be fetched
-// bitstream - (out) the image data
-// Returns:
-// WEBP_MUX_INVALID_ARGUMENT - if either mux or bitstream is NULL
-// OR mux contains animation/tiling.
-// WEBP_MUX_NOT_FOUND - if image is not present in mux object.
-// WEBP_MUX_OK - on success.
-WEBP_EXTERN(WebPMuxError) WebPMuxGetImage(const WebPMux* mux,
- WebPData* bitstream);
-
-// Deletes the image in the mux object.
-// Parameters:
-// mux - (in/out) object from which the image is to be deleted
-// Returns:
-// WEBP_MUX_INVALID_ARGUMENT - if mux is NULL
-// OR if mux contains animation/tiling.
-// WEBP_MUX_NOT_FOUND - if image is not present in mux object.
-// WEBP_MUX_OK - on success.
-WEBP_EXTERN(WebPMuxError) WebPMuxDeleteImage(WebPMux* mux);
-
-//------------------------------------------------------------------------------
-// XMP Metadata.
-
-// Sets the XMP metadata in the mux object. Any existing metadata chunk(s) will
-// be removed.
-// Parameters:
-// mux - (in/out) object to which the XMP metadata is to be added
-// metadata - (in) the XMP metadata data to be added
-// copy_data - (in) value 1 indicates given data WILL copied to the mux, and
-// value 0 indicates data will NOT be copied.
-// Returns:
-// WEBP_MUX_INVALID_ARGUMENT - if mux or metadata is NULL.
-// WEBP_MUX_MEMORY_ERROR - on memory allocation error.
-// WEBP_MUX_OK - on success.
-WEBP_EXTERN(WebPMuxError) WebPMuxSetMetadata(WebPMux* mux,
- const WebPData* metadata,
- int copy_data);
-
-// Gets a reference to the XMP metadata in the mux object.
-// The caller should NOT free the returned data.
-// Parameters:
-// mux - (in) object from which the XMP metadata is to be fetched
-// metadata - (out) XMP metadata
-// Returns:
-// WEBP_MUX_INVALID_ARGUMENT - if either mux or metadata is NULL.
-// WEBP_MUX_NOT_FOUND - if metadata is not present in mux object.
-// WEBP_MUX_OK - on success.
-WEBP_EXTERN(WebPMuxError) WebPMuxGetMetadata(const WebPMux* mux,
- WebPData* metadata);
-
-// Deletes the XMP metadata in the mux object.
-// Parameters:
-// mux - (in/out) object from which XMP metadata is to be deleted
-// Returns:
-// WEBP_MUX_INVALID_ARGUMENT - if mux is NULL
-// WEBP_MUX_NOT_FOUND - If mux does not contain metadata.
-// WEBP_MUX_OK - on success.
-WEBP_EXTERN(WebPMuxError) WebPMuxDeleteMetadata(WebPMux* mux);
-
-//------------------------------------------------------------------------------
-// ICC Color Profile.
-
-// Sets the color profile in the mux object. Any existing color profile chunk(s)
-// will be removed.
-// Parameters:
-// mux - (in/out) object to which the color profile is to be added
-// color_profile - (in) the color profile data to be added
-// copy_data - (in) value 1 indicates given data WILL copied to the mux, and
-// value 0 indicates data will NOT be copied.
-// Returns:
-// WEBP_MUX_INVALID_ARGUMENT - if mux or color_profile is NULL
-// WEBP_MUX_MEMORY_ERROR - on memory allocation error
-// WEBP_MUX_OK - on success
-WEBP_EXTERN(WebPMuxError) WebPMuxSetColorProfile(WebPMux* mux,
- const WebPData* color_profile,
- int copy_data);
-
-// Gets a reference to the color profile in the mux object.
-// The caller should NOT free the returned data.
-// Parameters:
-// mux - (in) object from which the color profile data is to be fetched
-// color_profile - (out) color profile data
-// Returns:
-// WEBP_MUX_INVALID_ARGUMENT - if either mux or color_profile is NULL.
-// WEBP_MUX_NOT_FOUND - if color profile is not present in mux object.
-// WEBP_MUX_OK - on success.
-WEBP_EXTERN(WebPMuxError) WebPMuxGetColorProfile(const WebPMux* mux,
- WebPData* color_profile);
-
-// Deletes the color profile in the mux object.
-// Parameters:
-// mux - (in/out) object from which color profile is to be deleted
-// Returns:
-// WEBP_MUX_INVALID_ARGUMENT - if mux is NULL
-// WEBP_MUX_NOT_FOUND - If mux does not contain color profile.
-// WEBP_MUX_OK - on success.
-WEBP_EXTERN(WebPMuxError) WebPMuxDeleteColorProfile(WebPMux* mux);
-
-//------------------------------------------------------------------------------
-// Animation.
-
-// Adds an animation frame at the end of the mux object.
-// Note: as WebP only supports even offsets, any odd offset will be snapped to
-// an even location using: offset &= ~1
-// Parameters:
-// mux - (in/out) object to which an animation frame is to be added
-// bitstream - (in) the image data corresponding to the frame. It can either
-// be a raw VP8/VP8L bitstream or a single-image WebP file
-// (non-animated and non-tiled)
-// x_offset - (in) x-offset of the frame to be added
-// y_offset - (in) y-offset of the frame to be added
-// duration - (in) duration of the frame to be added (in milliseconds)
-// copy_data - (in) value 1 indicates given data WILL copied to the mux, and
-// value 0 indicates data will NOT be copied.
-// Returns:
-// WEBP_MUX_INVALID_ARGUMENT - if mux is NULL or bitstream is NULL
-// WEBP_MUX_MEMORY_ERROR - on memory allocation error.
-// WEBP_MUX_OK - on success.
-WEBP_EXTERN(WebPMuxError) WebPMuxPushFrame(
- WebPMux* mux, const WebPData* bitstream,
- int x_offset, int y_offset, int duration, int copy_data);
-
-// TODO(urvang): Create a struct as follows to reduce argument list size:
-// typedef struct {
-// WebPData bitstream;
-// int x_offset, y_offset;
-// int duration;
-// } FrameInfo;
-
-// Gets the nth animation frame from the mux object.
-// The content of 'bitstream' is allocated using malloc(), and NOT
-// owned by the 'mux' object. It MUST be deallocated by the caller by calling
-// WebPDataClear().
-// nth=0 has a special meaning - last position.
-// Parameters:
-// mux - (in) object from which the info is to be fetched
-// nth - (in) index of the frame in the mux object
-// bitstream - (out) the image data
-// x_offset - (out) x-offset of the returned frame
-// y_offset - (out) y-offset of the returned frame
-// duration - (out) duration of the returned frame (in milliseconds)
-// Returns:
-// WEBP_MUX_INVALID_ARGUMENT - if either mux, bitstream, x_offset,
-// y_offset, or duration is NULL
-// WEBP_MUX_NOT_FOUND - if there are less than nth frames in the mux object.
-// WEBP_MUX_BAD_DATA - if nth frame chunk in mux is invalid.
-// WEBP_MUX_OK - on success.
-WEBP_EXTERN(WebPMuxError) WebPMuxGetFrame(
- const WebPMux* mux, uint32_t nth, WebPData* bitstream,
- int* x_offset, int* y_offset, int* duration);
-
-// Deletes an animation frame from the mux object.
-// nth=0 has a special meaning - last position.
-// Parameters:
-// mux - (in/out) object from which a frame is to be deleted
-// nth - (in) The position from which the frame is to be deleted
-// Returns:
-// WEBP_MUX_INVALID_ARGUMENT - if mux is NULL
-// WEBP_MUX_NOT_FOUND - If there are less than nth frames in the mux object
-// before deletion.
-// WEBP_MUX_OK - on success.
-WEBP_EXTERN(WebPMuxError) WebPMuxDeleteFrame(WebPMux* mux, uint32_t nth);
-
-// Sets the animation loop count in the mux object. Any existing loop count
-// value(s) will be removed.
-// Parameters:
-// mux - (in/out) object in which loop chunk is to be set/added
-// loop_count - (in) animation loop count value.
-// Note that loop_count of zero denotes infinite loop.
-// Returns:
-// WEBP_MUX_INVALID_ARGUMENT - if mux is NULL
-// WEBP_MUX_MEMORY_ERROR - on memory allocation error.
-// WEBP_MUX_OK - on success.
-WEBP_EXTERN(WebPMuxError) WebPMuxSetLoopCount(WebPMux* mux, int loop_count);
-
-// Gets the animation loop count from the mux object.
-// Parameters:
-// mux - (in) object from which the loop count is to be fetched
-// loop_count - (out) the loop_count value present in the LOOP chunk
-// Returns:
-// WEBP_MUX_INVALID_ARGUMENT - if either of mux or loop_count is NULL
-// WEBP_MUX_NOT_FOUND - if loop chunk is not present in mux object.
-// WEBP_MUX_OK - on success.
-WEBP_EXTERN(WebPMuxError) WebPMuxGetLoopCount(const WebPMux* mux,
- int* loop_count);
-
-//------------------------------------------------------------------------------
-// Tiling.
-
-// Adds a tile at the end of the mux object.
-// Note: as WebP only supports even offsets, any odd offset will be snapped to
-// an even location using: offset &= ~1
-// Parameters:
-// mux - (in/out) object to which a tile is to be added.
-// bitstream - (in) the image data corresponding to the frame. It can either
-// be a raw VP8/VP8L bitstream or a single-image WebP file
-// (non-animated and non-tiled)
-// x_offset - (in) x-offset of the tile to be added
-// y_offset - (in) y-offset of the tile to be added
-// copy_data - (in) value 1 indicates given data WILL copied to the mux, and
-// value 0 indicates data will NOT be copied.
-// Returns:
-// WEBP_MUX_INVALID_ARGUMENT - if mux is NULL or bitstream is NULL
-// WEBP_MUX_MEMORY_ERROR - on memory allocation error.
-// WEBP_MUX_OK - on success.
-WEBP_EXTERN(WebPMuxError) WebPMuxPushTile(
- WebPMux* mux, const WebPData* bitstream,
- int x_offset, int y_offset, int copy_data);
-
-// Gets the nth tile from the mux object.
-// The content of 'bitstream' is allocated using malloc(), and NOT
-// owned by the 'mux' object. It MUST be deallocated by the caller by calling
-// WebPDataClear().
-// nth=0 has a special meaning - last position.
-// Parameters:
-// mux - (in) object from which the info is to be fetched
-// nth - (in) index of the tile in the mux object
-// bitstream - (out) the image data
-// x_offset - (out) x-offset of the returned tile
-// y_offset - (out) y-offset of the returned tile
-// Returns:
-// WEBP_MUX_INVALID_ARGUMENT - if either mux, bitstream, x_offset or
-// y_offset is NULL
-// WEBP_MUX_NOT_FOUND - if there are less than nth tiles in the mux object.
-// WEBP_MUX_BAD_DATA - if nth tile chunk in mux is invalid.
-// WEBP_MUX_OK - on success.
-WEBP_EXTERN(WebPMuxError) WebPMuxGetTile(
- const WebPMux* mux, uint32_t nth, WebPData* bitstream,
- int* x_offset, int* y_offset);
-
-// Deletes a tile from the mux object.
-// nth=0 has a special meaning - last position
-// Parameters:
-// mux - (in/out) object from which a tile is to be deleted
-// nth - (in) The position from which the tile is to be deleted
-// Returns:
-// WEBP_MUX_INVALID_ARGUMENT - if mux is NULL
-// WEBP_MUX_NOT_FOUND - If there are less than nth tiles in the mux object
-// before deletion.
-// WEBP_MUX_OK - on success.
-WEBP_EXTERN(WebPMuxError) WebPMuxDeleteTile(WebPMux* mux, uint32_t nth);
-
-//------------------------------------------------------------------------------
-// Misc Utilities.
-
-// Gets the feature flags from the mux object.
-// Parameters:
-// mux - (in) object from which the features are to be fetched
-// flags - (out) the flags specifying which features are present in the
-// mux object. This will be an OR of various flag values.
-// Enum 'WebPFeatureFlags' can be used to test individual flag values.
-// Returns:
-// WEBP_MUX_INVALID_ARGUMENT - if mux or flags is NULL
-// WEBP_MUX_NOT_FOUND - if VP8X chunk is not present in mux object.
-// WEBP_MUX_BAD_DATA - if VP8X chunk in mux is invalid.
-// WEBP_MUX_OK - on success.
-WEBP_EXTERN(WebPMuxError) WebPMuxGetFeatures(const WebPMux* mux,
- uint32_t* flags);
-
-// Gets number of chunks having tag value tag in the mux object.
-// Parameters:
-// mux - (in) object from which the info is to be fetched
-// id - (in) chunk id specifying the type of chunk
-// num_elements - (out) number of chunks with the given chunk id
-// Returns:
-// WEBP_MUX_INVALID_ARGUMENT - if either mux, or num_elements is NULL
-// WEBP_MUX_OK - on success.
-WEBP_EXTERN(WebPMuxError) WebPMuxNumChunks(const WebPMux* mux,
- WebPChunkId id, int* num_elements);
-
-// Assembles all chunks in WebP RIFF format and returns in 'assembled_data'.
-// This function also validates the mux object.
-// Note: The content of 'assembled_data' will be ignored and overwritten.
-// Also, the content of 'assembled_data' is allocated using malloc(), and NOT
-// owned by the 'mux' object. It MUST be deallocated by the caller by calling
-// WebPDataClear().
-// Parameters:
-// mux - (in/out) object whose chunks are to be assembled
-// assembled_data - (out) assembled WebP data
-// Returns:
-// WEBP_MUX_BAD_DATA - if mux object is invalid.
-// WEBP_MUX_INVALID_ARGUMENT - if either mux, output_data or output_size is
-// NULL.
-// WEBP_MUX_MEMORY_ERROR - on memory allocation error.
-// WEBP_MUX_OK - on success
-WEBP_EXTERN(WebPMuxError) WebPMuxAssemble(WebPMux* mux,
- WebPData* assembled_data);
-
-//------------------------------------------------------------------------------
-// Demux API.
-// Enables extraction of image and extended format data from WebP files.
-
-#define WEBP_DEMUX_ABI_VERSION 0x0100 // MAJOR(8b) + MINOR(8b)
-
-typedef struct WebPDemuxer WebPDemuxer;
-
-typedef enum {
- WEBP_DEMUX_PARSING_HEADER, // Not enough data to parse full header.
- WEBP_DEMUX_PARSED_HEADER, // Header parsing complete, data may be available.
- WEBP_DEMUX_DONE // Entire file has been parsed.
-} WebPDemuxState;
-
-//------------------------------------------------------------------------------
-// Life of a Demux object
-
-// Internal, version-checked, entry point
-WEBP_EXTERN(WebPDemuxer*) WebPDemuxInternal(
- const WebPData*, int, WebPDemuxState*, int);
-
-// Parses the WebP file given by 'data'.
-// A complete WebP file must be present in 'data' for the function to succeed.
-// Returns a WebPDemuxer object on successful parse, NULL otherwise.
-static WEBP_INLINE WebPDemuxer* WebPDemux(const WebPData* data) {
- return WebPDemuxInternal(data, 0, NULL, WEBP_DEMUX_ABI_VERSION);
-}
-
-// Parses the WebP file given by 'data'.
-// If 'state' is non-NULL it will be set to indicate the status of the demuxer.
-// Returns a WebPDemuxer object on successful parse, NULL otherwise.
-static WEBP_INLINE WebPDemuxer* WebPDemuxPartial(
- const WebPData* data, WebPDemuxState* state) {
- return WebPDemuxInternal(data, 1, state, WEBP_DEMUX_ABI_VERSION);
-}
-
-// Frees memory associated with 'dmux'.
-WEBP_EXTERN(void) WebPDemuxDelete(WebPDemuxer* dmux);
-
-//------------------------------------------------------------------------------
-// Data/information extraction.
-
-typedef enum {
- WEBP_FF_FORMAT_FLAGS, // Extended format flags present in the 'VP8X' chunk.
- WEBP_FF_CANVAS_WIDTH,
- WEBP_FF_CANVAS_HEIGHT,
- WEBP_FF_LOOP_COUNT
-} WebPFormatFeature;
-
-// Get the 'feature' value from the 'dmux'.
-// NOTE: values are only valid if WebPDemux() was used or WebPDemuxPartial()
-// returned a state > WEBP_DEMUX_PARSING_HEADER.
-WEBP_EXTERN(uint32_t) WebPDemuxGetI(
- const WebPDemuxer* dmux, WebPFormatFeature feature);
-
-//------------------------------------------------------------------------------
-// Frame iteration.
-
-typedef struct {
- int frame_num_;
- int num_frames_;
- int tile_num_;
- int num_tiles_;
- int x_offset_, y_offset_; // offset relative to the canvas.
- int width_, height_; // dimensions of this frame or tile.
- int duration_; // display duration in milliseconds.
- int complete_; // true if 'tile_' contains a full frame. partial images may
- // still be decoded with the WebP incremental decoder.
- WebPData tile_; // The frame or tile given by 'frame_num_' and 'tile_num_'.
-
- uint32_t pad[4]; // padding for later use
- void* private_;
-} WebPIterator;
-
-// Retrieves frame 'frame_number' from 'dmux'.
-// 'iter->tile_' points to the first tile on return from this function.
-// Individual tiles may be extracted using WebPDemuxSetTile().
-// Setting 'frame_number' equal to 0 will return the last frame of the image.
-// Returns false if 'dmux' is NULL or frame 'frame_number' is not present.
-// Call WebPDemuxReleaseIterator() when use of the iterator is complete.
-// NOTE: 'dmux' must persist for the lifetime of 'iter'.
-WEBP_EXTERN(int) WebPDemuxGetFrame(
- const WebPDemuxer* dmux, int frame_number, WebPIterator* iter);
-
-// Sets 'iter->tile_' to point to the next ('iter->frame_num_' + 1) or previous
-// ('iter->frame_num_' - 1) frame. These functions do not loop.
-// Returns true on success, false otherwise.
-WEBP_EXTERN(int) WebPDemuxNextFrame(WebPIterator* iter);
-WEBP_EXTERN(int) WebPDemuxPrevFrame(WebPIterator* iter);
-
-// Sets 'iter->tile_' to reflect tile number 'tile_number'.
-// Returns true if tile 'tile_number' is present, false otherwise.
-WEBP_EXTERN(int) WebPDemuxSelectTile(WebPIterator* iter, int tile_number);
-
-// Releases any memory associated with 'iter'.
-// Must be called before destroying the associated WebPDemuxer with
-// WebPDemuxDelete().
-WEBP_EXTERN(void) WebPDemuxReleaseIterator(WebPIterator* iter);
-
-//------------------------------------------------------------------------------
-// Chunk iteration.
-
-typedef struct {
- // The current and total number of chunks with the fourcc given to
- // WebPDemuxGetChunk().
- int chunk_num_;
- int num_chunks_;
- WebPData chunk_; // The payload of the chunk.
-
- uint32_t pad[6]; // padding for later use
- void* private_;
-} WebPChunkIterator;
-
-// Retrieves the 'chunk_number' instance of the chunk with id 'fourcc' from
-// 'dmux'.
-// 'fourcc' is a character array containing the fourcc of the chunk to return,
-// e.g., "ICCP", "META", "EXIF", etc.
-// Setting 'chunk_number' equal to 0 will return the last chunk in a set.
-// Returns true if the chunk is found, false otherwise. Image related chunk
-// payloads are accessed through WebPDemuxGetFrame() and related functions.
-// Call WebPDemuxReleaseChunkIterator() when use of the iterator is complete.
-// NOTE: 'dmux' must persist for the lifetime of the iterator.
-WEBP_EXTERN(int) WebPDemuxGetChunk(const WebPDemuxer* dmux,
- const char fourcc[4], int chunk_number,
- WebPChunkIterator* iter);
-
-// Sets 'iter->chunk_' to point to the next ('iter->chunk_num_' + 1) or previous
-// ('iter->chunk_num_' - 1) chunk. These functions do not loop.
-// Returns true on success, false otherwise.
-WEBP_EXTERN(int) WebPDemuxNextChunk(WebPChunkIterator* iter);
-WEBP_EXTERN(int) WebPDemuxPrevChunk(WebPChunkIterator* iter);
-
-// Releases any memory associated with 'iter'.
-// Must be called before destroying the associated WebPDemuxer with
-// WebPDemuxDelete().
-WEBP_EXTERN(void) WebPDemuxReleaseChunkIterator(WebPChunkIterator* iter);
-
-//------------------------------------------------------------------------------
-
-#if defined(__cplusplus) || defined(c_plusplus)
-} // extern "C"
-#endif
-
-#endif /* WEBP_WEBP_MUX_H_ */
diff --git a/drivers/webpold/mux/demux.c b/drivers/webpold/mux/demux.c
deleted file mode 100644
index 501d08f41d..0000000000
--- a/drivers/webpold/mux/demux.c
+++ /dev/null
@@ -1,902 +0,0 @@
-// Copyright 2012 Google Inc. All Rights Reserved.
-//
-// This code is licensed under the same terms as WebM:
-// Software License Agreement: http://www.webmproject.org/license/software/
-// Additional IP Rights Grant: http://www.webmproject.org/license/additional/
-// -----------------------------------------------------------------------------
-//
-// WebP container demux.
-//
-
-#include "../mux.h"
-
-#include <stdlib.h>
-#include <string.h>
-
-#include "../decode.h" // WebPGetInfo
-#include "../format_constants.h"
-
-#if defined(__cplusplus) || defined(c_plusplus)
-extern "C" {
-#endif
-
-#define MKFOURCC(a, b, c, d) ((uint32_t)(a) | (b) << 8 | (c) << 16 | (d) << 24)
-
-typedef struct {
- size_t start_; // start location of the data
- size_t end_; // end location
- size_t riff_end_; // riff chunk end location, can be > end_.
- size_t buf_size_; // size of the buffer
- const uint8_t* buf_;
-} MemBuffer;
-
-typedef struct {
- size_t offset_;
- size_t size_;
-} ChunkData;
-
-typedef struct Frame {
- int x_offset_, y_offset_;
- int width_, height_;
- int duration_;
- int is_tile_; // this is an image fragment from a 'TILE'.
- int frame_num_; // the referent frame number for use in assembling tiles.
- int complete_; // img_components_ contains a full image.
- ChunkData img_components_[2]; // 0=VP8{,L} 1=ALPH
- struct Frame* next_;
-} Frame;
-
-typedef struct Chunk {
- ChunkData data_;
- struct Chunk* next_;
-} Chunk;
-
-struct WebPDemuxer {
- MemBuffer mem_;
- WebPDemuxState state_;
- int is_ext_format_;
- uint32_t feature_flags_;
- int canvas_width_, canvas_height_;
- int loop_count_;
- int num_frames_;
- Frame* frames_;
- Chunk* chunks_; // non-image chunks
-};
-
-typedef enum {
- PARSE_OK,
- PARSE_NEED_MORE_DATA,
- PARSE_ERROR
-} ParseStatus;
-
-typedef struct ChunkParser {
- uint8_t id[4];
- ParseStatus (*parse)(WebPDemuxer* const dmux);
- int (*valid)(const WebPDemuxer* const dmux);
-} ChunkParser;
-
-static ParseStatus ParseSingleImage(WebPDemuxer* const dmux);
-static ParseStatus ParseVP8X(WebPDemuxer* const dmux);
-static int IsValidSimpleFormat(const WebPDemuxer* const dmux);
-static int IsValidExtendedFormat(const WebPDemuxer* const dmux);
-
-static const ChunkParser kMasterChunks[] = {
- { { 'V', 'P', '8', ' ' }, ParseSingleImage, IsValidSimpleFormat },
- { { 'V', 'P', '8', 'L' }, ParseSingleImage, IsValidSimpleFormat },
- { { 'V', 'P', '8', 'X' }, ParseVP8X, IsValidExtendedFormat },
- { { '0', '0', '0', '0' }, NULL, NULL },
-};
-
-// -----------------------------------------------------------------------------
-// MemBuffer
-
-static int RemapMemBuffer(MemBuffer* const mem,
- const uint8_t* data, size_t size) {
- if (size < mem->buf_size_) return 0; // can't remap to a shorter buffer!
-
- mem->buf_ = data;
- mem->end_ = mem->buf_size_ = size;
- return 1;
-}
-
-static int InitMemBuffer(MemBuffer* const mem,
- const uint8_t* data, size_t size) {
- memset(mem, 0, sizeof(*mem));
- return RemapMemBuffer(mem, data, size);
-}
-
-// Return the remaining data size available in 'mem'.
-static WEBP_INLINE size_t MemDataSize(const MemBuffer* const mem) {
- return (mem->end_ - mem->start_);
-}
-
-// Return true if 'size' exceeds the end of the RIFF chunk.
-static WEBP_INLINE int SizeIsInvalid(const MemBuffer* const mem, size_t size) {
- return (size > mem->riff_end_ - mem->start_);
-}
-
-static WEBP_INLINE void Skip(MemBuffer* const mem, size_t size) {
- mem->start_ += size;
-}
-
-static WEBP_INLINE void Rewind(MemBuffer* const mem, size_t size) {
- mem->start_ -= size;
-}
-
-static WEBP_INLINE const uint8_t* GetBuffer(MemBuffer* const mem) {
- return mem->buf_ + mem->start_;
-}
-
-static WEBP_INLINE uint8_t GetByte(MemBuffer* const mem) {
- const uint8_t byte = mem->buf_[mem->start_];
- Skip(mem, 1);
- return byte;
-}
-
-// Read 16, 24 or 32 bits stored in little-endian order.
-static WEBP_INLINE int ReadLE16s(const uint8_t* const data) {
- return (int)(data[0] << 0) | (data[1] << 8);
-}
-
-static WEBP_INLINE int ReadLE24s(const uint8_t* const data) {
- return ReadLE16s(data) | (data[2] << 16);
-}
-
-static WEBP_INLINE uint32_t ReadLE32(const uint8_t* const data) {
- return (uint32_t)ReadLE24s(data) | (data[3] << 24);
-}
-
-// In addition to reading, skip the read bytes.
-static WEBP_INLINE int GetLE16s(MemBuffer* const mem) {
- const uint8_t* const data = mem->buf_ + mem->start_;
- const int val = ReadLE16s(data);
- Skip(mem, 2);
- return val;
-}
-
-static WEBP_INLINE int GetLE24s(MemBuffer* const mem) {
- const uint8_t* const data = mem->buf_ + mem->start_;
- const int val = ReadLE24s(data);
- Skip(mem, 3);
- return val;
-}
-
-static WEBP_INLINE uint32_t GetLE32(MemBuffer* const mem) {
- const uint8_t* const data = mem->buf_ + mem->start_;
- const uint32_t val = ReadLE32(data);
- Skip(mem, 4);
- return val;
-}
-
-// -----------------------------------------------------------------------------
-// Secondary chunk parsing
-
-static void AddChunk(WebPDemuxer* const dmux, Chunk* const chunk) {
- Chunk** c = &dmux->chunks_;
- while (*c != NULL) c = &(*c)->next_;
- *c = chunk;
- chunk->next_ = NULL;
-}
-
-// Add a frame to the end of the list, ensuring the last frame is complete.
-// Returns true on success, false otherwise.
-static int AddFrame(WebPDemuxer* const dmux, Frame* const frame) {
- const Frame* last_frame = NULL;
- Frame** f = &dmux->frames_;
- while (*f != NULL) {
- last_frame = *f;
- f = &(*f)->next_;
- }
- if (last_frame != NULL && !last_frame->complete_) return 0;
- *f = frame;
- frame->next_ = NULL;
- return 1;
-}
-
-// Store image bearing chunks to 'frame'.
-static ParseStatus StoreFrame(int frame_num, MemBuffer* const mem,
- Frame* const frame) {
- int alpha_chunks = 0;
- int image_chunks = 0;
- int done = (MemDataSize(mem) < CHUNK_HEADER_SIZE);
- ParseStatus status = PARSE_OK;
-
- if (done) return PARSE_NEED_MORE_DATA;
-
- do {
- const size_t chunk_start_offset = mem->start_;
- const uint32_t fourcc = GetLE32(mem);
- const uint32_t payload_size = GetLE32(mem);
- const uint32_t payload_size_padded = payload_size + (payload_size & 1);
- const size_t payload_available = (payload_size_padded > MemDataSize(mem))
- ? MemDataSize(mem) : payload_size_padded;
- const size_t chunk_size = CHUNK_HEADER_SIZE + payload_available;
-
- if (payload_size > MAX_CHUNK_PAYLOAD) return PARSE_ERROR;
- if (SizeIsInvalid(mem, payload_size_padded)) return PARSE_ERROR;
- if (payload_size_padded > MemDataSize(mem)) status = PARSE_NEED_MORE_DATA;
-
- switch (fourcc) {
- case MKFOURCC('A', 'L', 'P', 'H'):
- if (alpha_chunks == 0) {
- ++alpha_chunks;
- frame->img_components_[1].offset_ = chunk_start_offset;
- frame->img_components_[1].size_ = chunk_size;
- frame->frame_num_ = frame_num;
- Skip(mem, payload_available);
- } else {
- goto Done;
- }
- break;
- case MKFOURCC('V', 'P', '8', ' '):
- case MKFOURCC('V', 'P', '8', 'L'):
- if (image_chunks == 0) {
- int width = 0, height = 0;
- ++image_chunks;
- frame->img_components_[0].offset_ = chunk_start_offset;
- frame->img_components_[0].size_ = chunk_size;
- // Extract the width and height from the bitstream, tolerating
- // failures when the data is incomplete.
- if (!WebPGetInfo(mem->buf_ + frame->img_components_[0].offset_,
- frame->img_components_[0].size_, &width, &height) &&
- status != PARSE_NEED_MORE_DATA) {
- return PARSE_ERROR;
- }
-
- frame->width_ = width;
- frame->height_ = height;
- frame->frame_num_ = frame_num;
- frame->complete_ = (status == PARSE_OK);
- Skip(mem, payload_available);
- } else {
- goto Done;
- }
- break;
- Done:
- default:
- // Restore fourcc/size when moving up one level in parsing.
- Rewind(mem, CHUNK_HEADER_SIZE);
- done = 1;
- break;
- }
-
- if (mem->start_ == mem->riff_end_) {
- done = 1;
- } else if (MemDataSize(mem) < CHUNK_HEADER_SIZE) {
- status = PARSE_NEED_MORE_DATA;
- }
- } while (!done && status == PARSE_OK);
-
- return status;
-}
-
-// Creates a new Frame if 'actual_size' is within bounds and 'mem' contains
-// enough data ('min_size') to parse the payload.
-// Returns PARSE_OK on success with *frame pointing to the new Frame.
-// Returns PARSE_NEED_MORE_DATA with insufficient data, PARSE_ERROR otherwise.
-static ParseStatus NewFrame(const MemBuffer* const mem,
- uint32_t min_size, uint32_t expected_size,
- uint32_t actual_size, Frame** frame) {
- if (SizeIsInvalid(mem, min_size)) return PARSE_ERROR;
- if (actual_size < expected_size) return PARSE_ERROR;
- if (MemDataSize(mem) < min_size) return PARSE_NEED_MORE_DATA;
-
- *frame = (Frame*)calloc(1, sizeof(**frame));
- return (*frame == NULL) ? PARSE_ERROR : PARSE_OK;
-}
-
-// Parse a 'FRM ' chunk and any image bearing chunks that immediately follow.
-// 'frame_chunk_size' is the previously validated, padded chunk size.
-static ParseStatus ParseFrame(
- WebPDemuxer* const dmux, uint32_t frame_chunk_size) {
- const int has_frames = !!(dmux->feature_flags_ & ANIMATION_FLAG);
- const uint32_t min_size = frame_chunk_size + CHUNK_HEADER_SIZE;
- int added_frame = 0;
- MemBuffer* const mem = &dmux->mem_;
- Frame* frame;
- ParseStatus status =
- NewFrame(mem, min_size, FRAME_CHUNK_SIZE, frame_chunk_size, &frame);
- if (status != PARSE_OK) return status;
-
- frame->x_offset_ = 2 * GetLE24s(mem);
- frame->y_offset_ = 2 * GetLE24s(mem);
- frame->width_ = 1 + GetLE24s(mem);
- frame->height_ = 1 + GetLE24s(mem);
- frame->duration_ = 1 + GetLE24s(mem);
- Skip(mem, frame_chunk_size - FRAME_CHUNK_SIZE); // skip any trailing data.
- if (frame->width_ * (uint64_t)frame->height_ >= MAX_IMAGE_AREA) {
- return PARSE_ERROR;
- }
-
- // Store a (potentially partial) frame only if the animation flag is set
- // and there is some data in 'frame'.
- status = StoreFrame(dmux->num_frames_ + 1, mem, frame);
- if (status != PARSE_ERROR && has_frames && frame->frame_num_ > 0) {
- added_frame = AddFrame(dmux, frame);
- if (added_frame) {
- ++dmux->num_frames_;
- } else {
- status = PARSE_ERROR;
- }
- }
-
- if (!added_frame) free(frame);
- return status;
-}
-
-// Parse a 'TILE' chunk and any image bearing chunks that immediately follow.
-// 'tile_chunk_size' is the previously validated, padded chunk size.
-static ParseStatus ParseTile(WebPDemuxer* const dmux,
- uint32_t tile_chunk_size) {
- const int has_tiles = !!(dmux->feature_flags_ & TILE_FLAG);
- const uint32_t min_size = tile_chunk_size + CHUNK_HEADER_SIZE;
- int added_tile = 0;
- MemBuffer* const mem = &dmux->mem_;
- Frame* frame;
- ParseStatus status =
- NewFrame(mem, min_size, TILE_CHUNK_SIZE, tile_chunk_size, &frame);
- if (status != PARSE_OK) return status;
-
- frame->is_tile_ = 1;
- frame->x_offset_ = 2 * GetLE24s(mem);
- frame->y_offset_ = 2 * GetLE24s(mem);
- Skip(mem, tile_chunk_size - TILE_CHUNK_SIZE); // skip any trailing data.
-
- // Store a (potentially partial) tile only if the tile flag is set
- // and the tile contains some data.
- status = StoreFrame(dmux->num_frames_, mem, frame);
- if (status != PARSE_ERROR && has_tiles && frame->frame_num_ > 0) {
- // Note num_frames_ is incremented only when all tiles have been consumed.
- added_tile = AddFrame(dmux, frame);
- if (!added_tile) status = PARSE_ERROR;
- }
-
- if (!added_tile) free(frame);
- return status;
-}
-
-// General chunk storage starting with the header at 'start_offset' allowing
-// the user to request the payload via a fourcc string. 'size' includes the
-// header and the unpadded payload size.
-// Returns true on success, false otherwise.
-static int StoreChunk(WebPDemuxer* const dmux,
- size_t start_offset, uint32_t size) {
- Chunk* const chunk = (Chunk*)calloc(1, sizeof(*chunk));
- if (chunk == NULL) return 0;
-
- chunk->data_.offset_ = start_offset;
- chunk->data_.size_ = size;
- AddChunk(dmux, chunk);
- return 1;
-}
-
-// -----------------------------------------------------------------------------
-// Primary chunk parsing
-
-static int ReadHeader(MemBuffer* const mem) {
- const size_t min_size = RIFF_HEADER_SIZE + CHUNK_HEADER_SIZE;
- uint32_t riff_size;
-
- // Basic file level validation.
- if (MemDataSize(mem) < min_size) return 0;
- if (memcmp(GetBuffer(mem), "RIFF", CHUNK_SIZE_BYTES) ||
- memcmp(GetBuffer(mem) + CHUNK_HEADER_SIZE, "WEBP", CHUNK_SIZE_BYTES)) {
- return 0;
- }
-
- riff_size = ReadLE32(GetBuffer(mem) + TAG_SIZE);
- if (riff_size < CHUNK_HEADER_SIZE) return 0;
- if (riff_size > MAX_CHUNK_PAYLOAD) return 0;
-
- // There's no point in reading past the end of the RIFF chunk
- mem->riff_end_ = riff_size + CHUNK_HEADER_SIZE;
- if (mem->buf_size_ > mem->riff_end_) {
- mem->buf_size_ = mem->end_ = mem->riff_end_;
- }
-
- Skip(mem, RIFF_HEADER_SIZE);
- return 1;
-}
-
-static ParseStatus ParseSingleImage(WebPDemuxer* const dmux) {
- const size_t min_size = CHUNK_HEADER_SIZE;
- MemBuffer* const mem = &dmux->mem_;
- Frame* frame;
- ParseStatus status;
-
- if (dmux->frames_ != NULL) return PARSE_ERROR;
- if (SizeIsInvalid(mem, min_size)) return PARSE_ERROR;
- if (MemDataSize(mem) < min_size) return PARSE_NEED_MORE_DATA;
-
- frame = (Frame*)calloc(1, sizeof(*frame));
- if (frame == NULL) return PARSE_ERROR;
-
- status = StoreFrame(1, &dmux->mem_, frame);
- if (status != PARSE_ERROR) {
- const int has_alpha = !!(dmux->feature_flags_ & ALPHA_FLAG);
- // Clear any alpha when the alpha flag is missing.
- if (!has_alpha && frame->img_components_[1].size_ > 0) {
- frame->img_components_[1].offset_ = 0;
- frame->img_components_[1].size_ = 0;
- }
-
- // Use the frame width/height as the canvas values for non-vp8x files.
- if (!dmux->is_ext_format_ && frame->width_ > 0 && frame->height_ > 0) {
- dmux->state_ = WEBP_DEMUX_PARSED_HEADER;
- dmux->canvas_width_ = frame->width_;
- dmux->canvas_height_ = frame->height_;
- }
- AddFrame(dmux, frame);
- dmux->num_frames_ = 1;
- } else {
- free(frame);
- }
-
- return status;
-}
-
-static ParseStatus ParseVP8X(WebPDemuxer* const dmux) {
- MemBuffer* const mem = &dmux->mem_;
- int loop_chunks = 0;
- uint32_t vp8x_size;
- ParseStatus status = PARSE_OK;
-
- if (MemDataSize(mem) < CHUNK_HEADER_SIZE) return PARSE_NEED_MORE_DATA;
-
- dmux->is_ext_format_ = 1;
- Skip(mem, TAG_SIZE); // VP8X
- vp8x_size = GetLE32(mem);
- if (vp8x_size > MAX_CHUNK_PAYLOAD) return PARSE_ERROR;
- if (vp8x_size < VP8X_CHUNK_SIZE) return PARSE_ERROR;
- vp8x_size += vp8x_size & 1;
- if (SizeIsInvalid(mem, vp8x_size)) return PARSE_ERROR;
- if (MemDataSize(mem) < vp8x_size) return PARSE_NEED_MORE_DATA;
-
- dmux->feature_flags_ = GetByte(mem);
- Skip(mem, 3); // Reserved.
- dmux->canvas_width_ = 1 + GetLE24s(mem);
- dmux->canvas_height_ = 1 + GetLE24s(mem);
- if (dmux->canvas_width_ * (uint64_t)dmux->canvas_height_ >= MAX_IMAGE_AREA) {
- return PARSE_ERROR; // image final dimension is too large
- }
- Skip(mem, vp8x_size - VP8X_CHUNK_SIZE); // skip any trailing data.
- dmux->state_ = WEBP_DEMUX_PARSED_HEADER;
-
- if (SizeIsInvalid(mem, CHUNK_HEADER_SIZE)) return PARSE_ERROR;
- if (MemDataSize(mem) < CHUNK_HEADER_SIZE) return PARSE_NEED_MORE_DATA;
-
- do {
- int store_chunk = 1;
- const size_t chunk_start_offset = mem->start_;
- const uint32_t fourcc = GetLE32(mem);
- const uint32_t chunk_size = GetLE32(mem);
- const uint32_t chunk_size_padded = chunk_size + (chunk_size & 1);
-
- if (chunk_size > MAX_CHUNK_PAYLOAD) return PARSE_ERROR;
- if (SizeIsInvalid(mem, chunk_size_padded)) return PARSE_ERROR;
-
- switch (fourcc) {
- case MKFOURCC('V', 'P', '8', 'X'): {
- return PARSE_ERROR;
- }
- case MKFOURCC('A', 'L', 'P', 'H'):
- case MKFOURCC('V', 'P', '8', ' '):
- case MKFOURCC('V', 'P', '8', 'L'): {
- Rewind(mem, CHUNK_HEADER_SIZE);
- status = ParseSingleImage(dmux);
- break;
- }
- case MKFOURCC('L', 'O', 'O', 'P'): {
- if (chunk_size_padded < LOOP_CHUNK_SIZE) return PARSE_ERROR;
-
- if (MemDataSize(mem) < chunk_size_padded) {
- status = PARSE_NEED_MORE_DATA;
- } else if (loop_chunks == 0) {
- ++loop_chunks;
- dmux->loop_count_ = GetLE16s(mem);
- Skip(mem, chunk_size_padded - LOOP_CHUNK_SIZE);
- } else {
- store_chunk = 0;
- goto Skip;
- }
- break;
- }
- case MKFOURCC('F', 'R', 'M', ' '): {
- status = ParseFrame(dmux, chunk_size_padded);
- break;
- }
- case MKFOURCC('T', 'I', 'L', 'E'): {
- if (dmux->num_frames_ == 0) dmux->num_frames_ = 1;
- status = ParseTile(dmux, chunk_size_padded);
- break;
- }
- case MKFOURCC('I', 'C', 'C', 'P'): {
- store_chunk = !!(dmux->feature_flags_ & ICCP_FLAG);
- goto Skip;
- }
- case MKFOURCC('M', 'E', 'T', 'A'): {
- store_chunk = !!(dmux->feature_flags_ & META_FLAG);
- goto Skip;
- }
- Skip:
- default: {
- if (chunk_size_padded <= MemDataSize(mem)) {
- if (store_chunk) {
- // Store only the chunk header and unpadded size as only the payload
- // will be returned to the user.
- if (!StoreChunk(dmux, chunk_start_offset,
- CHUNK_HEADER_SIZE + chunk_size)) {
- return PARSE_ERROR;
- }
- }
- Skip(mem, chunk_size_padded);
- } else {
- status = PARSE_NEED_MORE_DATA;
- }
- }
- }
-
- if (mem->start_ == mem->riff_end_) {
- break;
- } else if (MemDataSize(mem) < CHUNK_HEADER_SIZE) {
- status = PARSE_NEED_MORE_DATA;
- }
- } while (status == PARSE_OK);
-
- return status;
-}
-
-// -----------------------------------------------------------------------------
-// Format validation
-
-static int IsValidSimpleFormat(const WebPDemuxer* const dmux) {
- const Frame* const frame = dmux->frames_;
- if (dmux->state_ == WEBP_DEMUX_PARSING_HEADER) return 1;
-
- if (dmux->canvas_width_ <= 0 || dmux->canvas_height_ <= 0) return 0;
- if (dmux->state_ == WEBP_DEMUX_DONE && frame == NULL) return 0;
-
- if (frame->width_ <= 0 || frame->height_ <= 0) return 0;
- return 1;
-}
-
-static int IsValidExtendedFormat(const WebPDemuxer* const dmux) {
- const int has_tiles = !!(dmux->feature_flags_ & TILE_FLAG);
- const int has_frames = !!(dmux->feature_flags_ & ANIMATION_FLAG);
- const Frame* f;
-
- if (dmux->state_ == WEBP_DEMUX_PARSING_HEADER) return 1;
-
- if (dmux->canvas_width_ <= 0 || dmux->canvas_height_ <= 0) return 0;
- if (dmux->loop_count_ < 0) return 0;
- if (dmux->state_ == WEBP_DEMUX_DONE && dmux->frames_ == NULL) return 0;
-
- for (f = dmux->frames_; f != NULL; f = f->next_) {
- const int cur_frame_set = f->frame_num_;
- int frame_count = 0, tile_count = 0;
-
- // Check frame properties and if the image is composed of tiles that each
- // fragment came from a 'TILE'.
- for (; f != NULL && f->frame_num_ == cur_frame_set; f = f->next_) {
- const ChunkData* const image = f->img_components_;
- const ChunkData* const alpha = f->img_components_ + 1;
-
- if (!has_tiles && f->is_tile_) return 0;
- if (!has_frames && f->frame_num_ > 1) return 0;
- if (f->x_offset_ < 0 || f->y_offset_ < 0) return 0;
- if (f->complete_) {
- if (alpha->size_ == 0 && image->size_ == 0) return 0;
- // Ensure alpha precedes image bitstream.
- if (alpha->size_ > 0 && alpha->offset_ > image->offset_) {
- return 0;
- }
-
- if (f->width_ <= 0 || f->height_ <= 0) return 0;
- } else {
- // Ensure alpha precedes image bitstream.
- if (alpha->size_ > 0 && image->size_ > 0 &&
- alpha->offset_ > image->offset_) {
- return 0;
- }
- // There shouldn't be any frames after an incomplete one.
- if (f->next_ != NULL) return 0;
- }
-
- tile_count += f->is_tile_;
- ++frame_count;
- }
- if (!has_tiles && frame_count > 1) return 0;
- if (tile_count > 0 && frame_count != tile_count) return 0;
- if (f == NULL) break;
- }
- return 1;
-}
-
-// -----------------------------------------------------------------------------
-// WebPDemuxer object
-
-static void InitDemux(WebPDemuxer* const dmux, const MemBuffer* const mem) {
- dmux->state_ = WEBP_DEMUX_PARSING_HEADER;
- dmux->loop_count_ = 1;
- dmux->canvas_width_ = -1;
- dmux->canvas_height_ = -1;
- dmux->mem_ = *mem;
-}
-
-WebPDemuxer* WebPDemuxInternal(const WebPData* data, int allow_partial,
- WebPDemuxState* state, int version) {
- const ChunkParser* parser;
- int partial;
- ParseStatus status = PARSE_ERROR;
- MemBuffer mem;
- WebPDemuxer* dmux;
-
- if (WEBP_ABI_IS_INCOMPATIBLE(version, WEBP_DEMUX_ABI_VERSION)) return NULL;
- if (data == NULL || data->bytes_ == NULL || data->size_ == 0) return NULL;
-
- if (!InitMemBuffer(&mem, data->bytes_, data->size_)) return NULL;
- if (!ReadHeader(&mem)) return NULL;
-
- partial = (mem.buf_size_ < mem.riff_end_);
- if (!allow_partial && partial) return NULL;
-
- dmux = (WebPDemuxer*)calloc(1, sizeof(*dmux));
- if (dmux == NULL) return NULL;
- InitDemux(dmux, &mem);
-
- for (parser = kMasterChunks; parser->parse != NULL; ++parser) {
- if (!memcmp(parser->id, GetBuffer(&dmux->mem_), TAG_SIZE)) {
- status = parser->parse(dmux);
- if (status == PARSE_OK) dmux->state_ = WEBP_DEMUX_DONE;
- if (status != PARSE_ERROR && !parser->valid(dmux)) status = PARSE_ERROR;
- break;
- }
- }
- if (state) *state = dmux->state_;
-
- if (status == PARSE_ERROR) {
- WebPDemuxDelete(dmux);
- return NULL;
- }
- return dmux;
-}
-
-void WebPDemuxDelete(WebPDemuxer* dmux) {
- Chunk* c;
- Frame* f;
- if (dmux == NULL) return;
-
- for (f = dmux->frames_; f != NULL;) {
- Frame* const cur_frame = f;
- f = f->next_;
- free(cur_frame);
- }
- for (c = dmux->chunks_; c != NULL;) {
- Chunk* const cur_chunk = c;
- c = c->next_;
- free(cur_chunk);
- }
- free(dmux);
-}
-
-// -----------------------------------------------------------------------------
-
-uint32_t WebPDemuxGetI(const WebPDemuxer* dmux, WebPFormatFeature feature) {
- if (dmux == NULL) return 0;
-
- switch (feature) {
- case WEBP_FF_FORMAT_FLAGS: return dmux->feature_flags_;
- case WEBP_FF_CANVAS_WIDTH: return (uint32_t)dmux->canvas_width_;
- case WEBP_FF_CANVAS_HEIGHT: return (uint32_t)dmux->canvas_height_;
- case WEBP_FF_LOOP_COUNT: return (uint32_t)dmux->loop_count_;
- }
- return 0;
-}
-
-// -----------------------------------------------------------------------------
-// Frame iteration
-
-// Find the first 'frame_num' frame. There may be multiple in a tiled frame.
-static const Frame* GetFrame(const WebPDemuxer* const dmux, int frame_num) {
- const Frame* f;
- for (f = dmux->frames_; f != NULL; f = f->next_) {
- if (frame_num == f->frame_num_) break;
- }
- return f;
-}
-
-// Returns tile 'tile_num' and the total count.
-static const Frame* GetTile(
- const Frame* const frame_set, int tile_num, int* const count) {
- const int this_frame = frame_set->frame_num_;
- const Frame* f = frame_set;
- const Frame* tile = NULL;
- int total;
-
- for (total = 0; f != NULL && f->frame_num_ == this_frame; f = f->next_) {
- if (++total == tile_num) tile = f;
- }
- *count = total;
- return tile;
-}
-
-static const uint8_t* GetFramePayload(const uint8_t* const mem_buf,
- const Frame* const frame,
- size_t* const data_size) {
- *data_size = 0;
- if (frame != NULL) {
- const ChunkData* const image = frame->img_components_;
- const ChunkData* const alpha = frame->img_components_ + 1;
- size_t start_offset = image->offset_;
- *data_size = image->size_;
-
- // if alpha exists it precedes image, update the size allowing for
- // intervening chunks.
- if (alpha->size_ > 0) {
- const size_t inter_size = (image->offset_ > 0)
- ? image->offset_ - (alpha->offset_ + alpha->size_)
- : 0;
- start_offset = alpha->offset_;
- *data_size += alpha->size_ + inter_size;
- }
- return mem_buf + start_offset;
- }
- return NULL;
-}
-
-// Create a whole 'frame' from VP8 (+ alpha) or lossless.
-static int SynthesizeFrame(const WebPDemuxer* const dmux,
- const Frame* const first_frame,
- int tile_num, WebPIterator* const iter) {
- const uint8_t* const mem_buf = dmux->mem_.buf_;
- int num_tiles;
- size_t payload_size = 0;
- const Frame* const tile = GetTile(first_frame, tile_num, &num_tiles);
- const uint8_t* const payload = GetFramePayload(mem_buf, tile, &payload_size);
- if (payload == NULL) return 0;
-
- iter->frame_num_ = first_frame->frame_num_;
- iter->num_frames_ = dmux->num_frames_;
- iter->tile_num_ = tile_num;
- iter->num_tiles_ = num_tiles;
- iter->x_offset_ = tile->x_offset_;
- iter->y_offset_ = tile->y_offset_;
- iter->width_ = tile->width_;
- iter->height_ = tile->height_;
- iter->duration_ = tile->duration_;
- iter->complete_ = tile->complete_;
- iter->tile_.bytes_ = payload;
- iter->tile_.size_ = payload_size;
- // TODO(jzern): adjust offsets for 'TILE's embedded in 'FRM 's
- return 1;
-}
-
-static int SetFrame(int frame_num, WebPIterator* const iter) {
- const Frame* frame;
- const WebPDemuxer* const dmux = (WebPDemuxer*)iter->private_;
- if (dmux == NULL || frame_num < 0) return 0;
- if (frame_num > dmux->num_frames_) return 0;
- if (frame_num == 0) frame_num = dmux->num_frames_;
-
- frame = GetFrame(dmux, frame_num);
- return SynthesizeFrame(dmux, frame, 1, iter);
-}
-
-int WebPDemuxGetFrame(const WebPDemuxer* dmux, int frame, WebPIterator* iter) {
- if (iter == NULL) return 0;
-
- memset(iter, 0, sizeof(*iter));
- iter->private_ = (void*)dmux;
- return SetFrame(frame, iter);
-}
-
-int WebPDemuxNextFrame(WebPIterator* iter) {
- if (iter == NULL) return 0;
- return SetFrame(iter->frame_num_ + 1, iter);
-}
-
-int WebPDemuxPrevFrame(WebPIterator* iter) {
- if (iter == NULL) return 0;
- if (iter->frame_num_ <= 1) return 0;
- return SetFrame(iter->frame_num_ - 1, iter);
-}
-
-int WebPDemuxSelectTile(WebPIterator* iter, int tile) {
- if (iter != NULL && iter->private_ != NULL && tile > 0) {
- const WebPDemuxer* const dmux = (WebPDemuxer*)iter->private_;
- const Frame* const frame = GetFrame(dmux, iter->frame_num_);
- if (frame == NULL) return 0;
-
- return SynthesizeFrame(dmux, frame, tile, iter);
- }
- return 0;
-}
-
-void WebPDemuxReleaseIterator(WebPIterator* iter) {
- (void)iter;
-}
-
-// -----------------------------------------------------------------------------
-// Chunk iteration
-
-static int ChunkCount(const WebPDemuxer* const dmux, const char fourcc[4]) {
- const uint8_t* const mem_buf = dmux->mem_.buf_;
- const Chunk* c;
- int count = 0;
- for (c = dmux->chunks_; c != NULL; c = c->next_) {
- const uint8_t* const header = mem_buf + c->data_.offset_;
- if (!memcmp(header, fourcc, TAG_SIZE)) ++count;
- }
- return count;
-}
-
-static const Chunk* GetChunk(const WebPDemuxer* const dmux,
- const char fourcc[4], int chunk_num) {
- const uint8_t* const mem_buf = dmux->mem_.buf_;
- const Chunk* c;
- int count = 0;
- for (c = dmux->chunks_; c != NULL; c = c->next_) {
- const uint8_t* const header = mem_buf + c->data_.offset_;
- if (!memcmp(header, fourcc, TAG_SIZE)) ++count;
- if (count == chunk_num) break;
- }
- return c;
-}
-
-static int SetChunk(const char fourcc[4], int chunk_num,
- WebPChunkIterator* const iter) {
- const WebPDemuxer* const dmux = (WebPDemuxer*)iter->private_;
- int count;
-
- if (dmux == NULL || fourcc == NULL || chunk_num < 0) return 0;
- count = ChunkCount(dmux, fourcc);
- if (count == 0) return 0;
- if (chunk_num == 0) chunk_num = count;
-
- if (chunk_num <= count) {
- const uint8_t* const mem_buf = dmux->mem_.buf_;
- const Chunk* const chunk = GetChunk(dmux, fourcc, chunk_num);
- iter->chunk_.bytes_ = mem_buf + chunk->data_.offset_ + CHUNK_HEADER_SIZE;
- iter->chunk_.size_ = chunk->data_.size_ - CHUNK_HEADER_SIZE;
- iter->num_chunks_ = count;
- iter->chunk_num_ = chunk_num;
- return 1;
- }
- return 0;
-}
-
-int WebPDemuxGetChunk(const WebPDemuxer* dmux,
- const char fourcc[4], int chunk_num,
- WebPChunkIterator* iter) {
- if (iter == NULL) return 0;
-
- memset(iter, 0, sizeof(*iter));
- iter->private_ = (void*)dmux;
- return SetChunk(fourcc, chunk_num, iter);
-}
-
-int WebPDemuxNextChunk(WebPChunkIterator* iter) {
- if (iter != NULL) {
- const char* const fourcc =
- (const char*)iter->chunk_.bytes_ - CHUNK_HEADER_SIZE;
- return SetChunk(fourcc, iter->chunk_num_ + 1, iter);
- }
- return 0;
-}
-
-int WebPDemuxPrevChunk(WebPChunkIterator* iter) {
- if (iter != NULL && iter->chunk_num_ > 1) {
- const char* const fourcc =
- (const char*)iter->chunk_.bytes_ - CHUNK_HEADER_SIZE;
- return SetChunk(fourcc, iter->chunk_num_ - 1, iter);
- }
- return 0;
-}
-
-void WebPDemuxReleaseChunkIterator(WebPChunkIterator* iter) {
- (void)iter;
-}
-
-#if defined(__cplusplus) || defined(c_plusplus)
-} // extern "C"
-#endif
diff --git a/drivers/webpold/mux/muxedit.c b/drivers/webpold/mux/muxedit.c
deleted file mode 100644
index 08629d4ae2..0000000000
--- a/drivers/webpold/mux/muxedit.c
+++ /dev/null
@@ -1,712 +0,0 @@
-// Copyright 2011 Google Inc. All Rights Reserved.
-//
-// This code is licensed under the same terms as WebM:
-// Software License Agreement: http://www.webmproject.org/license/software/
-// Additional IP Rights Grant: http://www.webmproject.org/license/additional/
-// -----------------------------------------------------------------------------
-//
-// Set and delete APIs for mux.
-//
-// Authors: Urvang (urvang@google.com)
-// Vikas (vikasa@google.com)
-
-#include <assert.h>
-#include "./muxi.h"
-
-#if defined(__cplusplus) || defined(c_plusplus)
-extern "C" {
-#endif
-
-//------------------------------------------------------------------------------
-// Life of a mux object.
-
-static void MuxInit(WebPMux* const mux) {
- if (mux == NULL) return;
- memset(mux, 0, sizeof(*mux));
-}
-
-WebPMux* WebPNewInternal(int version) {
- if (WEBP_ABI_IS_INCOMPATIBLE(version, WEBP_MUX_ABI_VERSION)) {
- return NULL;
- } else {
- WebPMux* const mux = (WebPMux*)malloc(sizeof(WebPMux));
- // If mux is NULL MuxInit is a noop.
- MuxInit(mux);
- return mux;
- }
-}
-
-static void DeleteAllChunks(WebPChunk** const chunk_list) {
- while (*chunk_list) {
- *chunk_list = ChunkDelete(*chunk_list);
- }
-}
-
-static void MuxRelease(WebPMux* const mux) {
- if (mux == NULL) return;
- MuxImageDeleteAll(&mux->images_);
- DeleteAllChunks(&mux->vp8x_);
- DeleteAllChunks(&mux->iccp_);
- DeleteAllChunks(&mux->loop_);
- DeleteAllChunks(&mux->meta_);
- DeleteAllChunks(&mux->unknown_);
-}
-
-void WebPMuxDelete(WebPMux* mux) {
- // If mux is NULL MuxRelease is a noop.
- MuxRelease(mux);
- free(mux);
-}
-
-//------------------------------------------------------------------------------
-// Helper method(s).
-
-// Handy MACRO, makes MuxSet() very symmetric to MuxGet().
-#define SWITCH_ID_LIST(INDEX, LIST) \
- if (idx == (INDEX)) { \
- err = ChunkAssignData(&chunk, data, copy_data, kChunks[(INDEX)].tag); \
- if (err == WEBP_MUX_OK) { \
- err = ChunkSetNth(&chunk, (LIST), nth); \
- } \
- return err; \
- }
-
-static WebPMuxError MuxSet(WebPMux* const mux, CHUNK_INDEX idx, uint32_t nth,
- const WebPData* const data, int copy_data) {
- WebPChunk chunk;
- WebPMuxError err = WEBP_MUX_NOT_FOUND;
- assert(mux != NULL);
- assert(!IsWPI(kChunks[idx].id));
-
- ChunkInit(&chunk);
- SWITCH_ID_LIST(IDX_VP8X, &mux->vp8x_);
- SWITCH_ID_LIST(IDX_ICCP, &mux->iccp_);
- SWITCH_ID_LIST(IDX_LOOP, &mux->loop_);
- SWITCH_ID_LIST(IDX_META, &mux->meta_);
- if (idx == IDX_UNKNOWN && data->size_ > TAG_SIZE) {
- // For raw-data unknown chunk, the first four bytes should be the tag to be
- // used for the chunk.
- const WebPData tmp = { data->bytes_ + TAG_SIZE, data->size_ - TAG_SIZE };
- err = ChunkAssignData(&chunk, &tmp, copy_data, GetLE32(data->bytes_ + 0));
- if (err == WEBP_MUX_OK)
- err = ChunkSetNth(&chunk, &mux->unknown_, nth);
- }
- return err;
-}
-#undef SWITCH_ID_LIST
-
-static WebPMuxError MuxAddChunk(WebPMux* const mux, uint32_t nth, uint32_t tag,
- const uint8_t* data, size_t size,
- int copy_data) {
- const CHUNK_INDEX idx = ChunkGetIndexFromTag(tag);
- const WebPData chunk_data = { data, size };
- assert(mux != NULL);
- assert(size <= MAX_CHUNK_PAYLOAD);
- assert(idx != IDX_NIL);
- return MuxSet(mux, idx, nth, &chunk_data, copy_data);
-}
-
-// Create data for frame/tile given image data, offsets and duration.
-static WebPMuxError CreateFrameTileData(const WebPData* const image,
- int x_offset, int y_offset,
- int duration, int is_lossless,
- int is_frame,
- WebPData* const frame_tile) {
- int width;
- int height;
- uint8_t* frame_tile_bytes;
- const size_t frame_tile_size = kChunks[is_frame ? IDX_FRAME : IDX_TILE].size;
-
- const int ok = is_lossless ?
- VP8LGetInfo(image->bytes_, image->size_, &width, &height, NULL) :
- VP8GetInfo(image->bytes_, image->size_, image->size_, &width, &height);
- if (!ok) return WEBP_MUX_INVALID_ARGUMENT;
-
- assert(width > 0 && height > 0 && duration > 0);
- // Note: assertion on upper bounds is done in PutLE24().
-
- frame_tile_bytes = (uint8_t*)malloc(frame_tile_size);
- if (frame_tile_bytes == NULL) return WEBP_MUX_MEMORY_ERROR;
-
- PutLE24(frame_tile_bytes + 0, x_offset / 2);
- PutLE24(frame_tile_bytes + 3, y_offset / 2);
-
- if (is_frame) {
- PutLE24(frame_tile_bytes + 6, width - 1);
- PutLE24(frame_tile_bytes + 9, height - 1);
- PutLE24(frame_tile_bytes + 12, duration - 1);
- }
-
- frame_tile->bytes_ = frame_tile_bytes;
- frame_tile->size_ = frame_tile_size;
- return WEBP_MUX_OK;
-}
-
-// Outputs image data given a bitstream. The bitstream can either be a
-// single-image WebP file or raw VP8/VP8L data.
-// Also outputs 'is_lossless' to be true if the given bitstream is lossless.
-static WebPMuxError GetImageData(const WebPData* const bitstream,
- WebPData* const image, WebPData* const alpha,
- int* const is_lossless) {
- WebPDataInit(alpha); // Default: no alpha.
- if (bitstream->size_ < TAG_SIZE ||
- memcmp(bitstream->bytes_, "RIFF", TAG_SIZE)) {
- // It is NOT webp file data. Return input data as is.
- *image = *bitstream;
- } else {
- // It is webp file data. Extract image data from it.
- const WebPMuxImage* wpi;
- WebPMux* const mux = WebPMuxCreate(bitstream, 0);
- if (mux == NULL) return WEBP_MUX_BAD_DATA;
- wpi = mux->images_;
- assert(wpi != NULL && wpi->img_ != NULL);
- *image = wpi->img_->data_;
- if (wpi->alpha_ != NULL) {
- *alpha = wpi->alpha_->data_;
- }
- WebPMuxDelete(mux);
- }
- *is_lossless = VP8LCheckSignature(image->bytes_, image->size_);
- return WEBP_MUX_OK;
-}
-
-static WebPMuxError DeleteChunks(WebPChunk** chunk_list, uint32_t tag) {
- WebPMuxError err = WEBP_MUX_NOT_FOUND;
- assert(chunk_list);
- while (*chunk_list) {
- WebPChunk* const chunk = *chunk_list;
- if (chunk->tag_ == tag) {
- *chunk_list = ChunkDelete(chunk);
- err = WEBP_MUX_OK;
- } else {
- chunk_list = &chunk->next_;
- }
- }
- return err;
-}
-
-static WebPMuxError MuxDeleteAllNamedData(WebPMux* const mux, CHUNK_INDEX idx) {
- const WebPChunkId id = kChunks[idx].id;
- WebPChunk** chunk_list;
-
- if (mux == NULL) return WEBP_MUX_INVALID_ARGUMENT;
- if (IsWPI(id)) return WEBP_MUX_INVALID_ARGUMENT;
-
- chunk_list = MuxGetChunkListFromId(mux, id);
- if (chunk_list == NULL) return WEBP_MUX_INVALID_ARGUMENT;
-
- return DeleteChunks(chunk_list, kChunks[idx].tag);
-}
-
-static WebPMuxError DeleteLoopCount(WebPMux* const mux) {
- return MuxDeleteAllNamedData(mux, IDX_LOOP);
-}
-
-//------------------------------------------------------------------------------
-// Set API(s).
-
-WebPMuxError WebPMuxSetImage(WebPMux* mux,
- const WebPData* bitstream, int copy_data) {
- WebPMuxError err;
- WebPChunk chunk;
- WebPMuxImage wpi;
- WebPData image;
- WebPData alpha;
- int is_lossless;
- int image_tag;
-
- if (mux == NULL || bitstream == NULL || bitstream->bytes_ == NULL ||
- bitstream->size_ > MAX_CHUNK_PAYLOAD) {
- return WEBP_MUX_INVALID_ARGUMENT;
- }
-
- // If given data is for a whole webp file,
- // extract only the VP8/VP8L data from it.
- err = GetImageData(bitstream, &image, &alpha, &is_lossless);
- if (err != WEBP_MUX_OK) return err;
- image_tag = is_lossless ? kChunks[IDX_VP8L].tag : kChunks[IDX_VP8].tag;
-
- // Delete the existing images.
- MuxImageDeleteAll(&mux->images_);
-
- MuxImageInit(&wpi);
-
- if (alpha.bytes_ != NULL) { // Add alpha chunk.
- ChunkInit(&chunk);
- err = ChunkAssignData(&chunk, &alpha, copy_data, kChunks[IDX_ALPHA].tag);
- if (err != WEBP_MUX_OK) goto Err;
- err = ChunkSetNth(&chunk, &wpi.alpha_, 1);
- if (err != WEBP_MUX_OK) goto Err;
- }
-
- // Add image chunk.
- ChunkInit(&chunk);
- err = ChunkAssignData(&chunk, &image, copy_data, image_tag);
- if (err != WEBP_MUX_OK) goto Err;
- err = ChunkSetNth(&chunk, &wpi.img_, 1);
- if (err != WEBP_MUX_OK) goto Err;
-
- // Add this image to mux.
- err = MuxImagePush(&wpi, &mux->images_);
- if (err != WEBP_MUX_OK) goto Err;
-
- // All OK.
- return WEBP_MUX_OK;
-
- Err:
- // Something bad happened.
- ChunkRelease(&chunk);
- MuxImageRelease(&wpi);
- return err;
-}
-
-WebPMuxError WebPMuxSetMetadata(WebPMux* mux, const WebPData* metadata,
- int copy_data) {
- WebPMuxError err;
-
- if (mux == NULL || metadata == NULL || metadata->bytes_ == NULL ||
- metadata->size_ > MAX_CHUNK_PAYLOAD) {
- return WEBP_MUX_INVALID_ARGUMENT;
- }
-
- // Delete the existing metadata chunk(s).
- err = WebPMuxDeleteMetadata(mux);
- if (err != WEBP_MUX_OK && err != WEBP_MUX_NOT_FOUND) return err;
-
- // Add the given metadata chunk.
- return MuxSet(mux, IDX_META, 1, metadata, copy_data);
-}
-
-WebPMuxError WebPMuxSetColorProfile(WebPMux* mux, const WebPData* color_profile,
- int copy_data) {
- WebPMuxError err;
-
- if (mux == NULL || color_profile == NULL || color_profile->bytes_ == NULL ||
- color_profile->size_ > MAX_CHUNK_PAYLOAD) {
- return WEBP_MUX_INVALID_ARGUMENT;
- }
-
- // Delete the existing ICCP chunk(s).
- err = WebPMuxDeleteColorProfile(mux);
- if (err != WEBP_MUX_OK && err != WEBP_MUX_NOT_FOUND) return err;
-
- // Add the given ICCP chunk.
- return MuxSet(mux, IDX_ICCP, 1, color_profile, copy_data);
-}
-
-WebPMuxError WebPMuxSetLoopCount(WebPMux* mux, int loop_count) {
- WebPMuxError err;
- uint8_t* data = NULL;
-
- if (mux == NULL) return WEBP_MUX_INVALID_ARGUMENT;
- if (loop_count >= MAX_LOOP_COUNT) return WEBP_MUX_INVALID_ARGUMENT;
-
- // Delete the existing LOOP chunk(s).
- err = DeleteLoopCount(mux);
- if (err != WEBP_MUX_OK && err != WEBP_MUX_NOT_FOUND) return err;
-
- // Add the given loop count.
- data = (uint8_t*)malloc(kChunks[IDX_LOOP].size);
- if (data == NULL) return WEBP_MUX_MEMORY_ERROR;
-
- PutLE16(data, loop_count);
- err = MuxAddChunk(mux, 1, kChunks[IDX_LOOP].tag, data,
- kChunks[IDX_LOOP].size, 1);
- free(data);
- return err;
-}
-
-static WebPMuxError MuxPushFrameTileInternal(
- WebPMux* const mux, const WebPData* const bitstream, int x_offset,
- int y_offset, int duration, int copy_data, uint32_t tag) {
- WebPChunk chunk;
- WebPData image;
- WebPData alpha;
- WebPMuxImage wpi;
- WebPMuxError err;
- WebPData frame_tile;
- const int is_frame = (tag == kChunks[IDX_FRAME].tag) ? 1 : 0;
- int is_lossless;
- int image_tag;
-
- // Sanity checks.
- if (mux == NULL || bitstream == NULL || bitstream->bytes_ == NULL ||
- bitstream->size_ > MAX_CHUNK_PAYLOAD) {
- return WEBP_MUX_INVALID_ARGUMENT;
- }
- if (x_offset < 0 || x_offset >= MAX_POSITION_OFFSET ||
- y_offset < 0 || y_offset >= MAX_POSITION_OFFSET ||
- duration <= 0 || duration > MAX_DURATION) {
- return WEBP_MUX_INVALID_ARGUMENT;
- }
-
- // Snap offsets to even positions.
- x_offset &= ~1;
- y_offset &= ~1;
-
- // If given data is for a whole webp file,
- // extract only the VP8/VP8L data from it.
- err = GetImageData(bitstream, &image, &alpha, &is_lossless);
- if (err != WEBP_MUX_OK) return err;
- image_tag = is_lossless ? kChunks[IDX_VP8L].tag : kChunks[IDX_VP8].tag;
-
- WebPDataInit(&frame_tile);
- ChunkInit(&chunk);
- MuxImageInit(&wpi);
-
- if (alpha.bytes_ != NULL) {
- // Add alpha chunk.
- err = ChunkAssignData(&chunk, &alpha, copy_data, kChunks[IDX_ALPHA].tag);
- if (err != WEBP_MUX_OK) goto Err;
- err = ChunkSetNth(&chunk, &wpi.alpha_, 1);
- if (err != WEBP_MUX_OK) goto Err;
- ChunkInit(&chunk); // chunk owned by wpi.alpha_ now.
- }
-
- // Add image chunk.
- err = ChunkAssignData(&chunk, &image, copy_data, image_tag);
- if (err != WEBP_MUX_OK) goto Err;
- err = ChunkSetNth(&chunk, &wpi.img_, 1);
- if (err != WEBP_MUX_OK) goto Err;
- ChunkInit(&chunk); // chunk owned by wpi.img_ now.
-
- // Create frame/tile data.
- err = CreateFrameTileData(&image, x_offset, y_offset, duration, is_lossless,
- is_frame, &frame_tile);
- if (err != WEBP_MUX_OK) goto Err;
-
- // Add frame/tile chunk (with copy_data = 1).
- err = ChunkAssignData(&chunk, &frame_tile, 1, tag);
- if (err != WEBP_MUX_OK) goto Err;
- WebPDataClear(&frame_tile);
- err = ChunkSetNth(&chunk, &wpi.header_, 1);
- if (err != WEBP_MUX_OK) goto Err;
- ChunkInit(&chunk); // chunk owned by wpi.header_ now.
-
- // Add this WebPMuxImage to mux.
- err = MuxImagePush(&wpi, &mux->images_);
- if (err != WEBP_MUX_OK) goto Err;
-
- // All is well.
- return WEBP_MUX_OK;
-
- Err: // Something bad happened.
- WebPDataClear(&frame_tile);
- ChunkRelease(&chunk);
- MuxImageRelease(&wpi);
- return err;
-}
-
-WebPMuxError WebPMuxPushFrame(WebPMux* mux, const WebPData* bitstream,
- int x_offset, int y_offset,
- int duration, int copy_data) {
- return MuxPushFrameTileInternal(mux, bitstream, x_offset, y_offset,
- duration, copy_data, kChunks[IDX_FRAME].tag);
-}
-
-WebPMuxError WebPMuxPushTile(WebPMux* mux, const WebPData* bitstream,
- int x_offset, int y_offset,
- int copy_data) {
- return MuxPushFrameTileInternal(mux, bitstream, x_offset, y_offset,
- 1 /* unused duration */, copy_data,
- kChunks[IDX_TILE].tag);
-}
-
-//------------------------------------------------------------------------------
-// Delete API(s).
-
-WebPMuxError WebPMuxDeleteImage(WebPMux* mux) {
- WebPMuxError err;
-
- if (mux == NULL) return WEBP_MUX_INVALID_ARGUMENT;
-
- err = MuxValidateForImage(mux);
- if (err != WEBP_MUX_OK) return err;
-
- // All well, delete image.
- MuxImageDeleteAll(&mux->images_);
- return WEBP_MUX_OK;
-}
-
-WebPMuxError WebPMuxDeleteMetadata(WebPMux* mux) {
- return MuxDeleteAllNamedData(mux, IDX_META);
-}
-
-WebPMuxError WebPMuxDeleteColorProfile(WebPMux* mux) {
- return MuxDeleteAllNamedData(mux, IDX_ICCP);
-}
-
-static WebPMuxError DeleteFrameTileInternal(WebPMux* const mux, uint32_t nth,
- CHUNK_INDEX idx) {
- const WebPChunkId id = kChunks[idx].id;
- if (mux == NULL) return WEBP_MUX_INVALID_ARGUMENT;
-
- assert(idx == IDX_FRAME || idx == IDX_TILE);
- return MuxImageDeleteNth(&mux->images_, nth, id);
-}
-
-WebPMuxError WebPMuxDeleteFrame(WebPMux* mux, uint32_t nth) {
- return DeleteFrameTileInternal(mux, nth, IDX_FRAME);
-}
-
-WebPMuxError WebPMuxDeleteTile(WebPMux* mux, uint32_t nth) {
- return DeleteFrameTileInternal(mux, nth, IDX_TILE);
-}
-
-//------------------------------------------------------------------------------
-// Assembly of the WebP RIFF file.
-
-static WebPMuxError GetFrameTileInfo(const WebPChunk* const frame_tile_chunk,
- int* const x_offset, int* const y_offset,
- int* const duration) {
- const uint32_t tag = frame_tile_chunk->tag_;
- const int is_frame = (tag == kChunks[IDX_FRAME].tag);
- const WebPData* const data = &frame_tile_chunk->data_;
- const size_t expected_data_size =
- is_frame ? FRAME_CHUNK_SIZE : TILE_CHUNK_SIZE;
- assert(frame_tile_chunk != NULL);
- assert(tag == kChunks[IDX_FRAME].tag || tag == kChunks[IDX_TILE].tag);
- if (data->size_ != expected_data_size) return WEBP_MUX_INVALID_ARGUMENT;
-
- *x_offset = 2 * GetLE24(data->bytes_ + 0);
- *y_offset = 2 * GetLE24(data->bytes_ + 3);
- if (is_frame) *duration = 1 + GetLE24(data->bytes_ + 12);
- return WEBP_MUX_OK;
-}
-
-WebPMuxError MuxGetImageWidthHeight(const WebPChunk* const image_chunk,
- int* const width, int* const height) {
- const uint32_t tag = image_chunk->tag_;
- const WebPData* const data = &image_chunk->data_;
- int w, h;
- int ok;
- assert(image_chunk != NULL);
- assert(tag == kChunks[IDX_VP8].tag || tag == kChunks[IDX_VP8L].tag);
- ok = (tag == kChunks[IDX_VP8].tag) ?
- VP8GetInfo(data->bytes_, data->size_, data->size_, &w, &h) :
- VP8LGetInfo(data->bytes_, data->size_, &w, &h, NULL);
- if (ok) {
- *width = w;
- *height = h;
- return WEBP_MUX_OK;
- } else {
- return WEBP_MUX_BAD_DATA;
- }
-}
-
-static WebPMuxError GetImageInfo(const WebPMuxImage* const wpi,
- int* const x_offset, int* const y_offset,
- int* const duration,
- int* const width, int* const height) {
- const WebPChunk* const image_chunk = wpi->img_;
- const WebPChunk* const frame_tile_chunk = wpi->header_;
-
- // Get offsets and duration from FRM/TILE chunk.
- const WebPMuxError err =
- GetFrameTileInfo(frame_tile_chunk, x_offset, y_offset, duration);
- if (err != WEBP_MUX_OK) return err;
-
- // Get width and height from VP8/VP8L chunk.
- return MuxGetImageWidthHeight(image_chunk, width, height);
-}
-
-static WebPMuxError GetImageCanvasWidthHeight(
- const WebPMux* const mux, uint32_t flags,
- int* const width, int* const height) {
- WebPMuxImage* wpi = NULL;
- assert(mux != NULL);
- assert(width != NULL && height != NULL);
-
- wpi = mux->images_;
- assert(wpi != NULL);
- assert(wpi->img_ != NULL);
-
- if (wpi->next_) {
- int max_x = 0;
- int max_y = 0;
- int64_t image_area = 0;
- // Aggregate the bounding box for animation frames & tiled images.
- for (; wpi != NULL; wpi = wpi->next_) {
- int x_offset, y_offset, duration, w, h;
- const WebPMuxError err = GetImageInfo(wpi, &x_offset, &y_offset,
- &duration, &w, &h);
- const int max_x_pos = x_offset + w;
- const int max_y_pos = y_offset + h;
- if (err != WEBP_MUX_OK) return err;
- assert(x_offset < MAX_POSITION_OFFSET);
- assert(y_offset < MAX_POSITION_OFFSET);
-
- if (max_x_pos > max_x) max_x = max_x_pos;
- if (max_y_pos > max_y) max_y = max_y_pos;
- image_area += w * h;
- }
- *width = max_x;
- *height = max_y;
- // Crude check to validate that there are no image overlaps/holes for tile
- // images. Check that the aggregated image area for individual tiles exactly
- // matches the image area of the constructed canvas. However, the area-match
- // is necessary but not sufficient condition.
- if ((flags & TILE_FLAG) && (image_area != (max_x * max_y))) {
- *width = 0;
- *height = 0;
- return WEBP_MUX_INVALID_ARGUMENT;
- }
- } else {
- // For a single image, extract the width & height from VP8/VP8L image-data.
- int w, h;
- const WebPChunk* const image_chunk = wpi->img_;
- const WebPMuxError err = MuxGetImageWidthHeight(image_chunk, &w, &h);
- if (err != WEBP_MUX_OK) return err;
- *width = w;
- *height = h;
- }
- return WEBP_MUX_OK;
-}
-
-// VP8X format:
-// Total Size : 10,
-// Flags : 4 bytes,
-// Width : 3 bytes,
-// Height : 3 bytes.
-static WebPMuxError CreateVP8XChunk(WebPMux* const mux) {
- WebPMuxError err = WEBP_MUX_OK;
- uint32_t flags = 0;
- int width = 0;
- int height = 0;
- uint8_t data[VP8X_CHUNK_SIZE];
- const size_t data_size = VP8X_CHUNK_SIZE;
- const WebPMuxImage* images = NULL;
-
- assert(mux != NULL);
- images = mux->images_; // First image.
- if (images == NULL || images->img_ == NULL ||
- images->img_->data_.bytes_ == NULL) {
- return WEBP_MUX_INVALID_ARGUMENT;
- }
-
- // If VP8X chunk(s) is(are) already present, remove them (and later add new
- // VP8X chunk with updated flags).
- err = MuxDeleteAllNamedData(mux, IDX_VP8X);
- if (err != WEBP_MUX_OK && err != WEBP_MUX_NOT_FOUND) return err;
-
- // Set flags.
- if (mux->iccp_ != NULL && mux->iccp_->data_.bytes_ != NULL) {
- flags |= ICCP_FLAG;
- }
-
- if (mux->meta_ != NULL && mux->meta_->data_.bytes_ != NULL) {
- flags |= META_FLAG;
- }
-
- if (images->header_ != NULL) {
- if (images->header_->tag_ == kChunks[IDX_TILE].tag) {
- // This is a tiled image.
- flags |= TILE_FLAG;
- } else if (images->header_->tag_ == kChunks[IDX_FRAME].tag) {
- // This is an image with animation.
- flags |= ANIMATION_FLAG;
- }
- }
-
- if (MuxImageCount(images, WEBP_CHUNK_ALPHA) > 0) {
- flags |= ALPHA_FLAG; // Some images have an alpha channel.
- }
-
- if (flags == 0) {
- // For Simple Image, VP8X chunk should not be added.
- return WEBP_MUX_OK;
- }
-
- err = GetImageCanvasWidthHeight(mux, flags, &width, &height);
- if (err != WEBP_MUX_OK) return err;
-
- if (width <= 0 || height <= 0) {
- return WEBP_MUX_INVALID_ARGUMENT;
- }
- if (width > MAX_CANVAS_SIZE || height > MAX_CANVAS_SIZE) {
- return WEBP_MUX_INVALID_ARGUMENT;
- }
-
- if (MuxHasLosslessImages(images)) {
- // We have a file with a VP8X chunk having some lossless images.
- // As lossless images implicitly contain alpha, force ALPHA_FLAG to be true.
- // Note: This 'flags' update must NOT be done for a lossless image
- // without a VP8X chunk!
- flags |= ALPHA_FLAG;
- }
-
- PutLE32(data + 0, flags); // VP8X chunk flags.
- PutLE24(data + 4, width - 1); // canvas width.
- PutLE24(data + 7, height - 1); // canvas height.
-
- err = MuxAddChunk(mux, 1, kChunks[IDX_VP8X].tag, data, data_size, 1);
- return err;
-}
-
-WebPMuxError WebPMuxAssemble(WebPMux* mux, WebPData* assembled_data) {
- size_t size = 0;
- uint8_t* data = NULL;
- uint8_t* dst = NULL;
- int num_frames;
- int num_loop_chunks;
- WebPMuxError err;
-
- if (mux == NULL || assembled_data == NULL) {
- return WEBP_MUX_INVALID_ARGUMENT;
- }
-
- // Remove LOOP chunk if unnecessary.
- err = WebPMuxNumChunks(mux, kChunks[IDX_LOOP].id, &num_loop_chunks);
- if (err != WEBP_MUX_OK) return err;
- if (num_loop_chunks >= 1) {
- err = WebPMuxNumChunks(mux, kChunks[IDX_FRAME].id, &num_frames);
- if (err != WEBP_MUX_OK) return err;
- if (num_frames == 0) {
- err = DeleteLoopCount(mux);
- if (err != WEBP_MUX_OK) return err;
- }
- }
-
- // Create VP8X chunk.
- err = CreateVP8XChunk(mux);
- if (err != WEBP_MUX_OK) return err;
-
- // Allocate data.
- size = ChunksListDiskSize(mux->vp8x_) + ChunksListDiskSize(mux->iccp_)
- + ChunksListDiskSize(mux->loop_) + MuxImageListDiskSize(mux->images_)
- + ChunksListDiskSize(mux->meta_) + ChunksListDiskSize(mux->unknown_)
- + RIFF_HEADER_SIZE;
-
- data = (uint8_t*)malloc(size);
- if (data == NULL) return WEBP_MUX_MEMORY_ERROR;
-
- // Emit header & chunks.
- dst = MuxEmitRiffHeader(data, size);
- dst = ChunkListEmit(mux->vp8x_, dst);
- dst = ChunkListEmit(mux->iccp_, dst);
- dst = ChunkListEmit(mux->loop_, dst);
- dst = MuxImageListEmit(mux->images_, dst);
- dst = ChunkListEmit(mux->meta_, dst);
- dst = ChunkListEmit(mux->unknown_, dst);
- assert(dst == data + size);
-
- // Validate mux.
- err = MuxValidate(mux);
- if (err != WEBP_MUX_OK) {
- free(data);
- data = NULL;
- size = 0;
- }
-
- // Finalize.
- assembled_data->bytes_ = data;
- assembled_data->size_ = size;
-
- return err;
-}
-
-//------------------------------------------------------------------------------
-
-#if defined(__cplusplus) || defined(c_plusplus)
-} // extern "C"
-#endif
diff --git a/drivers/webpold/mux/muxi.h b/drivers/webpold/mux/muxi.h
deleted file mode 100644
index 2f06f3ed03..0000000000
--- a/drivers/webpold/mux/muxi.h
+++ /dev/null
@@ -1,271 +0,0 @@
-// Copyright 2011 Google Inc. All Rights Reserved.
-//
-// This code is licensed under the same terms as WebM:
-// Software License Agreement: http://www.webmproject.org/license/software/
-// Additional IP Rights Grant: http://www.webmproject.org/license/additional/
-// -----------------------------------------------------------------------------
-//
-// Internal header for mux library.
-//
-// Author: Urvang (urvang@google.com)
-
-#ifndef WEBP_MUX_MUXI_H_
-#define WEBP_MUX_MUXI_H_
-
-#include <stdlib.h>
-#include "../dec/vp8i.h"
-#include "../dec/vp8li.h"
-#include "../format_constants.h"
-#include "../mux.h"
-
-#if defined(__cplusplus) || defined(c_plusplus)
-extern "C" {
-#endif
-
-//------------------------------------------------------------------------------
-// Defines and constants.
-
-// Chunk object.
-typedef struct WebPChunk WebPChunk;
-struct WebPChunk {
- uint32_t tag_;
- int owner_; // True if *data_ memory is owned internally.
- // VP8X, Loop, and other internally created chunks
- // like frame/tile are always owned.
- WebPData data_;
- WebPChunk* next_;
-};
-
-// MuxImage object. Store a full webp image (including frame/tile chunk, alpha
-// chunk and VP8/VP8L chunk),
-typedef struct WebPMuxImage WebPMuxImage;
-struct WebPMuxImage {
- WebPChunk* header_; // Corresponds to WEBP_CHUNK_FRAME/WEBP_CHUNK_TILE.
- WebPChunk* alpha_; // Corresponds to WEBP_CHUNK_ALPHA.
- WebPChunk* img_; // Corresponds to WEBP_CHUNK_IMAGE.
- int is_partial_; // True if only some of the chunks are filled.
- WebPMuxImage* next_;
-};
-
-// Main mux object. Stores data chunks.
-struct WebPMux {
- WebPMuxImage* images_;
- WebPChunk* iccp_;
- WebPChunk* meta_;
- WebPChunk* loop_;
- WebPChunk* vp8x_;
-
- WebPChunk* unknown_;
-};
-
-// CHUNK_INDEX enum: used for indexing within 'kChunks' (defined below) only.
-// Note: the reason for having two enums ('WebPChunkId' and 'CHUNK_INDEX') is to
-// allow two different chunks to have the same id (e.g. WebPChunkId
-// 'WEBP_CHUNK_IMAGE' can correspond to CHUNK_INDEX 'IDX_VP8' or 'IDX_VP8L').
-typedef enum {
- IDX_VP8X = 0,
- IDX_ICCP,
- IDX_LOOP,
- IDX_FRAME,
- IDX_TILE,
- IDX_ALPHA,
- IDX_VP8,
- IDX_VP8L,
- IDX_META,
- IDX_UNKNOWN,
-
- IDX_NIL,
- IDX_LAST_CHUNK
-} CHUNK_INDEX;
-
-#define NIL_TAG 0x00000000u // To signal void chunk.
-
-#define MKFOURCC(a, b, c, d) ((uint32_t)(a) | (b) << 8 | (c) << 16 | (d) << 24)
-
-typedef struct {
- uint32_t tag;
- WebPChunkId id;
- uint32_t size;
-} ChunkInfo;
-
-extern const ChunkInfo kChunks[IDX_LAST_CHUNK];
-
-//------------------------------------------------------------------------------
-// Helper functions.
-
-// Read 16, 24 or 32 bits stored in little-endian order.
-static WEBP_INLINE int GetLE16(const uint8_t* const data) {
- return (int)(data[0] << 0) | (data[1] << 8);
-}
-
-static WEBP_INLINE int GetLE24(const uint8_t* const data) {
- return GetLE16(data) | (data[2] << 16);
-}
-
-static WEBP_INLINE uint32_t GetLE32(const uint8_t* const data) {
- return (uint32_t)GetLE16(data) | (GetLE16(data + 2) << 16);
-}
-
-// Store 16, 24 or 32 bits in little-endian order.
-static WEBP_INLINE void PutLE16(uint8_t* const data, int val) {
- assert(val < (1 << 16));
- data[0] = (val >> 0);
- data[1] = (val >> 8);
-}
-
-static WEBP_INLINE void PutLE24(uint8_t* const data, int val) {
- assert(val < (1 << 24));
- PutLE16(data, val & 0xffff);
- data[2] = (val >> 16);
-}
-
-static WEBP_INLINE void PutLE32(uint8_t* const data, uint32_t val) {
- PutLE16(data, (int)(val & 0xffff));
- PutLE16(data + 2, (int)(val >> 16));
-}
-
-static WEBP_INLINE size_t SizeWithPadding(size_t chunk_size) {
- return CHUNK_HEADER_SIZE + ((chunk_size + 1) & ~1U);
-}
-
-//------------------------------------------------------------------------------
-// Chunk object management.
-
-// Initialize.
-void ChunkInit(WebPChunk* const chunk);
-
-// Get chunk index from chunk tag. Returns IDX_NIL if not found.
-CHUNK_INDEX ChunkGetIndexFromTag(uint32_t tag);
-
-// Get chunk id from chunk tag. Returns WEBP_CHUNK_NIL if not found.
-WebPChunkId ChunkGetIdFromTag(uint32_t tag);
-
-// Search for nth chunk with given 'tag' in the chunk list.
-// nth = 0 means "last of the list".
-WebPChunk* ChunkSearchList(WebPChunk* first, uint32_t nth, uint32_t tag);
-
-// Fill the chunk with the given data.
-WebPMuxError ChunkAssignData(WebPChunk* chunk, const WebPData* const data,
- int copy_data, uint32_t tag);
-
-// Sets 'chunk' at nth position in the 'chunk_list'.
-// nth = 0 has the special meaning "last of the list".
-WebPMuxError ChunkSetNth(const WebPChunk* chunk, WebPChunk** chunk_list,
- uint32_t nth);
-
-// Releases chunk and returns chunk->next_.
-WebPChunk* ChunkRelease(WebPChunk* const chunk);
-
-// Deletes given chunk & returns chunk->next_.
-WebPChunk* ChunkDelete(WebPChunk* const chunk);
-
-// Size of a chunk including header and padding.
-static WEBP_INLINE size_t ChunkDiskSize(const WebPChunk* chunk) {
- const size_t data_size = chunk->data_.size_;
- assert(data_size < MAX_CHUNK_PAYLOAD);
- return SizeWithPadding(data_size);
-}
-
-// Total size of a list of chunks.
-size_t ChunksListDiskSize(const WebPChunk* chunk_list);
-
-// Write out the given list of chunks into 'dst'.
-uint8_t* ChunkListEmit(const WebPChunk* chunk_list, uint8_t* dst);
-
-// Get the width & height of image stored in 'image_chunk'.
-WebPMuxError MuxGetImageWidthHeight(const WebPChunk* const image_chunk,
- int* const width, int* const height);
-
-//------------------------------------------------------------------------------
-// MuxImage object management.
-
-// Initialize.
-void MuxImageInit(WebPMuxImage* const wpi);
-
-// Releases image 'wpi' and returns wpi->next.
-WebPMuxImage* MuxImageRelease(WebPMuxImage* const wpi);
-
-// Delete image 'wpi' and return the next image in the list or NULL.
-// 'wpi' can be NULL.
-WebPMuxImage* MuxImageDelete(WebPMuxImage* const wpi);
-
-// Delete all images in 'wpi_list'.
-void MuxImageDeleteAll(WebPMuxImage** const wpi_list);
-
-// Count number of images matching the given tag id in the 'wpi_list'.
-int MuxImageCount(const WebPMuxImage* wpi_list, WebPChunkId id);
-
-// Check if given ID corresponds to an image related chunk.
-static WEBP_INLINE int IsWPI(WebPChunkId id) {
- switch (id) {
- case WEBP_CHUNK_FRAME:
- case WEBP_CHUNK_TILE:
- case WEBP_CHUNK_ALPHA:
- case WEBP_CHUNK_IMAGE: return 1;
- default: return 0;
- }
-}
-
-// Get a reference to appropriate chunk list within an image given chunk tag.
-static WEBP_INLINE WebPChunk** MuxImageGetListFromId(
- const WebPMuxImage* const wpi, WebPChunkId id) {
- assert(wpi != NULL);
- switch (id) {
- case WEBP_CHUNK_FRAME:
- case WEBP_CHUNK_TILE: return (WebPChunk**)&wpi->header_;
- case WEBP_CHUNK_ALPHA: return (WebPChunk**)&wpi->alpha_;
- case WEBP_CHUNK_IMAGE: return (WebPChunk**)&wpi->img_;
- default: return NULL;
- }
-}
-
-// Pushes 'wpi' at the end of 'wpi_list'.
-WebPMuxError MuxImagePush(const WebPMuxImage* wpi, WebPMuxImage** wpi_list);
-
-// Delete nth image in the image list with given tag id.
-WebPMuxError MuxImageDeleteNth(WebPMuxImage** wpi_list, uint32_t nth,
- WebPChunkId id);
-
-// Get nth image in the image list with given tag id.
-WebPMuxError MuxImageGetNth(const WebPMuxImage** wpi_list, uint32_t nth,
- WebPChunkId id, WebPMuxImage** wpi);
-
-// Total size of the given image.
-size_t MuxImageDiskSize(const WebPMuxImage* const wpi);
-
-// Total size of a list of images.
-size_t MuxImageListDiskSize(const WebPMuxImage* wpi_list);
-
-// Write out the given image into 'dst'.
-uint8_t* MuxImageEmit(const WebPMuxImage* const wpi, uint8_t* dst);
-
-// Write out the given list of images into 'dst'.
-uint8_t* MuxImageListEmit(const WebPMuxImage* wpi_list, uint8_t* dst);
-
-//------------------------------------------------------------------------------
-// Helper methods for mux.
-
-// Checks if the given image list contains at least one lossless image.
-int MuxHasLosslessImages(const WebPMuxImage* images);
-
-// Write out RIFF header into 'data', given total data size 'size'.
-uint8_t* MuxEmitRiffHeader(uint8_t* const data, size_t size);
-
-// Returns the list where chunk with given ID is to be inserted in mux.
-// Return value is NULL if this chunk should be inserted in mux->images_ list
-// or if 'id' is not known.
-WebPChunk** MuxGetChunkListFromId(const WebPMux* mux, WebPChunkId id);
-
-// Validates that the given mux has a single image.
-WebPMuxError MuxValidateForImage(const WebPMux* const mux);
-
-// Validates the given mux object.
-WebPMuxError MuxValidate(const WebPMux* const mux);
-
-//------------------------------------------------------------------------------
-
-#if defined(__cplusplus) || defined(c_plusplus)
-} // extern "C"
-#endif
-
-#endif /* WEBP_MUX_MUXI_H_ */
diff --git a/drivers/webpold/mux/muxinternal.c b/drivers/webpold/mux/muxinternal.c
deleted file mode 100644
index 6c3c4fe60a..0000000000
--- a/drivers/webpold/mux/muxinternal.c
+++ /dev/null
@@ -1,576 +0,0 @@
-// Copyright 2011 Google Inc. All Rights Reserved.
-//
-// This code is licensed under the same terms as WebM:
-// Software License Agreement: http://www.webmproject.org/license/software/
-// Additional IP Rights Grant: http://www.webmproject.org/license/additional/
-// -----------------------------------------------------------------------------
-//
-// Internal objects and utils for mux.
-//
-// Authors: Urvang (urvang@google.com)
-// Vikas (vikasa@google.com)
-
-#include <assert.h>
-#include "./muxi.h"
-
-#if defined(__cplusplus) || defined(c_plusplus)
-extern "C" {
-#endif
-
-#define UNDEFINED_CHUNK_SIZE (-1)
-
-const ChunkInfo kChunks[] = {
- { MKFOURCC('V', 'P', '8', 'X'), WEBP_CHUNK_VP8X, VP8X_CHUNK_SIZE },
- { MKFOURCC('I', 'C', 'C', 'P'), WEBP_CHUNK_ICCP, UNDEFINED_CHUNK_SIZE },
- { MKFOURCC('L', 'O', 'O', 'P'), WEBP_CHUNK_LOOP, LOOP_CHUNK_SIZE },
- { MKFOURCC('F', 'R', 'M', ' '), WEBP_CHUNK_FRAME, FRAME_CHUNK_SIZE },
- { MKFOURCC('T', 'I', 'L', 'E'), WEBP_CHUNK_TILE, TILE_CHUNK_SIZE },
- { MKFOURCC('A', 'L', 'P', 'H'), WEBP_CHUNK_ALPHA, UNDEFINED_CHUNK_SIZE },
- { MKFOURCC('V', 'P', '8', ' '), WEBP_CHUNK_IMAGE, UNDEFINED_CHUNK_SIZE },
- { MKFOURCC('V', 'P', '8', 'L'), WEBP_CHUNK_IMAGE, UNDEFINED_CHUNK_SIZE },
- { MKFOURCC('M', 'E', 'T', 'A'), WEBP_CHUNK_META, UNDEFINED_CHUNK_SIZE },
- { MKFOURCC('U', 'N', 'K', 'N'), WEBP_CHUNK_UNKNOWN, UNDEFINED_CHUNK_SIZE },
-
- { NIL_TAG, WEBP_CHUNK_NIL, UNDEFINED_CHUNK_SIZE }
-};
-
-//------------------------------------------------------------------------------
-// Life of a chunk object.
-
-void ChunkInit(WebPChunk* const chunk) {
- assert(chunk);
- memset(chunk, 0, sizeof(*chunk));
- chunk->tag_ = NIL_TAG;
-}
-
-WebPChunk* ChunkRelease(WebPChunk* const chunk) {
- WebPChunk* next;
- if (chunk == NULL) return NULL;
- if (chunk->owner_) {
- WebPDataClear(&chunk->data_);
- }
- next = chunk->next_;
- ChunkInit(chunk);
- return next;
-}
-
-//------------------------------------------------------------------------------
-// Chunk misc methods.
-
-CHUNK_INDEX ChunkGetIndexFromTag(uint32_t tag) {
- int i;
- for (i = 0; kChunks[i].tag != NIL_TAG; ++i) {
- if (tag == kChunks[i].tag) return i;
- }
- return IDX_NIL;
-}
-
-WebPChunkId ChunkGetIdFromTag(uint32_t tag) {
- int i;
- for (i = 0; kChunks[i].tag != NIL_TAG; ++i) {
- if (tag == kChunks[i].tag) return kChunks[i].id;
- }
- return WEBP_CHUNK_NIL;
-}
-
-//------------------------------------------------------------------------------
-// Chunk search methods.
-
-// Returns next chunk in the chunk list with the given tag.
-static WebPChunk* ChunkSearchNextInList(WebPChunk* chunk, uint32_t tag) {
- while (chunk && chunk->tag_ != tag) {
- chunk = chunk->next_;
- }
- return chunk;
-}
-
-WebPChunk* ChunkSearchList(WebPChunk* first, uint32_t nth, uint32_t tag) {
- uint32_t iter = nth;
- first = ChunkSearchNextInList(first, tag);
- if (!first) return NULL;
-
- while (--iter != 0) {
- WebPChunk* next_chunk = ChunkSearchNextInList(first->next_, tag);
- if (next_chunk == NULL) break;
- first = next_chunk;
- }
- return ((nth > 0) && (iter > 0)) ? NULL : first;
-}
-
-// Outputs a pointer to 'prev_chunk->next_',
-// where 'prev_chunk' is the pointer to the chunk at position (nth - 1).
-// Returns 1 if nth chunk was found, 0 otherwise.
-static int ChunkSearchListToSet(WebPChunk** chunk_list, uint32_t nth,
- WebPChunk*** const location) {
- uint32_t count = 0;
- assert(chunk_list);
- *location = chunk_list;
-
- while (*chunk_list) {
- WebPChunk* const cur_chunk = *chunk_list;
- ++count;
- if (count == nth) return 1; // Found.
- chunk_list = &cur_chunk->next_;
- *location = chunk_list;
- }
-
- // *chunk_list is ok to be NULL if adding at last location.
- return (nth == 0 || (count == nth - 1)) ? 1 : 0;
-}
-
-//------------------------------------------------------------------------------
-// Chunk writer methods.
-
-WebPMuxError ChunkAssignData(WebPChunk* chunk, const WebPData* const data,
- int copy_data, uint32_t tag) {
- // For internally allocated chunks, always copy data & make it owner of data.
- if (tag == kChunks[IDX_VP8X].tag || tag == kChunks[IDX_LOOP].tag) {
- copy_data = 1;
- }
-
- ChunkRelease(chunk);
-
- if (data != NULL) {
- if (copy_data) {
- // Copy data.
- chunk->data_.bytes_ = (uint8_t*)malloc(data->size_);
- if (chunk->data_.bytes_ == NULL) return WEBP_MUX_MEMORY_ERROR;
- memcpy((uint8_t*)chunk->data_.bytes_, data->bytes_, data->size_);
- chunk->data_.size_ = data->size_;
-
- // Chunk is owner of data.
- chunk->owner_ = 1;
- } else {
- // Don't copy data.
- chunk->data_ = *data;
- }
- }
-
- chunk->tag_ = tag;
-
- return WEBP_MUX_OK;
-}
-
-WebPMuxError ChunkSetNth(const WebPChunk* chunk, WebPChunk** chunk_list,
- uint32_t nth) {
- WebPChunk* new_chunk;
-
- if (!ChunkSearchListToSet(chunk_list, nth, &chunk_list)) {
- return WEBP_MUX_NOT_FOUND;
- }
-
- new_chunk = (WebPChunk*)malloc(sizeof(*new_chunk));
- if (new_chunk == NULL) return WEBP_MUX_MEMORY_ERROR;
- *new_chunk = *chunk;
- new_chunk->next_ = *chunk_list;
- *chunk_list = new_chunk;
- return WEBP_MUX_OK;
-}
-
-//------------------------------------------------------------------------------
-// Chunk deletion method(s).
-
-WebPChunk* ChunkDelete(WebPChunk* const chunk) {
- WebPChunk* const next = ChunkRelease(chunk);
- free(chunk);
- return next;
-}
-
-//------------------------------------------------------------------------------
-// Chunk serialization methods.
-
-size_t ChunksListDiskSize(const WebPChunk* chunk_list) {
- size_t size = 0;
- while (chunk_list) {
- size += ChunkDiskSize(chunk_list);
- chunk_list = chunk_list->next_;
- }
- return size;
-}
-
-static uint8_t* ChunkEmit(const WebPChunk* const chunk, uint8_t* dst) {
- const size_t chunk_size = chunk->data_.size_;
- assert(chunk);
- assert(chunk->tag_ != NIL_TAG);
- PutLE32(dst + 0, chunk->tag_);
- PutLE32(dst + TAG_SIZE, (uint32_t)chunk_size);
- assert(chunk_size == (uint32_t)chunk_size);
- memcpy(dst + CHUNK_HEADER_SIZE, chunk->data_.bytes_, chunk_size);
- if (chunk_size & 1)
- dst[CHUNK_HEADER_SIZE + chunk_size] = 0; // Add padding.
- return dst + ChunkDiskSize(chunk);
-}
-
-uint8_t* ChunkListEmit(const WebPChunk* chunk_list, uint8_t* dst) {
- while (chunk_list) {
- dst = ChunkEmit(chunk_list, dst);
- chunk_list = chunk_list->next_;
- }
- return dst;
-}
-
-//------------------------------------------------------------------------------
-// Manipulation of a WebPData object.
-
-void WebPDataInit(WebPData* webp_data) {
- if (webp_data != NULL) {
- memset(webp_data, 0, sizeof(*webp_data));
- }
-}
-
-void WebPDataClear(WebPData* webp_data) {
- if (webp_data != NULL) {
- free((void*)webp_data->bytes_);
- WebPDataInit(webp_data);
- }
-}
-
-int WebPDataCopy(const WebPData* src, WebPData* dst) {
- if (src == NULL || dst == NULL) return 0;
-
- WebPDataInit(dst);
- if (src->bytes_ != NULL && src->size_ != 0) {
- dst->bytes_ = (uint8_t*)malloc(src->size_);
- if (dst->bytes_ == NULL) return 0;
- memcpy((void*)dst->bytes_, src->bytes_, src->size_);
- dst->size_ = src->size_;
- }
- return 1;
-}
-
-//------------------------------------------------------------------------------
-// Life of a MuxImage object.
-
-void MuxImageInit(WebPMuxImage* const wpi) {
- assert(wpi);
- memset(wpi, 0, sizeof(*wpi));
-}
-
-WebPMuxImage* MuxImageRelease(WebPMuxImage* const wpi) {
- WebPMuxImage* next;
- if (wpi == NULL) return NULL;
- ChunkDelete(wpi->header_);
- ChunkDelete(wpi->alpha_);
- ChunkDelete(wpi->img_);
-
- next = wpi->next_;
- MuxImageInit(wpi);
- return next;
-}
-
-//------------------------------------------------------------------------------
-// MuxImage search methods.
-
-int MuxImageCount(const WebPMuxImage* wpi_list, WebPChunkId id) {
- int count = 0;
- const WebPMuxImage* current;
- for (current = wpi_list; current != NULL; current = current->next_) {
- const WebPChunk* const wpi_chunk = *MuxImageGetListFromId(current, id);
- if (wpi_chunk != NULL) {
- const WebPChunkId wpi_chunk_id = ChunkGetIdFromTag(wpi_chunk->tag_);
- if (wpi_chunk_id == id) ++count;
- }
- }
- return count;
-}
-
-// Outputs a pointer to 'prev_wpi->next_',
-// where 'prev_wpi' is the pointer to the image at position (nth - 1).
-// Returns 1 if nth image with given id was found, 0 otherwise.
-static int SearchImageToGetOrDelete(WebPMuxImage** wpi_list, uint32_t nth,
- WebPChunkId id,
- WebPMuxImage*** const location) {
- uint32_t count = 0;
- assert(wpi_list);
- *location = wpi_list;
-
- // Search makes sense only for the following.
- assert(id == WEBP_CHUNK_FRAME || id == WEBP_CHUNK_TILE ||
- id == WEBP_CHUNK_IMAGE);
- assert(id != WEBP_CHUNK_IMAGE || nth == 1);
-
- if (nth == 0) {
- nth = MuxImageCount(*wpi_list, id);
- if (nth == 0) return 0; // Not found.
- }
-
- while (*wpi_list) {
- WebPMuxImage* const cur_wpi = *wpi_list;
- const WebPChunk* const wpi_chunk = *MuxImageGetListFromId(cur_wpi, id);
- if (wpi_chunk != NULL) {
- const WebPChunkId wpi_chunk_id = ChunkGetIdFromTag(wpi_chunk->tag_);
- if (wpi_chunk_id == id) {
- ++count;
- if (count == nth) return 1; // Found.
- }
- }
- wpi_list = &cur_wpi->next_;
- *location = wpi_list;
- }
- return 0; // Not found.
-}
-
-//------------------------------------------------------------------------------
-// MuxImage writer methods.
-
-WebPMuxError MuxImagePush(const WebPMuxImage* wpi, WebPMuxImage** wpi_list) {
- WebPMuxImage* new_wpi;
-
- while (*wpi_list != NULL) {
- WebPMuxImage* const cur_wpi = *wpi_list;
- if (cur_wpi->next_ == NULL) break;
- wpi_list = &cur_wpi->next_;
- }
-
- new_wpi = (WebPMuxImage*)malloc(sizeof(*new_wpi));
- if (new_wpi == NULL) return WEBP_MUX_MEMORY_ERROR;
- *new_wpi = *wpi;
- new_wpi->next_ = NULL;
-
- if (*wpi_list != NULL) {
- (*wpi_list)->next_ = new_wpi;
- } else {
- *wpi_list = new_wpi;
- }
- return WEBP_MUX_OK;
-}
-
-//------------------------------------------------------------------------------
-// MuxImage deletion methods.
-
-WebPMuxImage* MuxImageDelete(WebPMuxImage* const wpi) {
- // Delete the components of wpi. If wpi is NULL this is a noop.
- WebPMuxImage* const next = MuxImageRelease(wpi);
- free(wpi);
- return next;
-}
-
-void MuxImageDeleteAll(WebPMuxImage** const wpi_list) {
- while (*wpi_list) {
- *wpi_list = MuxImageDelete(*wpi_list);
- }
-}
-
-WebPMuxError MuxImageDeleteNth(WebPMuxImage** wpi_list, uint32_t nth,
- WebPChunkId id) {
- assert(wpi_list);
- if (!SearchImageToGetOrDelete(wpi_list, nth, id, &wpi_list)) {
- return WEBP_MUX_NOT_FOUND;
- }
- *wpi_list = MuxImageDelete(*wpi_list);
- return WEBP_MUX_OK;
-}
-
-//------------------------------------------------------------------------------
-// MuxImage reader methods.
-
-WebPMuxError MuxImageGetNth(const WebPMuxImage** wpi_list, uint32_t nth,
- WebPChunkId id, WebPMuxImage** wpi) {
- assert(wpi_list);
- assert(wpi);
- if (!SearchImageToGetOrDelete((WebPMuxImage**)wpi_list, nth, id,
- (WebPMuxImage***)&wpi_list)) {
- return WEBP_MUX_NOT_FOUND;
- }
- *wpi = (WebPMuxImage*)*wpi_list;
- return WEBP_MUX_OK;
-}
-
-//------------------------------------------------------------------------------
-// MuxImage serialization methods.
-
-// Size of an image.
-size_t MuxImageDiskSize(const WebPMuxImage* const wpi) {
- size_t size = 0;
- if (wpi->header_ != NULL) size += ChunkDiskSize(wpi->header_);
- if (wpi->alpha_ != NULL) size += ChunkDiskSize(wpi->alpha_);
- if (wpi->img_ != NULL) size += ChunkDiskSize(wpi->img_);
- return size;
-}
-
-size_t MuxImageListDiskSize(const WebPMuxImage* wpi_list) {
- size_t size = 0;
- while (wpi_list) {
- size += MuxImageDiskSize(wpi_list);
- wpi_list = wpi_list->next_;
- }
- return size;
-}
-
-uint8_t* MuxImageEmit(const WebPMuxImage* const wpi, uint8_t* dst) {
- // Ordering of chunks to be emitted is strictly as follows:
- // 1. Frame/Tile chunk (if present).
- // 2. Alpha chunk (if present).
- // 3. VP8/VP8L chunk.
- assert(wpi);
- if (wpi->header_ != NULL) dst = ChunkEmit(wpi->header_, dst);
- if (wpi->alpha_ != NULL) dst = ChunkEmit(wpi->alpha_, dst);
- if (wpi->img_ != NULL) dst = ChunkEmit(wpi->img_, dst);
- return dst;
-}
-
-uint8_t* MuxImageListEmit(const WebPMuxImage* wpi_list, uint8_t* dst) {
- while (wpi_list) {
- dst = MuxImageEmit(wpi_list, dst);
- wpi_list = wpi_list->next_;
- }
- return dst;
-}
-
-//------------------------------------------------------------------------------
-// Helper methods for mux.
-
-int MuxHasLosslessImages(const WebPMuxImage* images) {
- while (images != NULL) {
- assert(images->img_ != NULL);
- if (images->img_->tag_ == kChunks[IDX_VP8L].tag) {
- return 1;
- }
- images = images->next_;
- }
- return 0;
-}
-
-uint8_t* MuxEmitRiffHeader(uint8_t* const data, size_t size) {
- PutLE32(data + 0, MKFOURCC('R', 'I', 'F', 'F'));
- PutLE32(data + TAG_SIZE, (uint32_t)size - CHUNK_HEADER_SIZE);
- assert(size == (uint32_t)size);
- PutLE32(data + TAG_SIZE + CHUNK_SIZE_BYTES, MKFOURCC('W', 'E', 'B', 'P'));
- return data + RIFF_HEADER_SIZE;
-}
-
-WebPChunk** MuxGetChunkListFromId(const WebPMux* mux, WebPChunkId id) {
- assert(mux != NULL);
- switch(id) {
- case WEBP_CHUNK_VP8X: return (WebPChunk**)&mux->vp8x_;
- case WEBP_CHUNK_ICCP: return (WebPChunk**)&mux->iccp_;
- case WEBP_CHUNK_LOOP: return (WebPChunk**)&mux->loop_;
- case WEBP_CHUNK_META: return (WebPChunk**)&mux->meta_;
- case WEBP_CHUNK_UNKNOWN: return (WebPChunk**)&mux->unknown_;
- default: return NULL;
- }
-}
-
-WebPMuxError MuxValidateForImage(const WebPMux* const mux) {
- const int num_images = MuxImageCount(mux->images_, WEBP_CHUNK_IMAGE);
- const int num_frames = MuxImageCount(mux->images_, WEBP_CHUNK_FRAME);
- const int num_tiles = MuxImageCount(mux->images_, WEBP_CHUNK_TILE);
-
- if (num_images == 0) {
- // No images in mux.
- return WEBP_MUX_NOT_FOUND;
- } else if (num_images == 1 && num_frames == 0 && num_tiles == 0) {
- // Valid case (single image).
- return WEBP_MUX_OK;
- } else {
- // Frame/Tile case OR an invalid mux.
- return WEBP_MUX_INVALID_ARGUMENT;
- }
-}
-
-static int IsNotCompatible(int feature, int num_items) {
- return (feature != 0) != (num_items > 0);
-}
-
-#define NO_FLAG 0
-
-// Test basic constraints:
-// retrieval, maximum number of chunks by index (use -1 to skip)
-// and feature incompatibility (use NO_FLAG to skip).
-// On success returns WEBP_MUX_OK and stores the chunk count in *num.
-static WebPMuxError ValidateChunk(const WebPMux* const mux, CHUNK_INDEX idx,
- WebPFeatureFlags feature,
- WebPFeatureFlags vp8x_flags,
- int max, int* num) {
- const WebPMuxError err =
- WebPMuxNumChunks(mux, kChunks[idx].id, num);
- if (err != WEBP_MUX_OK) return err;
- if (max > -1 && *num > max) return WEBP_MUX_INVALID_ARGUMENT;
- if (feature != NO_FLAG && IsNotCompatible(vp8x_flags & feature, *num)) {
- return WEBP_MUX_INVALID_ARGUMENT;
- }
- return WEBP_MUX_OK;
-}
-
-WebPMuxError MuxValidate(const WebPMux* const mux) {
- int num_iccp;
- int num_meta;
- int num_loop_chunks;
- int num_frames;
- int num_tiles;
- int num_vp8x;
- int num_images;
- int num_alpha;
- uint32_t flags;
- WebPMuxError err;
-
- // Verify mux is not NULL.
- if (mux == NULL) return WEBP_MUX_INVALID_ARGUMENT;
-
- // Verify mux has at least one image.
- if (mux->images_ == NULL) return WEBP_MUX_INVALID_ARGUMENT;
-
- err = WebPMuxGetFeatures(mux, &flags);
- if (err != WEBP_MUX_OK) return err;
-
- // At most one color profile chunk.
- err = ValidateChunk(mux, IDX_ICCP, ICCP_FLAG, flags, 1, &num_iccp);
- if (err != WEBP_MUX_OK) return err;
-
- // At most one XMP metadata.
- err = ValidateChunk(mux, IDX_META, META_FLAG, flags, 1, &num_meta);
- if (err != WEBP_MUX_OK) return err;
-
- // Animation: ANIMATION_FLAG, loop chunk and frame chunk(s) are consistent.
- // At most one loop chunk.
- err = ValidateChunk(mux, IDX_LOOP, NO_FLAG, flags, 1, &num_loop_chunks);
- if (err != WEBP_MUX_OK) return err;
- err = ValidateChunk(mux, IDX_FRAME, NO_FLAG, flags, -1, &num_frames);
- if (err != WEBP_MUX_OK) return err;
-
- {
- const int has_animation = !!(flags & ANIMATION_FLAG);
- if (has_animation && (num_loop_chunks == 0 || num_frames == 0)) {
- return WEBP_MUX_INVALID_ARGUMENT;
- }
- if (!has_animation && (num_loop_chunks == 1 || num_frames > 0)) {
- return WEBP_MUX_INVALID_ARGUMENT;
- }
- }
-
- // Tiling: TILE_FLAG and tile chunk(s) are consistent.
- err = ValidateChunk(mux, IDX_TILE, TILE_FLAG, flags, -1, &num_tiles);
- if (err != WEBP_MUX_OK) return err;
-
- // Verify either VP8X chunk is present OR there is only one elem in
- // mux->images_.
- err = ValidateChunk(mux, IDX_VP8X, NO_FLAG, flags, 1, &num_vp8x);
- if (err != WEBP_MUX_OK) return err;
- err = ValidateChunk(mux, IDX_VP8, NO_FLAG, flags, -1, &num_images);
- if (err != WEBP_MUX_OK) return err;
- if (num_vp8x == 0 && num_images != 1) return WEBP_MUX_INVALID_ARGUMENT;
-
- // ALPHA_FLAG & alpha chunk(s) are consistent.
- if (num_vp8x > 0 && MuxHasLosslessImages(mux->images_)) {
- // Special case: we have a VP8X chunk as well as some lossless images.
- if (!(flags & ALPHA_FLAG)) return WEBP_MUX_INVALID_ARGUMENT;
- } else {
- err = ValidateChunk(mux, IDX_ALPHA, ALPHA_FLAG, flags, -1, &num_alpha);
- if (err != WEBP_MUX_OK) return err;
- }
-
- // num_tiles & num_images are consistent.
- if (num_tiles > 0 && num_images != num_tiles) {
- return WEBP_MUX_INVALID_ARGUMENT;
- }
-
- return WEBP_MUX_OK;
-}
-
-#undef NO_FLAG
-
-//------------------------------------------------------------------------------
-
-#if defined(__cplusplus) || defined(c_plusplus)
-} // extern "C"
-#endif
diff --git a/drivers/webpold/mux/muxread.c b/drivers/webpold/mux/muxread.c
deleted file mode 100644
index 21c3cfbaeb..0000000000
--- a/drivers/webpold/mux/muxread.c
+++ /dev/null
@@ -1,411 +0,0 @@
-// Copyright 2011 Google Inc. All Rights Reserved.
-//
-// This code is licensed under the same terms as WebM:
-// Software License Agreement: http://www.webmproject.org/license/software/
-// Additional IP Rights Grant: http://www.webmproject.org/license/additional/
-// -----------------------------------------------------------------------------
-//
-// Read APIs for mux.
-//
-// Authors: Urvang (urvang@google.com)
-// Vikas (vikasa@google.com)
-
-#include <assert.h>
-#include "./muxi.h"
-
-#if defined(__cplusplus) || defined(c_plusplus)
-extern "C" {
-#endif
-
-//------------------------------------------------------------------------------
-// Helper method(s).
-
-// Handy MACRO.
-#define SWITCH_ID_LIST(INDEX, LIST) \
- if (idx == (INDEX)) { \
- const WebPChunk* const chunk = ChunkSearchList((LIST), nth, \
- kChunks[(INDEX)].tag); \
- if (chunk) { \
- *data = chunk->data_; \
- return WEBP_MUX_OK; \
- } else { \
- return WEBP_MUX_NOT_FOUND; \
- } \
- }
-
-static WebPMuxError MuxGet(const WebPMux* const mux, CHUNK_INDEX idx,
- uint32_t nth, WebPData* const data) {
- assert(mux != NULL);
- assert(!IsWPI(kChunks[idx].id));
- WebPDataInit(data);
-
- SWITCH_ID_LIST(IDX_VP8X, mux->vp8x_);
- SWITCH_ID_LIST(IDX_ICCP, mux->iccp_);
- SWITCH_ID_LIST(IDX_LOOP, mux->loop_);
- SWITCH_ID_LIST(IDX_META, mux->meta_);
- SWITCH_ID_LIST(IDX_UNKNOWN, mux->unknown_);
- return WEBP_MUX_NOT_FOUND;
-}
-#undef SWITCH_ID_LIST
-
-// Fill the chunk with the given data (includes chunk header bytes), after some
-// verifications.
-static WebPMuxError ChunkVerifyAndAssignData(WebPChunk* chunk,
- const uint8_t* data,
- size_t data_size, size_t riff_size,
- int copy_data) {
- uint32_t chunk_size;
- WebPData chunk_data;
-
- // Sanity checks.
- if (data_size < TAG_SIZE) return WEBP_MUX_NOT_ENOUGH_DATA;
- chunk_size = GetLE32(data + TAG_SIZE);
-
- {
- const size_t chunk_disk_size = SizeWithPadding(chunk_size);
- if (chunk_disk_size > riff_size) return WEBP_MUX_BAD_DATA;
- if (chunk_disk_size > data_size) return WEBP_MUX_NOT_ENOUGH_DATA;
- }
-
- // Data assignment.
- chunk_data.bytes_ = data + CHUNK_HEADER_SIZE;
- chunk_data.size_ = chunk_size;
- return ChunkAssignData(chunk, &chunk_data, copy_data, GetLE32(data + 0));
-}
-
-//------------------------------------------------------------------------------
-// Create a mux object from WebP-RIFF data.
-
-WebPMux* WebPMuxCreateInternal(const WebPData* bitstream, int copy_data,
- int version) {
- size_t riff_size;
- uint32_t tag;
- const uint8_t* end;
- WebPMux* mux = NULL;
- WebPMuxImage* wpi = NULL;
- const uint8_t* data;
- size_t size;
- WebPChunk chunk;
- ChunkInit(&chunk);
-
- // Sanity checks.
- if (WEBP_ABI_IS_INCOMPATIBLE(version, WEBP_MUX_ABI_VERSION)) {
- return NULL; // version mismatch
- }
- if (bitstream == NULL) return NULL;
-
- data = bitstream->bytes_;
- size = bitstream->size_;
-
- if (data == NULL) return NULL;
- if (size < RIFF_HEADER_SIZE) return NULL;
- if (GetLE32(data + 0) != MKFOURCC('R', 'I', 'F', 'F') ||
- GetLE32(data + CHUNK_HEADER_SIZE) != MKFOURCC('W', 'E', 'B', 'P')) {
- return NULL;
- }
-
- mux = WebPMuxNew();
- if (mux == NULL) return NULL;
-
- if (size < RIFF_HEADER_SIZE + TAG_SIZE) goto Err;
-
- tag = GetLE32(data + RIFF_HEADER_SIZE);
- if (tag != kChunks[IDX_VP8].tag &&
- tag != kChunks[IDX_VP8L].tag &&
- tag != kChunks[IDX_VP8X].tag) {
- goto Err; // First chunk should be VP8, VP8L or VP8X.
- }
-
- riff_size = SizeWithPadding(GetLE32(data + TAG_SIZE));
- if (riff_size > MAX_CHUNK_PAYLOAD || riff_size > size) {
- goto Err;
- } else {
- if (riff_size < size) { // Redundant data after last chunk.
- size = riff_size; // To make sure we don't read any data beyond mux_size.
- }
- }
-
- end = data + size;
- data += RIFF_HEADER_SIZE;
- size -= RIFF_HEADER_SIZE;
-
- wpi = (WebPMuxImage*)malloc(sizeof(*wpi));
- if (wpi == NULL) goto Err;
- MuxImageInit(wpi);
-
- // Loop over chunks.
- while (data != end) {
- WebPChunkId id;
- WebPMuxError err;
-
- err = ChunkVerifyAndAssignData(&chunk, data, size, riff_size, copy_data);
- if (err != WEBP_MUX_OK) goto Err;
-
- id = ChunkGetIdFromTag(chunk.tag_);
-
- if (IsWPI(id)) { // An image chunk (frame/tile/alpha/vp8).
- WebPChunk** wpi_chunk_ptr =
- MuxImageGetListFromId(wpi, id); // Image chunk to set.
- assert(wpi_chunk_ptr != NULL);
- if (*wpi_chunk_ptr != NULL) goto Err; // Consecutive alpha chunks or
- // consecutive frame/tile chunks.
- if (ChunkSetNth(&chunk, wpi_chunk_ptr, 1) != WEBP_MUX_OK) goto Err;
- if (id == WEBP_CHUNK_IMAGE) {
- wpi->is_partial_ = 0; // wpi is completely filled.
- // Add this to mux->images_ list.
- if (MuxImagePush(wpi, &mux->images_) != WEBP_MUX_OK) goto Err;
- MuxImageInit(wpi); // Reset for reading next image.
- } else {
- wpi->is_partial_ = 1; // wpi is only partially filled.
- }
- } else { // A non-image chunk.
- WebPChunk** chunk_list;
- if (wpi->is_partial_) goto Err; // Encountered a non-image chunk before
- // getting all chunks of an image.
- chunk_list = MuxGetChunkListFromId(mux, id); // List to add this chunk.
- if (chunk_list == NULL) chunk_list = &mux->unknown_;
- if (ChunkSetNth(&chunk, chunk_list, 0) != WEBP_MUX_OK) goto Err;
- }
- {
- const size_t data_size = ChunkDiskSize(&chunk);
- data += data_size;
- size -= data_size;
- }
- ChunkInit(&chunk);
- }
-
- // Validate mux if complete.
- if (MuxValidate(mux) != WEBP_MUX_OK) goto Err;
-
- MuxImageDelete(wpi);
- return mux; // All OK;
-
- Err: // Something bad happened.
- ChunkRelease(&chunk);
- MuxImageDelete(wpi);
- WebPMuxDelete(mux);
- return NULL;
-}
-
-//------------------------------------------------------------------------------
-// Get API(s).
-
-WebPMuxError WebPMuxGetFeatures(const WebPMux* mux, uint32_t* flags) {
- WebPData data;
- WebPMuxError err;
-
- if (mux == NULL || flags == NULL) return WEBP_MUX_INVALID_ARGUMENT;
- *flags = 0;
-
- // Check if VP8X chunk is present.
- err = MuxGet(mux, IDX_VP8X, 1, &data);
- if (err == WEBP_MUX_NOT_FOUND) {
- // Check if VP8/VP8L chunk is present.
- err = WebPMuxGetImage(mux, &data);
- WebPDataClear(&data);
- return err;
- } else if (err != WEBP_MUX_OK) {
- return err;
- }
-
- if (data.size_ < CHUNK_SIZE_BYTES) return WEBP_MUX_BAD_DATA;
-
- // All OK. Fill up flags.
- *flags = GetLE32(data.bytes_);
- return WEBP_MUX_OK;
-}
-
-static uint8_t* EmitVP8XChunk(uint8_t* const dst, int width,
- int height, uint32_t flags) {
- const size_t vp8x_size = CHUNK_HEADER_SIZE + VP8X_CHUNK_SIZE;
- assert(width >= 1 && height >= 1);
- assert(width <= MAX_CANVAS_SIZE && height <= MAX_CANVAS_SIZE);
- assert(width * (uint64_t)height < MAX_IMAGE_AREA);
- PutLE32(dst, MKFOURCC('V', 'P', '8', 'X'));
- PutLE32(dst + TAG_SIZE, VP8X_CHUNK_SIZE);
- PutLE32(dst + CHUNK_HEADER_SIZE, flags);
- PutLE24(dst + CHUNK_HEADER_SIZE + 4, width - 1);
- PutLE24(dst + CHUNK_HEADER_SIZE + 7, height - 1);
- return dst + vp8x_size;
-}
-
-// Assemble a single image WebP bitstream from 'wpi'.
-static WebPMuxError SynthesizeBitstream(WebPMuxImage* const wpi,
- WebPData* const bitstream) {
- uint8_t* dst;
-
- // Allocate data.
- const int need_vp8x = (wpi->alpha_ != NULL);
- const size_t vp8x_size = need_vp8x ? CHUNK_HEADER_SIZE + VP8X_CHUNK_SIZE : 0;
- const size_t alpha_size = need_vp8x ? ChunkDiskSize(wpi->alpha_) : 0;
- // Note: No need to output FRM/TILE chunk for a single image.
- const size_t size = RIFF_HEADER_SIZE + vp8x_size + alpha_size +
- ChunkDiskSize(wpi->img_);
- uint8_t* const data = (uint8_t*)malloc(size);
- if (data == NULL) return WEBP_MUX_MEMORY_ERROR;
-
- // Main RIFF header.
- dst = MuxEmitRiffHeader(data, size);
-
- if (need_vp8x) {
- int w, h;
- WebPMuxError err;
- assert(wpi->img_ != NULL);
- err = MuxGetImageWidthHeight(wpi->img_, &w, &h);
- if (err != WEBP_MUX_OK) {
- free(data);
- return err;
- }
- dst = EmitVP8XChunk(dst, w, h, ALPHA_FLAG); // VP8X.
- dst = ChunkListEmit(wpi->alpha_, dst); // ALPH.
- }
-
- // Bitstream.
- dst = ChunkListEmit(wpi->img_, dst);
- assert(dst == data + size);
-
- // Output.
- bitstream->bytes_ = data;
- bitstream->size_ = size;
- return WEBP_MUX_OK;
-}
-
-WebPMuxError WebPMuxGetImage(const WebPMux* mux, WebPData* bitstream) {
- WebPMuxError err;
- WebPMuxImage* wpi = NULL;
-
- if (mux == NULL || bitstream == NULL) {
- return WEBP_MUX_INVALID_ARGUMENT;
- }
-
- err = MuxValidateForImage(mux);
- if (err != WEBP_MUX_OK) return err;
-
- // All well. Get the image.
- err = MuxImageGetNth((const WebPMuxImage**)&mux->images_, 1, WEBP_CHUNK_IMAGE,
- &wpi);
- assert(err == WEBP_MUX_OK); // Already tested above.
-
- return SynthesizeBitstream(wpi, bitstream);
-}
-
-WebPMuxError WebPMuxGetMetadata(const WebPMux* mux, WebPData* metadata) {
- if (mux == NULL || metadata == NULL) return WEBP_MUX_INVALID_ARGUMENT;
- return MuxGet(mux, IDX_META, 1, metadata);
-}
-
-WebPMuxError WebPMuxGetColorProfile(const WebPMux* mux,
- WebPData* color_profile) {
- if (mux == NULL || color_profile == NULL) return WEBP_MUX_INVALID_ARGUMENT;
- return MuxGet(mux, IDX_ICCP, 1, color_profile);
-}
-
-WebPMuxError WebPMuxGetLoopCount(const WebPMux* mux, int* loop_count) {
- WebPData image;
- WebPMuxError err;
-
- if (mux == NULL || loop_count == NULL) return WEBP_MUX_INVALID_ARGUMENT;
-
- err = MuxGet(mux, IDX_LOOP, 1, &image);
- if (err != WEBP_MUX_OK) return err;
- if (image.size_ < kChunks[WEBP_CHUNK_LOOP].size) return WEBP_MUX_BAD_DATA;
- *loop_count = GetLE16(image.bytes_);
-
- return WEBP_MUX_OK;
-}
-
-static WebPMuxError MuxGetFrameTileInternal(
- const WebPMux* const mux, uint32_t nth, WebPData* const bitstream,
- int* const x_offset, int* const y_offset, int* const duration,
- uint32_t tag) {
- const WebPData* frame_tile_data;
- WebPMuxError err;
- WebPMuxImage* wpi;
-
- const int is_frame = (tag == kChunks[WEBP_CHUNK_FRAME].tag) ? 1 : 0;
- const CHUNK_INDEX idx = is_frame ? IDX_FRAME : IDX_TILE;
- const WebPChunkId id = kChunks[idx].id;
-
- if (mux == NULL || bitstream == NULL ||
- x_offset == NULL || y_offset == NULL || (is_frame && duration == NULL)) {
- return WEBP_MUX_INVALID_ARGUMENT;
- }
-
- // Get the nth WebPMuxImage.
- err = MuxImageGetNth((const WebPMuxImage**)&mux->images_, nth, id, &wpi);
- if (err != WEBP_MUX_OK) return err;
-
- // Get frame chunk.
- assert(wpi->header_ != NULL); // As MuxImageGetNth() already checked header_.
- frame_tile_data = &wpi->header_->data_;
-
- if (frame_tile_data->size_ < kChunks[idx].size) return WEBP_MUX_BAD_DATA;
- *x_offset = 2 * GetLE24(frame_tile_data->bytes_ + 0);
- *y_offset = 2 * GetLE24(frame_tile_data->bytes_ + 3);
- if (is_frame) *duration = 1 + GetLE24(frame_tile_data->bytes_ + 12);
-
- return SynthesizeBitstream(wpi, bitstream);
-}
-
-WebPMuxError WebPMuxGetFrame(const WebPMux* mux, uint32_t nth,
- WebPData* bitstream,
- int* x_offset, int* y_offset, int* duration) {
- return MuxGetFrameTileInternal(mux, nth, bitstream, x_offset, y_offset,
- duration, kChunks[IDX_FRAME].tag);
-}
-
-WebPMuxError WebPMuxGetTile(const WebPMux* mux, uint32_t nth,
- WebPData* bitstream,
- int* x_offset, int* y_offset) {
- return MuxGetFrameTileInternal(mux, nth, bitstream, x_offset, y_offset, NULL,
- kChunks[IDX_TILE].tag);
-}
-
-// Get chunk index from chunk id. Returns IDX_NIL if not found.
-static CHUNK_INDEX ChunkGetIndexFromId(WebPChunkId id) {
- int i;
- for (i = 0; kChunks[i].id != WEBP_CHUNK_NIL; ++i) {
- if (id == kChunks[i].id) return i;
- }
- return IDX_NIL;
-}
-
-// Count number of chunks matching 'tag' in the 'chunk_list'.
-// If tag == NIL_TAG, any tag will be matched.
-static int CountChunks(const WebPChunk* const chunk_list, uint32_t tag) {
- int count = 0;
- const WebPChunk* current;
- for (current = chunk_list; current != NULL; current = current->next_) {
- if (tag == NIL_TAG || current->tag_ == tag) {
- count++; // Count chunks whose tags match.
- }
- }
- return count;
-}
-
-WebPMuxError WebPMuxNumChunks(const WebPMux* mux,
- WebPChunkId id, int* num_elements) {
- if (mux == NULL || num_elements == NULL) {
- return WEBP_MUX_INVALID_ARGUMENT;
- }
-
- if (IsWPI(id)) {
- *num_elements = MuxImageCount(mux->images_, id);
- } else {
- WebPChunk* const* chunk_list = MuxGetChunkListFromId(mux, id);
- if (chunk_list == NULL) {
- *num_elements = 0;
- } else {
- const CHUNK_INDEX idx = ChunkGetIndexFromId(id);
- *num_elements = CountChunks(*chunk_list, kChunks[idx].tag);
- }
- }
-
- return WEBP_MUX_OK;
-}
-
-//------------------------------------------------------------------------------
-
-#if defined(__cplusplus) || defined(c_plusplus)
-} // extern "C"
-#endif
diff --git a/drivers/webpold/types.h b/drivers/webpold/types.h
deleted file mode 100644
index 3e27190bef..0000000000
--- a/drivers/webpold/types.h
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2010 Google Inc. All Rights Reserved.
-//
-// This code is licensed under the same terms as WebM:
-// Software License Agreement: http://www.webmproject.org/license/software/
-// Additional IP Rights Grant: http://www.webmproject.org/license/additional/
-// -----------------------------------------------------------------------------
-//
-// Common types
-//
-// Author: Skal (pascal.massimino@gmail.com)
-
-#ifndef WEBP_WEBP_TYPES_H_
-#define WEBP_WEBP_TYPES_H_
-
-#include <stddef.h> // for size_t
-
-#ifndef _MSC_VER
-#include <inttypes.h>
-#ifdef __STRICT_ANSI__
-#define WEBP_INLINE
-#else /* __STRICT_ANSI__ */
-#define WEBP_INLINE inline
-#endif
-#else
-typedef signed char int8_t;
-typedef unsigned char uint8_t;
-typedef signed short int16_t;
-typedef unsigned short uint16_t;
-typedef signed int int32_t;
-typedef unsigned int uint32_t;
-typedef unsigned long long int uint64_t;
-typedef long long int int64_t;
-#define WEBP_INLINE __forceinline
-#endif /* _MSC_VER */
-
-#ifndef WEBP_EXTERN
-// This explicitly marks library functions and allows for changing the
-// signature for e.g., Windows DLL builds.
-#define WEBP_EXTERN(type) extern type
-#endif /* WEBP_EXTERN */
-
-// Macro to check ABI compatibility (same major revision number)
-#define WEBP_ABI_IS_INCOMPATIBLE(a, b) (((a) >> 8) != ((b) >> 8))
-
-#endif /* WEBP_WEBP_TYPES_H_ */
diff --git a/drivers/webpold/utils/bit_reader.c b/drivers/webpold/utils/bit_reader.c
deleted file mode 100644
index 1afb1db890..0000000000
--- a/drivers/webpold/utils/bit_reader.c
+++ /dev/null
@@ -1,229 +0,0 @@
-// Copyright 2010 Google Inc. All Rights Reserved.
-//
-// This code is licensed under the same terms as WebM:
-// Software License Agreement: http://www.webmproject.org/license/software/
-// Additional IP Rights Grant: http://www.webmproject.org/license/additional/
-// -----------------------------------------------------------------------------
-//
-// Boolean decoder
-//
-// Author: Skal (pascal.massimino@gmail.com)
-
-#include "./bit_reader.h"
-
-#if defined(__cplusplus) || defined(c_plusplus)
-extern "C" {
-#endif
-
-#define MK(X) (((bit_t)(X) << (BITS)) | (MASK))
-
-//------------------------------------------------------------------------------
-// VP8BitReader
-
-void VP8InitBitReader(VP8BitReader* const br,
- const uint8_t* const start, const uint8_t* const end) {
- assert(br != NULL);
- assert(start != NULL);
- assert(start <= end);
- br->range_ = MK(255 - 1);
- br->buf_ = start;
- br->buf_end_ = end;
- br->value_ = 0;
- br->missing_ = 8; // to load the very first 8bits
- br->eof_ = 0;
-}
-
-const uint8_t kVP8Log2Range[128] = {
- 7, 6, 6, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 4, 4,
- 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 0
-};
-
-// range = (range << kVP8Log2Range[range]) + trailing 1's
-const bit_t kVP8NewRange[128] = {
- MK(127), MK(127), MK(191), MK(127), MK(159), MK(191), MK(223), MK(127),
- MK(143), MK(159), MK(175), MK(191), MK(207), MK(223), MK(239), MK(127),
- MK(135), MK(143), MK(151), MK(159), MK(167), MK(175), MK(183), MK(191),
- MK(199), MK(207), MK(215), MK(223), MK(231), MK(239), MK(247), MK(127),
- MK(131), MK(135), MK(139), MK(143), MK(147), MK(151), MK(155), MK(159),
- MK(163), MK(167), MK(171), MK(175), MK(179), MK(183), MK(187), MK(191),
- MK(195), MK(199), MK(203), MK(207), MK(211), MK(215), MK(219), MK(223),
- MK(227), MK(231), MK(235), MK(239), MK(243), MK(247), MK(251), MK(127),
- MK(129), MK(131), MK(133), MK(135), MK(137), MK(139), MK(141), MK(143),
- MK(145), MK(147), MK(149), MK(151), MK(153), MK(155), MK(157), MK(159),
- MK(161), MK(163), MK(165), MK(167), MK(169), MK(171), MK(173), MK(175),
- MK(177), MK(179), MK(181), MK(183), MK(185), MK(187), MK(189), MK(191),
- MK(193), MK(195), MK(197), MK(199), MK(201), MK(203), MK(205), MK(207),
- MK(209), MK(211), MK(213), MK(215), MK(217), MK(219), MK(221), MK(223),
- MK(225), MK(227), MK(229), MK(231), MK(233), MK(235), MK(237), MK(239),
- MK(241), MK(243), MK(245), MK(247), MK(249), MK(251), MK(253), MK(127)
-};
-
-#undef MK
-
-void VP8LoadFinalBytes(VP8BitReader* const br) {
- assert(br != NULL && br->buf_ != NULL);
- // Only read 8bits at a time
- if (br->buf_ < br->buf_end_) {
- br->value_ |= (bit_t)(*br->buf_++) << ((BITS) - 8 + br->missing_);
- br->missing_ -= 8;
- } else {
- br->eof_ = 1;
- }
-}
-
-//------------------------------------------------------------------------------
-// Higher-level calls
-
-uint32_t VP8GetValue(VP8BitReader* const br, int bits) {
- uint32_t v = 0;
- while (bits-- > 0) {
- v |= VP8GetBit(br, 0x80) << bits;
- }
- return v;
-}
-
-int32_t VP8GetSignedValue(VP8BitReader* const br, int bits) {
- const int value = VP8GetValue(br, bits);
- return VP8Get(br) ? -value : value;
-}
-
-//------------------------------------------------------------------------------
-// VP8LBitReader
-
-#define MAX_NUM_BIT_READ 25
-
-static const uint32_t kBitMask[MAX_NUM_BIT_READ] = {
- 0, 1, 3, 7, 15, 31, 63, 127, 255, 511, 1023, 2047, 4095, 8191, 16383, 32767,
- 65535, 131071, 262143, 524287, 1048575, 2097151, 4194303, 8388607, 16777215
-};
-
-void VP8LInitBitReader(VP8LBitReader* const br,
- const uint8_t* const start,
- size_t length) {
- size_t i;
- assert(br != NULL);
- assert(start != NULL);
- assert(length < 0xfffffff8u); // can't happen with a RIFF chunk.
-
- br->buf_ = start;
- br->len_ = length;
- br->val_ = 0;
- br->pos_ = 0;
- br->bit_pos_ = 0;
- br->eos_ = 0;
- br->error_ = 0;
- for (i = 0; i < sizeof(br->val_) && i < br->len_; ++i) {
- br->val_ |= ((uint64_t)br->buf_[br->pos_]) << (8 * i);
- ++br->pos_;
- }
-}
-
-void VP8LBitReaderSetBuffer(VP8LBitReader* const br,
- const uint8_t* const buf, size_t len) {
- assert(br != NULL);
- assert(buf != NULL);
- assert(len < 0xfffffff8u); // can't happen with a RIFF chunk.
- br->eos_ = (br->pos_ >= len);
- br->buf_ = buf;
- br->len_ = len;
-}
-
-static void ShiftBytes(VP8LBitReader* const br) {
- while (br->bit_pos_ >= 8 && br->pos_ < br->len_) {
- br->val_ >>= 8;
- br->val_ |= ((uint64_t)br->buf_[br->pos_]) << 56;
- ++br->pos_;
- br->bit_pos_ -= 8;
- }
-}
-
-void VP8LFillBitWindow(VP8LBitReader* const br) {
- if (br->bit_pos_ >= 32) {
-#if defined(__x86_64__) || defined(_M_X64)
- if (br->pos_ + 8 < br->len_) {
- br->val_ >>= 32;
- // The expression below needs a little-endian arch to work correctly.
- // This gives a large speedup for decoding speed.
- br->val_ |= *(const uint64_t *)(br->buf_ + br->pos_) << 32;
- br->pos_ += 4;
- br->bit_pos_ -= 32;
- } else {
- // Slow path.
- ShiftBytes(br);
- }
-#else
- // Always the slow path.
- ShiftBytes(br);
-#endif
- }
- if (br->pos_ == br->len_ && br->bit_pos_ == 64) {
- br->eos_ = 1;
- }
-}
-
-uint32_t VP8LReadOneBit(VP8LBitReader* const br) {
- const uint32_t val = (br->val_ >> br->bit_pos_) & 1;
- // Flag an error at end_of_stream.
- if (!br->eos_) {
- ++br->bit_pos_;
- if (br->bit_pos_ >= 32) {
- ShiftBytes(br);
- }
- // After this last bit is read, check if eos needs to be flagged.
- if (br->pos_ == br->len_ && br->bit_pos_ == 64) {
- br->eos_ = 1;
- }
- } else {
- br->error_ = 1;
- }
- return val;
-}
-
-uint32_t VP8LReadBits(VP8LBitReader* const br, int n_bits) {
- uint32_t val = 0;
- assert(n_bits >= 0);
- // Flag an error if end_of_stream or n_bits is more than allowed limit.
- if (!br->eos_ && n_bits < MAX_NUM_BIT_READ) {
- // If this read is going to cross the read buffer, set the eos flag.
- if (br->pos_ == br->len_) {
- if ((br->bit_pos_ + n_bits) >= 64) {
- br->eos_ = 1;
- if ((br->bit_pos_ + n_bits) > 64) return val;
- }
- }
- val = (br->val_ >> br->bit_pos_) & kBitMask[n_bits];
- br->bit_pos_ += n_bits;
- if (br->bit_pos_ >= 40) {
- if (br->pos_ + 5 < br->len_) {
- br->val_ >>= 40;
- br->val_ |=
- (((uint64_t)br->buf_[br->pos_ + 0]) << 24) |
- (((uint64_t)br->buf_[br->pos_ + 1]) << 32) |
- (((uint64_t)br->buf_[br->pos_ + 2]) << 40) |
- (((uint64_t)br->buf_[br->pos_ + 3]) << 48) |
- (((uint64_t)br->buf_[br->pos_ + 4]) << 56);
- br->pos_ += 5;
- br->bit_pos_ -= 40;
- }
- if (br->bit_pos_ >= 8) {
- ShiftBytes(br);
- }
- }
- } else {
- br->error_ = 1;
- }
- return val;
-}
-
-//------------------------------------------------------------------------------
-
-#if defined(__cplusplus) || defined(c_plusplus)
-} // extern "C"
-#endif
diff --git a/drivers/webpold/utils/bit_reader.h b/drivers/webpold/utils/bit_reader.h
deleted file mode 100644
index 43cd948fd4..0000000000
--- a/drivers/webpold/utils/bit_reader.h
+++ /dev/null
@@ -1,198 +0,0 @@
-//
-// Copyright 2010 Google Inc. All Rights Reserved.
-//
-// This code is licensed under the same terms as WebM:
-// Software License Agreement: http://www.webmproject.org/license/software/
-// Additional IP Rights Grant: http://www.webmproject.org/license/additional/
-// -----------------------------------------------------------------------------
-//
-// Boolean decoder
-//
-// Author: Skal (pascal.massimino@gmail.com)
-// Vikas Arora (vikaas.arora@gmail.com)
-
-#ifndef WEBP_UTILS_BIT_READER_H_
-#define WEBP_UTILS_BIT_READER_H_
-
-#include <assert.h>
-#ifdef _MSC_VER
-#include <stdlib.h> // _byteswap_ulong
-#endif
-#include <string.h> // For memcpy
-#include "../types.h"
-
-#if defined(__cplusplus) || defined(c_plusplus)
-extern "C" {
-#endif
-
-#define BITS 32 // can be 32, 16 or 8
-#define MASK ((((bit_t)1) << (BITS)) - 1)
-#if (BITS == 32)
-typedef uint64_t bit_t; // natural register type
-typedef uint32_t lbit_t; // natural type for memory I/O
-#elif (BITS == 16)
-typedef uint32_t bit_t;
-typedef uint16_t lbit_t;
-#else
-typedef uint32_t bit_t;
-typedef uint8_t lbit_t;
-#endif
-
-//------------------------------------------------------------------------------
-// Bitreader and code-tree reader
-
-typedef struct VP8BitReader VP8BitReader;
-struct VP8BitReader {
- const uint8_t* buf_; // next byte to be read
- const uint8_t* buf_end_; // end of read buffer
- int eof_; // true if input is exhausted
-
- // boolean decoder
- bit_t range_; // current range minus 1. In [127, 254] interval.
- bit_t value_; // current value
- int missing_; // number of missing bits in value_ (8bit)
-};
-
-// Initialize the bit reader and the boolean decoder.
-void VP8InitBitReader(VP8BitReader* const br,
- const uint8_t* const start, const uint8_t* const end);
-
-// return the next value made of 'num_bits' bits
-uint32_t VP8GetValue(VP8BitReader* const br, int num_bits);
-static WEBP_INLINE uint32_t VP8Get(VP8BitReader* const br) {
- return VP8GetValue(br, 1);
-}
-
-// return the next value with sign-extension.
-int32_t VP8GetSignedValue(VP8BitReader* const br, int num_bits);
-
-// Read a bit with proba 'prob'. Speed-critical function!
-extern const uint8_t kVP8Log2Range[128];
-extern const bit_t kVP8NewRange[128];
-
-void VP8LoadFinalBytes(VP8BitReader* const br); // special case for the tail
-
-static WEBP_INLINE void VP8LoadNewBytes(VP8BitReader* const br) {
- assert(br && br->buf_);
- // Read 'BITS' bits at a time if possible.
- if (br->buf_ + sizeof(lbit_t) <= br->buf_end_) {
- // convert memory type to register type (with some zero'ing!)
- bit_t bits;
- lbit_t in_bits = *(lbit_t*)br->buf_;
- br->buf_ += (BITS) >> 3;
-#if !defined(__BIG_ENDIAN__)
-#if (BITS == 32)
-#if defined(__i386__) || defined(__x86_64__)
- __asm__ volatile("bswap %k0" : "=r"(in_bits) : "0"(in_bits));
- bits = (bit_t)in_bits; // 32b -> 64b zero-extension
-#elif defined(_MSC_VER)
- bits = _byteswap_ulong(in_bits);
-#else
- bits = (bit_t)(in_bits >> 24) | ((in_bits >> 8) & 0xff00)
- | ((in_bits << 8) & 0xff0000) | (in_bits << 24);
-#endif // x86
-#elif (BITS == 16)
- // gcc will recognize a 'rorw $8, ...' here:
- bits = (bit_t)(in_bits >> 8) | ((in_bits & 0xff) << 8);
-#endif
-#else // LITTLE_ENDIAN
- bits = (bit_t)in_bits;
-#endif
- br->value_ |= bits << br->missing_;
- br->missing_ -= (BITS);
- } else {
- VP8LoadFinalBytes(br); // no need to be inlined
- }
-}
-
-static WEBP_INLINE int VP8BitUpdate(VP8BitReader* const br, bit_t split) {
- const bit_t value_split = split | (MASK);
- if (br->missing_ > 0) { // Make sure we have a least BITS bits in 'value_'
- VP8LoadNewBytes(br);
- }
- if (br->value_ > value_split) {
- br->range_ -= value_split + 1;
- br->value_ -= value_split + 1;
- return 1;
- } else {
- br->range_ = value_split;
- return 0;
- }
-}
-
-static WEBP_INLINE void VP8Shift(VP8BitReader* const br) {
- // range_ is in [0..127] interval here.
- const int idx = br->range_ >> (BITS);
- const int shift = kVP8Log2Range[idx];
- br->range_ = kVP8NewRange[idx];
- br->value_ <<= shift;
- br->missing_ += shift;
-}
-
-static WEBP_INLINE int VP8GetBit(VP8BitReader* const br, int prob) {
- // It's important to avoid generating a 64bit x 64bit multiply here.
- // We just need an 8b x 8b after all.
- const bit_t split =
- (bit_t)((uint32_t)(br->range_ >> (BITS)) * prob) << ((BITS) - 8);
- const int bit = VP8BitUpdate(br, split);
- if (br->range_ <= (((bit_t)0x7e << (BITS)) | (MASK))) {
- VP8Shift(br);
- }
- return bit;
-}
-
-static WEBP_INLINE int VP8GetSigned(VP8BitReader* const br, int v) {
- const bit_t split = (br->range_ >> 1);
- const int bit = VP8BitUpdate(br, split);
- VP8Shift(br);
- return bit ? -v : v;
-}
-
-
-// -----------------------------------------------------------------------------
-// Bitreader
-
-typedef struct {
- uint64_t val_;
- const uint8_t* buf_;
- size_t len_;
- size_t pos_;
- int bit_pos_;
- int eos_;
- int error_;
-} VP8LBitReader;
-
-void VP8LInitBitReader(VP8LBitReader* const br,
- const uint8_t* const start,
- size_t length);
-
-// Sets a new data buffer.
-void VP8LBitReaderSetBuffer(VP8LBitReader* const br,
- const uint8_t* const buffer, size_t length);
-
-// Reads the specified number of bits from Read Buffer.
-// Flags an error in case end_of_stream or n_bits is more than allowed limit.
-// Flags eos if this read attempt is going to cross the read buffer.
-uint32_t VP8LReadBits(VP8LBitReader* const br, int n_bits);
-
-// Reads one bit from Read Buffer. Flags an error in case end_of_stream.
-// Flags eos after reading last bit from the buffer.
-uint32_t VP8LReadOneBit(VP8LBitReader* const br);
-
-// VP8LReadOneBitUnsafe is faster than VP8LReadOneBit, but it can be called only
-// 32 times after the last VP8LFillBitWindow. Any subsequent calls
-// (without VP8LFillBitWindow) will return invalid data.
-static WEBP_INLINE uint32_t VP8LReadOneBitUnsafe(VP8LBitReader* const br) {
- const uint32_t val = (br->val_ >> br->bit_pos_) & 1;
- ++br->bit_pos_;
- return val;
-}
-
-// Advances the Read buffer by 4 bytes to make room for reading next 32 bits.
-void VP8LFillBitWindow(VP8LBitReader* const br);
-
-#if defined(__cplusplus) || defined(c_plusplus)
-} // extern "C"
-#endif
-
-#endif /* WEBP_UTILS_BIT_READER_H_ */
diff --git a/drivers/webpold/utils/bit_writer.c b/drivers/webpold/utils/bit_writer.c
deleted file mode 100644
index 671159cacd..0000000000
--- a/drivers/webpold/utils/bit_writer.c
+++ /dev/null
@@ -1,284 +0,0 @@
-// Copyright 2011 Google Inc. All Rights Reserved.
-//
-// This code is licensed under the same terms as WebM:
-// Software License Agreement: http://www.webmproject.org/license/software/
-// Additional IP Rights Grant: http://www.webmproject.org/license/additional/
-// -----------------------------------------------------------------------------
-//
-// Bit writing and boolean coder
-//
-// Author: Skal (pascal.massimino@gmail.com)
-// Vikas Arora (vikaas.arora@gmail.com)
-
-#include <assert.h>
-#include <string.h> // for memcpy()
-#include <stdlib.h>
-#include "./bit_writer.h"
-
-#if defined(__cplusplus) || defined(c_plusplus)
-extern "C" {
-#endif
-
-//------------------------------------------------------------------------------
-// VP8BitWriter
-
-static int BitWriterResize(VP8BitWriter* const bw, size_t extra_size) {
- uint8_t* new_buf;
- size_t new_size;
- const uint64_t needed_size_64b = (uint64_t)bw->pos_ + extra_size;
- const size_t needed_size = (size_t)needed_size_64b;
- if (needed_size_64b != needed_size) {
- bw->error_ = 1;
- return 0;
- }
- if (needed_size <= bw->max_pos_) return 1;
- // If the following line wraps over 32bit, the test just after will catch it.
- new_size = 2 * bw->max_pos_;
- if (new_size < needed_size) new_size = needed_size;
- if (new_size < 1024) new_size = 1024;
- new_buf = (uint8_t*)malloc(new_size);
- if (new_buf == NULL) {
- bw->error_ = 1;
- return 0;
- }
- memcpy(new_buf, bw->buf_, bw->pos_);
- free(bw->buf_);
- bw->buf_ = new_buf;
- bw->max_pos_ = new_size;
- return 1;
-}
-
-static void kFlush(VP8BitWriter* const bw) {
- const int s = 8 + bw->nb_bits_;
- const int32_t bits = bw->value_ >> s;
- assert(bw->nb_bits_ >= 0);
- bw->value_ -= bits << s;
- bw->nb_bits_ -= 8;
- if ((bits & 0xff) != 0xff) {
- size_t pos = bw->pos_;
- if (!BitWriterResize(bw, bw->run_ + 1)) {
- return;
- }
- if (bits & 0x100) { // overflow -> propagate carry over pending 0xff's
- if (pos > 0) bw->buf_[pos - 1]++;
- }
- if (bw->run_ > 0) {
- const int value = (bits & 0x100) ? 0x00 : 0xff;
- for (; bw->run_ > 0; --bw->run_) bw->buf_[pos++] = value;
- }
- bw->buf_[pos++] = bits;
- bw->pos_ = pos;
- } else {
- bw->run_++; // delay writing of bytes 0xff, pending eventual carry.
- }
-}
-
-//------------------------------------------------------------------------------
-// renormalization
-
-static const uint8_t kNorm[128] = { // renorm_sizes[i] = 8 - log2(i)
- 7, 6, 6, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 4, 4,
- 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 0
-};
-
-// range = ((range + 1) << kVP8Log2Range[range]) - 1
-static const uint8_t kNewRange[128] = {
- 127, 127, 191, 127, 159, 191, 223, 127, 143, 159, 175, 191, 207, 223, 239,
- 127, 135, 143, 151, 159, 167, 175, 183, 191, 199, 207, 215, 223, 231, 239,
- 247, 127, 131, 135, 139, 143, 147, 151, 155, 159, 163, 167, 171, 175, 179,
- 183, 187, 191, 195, 199, 203, 207, 211, 215, 219, 223, 227, 231, 235, 239,
- 243, 247, 251, 127, 129, 131, 133, 135, 137, 139, 141, 143, 145, 147, 149,
- 151, 153, 155, 157, 159, 161, 163, 165, 167, 169, 171, 173, 175, 177, 179,
- 181, 183, 185, 187, 189, 191, 193, 195, 197, 199, 201, 203, 205, 207, 209,
- 211, 213, 215, 217, 219, 221, 223, 225, 227, 229, 231, 233, 235, 237, 239,
- 241, 243, 245, 247, 249, 251, 253, 127
-};
-
-int VP8PutBit(VP8BitWriter* const bw, int bit, int prob) {
- const int split = (bw->range_ * prob) >> 8;
- if (bit) {
- bw->value_ += split + 1;
- bw->range_ -= split + 1;
- } else {
- bw->range_ = split;
- }
- if (bw->range_ < 127) { // emit 'shift' bits out and renormalize
- const int shift = kNorm[bw->range_];
- bw->range_ = kNewRange[bw->range_];
- bw->value_ <<= shift;
- bw->nb_bits_ += shift;
- if (bw->nb_bits_ > 0) kFlush(bw);
- }
- return bit;
-}
-
-int VP8PutBitUniform(VP8BitWriter* const bw, int bit) {
- const int split = bw->range_ >> 1;
- if (bit) {
- bw->value_ += split + 1;
- bw->range_ -= split + 1;
- } else {
- bw->range_ = split;
- }
- if (bw->range_ < 127) {
- bw->range_ = kNewRange[bw->range_];
- bw->value_ <<= 1;
- bw->nb_bits_ += 1;
- if (bw->nb_bits_ > 0) kFlush(bw);
- }
- return bit;
-}
-
-void VP8PutValue(VP8BitWriter* const bw, int value, int nb_bits) {
- int mask;
- for (mask = 1 << (nb_bits - 1); mask; mask >>= 1)
- VP8PutBitUniform(bw, value & mask);
-}
-
-void VP8PutSignedValue(VP8BitWriter* const bw, int value, int nb_bits) {
- if (!VP8PutBitUniform(bw, value != 0))
- return;
- if (value < 0) {
- VP8PutValue(bw, ((-value) << 1) | 1, nb_bits + 1);
- } else {
- VP8PutValue(bw, value << 1, nb_bits + 1);
- }
-}
-
-//------------------------------------------------------------------------------
-
-int VP8BitWriterInit(VP8BitWriter* const bw, size_t expected_size) {
- bw->range_ = 255 - 1;
- bw->value_ = 0;
- bw->run_ = 0;
- bw->nb_bits_ = -8;
- bw->pos_ = 0;
- bw->max_pos_ = 0;
- bw->error_ = 0;
- bw->buf_ = NULL;
- return (expected_size > 0) ? BitWriterResize(bw, expected_size) : 1;
-}
-
-uint8_t* VP8BitWriterFinish(VP8BitWriter* const bw) {
- VP8PutValue(bw, 0, 9 - bw->nb_bits_);
- bw->nb_bits_ = 0; // pad with zeroes
- kFlush(bw);
- return bw->buf_;
-}
-
-int VP8BitWriterAppend(VP8BitWriter* const bw,
- const uint8_t* data, size_t size) {
- assert(data);
- if (bw->nb_bits_ != -8) return 0; // kFlush() must have been called
- if (!BitWriterResize(bw, size)) return 0;
- memcpy(bw->buf_ + bw->pos_, data, size);
- bw->pos_ += size;
- return 1;
-}
-
-void VP8BitWriterWipeOut(VP8BitWriter* const bw) {
- if (bw) {
- free(bw->buf_);
- memset(bw, 0, sizeof(*bw));
- }
-}
-
-//------------------------------------------------------------------------------
-// VP8LBitWriter
-
-// Returns 1 on success.
-static int VP8LBitWriterResize(VP8LBitWriter* const bw, size_t extra_size) {
- uint8_t* allocated_buf;
- size_t allocated_size;
- const size_t current_size = VP8LBitWriterNumBytes(bw);
- const uint64_t size_required_64b = (uint64_t)current_size + extra_size;
- const size_t size_required = (size_t)size_required_64b;
- if (size_required != size_required_64b) {
- bw->error_ = 1;
- return 0;
- }
- if (bw->max_bytes_ > 0 && size_required <= bw->max_bytes_) return 1;
- allocated_size = (3 * bw->max_bytes_) >> 1;
- if (allocated_size < size_required) allocated_size = size_required;
- // make allocated size multiple of 1k
- allocated_size = (((allocated_size >> 10) + 1) << 10);
- allocated_buf = (uint8_t*)malloc(allocated_size);
- if (allocated_buf == NULL) {
- bw->error_ = 1;
- return 0;
- }
- memcpy(allocated_buf, bw->buf_, current_size);
- free(bw->buf_);
- bw->buf_ = allocated_buf;
- bw->max_bytes_ = allocated_size;
- memset(allocated_buf + current_size, 0, allocated_size - current_size);
- return 1;
-}
-
-int VP8LBitWriterInit(VP8LBitWriter* const bw, size_t expected_size) {
- memset(bw, 0, sizeof(*bw));
- return VP8LBitWriterResize(bw, expected_size);
-}
-
-void VP8LBitWriterDestroy(VP8LBitWriter* const bw) {
- if (bw != NULL) {
- free(bw->buf_);
- memset(bw, 0, sizeof(*bw));
- }
-}
-
-void VP8LWriteBits(VP8LBitWriter* const bw, int n_bits, uint32_t bits) {
- if (n_bits < 1) return;
-#if !defined(__BIG_ENDIAN__)
- // Technically, this branch of the code can write up to 25 bits at a time,
- // but in prefix encoding, the maximum number of bits written is 18 at a time.
- {
- uint8_t* const p = &bw->buf_[bw->bit_pos_ >> 3];
- uint32_t v = *(const uint32_t*)p;
- v |= bits << (bw->bit_pos_ & 7);
- *(uint32_t*)p = v;
- bw->bit_pos_ += n_bits;
- }
-#else // BIG_ENDIAN
- {
- uint8_t* p = &bw->buf_[bw->bit_pos_ >> 3];
- const int bits_reserved_in_first_byte = bw->bit_pos_ & 7;
- const int bits_left_to_write = n_bits - 8 + bits_reserved_in_first_byte;
- // implicit & 0xff is assumed for uint8_t arithmetics
- *p++ |= bits << bits_reserved_in_first_byte;
- bits >>= 8 - bits_reserved_in_first_byte;
- if (bits_left_to_write >= 1) {
- *p++ = bits;
- bits >>= 8;
- if (bits_left_to_write >= 9) {
- *p++ = bits;
- bits >>= 8;
- }
- }
- assert(n_bits <= 25);
- *p = bits;
- bw->bit_pos_ += n_bits;
- }
-#endif
- if ((bw->bit_pos_ >> 3) > (bw->max_bytes_ - 8)) {
- const uint64_t extra_size = 32768ULL + bw->max_bytes_;
- if (extra_size != (size_t)extra_size ||
- !VP8LBitWriterResize(bw, (size_t)extra_size)) {
- bw->bit_pos_ = 0;
- bw->error_ = 1;
- }
- }
-}
-
-//------------------------------------------------------------------------------
-
-#if defined(__cplusplus) || defined(c_plusplus)
-} // extern "C"
-#endif
diff --git a/drivers/webpold/utils/bit_writer.h b/drivers/webpold/utils/bit_writer.h
deleted file mode 100644
index 57f39b11b1..0000000000
--- a/drivers/webpold/utils/bit_writer.h
+++ /dev/null
@@ -1,123 +0,0 @@
-// Copyright 2011 Google Inc. All Rights Reserved.
-//
-// This code is licensed under the same terms as WebM:
-// Software License Agreement: http://www.webmproject.org/license/software/
-// Additional IP Rights Grant: http://www.webmproject.org/license/additional/
-// -----------------------------------------------------------------------------
-//
-// Bit writing and boolean coder
-//
-// Author: Skal (pascal.massimino@gmail.com)
-
-#ifndef WEBP_UTILS_BIT_WRITER_H_
-#define WEBP_UTILS_BIT_WRITER_H_
-
-#include "../types.h"
-
-#if defined(__cplusplus) || defined(c_plusplus)
-extern "C" {
-#endif
-
-//------------------------------------------------------------------------------
-// Bit-writing
-
-typedef struct VP8BitWriter VP8BitWriter;
-struct VP8BitWriter {
- int32_t range_; // range-1
- int32_t value_;
- int run_; // number of outstanding bits
- int nb_bits_; // number of pending bits
- uint8_t* buf_; // internal buffer. Re-allocated regularly. Not owned.
- size_t pos_;
- size_t max_pos_;
- int error_; // true in case of error
-};
-
-// Initialize the object. Allocates some initial memory based on expected_size.
-int VP8BitWriterInit(VP8BitWriter* const bw, size_t expected_size);
-// Finalize the bitstream coding. Returns a pointer to the internal buffer.
-uint8_t* VP8BitWriterFinish(VP8BitWriter* const bw);
-// Release any pending memory and zeroes the object. Not a mandatory call.
-// Only useful in case of error, when the internal buffer hasn't been grabbed!
-void VP8BitWriterWipeOut(VP8BitWriter* const bw);
-
-int VP8PutBit(VP8BitWriter* const bw, int bit, int prob);
-int VP8PutBitUniform(VP8BitWriter* const bw, int bit);
-void VP8PutValue(VP8BitWriter* const bw, int value, int nb_bits);
-void VP8PutSignedValue(VP8BitWriter* const bw, int value, int nb_bits);
-
-// Appends some bytes to the internal buffer. Data is copied.
-int VP8BitWriterAppend(VP8BitWriter* const bw,
- const uint8_t* data, size_t size);
-
-// return approximate write position (in bits)
-static WEBP_INLINE uint64_t VP8BitWriterPos(const VP8BitWriter* const bw) {
- return (uint64_t)(bw->pos_ + bw->run_) * 8 + 8 + bw->nb_bits_;
-}
-
-// Returns a pointer to the internal buffer.
-static WEBP_INLINE uint8_t* VP8BitWriterBuf(const VP8BitWriter* const bw) {
- return bw->buf_;
-}
-// Returns the size of the internal buffer.
-static WEBP_INLINE size_t VP8BitWriterSize(const VP8BitWriter* const bw) {
- return bw->pos_;
-}
-
-//------------------------------------------------------------------------------
-// VP8LBitWriter
-// TODO(vikasa): VP8LBitWriter is copied as-is from lossless code. There's scope
-// of re-using VP8BitWriter. Will evaluate once basic lossless encoder is
-// implemented.
-
-typedef struct {
- uint8_t* buf_;
- size_t bit_pos_;
- size_t max_bytes_;
-
- // After all bits are written, the caller must observe the state of
- // error_. A value of 1 indicates that a memory allocation failure
- // has happened during bit writing. A value of 0 indicates successful
- // writing of bits.
- int error_;
-} VP8LBitWriter;
-
-static WEBP_INLINE size_t VP8LBitWriterNumBytes(VP8LBitWriter* const bw) {
- return (bw->bit_pos_ + 7) >> 3;
-}
-
-static WEBP_INLINE uint8_t* VP8LBitWriterFinish(VP8LBitWriter* const bw) {
- return bw->buf_;
-}
-
-// Returns 0 in case of memory allocation error.
-int VP8LBitWriterInit(VP8LBitWriter* const bw, size_t expected_size);
-
-void VP8LBitWriterDestroy(VP8LBitWriter* const bw);
-
-// This function writes bits into bytes in increasing addresses, and within
-// a byte least-significant-bit first.
-//
-// The function can write up to 16 bits in one go with WriteBits
-// Example: let's assume that 3 bits (Rs below) have been written already:
-//
-// BYTE-0 BYTE+1 BYTE+2
-//
-// 0000 0RRR 0000 0000 0000 0000
-//
-// Now, we could write 5 or less bits in MSB by just sifting by 3
-// and OR'ing to BYTE-0.
-//
-// For n bits, we take the last 5 bytes, OR that with high bits in BYTE-0,
-// and locate the rest in BYTE+1 and BYTE+2.
-//
-// VP8LBitWriter's error_ flag is set in case of memory allocation error.
-void VP8LWriteBits(VP8LBitWriter* const bw, int n_bits, uint32_t bits);
-
-//------------------------------------------------------------------------------
-
-#if defined(__cplusplus) || defined(c_plusplus)
-} // extern "C"
-#endif
-
-#endif /* WEBP_UTILS_BIT_WRITER_H_ */
diff --git a/drivers/webpold/utils/color_cache.c b/drivers/webpold/utils/color_cache.c
deleted file mode 100644
index 560f81db10..0000000000
--- a/drivers/webpold/utils/color_cache.c
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright 2012 Google Inc. All Rights Reserved.
-//
-// This code is licensed under the same terms as WebM:
-// Software License Agreement: http://www.webmproject.org/license/software/
-// Additional IP Rights Grant: http://www.webmproject.org/license/additional/
-// -----------------------------------------------------------------------------
-//
-// Color Cache for WebP Lossless
-//
-// Author: Jyrki Alakuijala (jyrki@google.com)
-
-#include <assert.h>
-#include <stdlib.h>
-#include "./color_cache.h"
-#include "../utils/utils.h"
-
-#if defined(__cplusplus) || defined(c_plusplus)
-extern "C" {
-#endif
-
-//------------------------------------------------------------------------------
-// VP8LColorCache.
-
-int VP8LColorCacheInit(VP8LColorCache* const cc, int hash_bits) {
- const int hash_size = 1 << hash_bits;
- assert(cc != NULL);
- assert(hash_bits > 0);
- cc->colors_ = (uint32_t*)WebPSafeCalloc((uint64_t)hash_size,
- sizeof(*cc->colors_));
- if (cc->colors_ == NULL) return 0;
- cc->hash_shift_ = 32 - hash_bits;
- return 1;
-}
-
-void VP8LColorCacheClear(VP8LColorCache* const cc) {
- if (cc != NULL) {
- free(cc->colors_);
- cc->colors_ = NULL;
- }
-}
-
-#if defined(__cplusplus) || defined(c_plusplus)
-}
-#endif
diff --git a/drivers/webpold/utils/color_cache.h b/drivers/webpold/utils/color_cache.h
deleted file mode 100644
index da5e260195..0000000000
--- a/drivers/webpold/utils/color_cache.h
+++ /dev/null
@@ -1,68 +0,0 @@
-// Copyright 2012 Google Inc. All Rights Reserved.
-//
-// This code is licensed under the same terms as WebM:
-// Software License Agreement: http://www.webmproject.org/license/software/
-// Additional IP Rights Grant: http://www.webmproject.org/license/additional/
-// -----------------------------------------------------------------------------
-//
-// Color Cache for WebP Lossless
-//
-// Authors: Jyrki Alakuijala (jyrki@google.com)
-// Urvang Joshi (urvang@google.com)
-
-#ifndef WEBP_UTILS_COLOR_CACHE_H_
-#define WEBP_UTILS_COLOR_CACHE_H_
-
-#include "../types.h"
-
-#if defined(__cplusplus) || defined(c_plusplus)
-extern "C" {
-#endif
-
-// Main color cache struct.
-typedef struct {
- uint32_t *colors_; // color entries
- int hash_shift_; // Hash shift: 32 - hash_bits.
-} VP8LColorCache;
-
-static const uint32_t kHashMul = 0x1e35a7bd;
-
-static WEBP_INLINE uint32_t VP8LColorCacheLookup(
- const VP8LColorCache* const cc, uint32_t key) {
- assert(key <= (~0U >> cc->hash_shift_));
- return cc->colors_[key];
-}
-
-static WEBP_INLINE void VP8LColorCacheInsert(const VP8LColorCache* const cc,
- uint32_t argb) {
- const uint32_t key = (kHashMul * argb) >> cc->hash_shift_;
- cc->colors_[key] = argb;
-}
-
-static WEBP_INLINE int VP8LColorCacheGetIndex(const VP8LColorCache* const cc,
- uint32_t argb) {
- return (kHashMul * argb) >> cc->hash_shift_;
-}
-
-static WEBP_INLINE int VP8LColorCacheContains(const VP8LColorCache* const cc,
- uint32_t argb) {
- const uint32_t key = (kHashMul * argb) >> cc->hash_shift_;
- return cc->colors_[key] == argb;
-}
-
-//------------------------------------------------------------------------------
-
-// Initializes the color cache with 'hash_bits' bits for the keys.
-// Returns false in case of memory error.
-int VP8LColorCacheInit(VP8LColorCache* const color_cache, int hash_bits);
-
-// Delete the memory associated to color cache.
-void VP8LColorCacheClear(VP8LColorCache* const color_cache);
-
-//------------------------------------------------------------------------------
-
-#if defined(__cplusplus) || defined(c_plusplus)
-}
-#endif
-
-#endif // WEBP_UTILS_COLOR_CACHE_H_
diff --git a/drivers/webpold/utils/filters.c b/drivers/webpold/utils/filters.c
deleted file mode 100644
index 08f52a3d20..0000000000
--- a/drivers/webpold/utils/filters.c
+++ /dev/null
@@ -1,229 +0,0 @@
-// Copyright 2011 Google Inc. All Rights Reserved.
-//
-// This code is licensed under the same terms as WebM:
-// Software License Agreement: http://www.webmproject.org/license/software/
-// Additional IP Rights Grant: http://www.webmproject.org/license/additional/
-// -----------------------------------------------------------------------------
-//
-// Spatial prediction using various filters
-//
-// Author: Urvang (urvang@google.com)
-
-#include "./filters.h"
-#include <assert.h>
-#include <stdlib.h>
-#include <string.h>
-
-#if defined(__cplusplus) || defined(c_plusplus)
-extern "C" {
-#endif
-
-//------------------------------------------------------------------------------
-// Helpful macro.
-
-# define SANITY_CHECK(in, out) \
- assert(in != NULL); \
- assert(out != NULL); \
- assert(width > 0); \
- assert(height > 0); \
- assert(bpp > 0); \
- assert(stride >= width * bpp);
-
-static WEBP_INLINE void PredictLine(const uint8_t* src, const uint8_t* pred,
- uint8_t* dst, int length, int inverse) {
- int i;
- if (inverse) {
- for (i = 0; i < length; ++i) dst[i] = src[i] + pred[i];
- } else {
- for (i = 0; i < length; ++i) dst[i] = src[i] - pred[i];
- }
-}
-
-//------------------------------------------------------------------------------
-// Horizontal filter.
-
-static WEBP_INLINE void DoHorizontalFilter(const uint8_t* in,
- int width, int height, int bpp, int stride, int inverse, uint8_t* out) {
- int h;
- const uint8_t* preds = (inverse ? out : in);
- SANITY_CHECK(in, out);
-
- // Filter line-by-line.
- for (h = 0; h < height; ++h) {
- // Leftmost pixel is predicted from above (except for topmost scanline).
- if (h == 0) {
- memcpy((void*)out, (const void*)in, bpp);
- } else {
- PredictLine(in, preds - stride, out, bpp, inverse);
- }
- PredictLine(in + bpp, preds, out + bpp, bpp * (width - 1), inverse);
- preds += stride;
- in += stride;
- out += stride;
- }
-}
-
-static void HorizontalFilter(const uint8_t* data, int width, int height,
- int bpp, int stride, uint8_t* filtered_data) {
- DoHorizontalFilter(data, width, height, bpp, stride, 0, filtered_data);
-}
-
-static void HorizontalUnfilter(const uint8_t* data, int width, int height,
- int bpp, int stride, uint8_t* recon_data) {
- DoHorizontalFilter(data, width, height, bpp, stride, 1, recon_data);
-}
-
-//------------------------------------------------------------------------------
-// Vertical filter.
-
-static WEBP_INLINE void DoVerticalFilter(const uint8_t* in,
- int width, int height, int bpp, int stride, int inverse, uint8_t* out) {
- int h;
- const uint8_t* preds = (inverse ? out : in);
- SANITY_CHECK(in, out);
-
- // Very first top-left pixel is copied.
- memcpy((void*)out, (const void*)in, bpp);
- // Rest of top scan-line is left-predicted.
- PredictLine(in + bpp, preds, out + bpp, bpp * (width - 1), inverse);
-
- // Filter line-by-line.
- for (h = 1; h < height; ++h) {
- in += stride;
- out += stride;
- PredictLine(in, preds, out, bpp * width, inverse);
- preds += stride;
- }
-}
-
-static void VerticalFilter(const uint8_t* data, int width, int height,
- int bpp, int stride, uint8_t* filtered_data) {
- DoVerticalFilter(data, width, height, bpp, stride, 0, filtered_data);
-}
-
-static void VerticalUnfilter(const uint8_t* data, int width, int height,
- int bpp, int stride, uint8_t* recon_data) {
- DoVerticalFilter(data, width, height, bpp, stride, 1, recon_data);
-}
-
-//------------------------------------------------------------------------------
-// Gradient filter.
-
-static WEBP_INLINE int GradientPredictor(uint8_t a, uint8_t b, uint8_t c) {
- const int g = a + b - c;
- return (g < 0) ? 0 : (g > 255) ? 255 : g;
-}
-
-static WEBP_INLINE
-void DoGradientFilter(const uint8_t* in, int width, int height,
- int bpp, int stride, int inverse, uint8_t* out) {
- const uint8_t* preds = (inverse ? out : in);
- int h;
- SANITY_CHECK(in, out);
-
- // left prediction for top scan-line
- memcpy((void*)out, (const void*)in, bpp);
- PredictLine(in + bpp, preds, out + bpp, bpp * (width - 1), inverse);
-
- // Filter line-by-line.
- for (h = 1; h < height; ++h) {
- int w;
- preds += stride;
- in += stride;
- out += stride;
- // leftmost pixel: predict from above.
- PredictLine(in, preds - stride, out, bpp, inverse);
- for (w = bpp; w < width * bpp; ++w) {
- const int pred = GradientPredictor(preds[w - bpp],
- preds[w - stride],
- preds[w - stride - bpp]);
- out[w] = in[w] + (inverse ? pred : -pred);
- }
- }
-}
-
-static void GradientFilter(const uint8_t* data, int width, int height,
- int bpp, int stride, uint8_t* filtered_data) {
- DoGradientFilter(data, width, height, bpp, stride, 0, filtered_data);
-}
-
-static void GradientUnfilter(const uint8_t* data, int width, int height,
- int bpp, int stride, uint8_t* recon_data) {
- DoGradientFilter(data, width, height, bpp, stride, 1, recon_data);
-}
-
-#undef SANITY_CHECK
-
-// -----------------------------------------------------------------------------
-// Quick estimate of a potentially interesting filter mode to try, in addition
-// to the default NONE.
-
-#define SMAX 16
-#define SDIFF(a, b) (abs((a) - (b)) >> 4) // Scoring diff, in [0..SMAX)
-
-WEBP_FILTER_TYPE EstimateBestFilter(const uint8_t* data,
- int width, int height, int stride) {
- int i, j;
- int bins[WEBP_FILTER_LAST][SMAX];
- memset(bins, 0, sizeof(bins));
- // We only sample every other pixels. That's enough.
- for (j = 2; j < height - 1; j += 2) {
- const uint8_t* const p = data + j * stride;
- int mean = p[0];
- for (i = 2; i < width - 1; i += 2) {
- const int diff0 = SDIFF(p[i], mean);
- const int diff1 = SDIFF(p[i], p[i - 1]);
- const int diff2 = SDIFF(p[i], p[i - width]);
- const int grad_pred =
- GradientPredictor(p[i - 1], p[i - width], p[i - width - 1]);
- const int diff3 = SDIFF(p[i], grad_pred);
- bins[WEBP_FILTER_NONE][diff0] = 1;
- bins[WEBP_FILTER_HORIZONTAL][diff1] = 1;
- bins[WEBP_FILTER_VERTICAL][diff2] = 1;
- bins[WEBP_FILTER_GRADIENT][diff3] = 1;
- mean = (3 * mean + p[i] + 2) >> 2;
- }
- }
- {
- WEBP_FILTER_TYPE filter, best_filter = WEBP_FILTER_NONE;
- int best_score = 0x7fffffff;
- for (filter = WEBP_FILTER_NONE; filter < WEBP_FILTER_LAST; ++filter) {
- int score = 0;
- for (i = 0; i < SMAX; ++i) {
- if (bins[filter][i] > 0) {
- score += i;
- }
- }
- if (score < best_score) {
- best_score = score;
- best_filter = filter;
- }
- }
- return best_filter;
- }
-}
-
-#undef SMAX
-#undef SDIFF
-
-//------------------------------------------------------------------------------
-
-const WebPFilterFunc WebPFilters[WEBP_FILTER_LAST] = {
- NULL, // WEBP_FILTER_NONE
- HorizontalFilter, // WEBP_FILTER_HORIZONTAL
- VerticalFilter, // WEBP_FILTER_VERTICAL
- GradientFilter // WEBP_FILTER_GRADIENT
-};
-
-const WebPFilterFunc WebPUnfilters[WEBP_FILTER_LAST] = {
- NULL, // WEBP_FILTER_NONE
- HorizontalUnfilter, // WEBP_FILTER_HORIZONTAL
- VerticalUnfilter, // WEBP_FILTER_VERTICAL
- GradientUnfilter // WEBP_FILTER_GRADIENT
-};
-
-//------------------------------------------------------------------------------
-
-#if defined(__cplusplus) || defined(c_plusplus)
-} // extern "C"
-#endif
diff --git a/drivers/webpold/utils/filters.h b/drivers/webpold/utils/filters.h
deleted file mode 100644
index db886be29a..0000000000
--- a/drivers/webpold/utils/filters.h
+++ /dev/null
@@ -1,54 +0,0 @@
-// Copyright 2011 Google Inc. All Rights Reserved.
-//
-// This code is licensed under the same terms as WebM:
-// Software License Agreement: http://www.webmproject.org/license/software/
-// Additional IP Rights Grant: http://www.webmproject.org/license/additional/
-// -----------------------------------------------------------------------------
-//
-// Spatial prediction using various filters
-//
-// Author: Urvang (urvang@google.com)
-
-#ifndef WEBP_UTILS_FILTERS_H_
-#define WEBP_UTILS_FILTERS_H_
-
-#include "../types.h"
-
-#if defined(__cplusplus) || defined(c_plusplus)
-extern "C" {
-#endif
-
-// Filters.
-typedef enum {
- WEBP_FILTER_NONE = 0,
- WEBP_FILTER_HORIZONTAL,
- WEBP_FILTER_VERTICAL,
- WEBP_FILTER_GRADIENT,
- WEBP_FILTER_LAST = WEBP_FILTER_GRADIENT + 1, // end marker
- WEBP_FILTER_BEST,
- WEBP_FILTER_FAST
-} WEBP_FILTER_TYPE;
-
-typedef void (*WebPFilterFunc)(const uint8_t* in, int width, int height,
- int bpp, int stride, uint8_t* out);
-
-// Filter the given data using the given predictor.
-// 'in' corresponds to a 2-dimensional pixel array of size (stride * height)
-// in raster order.
-// 'bpp' is number of bytes per pixel, and
-// 'stride' is number of bytes per scan line (with possible padding).
-// 'out' should be pre-allocated.
-extern const WebPFilterFunc WebPFilters[WEBP_FILTER_LAST];
-
-// Reconstruct the original data from the given filtered data.
-extern const WebPFilterFunc WebPUnfilters[WEBP_FILTER_LAST];
-
-// Fast estimate of a potentially good filter.
-extern WEBP_FILTER_TYPE EstimateBestFilter(const uint8_t* data,
- int width, int height, int stride);
-
-#if defined(__cplusplus) || defined(c_plusplus)
-} // extern "C"
-#endif
-
-#endif /* WEBP_UTILS_FILTERS_H_ */
diff --git a/drivers/webpold/utils/huffman.c b/drivers/webpold/utils/huffman.c
deleted file mode 100644
index 1cc1cfd355..0000000000
--- a/drivers/webpold/utils/huffman.c
+++ /dev/null
@@ -1,238 +0,0 @@
-// Copyright 2012 Google Inc. All Rights Reserved.
-//
-// This code is licensed under the same terms as WebM:
-// Software License Agreement: http://www.webmproject.org/license/software/
-// Additional IP Rights Grant: http://www.webmproject.org/license/additional/
-// -----------------------------------------------------------------------------
-//
-// Utilities for building and looking up Huffman trees.
-//
-// Author: Urvang Joshi (urvang@google.com)
-
-#include <assert.h>
-#include <stdlib.h>
-#include "./huffman.h"
-#include "../utils/utils.h"
-#include "../format_constants.h"
-
-#if defined(__cplusplus) || defined(c_plusplus)
-extern "C" {
-#endif
-
-#define NON_EXISTENT_SYMBOL (-1)
-
-static void TreeNodeInit(HuffmanTreeNode* const node) {
- node->children_ = -1; // means: 'unassigned so far'
-}
-
-static int NodeIsEmpty(const HuffmanTreeNode* const node) {
- return (node->children_ < 0);
-}
-
-static int IsFull(const HuffmanTree* const tree) {
- return (tree->num_nodes_ == tree->max_nodes_);
-}
-
-static void AssignChildren(HuffmanTree* const tree,
- HuffmanTreeNode* const node) {
- HuffmanTreeNode* const children = tree->root_ + tree->num_nodes_;
- node->children_ = (int)(children - node);
- assert(children - node == (int)(children - node));
- tree->num_nodes_ += 2;
- TreeNodeInit(children + 0);
- TreeNodeInit(children + 1);
-}
-
-static int TreeInit(HuffmanTree* const tree, int num_leaves) {
- assert(tree != NULL);
- if (num_leaves == 0) return 0;
- // We allocate maximum possible nodes in the tree at once.
- // Note that a Huffman tree is a full binary tree; and in a full binary tree
- // with L leaves, the total number of nodes N = 2 * L - 1.
- tree->max_nodes_ = 2 * num_leaves - 1;
- tree->root_ = (HuffmanTreeNode*)WebPSafeMalloc((uint64_t)tree->max_nodes_,
- sizeof(*tree->root_));
- if (tree->root_ == NULL) return 0;
- TreeNodeInit(tree->root_); // Initialize root.
- tree->num_nodes_ = 1;
- return 1;
-}
-
-void HuffmanTreeRelease(HuffmanTree* const tree) {
- if (tree != NULL) {
- free(tree->root_);
- tree->root_ = NULL;
- tree->max_nodes_ = 0;
- tree->num_nodes_ = 0;
- }
-}
-
-int HuffmanCodeLengthsToCodes(const int* const code_lengths,
- int code_lengths_size, int* const huff_codes) {
- int symbol;
- int code_len;
- int code_length_hist[MAX_ALLOWED_CODE_LENGTH + 1] = { 0 };
- int curr_code;
- int next_codes[MAX_ALLOWED_CODE_LENGTH + 1] = { 0 };
- int max_code_length = 0;
-
- assert(code_lengths != NULL);
- assert(code_lengths_size > 0);
- assert(huff_codes != NULL);
-
- // Calculate max code length.
- for (symbol = 0; symbol < code_lengths_size; ++symbol) {
- if (code_lengths[symbol] > max_code_length) {
- max_code_length = code_lengths[symbol];
- }
- }
- if (max_code_length > MAX_ALLOWED_CODE_LENGTH) return 0;
-
- // Calculate code length histogram.
- for (symbol = 0; symbol < code_lengths_size; ++symbol) {
- ++code_length_hist[code_lengths[symbol]];
- }
- code_length_hist[0] = 0;
-
- // Calculate the initial values of 'next_codes' for each code length.
- // next_codes[code_len] denotes the code to be assigned to the next symbol
- // of code length 'code_len'.
- curr_code = 0;
- next_codes[0] = -1; // Unused, as code length = 0 implies code doesn't exist.
- for (code_len = 1; code_len <= max_code_length; ++code_len) {
- curr_code = (curr_code + code_length_hist[code_len - 1]) << 1;
- next_codes[code_len] = curr_code;
- }
-
- // Get symbols.
- for (symbol = 0; symbol < code_lengths_size; ++symbol) {
- if (code_lengths[symbol] > 0) {
- huff_codes[symbol] = next_codes[code_lengths[symbol]]++;
- } else {
- huff_codes[symbol] = NON_EXISTENT_SYMBOL;
- }
- }
- return 1;
-}
-
-static int TreeAddSymbol(HuffmanTree* const tree,
- int symbol, int code, int code_length) {
- HuffmanTreeNode* node = tree->root_;
- const HuffmanTreeNode* const max_node = tree->root_ + tree->max_nodes_;
- while (code_length-- > 0) {
- if (node >= max_node) {
- return 0;
- }
- if (NodeIsEmpty(node)) {
- if (IsFull(tree)) return 0; // error: too many symbols.
- AssignChildren(tree, node);
- } else if (HuffmanTreeNodeIsLeaf(node)) {
- return 0; // leaf is already occupied.
- }
- node += node->children_ + ((code >> code_length) & 1);
- }
- if (NodeIsEmpty(node)) {
- node->children_ = 0; // turn newly created node into a leaf.
- } else if (!HuffmanTreeNodeIsLeaf(node)) {
- return 0; // trying to assign a symbol to already used code.
- }
- node->symbol_ = symbol; // Add symbol in this node.
- return 1;
-}
-
-int HuffmanTreeBuildImplicit(HuffmanTree* const tree,
- const int* const code_lengths,
- int code_lengths_size) {
- int symbol;
- int num_symbols = 0;
- int root_symbol = 0;
-
- assert(tree != NULL);
- assert(code_lengths != NULL);
-
- // Find out number of symbols and the root symbol.
- for (symbol = 0; symbol < code_lengths_size; ++symbol) {
- if (code_lengths[symbol] > 0) {
- // Note: code length = 0 indicates non-existent symbol.
- ++num_symbols;
- root_symbol = symbol;
- }
- }
-
- // Initialize the tree. Will fail for num_symbols = 0
- if (!TreeInit(tree, num_symbols)) return 0;
-
- // Build tree.
- if (num_symbols == 1) { // Trivial case.
- const int max_symbol = code_lengths_size;
- if (root_symbol < 0 || root_symbol >= max_symbol) {
- HuffmanTreeRelease(tree);
- return 0;
- }
- return TreeAddSymbol(tree, root_symbol, 0, 0);
- } else { // Normal case.
- int ok = 0;
-
- // Get Huffman codes from the code lengths.
- int* const codes =
- (int*)WebPSafeMalloc((uint64_t)code_lengths_size, sizeof(*codes));
- if (codes == NULL) goto End;
-
- if (!HuffmanCodeLengthsToCodes(code_lengths, code_lengths_size, codes)) {
- goto End;
- }
-
- // Add symbols one-by-one.
- for (symbol = 0; symbol < code_lengths_size; ++symbol) {
- if (code_lengths[symbol] > 0) {
- if (!TreeAddSymbol(tree, symbol, codes[symbol], code_lengths[symbol])) {
- goto End;
- }
- }
- }
- ok = 1;
- End:
- free(codes);
- ok = ok && IsFull(tree);
- if (!ok) HuffmanTreeRelease(tree);
- return ok;
- }
-}
-
-int HuffmanTreeBuildExplicit(HuffmanTree* const tree,
- const int* const code_lengths,
- const int* const codes,
- const int* const symbols, int max_symbol,
- int num_symbols) {
- int ok = 0;
- int i;
-
- assert(tree != NULL);
- assert(code_lengths != NULL);
- assert(codes != NULL);
- assert(symbols != NULL);
-
- // Initialize the tree. Will fail if num_symbols = 0.
- if (!TreeInit(tree, num_symbols)) return 0;
-
- // Add symbols one-by-one.
- for (i = 0; i < num_symbols; ++i) {
- if (codes[i] != NON_EXISTENT_SYMBOL) {
- if (symbols[i] < 0 || symbols[i] >= max_symbol) {
- goto End;
- }
- if (!TreeAddSymbol(tree, symbols[i], codes[i], code_lengths[i])) {
- goto End;
- }
- }
- }
- ok = 1;
- End:
- ok = ok && IsFull(tree);
- if (!ok) HuffmanTreeRelease(tree);
- return ok;
-}
-
-#if defined(__cplusplus) || defined(c_plusplus)
-} // extern "C"
-#endif
diff --git a/drivers/webpold/utils/huffman.h b/drivers/webpold/utils/huffman.h
deleted file mode 100644
index f16447e649..0000000000
--- a/drivers/webpold/utils/huffman.h
+++ /dev/null
@@ -1,78 +0,0 @@
-// Copyright 2012 Google Inc. All Rights Reserved.
-//
-// This code is licensed under the same terms as WebM:
-// Software License Agreement: http://www.webmproject.org/license/software/
-// Additional IP Rights Grant: http://www.webmproject.org/license/additional/
-// -----------------------------------------------------------------------------
-//
-// Utilities for building and looking up Huffman trees.
-//
-// Author: Urvang Joshi (urvang@google.com)
-
-#ifndef WEBP_UTILS_HUFFMAN_H_
-#define WEBP_UTILS_HUFFMAN_H_
-
-#include <assert.h>
-#include "../types.h"
-
-#if defined(__cplusplus) || defined(c_plusplus)
-extern "C" {
-#endif
-
-// A node of a Huffman tree.
-typedef struct {
- int symbol_;
- int children_; // delta offset to both children (contiguous) or 0 if leaf.
-} HuffmanTreeNode;
-
-// Huffman Tree.
-typedef struct HuffmanTree HuffmanTree;
-struct HuffmanTree {
- HuffmanTreeNode* root_; // all the nodes, starting at root.
- int max_nodes_; // max number of nodes
- int num_nodes_; // number of currently occupied nodes
-};
-
-// Returns true if the given node is a leaf of the Huffman tree.
-static WEBP_INLINE int HuffmanTreeNodeIsLeaf(
- const HuffmanTreeNode* const node) {
- return (node->children_ == 0);
-}
-
-// Go down one level. Most critical function. 'right_child' must be 0 or 1.
-static WEBP_INLINE const HuffmanTreeNode* HuffmanTreeNextNode(
- const HuffmanTreeNode* node, int right_child) {
- return node + node->children_ + right_child;
-}
-
-// Releases the nodes of the Huffman tree.
-// Note: It does NOT free 'tree' itself.
-void HuffmanTreeRelease(HuffmanTree* const tree);
-
-// Builds Huffman tree assuming code lengths are implicitly in symbol order.
-// Returns false in case of error (invalid tree or memory error).
-int HuffmanTreeBuildImplicit(HuffmanTree* const tree,
- const int* const code_lengths,
- int code_lengths_size);
-
-// Build a Huffman tree with explicitly given lists of code lengths, codes
-// and symbols. Verifies that all symbols added are smaller than max_symbol.
-// Returns false in case of an invalid symbol, invalid tree or memory error.
-int HuffmanTreeBuildExplicit(HuffmanTree* const tree,
- const int* const code_lengths,
- const int* const codes,
- const int* const symbols, int max_symbol,
- int num_symbols);
-
-// Utility: converts Huffman code lengths to corresponding Huffman codes.
-// 'huff_codes' should be pre-allocated.
-// Returns false in case of error (memory allocation, invalid codes).
-int HuffmanCodeLengthsToCodes(const int* const code_lengths,
- int code_lengths_size, int* const huff_codes);
-
-
-#if defined(__cplusplus) || defined(c_plusplus)
-} // extern "C"
-#endif
-
-#endif // WEBP_UTILS_HUFFMAN_H_
diff --git a/drivers/webpold/utils/huffman_encode.c b/drivers/webpold/utils/huffman_encode.c
deleted file mode 100644
index e172b10a85..0000000000
--- a/drivers/webpold/utils/huffman_encode.c
+++ /dev/null
@@ -1,439 +0,0 @@
-// Copyright 2011 Google Inc. All Rights Reserved.
-//
-// This code is licensed under the same terms as WebM:
-// Software License Agreement: http://www.webmproject.org/license/software/
-// Additional IP Rights Grant: http://www.webmproject.org/license/additional/
-// -----------------------------------------------------------------------------
-//
-// Author: Jyrki Alakuijala (jyrki@google.com)
-//
-// Entropy encoding (Huffman) for webp lossless.
-
-#include <assert.h>
-#include <stdlib.h>
-#include <string.h>
-#include "./huffman_encode.h"
-#include "../utils/utils.h"
-#include "../format_constants.h"
-
-// -----------------------------------------------------------------------------
-// Util function to optimize the symbol map for RLE coding
-
-// Heuristics for selecting the stride ranges to collapse.
-static int ValuesShouldBeCollapsedToStrideAverage(int a, int b) {
- return abs(a - b) < 4;
-}
-
-// Change the population counts in a way that the consequent
-// Hufmann tree compression, especially its RLE-part, give smaller output.
-static int OptimizeHuffmanForRle(int length, int* const counts) {
- uint8_t* good_for_rle;
- // 1) Let's make the Huffman code more compatible with rle encoding.
- int i;
- for (; length >= 0; --length) {
- if (length == 0) {
- return 1; // All zeros.
- }
- if (counts[length - 1] != 0) {
- // Now counts[0..length - 1] does not have trailing zeros.
- break;
- }
- }
- // 2) Let's mark all population counts that already can be encoded
- // with an rle code.
- good_for_rle = (uint8_t*)calloc(length, 1);
- if (good_for_rle == NULL) {
- return 0;
- }
- {
- // Let's not spoil any of the existing good rle codes.
- // Mark any seq of 0's that is longer as 5 as a good_for_rle.
- // Mark any seq of non-0's that is longer as 7 as a good_for_rle.
- int symbol = counts[0];
- int stride = 0;
- for (i = 0; i < length + 1; ++i) {
- if (i == length || counts[i] != symbol) {
- if ((symbol == 0 && stride >= 5) ||
- (symbol != 0 && stride >= 7)) {
- int k;
- for (k = 0; k < stride; ++k) {
- good_for_rle[i - k - 1] = 1;
- }
- }
- stride = 1;
- if (i != length) {
- symbol = counts[i];
- }
- } else {
- ++stride;
- }
- }
- }
- // 3) Let's replace those population counts that lead to more rle codes.
- {
- int stride = 0;
- int limit = counts[0];
- int sum = 0;
- for (i = 0; i < length + 1; ++i) {
- if (i == length || good_for_rle[i] ||
- (i != 0 && good_for_rle[i - 1]) ||
- !ValuesShouldBeCollapsedToStrideAverage(counts[i], limit)) {
- if (stride >= 4 || (stride >= 3 && sum == 0)) {
- int k;
- // The stride must end, collapse what we have, if we have enough (4).
- int count = (sum + stride / 2) / stride;
- if (count < 1) {
- count = 1;
- }
- if (sum == 0) {
- // Don't make an all zeros stride to be upgraded to ones.
- count = 0;
- }
- for (k = 0; k < stride; ++k) {
- // We don't want to change value at counts[i],
- // that is already belonging to the next stride. Thus - 1.
- counts[i - k - 1] = count;
- }
- }
- stride = 0;
- sum = 0;
- if (i < length - 3) {
- // All interesting strides have a count of at least 4,
- // at least when non-zeros.
- limit = (counts[i] + counts[i + 1] +
- counts[i + 2] + counts[i + 3] + 2) / 4;
- } else if (i < length) {
- limit = counts[i];
- } else {
- limit = 0;
- }
- }
- ++stride;
- if (i != length) {
- sum += counts[i];
- if (stride >= 4) {
- limit = (sum + stride / 2) / stride;
- }
- }
- }
- }
- free(good_for_rle);
- return 1;
-}
-
-typedef struct {
- int total_count_;
- int value_;
- int pool_index_left_;
- int pool_index_right_;
-} HuffmanTree;
-
-// A comparer function for two Huffman trees: sorts first by 'total count'
-// (more comes first), and then by 'value' (more comes first).
-static int CompareHuffmanTrees(const void* ptr1, const void* ptr2) {
- const HuffmanTree* const t1 = (const HuffmanTree*)ptr1;
- const HuffmanTree* const t2 = (const HuffmanTree*)ptr2;
- if (t1->total_count_ > t2->total_count_) {
- return -1;
- } else if (t1->total_count_ < t2->total_count_) {
- return 1;
- } else {
- if (t1->value_ < t2->value_) {
- return -1;
- }
- if (t1->value_ > t2->value_) {
- return 1;
- }
- return 0;
- }
-}
-
-static void SetBitDepths(const HuffmanTree* const tree,
- const HuffmanTree* const pool,
- uint8_t* const bit_depths, int level) {
- if (tree->pool_index_left_ >= 0) {
- SetBitDepths(&pool[tree->pool_index_left_], pool, bit_depths, level + 1);
- SetBitDepths(&pool[tree->pool_index_right_], pool, bit_depths, level + 1);
- } else {
- bit_depths[tree->value_] = level;
- }
-}
-
-// Create an optimal Huffman tree.
-//
-// (data,length): population counts.
-// tree_limit: maximum bit depth (inclusive) of the codes.
-// bit_depths[]: how many bits are used for the symbol.
-//
-// Returns 0 when an error has occurred.
-//
-// The catch here is that the tree cannot be arbitrarily deep
-//
-// count_limit is the value that is to be faked as the minimum value
-// and this minimum value is raised until the tree matches the
-// maximum length requirement.
-//
-// This algorithm is not of excellent performance for very long data blocks,
-// especially when population counts are longer than 2**tree_limit, but
-// we are not planning to use this with extremely long blocks.
-//
-// See http://en.wikipedia.org/wiki/Huffman_coding
-static int GenerateOptimalTree(const int* const histogram, int histogram_size,
- int tree_depth_limit,
- uint8_t* const bit_depths) {
- int count_min;
- HuffmanTree* tree_pool;
- HuffmanTree* tree;
- int tree_size_orig = 0;
- int i;
-
- for (i = 0; i < histogram_size; ++i) {
- if (histogram[i] != 0) {
- ++tree_size_orig;
- }
- }
-
- // 3 * tree_size is enough to cover all the nodes representing a
- // population and all the inserted nodes combining two existing nodes.
- // The tree pool needs 2 * (tree_size_orig - 1) entities, and the
- // tree needs exactly tree_size_orig entities.
- tree = (HuffmanTree*)WebPSafeMalloc(3ULL * tree_size_orig, sizeof(*tree));
- if (tree == NULL) return 0;
- tree_pool = tree + tree_size_orig;
-
- // For block sizes with less than 64k symbols we never need to do a
- // second iteration of this loop.
- // If we actually start running inside this loop a lot, we would perhaps
- // be better off with the Katajainen algorithm.
- assert(tree_size_orig <= (1 << (tree_depth_limit - 1)));
- for (count_min = 1; ; count_min *= 2) {
- int tree_size = tree_size_orig;
- // We need to pack the Huffman tree in tree_depth_limit bits.
- // So, we try by faking histogram entries to be at least 'count_min'.
- int idx = 0;
- int j;
- for (j = 0; j < histogram_size; ++j) {
- if (histogram[j] != 0) {
- const int count =
- (histogram[j] < count_min) ? count_min : histogram[j];
- tree[idx].total_count_ = count;
- tree[idx].value_ = j;
- tree[idx].pool_index_left_ = -1;
- tree[idx].pool_index_right_ = -1;
- ++idx;
- }
- }
-
- // Build the Huffman tree.
- qsort(tree, tree_size, sizeof(*tree), CompareHuffmanTrees);
-
- if (tree_size > 1) { // Normal case.
- int tree_pool_size = 0;
- while (tree_size > 1) { // Finish when we have only one root.
- int count;
- tree_pool[tree_pool_size++] = tree[tree_size - 1];
- tree_pool[tree_pool_size++] = tree[tree_size - 2];
- count = tree_pool[tree_pool_size - 1].total_count_ +
- tree_pool[tree_pool_size - 2].total_count_;
- tree_size -= 2;
- {
- // Search for the insertion point.
- int k;
- for (k = 0; k < tree_size; ++k) {
- if (tree[k].total_count_ <= count) {
- break;
- }
- }
- memmove(tree + (k + 1), tree + k, (tree_size - k) * sizeof(*tree));
- tree[k].total_count_ = count;
- tree[k].value_ = -1;
-
- tree[k].pool_index_left_ = tree_pool_size - 1;
- tree[k].pool_index_right_ = tree_pool_size - 2;
- tree_size = tree_size + 1;
- }
- }
- SetBitDepths(&tree[0], tree_pool, bit_depths, 0);
- } else if (tree_size == 1) { // Trivial case: only one element.
- bit_depths[tree[0].value_] = 1;
- }
-
- {
- // Test if this Huffman tree satisfies our 'tree_depth_limit' criteria.
- int max_depth = bit_depths[0];
- for (j = 1; j < histogram_size; ++j) {
- if (max_depth < bit_depths[j]) {
- max_depth = bit_depths[j];
- }
- }
- if (max_depth <= tree_depth_limit) {
- break;
- }
- }
- }
- free(tree);
- return 1;
-}
-
-// -----------------------------------------------------------------------------
-// Coding of the Huffman tree values
-
-static HuffmanTreeToken* CodeRepeatedValues(int repetitions,
- HuffmanTreeToken* tokens,
- int value, int prev_value) {
- assert(value <= MAX_ALLOWED_CODE_LENGTH);
- if (value != prev_value) {
- tokens->code = value;
- tokens->extra_bits = 0;
- ++tokens;
- --repetitions;
- }
- while (repetitions >= 1) {
- if (repetitions < 3) {
- int i;
- for (i = 0; i < repetitions; ++i) {
- tokens->code = value;
- tokens->extra_bits = 0;
- ++tokens;
- }
- break;
- } else if (repetitions < 7) {
- tokens->code = 16;
- tokens->extra_bits = repetitions - 3;
- ++tokens;
- break;
- } else {
- tokens->code = 16;
- tokens->extra_bits = 3;
- ++tokens;
- repetitions -= 6;
- }
- }
- return tokens;
-}
-
-static HuffmanTreeToken* CodeRepeatedZeros(int repetitions,
- HuffmanTreeToken* tokens) {
- while (repetitions >= 1) {
- if (repetitions < 3) {
- int i;
- for (i = 0; i < repetitions; ++i) {
- tokens->code = 0; // 0-value
- tokens->extra_bits = 0;
- ++tokens;
- }
- break;
- } else if (repetitions < 11) {
- tokens->code = 17;
- tokens->extra_bits = repetitions - 3;
- ++tokens;
- break;
- } else if (repetitions < 139) {
- tokens->code = 18;
- tokens->extra_bits = repetitions - 11;
- ++tokens;
- break;
- } else {
- tokens->code = 18;
- tokens->extra_bits = 0x7f; // 138 repeated 0s
- ++tokens;
- repetitions -= 138;
- }
- }
- return tokens;
-}
-
-int VP8LCreateCompressedHuffmanTree(const HuffmanTreeCode* const tree,
- HuffmanTreeToken* tokens, int max_tokens) {
- HuffmanTreeToken* const starting_token = tokens;
- HuffmanTreeToken* const ending_token = tokens + max_tokens;
- const int depth_size = tree->num_symbols;
- int prev_value = 8; // 8 is the initial value for rle.
- int i = 0;
- assert(tokens != NULL);
- while (i < depth_size) {
- const int value = tree->code_lengths[i];
- int k = i + 1;
- int runs;
- while (k < depth_size && tree->code_lengths[k] == value) ++k;
- runs = k - i;
- if (value == 0) {
- tokens = CodeRepeatedZeros(runs, tokens);
- } else {
- tokens = CodeRepeatedValues(runs, tokens, value, prev_value);
- prev_value = value;
- }
- i += runs;
- assert(tokens <= ending_token);
- }
- (void)ending_token; // suppress 'unused variable' warning
- return (int)(tokens - starting_token);
-}
-
-// -----------------------------------------------------------------------------
-
-// Pre-reversed 4-bit values.
-static const uint8_t kReversedBits[16] = {
- 0x0, 0x8, 0x4, 0xc, 0x2, 0xa, 0x6, 0xe,
- 0x1, 0x9, 0x5, 0xd, 0x3, 0xb, 0x7, 0xf
-};
-
-static uint32_t ReverseBits(int num_bits, uint32_t bits) {
- uint32_t retval = 0;
- int i = 0;
- while (i < num_bits) {
- i += 4;
- retval |= kReversedBits[bits & 0xf] << (MAX_ALLOWED_CODE_LENGTH + 1 - i);
- bits >>= 4;
- }
- retval >>= (MAX_ALLOWED_CODE_LENGTH + 1 - num_bits);
- return retval;
-}
-
-// Get the actual bit values for a tree of bit depths.
-static void ConvertBitDepthsToSymbols(HuffmanTreeCode* const tree) {
- // 0 bit-depth means that the symbol does not exist.
- int i;
- int len;
- uint32_t next_code[MAX_ALLOWED_CODE_LENGTH + 1];
- int depth_count[MAX_ALLOWED_CODE_LENGTH + 1] = { 0 };
-
- assert(tree != NULL);
- len = tree->num_symbols;
- for (i = 0; i < len; ++i) {
- const int code_length = tree->code_lengths[i];
- assert(code_length <= MAX_ALLOWED_CODE_LENGTH);
- ++depth_count[code_length];
- }
- depth_count[0] = 0; // ignore unused symbol
- next_code[0] = 0;
- {
- uint32_t code = 0;
- for (i = 1; i <= MAX_ALLOWED_CODE_LENGTH; ++i) {
- code = (code + depth_count[i - 1]) << 1;
- next_code[i] = code;
- }
- }
- for (i = 0; i < len; ++i) {
- const int code_length = tree->code_lengths[i];
- tree->codes[i] = ReverseBits(code_length, next_code[code_length]++);
- }
-}
-
-// -----------------------------------------------------------------------------
-// Main entry point
-
-int VP8LCreateHuffmanTree(int* const histogram, int tree_depth_limit,
- HuffmanTreeCode* const tree) {
- const int num_symbols = tree->num_symbols;
- if (!OptimizeHuffmanForRle(num_symbols, histogram)) {
- return 0;
- }
- if (!GenerateOptimalTree(histogram, num_symbols,
- tree_depth_limit, tree->code_lengths)) {
- return 0;
- }
- // Create the actual bit codes for the bit lengths.
- ConvertBitDepthsToSymbols(tree);
- return 1;
-}
diff --git a/drivers/webpold/utils/huffman_encode.h b/drivers/webpold/utils/huffman_encode.h
deleted file mode 100644
index 7f4aedc102..0000000000
--- a/drivers/webpold/utils/huffman_encode.h
+++ /dev/null
@@ -1,47 +0,0 @@
-// Copyright 2011 Google Inc. All Rights Reserved.
-//
-// This code is licensed under the same terms as WebM:
-// Software License Agreement: http://www.webmproject.org/license/software/
-// Additional IP Rights Grant: http://www.webmproject.org/license/additional/
-// -----------------------------------------------------------------------------
-//
-// Author: Jyrki Alakuijala (jyrki@google.com)
-//
-// Entropy encoding (Huffman) for webp lossless
-
-#ifndef WEBP_UTILS_HUFFMAN_ENCODE_H_
-#define WEBP_UTILS_HUFFMAN_ENCODE_H_
-
-#include "../types.h"
-
-#if defined(__cplusplus) || defined(c_plusplus)
-extern "C" {
-#endif
-
-// Struct for holding the tree header in coded form.
-typedef struct {
- uint8_t code; // value (0..15) or escape code (16,17,18)
- uint8_t extra_bits; // extra bits for escape codes
-} HuffmanTreeToken;
-
-// Struct to represent the tree codes (depth and bits array).
-typedef struct {
- int num_symbols; // Number of symbols.
- uint8_t* code_lengths; // Code lengths of the symbols.
- uint16_t* codes; // Symbol Codes.
-} HuffmanTreeCode;
-
-// Turn the Huffman tree into a token sequence.
-// Returns the number of tokens used.
-int VP8LCreateCompressedHuffmanTree(const HuffmanTreeCode* const tree,
- HuffmanTreeToken* tokens, int max_tokens);
-
-// Create an optimized tree, and tokenize it.
-int VP8LCreateHuffmanTree(int* const histogram, int tree_depth_limit,
- HuffmanTreeCode* const tree);
-
-#if defined(__cplusplus) || defined(c_plusplus)
-}
-#endif
-
-#endif // WEBP_UTILS_HUFFMAN_ENCODE_H_
diff --git a/drivers/webpold/utils/quant_levels.c b/drivers/webpold/utils/quant_levels.c
deleted file mode 100644
index f6884392aa..0000000000
--- a/drivers/webpold/utils/quant_levels.c
+++ /dev/null
@@ -1,154 +0,0 @@
-// Copyright 2011 Google Inc. All Rights Reserved.
-//
-// This code is licensed under the same terms as WebM:
-// Software License Agreement: http://www.webmproject.org/license/software/
-// Additional IP Rights Grant: http://www.webmproject.org/license/additional/
-// -----------------------------------------------------------------------------
-//
-// Quantize levels for specified number of quantization-levels ([2, 256]).
-// Min and max values are preserved (usual 0 and 255 for alpha plane).
-//
-// Author: Skal (pascal.massimino@gmail.com)
-
-#include <assert.h>
-
-#include "./quant_levels.h"
-
-#if defined(__cplusplus) || defined(c_plusplus)
-extern "C" {
-#endif
-
-#define NUM_SYMBOLS 256
-
-#define MAX_ITER 6 // Maximum number of convergence steps.
-#define ERROR_THRESHOLD 1e-4 // MSE stopping criterion.
-
-// -----------------------------------------------------------------------------
-// Quantize levels.
-
-int QuantizeLevels(uint8_t* const data, int width, int height,
- int num_levels, uint64_t* const sse) {
- int freq[NUM_SYMBOLS] = { 0 };
- int q_level[NUM_SYMBOLS] = { 0 };
- double inv_q_level[NUM_SYMBOLS] = { 0 };
- int min_s = 255, max_s = 0;
- const size_t data_size = height * width;
- int i, num_levels_in, iter;
- double last_err = 1.e38, err = 0.;
- const double err_threshold = ERROR_THRESHOLD * data_size;
-
- if (data == NULL) {
- return 0;
- }
-
- if (width <= 0 || height <= 0) {
- return 0;
- }
-
- if (num_levels < 2 || num_levels > 256) {
- return 0;
- }
-
- {
- size_t n;
- num_levels_in = 0;
- for (n = 0; n < data_size; ++n) {
- num_levels_in += (freq[data[n]] == 0);
- if (min_s > data[n]) min_s = data[n];
- if (max_s < data[n]) max_s = data[n];
- ++freq[data[n]];
- }
- }
-
- if (num_levels_in <= num_levels) goto End; // nothing to do!
-
- // Start with uniformly spread centroids.
- for (i = 0; i < num_levels; ++i) {
- inv_q_level[i] = min_s + (double)(max_s - min_s) * i / (num_levels - 1);
- }
-
- // Fixed values. Won't be changed.
- q_level[min_s] = 0;
- q_level[max_s] = num_levels - 1;
- assert(inv_q_level[0] == min_s);
- assert(inv_q_level[num_levels - 1] == max_s);
-
- // k-Means iterations.
- for (iter = 0; iter < MAX_ITER; ++iter) {
- double q_sum[NUM_SYMBOLS] = { 0 };
- double q_count[NUM_SYMBOLS] = { 0 };
- int s, slot = 0;
-
- // Assign classes to representatives.
- for (s = min_s; s <= max_s; ++s) {
- // Keep track of the nearest neighbour 'slot'
- while (slot < num_levels - 1 &&
- 2 * s > inv_q_level[slot] + inv_q_level[slot + 1]) {
- ++slot;
- }
- if (freq[s] > 0) {
- q_sum[slot] += s * freq[s];
- q_count[slot] += freq[s];
- }
- q_level[s] = slot;
- }
-
- // Assign new representatives to classes.
- if (num_levels > 2) {
- for (slot = 1; slot < num_levels - 1; ++slot) {
- const double count = q_count[slot];
- if (count > 0.) {
- inv_q_level[slot] = q_sum[slot] / count;
- }
- }
- }
-
- // Compute convergence error.
- err = 0.;
- for (s = min_s; s <= max_s; ++s) {
- const double error = s - inv_q_level[q_level[s]];
- err += freq[s] * error * error;
- }
-
- // Check for convergence: we stop as soon as the error is no
- // longer improving.
- if (last_err - err < err_threshold) break;
- last_err = err;
- }
-
- // Remap the alpha plane to quantized values.
- {
- // double->int rounding operation can be costly, so we do it
- // once for all before remapping. We also perform the data[] -> slot
- // mapping, while at it (avoid one indirection in the final loop).
- uint8_t map[NUM_SYMBOLS];
- int s;
- size_t n;
- for (s = min_s; s <= max_s; ++s) {
- const int slot = q_level[s];
- map[s] = (uint8_t)(inv_q_level[slot] + .5);
- }
- // Final pass.
- for (n = 0; n < data_size; ++n) {
- data[n] = map[data[n]];
- }
- }
- End:
- // Store sum of squared error if needed.
- if (sse != NULL) *sse = (uint64_t)err;
-
- return 1;
-}
-
-int DequantizeLevels(uint8_t* const data, int width, int height) {
- if (data == NULL || width <= 0 || height <= 0) return 0;
- // TODO(skal): implement gradient smoothing.
- (void)data;
- (void)width;
- (void)height;
- return 1;
-}
-
-#if defined(__cplusplus) || defined(c_plusplus)
-} // extern "C"
-#endif
diff --git a/drivers/webpold/utils/quant_levels.h b/drivers/webpold/utils/quant_levels.h
deleted file mode 100644
index 4f165fd230..0000000000
--- a/drivers/webpold/utils/quant_levels.h
+++ /dev/null
@@ -1,39 +0,0 @@
-// Copyright 2011 Google Inc. All Rights Reserved.
-//
-// This code is licensed under the same terms as WebM:
-// Software License Agreement: http://www.webmproject.org/license/software/
-// Additional IP Rights Grant: http://www.webmproject.org/license/additional/
-// -----------------------------------------------------------------------------
-//
-// Alpha plane quantization utility
-//
-// Author: Vikas Arora (vikasa@google.com)
-
-#ifndef WEBP_UTILS_QUANT_LEVELS_H_
-#define WEBP_UTILS_QUANT_LEVELS_H_
-
-#include <stdlib.h>
-
-#include "../types.h"
-
-#if defined(__cplusplus) || defined(c_plusplus)
-extern "C" {
-#endif
-
-// Replace the input 'data' of size 'width'x'height' with 'num-levels'
-// quantized values. If not NULL, 'sse' will contain the sum of squared error.
-// Valid range for 'num_levels' is [2, 256].
-// Returns false in case of error (data is NULL, or parameters are invalid).
-int QuantizeLevels(uint8_t* const data, int width, int height, int num_levels,
- uint64_t* const sse);
-
-// Apply post-processing to input 'data' of size 'width'x'height' assuming
-// that the source was quantized to a reduced number of levels.
-// Returns false in case of error (data is NULL, invalid parameters, ...).
-int DequantizeLevels(uint8_t* const data, int width, int height);
-
-#if defined(__cplusplus) || defined(c_plusplus)
-} // extern "C"
-#endif
-
-#endif /* WEBP_UTILS_QUANT_LEVELS_H_ */
diff --git a/drivers/webpold/utils/rescaler.c b/drivers/webpold/utils/rescaler.c
deleted file mode 100644
index 9825dcbc5f..0000000000
--- a/drivers/webpold/utils/rescaler.c
+++ /dev/null
@@ -1,152 +0,0 @@
-// Copyright 2012 Google Inc. All Rights Reserved.
-//
-// This code is licensed under the same terms as WebM:
-// Software License Agreement: http://www.webmproject.org/license/software/
-// Additional IP Rights Grant: http://www.webmproject.org/license/additional/
-// -----------------------------------------------------------------------------
-//
-// Rescaling functions
-//
-// Author: Skal (pascal.massimino@gmail.com)
-
-#include <assert.h>
-#include <stdlib.h>
-#include "./rescaler.h"
-
-//------------------------------------------------------------------------------
-
-#if defined(__cplusplus) || defined(c_plusplus)
-extern "C" {
-#endif
-
-#define RFIX 30
-#define MULT_FIX(x,y) (((int64_t)(x) * (y) + (1 << (RFIX - 1))) >> RFIX)
-
-void WebPRescalerInit(WebPRescaler* const wrk, int src_width, int src_height,
- uint8_t* const dst, int dst_width, int dst_height,
- int dst_stride, int num_channels, int x_add, int x_sub,
- int y_add, int y_sub, int32_t* const work) {
- wrk->x_expand = (src_width < dst_width);
- wrk->src_width = src_width;
- wrk->src_height = src_height;
- wrk->dst_width = dst_width;
- wrk->dst_height = dst_height;
- wrk->dst = dst;
- wrk->dst_stride = dst_stride;
- wrk->num_channels = num_channels;
- // for 'x_expand', we use bilinear interpolation
- wrk->x_add = wrk->x_expand ? (x_sub - 1) : x_add - x_sub;
- wrk->x_sub = wrk->x_expand ? (x_add - 1) : x_sub;
- wrk->y_accum = y_add;
- wrk->y_add = y_add;
- wrk->y_sub = y_sub;
- wrk->fx_scale = (1 << RFIX) / x_sub;
- wrk->fy_scale = (1 << RFIX) / y_sub;
- wrk->fxy_scale = wrk->x_expand ?
- ((int64_t)dst_height << RFIX) / (x_sub * src_height) :
- ((int64_t)dst_height << RFIX) / (x_add * src_height);
- wrk->irow = work;
- wrk->frow = work + num_channels * dst_width;
-}
-
-void WebPRescalerImportRow(WebPRescaler* const wrk,
- const uint8_t* const src, int channel) {
- const int x_stride = wrk->num_channels;
- const int x_out_max = wrk->dst_width * wrk->num_channels;
- int x_in = channel;
- int x_out;
- int accum = 0;
- if (!wrk->x_expand) {
- int sum = 0;
- for (x_out = channel; x_out < x_out_max; x_out += x_stride) {
- accum += wrk->x_add;
- for (; accum > 0; accum -= wrk->x_sub) {
- sum += src[x_in];
- x_in += x_stride;
- }
- { // Emit next horizontal pixel.
- const int32_t base = src[x_in];
- const int32_t frac = base * (-accum);
- x_in += x_stride;
- wrk->frow[x_out] = (sum + base) * wrk->x_sub - frac;
- // fresh fractional start for next pixel
- sum = (int)MULT_FIX(frac, wrk->fx_scale);
- }
- }
- } else { // simple bilinear interpolation
- int left = src[channel], right = src[channel];
- for (x_out = channel; x_out < x_out_max; x_out += x_stride) {
- if (accum < 0) {
- left = right;
- x_in += x_stride;
- right = src[x_in];
- accum += wrk->x_add;
- }
- wrk->frow[x_out] = right * wrk->x_add + (left - right) * accum;
- accum -= wrk->x_sub;
- }
- }
- // Accumulate the new row's contribution
- for (x_out = channel; x_out < x_out_max; x_out += x_stride) {
- wrk->irow[x_out] += wrk->frow[x_out];
- }
-}
-
-uint8_t* WebPRescalerExportRow(WebPRescaler* const wrk) {
- if (wrk->y_accum <= 0) {
- int x_out;
- uint8_t* const dst = wrk->dst;
- int32_t* const irow = wrk->irow;
- const int32_t* const frow = wrk->frow;
- const int yscale = wrk->fy_scale * (-wrk->y_accum);
- const int x_out_max = wrk->dst_width * wrk->num_channels;
-
- for (x_out = 0; x_out < x_out_max; ++x_out) {
- const int frac = (int)MULT_FIX(frow[x_out], yscale);
- const int v = (int)MULT_FIX(irow[x_out] - frac, wrk->fxy_scale);
- dst[x_out] = (!(v & ~0xff)) ? v : (v < 0) ? 0 : 255;
- irow[x_out] = frac; // new fractional start
- }
- wrk->y_accum += wrk->y_add;
- wrk->dst += wrk->dst_stride;
- return dst;
- } else {
- return NULL;
- }
-}
-
-#undef MULT_FIX
-#undef RFIX
-
-//------------------------------------------------------------------------------
-// all-in-one calls
-
-int WebPRescalerImport(WebPRescaler* const wrk, int num_lines,
- const uint8_t* src, int src_stride) {
- int total_imported = 0;
- while (total_imported < num_lines && wrk->y_accum > 0) {
- int channel;
- for (channel = 0; channel < wrk->num_channels; ++channel) {
- WebPRescalerImportRow(wrk, src, channel);
- }
- src += src_stride;
- ++total_imported;
- wrk->y_accum -= wrk->y_sub;
- }
- return total_imported;
-}
-
-int WebPRescalerExport(WebPRescaler* const rescaler) {
- int total_exported = 0;
- while (WebPRescalerHasPendingOutput(rescaler)) {
- WebPRescalerExportRow(rescaler);
- ++total_exported;
- }
- return total_exported;
-}
-
-//------------------------------------------------------------------------------
-
-#if defined(__cplusplus) || defined(c_plusplus)
-} // extern "C"
-#endif
diff --git a/drivers/webpold/utils/rescaler.h b/drivers/webpold/utils/rescaler.h
deleted file mode 100644
index 9c9133d19b..0000000000
--- a/drivers/webpold/utils/rescaler.h
+++ /dev/null
@@ -1,76 +0,0 @@
-// Copyright 2012 Google Inc. All Rights Reserved.
-//
-// This code is licensed under the same terms as WebM:
-// Software License Agreement: http://www.webmproject.org/license/software/
-// Additional IP Rights Grant: http://www.webmproject.org/license/additional/
-// -----------------------------------------------------------------------------
-//
-// Rescaling functions
-//
-// Author: Skal (pascal.massimino@gmail.com)
-
-#ifndef WEBP_UTILS_RESCALER_H_
-#define WEBP_UTILS_RESCALER_H_
-
-#if defined(__cplusplus) || defined(c_plusplus)
-extern "C" {
-#endif
-
-#include "../types.h"
-
-// Structure used for on-the-fly rescaling
-typedef struct {
- int x_expand; // true if we're expanding in the x direction
- int num_channels; // bytes to jump between pixels
- int fy_scale, fx_scale; // fixed-point scaling factor
- int64_t fxy_scale; // ''
- // we need hpel-precise add/sub increments, for the downsampled U/V planes.
- int y_accum; // vertical accumulator
- int y_add, y_sub; // vertical increments (add ~= src, sub ~= dst)
- int x_add, x_sub; // horizontal increments (add ~= src, sub ~= dst)
- int src_width, src_height; // source dimensions
- int dst_width, dst_height; // destination dimensions
- uint8_t* dst;
- int dst_stride;
- int32_t* irow, *frow; // work buffer
-} WebPRescaler;
-
-// Initialize a rescaler given scratch area 'work' and dimensions of src & dst.
-void WebPRescalerInit(WebPRescaler* const wrk, int src_width, int src_height,
- uint8_t* const dst,
- int dst_width, int dst_height, int dst_stride,
- int num_channels,
- int x_add, int x_sub,
- int y_add, int y_sub,
- int32_t* const work);
-
-// Import a row of data and save its contribution in the rescaler.
-// 'channel' denotes the channel number to be imported.
-void WebPRescalerImportRow(WebPRescaler* const rescaler,
- const uint8_t* const src, int channel);
-
-// Import multiple rows over all channels, until at least one row is ready to
-// be exported. Returns the actual number of lines that were imported.
-int WebPRescalerImport(WebPRescaler* const rescaler, int num_rows,
- const uint8_t* src, int src_stride);
-
-// Return true if there is pending output rows ready.
-static WEBP_INLINE
-int WebPRescalerHasPendingOutput(const WebPRescaler* const rescaler) {
- return (rescaler->y_accum <= 0);
-}
-
-// Export one row from rescaler. Returns the pointer where output was written,
-// or NULL if no row was pending.
-uint8_t* WebPRescalerExportRow(WebPRescaler* const wrk);
-
-// Export as many rows as possible. Return the numbers of rows written.
-int WebPRescalerExport(WebPRescaler* const wrk);
-
-//------------------------------------------------------------------------------
-
-#if defined(__cplusplus) || defined(c_plusplus)
-} // extern "C"
-#endif
-
-#endif /* WEBP_UTILS_RESCALER_H_ */
diff --git a/drivers/webpold/utils/thread.c b/drivers/webpold/utils/thread.c
deleted file mode 100644
index ce89cf9dc7..0000000000
--- a/drivers/webpold/utils/thread.c
+++ /dev/null
@@ -1,247 +0,0 @@
-// Copyright 2011 Google Inc. All Rights Reserved.
-//
-// This code is licensed under the same terms as WebM:
-// Software License Agreement: http://www.webmproject.org/license/software/
-// Additional IP Rights Grant: http://www.webmproject.org/license/additional/
-// -----------------------------------------------------------------------------
-//
-// Multi-threaded worker
-//
-// Author: Skal (pascal.massimino@gmail.com)
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <assert.h>
-#include <string.h> // for memset()
-#include "./thread.h"
-
-#if defined(__cplusplus) || defined(c_plusplus)
-extern "C" {
-#endif
-
-#ifdef WEBP_USE_THREAD
-
-#if defined(_WIN32)
-
-//------------------------------------------------------------------------------
-// simplistic pthread emulation layer
-
-#include <process.h>
-
-// _beginthreadex requires __stdcall
-#define THREADFN unsigned int __stdcall
-#define THREAD_RETURN(val) (unsigned int)((DWORD_PTR)val)
-
-static int pthread_create(pthread_t* const thread, const void* attr,
- unsigned int (__stdcall *start)(void*), void* arg) {
- (void)attr;
- *thread = (pthread_t)_beginthreadex(NULL, /* void *security */
- 0, /* unsigned stack_size */
- start,
- arg,
- 0, /* unsigned initflag */
- NULL); /* unsigned *thrdaddr */
- if (*thread == NULL) return 1;
- SetThreadPriority(*thread, THREAD_PRIORITY_ABOVE_NORMAL);
- return 0;
-}
-
-static int pthread_join(pthread_t thread, void** value_ptr) {
- (void)value_ptr;
- return (WaitForSingleObject(thread, INFINITE) != WAIT_OBJECT_0 ||
- CloseHandle(thread) == 0);
-}
-
-// Mutex
-static int pthread_mutex_init(pthread_mutex_t* const mutex, void* mutexattr) {
- (void)mutexattr;
- InitializeCriticalSection(mutex);
- return 0;
-}
-
-static int pthread_mutex_lock(pthread_mutex_t* const mutex) {
- EnterCriticalSection(mutex);
- return 0;
-}
-
-static int pthread_mutex_unlock(pthread_mutex_t* const mutex) {
- LeaveCriticalSection(mutex);
- return 0;
-}
-
-static int pthread_mutex_destroy(pthread_mutex_t* const mutex) {
- DeleteCriticalSection(mutex);
- return 0;
-}
-
-// Condition
-static int pthread_cond_destroy(pthread_cond_t* const condition) {
- int ok = 1;
- ok &= (CloseHandle(condition->waiting_sem_) != 0);
- ok &= (CloseHandle(condition->received_sem_) != 0);
- ok &= (CloseHandle(condition->signal_event_) != 0);
- return !ok;
-}
-
-static int pthread_cond_init(pthread_cond_t* const condition, void* cond_attr) {
- (void)cond_attr;
- condition->waiting_sem_ = CreateSemaphore(NULL, 0, 1, NULL);
- condition->received_sem_ = CreateSemaphore(NULL, 0, 1, NULL);
- condition->signal_event_ = CreateEvent(NULL, FALSE, FALSE, NULL);
- if (condition->waiting_sem_ == NULL ||
- condition->received_sem_ == NULL ||
- condition->signal_event_ == NULL) {
- pthread_cond_destroy(condition);
- return 1;
- }
- return 0;
-}
-
-static int pthread_cond_signal(pthread_cond_t* const condition) {
- int ok = 1;
- if (WaitForSingleObject(condition->waiting_sem_, 0) == WAIT_OBJECT_0) {
- // a thread is waiting in pthread_cond_wait: allow it to be notified
- ok = SetEvent(condition->signal_event_);
- // wait until the event is consumed so the signaler cannot consume
- // the event via its own pthread_cond_wait.
- ok &= (WaitForSingleObject(condition->received_sem_, INFINITE) !=
- WAIT_OBJECT_0);
- }
- return !ok;
-}
-
-static int pthread_cond_wait(pthread_cond_t* const condition,
- pthread_mutex_t* const mutex) {
- int ok;
- // note that there is a consumer available so the signal isn't dropped in
- // pthread_cond_signal
- if (!ReleaseSemaphore(condition->waiting_sem_, 1, NULL))
- return 1;
- // now unlock the mutex so pthread_cond_signal may be issued
- pthread_mutex_unlock(mutex);
- ok = (WaitForSingleObject(condition->signal_event_, INFINITE) ==
- WAIT_OBJECT_0);
- ok &= ReleaseSemaphore(condition->received_sem_, 1, NULL);
- pthread_mutex_lock(mutex);
- return !ok;
-}
-
-#else // _WIN32
-# define THREADFN void*
-# define THREAD_RETURN(val) val
-#endif
-
-//------------------------------------------------------------------------------
-
-static THREADFN WebPWorkerThreadLoop(void *ptr) { // thread loop
- WebPWorker* const worker = (WebPWorker*)ptr;
- int done = 0;
- while (!done) {
- pthread_mutex_lock(&worker->mutex_);
- while (worker->status_ == OK) { // wait in idling mode
- pthread_cond_wait(&worker->condition_, &worker->mutex_);
- }
- if (worker->status_ == WORK) {
- if (worker->hook) {
- worker->had_error |= !worker->hook(worker->data1, worker->data2);
- }
- worker->status_ = OK;
- } else if (worker->status_ == NOT_OK) { // finish the worker
- done = 1;
- }
- // signal to the main thread that we're done (for Sync())
- pthread_cond_signal(&worker->condition_);
- pthread_mutex_unlock(&worker->mutex_);
- }
- return THREAD_RETURN(NULL); // Thread is finished
-}
-
-// main thread state control
-static void WebPWorkerChangeState(WebPWorker* const worker,
- WebPWorkerStatus new_status) {
- // no-op when attempting to change state on a thread that didn't come up
- if (worker->status_ < OK) return;
-
- pthread_mutex_lock(&worker->mutex_);
- // wait for the worker to finish
- while (worker->status_ != OK) {
- pthread_cond_wait(&worker->condition_, &worker->mutex_);
- }
- // assign new status and release the working thread if needed
- if (new_status != OK) {
- worker->status_ = new_status;
- pthread_cond_signal(&worker->condition_);
- }
- pthread_mutex_unlock(&worker->mutex_);
-}
-
-#endif
-
-//------------------------------------------------------------------------------
-
-void WebPWorkerInit(WebPWorker* const worker) {
- memset(worker, 0, sizeof(*worker));
- worker->status_ = NOT_OK;
-}
-
-int WebPWorkerSync(WebPWorker* const worker) {
-#ifdef WEBP_USE_THREAD
- WebPWorkerChangeState(worker, OK);
-#endif
- assert(worker->status_ <= OK);
- return !worker->had_error;
-}
-
-int WebPWorkerReset(WebPWorker* const worker) {
- int ok = 1;
- worker->had_error = 0;
- if (worker->status_ < OK) {
-#ifdef WEBP_USE_THREAD
- if (pthread_mutex_init(&worker->mutex_, NULL) ||
- pthread_cond_init(&worker->condition_, NULL)) {
- return 0;
- }
- pthread_mutex_lock(&worker->mutex_);
- ok = !pthread_create(&worker->thread_, NULL, WebPWorkerThreadLoop, worker);
- if (ok) worker->status_ = OK;
- pthread_mutex_unlock(&worker->mutex_);
-#else
- worker->status_ = OK;
-#endif
- } else if (worker->status_ > OK) {
- ok = WebPWorkerSync(worker);
- }
- assert(!ok || (worker->status_ == OK));
- return ok;
-}
-
-void WebPWorkerLaunch(WebPWorker* const worker) {
-#ifdef WEBP_USE_THREAD
- WebPWorkerChangeState(worker, WORK);
-#else
- if (worker->hook)
- worker->had_error |= !worker->hook(worker->data1, worker->data2);
-#endif
-}
-
-void WebPWorkerEnd(WebPWorker* const worker) {
- if (worker->status_ >= OK) {
-#ifdef WEBP_USE_THREAD
- WebPWorkerChangeState(worker, NOT_OK);
- pthread_join(worker->thread_, NULL);
- pthread_mutex_destroy(&worker->mutex_);
- pthread_cond_destroy(&worker->condition_);
-#else
- worker->status_ = NOT_OK;
-#endif
- }
- assert(worker->status_ == NOT_OK);
-}
-
-//------------------------------------------------------------------------------
-
-#if defined(__cplusplus) || defined(c_plusplus)
-} // extern "C"
-#endif
diff --git a/drivers/webpold/utils/thread.h b/drivers/webpold/utils/thread.h
deleted file mode 100644
index 3191890b76..0000000000
--- a/drivers/webpold/utils/thread.h
+++ /dev/null
@@ -1,86 +0,0 @@
-// Copyright 2011 Google Inc. All Rights Reserved.
-//
-// This code is licensed under the same terms as WebM:
-// Software License Agreement: http://www.webmproject.org/license/software/
-// Additional IP Rights Grant: http://www.webmproject.org/license/additional/
-// -----------------------------------------------------------------------------
-//
-// Multi-threaded worker
-//
-// Author: Skal (pascal.massimino@gmail.com)
-
-#ifndef WEBP_UTILS_THREAD_H_
-#define WEBP_UTILS_THREAD_H_
-
-#if defined(__cplusplus) || defined(c_plusplus)
-extern "C" {
-#endif
-
-#if WEBP_USE_THREAD
-
-#if defined(_WIN32)
-
-#include <windows.h>
-typedef HANDLE pthread_t;
-typedef CRITICAL_SECTION pthread_mutex_t;
-typedef struct {
- HANDLE waiting_sem_;
- HANDLE received_sem_;
- HANDLE signal_event_;
-} pthread_cond_t;
-
-#else
-
-#include <pthread.h>
-
-#endif /* _WIN32 */
-#endif /* WEBP_USE_THREAD */
-
-// State of the worker thread object
-typedef enum {
- NOT_OK = 0, // object is unusable
- OK, // ready to work
- WORK // busy finishing the current task
-} WebPWorkerStatus;
-
-// Function to be called by the worker thread. Takes two opaque pointers as
-// arguments (data1 and data2), and should return false in case of error.
-typedef int (*WebPWorkerHook)(void*, void*);
-
-// Synchronize object used to launch job in the worker thread
-typedef struct {
-#if WEBP_USE_THREAD
- pthread_mutex_t mutex_;
- pthread_cond_t condition_;
- pthread_t thread_;
-#endif
- WebPWorkerStatus status_;
- WebPWorkerHook hook; // hook to call
- void* data1; // first argument passed to 'hook'
- void* data2; // second argument passed to 'hook'
- int had_error; // return value of the last call to 'hook'
-} WebPWorker;
-
-// Must be called first, before any other method.
-void WebPWorkerInit(WebPWorker* const worker);
-// Must be called initialize the object and spawn the thread. Re-entrant.
-// Will potentially launch the thread. Returns false in case of error.
-int WebPWorkerReset(WebPWorker* const worker);
-// Make sure the previous work is finished. Returns true if worker->had_error
-// was not set and not error condition was triggered by the working thread.
-int WebPWorkerSync(WebPWorker* const worker);
-// Trigger the thread to call hook() with data1 and data2 argument. These
-// hook/data1/data2 can be changed at any time before calling this function,
-// but not be changed afterward until the next call to WebPWorkerSync().
-void WebPWorkerLaunch(WebPWorker* const worker);
-// Kill the thread and terminate the object. To use the object again, one
-// must call WebPWorkerReset() again.
-void WebPWorkerEnd(WebPWorker* const worker);
-
-//------------------------------------------------------------------------------
-
-#if defined(__cplusplus) || defined(c_plusplus)
-} // extern "C"
-#endif
-
-#endif /* WEBP_UTILS_THREAD_H_ */
diff --git a/drivers/webpold/utils/utils.c b/drivers/webpold/utils/utils.c
deleted file mode 100644
index 673b7e284c..0000000000
--- a/drivers/webpold/utils/utils.c
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright 2012 Google Inc. All Rights Reserved.
-//
-// This code is licensed under the same terms as WebM:
-// Software License Agreement: http://www.webmproject.org/license/software/
-// Additional IP Rights Grant: http://www.webmproject.org/license/additional/
-// -----------------------------------------------------------------------------
-//
-// Misc. common utility functions
-//
-// Author: Skal (pascal.massimino@gmail.com)
-
-#include <stdlib.h>
-#include "./utils.h"
-
-#if defined(__cplusplus) || defined(c_plusplus)
-extern "C" {
-#endif
-
-//------------------------------------------------------------------------------
-// Checked memory allocation
-
-static int CheckSizeArguments(uint64_t nmemb, size_t size) {
- const uint64_t total_size = nmemb * size;
- if (nmemb == 0) return 1;
- if ((uint64_t)size > WEBP_MAX_ALLOCABLE_MEMORY / nmemb) return 0;
- if (total_size != (size_t)total_size) return 0;
- return 1;
-}
-
-void* WebPSafeMalloc(uint64_t nmemb, size_t size) {
- if (!CheckSizeArguments(nmemb, size)) return NULL;
- return malloc((size_t)(nmemb * size));
-}
-
-void* WebPSafeCalloc(uint64_t nmemb, size_t size) {
- if (!CheckSizeArguments(nmemb, size)) return NULL;
- return calloc((size_t)nmemb, size);
-}
-
-//------------------------------------------------------------------------------
-
-#if defined(__cplusplus) || defined(c_plusplus)
-} // extern "C"
-#endif
diff --git a/drivers/webpold/utils/utils.h b/drivers/webpold/utils/utils.h
deleted file mode 100644
index 316ac90612..0000000000
--- a/drivers/webpold/utils/utils.h
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright 2012 Google Inc. All Rights Reserved.
-//
-// This code is licensed under the same terms as WebM:
-// Software License Agreement: http://www.webmproject.org/license/software/
-// Additional IP Rights Grant: http://www.webmproject.org/license/additional/
-// -----------------------------------------------------------------------------
-//
-// Misc. common utility functions
-//
-// Author: Skal (pascal.massimino@gmail.com)
-
-#ifndef WEBP_UTILS_UTILS_H_
-#define WEBP_UTILS_UTILS_H_
-
-#include "../types.h"
-
-#if defined(__cplusplus) || defined(c_plusplus)
-extern "C" {
-#endif
-
-//------------------------------------------------------------------------------
-// Memory allocation
-
-// This is the maximum memory amount that libwebp will ever try to allocate.
-#define WEBP_MAX_ALLOCABLE_MEMORY (1ULL << 40)
-
-// size-checking safe malloc/calloc: verify that the requested size is not too
-// large, or return NULL. You don't need to call these for constructs like
-// malloc(sizeof(foo)), but only if there's picture-dependent size involved
-// somewhere (like: malloc(num_pixels * sizeof(*something))). That's why this
-// safe malloc() borrows the signature from calloc(), pointing at the dangerous
-// underlying multiply involved.
-void* WebPSafeMalloc(uint64_t nmemb, size_t size);
-// Note that WebPSafeCalloc() expects the second argument type to be 'size_t'
-// in order to favor the "calloc(num_foo, sizeof(foo))" pattern.
-void* WebPSafeCalloc(uint64_t nmemb, size_t size);
-
-//------------------------------------------------------------------------------
-
-#if defined(__cplusplus) || defined(c_plusplus)
-} // extern "C"
-#endif
-
-#endif /* WEBP_UTILS_UTILS_H_ */
diff --git a/main/input_default.cpp b/main/input_default.cpp
index 4fcb450bce..945898f1f3 100644
--- a/main/input_default.cpp
+++ b/main/input_default.cpp
@@ -30,6 +30,7 @@
#include "servers/visual_server.h"
#include "os/os.h"
#include "input_map.h"
+#include "scene/resources/texture.h"
void InputDefault::SpeedTrack::update(const Vector2& p_delta_p) {
@@ -101,7 +102,7 @@ bool InputDefault::is_action_pressed(const StringName& p_action) {
const List<InputEvent> *alist = InputMap::get_singleton()->get_action_list(p_action);
if (!alist)
- return NULL;
+ return false;
for (const List<InputEvent>::Element *E=alist->front();E;E=E->next()) {
@@ -220,18 +221,18 @@ void InputDefault::joy_connection_changed(int p_idx, bool p_connected, String p_
};
};
js.uid = uidname;
- //printf("looking for mappings for guid %ls\n", uidname.c_str());
+ js.connected = true;
int mapping = fallback_mapping;
for (int i=0; i < map_db.size(); i++) {
if (js.uid == map_db[i].uid) {
mapping = i;
js.name = map_db[i].name;
- //printf("found mapping\n");
};
};
js.mapping = mapping;
}
else {
+ js.connected = false;
for (int i = 0; i < JOY_BUTTON_MAX; i++) {
if (i < JOY_AXIS_MAX)
@@ -463,9 +464,11 @@ void InputDefault::set_custom_mouse_cursor(const RES& p_cursor,const Vector2& p_
set_mouse_mode(MOUSE_MODE_VISIBLE);
VisualServer::get_singleton()->cursor_set_visible(false);
} else {
+ Ref<AtlasTexture> atex = custom_cursor;
+ Rect2 region = atex.is_valid() ? atex->get_region() : Rect2();
set_mouse_mode(MOUSE_MODE_HIDDEN);
VisualServer::get_singleton()->cursor_set_visible(true);
- VisualServer::get_singleton()->cursor_set_texture(custom_cursor->get_rid(),p_hotspot);
+ VisualServer::get_singleton()->cursor_set_texture(custom_cursor->get_rid(),p_hotspot, 0, region);
VisualServer::get_singleton()->cursor_set_pos(get_mouse_pos());
}
}
@@ -1039,3 +1042,15 @@ bool InputDefault::is_joy_mapped(int p_device) {
String InputDefault::get_joy_guid_remapped(int p_device) const {
return joy_names[p_device].uid;
}
+
+Array InputDefault::get_connected_joysticks() {
+ Array ret;
+ Map<int, Joystick>::Element *elem = joy_names.front();
+ while (elem) {
+ if (elem->get().connected) {
+ ret.push_back(elem->key());
+ }
+ elem = elem->next();
+ }
+ return ret;
+}
diff --git a/main/input_default.h b/main/input_default.h
index c7fef8374c..644af15e3b 100644
--- a/main/input_default.h
+++ b/main/input_default.h
@@ -75,6 +75,7 @@ class InputDefault : public Input {
struct Joystick {
StringName name;
StringName uid;
+ bool connected;
bool last_buttons[JOY_BUTTON_MAX + 19]; //apparently SDL specifies 35 possible buttons on android
float last_axis[JOY_AXIS_MAX];
float filter;
@@ -93,6 +94,7 @@ class InputDefault : public Input {
last_buttons[i] = false;
}
+ connected = false;
last_hat = HAT_MASK_CENTER;
filter = 0.01f;
mapping = -1;
@@ -168,6 +170,7 @@ public:
virtual float get_joy_axis(int p_device,int p_axis);
String get_joy_name(int p_idx);
+ virtual Array get_connected_joysticks();
virtual Vector2 get_joy_vibration_strength(int p_device);
virtual float get_joy_vibration_duration(int p_device);
virtual uint64_t get_joy_vibration_timestamp(int p_device);
diff --git a/main/main.cpp b/main/main.cpp
index 41a032842d..aa8540632f 100644
--- a/main/main.cpp
+++ b/main/main.cpp
@@ -101,6 +101,7 @@ static bool init_fullscreen=false;
static bool init_use_custom_pos=false;
static bool debug_collisions=false;
static bool debug_navigation=false;
+static int frame_delay=0;
static Vector2 init_custom_pos;
static int video_driver_idx=-1;
static int audio_driver_idx=-1;
@@ -488,7 +489,7 @@ Error Main::setup(const char *execpath,int argc, char *argv[],bool p_second_phas
if (I->next()) {
- OS::get_singleton()->set_frame_delay(I->next()->get().to_int());
+ frame_delay=I->next()->get().to_int();
N=I->next()->next();
} else {
goto error;
@@ -805,12 +806,19 @@ Error Main::setup(const char *execpath,int argc, char *argv[],bool p_second_phas
OS::get_singleton()->set_screen_orientation(OS::SCREEN_LANDSCAPE);
}
+
OS::get_singleton()->set_iterations_per_second(GLOBAL_DEF("physics/fixed_fps",60));
- OS::get_singleton()->set_target_fps(GLOBAL_DEF("application/target_fps",0));
+ OS::get_singleton()->set_target_fps(GLOBAL_DEF("debug/force_fps",0));
if (!OS::get_singleton()->_verbose_stdout) //overrided
OS::get_singleton()->_verbose_stdout=GLOBAL_DEF("debug/verbose_stdout",false);
+ if (frame_delay==0) {
+ frame_delay=GLOBAL_DEF("application/frame_delay_msec",0);
+ }
+
+ OS::get_singleton()->set_frame_delay(frame_delay);
+
message_queue = memnew( MessageQueue );
Globals::get_singleton()->register_global_defaults();
@@ -1496,6 +1504,8 @@ bool Main::start() {
if (project_manager_request || (script=="" && test=="" && game_path=="" && !editor)) {
ProjectManager *pmanager = memnew( ProjectManager );
+ ProgressDialog *progress_dialog = memnew( ProgressDialog );
+ pmanager->add_child(progress_dialog);
sml->get_root()->add_child(pmanager);
OS::get_singleton()->set_context(OS::CONTEXT_PROJECTMAN);
}
diff --git a/main/splash.h b/main/splash.h
index 832f504288..b96aff8754 100644
--- a/main/splash.h
+++ b/main/splash.h
@@ -29,12 +29,1394 @@
#ifndef BOOT_SPLASH_H
#define BOOT_SPLASH_H
-static const unsigned char boot_splash_png[]={
-0x89,0x50,0x4e,0x47,0xd,0xa,0x1a,0xa,0x0,0x0,0x0,0xd,0x49,0x48,0x44,0x52,0x0,0x0,0x0,0xef,0x0,0x0,0x1,0x3,0x8,0x6,0x0,0x0,0x0,0xdd,0x81,0x53,0xf4,0x0,0x0,0x0,0x9,0x70,0x48,0x59,0x73,0x0,0x0,0x32,0xdf,0x0,0x0,0x32,0xdf,0x1,0x17,0xbe,0xe4,0xb,0x0,0x0,0x0,0x7,0x74,0x49,0x4d,0x45,0x7,0xde,0x1,0x19,0x13,0x8,0x19,0x46,0x43,0xd9,0xbb,0x0,0x0,0x0,0x19,0x74,0x45,0x58,0x74,0x43,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x0,0x43,0x72,0x65,0x61,0x74,0x65,0x64,0x20,0x77,0x69,0x74,0x68,0x20,0x47,0x49,0x4d,0x50,0x57,0x81,0xe,0x17,0x0,0x0,0x20,0x0,0x49,0x44,0x41,0x54,0x78,0xda,0xed,0x9d,0x79,0x78,0x54,0xd5,0xf9,0xc7,0x3f,0xef,0x9d,0x49,0xc2,0xe,0xb2,0xb9,0xaf,0xb8,0x2f,0x3f,0xb5,0xa8,0xb4,0xa2,0x66,0x66,0x2,0x4,0xea,0x5a,0xad,0x5a,0x6d,0xb5,0x2e,0xad,0x56,0x24,0x1b,0x4,0xb5,0x5a,0x2b,0xb6,0x6a,0x55,0x2,0x9,0x9,0xae,0x5d,0xd4,0x5a,0x6b,0x15,0xad,0x15,0x15,0x48,0x48,0x66,0x26,0x50,0x10,0x17,0xa,0x2a,0x56,0x51,0x11,0xd7,0x8a,0xec,0x90,0x0,0x59,0x66,0xee,0xfb,0xfb,0x63,0x82,0x4,0x32,0x9,0x99,0x9b,0x99,0x64,0x92,0x9c,0xcf,0xf3,0xcc,0x43,0xb8,0x33,0xf7,0xdc,0x73,0xde,0x73,0xbe,0xe7,0xbc,0xe7,0xdc,0xb3,0x80,0xc1,0x60,0x30,0x18,0xc,0x6,0x83,0xc1,0x60,0x30,0x18,0xc,0x6,0x83,0xc1,0x60,0x30,0x18,0xc,0x6,0x83,0xc1,0x60,0x30,0x18,0xc,0x6,0x83,0xc1,0x60,0x30,0x18,0xc,0x6,0x83,0xc1,0x60,0x30,0x18,0xc,0x6,0x83,0xc1,0x60,0x30,0x18,0xc,0x6,0x83,0xc1,0x60,0x30,0x18,0xc,0x6,0x83,0xc1,0x60,0x30,0x18,0xc,0x6,0x83,0xc1,0x60,0x30,0x18,0xc,0x6,0x83,0xc1,0x60,0x30,0x18,0xc,0x6,0x83,0xc1,0x60,0x30,0x18,0xc,0x6,0x83,0xc1,0x60,0x30,0x18,0xc,0x6,0x83,0xc1,0x60,0x30,0x18,0xc,0x6,0x83,0xc1,0x60,0x30,0x18,0xc,0x6,0x83,0xc1,0x60,0x30,0x18,0xc,0x6,0x83,0xc1,0x60,0x30,0x18,0xc,0x86,0x16,0x19,0x53,0xe0,0xdf,0xaf,0xbd,0x9e,0x95,0x71,0x5f,0x79,0x2f,0x63,0xf1,0xce,0x87,0x18,0x13,0x24,0x81,0x50,0xa7,0x96,0xa,0x92,0x76,0xb4,0xc0,0x39,0xa0,0xe7,0x0,0xe7,0x0,0x43,0x4a,0xf3,0xbd,0x9,0x17,0x55,0x66,0x81,0xdf,0x7,0x52,0xe,0x2c,0x5,0x16,0x0,0xb,0xdc,0x96,0x1d,0x7c,0x6d,0x62,0xc6,0x16,0x93,0x33,0x46,0xbc,0x86,0x28,0x8c,0x9b,0x56,0xe9,0xb2,0x35,0xec,0x1,0xb9,0x0,0x38,0xf,0x38,0xa2,0x69,0xee,0xc8,0x43,0xa5,0x93,0x3c,0x13,0x12,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,0x97,0xa6,0xd9,0x32,0x37,0x66,0xaa,0x7f,0x5f,0x11,0xb9,0x10,0xb8,0x44,0xc1,0xd7,0xca,0xf2,0xf9,0xd,0xe1,0xf0,0x1b,0x46,0xbc,0x5d,0x88,0xba,0x2a,0xde,0x4f,0xeb,0xcd,0x9b,0x8,0x67,0xb4,0xf2,0x96,0x14,0x60,0x2c,0x30,0x96,0xb0,0xf5,0x48,0x66,0x41,0x60,0xa1,0x20,0xff,0xc,0xdb,0xe1,0x7f,0xcd,0xbf,0x25,0xe3,0x4b,0x80,0x31,0xd3,0x2,0xbd,0x51,0x67,0xa3,0xaa,0x16,0xe1,0x30,0xb8,0x4a,0x80,0x23,0x88,0xcc,0xb4,0x1a,0x46,0x8c,0xaf,0x67,0x3a,0xda,0xa4,0xc0,0xa7,0xc0,0x2a,0x60,0x55,0x24,0x3d,0x8e,0x18,0x31,0x66,0x5a,0xa0,0x67,0xd9,0x24,0xef,0xe,0x80,0xb1,0x5,0xfe,0x43,0xc0,0xba,0x48,0xd1,0x4b,0x80,0x91,0x10,0x73,0xe5,0x98,0x53,0x7a,0x4b,0x46,0x9d,0x11,0x6f,0x17,0x22,0x38,0xc5,0xab,0x63,0xb,0x2,0x13,0xd4,0xd9,0xc2,0x7b,0x17,0xe0,0x51,0xd4,0x63,0x59,0x56,0x51,0x66,0x41,0xe0,0x2d,0xe0,0x6d,0x94,0x73,0x5a,0x74,0xdf,0x5a,0x72,0xf,0x6f,0x19,0x15,0x6,0xb2,0x77,0xb5,0x32,0xa5,0x62,0x91,0x76,0x30,0xe8,0x91,0x2a,0xdf,0x89,0x79,0xa7,0xb0,0x8f,0x4,0xfa,0x75,0x80,0xd9,0xb6,0xec,0x14,0xe7,0xce,0x8f,0x28,0xab,0x40,0x56,0xd9,0xd4,0x7e,0x59,0x36,0x39,0x33,0x1e,0xaf,0xae,0x7a,0x88,0xf2,0x7a,0x66,0x41,0xe0,0xdf,0xc0,0xe9,0xa,0xa7,0xb7,0xe1,0xbd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x46,0x2b,0xf6,0x8b,0x2e,0x29,0x9e,0xfe,0x75,0x49,0x71,0xe1,0x35,0xc5,0xc5,0x85,0xaf,0x37,0x15,0x63,0xee,0x15,0xa0,0xff,0x25,0xb2,0x48,0x7c,0x45,0x83,0x68,0x46,0x21,0x2c,0x9a,0x90,0x9d,0x97,0x1d,0x25,0xb8,0xf3,0x80,0xcb,0xb2,0xb2,0xf3,0x2e,0x6,0x9d,0x43,0x64,0x77,0x8a,0xa5,0xc0,0x49,0x28,0x4f,0x67,0x65,0xe7,0xdd,0x9c,0x9d,0x3d,0xd1,0x2d,0x96,0xcc,0x2,0x26,0x3,0xab,0x80,0xaf,0x80,0x1b,0xc3,0xb6,0x7c,0x38,0x61,0x42,0x7e,0xff,0xa6,0xae,0xfd,0x44,0xb7,0x2b,0xa4,0x4f,0xa,0x3c,0x42,0x64,0x93,0x82,0x52,0x22,0x87,0xa3,0x15,0x66,0x65,0xe7,0xc5,0xb4,0x9b,0x63,0x56,0x76,0xde,0x3d,0xa8,0xbe,0x0,0x9c,0xd4,0x10,0x4e,0xf,0xe0,0x4e,0x51,0x96,0x5e,0x77,0xfd,0x2f,0xf6,0x7c,0xaf,0x7f,0x31,0xf0,0xf3,0x9,0xd9,0x79,0x23,0x10,0x59,0x4a,0x64,0x17,0x89,0xca,0x48,0x1c,0xe4,0x1e,0xcb,0x96,0xe7,0x73,0x73,0x73,0x25,0xca,0x33,0x2e,0x15,0xb4,0x2,0xc8,0x20,0x32,0xa2,0xff,0x5f,0x81,0x5c,0x51,0xd,0x88,0xa5,0x63,0x81,0x9f,0x8b,0xe8,0x9e,0xd,0xc3,0xcf,0x45,0x38,0x7e,0x8f,0x6b,0xe7,0x2,0xd7,0x64,0x65,0xe5,0x7d,0x1f,0xe5,0xd,0x60,0x30,0x91,0x81,0xc6,0xfd,0x80,0xdf,0x87,0x6d,0x79,0x71,0xfc,0xc4,0x89,0x4d,0xe6,0x22,0x64,0x67,0xe7,0x9e,0x14,0xb6,0xe5,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bc,0xf5,0x70,0x61,0x61,0x7d,0x77,0xe9,0xf3,0xa,0x6,0x43,0x1c,0xc9,0xca,0xce,0xfb,0x1f,0x30,0x30,0x54,0x9f,0xd6,0xf3,0x91,0x47,0xee,0x37,0xc7,0x61,0x1a,0xb7,0xd9,0xd0,0x19,0xb8,0xe9,0xa6,0xdb,0x7a,0x10,0x99,0xfd,0xe4,0x37,0xc2,0x35,0xe2,0x35,0x24,0x21,0x37,0xe7,0xe5,0xd,0xce,0xc9,0xc9,0xdd,0x6d,0x20,0x6f,0xca,0x94,0x29,0xe2,0x4e,0xa9,0x7d,0xe,0xe8,0x21,0xc2,0x4d,0xc6,0x4a,0xa6,0xcf,0x6b,0x48,0xc6,0x1a,0xdf,0xe6,0x5e,0x5b,0xe5,0xfa,0xac,0xec,0xbc,0xb9,0x44,0x16,0x58,0xf4,0xdd,0xb0,0x71,0x4b,0x3a,0x70,0x14,0x22,0xc5,0xa1,0xfa,0x9a,0x2f,0x8c,0x95,0x8c,0x78,0xd,0x49,0x88,0x86,0xf5,0x5e,0xb1,0x64,0xd,0x30,0x8e,0xc8,0x7a,0xdf,0xed,0xc0,0xbb,0x82,0xe4,0x17,0xcf,0x98,0x3e,0xdb,0x58,0xa8,0x7d,0xf8,0x7f,0x49,0xf1,0x1a,0x6f,0x4b,0xd5,0x18,0xc6,0x0,0x0,0x0,0x0,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
+static const unsigned char boot_splash_png[] = {
+ 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d,
+ 0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0xef, 0x00, 0x00, 0x01, 0x03,
+ 0x08, 0x06, 0x00, 0x00, 0x00, 0xdd, 0x81, 0x53, 0xf4, 0x00, 0x00, 0x00,
+ 0x09, 0x70, 0x48, 0x59, 0x73, 0x00, 0x00, 0x32, 0xdf, 0x00, 0x00, 0x32,
+ 0xd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0x30, 0x18, 0x0c, 0x06, 0x83, 0xc1, 0x60, 0x30, 0x18,
+ 0x0c, 0x06, 0x83, 0xc1, 0x60, 0x30, 0x18, 0x0c, 0x06, 0x83, 0xc1, 0x60,
+ 0x30, 0x18, 0x0c, 0x06, 0x83, 0xc1, 0x60, 0x30, 0x18, 0x0c, 0x06, 0x83,
+ 0xc1, 0x60, 0x30, 0x18, 0x0c, 0x06, 0x83, 0xc1, 0x60, 0x30, 0x18, 0x0c,
+ 0x06, 0x83, 0xc1, 0x60, 0x30, 0x18, 0x0c, 0x06, 0x83, 0xc1, 0x60, 0x30,
+ 0x18, 0x0c, 0x06, 0x83, 0xc1, 0x60, 0x30, 0x18, 0x0c, 0x06, 0x83, 0xc1,
+ 0x60, 0x30, 0x18, 0x0c, 0x06, 0x83, 0xc1, 0x60, 0x30, 0x18, 0x0c, 0x06,
+ 0x83, 0xc1, 0x60, 0x30, 0x18, 0x0c, 0x06, 0x83, 0xc1, 0x60, 0x30, 0x18,
+ 0x0c, 0x06, 0x83, 0xc1, 0x60, 0x30, 0x18, 0x0c, 0x06, 0x83, 0xc1, 0x60,
+ 0x30, 0x18, 0x0c, 0x06, 0x83, 0xc1, 0x60, 0x30, 0x18, 0x0c, 0x86, 0x16,
+ 0x19, 0x53, 0xe0, 0xdf, 0xaf, 0xbd, 0x9e, 0x95, 0x71, 0x5f, 0x79, 0x2f,
+ 0x63, 0xf1, 0xce, 0x87, 0x18, 0x13, 0x24, 0x81, 0x50, 0xa7, 0x96, 0x0a,
+ 0x92, 0x76, 0xb4, 0xc0, 0x39, 0xa0, 0xe7, 0x00, 0xe7, 0x00, 0x43, 0x4a,
+ 0xf3, 0xbd, 0x09, 0x17, 0x55, 0x66, 0x81, 0xdf, 0x07, 0x52, 0x0e, 0x2c,
+ 0x05, 0x16, 0x00, 0x0b, 0xdc, 0x96, 0x1d, 0x7c, 0x6d, 0x62, 0xc6, 0x16,
+ 0x93, 0x33, 0x46, 0xbc, 0x86, 0x28, 0x8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ned char app_icon_png[]={
-0x89,0x50,0x4e,0x47,0x0d,0x0a,0x1a,0x0a,0x0,0x0,0x0,0x0d,0x49,0x48,0x44,0x52,0x0,0x0,0x01,0x0,0x0,0x0,0x01,0x0,0x08,0x06,0x0,0x0,0x0,0x5c,0x72,0xa8,0x66,0x0,0x0,0x0,0x06,0x62,0x4b,0x47,0x44,0x0,0xff,0x0,0xff,0x0,0xff,0xa0,0xbd,0xa7,0x93,0x0,0x0,0x0,0x09,0x70,0x48,0x59,0x73,0x0,0x0,0x0d,0xd7,0x0,0x0,0x0d,0xd7,0x01,0x42,0x28,0x9b,0x78,0x0,0x0,0x20,0x0,0x49,0x44,0x41,0x54,0x78,0xda,0xed,0x9d,0x79,0x9c,0x54,0xd5,0x99,0xf7,0x7f,0xe7,0xde,0x5b,0x7b,0x55,0x57,0xf5,0xbe,0x77,0x43,0x37,0x6b,0xb3,0x8b,0x20,0x8b,0x22,0x2e,0xd1,0x98,0x31,0xd1,0xc4,0x84,0x44,0x07,0xd0,0x06,0x9d,0x64,0x26,0xaf,0x8e,0x89,0x79,0x67,0x46,0xf3,0x26,0xa2,0x93,0x65,0x7c,0xe7,0xcd,0x32,0x8e,0x66,0x24,0x09,0x69,0x40,0x8d,0x19,0x26,0x89,0x21,0x2e,0xb8,0x6f,0x80,0x88,0x82,0xa0,0xec,0x74,0x43,0xd3,0xd0,0x6b,0xf5,0x56,0xfb,0x7a,0xef,0x3d,0xef,0x1f,0x8d,0xad,0xd0,0x5b,0x55,0x77,0xed,0xf5,0x7c,0x3f,0x1f,0x3e,0x68,0x51,0x55,0xe7,0xd6,0x59,0x7e,0xe7,0x39,0xcf,0x79,0xce,0x73,0x0,0x82,0x20,0x08,0x82,0x20,0x08,0x82,0x20,0x08,0x82,0x20,0xb2,0x01,0x96,0xce,0x0f,0xbf,0x6d,0xe3,0x46,0xab,0x47,0xa3,0xd1,0xea,0x0,0x0b,0x67,0xcc,0xa4,0xaa,0xaa,0x8e,0x33,0x66,0xa3,0x66,0x25,0xe2,0x3a,0x68,0x38,0x0f,0x88,0xa2,0xe8,0x57,0x65,0xd9,0xc9,0xb5,0xda,0x90,0x28,0x8a,0x6e,0x8d,0x46,0xe3,0x5d,0xb5,0x6a,0x55,0x88,0x04,0x20,0x0e,0x34,0x34,0x34,0xd8,0x24,0xc6,0x96,0x73,0x60,0x16,0x38,0x9f,0x2e,0x70,0x3e,0x93,0x33,0x36,0x03,0x40,0x2e,0x75,0x47,0x22,0x35,0x46,0x12,0x93,0xc1,0x79,0x33,0x07,0x8e,0x0a,0x9c,0x9f,0xe0,0xc0,0x71,0xae,0xaa,0x1f,0xac,0x59,0xbf,0xfe,0x08,0x63,0x8c,0x93,0x0,0x44,0xc1,0xc6,0x8d,0x1b,0x8d,0x26,0x8d,0xe6,0x6a,0x15,0x58,0xc9,0x18,0x5b,0x09,0x60,0x3e,0x0,0x91,0x7a,0x19,0x91,0x86,0x74,0x83,0xb1,0xb7,0x39,0xf0,0x16,0x53,0x94,0xd7,0xd6,0xac,0x5f,0x7f,0x82,0x04,0x60,0x18,0xde,0xdc,0xb0,0x41,0x3a,0x57,0x5d,0x7d,0x83,0x0,0xac,0xe1,0xc0,0x17,0x01,0xe8,0xa9,0xef,0x10,0x19,0x07,0xe7,0xc7,0xc0,0xd8,0x36,0x41,0x51,0x1a,0xfe,0xf6,0xce,0x3b,0x5b,0xb2,0x5e,0x0,0xb6,0x6d,0xdc,0x68,0x0d,0x6a,0xb5,0xdf,0x06,0x70,0x27,0x80,0xc9,0xd4,0x43,0x88,0x2c,0x21,0x04,0xce,0x5f,0xe0,0x9c,0xff,0x7c,0xed,0xfa,0xf5,0xbb,0xb2,0x4e,0x0,0x9e,0xd9,0xb4,0xa9,0x4c,0x61,0xec,0x9f,0x39,0x63,0xeb,0x01,0x98,0xa8,0x3f,0x10,0x59,0x6c,0x15,0x1c,0xe0,0x8c,0xfd,0x74,0xcd,0x1d,0x77,0xfc,0x31,0xd1,0xfe,0x82,0x84,0x0b,0xc0,0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xeb,0x03,0x13,0xfd,0x22,0x21,0x56,0x4f,0xf4,0x64,0x43,0xc3,0xe7,0x54,0xce,0x77,0xd0,0xe0,0x27,0x88,0xb8,0x73,0x8b,0x04,0x6c,0xdb,0xb6,0x6d,0x9b,0x36,0x25,0x2c,0x80,0xad,0x9b,0x36,0x5d,0xce,0x04,0xe1,0x15,0x90,0xa7,0x9f,0x20,0x12,0x07,0xe7,0x7f,0xd5,0x99,0xcd,0x5f,0x59,0xb5,0x6a,0x95,0x92,0x34,0x0b,0xe0,0xc9,0x4d,0x9b,0xe6,0x31,0x41,0x78,0x9e,0x06,0x3f,0x41,0x24,0xda,0x21,0xc0,0xbe,0x14,0xf4,0x7a,0x1f,0x4f,0xda,0x12,0xe0,0x99,0x4d,0x9b,0xca,0x98,0x20,0xfc,0x05,0x80,0x95,0x5a,0x83,0x20,0x92,0xc2,0x37,0x9f,0x6c,0x68,0xf8,0xe7,0x84,0x2f,0x01,0xb6,0x6d,0xdb,0xa6,0x0d,0x7a,0xbd,0xbb,0x0,0x2c,0xa2,0x36,0x20,0x88,0xe4,0x2e,0x06,0x0,0x7c,0x65,0x4d,0x7d,0xfd,0x5f,0x12,0x66,0x01,0x04,0x7d,0xbe,0x7f,0xa3,0xc1,0x4f,0x10,0xa9,0xb1,0x18,0x0,0xf0,0xbb,0x86,0x86,0x86,0x49,0x09,0x11,0x80,0xad,0x0d,0x0d,0x5f,0x01,0xe7,0xf7,0x52,0xbd,0x13,0x44,0xca,0x90,0x2b,0x02,0xff,0x1d,0xed,0xce,0x40,0xd4,0x02,0xf0,0xfb,0xdf,0xfc,0xa6,0x98,0x31,0xb6,0x11,0x69,0x9e,0x50,0x94,0x20,0x32,0xd0,0x0c,0x58,0x1c,0xf4,0x7a,0x1f,0x88,0xab,0x0,0x28,0x92,0xf4,0x4b,0x70,0x5e,0x40,0xd5,0x4d,0x10,0xa9,0xa8,0x02,0xec,0xfb,0x5b,0xb6,0x6c,0x99,0x1b,0x17,0x01,0x78,0xb2,0xa1,0xe1,0xf3,0x0,0xbe,0x41,0xb5,0x9c,0x1c,0x42,0xaa,0x80,0x10,0x17,0xd2,0xea,0x99,0xbd,0xaa,0x04,0x4e,0x4d,0x97,0x38,0x38,0x97,0x04,0x55,0x7d,0x8c,0x73,0x1e,0x91,0x85,0x1e,0xb1,0x19,0xff,0xe8,0xa3,0x8f,0xea,0x72,0x2d,0x96,0x43,0x0,0xa6,0x52,0x2d,0x27,0x06,0xa7,0xa2,0x81,0x3d,0xac,0x83,0x5d,0xd6,0xa3,0x27,0xac,0x87,0x5b,0x95,0x30,0x49,0xeb,0xc1,0xe5,0x96,0x9e,0xb4,0x19,0xfc,0x7f,0x75,0x94,0x83,0x73,0x20,0x57,0x0a,0xa3,0x44,0xe3,0x47,0xa1,0x14,0x44,0x91,0x26,0x0,0x2d,0x53,0xa9,0x81,0xe3,0x69,0x08,0x70,0xbe,0x66,0xf5,0xba,0x75,0x4f,0xc5,0x4c,0x0,0x9e,0x6a,0x68,0xb8,0x9b,0x03,0x8f,0x52,0xd5,0xc6,0x8f,0x30,0x67,0x68,0x0b,0x1b,0xd1,0x15,0xd6,0xc3,0x1e,0xd6,0xc3,0xa9,0x68,0x86,0x6d,0xb0,0xeb,0xad,0xed,0x28,0x90,0x52,0xff,0x0e,0x8a,0xdd,0xee,0x02,0x34,0x87,0xcc,0x43,0x5e,0x17,0x19,0x1f,0x14,0x82,0x72,0xad,0x1f,0x79,0x62,0x90,0x1c,0x4a,0xb1,0x5f,0x0a,0xb4,0xf6,0xbb,0x5c,0x53,0xee,0xb9,0xe7,0x9e,0xe0,0x68,0x6f,0x93,0x22,0xf9,0xae,0x6d,0xdb,0xb6,0x19,0xa2,0x75,0x2e,0x10,0x91,0xcf,0xf2,0xad,0x21,0x23,0xda,0xc2,0x46,0xd8,0xc3,0xda,0x31,0x35,0x99,0x03,0x78,0xdf,0x5b,0x80,0x2f,0x58,0xdb,0x53,0xfa,0x77,0x75,0x85,0x75,0xc3,0x0e,0x7e,0x0,0x50,0x38,0x43,0x67,0x58,0x8f,0xce,0xb0,0x1e,0x1f,0xfb,0x6c,0xd0,0x09,0x2a,0xca,0x34,0x3e,0x54,0x6a,0xfd,0x28,0xd3,0xf8,0x21,0x91,0x75,0x10,0x8b,0xa5,0x40,0x45,0x9e,0xc5,0xb2,0x1e,0xc0,0xaf,0x26,0x6c,0x01,0x6c,0x6d,0x68,0xf8,0x16,0x03,0xfe,0x8b,0x6a,0x35,0x76,0x83,0xfe,0x6c,0xc8,0x88,0xd6,0x90,0x11,0x7d,0xb2,0x6e,0x5c,0x6b,0xe4,0xe5,0xe6,0x6e,0x4c,0xd6,0x79,0x53,0xb3,0xef,0x01,0x78,0xd9,0x59,0x8a,0x1e,0x59,0x17,0xf5,0x67,0xb5,0x4c,0x45,0x99,0xc6,0x8f,0x0a,0xad,0x0f,0xe5,0x5a,0x1f,0x34,0x8c,0x3c,0x08,0x13,0x68,0x87,0x73,0x7a,0x93,0x69,0xca,0x68,0x57,0x96,0x8d,0x69,0x01,0xbc,0xb9,0x61,0x83,0xd4,0x0a,0xfc,0x13,0x55,0xe7,0xc4,0x08,0x72,0x11,0x67,0x02,0x46,0x9c,0x0e,0x59,0xd0,0x2b,0x4f,0xf8,0x10,0x17,0x0e,0xfa,0x72,0x51,0xa5,0xf5,0x41,0x4c,0xc1,0x01,0x72,0x26,0x64,0x1e,0xd7,0xe0,0x07,0x80,0x10,0x17,0x70,0x26,0x64,0xc2,0x99,0x90,0x09,0x22,0xe3,0xa8,0xd2,0x78,0x51,0xa3,0xf7,0xa2,0x54,0xe3,0xa7,0x4e,0x14,0xed,0x2a,0x0,0xa8,0x0c,0x79,0x3c,0xb7,0x02,0xd8,0x32,0x6e,0x01,0x68,0xab,0xaa,0xba,0x19,0x74,0x61,0xc7,0xb8,0x90,0x39,0x43,0x73,0xd0,0x84,0xe6,0x90,0x25,0x22,0xf3,0x3e,0x1a,0xbc,0xaa,0x84,0xa3,0x81,0x1c,0xcc,0x31,0x38,0x53,0xea,0x37,0x2b,0x9c,0xe1,0x80,0x37,0x37,0x66,0xdf,0xd5,0x1c,0x32,0xa3,0x39,0x64,0x86,0x56,0x50,0x51,0xad,0xf5,0xa1,0x46,0xe7,0x41,0xa1,0x14,0xa0,0xce,0x15,0xa9,0x15,0xc0,0xd8,0x77,0x46,0x13,0x80,0x31,0xf7,0x94,0x38,0xb0,0x8e,0xaa,0x31,0x3a,0x5c,0x8a,0x06,0xfb,0xbc,0x79,0x78,0xd6,0x51,0x89,0xbd,0xde,0x02,0xd8,0xc3,0x3a,0xc4,0x23,0x6e,0xea,0xb8,0xdf,0x9a,0x72,0xdb,0x82,0x8d,0x41,0x0b,0x7c,0x6a,0xec,0xaf,0x71,0x0c,0xa9,0x02,0x1a,0x03,0x66,0xbc,0xec,0x2c,0xc1,0x4b,0xce,0x52,0x34,0x06,0x2c,0x50,0x38,0xb9,0x0e,0x23,0x60,0xde,0xd6,0x4d,0x9b,0x2e,0x1d,0x97,0x05,0xd0,0xd0,0xd0,0x50,0x02,0xe0,0x3a,0xaa,0xc3,0xc8,0x68,0x0d,0x19,0x71,0x34,0x60,0x3d,0x3f,0xe0,0x13,0xb1,0xac,0x10,0x70,0xc4,0x6f,0xc5,0x02,0x63,0x7f,0x4a,0xfc,0xfe,0x30,0x67,0x38,0xe4,0x8b,0xff,0xc1,0xd0,0x1e,0x59,0x87,0x1e,0x59,0x87,0x0f,0x7d,0x79,0xa8,0xd1,0x7b,0x30,0x5b,0xef,0x80,0x41,0x50,0xa8,0x03,0x8e,0x34,0xcb,0x33,0xb6,0x06,0xc0,0xbe,0xa8,0x2d,0x0,0x91,0xf3,0x5b,0x41,0xb7,0xf2,0x8e,0x8a,0x0a,0x86,0xd3,0x41,0x13,0x5e,0x74,0x96,0xe1,0x2d,0x77,0x51,0xc2,0x06,0xff,0xa0,0x15,0x10,0xc8,0x81,0x5f,0x4d,0x8d,0x26,0x3a,0x16,0xb0,0x22,0xc8,0x13,0xf7,0x2c,0x61,0xce,0x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,0xc6,0xec,0x7f,0xd2,0x9f,0x93,0x5a,0xed,0x42,0xa1,0xc4,0xc3,0xcf,0xe9,0x9c,0xaf,0x8c,0x48,0x0,0xb6,0x6e,0xdd,0x5a,0x04,0xa0,0x86,0xaa,0x6c,0x74,0xa4,0x14,0x9b,0x69,0x9a,0x02,0xe6,0x84,0xfb,0x02,0x8e,0xfb,0x73,0x10,0x86,0x90,0x62,0xed,0x42,0x02,0x30,0x02,0x4b,0x22,0xb3,0x0,0x64,0x79,0x26,0xd5,0x55,0x24,0xa6,0x66,0x6a,0x75,0x34,0x15,0x0c,0xc7,0x12,0x38,0x1b,0x87,0x39,0xc3,0x89,0x80,0x25,0xc5,0x5a,0x85,0xd3,0x12,0x60,0x64,0xab,0x7e,0x66,0x44,0x02,0xc0,0x04,0x61,0x3a,0xd5,0x56,0x7a,0x9a,0x9a,0x27,0x83,0x96,0x84,0xed,0xc5,0x9f,0x0c,0xe4,0xa4,0x5c,0x24,0xa2,0xc4,0x38,0x79,0xae,0x47,0xf6,0x03,0x4c,0x8f,0xcc,0x02,0xe0,0x9c,0x04,0x20,0x22,0x0b,0x20,0xf5,0x66,0x1a,0x85,0x33,0x9c,0xf0,0x9b,0xe3,0x6f,0x6d,0x70,0xe0,0x44,0x20,0x27,0xe5,0x7e,0x3f,0xed,0x0,0x8c,0x6a,0x01,0x94,0x6f,0x7b,0xfc,0x71,0xf3,0xd8,0x02,0x40,0x59,0x7f,0x22,0x42,0x93,0xa2,0x6b,0xcd,0x13,0x81,0x9c,0xb8,0xc7,0xc9,0x9f,0x0e,0x99,0xe3,0x12,0xf3,0x9f,0x89,0xa2,0x9c,0x4a,0x36,0x40,0xd8,0x68,0x9c,0x72,0x81,0xc5,0x34,0xc2,0x1b,0x4b,0xa8,0xae,0x22,0x11,0x80,0xd4,0xec,0x6c,0x41,0x2e,0xe2,0x74,0xd0,0x84,0xa9,0x7a,0xcf,0x88,0xef,0x09,0xa9,0x02,0x14,0x30,0x84,0xb9,0x80,0x30,0x67,0x0,0x18,0x04,0xc6,0x21,0x31,0x15,0x5a,0xc6,0x21,0x41,0x1d,0x71,0x30,0x71,0x20,0x69,0x51,0x7f,0xe9,0xb8,0x2c,0x4b,0x25,0xd4,0x8b,0xc6,0xb6,0x34,0x42,0x03,0x5b,0x68,0x1d,0x15,0xc9,0x7a,0x33,0x75,0x3b,0xdb,0xb1,0x80,0x15,0x12,0x1b,0x38,0x36,0xec,0x55,0x45,0x78,0x14,0x09,0x3e,0x55,0x82,0x47,0x95,0xa2,0xb2,0x0e,0xf4,0x82,0x02,0xb3,0xa0,0xc0,0x24,0x84,0x61,0x14,0x14,0x98,0x44,0x19,0x32,0x67,0x70,0x28,0xda,0x94,0xfc,0xdd,0x22,0x48,0x0,0x46,0x5d,0x05,0x0,0x96,0x31,0x05,0x80,0x5d,0xf4,0x26,0x22,0xfd,0x04,0xc0,0xa5,0x68,0xb0,0xdb,0x33,0xf1,0xec,0xed,0x01,0x55,0x44,0x40,0x15,0xd1,0x03,0x6d,0x5a,0xb4,0x09,0x59,0x0,0xa3,0x23,0x5c,0x34,0xb6,0x47,0xf2,0x01,0x90,0x0,0x44,0x80,0x81,0x3a,0x5b,0xca,0xa1,0xa3,0x43,0x40,0x63,0x91,0x13,0x89,0x0,0x98,0xa8,0x9e,0x22,0xb3,0x0,0xc8,0xe9,0x94,0x62,0xa2,0x2c,0x90,0x28,0x8f,0xea,0x03,0xe0,0x3c,0xa2,0x5d,0x0,0xca,0x01,0x10,0xe9,0x1a,0x99,0xd1,0x8c,0x93,0x5a,0x16,0x0,0x09,0xc0,0x68,0x30,0xc6,0xa4,0x48,0x04,0x80,0xa0,0x19,0x27,0x4d,0x05,0x59,0xa6,0x4a,0x88,0xce,0x27,0x40,0x50,0x87,0x23,0x41,0x26,0x01,0x20,0xc6,0x67,0x72,0x8a,0xd4,0xe1,0x48,0x90,0x49,0x0,0xb2,0x16,0x93,0x40,0x1d,0x2e,0x95,0xa0,0x54,0x60,0x24,0x0,0x09,0xc5,0x4c,0x02,0x90,0x32,0x48,0x4c,0x85,0x96,0x96,0x0,0x24,0x0,0x89,0x9d,0x71,0x48,0x0,0x52,0xc7,0x1a,0xa3,0xd9,0x9f,0x04,0x80,0x2c,0x80,0xec,0x6d,0x0b,0x91,0xda,0x82,0x04,0x20,0xd1,0x16,0x80,0xa8,0x0,0xa0,0x60,0xa0,0x94,0x68,0x0b,0x72,0x0,0x92,0x0,0x24,0x1a,0xb7,0x22,0x41,0xa4,0x93,0x53,0x29,0x41,0x90,0x8b,0x50,0x29,0x1d,0x48,0x54,0x50,0x02,0xf5,0xf1,0x76,0x36,0x55,0xc0,0x3e,0x5f,0x1e,0x9a,0x83,0x26,0x50,0xf6,0xf4,0xd4,0xe0,0x6c,0xc8,0x88,0x67,0xfb,0x2b,0xb0,0xc0,0xd8,0x87,0x9a,0x14,0xbd,0x3a,0x9d,0x04,0x20,0xcd,0xe1,0x18,0x48,0xbe,0x79,0xd0,0x9f,0x87,0xa0,0x4a,0x06,0x54,0xaa,0xe1,0x57,0x45,0xbc,0xeb,0x29,0xc4,0xe9,0xa0,0x05,0x8b,0x4c,0xbd,0xb0,0x8a,0x61,0xaa,0x14,0x12,0x80,0xd8,0x99,0xfb,0xef,0x7b,0xf3,0xd1,0x11,0x36,0x50,0x65,0xa4,0x38,0x9d,0x61,0x3d,0x76,0x38,0xcb,0x30,0xc7,0xe0,0xc4,0x4c,0x83,0x13,0x02,0xf9,0x69,0xd2,0xd3,0x07,0x10,0x50,0x45,0x7c,0xe4,0xb3,0x25,0xf4,0xd2,0xc9,0x8b,0x19,0xc8,0xb9,0x6f,0xc3,0xf3,0xce,0x72,0x1a,0xfc,0x69,0x84,0xcc,0x19,0x0e,0xf8,0x6c,0x78,0xd1,0x59,0x86,0x5e,0x59,0x97,0xd4,0x67,0xe9,0x0a,0xeb,0x71,0x3c,0x05,0x73,0x28,0xa6,0xb4,0x05,0x10,0xe6,0x0c,0xaf,0xbb,0x8b,0xd1,0x2f,0x6b,0x71,0x2c,0x90,0x83,0x3a,0xbd,0x0b,0x33,0x0d,0xce,0x84,0xa6,0xe2,0x72,0x28,0x5a,0xec,0xf6,0x14,0xa0,0x5f,0xd6,0xd2,0x88,0x4a,0x53,0x1c,0xb2,0x06,0x2f,0x39,0x4b,0x31,0xd3,0xe0,0xc2,0x7c,0x43,0x1f,0x84,0x04,0xba,0x6c,0x7a,0x65,0x1d,0x3e,0xf2,0xe7,0xa2,0x3d,0xa4,0x07,0x0,0x30,0xce,0x31,0xdd,0xe0,0x26,0x01,0x18,0x73,0xd6,0xe5,0xc0,0xdb,0xee,0xa2,0xc1,0x81,0x27,0x73,0x01,0x1f,0xfb,0x6d,0x38,0x11,0xcc,0xc1,0x2c,0x83,0x13,0xd3,0x75,0xae,0xb8,0x9f,0xc5,0x3f,0x19,0xcc,0xc1,0x7e,0x6f,0x6e,0xdc,0x13,0x6c,0x12,0xf1,0x87,0x03,0x38,0xea,0xcf,0x41,0x57,0x58,0x8f,0xcb,0xcd,0x76,0x58,0xe2,0x1c,0x33,0xe0,0x54,0x34,0x38,0xe8,0xcf,0x45,0x6b,0xd0,0x78,0xc1,0xe2,0xe3,0x03,0x5f,0x1e,0x0c,0xa2,0x8a,0x2a,0x6d,0x6a,0x38,0x29,0x85,0x54,0x6d,0xac,0x3d,0xde,0x42,0x74,0x0e,0x63,0x6e,0x07,0x55,0x01,0x1f,0x7a,0x73,0xf1,0x57,0x67,0x05,0xce,0x84,0x4c,0x71,0x59,0xd9,0x85,0xb8,0x80,0xb7,0xdd,0x45,0x78,0xdf,0x93,0x47,0x83,0x3f,0xc3,0xe8,0x95,0xb5,0x78,0xd1,0x51,0x76,0x7e,0xf7,0x26,0xf6,0x04,0xb9,0x88,0xbd,0xde,0x7c,0x3c,0xef,0x28,0xc7,0xb9,0x8b,0x06,0xff,0x0,0x0c,0xbb,0xdc,0x05,0xb0,0xcb,0x7a,0x12,0x80,0x91,0x78,0xdf,0x9b,0x3f,0x66,0x03,0x79,0x15,0x11,0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x78,0x20,0x07,0xdb,0xfb,0xcb,0xe3,0x36,0xf8,0x3f,0x99,0xb0,0xde,0xf5,0x14,0xa0,0x27,0xc1,0x3b,0x03,0x49,0xb5,0x0,0x9a,0x82,0x16,0x9c,0x0a,0x9a,0x13,0xd4,0xa8,0x3a,0xec,0x70,0x96,0xa1,0x5a,0xeb,0xc5,0xa9,0x20,0xdd,0x7b,0x42,0x8c,0x8e,0x53,0xd1,0xe0,0x35,0x67,0x31,0xcc,0xa2,0x9c,0xb0,0xf0,0x6f,0x85,0x33,0xec,0x74,0x17,0xe1,0x0b,0xb6,0x0e,0xe8,0x12,0x74,0xdf,0x44,0xd2,0x2c,0x80,0x1e,0x59,0x87,0xf7,0xbd,0xf9,0x09,0x2d,0x53,0xe6,0xec,0xbc,0xe0,0xd0,0xcc,0x4f,0x8c,0x8d,0x5b,0xd5,0x24,0xfc,0xec,0x87,0x57,0x95,0xf0,0x8e,0xbb,0x30,0x61,0x47,0x97,0x92,0x22,0x0,0x41,0x55,0xc0,0x3b,0xee,0x42,0xa8,0x74,0x40,0x8b,0x20,0x86,0xd0,0x15,0xd6,0xe3,0x63,0x5f,0x6e,0xe6,0x0a,0xc0,0x7b,0xbe,0x02,0xf8,0x28,0xd8,0x86,0x20,0x46,0xe4,0x90,0x3f,0x27,0xae,0xbe,0xb1,0xa4,0x09,0x40,0x63,0xd0,0x82,0x73,0x41,0x0a,0xb3,0x25,0x88,0xd1,0x61,0xd8,0xed,0x29,0x8c,0xfb,0x31,0xf8,0x84,0x0a,0x80,0x43,0xd6,0x60,0x9f,0x37,0x8f,0xda,0x96,0x20,0x22,0xc0,0xaf,0x8a,0xd8,0xed,0x2e,0x88,0xab,0x3f,0x20,0x61,0x02,0xa0,0x70,0x86,0x9d,0x9e,0x22,0x0a,0xb5,0x25,0x88,0x28,0x68,0x0f,0x1b,0xe2,0x1a,0xa5,0x9a,0x30,0x01,0x38,0xe8,0xb3,0x0d,0xee,0xc3,0x13,0x04,0x11,0x39,0xfb,0x7d,0x79,0x71,0x1b,0x3b,0x09,0x11,0x80,0xce,0xb0,0x01,0xc7,0x03,0x56,0x6a,0x49,0x82,0x18,0xa7,0xf5,0xbc,0xcb,0x5d,0x18,0x97,0x94,0xe7,0x42,0x22,0x1e,0xfe,0x7d,0x6f,0x1e,0xa5,0x64,0x24,0x88,0x09,0xd0,0xaf,0x68,0xe3,0x92,0x53,0x30,0xee,0x02,0x70,0xd8,0x6f,0x83,0x8b,0x4c,0x7f,0x82,0x98,0x30,0x1f,0xf9,0x6c,0x70,0xc7,0x78,0xfb,0x3c,0xae,0x02,0xd0,0xaf,0x68,0x71,0xc4,0x9f,0x43,0x2d,0x47,0x10,0xb1,0xb2,0xa6,0x3d,0xf9,0xe9,0x23,0x0,0x7b,0x3d,0xf9,0x74,0x55,0x13,0x41,0xc4,0x90,0x8e,0xb0,0x21,0xa6,0xf9,0x0c,0xe3,0x26,0x0,0x27,0x03,0x16,0x3a,0x67,0x4f,0x10,0x71,0x60,0x9f,0x37,0x2f,0x66,0x01,0x42,0x71,0x11,0x80,0xa0,0x2a,0xe0,0xa0,0x3f,0x97,0x5a,0x8a,0x20,0xe2,0x31,0xbe,0xb8,0x18,0xb3,0x04,0x22,0x71,0x11,0x0,0x9d,0xa0,0xc2,0x2a,0xd0,0x9d,0x6c,0x04,0x11,0x2f,0x0a,0xa5,0x60,0x6a,0x2f,0x01,0x2e,0x33,0xf7,0x26,0xf4,0x06,0x16,0x82,0xc8,0x16,0x4a,0x35,0x7e,0x4c,0xd6,0x79,0x52,0x5b,0x0,0x6c,0x62,0x08,0xb3,0xf4,0x4e,0x6a,0x2d,0x82,0x88,0x21,0x1a,0xa8,0x58,0x62,0xee,0x8d,0xd9,0xf7,0xc5,0x75,0x17,0x60,0x8e,0xd1,0x41,0xd7,0x33,0x13,0x44,0x8c,0xc7,0x94,0x49,0x90,0xd3,0x43,0x0,0x04,0x70,0x5c,0x6a,0xea,0xa3,0x8d,0x40,0x82,0x88,0x01,0xb9,0x62,0x08,0x33,0x62,0x7c,0xb1,0x68,0xdc,0x23,0x01,0x4b,0x35,0x7e,0x4c,0xd5,0xbb,0xa9,0xf5,0x08,0x62,0x02,0x88,0x8c,0xe3,0x72,0x4b,0x37,0x84,0x18,0x07,0xd5,0x27,0xe4,0x30,0xd0,0x25,0xc6,0x3e,0x58,0x68,0x57,0x80,0x20,0xc6,0xcd,0x5c,0x83,0x33,0x2e,0xcb,0xe9,0x84,0x08,0x80,0xc4,0x38,0x96,0x9a,0x7b,0x0,0x3a,0x12,0x44,0x10,0x51,0x53,0x20,0x05,0x51,0x67,0x70,0xc4,0x69,0x99,0x9e,0x20,0x8a,0x34,0x41,0xcc,0xa0,0xa5,0x0,0x41,0x44,0x6d,0xfa,0x2f,0x35,0xf7,0xc4,0xcd,0x8f,0x96,0xd0,0x94,0x60,0xf3,0x4c,0x0e,0x58,0x62,0xe8,0xc1,0x24,0x88,0x4c,0x67,0x8e,0x21,0xbe,0x3b,0x69,0x09,0x15,0x0,0x0d,0x54,0x5c,0x61,0xb1,0x53,0x80,0x10,0x41,0x44,0x40,0x89,0x26,0x80,0xd9,0x86,0xf8,0xc6,0xd2,0x24,0x3c,0x2b,0x70,0x9e,0x14,0xc2,0xbc,0x38,0xad,0x67,0x08,0x22,0x53,0xd0,0x09,0x2a,0x96,0x9b,0xbb,0xe3,0x5e,0x4e,0x52,0xee,0x05,0x98,0x65,0x70,0xa0,0x44,0x13,0xa0,0x56,0x26,0x88,0x11,0x58,0x62,0xec,0x81,0x41,0x50,0x32,0x53,0x0,0x0,0x60,0xb9,0xb9,0x1b,0xba,0xcf,0xdc,0xbe,0x4a,0x10,0xc4,0x0,0x53,0x74,0x6e,0x54,0xea,0x7c,0x09,0x29,0x2b,0x69,0x02,0x60,0x10,0x14,0x2c,0x32,0xf5,0x52,0x6b,0x13,0xc4,0x67,0xc8,0x11,0xc3,0x58,0x68,0xea,0x4b,0x58,0x79,0x49,0xbd,0x1e,0x7c,0x92,0xce,0x8b,0x99,0x06,0x17,0xb5,0x3a,0x41,0x0,0x90,0x98,0x8a,0x95,0x16,0x3b,0x34,0x8c,0x67,0x87,0x0,0x0,0xc0,0x02,0x63,0x3f,0x8a,0x34,0x41,0x6a,0x7d,0x82,0xd6,0xfd,0xe6,0x3e,0xe4,0x24,0xf8,0xf0,0x5c,0xd2,0x05,0x40,0x0,0x3f,0xef,0x0f,0x50,0xa8,0x07,0x10,0x59,0x4b,0xad,0xde,0x83,0x49,0x5a,0x4f,0x12,0xc6,0x5f,0x0a,0x60,0x12,0x64,0x2c,0xb5,0xf4,0x82,0x42,0x85,0x89,0x6c,0xc4,0x26,0x86,0xb0,0xc8,0x98,0x1c,0x7f,0x98,0x90,0x2a,0x95,0x50,0xa1,0xf1,0xa5,0xce,0xc3,0x10,0x44,0x02,0x29,0xd3,0x06,0x20,0x31,0x9e,0xdd,0x02,0x40,0x10,0x04,0x09,0x0,0x41,0x10,0x09,0x44,0xa2,0x2a,0x88,0x1e,0x93,0x4e,0x42,0x65,0x9e,0x11,0x15,0xb9,0x46,0x68,0xa5,0x4f,0x35,0x54,0x51,0x39,0x3a,0x9d,0x7e,0x9c,0xed,0xf3,0xa1,0xdf,0x1b,0xa2,0x8a,0x4a,0x10,0x16,0xbd,0x06,0x55,0xf9,0x46,0x94,0xd9,0x0c,0xd0,0x88,0x9f,0xb6,0x87,0xac,0xaa,0xe8,0x70,0x04,0xd0,0xd2,0xeb,0x85,0xcb,0x4f,0xf9,0x28,0x48,0x0,0x26,0xc0,0xd4,0x62,0x0b,0x56,0xce,0x28,0xc2,0x82,0xea,0x5c,0x4c,0x2e,0x34,0x8f,0x79,0x3c,0xb3,0xcb,0x15,0xc0,0xc1,0x96,0x7e,0xec,0x6a,0xec,0xc6,0xfe,0x33,0xfd,0x50,0x39,0x39,0x38,0x63,0x05,0x03,0x50,0x57,0x6e,0xc5,0x8a,0xe9,0x45,0x58,0x50,0x65,0x43,0x55,0xfe,0xd8,0x37,0xe5,0xb4,0xf5,0xfb,0x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,0x1b,0xdd,0x11,0x77,0xfa,0x74,0x33,0x36,0x6d,0xda,0x84,0x3d,0xef,0xee,0x19,0xf6,0xdf,0x65,0x59,0x46,0x7b,0x7b,0x3b,0xda,0xdb,0xdb,0xb1,0x77,0xef,0x5e,0xe0,0x97,0xff,0x81,0xe5,0xcb,0x97,0x63,0xdd,0xfa,0x7a,0x4c,0x9e,0x3c,0x39,0xaa,0x65,0xe1,0x6d,0x4b,0xab,0xb1,0x65,0x57,0x33,0x2d,0x01,0x32,0x11,0xa3,0x56,0x42,0xfd,0x15,0x35,0x51,0x99,0x98,0xcf,0x3c,0xf3,0x07,0xac,0x59,0xbd,0x16,0x3b,0x76,0xec,0x18,0x76,0xf0,0x8f,0xc4,0xd1,0x23,0x47,0xf1,0x9d,0x7b,0xbf,0x8b,0x1f,0xfe,0xe0,0x87,0xf0,0x7a,0xbd,0x23,0xbe,0xef,0xba,0x59,0x25,0x98,0x56,0x62,0xc9,0xca,0xf6,0xc8,0x37,0xeb,0xf0,0x8d,0xcb,0xaa,0x47,0xfc,0x77,0x59,0x96,0xf1,0x1f,0xbf,0x7c,0x14,0x77,0xdd,0x79,0xd7,0x88,0x83,0x7f,0x24,0x76,0xef,0xde,0x8d,0x3b,0xd7,0xdf,0x85,0xff,0xfc,0xcf,0xc7,0x20,0xcb,0x91,0x5b,0x58,0xb7,0x2c,0xac,0x8c,0x49,0x1c,0x08,0x09,0x40,0x0a,0x72,0xd3,0x25,0xe5,0xc8,0x8d,0xd0,0xe9,0x17,0x08,0x04,0xf0,0xd0,0x86,0x87,0xf1,0x9b,0x5f,0xff,0x06,0xe1,0xf0,0xf8,0x63,0xca,0x77,0xed,0xda,0x8d,0x6f,0xfe,0xdd,0xb7,0xd0,0xd2,0xd2,0x32,0xfc,0x92,0x84,0x31,0xdc,0xbe,0x7c,0x72,0x56,0xb6,0xc7,0xd7,0x17,0x57,0xc1,0xa0,0x19,0xde,0xe9,0xd7,0xd7,0xd7,0x87,0x7b,0xff,0xf1,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99,0x3f,0xf8,0x60,0x1f,0x8e,0x1f,0x3f,0x1e,0xd7,0x67,0x09,0x85,0x42,0x23,0x5a,0x18,0xb3,0xe3,0x14,0x97,0xae,0x95,0x84,0xa8,0x23,0x0f,0x2f,0x9d,0x9c,0x1f,0x37,0x6f,0xf8,0xf4,0x92,0x1c,0x88,0xc3,0xdc,0x16,0xfb,0xc2,0x0b,0x2f,0x8e,0xe8,0x27,0x89,0x15,0x3d,0x3d,0x3d,0xd8,0xb1,0xe3,0xa5,0xb1,0x27,0x0d,0x60,0x58,0x91,0x22,0x01,0x48,0x43,0x26,0x15,0x46,0x36,0xb3,0xbe,0xf6,0xea,0xab,0x09,0x79,0x9e,0xd7,0x5f,0x7f,0x63,0xd8,0xe8,0xc1,0x78,0x39,0x02,0x2b,0xf3,0x8c,0x51,0x87,0xd8,0x32,0x0,0xd3,0x4a,0xe3,0xb3,0x3d,0x39,0x79,0x84,0xf6,0x78,0xf5,0x95,0xc4,0xd4,0x7f,0xa4,0xe5,0x24,0xca,0x31,0x4b,0x02,0x10,0x67,0xca,0x22,0x38,0xec,0x23,0xcb,0x32,0xf6,0xec,0x79,0x2f,0x21,0xcf,0xe3,0x76,0xbb,0xf1,0xf1,0xc7,0x1f,0x0f,0x7d,0xce,0xdc,0xf8,0x84,0xa2,0x9a,0xc7,0x19,0xf2,0x1c,0x89,0xd5,0x14,0xab,0xf6,0xb0,0xdb,0xed,0x68,0x6c,0x6c,0x4c,0x48,0xfd,0x1f,0x3f,0x7e,0x1c,0xdd,0xdd,0x63,0xdf,0xc2,0x5b,0x96,0x6b,0x20,0x01,0xc8,0x04,0x22,0x19,0x0,0x67,0xce,0x9c,0x19,0x35,0x60,0x27,0xd6,0x1c,0x3e,0x74,0x78,0x98,0x01,0x17,0x9f,0x20,0x4d,0xc6,0xc6,0xe7,0x5e,0x8c,0x97,0x53,0x72,0xb8,0x33,0x18,0x87,0x0f,0x1f,0x89,0xab,0xef,0xe5,0xb3,0x70,0xce,0x71,0xf4,0xe8,0xb1,0xa4,0x09,0x20,0x09,0x40,0x82,0x89,0xc4,0xfc,0xed,0xe9,0xe9,0x49,0xe8,0x33,0x0d,0x57,0xde,0x48,0x41,0x31,0x19,0xd7,0x1e,0xc3,0xfc,0xce,0x78,0xaf,0xfd,0x87,0xd4,0x7f,0x04,0x16,0x40,0xa6,0xb6,0x47,0xd6,0x09,0x40,0x58,0x19,0x7b,0x66,0xe9,0xed,0xed,0x4b,0x6c,0x07,0x1c,0xa6,0xc3,0xcb,0x59,0x92,0x32,0x6c,0xb8,0xdf,0x99,0x68,0x01,0x88,0xa4,0xbc,0x4c,0x3d,0x14,0x94,0x75,0x02,0x10,0x51,0x12,0xc8,0x44,0x67,0xf0,0x1d,0xa6,0x3c,0x5f,0x48,0xce,0xde,0xf6,0x48,0x70,0xfd,0x47,0x52,0x9a,0x3f,0x43,0x93,0x87,0x66,0x9d,0x0,0xf4,0xb8,0xc7,0xde,0xf7,0x2d,0x28,0x2c,0x48,0xe8,0x33,0x15,0x14,0x0e,0x3d,0xae,0xda,0xed,0xce,0x8e,0xfc,0x74,0xc3,0xfd,0xce,0xfc,0x82,0x04,0xd7,0x7f,0x04,0xe5,0x75,0xbb,0x82,0x24,0x0,0x99,0xc0,0xb9,0x3e,0xdf,0x98,0xef,0xc9,0xcf,0x4f,0x6c,0x46,0x98,0x82,0x61,0xca,0x8b,0xe4,0x39,0x33,0xb5,0x3d,0x12,0x5e,0xff,0x11,0x08,0x40,0x6b,0xbf,0x8f,0x04,0x20,0x13,0x38,0x65,0xf7,0x8c,0xe9,0x61,0xae,0xa9,0xa9,0x81,0xd5,0x9a,0xb8,0x04,0x91,0xf3,0xe6,0x0f,0xcd,0x13,0xd0,0xd4,0xe5,0xc9,0x8a,0xf6,0x68,0xea,0x72,0x0f,0xad,0x8f,0x79,0x73,0xc7,0xbd,0x5b,0x11,0x2d,0x8c,0x31,0xcc,0x9b,0x37,0x77,0xcc,0xf7,0x35,0x0e,0xf3,0x9c,0x24,0x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,0x78,0x87,0x0b,0x07,0xcf,0xf6,0xa3,0xad,0xdf,0x9f,0x72,0xbf,0xe9,0x99,0xbd,0x2d,0x98,0x5b,0x69,0xc3,0xac,0x08,0x2e,0x1f,0x69,0x77,0xf8,0xf1,0xab,0xd7,0x1b,0x53,0xe6,0xd9,0x43,0xb2,0x8a,0x97,0x0f,0x75,0xe0,0xe5,0x43,0x1d,0x28,0xb0,0xe8,0x30,0xbf,0x32,0x17,0xb3,0xca,0xad,0xa8,0xca,0x37,0xa2,0x2c,0xd7,0x0,0x93,0x76,0xa0,0x3d,0xc2,0x8a,0x0a,0x6f,0x50,0x46,0x87,0x23,0x80,0xb3,0xbd,0x5e,0x1c,0x6d,0x77,0xe1,0xc0,0xd9,0x7e,0xd8,0x5d,0x01,0xea,0xd4,0x24,0x0,0xe3,0x5c,0xbf,0xfb,0x42,0x83,0x62,0x90,0xce,0x84,0x64,0x15,0x3f,0x7c,0xf6,0x10,0xfe,0xf7,0x0d,0x33,0xb0,0xa4,0xb6,0x60,0xd4,0xd9,0xf2,0x47,0xcf,0x1d,0x19,0xb7,0xdf,0x20,0xde,0xf4,0xb8,0x83,0x78,0xed,0x68,0x27,0x5e,0x3b,0xda,0x49,0x9d,0x93,0x04,0x80,0x88,0x06,0x6f,0x50,0xc6,0x86,0xbf,0x1c,0xc6,0x9c,0x0a,0x1b,0xae,0x9d,0x55,0x8c,0xb9,0x15,0x36,0x58,0xf4,0x1a,0xf8,0x42,0x32,0x8e,0x77,0xb8,0xf0,0xc6,0x31,0x3b,0xf6,0x9e,0xee,0x01,0xe7,0x54,0x57,0x24,0x0,0x44,0xc6,0x72,0xa8,0xd5,0x91,0x35,0xd9,0x87,0x88,0xa1,0x08,0x54,0x05,0x04,0x41,0x02,0x90,0x12,0x24,0x2a,0x11,0x24,0x41,0x10,0x29,0x26,0x0,0x4c,0x10,0x20,0x8a,0x64,0x90,0x10,0xd9,0x87,0x28,0x26,0xef,0xda,0xb1,0x94,0xf1,0x01,0x4c,0x9b,0x36,0x0d,0x4f,0xcd,0x5b,0x88,0x3d,0x4d,0x3d,0x78,0xe7,0x64,0x37,0x3e,0x3a,0xdb,0x9f,0x75,0x61,0x99,0x44,0xf6,0x61,0xd0,0x8a,0x98,0x39,0xa9,0x04,0xe8,0xe8,0xce,0x5e,0x01,0xd0,0xe9,0x74,0x98,0x77,0xc9,0x25,0xd0,0x6a,0x35,0xb8,0x7e,0x4e,0x29,0xae,0x9f,0x53,0x8a,0x60,0x58,0xc1,0x81,0xb3,0x0e,0xec,0x3c,0x69,0xc7,0xee,0xc6,0x1e,0x0a,0xda,0x20,0x32,0x06,0x9b,0x51,0x8b,0x2b,0x67,0x14,0x61,0xc5,0xb4,0x42,0xcc,0x2c,0xcb,0x01,0x38,0xc7,0x73,0xcf,0x9e,0x81,0xdb,0xed,0xce,0x4c,0x01,0x50,0xc1,0x20,0x8c,0x92,0x87,0x77,0xee,0xfc,0xf9,0x43,0xd2,0x63,0xe9,0x34,0x22,0x96,0xd4,0xe6,0x63,0x49,0x6d,0x3e,0xbe,0x75,0x55,0x18,0x2f,0x1f,0xea,0xc4,0xe6,0xdd,0xcd,0x59,0x75,0x52,0x8b,0xc8,0xbc,0x81,0x7f,0xd7,0x95,0xb5,0xb8,0x62,0x5a,0x21,0xb4,0xd2,0x67,0x96,0xbb,0x8c,0x61,0xee,0x82,0x05,0xd8,0xfd,0xce,0x3b,0x99,0xe9,0x03,0x68,0x09,0x1a,0xf1,0x57,0x47,0x39,0x0e,0xfa,0x6c,0x70,0x28,0x17,0x0e,0x74,0x5b,0x6e,0x2e,0xa6,0xcd,0x98,0x31,0xea,0xe7,0x2d,0x7a,0x0d,0xbe,0xba,0xa8,0x12,0x77,0xad,0xa8,0xa1,0x5e,0x44,0xa4,0x2d,0xff,0xe7,0x8b,0xb3,0x70,0x4d,0x5d,0xf1,0x85,0x83,0xff,0x3c,0x93,0x6b,0x6a,0x90,0x37,0xca,0x95,0x68,0xbd,0x8a,0x0e,0x3c,0x5d,0x05,0xc0,0xa1,0x68,0xe1,0x52,0x34,0x38,0xec,0xb7,0xe1,0x79,0x47,0x19,0x9e,0x75,0x54,0xe2,0x03,0x5f,0x3e,0xba,0x65,0x3d,0x16,0x2e,0x5e,0x1c,0xb1,0xf7,0xff,0x73,0xb3,0x4b,0x40,0xfb,0x04,0x44,0x3a,0x52,0x66,0x33,0x60,0x76,0xc5,0xe8,0xa1,0xd7,0x0b,0x16,0x2e,0xbc,0xc0,0x6a,0x6e,0x0d,0x19,0xb1,0xdb,0x53,0x80,0xff,0xe9,0xab,0xc4,0x0e,0x47,0x29,0x7c,0x6a,0xec,0x0d,0x76,0x29,0x51,0x02,0xf0,0x59,0xbc,0x8a,0x88,0x13,0x7e,0x0b,0x4e,0xf8,0x2d,0x38,0xf0,0x7c,0x0b,0x96,0x4e,0xf1,0x62,0xc5,0xb4,0xc2,0x31,0x63,0xd3,0x8d,0x5a,0x09,0x1a,0x49,0xa0,0xec,0x39,0x44,0xda,0x61,0x35,0x8e,0x7d,0xfa,0xb2,0xa8,0xa4,0x14,0x5e,0x73,0x05,0x0e,0x76,0x06,0xd0,0x1e,0x32,0x20,0xc8,0x2f,0xdc,0x1d,0x70,0x2a,0x1a,0x98,0x04,0x39,0x0d,0x05,0x40,0x1e,0xf9,0xc7,0xdb,0x5d,0x01,0x6c,0xff,0xb0,0x15,0xdb,0x3f,0x6c,0x45,0x4d,0xa1,0x19,0x2b,0xa6,0x17,0xe2,0x8a,0x69,0x45,0x71,0x39,0xfb,0xbd,0x70,0x52,0x1e,0xee,0x5c,0x51,0x83,0x7c,0xb3,0x0e,0xed,0x0e,0x3f,0x4e,0xd9,0x3d,0x83,0x7f,0x9a,0x7b,0x3c,0x24,0x2c,0x04,0xcc,0x3a,0x09,0x35,0x45,0x66,0xd4,0x16,0x99,0x51,0x53,0x38,0xf0,0x77,0x91,0x45,0x8f,0x26,0xbb,0x1b,0xff,0xf5,0x46,0x13,0x5a,0x7a,0xbd,0x31,0x2f,0xf3,0x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x3f,0x1f,0x18,0x4b,0xe9,0x26,0x0,0x6a,0x6a,0xb8,0xed,0xf2,0x4d,0xe3,0xcb,0x22,0x53,0x60,0xd1,0xa1,0xc0,0xa2,0xc3,0x65,0x35,0x9f,0x7a,0x68,0x65,0x95,0xa3,0xad,0xdf,0x87,0xc6,0x2e,0x37,0x1a,0xbb,0x3c,0x68,0xea,0x72,0xe3,0xb4,0xdd,0x43,0xc9,0x3d,0x53,0x80,0x5c,0xa3,0x16,0xd3,0x4a,0x2c,0x98,0x5a,0x6c,0xc1,0x94,0x62,0x0b,0xaa,0x0b,0x8c,0x28,0xce,0xd1,0x43,0x88,0x51,0x98,0x79,0xbe,0x59,0x97,0xb4,0xdf,0x16,0xe6,0x2c,0x0d,0x05,0x0,0x62,0xc6,0x75,0x32,0x49,0x60,0xa8,0xce,0x37,0xa1,0x3a,0xdf,0x84,0x6b,0xeb,0x3e,0x15,0x85,0xb3,0xbd,0x5e,0x9c,0xb2,0x0f,0x2c,0x63,0x4e,0x76,0xba,0x71,0xb4,0xcd,0x49,0x96,0x42,0x3c,0xdb,0x41,0x14,0x30,0xaf,0xd2,0x86,0x29,0x9f,0x99,0xd5,0xcb,0x6c,0x33,0x6b,0x97,0xff,0x0,0x0,0x10,0xb2,0x49,0x44,0x41,0x54,0x86,0x8c,0x3d,0x53,0x12,0x52,0xd3,0xd0,0x02,0xc8,0x96,0x03,0xe5,0x92,0xc0,0x50,0x53,0x38,0xe0,0x38,0xfa,0xac,0x73,0xe7,0xe1,0xed,0x87,0xd1,0xe3,0x0e,0xd2,0x68,0x8d,0x31,0xd3,0x4b,0x72,0xf0,0x83,0x2f,0xcd,0x42,0x81,0x45,0x47,0x95,0x31,0x01,0xe2,0x1e,0x07,0x90,0xea,0xe7,0x7b,0x5e,0x39,0xdc,0x89,0x5d,0x8d,0xdd,0xe8,0x70,0xc6,0x3e,0x75,0xd7,0xb4,0x62,0x0b,0xbe,0xb9,0x72,0x0a,0xf5,0xb2,0x38,0xf0,0x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,0xf5,0x5f,0x3a,0xa6,0xa4,0x9f,0x0,0x08,0xe0,0x30,0x89,0x2a,0xbc,0x4a,0x7a,0x3a,0x03,0xc3,0x8a,0x7a,0xde,0xdb,0xef,0x1e,0x32,0x0b,0x4d,0x2d,0xb6,0xa0,0xba,0xc0,0x84,0xaa,0x7c,0x23,0xa6,0x16,0x5b,0x50,0x95,0x6f,0x4a,0x98,0xcc,0xad,0x98,0x56,0x94,0xb2,0x83,0xff,0x13,0xaa,0xf3,0x4d,0x98,0x55,0x6e,0xc5,0xc1,0xb3,0xfd,0x89,0xb1,0x3c,0x38,0xc7,0xb9,0xbe,0x0b,0x77,0x67,0x5a,0x7a,0xbc,0x29,0x91,0x8e,0x3d,0x16,0x98,0x85,0x70,0xfa,0x09,0x0,0x0,0x98,0x58,0x18,0xde,0x0c,0xdb,0x0d,0xe8,0xf3,0x86,0xb0,0xf7,0x74,0xef,0x05,0x6b,0xc5,0x86,0x3b,0x2f,0x43,0xa9,0xd5,0x90,0x90,0xf2,0xf3,0x4c,0xda,0xb4,0xa8,0xa7,0x44,0x3e,0xe7,0x7b,0x4d,0xbd,0x78,0xf8,0xaf,0x87,0x33,0xd6,0xef,0x61,0x11,0x63,0x2f,0x64,0x09,0x71,0xd1,0x59,0xa5,0xd8,0x29,0x57,0x2c,0x6e,0x85,0x21,0x88,0x44,0x63,0x35,0x4c,0xbc,0xdf,0xe6,0x88,0x69,0x6a,0x01,0x14,0x4a,0x01,0x34,0x22,0x36,0x61,0xbd,0x5b,0xef,0x5a,0x82,0x96,0x5e,0x2f,0x76,0x9e,0xe8,0xc6,0xdb,0x27,0xec,0x38,0xd7,0xe7,0xa3,0xde,0xf5,0x19,0xfc,0x61,0x05,0x8a,0x12,0xfd,0xda,0x56,0xaf,0x11,0x20,0x89,0x03,0x07,0xad,0xc6,0x73,0x26,0x42,0x2b,0x09,0x51,0xaf,0xcd,0x33,0x19,0x06,0xa0,0xae,0xdc,0x8a,0x2b,0xa6,0x15,0x62,0xe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x38,0xd0,0xd2,0x8f,0xef,0xff,0xe9,0x63,0xdc,0xbe,0x7c,0x32,0xa6,0x97,0xe6,0x44,0x6d,0xfe,0x14,0xe5,0x7c,0x2a,0x06,0x1d,0x0e,0x7f,0xcc,0x4f,0x17,0x12,0xd9,0xc9,0x0d,0x73,0x4b,0xb1,0x76,0xf9,0xa4,0x09,0x39,0xa3,0x65,0x95,0x63,0xff,0x99,0x3e,0x6c,0x7a,0xe7,0x34,0xba,0x22,0xb8,0xac,0xd4,0x26,0x86,0x60,0x11,0xc2,0xe9,0x2d,0x0,0x45,0x9a,0x20,0x0c,0x82,0x02,0xbf,0x2a,0x46,0x25,0x02,0x07,0x5a,0xfa,0x51,0x60,0xd1,0x61,0xf9,0x94,0x02,0x2c,0x9b,0x5a,0x88,0x39,0x15,0xd6,0xa8,0x4f,0x76,0x95,0xda,0x0c,0xd4,0x73,0x89,0x98,0x30,0xb5,0x78,0x7c,0xce,0xec,0x90,0xac,0x62,0x5f,0x73,0x1f,0x76,0x37,0x0d,0xf8,0xab,0x3c,0x81,0xc8,0xb7,0xf4,0x26,0xeb,0xe2,0xe7,0xe8,0x4e,0x98,0x0,0x08,0xe0,0x98,0xaa,0x77,0xe3,0x63,0x9f,0x2d,0xea,0xcf,0xf6,0xb8,0x83,0xd8,0x7e,0xa0,0x0d,0xdb,0x0f,0xb4,0x41,0xa7,0x11,0x31,0xbf,0xd2,0x86,0x2b,0xa6,0x17,0x62,0xf9,0x94,0x42,0x18,0xb4,0x22,0xf5,0x4a,0x22,0x25,0xe9,0xf7,0x86,0xf0,0xf6,0x09,0x3b,0x76,0x9e,0xec,0xc6,0xb1,0x76,0xd7,0xb8,0x22,0x0f,0x05,0x70,0x4c,0xd1,0xbb,0xd3,0x5f,0x0,0x0,0x60,0x8a,0xce,0x83,0xc3,0x3e,0x2b,0xd4,0x09,0xf8,0x33,0x83,0x61,0x65,0x30,0x0,0xe7,0x51,0xe9,0x24,0x16,0x54,0xe5,0xe2,0xb2,0xda,0x01,0xaf,0x2b,0xc5,0x08,0x10,0xc9,0xa6,0xc7,0x1d,0xc4,0xae,0xc6,0xee,0x41,0xdf,0xd3,0x44,0xa3,0x8d,0x2b,0x75,0xbe,0xb8,0x84,0x0,0x27,0x45,0x0,0x8c,0x82,0x8c,0x2a,0xad,0x0f,0x67,0x42,0xa6,0x98,0x7c,0x5f,0x48,0x56,0x07,0xc5,0xe0,0x89,0x37,0x9b,0xb0,0x70,0x52,0x1e,0x96,0x4d,0x29,0xc0,0x92,0xda,0xc8,0x1d,0x33,0x74,0xcf,0x0,0x31,0x1c,0x8a,0x1a,0x79,0xbf,0xb0,0xbb,0x02,0xd8,0xd3,0xd4,0x83,0x5d,0x8d,0x3d,0x38,0xd2,0xe6,0x8c,0xe9,0x19,0x83,0x99,0x7a,0x57,0x5c,0x7f,0x67,0xc2,0x83,0xc9,0xe7,0x18,0x1d,0x68,0x09,0x99,0x62,0xbe,0x45,0x17,0x92,0x55,0xec,0x69,0xea,0xc1,0x9e,0xa6,0x1e,0x48,0xe7,0xf7,0x63,0x97,0x4f,0x1d,0x08,0xc2,0x18,0x29,0x1c,0xd5,0x17,0x92,0x71,0x36,0xce,0x81,0x44,0xa2,0xc0,0x30,0xb3,0x2c,0x07,0xed,0xfd,0x7e,0x38,0x29,0xbf,0xe0,0x84,0x60,0x0,0xf2,0x2d,0xba,0x71,0xaf,0xc3,0xa3,0xe1,0x64,0xa7,0x7b,0xd4,0x23,0x6c,0x6d,0xfd,0x3e,0xec,0x6a,0xec,0xc1,0xee,0xc6,0x6e,0x34,0x9e,0x7f,0x6f,0xac,0x29,0xd7,0xfa,0x51,0x20,0x05,0x33,0x4b,0x0,0xac,0x62,0x18,0x93,0x74,0x5e,0x34,0x07,0x4d,0x71,0x2b,0x43,0x56,0x39,0x3e,0x6c,0xe9,0xc7,0x87,0x2d,0xfd,0x78,0xec,0xf5,0x93,0xa8,0x2b,0xb3,0x62,0xd9,0x94,0x02,0x2c,0x9f,0x5a,0x38,0x98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0x6c,0x83,0x13,0x1f,0x8d,0x63,0x47,0x60,0xa2,0x9c,0xe9,0xf1,0xe2,0x4c,0x4f,0x7c,0xd4,0x3b,0x18,0x1e,0xff,0x0c,0x2e,0x0a,0x6c,0x44,0x71,0x90,0x15,0x15,0x5d,0xae,0x0,0xda,0x1d,0x01,0xb4,0x3b,0xfc,0x68,0x77,0xf8,0x51,0x91,0x97,0x1e,0x5b,0x9b,0x75,0x65,0x39,0xc8,0x33,0x6b,0x51,0x66,0x33,0x0c,0xfe,0x29,0xb4,0xe8,0xe2,0x92,0xb7,0x2f,0x1e,0x49,0x59,0x3b,0x9d,0x01,0x74,0x3a,0x03,0x09,0xad,0x33,0x89,0xa9,0x58,0x60,0x4c,0x4c,0x38,0x77,0xd2,0xe4,0xb6,0x4e,0xef,0xc4,0xa9,0xa0,0x19,0x1e,0x45,0x42,0xa6,0xb0,0xaf,0xb9,0x0f,0x93,0x0a,0x62,0xbf,0xb4,0x91,0x44,0x01,0xe5,0xb9,0x46,0x94,0xe7,0x1a,0xd3,0xae,0x4e,0x6e,0x9c,0x5f,0x9e,0xb0,0xb2,0x3e,0x68,0xee,0xcd,0x88,0x7e,0x34,0xd7,0xe8,0x84,0x51,0x48,0x8c,0xc5,0x97,0xb4,0xe3,0x5b,0x22,0xe3,0x58,0x6e,0xee,0xc9,0xa8,0xbb,0xfe,0x9e,0xda,0x73,0x06,0xef,0x36,0xf5,0xd0,0x19,0x84,0x04,0x23,0xab,0x1c,0x7f,0xdc,0x77,0x0e,0x6f,0x1f,0xb7,0xa7,0xfd,0x6f,0x29,0x94,0x82,0x98,0xa9,0x4f,0x5c,0xe8,0xba,0x94,0xdc,0x1f,0x1b,0xc0,0x2c,0x83,0x13,0x87,0xfd,0xd6,0x8c,0xe8,0x88,0x81,0xb0,0x82,0x87,0xb7,0x1f,0x46,0x81,0x45,0x87,0x49,0xf9,0x26,0x94,0xda,0x0c,0x28,0xb5,0x19,0x50,0x66,0x1b,0x70,0x68,0x95,0x5a,0x0d,0x74,0x64,0x76,0x02,0x78,0x83,0x32,0x3a,0x1c,0x7e,0x74,0x38,0x07,0x96,0x42,0x9d,0x4e,0x3f,0x3a,0x1c,0x01,0x9c,0xee,0xce,0x8c,0x1b,0x9c,0x24,0xc6,0xb1,0xcc,0x92,0xd8,0x49,0x31,0xe9,0xf6,0xf7,0x5c,0x43,0x3f,0x3a,0xc2,0x7a,0xf4,0xca,0x99,0x93,0xde,0xb9,0xc7,0x1d,0x1c,0x31,0x15,0x78,0xbe,0x59,0x87,0x52,0xdb,0x80,0xc3,0xab,0xec,0xbc,0x40,0x7c,0xf2,0xff,0xd1,0x9e,0x24,0x1b,0xa9,0xec,0x64,0xd0,0xeb,0x8d,0xcd,0x91,0xef,0x5e,0x4f,0x10,0x1d,0xe7,0x1d,0xa1,0xed,0x0e,0xff,0xa0,0x23,0xb4,0xdd,0xe1,0xcf,0xf8,0x6b,0xda,0x16,0x99,0xfa,0xe2,0x16,0xf3,0x9f,0xb2,0x02,0x20,0x30,0xe0,0x4a,0x4b,0x37,0x5e,0x74,0x96,0x22,0xa0,0x66,0x7e,0x58,0x6f,0xaf,0x27,0x88,0x5e,0x4f,0x10,0x87,0x5b,0x87,0x9a,0x79,0x26,0x9d,0x74,0xde,0x52,0xd0,0x0f,0x8a,0x43,0xc9,0xf9,0xff,0x8e,0xc4,0x71,0x76,0xa2,0xd3,0x85,0xb3,0x7d,0xde,0xa4,0xfc,0xae,0xfd,0x67,0xfa,0xd0,0xef,0x0b,0x21,0x77,0x8c,0x68,0xcc,0x01,0x87,0x66,0x10,0x1d,0xce,0x81,0xc1,0xdd,0xe1,0xf0,0xa3,0xdd,0x11,0x40,0xe7,0xf9,0x01,0x9f,0xad,0x5b,0xa1,0xd3,0xf5,0x2e,0xd4,0xea,0x12,0x9f,0xcf,0x22,0x25,0x3c,0x70,0x46,0x41,0xc6,0x95,0x16,0x3b,0x5e,0x75,0x95,0x22,0x9b,0x0f,0xed,0x79,0x83,0x32,0x9a,0xba,0xdc,0x68,0x1a,0x26,0xb1,0x89,0x24,0x0a,0x83,0x5b,0x65,0x65,0x36,0x3d,0x4a,0xac,0x9f,0x2e,0x2f,0x04,0xc6,0x70,0xa4,0xdd,0x89,0xad,0xbb,0xcf,0x24,0xed,0x1e,0x16,0x97,0x3f,0x8c,0xef,0xff,0xf1,0x63,0xac,0x5e,0x36,0x09,0x93,0x0a,0x4c,0xf0,0x87,0x94,0xcf,0x0c,0xf2,0xc0,0xe0,0x6c,0xde,0xed,0x0e,0xa6,0x5d,0x36,0xde,0x78,0x53,0xa2,0x09,0x60,0xa1,0xa9,0x3f,0x29,0x65,0xa7,0x8c,0x0b,0xbe,0x50,0x0a,0x62,0x85,0xb9,0x0b,0x6f,0xbb,0x8b,0xc9,0x89,0x36,0xc2,0xcc,0xd9,0xda,0xe7,0x43,0x6b,0x0a,0xa7,0x40,0x3b,0xdd,0xed,0xc1,0xc3,0xdb,0x0f,0x53,0x63,0x45,0x41,0x9e,0x14,0xc2,0x95,0x96,0x2e,0x08,0x49,0xea,0xf5,0x29,0xe5,0x91,0xaa,0xd0,0xfa,0xb1,0xd8,0xd4,0x4b,0xbd,0x82,0xc8,0x0a,0x4c,0x82,0x8c,0x95,0x96,0x2e,0x68,0x58,0xf2,0xa6,0xbc,0x94,0x73,0x49,0x4f,0xd5,0xbb,0x51,0xa7,0xa7,0x0c,0x3e,0x44,0x66,0xa3,0x63,0x2a,0xae,0xb2,0x74,0x25,0x6c,0xbf,0x3f,0x6d,0x04,0x0,0x0,0x2e,0x31,0xf5,0x63,0x81,0xb1,0x9f,0x7a,0x09,0x91,0x91,0x18,0x04,0x05,0xd7,0x59,0x3b,0x60,0x93,0x92,0xbf,0xab,0x91,0xb2,0x61,0x78,0xb3,0x0c,0x4e,0x30,0x70,0x7c,0xe8,0xcb,0xa3,0x1e,0x43,0x64,0x0c,0x46,0x41,0xc6,0xb5,0x39,0x5d,0x71,0x49,0xf1,0x9d,0x51,0x02,0x0,0x0,0x75,0x06,0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,0x54,0xe3,0xa7,0x1e,0x47,0xa4,0x04,0x22,0xe3,0x58,0x6c,0xea,0xc5,0x72,0x4b,0x4f,0x4a,0x0e,0xfe,0x81,0x67,0x64,0x5d,0x63,0x2f,0x01,0x80,0xe3,0xe9,0x50,0xe1,0x06,0x41,0xc1,0x35,0x39,0x5d,0x58,0x61,0xe9,0x8e,0x6b,0xee,0x74,0x82,0x18,0x8b,0x4a,0xad,0x0f,0x37,0xd9,0x5a,0x31,0x4d,0xef,0x4e,0xe5,0x0d,0x6b,0x55,0x63,0x32,0x9d,0x88,0x64,0x09,0x70,0x82,0xa5,0xd1,0x89,0xad,0x2a,0xad,0x17,0x25,0x36,0x3f,0x0e,0xf8,0xf3,0xd0,0x18,0x30,0x53,0x6f,0x24,0x12,0x86,0x8e,0x29,0xb8,0xcc,0xdc,0x87,0x2a,0xad,0x37,0x1d,0x1e,0xf7,0xdc,0xaa,0x55,0xab,0xfc,0x63,0x0a,0x0,0x14,0xe5,0x04,0x84,0xf4,0xca,0x5c,0xa3,0x15,0x54,0x5c,0x66,0xea,0x41,0xb9,0xc6,0x87,0xfd,0xde,0x3c,0xb8,0x55,0x89,0x7a,0x27,0x11,0x37,0x18,0x80,0x49,0x3a,0x0f,0x2e,0x31,0xf6,0xa7,0xd3,0xf6,0xf4,0x89,0x8b,0x5f,0x18,0x7e,0x94,0x68,0x34,0x27,0xa1,0xa4,0xa7,0x49,0x5d,0xa1,0xf5,0xa1,0x4c,0xeb,0xc7,0xc9,0x80,0x05,0x1f,0xf9,0x72,0x29,0x78,0x88,0x88,0x39,0x85,0x52,0x10,0x8b,0x4c,0xbd,0xc8,0x93,0x42,0xe9,0xf5,0xe0,0x8c,0x9d,0xbc,0xf8,0xa5,0x61,0xa7,0xf9,0xb5,0x6b,0xd7,0xda,0x01,0x9c,0x4c,0xd7,0x06,0x12,0xc0,0x31,0x43,0xef,0xc2,0x8d,0xb6,0x36,0x4c,0xd1,0x79,0x28,0x88,0x98,0x88,0x09,0x26,0x41,0xc6,0x52,0x53,0x0f,0xae,0xb3,0x76,0xa4,0xdf,0xe0,0x07,0xc0,0x54,0x75,0x57,0x64,0x16,0xc0,0x80,0x89,0xf3,0x06,0x07,0xa6,0xa5,0x7b,0x83,0x2d,0x31,0xf7,0x60,0x8e,0xa1,0x1f,0x87,0x03,0xb9,0x68,0x0a,0x98,0x29,0xd9,0x08,0x11,0x35,0x46,0x41,0xc1,0x1c,0x43,0x3f,0x6a,0xf5,0xde,0xa4,0x25,0xee,0x88,0x01,0x5c,0x95,0xa4,0x37,0x23,0x16,0x0,0x15,0x78,0x83,0x01,0xdf,0xca,0x08,0xe5,0x16,0x15,0x5c,0x66,0xea,0xc1,0x54,0x9d,0x0b,0x87,0x02,0x36,0xb4,0x06,0x8d,0x24,0x04,0xc4,0x98,0xe8,0x05,0x15,0x33,0xf5,0x4e,0x4c,0xd7,0xbb,0x53,0x22,0x8c,0x77,0x82,0x1c,0x3a,0x6f,0xd9,0x47,0x26,0x0,0x5c,0x10,0xde,0x60,0xaa,0xaa,0x22,0x45,0x73,0x06,0x8c,0x87,0x3c,0x29,0x84,0x2b,0xcd,0x76,0x38,0x0c,0x5a,0x1c,0xf6,0x59,0x71,0x26,0x64,0x04,0x9d,0x32,0x24,0x2e,0xc6,0x20,0x28,0xa8,0x33,0xb8,0x30,0x55,0xe7,0x82,0xc4,0x32,0x63,0xaa,0xe0,0xc0,0x1b,0xc3,0x2f,0x97,0x47,0xe0,0xf6,0xdb,0x6f,0xef,0x05,0xb0,0x3f,0x13,0x1b,0xd8,0x26,0x86,0x70,0xb9,0xa5,0x1b,0x5f,0xcd,0x6d,0xc5,0x5c,0x83,0x83,0x62,0x08,0x08,0x0,0x40,0x89,0xc6,0x8f,0x95,0x16,0x3b,0x6e,0xc9,0x3d,0x87,0x99,0x7a,0x67,0xc6,0x0c,0xfe,0xf3,0x4b,0xfa,0x97,0x87,0x7b,0x7d,0xd4,0xbd,0x32,0xce,0xd8,0x16,0xc6,0xf9,0xa2,0xcc,0x35,0xf1,0x14,0xcc,0x35,0x3a,0x30,0xd3,0xe0,0xc4,0xa9,0xa0,0x05,0x27,0x03,0x16,0xb8,0x14,0x0d,0x8d,0x84,0x2c,0x42,0x0,0x47,0x85,0xd6,0x8f,0xe9,0x7a,0x27,0x8a,0x35,0xc1,0xcc,0xfc,0x91,0x8c,0xb5,0x9e,0x3a,0x73,0xe6,0x95,0xa8,0x05,0x40,0x2f,0xcb,0xcf,0x04,0x45,0xf1,0x67,0x0,0x74,0x99,0xdc,0x09,0x34,0x6c,0x60,0xd7,0x60,0x86,0xde,0x85,0x5e,0x59,0x8b,0xa6,0x60,0x0e,0x9a,0x83,0x26,0xc8,0xb4,0x85,0x98,0xb1,0xd8,0xc4,0x10,0xa6,0xeb,0x5d,0xa8,0xd6,0xf9,0x52,0x36,0x6c,0x37,0x76,0xf6,0x3f,0x7f,0x66,0xc3,0x86,0x0d,0xea,0x08,0x96,0xc1,0xe8,0x6c,0x6d,0x68,0xf8,0x0b,0x03,0x6e,0xca,0xb6,0x0e,0xe2,0xe7,0x22,0x9a,0x83,0x66,0x9c,0x0e,0x9a,0xe1,0x90,0xc9,0x2a,0xc8,0x04,0x44,0xc6,0x51,0xa9,0xf1,0xa1,0x46,0xef,0x41,0x59,0x16,0x9d,0x21,0x51,0x18,0x9b,0x7d,0xc7,0x1d,0x77,0x1c,0x89,0xda,0x02,0x0,0x0,0x81,0xf3,0xa7,0x38,0x63,0x59,0x27,0x0,0x06,0xa6,0xa0,0x4e,0xef,0x44,0x9d,0xde,0x09,0x87,0xa2,0x45,0x73,0xd0,0x84,0x33,0x41,0x13,0xbc,0x14,0x61,0x98,0x6e,0x6b,0x5f,0x14,0x6b,0x02,0xa8,0xd1,0x79,0x50,0xa9,0xf5,0x26,0x35,0x05,0x77,0x92,0xf8,0x68,0xa4,0xc1,0x1f,0x91,0x0,0x34,0x9d,0x3d,0xfb,0xe7,0x29,0xd5,0xd5,0x47,0x38,0x30,0x2b,0x9b,0xcd,0xc5,0x05,0xc6,0x10,0x16,0x18,0xfb,0xe1,0x54,0x34,0x68,0x0d,0x19,0xd1,0x16,0x36,0xa2,0x3b,0xac,0xa3,0xed,0xc4,0x14,0x5d,0xd2,0x55,0x68,0xbd,0xa8,0xd6,0xfa,0x50,0xa2,0xf1,0x67,0x94,0x33,0x2f,0x6a,0x01,0xe4,0xfc,0xa7,0x63,0x09,0xe4,0x98,0x6c,0x6d,0x68,0xb8,0x83,0x01,0x0d,0xd4,0xb5,0x2e,0xc4,0xa9,0x68,0xd0,0x16,0x32,0xa2,0x3d,0x6c,0x80,0x3d,0xac,0x83,0x4a,0x5b,0x8a,0x49,0xc3,0x28,0xc8,0x28,0xd5,0x06,0x50,0xae,0xf1,0xa3,0x4c,0xe3,0xcf,0x84,0x7d,0xfb,0x58,0x70,0x52,0x67,0x32,0xd5,0xad,0x5a,0xb5,0x4a,0x19,0xb7,0x05,0x0,0x0,0xfe,0x50,0xe8,0x69,0x93,0x56,0xfb,0x20,0x07,0x26,0x51,0x9d,0x7e,0x8a,0x55,0x0c,0xc3,0x6a,0x70,0xa2,0xce,0xe0,0x84,0xcc,0x19,0xba,0xc2,0x7a,0xb4,0xcb,0x46,0x74,0x86,0xf4,0x70,0x29,0x1a,0xb2,0x0e,0xe2,0x39,0xcb,0x43,0x45,0x91,0x36,0x88,0x62,0xc9,0x8f,0x32,0x6d,0x0,0x36,0x31,0x44,0x95,0x32,0x74,0x76,0x7f,0x64,0xb4,0xc1,0x1f,0xb1,0x05,0x0,0x0,0x4f,0x35,0x34,0xdc,0xcd,0x81,0x47,0xa9,0x5a,0x23,0xc3,0xcf,0x45,0x74,0x85,0xf5,0xe8,0x3a,0x6f,0x1d,0x90,0x20,0x4c,0x0c,0x89,0xa9,0x28,0x90,0x42,0x28,0xd1,0x04,0x50,0x24,0xf9,0x51,0xa0,0x09,0xa5,0x73,0x58,0x6e,0x02,0x46,0x3f,0x6b,0xed,0x77,0xb9,0xa6,0xdc,0x73,0xcf,0x3d,0xc1,0x98,0x08,0xc0,0xb6,0x6d,0xdb,0xc4,0xa0,0xd7,0xbb,0x0f,0xc0,0x7c,0xaa,0xdd,0xe8,0x09,0x72,0x01,0xbd,0xb2,0x0e,0xdd,0x61,0x1d,0xba,0x65,0x3d,0xfa,0x64,0x2d,0x42,0x5c,0xa0,0x8a,0x19,0x06,0x91,0x71,0xe4,0x8a,0x21,0x14,0x48,0x41,0xe4,0x49,0x41,0xe4,0x4b,0x21,0x58,0x53,0xe4,0x22,0x8d,0x74,0x81,0x03,0xb7,0xac,0xad,0xaf,0xff,0x73,0x04,0x56,0x42,0xe4,0x3c,0xbd,0x65,0xcb,0x62,0x55,0x55,0xf7,0x20,0x83,0xc2,0x83,0x93,0x89,0x5b,0x95,0xe0,0x90,0xb5,0xe8,0x95,0xb5,0x70,0xc8,0x5a,0x38,0x54,0x2d,0x7c,0x8a,0x98,0x55,0xbe,0x04,0x2d,0x53,0x61,0x11,0x65,0xe4,0x8a,0x41,0xe4,0x4b,0x41,0x14,0x48,0x21,0x58,0xa5,0x30,0xcd,0xee,0x13,0x19,0xfc,0x8c,0x3d,0xbf,0xf6,0x8e,0x3b,0xbe,0x18,0xe1,0x32,0x21,0x3a,0xb6,0x36,0x34,0x6c,0x62,0xc0,0x3a,0xaa,0xe6,0xf8,0x11,0x52,0x05,0x38,0x55,0x2d,0x1c,0xb2,0x04,0x8f,0xaa,0x81,0x5b,0x91,0xe0,0x55,0x35,0x70,0x28,0x1a,0x28,0x69,0x18,0x9c,0x64,0x11,0x64,0x98,0xc4,0x30,0x2c,0xa2,0x02,0xb3,0x10,0x86,0x45,0x94,0x61,0x15,0x43,0x30,0x0b,0x72,0xea,0xa4,0xcb,0xce,0x1c,0x02,0xe7,0xf7,0xfd,0x4f,0x45,0xb4,0xb4,0x8a,0x7a,0x2d,0x26,0xcb,0x0f,0x28,0x1a,0xcd,0x97,0xc0,0x79,0x01,0xd5,0x75,0x9c,0x66,0x45,0x41,0x45,0xa1,0x10,0x40,0xe1,0x45,0xad,0xa3,0x82,0x9d,0x17,0x03,0x09,0x41,0x2e,0x22,0xa0,0x8a,0x08,0xaa,0x02,0x02,0xaa,0x88,0x0,0x1f,0xf8,0xef,0x20,0x17,0xe0,0x57,0xa5,0xb8,0x27,0x42,0x11,0xc0,0xa1,0x13,0x54,0xe8,0x98,0x02,0xbd,0xa0,0x42,0xcf,0x64,0xe8,0x05,0x15,0x5a,0xa6,0x40,0x2f,0x72,0x18,0x98,0x0c,0x1d,0x53,0x61,0x11,0xc3,0x74,0xa1,0x4b,0x62,0x79,0x24,0xd2,0xc1,0x3f,0x2e,0x0b,0xe0,0xfc,0x52,0xe0,0x2a,0x55,0x55,0x5f,0x45,0x8a,0x5c,0x1f,0x46,0x0c,0x45,0x05,0x43,0x50,0x15,0x20,0x73,0x86,0x10,0x17,0x10,0xe6,0x02,0x64,0x2e,0x40,0x86,0x80,0x70,0x84,0x3b,0x64,0x8c,0x01,0x5a,0xc6,0x21,0x41,0x81,0xc4,0x38,0x24,0xc6,0xa1,0x11,0x54,0x68,0xa1,0x42,0x27,0xd0,0x36,0x5b,0x0a,0xf2,0xea,0xa9,0x96,0x96,0xcf,0x8f,0x14,0xf6,0x1b,0x33,0x01,0x0,0x80,0x27,0x1b,0x1a,0x1e,0x06,0xf0,0x03,0xaa,0x73,0x82,0x48,0x09,0xda,0xb9,0x28,0x2e,0x18,0xee,0xcc,0xff,0xe8,0x96,0xdc,0x38,0x39,0xd5,0xd2,0xb2,0x81,0x31,0xf6,0x1a,0xd5,0x3b,0x41,0x24,0x1d,0x85,0x73,0x7e,0x5b,0xb4,0x83,0x7f,0x42,0x16,0x0,0x0,0x3c,0xb3,0x69,0x53,0x99,0x22,0x08,0xbb,0x29,0x40,0x88,0x20,0x92,0xca,0xbf,0xac,0xa9,0xaf,0x7f,0x64,0x3c,0x1f,0x9c,0xd0,0x76,0xde,0xad,0xeb,0xd7,0xb7,0x33,0xce,0xaf,0x01,0xd0,0x41,0x6d,0x40,0x10,0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x7b,0x4d,0xe6,0xfc,0x95,0xfa,0xfa,0xfa,0xce,0x54,0x7a,0xb8,0xb4,0xc8,0x30,0xf9,0xd4,0x53,0x4f,0xe5,0xa8,0xe1,0xf0,0xe5,0x60,0x6c,0x36,0x38,0x9f,0x2e,0x70,0x3e,0x93,0x33,0x36,0x03,0x74,0xfa,0x90,0x48,0x99,0x91,0xc4,0x64,0x70,0xde,0xcc,0x81,0xa3,0x02,0xe7,0x27,0x38,0x70,0x5c,0x11,0x84,0xf7,0x47,0xbb,0x97,0x8f,0x04,0x20,0x06,0xfe,0x03,0x8f,0x46,0xa3,0xd5,0x01,0x16,0xce,0x98,0x89,0x31,0xa6,0xa5,0x9e,0x48,0x24,0x0a,0x55,0x96,0x9d,0x5c,0xab,0x0d,0x89,0xa2,0xe8,0xd6,0x68,0x34,0xde,0x58,0x1c,0xce,0x21,0x08,0x82,0x20,0x08,0x82,0x20,0x08,0x82,0x88,0x23,0xff,0x1f,0x03,0x13,0x3a,0x12,0x64,0x41,0x40,0x31,0x0,0x0,0x0,0x0,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
+static const unsigned char app_icon_png[] = {
+ 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d,
+ 0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40,
+ 0x08, 0x06, 0x00, 0x00, 0x00, 0xaa, 0x69, 0x71, 0xde, 0x00, 0x00, 0x00,
+ 0x04, 0x73, 0x42, 0x49, 0x54, 0x08, 0x08, 0x08, 0x08, 0x7c, 0x08, 0x64,
+ 0x88, 0x00, 0x00, 0x00, 0x09, 0x70, 0x48, 0x59, 0x73, 0x00, 0x00, 0x00,
+ 0xdd, 0x00, 0x00, 0x00, 0xdd, 0x01, 0x70, 0x53, 0xa2, 0x07, 0x00, 0x00,
+ 0x00, 0x19, 0x74, 0x45, 0x58, 0x74, 0x53, 0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0xe5, 0x31, 0xec, 0xed, 0xeb, 0x91, 0x0f, 0x2b, 0x0a, 0x73,
+ 0xf4, 0x5f, 0x49, 0x8d, 0x11, 0xd7, 0xee, 0xc3, 0xc9, 0xc2, 0x92, 0x48,
+ 0xa7, 0xd5, 0x7e, 0x87, 0x86, 0xcc, 0x42, 0xc9, 0x0c, 0x25, 0x6a, 0x3a,
+ 0x8a, 0x54, 0x84, 0x24, 0x50, 0x76, 0x10, 0xc5, 0x95, 0x46, 0xeb, 0x76,
+ 0x50, 0x02, 0xd2, 0x04, 0xaa, 0x09, 0xa4, 0x01, 0xd4, 0x97, 0x28, 0xed,
+ 0x8c, 0xa6, 0xd4, 0x67, 0x6d, 0x31, 0xb6, 0x13, 0xa1, 0x2c, 0xef, 0x1b,
+ 0xb8, 0x81, 0x1b, 0x18, 0x15, 0xff, 0x0b, 0x12, 0x38, 0x4d, 0x79, 0xd2,
+ 0x8f, 0xa8, 0xd2, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae,
+ 0x42, 0x60, 0x82
};
static const Color boot_splash_bg_color = Color(224/255.0,224/255.0,224/255.0);
diff --git a/methods.py b/methods.py
index 7128b334ec..74c282b8cf 100755
--- a/methods.py
+++ b/methods.py
@@ -1326,7 +1326,9 @@ def android_add_aidl_dir(self,subpath):
def android_add_jni_dir(self,subpath):
base_path = self.Dir(".").abspath+"/modules/"+self.current_module+"/"+subpath
self.android_jni_dirs.append(base_path)
-
+def android_add_default_config(self,config):
+ self.android_default_config.append(config)
+
def android_add_to_manifest(self,file):
base_path = self.Dir(".").abspath+"/modules/"+self.current_module+"/"+file
f = open(base_path,"rb")
diff --git a/modules/gdscript/gd_parser.cpp b/modules/gdscript/gd_parser.cpp
index 4a199eb6a8..6a7cd5eb8c 100644
--- a/modules/gdscript/gd_parser.cpp
+++ b/modules/gdscript/gd_parser.cpp
@@ -514,6 +514,7 @@ GDParser::Node* GDParser::_parse_expression(Node *p_parent,bool p_static,bool p_
} else if (/*tokenizer->get_token()==GDTokenizer::TK_OP_ADD ||*/ tokenizer->get_token()==GDTokenizer::TK_OP_SUB || tokenizer->get_token()==GDTokenizer::TK_OP_NOT || tokenizer->get_token()==GDTokenizer::TK_OP_BIT_INVERT) {
//single prefix operators like !expr -expr ++expr --expr
+ alloc_node<OperatorNode>();
Expression e;
e.is_op=true;
@@ -1535,6 +1536,10 @@ void GDParser::_parse_block(BlockNode *p_block,bool p_static) {
return;
}
tokenizer->advance();
+ if(tokenizer->get_token()==GDTokenizer::TK_SEMICOLON) {
+ // Ignore semicolon after 'pass'
+ tokenizer->advance();
+ }
} break;
case GDTokenizer::TK_PR_VAR: {
//variale declaration and (eventual) initialization
diff --git a/platform/android/SCsub b/platform/android/SCsub
index c8feac8690..60bb4bd613 100644
--- a/platform/android/SCsub
+++ b/platform/android/SCsub
@@ -79,6 +79,11 @@ for x in env.android_jni_dirs:
gradle_asset_dirs_text=""
+gradle_default_config_text=""
+
+for x in env.android_default_config:
+ gradle_default_config_text+=x+"\n\t\t"
+
gradle_text = gradle_text.replace("$$GRADLE_REPOSITORY_URLS$$",gradle_maven_repos_text)
gradle_text = gradle_text.replace("$$GRADLE_DEPENDENCIES$$",gradle_maven_dependencies_text)
gradle_text = gradle_text.replace("$$GRADLE_JAVA_DIRS$$",gradle_java_dirs_text)
@@ -86,6 +91,7 @@ gradle_text = gradle_text.replace("$$GRADLE_RES_DIRS$$",gradle_res_dirs_text)
gradle_text = gradle_text.replace("$$GRADLE_ASSET_DIRS$$",gradle_asset_dirs_text)
gradle_text = gradle_text.replace("$$GRADLE_AIDL_DIRS$$",gradle_aidl_dirs_text)
gradle_text = gradle_text.replace("$$GRADLE_JNI_DIRS$$",gradle_jni_dirs_text)
+gradle_text = gradle_text.replace("$$GRADLE_DEFAULT_CONFIG$$",gradle_default_config_text)
gradle_baseout.write( gradle_text )
@@ -103,4 +109,22 @@ pp_baseout.write( manifest )
env_android.SharedLibrary("#bin/libgodot",[android_objects],SHLIBSUFFIX=env["SHLIBSUFFIX"])
-#env.Command('#bin/libgodot_android.so', '#platform/android/libgodot_android.so', Copy('bin/libgodot_android.so', 'platform/android/libgodot_android.so'))
+
+lib_arch_dir = ''
+if env['android_arch'] == 'armv6':
+ lib_arch_dir = 'armeabi'
+elif env['android_arch'] == 'armv7':
+ lib_arch_dir = 'armeabi-v7a'
+elif env['android_arch'] == 'x86':
+ lib_arch_dir = 'x86'
+else:
+ print 'WARN: Architecture not suitable for embedding into APK; keeping .so at \\bin'
+
+if lib_arch_dir != '':
+ if env['target'] == 'release':
+ lib_type_dir = 'release'
+ else: # release_debug, debug
+ lib_type_dir = 'debug'
+
+ out_dir = '#platform/android/java/libs/'+lib_type_dir+'/'+lib_arch_dir
+ env_android.Command(out_dir+'/libgodot_android.so', '#bin/libgodot'+env['SHLIBSUFFIX'], Move("$TARGET", "$SOURCE"))
diff --git a/platform/android/build.gradle.template b/platform/android/build.gradle.template
index 1e1461ef29..24951b921b 100644
--- a/platform/android/build.gradle.template
+++ b/platform/android/build.gradle.template
@@ -3,7 +3,7 @@ buildscript {
jcenter()
}
dependencies {
- classpath 'com.android.tools.build:gradle:1.3.1'
+ classpath 'com.android.tools.build:gradle:2.1.0'
}
}
@@ -39,6 +39,12 @@ android {
defaultConfig {
minSdkVersion 14
targetSdkVersion 23
+ $$GRADLE_DEFAULT_CONFIG$$
+ }
+ // Both signing and zip-aligning will be done at export time
+ buildTypes.all { buildType ->
+ buildType.zipAlignEnabled false
+ buildType.signingConfig null
}
sourceSets {
main {
@@ -65,8 +71,17 @@ android {
$$GRADLE_JNI_DIRS$$
]
}
-
+ debug.jniLibs.srcDirs = [
+ 'libs/debug'
+ $$GRADLE_JNI_DIRS$$
+ ]
+ release.jniLibs.srcDirs = [
+ 'libs/release'
+ $$GRADLE_JNI_DIRS$$
+ ]
+ }
+ applicationVariants.all { variant ->
+ // ApplicationVariant is undocumented, but this method is widely used; may break with another version of the Android Gradle plugin
+ variant.outputs.get(0).setOutputFile(new File("${projectDir}/../../../bin", "android_${variant.name}.apk"))
}
-
-
}
diff --git a/platform/android/detect.py b/platform/android/detect.py
index ba6b73a89f..6fd0b81d91 100644
--- a/platform/android/detect.py
+++ b/platform/android/detect.py
@@ -23,7 +23,7 @@ def get_opts():
('ANDROID_NDK_ROOT', 'the path to Android NDK', os.environ.get("ANDROID_NDK_ROOT", 0)),
('NDK_TARGET', 'toolchain to use for the NDK',os.environ.get("NDK_TARGET", "arm-linux-androideabi-4.9")),
('NDK_TARGET_X86', 'toolchain to use for the NDK x86',os.environ.get("NDK_TARGET_X86", "x86-4.9")),
- ('ndk_platform', 'compile for platform: (android-<api> , example: android-15)',"android-15"),
+ ('ndk_platform', 'compile for platform: (android-<api> , example: android-14)',"android-14"),
('android_arch', 'select compiler architecture: (armv7/armv6/x86)',"armv7"),
('android_neon','enable neon (armv7 only)',"yes"),
('android_stl','enable STL support in android port (for modules)',"no")
diff --git a/platform/android/export/export.cpp b/platform/android/export/export.cpp
index 872f047c95..83f7292716 100644
--- a/platform/android/export/export.cpp
+++ b/platform/android/export/export.cpp
@@ -1166,7 +1166,7 @@ Error EditorExportPlatformAndroid::export_project(const String& p_path, bool p_d
skip=true;
}
- if (file=="lib/armeabi/libgodot_android.so" && !export_arm) {
+ if (file.match("lib/armeabi*/libgodot_android.so") && !export_arm) {
skip=true;
}
diff --git a/platform/android/file_access_jandroid.cpp b/platform/android/file_access_jandroid.cpp
index da8ceaff14..ea33e9a67b 100644
--- a/platform/android/file_access_jandroid.cpp
+++ b/platform/android/file_access_jandroid.cpp
@@ -182,8 +182,10 @@ bool FileAccessJAndroid::file_exists(const String& p_path) {
jstring js = env->NewStringUTF(path.utf8().get_data());
int res = env->CallIntMethod(io,_file_open,js,false);
- if (res<=0)
+ if (res<=0) {
+ env->DeleteLocalRef(js);
return false;
+ }
env->CallVoidMethod(io,_file_close,res);
env->DeleteLocalRef(js);
return true;
diff --git a/platform/android/java/gradle/wrapper/gradle-wrapper.properties b/platform/android/java/gradle/wrapper/gradle-wrapper.properties
index 0c71e760dc..d57051703e 100644
--- a/platform/android/java/gradle/wrapper/gradle-wrapper.properties
+++ b/platform/android/java/gradle/wrapper/gradle-wrapper.properties
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-2.2.1-all.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-2.10-all.zip
diff --git a/platform/javascript/os_javascript.cpp b/platform/javascript/os_javascript.cpp
index 2e42e79996..1defcb7cb2 100644
--- a/platform/javascript/os_javascript.cpp
+++ b/platform/javascript/os_javascript.cpp
@@ -415,6 +415,9 @@ void OS_JavaScript::push_input(const InputEvent& p_ev) {
InputEvent ev = p_ev;
ev.ID=last_id++;
+ if (ev.type==InputEvent::MOUSE_MOTION) {
+ input->set_mouse_pos(Point2(ev.mouse_motion.x, ev.mouse_motion.y));
+ }
input->parse_input_event(p_ev);
}
diff --git a/platform/osx/export/export.cpp b/platform/osx/export/export.cpp
index cb0514da9d..47b0392b25 100644
--- a/platform/osx/export/export.cpp
+++ b/platform/osx/export/export.cpp
@@ -48,6 +48,11 @@ class EditorExportPlatformOSX : public EditorExportPlatform {
String custom_release_package;
String custom_debug_package;
+ enum BitsMode {
+ BITS_FAT,
+ BITS_64,
+ BITS_32
+ };
int version_code;
@@ -59,8 +64,7 @@ class EditorExportPlatformOSX : public EditorExportPlatform {
String version;
String signature;
String copyright;
- bool use64;
- bool useFat;
+ BitsMode bits_mode;
bool high_resolution;
Ref<ImageTexture> logo;
@@ -83,7 +87,7 @@ public:
virtual bool poll_devices() { return false;}
- virtual int get_device_count() const { return 0; };
+ virtual int get_device_count() const { return 0; }
virtual String get_device_name(int p_device) const { return String(); }
virtual String get_device_info(int p_device) const { return String(); }
virtual Error run(int p_device,int p_flags=0);
@@ -122,10 +126,8 @@ bool EditorExportPlatformOSX::_set(const StringName& p_name, const Variant& p_va
version=p_value;
else if (n=="application/copyright")
copyright=p_value;
- else if (n=="application/64_bits")
- use64=p_value;
- else if (n=="application/fat_bits")
- useFat=p_value;
+ else if (n=="application/bits_mode")
+ bits_mode=BitsMode(int(p_value));
else if (n=="display/high_res")
high_resolution=p_value;
else
@@ -158,10 +160,8 @@ bool EditorExportPlatformOSX::_get(const StringName& p_name,Variant &r_ret) cons
r_ret=version;
else if (n=="application/copyright")
r_ret=copyright;
- else if (n=="application/64_bits")
- r_ret=use64;
- else if (n=="application/fat_bits")
- r_ret=useFat;
+ else if (n=="application/bits_mode")
+ r_ret=bits_mode;
else if (n=="display/high_res")
r_ret=high_resolution;
else
@@ -182,13 +182,9 @@ void EditorExportPlatformOSX::_get_property_list( List<PropertyInfo> *p_list) co
p_list->push_back( PropertyInfo( Variant::STRING, "application/short_version") );
p_list->push_back( PropertyInfo( Variant::STRING, "application/version") );
p_list->push_back( PropertyInfo( Variant::STRING, "application/copyright") );
- p_list->push_back( PropertyInfo( Variant::BOOL, "application/64_bits") );
- p_list->push_back( PropertyInfo( Variant::BOOL, "application/fat_bits") );
+ p_list->push_back( PropertyInfo( Variant::INT, "application/bits_mode", PROPERTY_HINT_ENUM, "Fat (32 & 64 bits),64 bits,32 bits") );
p_list->push_back( PropertyInfo( Variant::BOOL, "display/high_res") );
-
- //p_list->push_back( PropertyInfo( Variant::INT, "resources/pack_mode", PROPERTY_HINT_ENUM,"Copy,Single Exec.,Pack (.pck),Bundles (Optical)"));
-
}
void EditorExportPlatformOSX::_make_icon(const Image& p_icon,Vector<uint8_t>& icon) {
@@ -321,7 +317,8 @@ Error EditorExportPlatformOSX::export_project(const String& p_path, bool p_debug
io2.opaque=&dst_f;
zipFile dpkg=zipOpen2(p_path.utf8().get_data(),APPEND_STATUS_CREATE,NULL,&io2);
- String binary_to_use="godot_osx_"+String(p_debug?"debug":"release")+"."+String(useFat?"fat":use64?"64":"32");
+ String binary_to_use = "godot_osx_" + String(p_debug ? "debug" : "release") + ".";
+ binary_to_use += String(bits_mode==BITS_FAT ? "fat" : bits_mode==BITS_64 ? "64" : "32");
print_line("binary: "+binary_to_use);
String pkg_name;
@@ -333,6 +330,8 @@ Error EditorExportPlatformOSX::export_project(const String& p_path, bool p_debug
pkg_name="Unnamed";
+ bool found_binary = false;
+
while(ret==UNZ_OK) {
//get filename
@@ -366,6 +365,7 @@ Error EditorExportPlatformOSX::export_project(const String& p_path, bool p_debug
ret = unzGoToNextFile(pkg);
continue; //ignore!
}
+ found_binary = true;
file="Contents/MacOS/"+pkg_name;
}
@@ -420,6 +420,13 @@ Error EditorExportPlatformOSX::export_project(const String& p_path, bool p_debug
ret = unzGoToNextFile(pkg);
}
+ if (!found_binary) {
+ ERR_PRINTS("Requested template binary '"+binary_to_use+"' not found. It might be missing from your template archive.");
+ zipClose(dpkg,NULL);
+ unzClose(pkg);
+ return ERR_FILE_NOT_FOUND;
+ }
+
ep.step("Making PKG",1);
@@ -487,13 +494,12 @@ EditorExportPlatformOSX::EditorExportPlatformOSX() {
logo = Ref<ImageTexture>( memnew( ImageTexture ));
logo->create_from_image(img);
- info="This Game is Nice";
- identifier="com.godot.macgame";
+ info="Made with Godot Engine";
+ identifier="org.godotengine.macgame";
signature="godotmacgame";
short_version="1.0";
version="1.0";
- use64=false;
- useFat=false;
+ bits_mode=BITS_FAT;
high_resolution=false;
}
diff --git a/platform/windows/os_windows.cpp b/platform/windows/os_windows.cpp
index 89de969cff..b0a50ca4b8 100644
--- a/platform/windows/os_windows.cpp
+++ b/platform/windows/os_windows.cpp
@@ -2178,6 +2178,68 @@ String OS_Windows::get_locale() const {
return "en";
}
+
+OS::LatinKeyboardVariant OS_Windows::get_latin_keyboard_variant() const {
+
+ unsigned long azerty[] = {
+ 0x00020401, // Arabic (102) AZERTY
+ 0x0001080c, // Belgian (Comma)
+ 0x0000080c, // Belgian French
+ 0x0000040c, // French
+ 0 // <--- STOP MARK
+ };
+ unsigned long qwertz[] = {
+ 0x0000041a, // Croation
+ 0x00000405, // Czech
+ 0x00000407, // German
+ 0x00010407, // German (IBM)
+ 0x0000040e, // Hungarian
+ 0x0000046e, // Luxembourgish
+ 0x00010415, // Polish (214)
+ 0x00000418, // Romanian (Legacy)
+ 0x0000081a, // Serbian (Latin)
+ 0x0000041b, // Slovak
+ 0x00000424, // Slovenian
+ 0x0001042e, // Sorbian Extended
+ 0x0002042e, // Sorbian Standard
+ 0x0000042e, // Sorbian Standard (Legacy)
+ 0x0000100c, // Swiss French
+ 0x00000807, // Swiss German
+ 0 // <--- STOP MARK
+ };
+ unsigned long dvorak[] = {
+ 0x00010409, // US-Dvorak
+ 0x00030409, // US-Dvorak for left hand
+ 0x00040409, // US-Dvorak for right hand
+ 0 // <--- STOP MARK
+ };
+
+ char name[ KL_NAMELENGTH + 1 ]; name[0] = 0;
+ GetKeyboardLayoutNameA( name );
+
+ unsigned long hex = strtoul(name, NULL, 16);
+
+ int i=0;
+ while( azerty[i] != 0 ) {
+ if (azerty[i] == hex) return LATIN_KEYBOARD_AZERTY;
+ i++;
+ }
+
+ i = 0;
+ while( qwertz[i] != 0 ) {
+ if (qwertz[i] == hex) return LATIN_KEYBOARD_QWERTZ;
+ i++;
+ }
+
+ i = 0;
+ while( dvorak[i] != 0 ) {
+ if (dvorak[i] == hex) return LATIN_KEYBOARD_DVORAK;
+ i++;
+ }
+
+ return LATIN_KEYBOARD_QWERTY;
+}
+
void OS_Windows::release_rendering_thread() {
gl_context->release_current();
diff --git a/platform/windows/os_windows.h b/platform/windows/os_windows.h
index d2249bf352..5acb300c0f 100644
--- a/platform/windows/os_windows.h
+++ b/platform/windows/os_windows.h
@@ -266,6 +266,7 @@ public:
virtual String get_executable_path() const;
virtual String get_locale() const;
+ virtual LatinKeyboardVariant get_latin_keyboard_variant() const;
virtual void move_window_to_foreground();
virtual String get_data_dir() const;
diff --git a/platform/winrt/include/FunctionDiscoveryKeys_devpkey.h b/platform/winrt/include/FunctionDiscoveryKeys_devpkey.h
deleted file mode 100644
index 25fa6660c2..0000000000
--- a/platform/winrt/include/FunctionDiscoveryKeys_devpkey.h
+++ /dev/null
@@ -1,213 +0,0 @@
-#pragma once
-#if 0
-/*++
-
-Copyright (c) Microsoft Corporation. All rights reserved.
-
-Module Name:
-
- devpkey.h
-
-Abstract:
-
- Defines property keys for the Plug and Play Device Property API.
-
-Author:
-
- Jim Cavalaris (jamesca) 10-14-2003
-
-Environment:
-
- User-mode only.
-
-Revision History:
-
- 14-October-2003 jamesca
-
- Creation and initial implementation.
-
- 20-June-2006 dougb
-
- Copied Jim's version replaced "DEFINE_DEVPROPKEY(DEVPKEY_" with "DEFINE_PROPERTYKEY(PKEY_"
-
---*/
-
-//#include <devpropdef.h>
-
-//
-// _NAME
-//
-
-DEFINE_PROPERTYKEY(PKEY_NAME, 0xb725f130, 0x47ef, 0x101a, 0xa5, 0xf1, 0x02, 0x60, 0x8c, 0x9e, 0xeb, 0xac, 10); // DEVPROP_TYPE_STRING
-
-//
-// Device properties
-// These PKEYs correspond to the old setupapi SPDRP_XXX properties
-//
-DEFINE_PROPERTYKEY(PKEY_Device_DeviceDesc, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 2); // DEVPROP_TYPE_STRING
-DEFINE_PROPERTYKEY(PKEY_Device_HardwareIds, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 3); // DEVPROP_TYPE_STRING_LIST
-DEFINE_PROPERTYKEY(PKEY_Device_CompatibleIds, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 4); // DEVPROP_TYPE_STRING_LIST
-DEFINE_PROPERTYKEY(PKEY_Device_Service, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 6); // DEVPROP_TYPE_STRING
-DEFINE_PROPERTYKEY(PKEY_Device_Class, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 9); // DEVPROP_TYPE_STRING
-DEFINE_PROPERTYKEY(PKEY_Device_ClassGuid, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 10); // DEVPROP_TYPE_GUID
-DEFINE_PROPERTYKEY(PKEY_Device_Driver, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 11); // DEVPROP_TYPE_STRING
-DEFINE_PROPERTYKEY(PKEY_Device_ConfigFlags, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 12); // DEVPROP_TYPE_UINT32
-DEFINE_PROPERTYKEY(PKEY_Device_Manufacturer, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 13); // DEVPROP_TYPE_STRING
-DEFINE_PROPERTYKEY(PKEY_Device_FriendlyName, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 14); // DEVPROP_TYPE_STRING
-DEFINE_PROPERTYKEY(PKEY_Device_LocationInfo, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 15); // DEVPROP_TYPE_STRING
-DEFINE_PROPERTYKEY(PKEY_Device_PDOName, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 16); // DEVPROP_TYPE_STRING
-DEFINE_PROPERTYKEY(PKEY_Device_Capabilities, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 17); // DEVPROP_TYPE_UNINT32
-DEFINE_PROPERTYKEY(PKEY_Device_UINumber, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 18); // DEVPROP_TYPE_STRING
-DEFINE_PROPERTYKEY(PKEY_Device_UpperFilters, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 19); // DEVPROP_TYPE_STRING_LIST
-DEFINE_PROPERTYKEY(PKEY_Device_LowerFilters, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 20); // DEVPROP_TYPE_STRING_LIST
-DEFINE_PROPERTYKEY(PKEY_Device_BusTypeGuid, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 21); // DEVPROP_TYPE_GUID
-DEFINE_PROPERTYKEY(PKEY_Device_LegacyBusType, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 22); // DEVPROP_TYPE_UINT32
-DEFINE_PROPERTYKEY(PKEY_Device_BusNumber, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 23); // DEVPROP_TYPE_UINT32
-DEFINE_PROPERTYKEY(PKEY_Device_EnumeratorName, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 24); // DEVPROP_TYPE_STRING
-DEFINE_PROPERTYKEY(PKEY_Device_Security, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 25); // DEVPROP_TYPE_SECURITY_DESCRIPTOR
-DEFINE_PROPERTYKEY(PKEY_Device_SecuritySDS, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 26); // DEVPROP_TYPE_SECURITY_DESCRIPTOR_STRING
-DEFINE_PROPERTYKEY(PKEY_Device_DevType, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 27); // DEVPROP_TYPE_UINT32
-DEFINE_PROPERTYKEY(PKEY_Device_Exclusive, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 28); // DEVPROP_TYPE_UINT32
-DEFINE_PROPERTYKEY(PKEY_Device_Characteristics, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 29); // DEVPROP_TYPE_UINT32
-DEFINE_PROPERTYKEY(PKEY_Device_Address, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 30); // DEVPROP_TYPE_UINT32
-DEFINE_PROPERTYKEY(PKEY_Device_UINumberDescFormat, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 31); // DEVPROP_TYPE_STRING
-DEFINE_PROPERTYKEY(PKEY_Device_PowerData, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 32); // DEVPROP_TYPE_BINARY
-DEFINE_PROPERTYKEY(PKEY_Device_RemovalPolicy, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 33); // DEVPROP_TYPE_UINT32
-DEFINE_PROPERTYKEY(PKEY_Device_RemovalPolicyDefault, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 34); // DEVPROP_TYPE_UINT32
-DEFINE_PROPERTYKEY(PKEY_Device_RemovalPolicyOverride, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 35); // DEVPROP_TYPE_UINT32
-DEFINE_PROPERTYKEY(PKEY_Device_InstallState, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 36); // DEVPROP_TYPE_UINT32
-DEFINE_PROPERTYKEY(PKEY_Device_LocationPaths, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 37); // DEVPROP_TYPE_STRING_LIST
-DEFINE_PROPERTYKEY(PKEY_Device_BaseContainerId, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 38); // DEVPROP_TYPE_GUID
-
-//
-// Device properties
-// These PKEYs correspond to a device's status and problem code
-//
-DEFINE_PROPERTYKEY(PKEY_Device_DevNodeStatus, 0x4340a6c5, 0x93fa, 0x4706, 0x97, 0x2c, 0x7b, 0x64, 0x80, 0x08, 0xa5, 0xa7, 2); // DEVPROP_TYPE_UINT32
-DEFINE_PROPERTYKEY(PKEY_Device_ProblemCode, 0x4340a6c5, 0x93fa, 0x4706, 0x97, 0x2c, 0x7b, 0x64, 0x80, 0x08, 0xa5, 0xa7, 3); // DEVPROP_TYPE_UINT32
-
-//
-// Device properties
-// These PKEYs correspond to device relations
-//
-DEFINE_PROPERTYKEY(PKEY_Device_EjectionRelations, 0x4340a6c5, 0x93fa, 0x4706, 0x97, 0x2c, 0x7b, 0x64, 0x80, 0x08, 0xa5, 0xa7, 4); // DEVPROP_TYPE_STRING_LIST
-DEFINE_PROPERTYKEY(PKEY_Device_RemovalRelations, 0x4340a6c5, 0x93fa, 0x4706, 0x97, 0x2c, 0x7b, 0x64, 0x80, 0x08, 0xa5, 0xa7, 5); // DEVPROP_TYPE_STRING_LIST
-DEFINE_PROPERTYKEY(PKEY_Device_PowerRelations, 0x4340a6c5, 0x93fa, 0x4706, 0x97, 0x2c, 0x7b, 0x64, 0x80, 0x08, 0xa5, 0xa7, 6); // DEVPROP_TYPE_STRING_LIST
-DEFINE_PROPERTYKEY(PKEY_Device_BusRelations, 0x4340a6c5, 0x93fa, 0x4706, 0x97, 0x2c, 0x7b, 0x64, 0x80, 0x08, 0xa5, 0xa7, 7); // DEVPROP_TYPE_STRING_LIST
-DEFINE_PROPERTYKEY(PKEY_Device_Parent, 0x4340a6c5, 0x93fa, 0x4706, 0x97, 0x2c, 0x7b, 0x64, 0x80, 0x08, 0xa5, 0xa7, 8); // DEVPROP_TYPE_STRING
-DEFINE_PROPERTYKEY(PKEY_Device_Children, 0x4340a6c5, 0x93fa, 0x4706, 0x97, 0x2c, 0x7b, 0x64, 0x80, 0x08, 0xa5, 0xa7, 9); // DEVPROP_TYPE_STRING_LIST
-DEFINE_PROPERTYKEY(PKEY_Device_Siblings, 0x4340a6c5, 0x93fa, 0x4706, 0x97, 0x2c, 0x7b, 0x64, 0x80, 0x08, 0xa5, 0xa7, 10); // DEVPROP_TYPE_STRING_LIST
-DEFINE_PROPERTYKEY(PKEY_Device_TransportRelations, 0x4340a6c5, 0x93fa, 0x4706, 0x97, 0x2c, 0x7b, 0x64, 0x80, 0x08, 0xa5, 0xa7, 11); // DEVPROP_TYPE_STRING_LIST
-
-//
-// Other Device properties
-//
-DEFINE_PROPERTYKEY(PKEY_Device_Reported, 0x80497100, 0x8c73, 0x48b9, 0xaa, 0xd9, 0xce, 0x38, 0x7e, 0x19, 0xc5, 0x6e, 2); // DEVPROP_TYPE_BOOLEAN
-DEFINE_PROPERTYKEY(PKEY_Device_Legacy, 0x80497100, 0x8c73, 0x48b9, 0xaa, 0xd9, 0xce, 0x38, 0x7e, 0x19, 0xc5, 0x6e, 3); // DEVPROP_TYPE_BOOLEAN
-DEFINE_PROPERTYKEY(PKEY_Device_InstanceId, 0x78c34fc8, 0x104a, 0x4aca, 0x9e, 0xa4, 0x52, 0x4d, 0x52, 0x99, 0x6e, 0x57, 256); // DEVPROP_TYPE_STRING
-
-DEFINE_PROPERTYKEY(PKEY_Device_ContainerId, 0x8c7ed206, 0x3f8a, 0x4827, 0xb3, 0xab, 0xae, 0x9e, 0x1f, 0xae, 0xfc, 0x6c, 2); // DEVPROP_TYPE_GUID
-
-DEFINE_PROPERTYKEY(PKEY_Device_ModelId, 0x80d81ea6, 0x7473, 0x4b0c, 0x82, 0x16, 0xef, 0xc1, 0x1a, 0x2c, 0x4c, 0x8b, 2); // DEVPROP_TYPE_GUID
-
-DEFINE_PROPERTYKEY(PKEY_Device_FriendlyNameAttributes, 0x80d81ea6, 0x7473, 0x4b0c, 0x82, 0x16, 0xef, 0xc1, 0x1a, 0x2c, 0x4c, 0x8b, 3); // DEVPROP_TYPE_UINT32
-DEFINE_PROPERTYKEY(PKEY_Device_ManufacturerAttributes, 0x80d81ea6, 0x7473, 0x4b0c, 0x82, 0x16, 0xef, 0xc1, 0x1a, 0x2c, 0x4c, 0x8b, 4); // DEVPROP_TYPE_UINT32
-
-DEFINE_PROPERTYKEY(PKEY_Device_PresenceNotForDevice, 0x80d81ea6, 0x7473, 0x4b0c, 0x82, 0x16, 0xef, 0xc1, 0x1a, 0x2c, 0x4c, 0x8b, 5); // DEVPROP_TYPE_BOOLEAN
-
-
-DEFINE_PROPERTYKEY(PKEY_Numa_Proximity_Domain, 0x540b947e, 0x8b40, 0x45bc, 0xa8, 0xa2, 0x6a, 0x0b, 0x89, 0x4c, 0xbd, 0xa2, 1); // DEVPROP_TYPE_UINT32
-DEFINE_PROPERTYKEY(PKEY_Device_DHP_Rebalance_Policy, 0x540b947e, 0x8b40, 0x45bc, 0xa8, 0xa2, 0x6a, 0x0b, 0x89, 0x4c, 0xbd, 0xa2, 2); // DEVPROP_TYPE_UINT32
-DEFINE_PROPERTYKEY(PKEY_Device_Numa_Node, 0x540b947e, 0x8b40, 0x45bc, 0xa8, 0xa2, 0x6a, 0x0b, 0x89, 0x4c, 0xbd, 0xa2, 3); // DEVPROP_TYPE_UINT32
-DEFINE_PROPERTYKEY(PKEY_Device_BusReportedDeviceDesc, 0x540b947e, 0x8b40, 0x45bc, 0xa8, 0xa2, 0x6a, 0x0b, 0x89, 0x4c, 0xbd, 0xa2, 4); // DEVPROP_TYPE_STRING
-
-DEFINE_PROPERTYKEY(PKEY_Device_InstallInProgress, 0x83da6326, 0x97a6, 0x4088, 0x94, 0x53, 0xa1, 0x92, 0x3f, 0x57, 0x3b, 0x29, 9); // DEVPROP_TYPE_BOOLEAN
-
-//
-// Device driver properties
-//
-DEFINE_PROPERTYKEY(PKEY_Device_DriverDate, 0xa8b865dd, 0x2e3d, 0x4094, 0xad, 0x97, 0xe5, 0x93, 0xa7, 0xc, 0x75, 0xd6, 2); // DEVPROP_TYPE_FILETIME
-DEFINE_PROPERTYKEY(PKEY_Device_DriverVersion, 0xa8b865dd, 0x2e3d, 0x4094, 0xad, 0x97, 0xe5, 0x93, 0xa7, 0xc, 0x75, 0xd6, 3); // DEVPROP_TYPE_STRING
-DEFINE_PROPERTYKEY(PKEY_Device_DriverDesc, 0xa8b865dd, 0x2e3d, 0x4094, 0xad, 0x97, 0xe5, 0x93, 0xa7, 0xc, 0x75, 0xd6, 4); // DEVPROP_TYPE_STRING
-DEFINE_PROPERTYKEY(PKEY_Device_DriverInfPath, 0xa8b865dd, 0x2e3d, 0x4094, 0xad, 0x97, 0xe5, 0x93, 0xa7, 0xc, 0x75, 0xd6, 5); // DEVPROP_TYPE_STRING
-DEFINE_PROPERTYKEY(PKEY_Device_DriverInfSection, 0xa8b865dd, 0x2e3d, 0x4094, 0xad, 0x97, 0xe5, 0x93, 0xa7, 0xc, 0x75, 0xd6, 6); // DEVPROP_TYPE_STRING
-DEFINE_PROPERTYKEY(PKEY_Device_DriverInfSectionExt, 0xa8b865dd, 0x2e3d, 0x4094, 0xad, 0x97, 0xe5, 0x93, 0xa7, 0xc, 0x75, 0xd6, 7); // DEVPROP_TYPE_STRING
-DEFINE_PROPERTYKEY(PKEY_Device_MatchingDeviceId, 0xa8b865dd, 0x2e3d, 0x4094, 0xad, 0x97, 0xe5, 0x93, 0xa7, 0xc, 0x75, 0xd6, 8); // DEVPROP_TYPE_STRING
-DEFINE_PROPERTYKEY(PKEY_Device_DriverProvider, 0xa8b865dd, 0x2e3d, 0x4094, 0xad, 0x97, 0xe5, 0x93, 0xa7, 0xc, 0x75, 0xd6, 9); // DEVPROP_TYPE_STRING
-DEFINE_PROPERTYKEY(PKEY_Device_DriverPropPageProvider, 0xa8b865dd, 0x2e3d, 0x4094, 0xad, 0x97, 0xe5, 0x93, 0xa7, 0xc, 0x75, 0xd6, 10); // DEVPROP_TYPE_STRING
-DEFINE_PROPERTYKEY(PKEY_Device_DriverCoInstallers, 0xa8b865dd, 0x2e3d, 0x4094, 0xad, 0x97, 0xe5, 0x93, 0xa7, 0xc, 0x75, 0xd6, 11); // DEVPROP_TYPE_STRING_LIST
-DEFINE_PROPERTYKEY(PKEY_Device_ResourcePickerTags, 0xa8b865dd, 0x2e3d, 0x4094, 0xad, 0x97, 0xe5, 0x93, 0xa7, 0xc, 0x75, 0xd6, 12); // DEVPROP_TYPE_STRING
-DEFINE_PROPERTYKEY(PKEY_Device_ResourcePickerExceptions, 0xa8b865dd, 0x2e3d, 0x4094, 0xad, 0x97, 0xe5, 0x93, 0xa7, 0xc, 0x75, 0xd6, 13); // DEVPROP_TYPE_STRING
-DEFINE_PROPERTYKEY(PKEY_Device_DriverRank, 0xa8b865dd, 0x2e3d, 0x4094, 0xad, 0x97, 0xe5, 0x93, 0xa7, 0xc, 0x75, 0xd6, 14); // DEVPROP_TYPE_UINT32
-DEFINE_PROPERTYKEY(PKEY_Device_DriverLogoLevel, 0xa8b865dd, 0x2e3d, 0x4094, 0xad, 0x97, 0xe5, 0x93, 0xa7, 0xc, 0x75, 0xd6, 15); // DEVPROP_TYPE_UINT32
-DEFINE_PROPERTYKEY(PKEY_Device_NoConnectSound, 0xa8b865dd, 0x2e3d, 0x4094, 0xad, 0x97, 0xe5, 0x93, 0xa7, 0xc, 0x75, 0xd6, 17); // DEVPROP_TYPE_BOOLEAN
-DEFINE_PROPERTYKEY(PKEY_Device_GenericDriverInstalled, 0xa8b865dd, 0x2e3d, 0x4094, 0xad, 0x97, 0xe5, 0x93, 0xa7, 0xc, 0x75, 0xd6, 18); // DEVPROP_TYPE_BOOLEAN
-DEFINE_PROPERTYKEY(PKEY_Device_AdditionalSoftwareRequested, 0xa8b865dd, 0x2e3d, 0x4094, 0xad, 0x97, 0xe5, 0x93, 0xa7, 0xc, 0x75, 0xd6, 19);// DEVPROP_TYPE_BOOLEAN
-
-//
-// Device safe-removal properties
-//
-DEFINE_PROPERTYKEY(PKEY_Device_SafeRemovalRequired, 0xafd97640, 0x86a3, 0x4210, 0xb6, 0x7c, 0x28, 0x9c, 0x41, 0xaa, 0xbe, 0x55, 2); // DEVPROP_TYPE_BOOLEAN
-DEFINE_PROPERTYKEY(PKEY_Device_SafeRemovalRequiredOverride, 0xafd97640, 0x86a3, 0x4210, 0xb6, 0x7c, 0x28, 0x9c, 0x41, 0xaa, 0xbe, 0x55, 3);// DEVPROP_TYPE_BOOLEAN
-
-
-//
-// Device properties that were set by the driver package that was installed
-// on the device.
-//
-DEFINE_PROPERTYKEY(PKEY_DrvPkg_Model, 0xcf73bb51, 0x3abf, 0x44a2, 0x85, 0xe0, 0x9a, 0x3d, 0xc7, 0xa1, 0x21, 0x32, 2); // DEVPROP_TYPE_STRING
-DEFINE_PROPERTYKEY(PKEY_DrvPkg_VendorWebSite, 0xcf73bb51, 0x3abf, 0x44a2, 0x85, 0xe0, 0x9a, 0x3d, 0xc7, 0xa1, 0x21, 0x32, 3); // DEVPROP_TYPE_STRING
-DEFINE_PROPERTYKEY(PKEY_DrvPkg_DetailedDescription, 0xcf73bb51, 0x3abf, 0x44a2, 0x85, 0xe0, 0x9a, 0x3d, 0xc7, 0xa1, 0x21, 0x32, 4); // DEVPROP_TYPE_STRING
-DEFINE_PROPERTYKEY(PKEY_DrvPkg_DocumentationLink, 0xcf73bb51, 0x3abf, 0x44a2, 0x85, 0xe0, 0x9a, 0x3d, 0xc7, 0xa1, 0x21, 0x32, 5); // DEVPROP_TYPE_STRING
-DEFINE_PROPERTYKEY(PKEY_DrvPkg_Icon, 0xcf73bb51, 0x3abf, 0x44a2, 0x85, 0xe0, 0x9a, 0x3d, 0xc7, 0xa1, 0x21, 0x32, 6); // DEVPROP_TYPE_STRING_LIST
-DEFINE_PROPERTYKEY(PKEY_DrvPkg_BrandingIcon, 0xcf73bb51, 0x3abf, 0x44a2, 0x85, 0xe0, 0x9a, 0x3d, 0xc7, 0xa1, 0x21, 0x32, 7); // DEVPROP_TYPE_STRING_LIST
-
-//
-// Device setup class properties
-// These PKEYs correspond to the old setupapi SPCRP_XXX properties
-//
-DEFINE_PROPERTYKEY(PKEY_DeviceClass_UpperFilters, 0x4321918b, 0xf69e, 0x470d, 0xa5, 0xde, 0x4d, 0x88, 0xc7, 0x5a, 0xd2, 0x4b, 19); // DEVPROP_TYPE_STRING_LIST
-DEFINE_PROPERTYKEY(PKEY_DeviceClass_LowerFilters, 0x4321918b, 0xf69e, 0x470d, 0xa5, 0xde, 0x4d, 0x88, 0xc7, 0x5a, 0xd2, 0x4b, 20); // DEVPROP_TYPE_STRING_LIST
-DEFINE_PROPERTYKEY(PKEY_DeviceClass_Security, 0x4321918b, 0xf69e, 0x470d, 0xa5, 0xde, 0x4d, 0x88, 0xc7, 0x5a, 0xd2, 0x4b, 25); // DEVPROP_TYPE_SECURITY_DESCRIPTOR
-DEFINE_PROPERTYKEY(PKEY_DeviceClass_SecuritySDS, 0x4321918b, 0xf69e, 0x470d, 0xa5, 0xde, 0x4d, 0x88, 0xc7, 0x5a, 0xd2, 0x4b, 26); // DEVPROP_TYPE_SECURITY_DESCRIPTOR_STRING
-DEFINE_PROPERTYKEY(PKEY_DeviceClass_DevType, 0x4321918b, 0xf69e, 0x470d, 0xa5, 0xde, 0x4d, 0x88, 0xc7, 0x5a, 0xd2, 0x4b, 27); // DEVPROP_TYPE_UINT32
-DEFINE_PROPERTYKEY(PKEY_DeviceClass_Exclusive, 0x4321918b, 0xf69e, 0x470d, 0xa5, 0xde, 0x4d, 0x88, 0xc7, 0x5a, 0xd2, 0x4b, 28); // DEVPROP_TYPE_UINT32
-DEFINE_PROPERTYKEY(PKEY_DeviceClass_Characteristics, 0x4321918b, 0xf69e, 0x470d, 0xa5, 0xde, 0x4d, 0x88, 0xc7, 0x5a, 0xd2, 0x4b, 29); // DEVPROP_TYPE_UINT32
-
-//
-// Device setup class properties
-// These PKEYs correspond to registry values under the device class GUID key
-//
-DEFINE_PROPERTYKEY(PKEY_DeviceClass_Name, 0x259abffc, 0x50a7, 0x47ce, 0xaf, 0x8, 0x68, 0xc9, 0xa7, 0xd7, 0x33, 0x66, 2); // DEVPROP_TYPE_STRING
-DEFINE_PROPERTYKEY(PKEY_DeviceClass_ClassName, 0x259abffc, 0x50a7, 0x47ce, 0xaf, 0x8, 0x68, 0xc9, 0xa7, 0xd7, 0x33, 0x66, 3); // DEVPROP_TYPE_STRING
-DEFINE_PROPERTYKEY(PKEY_DeviceClass_Icon, 0x259abffc, 0x50a7, 0x47ce, 0xaf, 0x8, 0x68, 0xc9, 0xa7, 0xd7, 0x33, 0x66, 4); // DEVPROP_TYPE_STRING
-DEFINE_PROPERTYKEY(PKEY_DeviceClass_ClassInstaller, 0x259abffc, 0x50a7, 0x47ce, 0xaf, 0x8, 0x68, 0xc9, 0xa7, 0xd7, 0x33, 0x66, 5); // DEVPROP_TYPE_STRING
-DEFINE_PROPERTYKEY(PKEY_DeviceClass_PropPageProvider, 0x259abffc, 0x50a7, 0x47ce, 0xaf, 0x8, 0x68, 0xc9, 0xa7, 0xd7, 0x33, 0x66, 6); // DEVPROP_TYPE_STRING
-DEFINE_PROPERTYKEY(PKEY_DeviceClass_NoInstallClass, 0x259abffc, 0x50a7, 0x47ce, 0xaf, 0x8, 0x68, 0xc9, 0xa7, 0xd7, 0x33, 0x66, 7); // DEVPROP_TYPE_BOOLEAN
-DEFINE_PROPERTYKEY(PKEY_DeviceClass_NoDisplayClass, 0x259abffc, 0x50a7, 0x47ce, 0xaf, 0x8, 0x68, 0xc9, 0xa7, 0xd7, 0x33, 0x66, 8); // DEVPROP_TYPE_BOOLEAN
-DEFINE_PROPERTYKEY(PKEY_DeviceClass_SilentInstall, 0x259abffc, 0x50a7, 0x47ce, 0xaf, 0x8, 0x68, 0xc9, 0xa7, 0xd7, 0x33, 0x66, 9); // DEVPROP_TYPE_BOOLEAN
-DEFINE_PROPERTYKEY(PKEY_DeviceClass_NoUseClass, 0x259abffc, 0x50a7, 0x47ce, 0xaf, 0x8, 0x68, 0xc9, 0xa7, 0xd7, 0x33, 0x66, 10); // DEVPROP_TYPE_BOOLEAN
-DEFINE_PROPERTYKEY(PKEY_DeviceClass_DefaultService, 0x259abffc, 0x50a7, 0x47ce, 0xaf, 0x8, 0x68, 0xc9, 0xa7, 0xd7, 0x33, 0x66, 11); // DEVPROP_TYPE_STRING
-DEFINE_PROPERTYKEY(PKEY_DeviceClass_IconPath, 0x259abffc, 0x50a7, 0x47ce, 0xaf, 0x8, 0x68, 0xc9, 0xa7, 0xd7, 0x33, 0x66, 12); // DEVPROP_TYPE_STRING_LIST
-
-//
-// Other Device setup class properties
-//
-DEFINE_PROPERTYKEY(PKEY_DeviceClass_ClassCoInstallers, 0x713d1703, 0xa2e2, 0x49f5, 0x92, 0x14, 0x56, 0x47, 0x2e, 0xf3, 0xda, 0x5c, 2); // DEVPROP_TYPE_STRING_LIST
-
-//
-// Device interface properties
-//
-DEFINE_PROPERTYKEY(PKEY_DeviceInterface_FriendlyName, 0x026e516e, 0xb814, 0x414b, 0x83, 0xcd, 0x85, 0x6d, 0x6f, 0xef, 0x48, 0x22, 2); // DEVPROP_TYPE_STRING
-DEFINE_PROPERTYKEY(PKEY_DeviceInterface_Enabled, 0x026e516e, 0xb814, 0x414b, 0x83, 0xcd, 0x85, 0x6d, 0x6f, 0xef, 0x48, 0x22, 3); // DEVPROP_TYPE_BOOLEAN
-DEFINE_PROPERTYKEY(PKEY_DeviceInterface_ClassGuid, 0x026e516e, 0xb814, 0x414b, 0x83, 0xcd, 0x85, 0x6d, 0x6f, 0xef, 0x48, 0x22, 4); // DEVPROP_TYPE_GUID
-
-//
-// Device interface class properties
-//
-DEFINE_PROPERTYKEY(PKEY_DeviceInterfaceClass_DefaultInterface, 0x14c83a99, 0x0b3f, 0x44b7, 0xbe, 0x4c, 0xa1, 0x78, 0xd3, 0x99, 0x05, 0x64, 2); // DEVPROP_TYPE_STRING
-
-
-
-
-#endif
diff --git a/platform/winrt/include/LICENSE.ANGLE.txt b/platform/winrt/include/LICENSE.ANGLE.txt
new file mode 100644
index 0000000000..bdacb32e36
--- /dev/null
+++ b/platform/winrt/include/LICENSE.ANGLE.txt
@@ -0,0 +1,32 @@
+// Copyright (C) 2002-2013 The ANGLE Project Authors.
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions
+// are met:
+//
+// Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following
+// disclaimer in the documentation and/or other materials provided
+// with the distribution.
+//
+// Neither the name of TransGaming Inc., Google Inc., 3DLabs Inc.
+// Ltd., nor the names of their contributors may be used to endorse
+// or promote products derived from this software without specific
+// prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+// POSSIBILITY OF SUCH DAMAGE.
diff --git a/platform/x11/os_x11.cpp b/platform/x11/os_x11.cpp
index 12957b81b7..20fae72abd 100644
--- a/platform/x11/os_x11.cpp
+++ b/platform/x11/os_x11.cpp
@@ -116,7 +116,9 @@ void OS_X11::initialize(const VideoMode& p_desired,int p_video_driver,int p_audi
x11_display = XOpenDisplay(NULL);
char * modifiers = XSetLocaleModifiers ("@im=none");
- ERR_FAIL_COND( modifiers == NULL );
+ if (modifiers==NULL) {
+ WARN_PRINT("Error setting locale modifiers");
+ }
const char* err;
xrr_get_monitors = NULL;
@@ -1771,7 +1773,6 @@ static String _get_clipboard(Atom p_source, Window x11_window, ::Display* x11_di
if (Sown == x11_window) {
- printf("returning internal clipboard\n");
return p_internal_clipboard;
};
diff --git a/scene/2d/camera_2d.cpp b/scene/2d/camera_2d.cpp
index 85256be940..f98a50e3e0 100644
--- a/scene/2d/camera_2d.cpp
+++ b/scene/2d/camera_2d.cpp
@@ -44,7 +44,6 @@ void Camera2D::_update_scroll() {
if (current) {
Matrix32 xform = get_camera_transform();
- RID vp = viewport->get_viewport();
if (viewport) {
viewport->set_canvas_transform( xform );
}
@@ -409,6 +408,35 @@ void Camera2D::force_update_scroll() {
_update_scroll();
}
+void Camera2D::reset_smoothing() {
+
+ smoothed_camera_pos = camera_pos;
+ _update_scroll();
+}
+
+void Camera2D::align() {
+
+ Size2 screen_size = get_viewport_rect().size;
+ screen_size=get_viewport_rect().size;
+ Point2 current_camera_pos = get_global_transform().get_origin();
+ if (anchor_mode==ANCHOR_MODE_DRAG_CENTER) {
+ if (h_ofs<0) {
+ camera_pos.x = current_camera_pos.x + screen_size.x * 0.5 * drag_margin[MARGIN_RIGHT] * h_ofs;
+ } else {
+ camera_pos.x = current_camera_pos.x + screen_size.x * 0.5 * drag_margin[MARGIN_LEFT] * h_ofs;
+ }
+ if (v_ofs<0) {
+ camera_pos.y = current_camera_pos.y + screen_size.y * 0.5 * drag_margin[MARGIN_TOP] * v_ofs;
+ } else {
+ camera_pos.y = current_camera_pos.y + screen_size.y * 0.5 * drag_margin[MARGIN_BOTTOM] * v_ofs;
+ }
+ } else if (anchor_mode==ANCHOR_MODE_FIXED_TOP_LEFT){
+
+ camera_pos=current_camera_pos;
+ }
+
+ _update_scroll();
+}
void Camera2D::set_follow_smoothing(float p_speed) {
@@ -544,6 +572,8 @@ void Camera2D::_bind_methods() {
ObjectTypeDB::bind_method(_MD("is_follow_smoothing_enabled"),&Camera2D::is_follow_smoothing_enabled);
ObjectTypeDB::bind_method(_MD("force_update_scroll"),&Camera2D::force_update_scroll);
+ ObjectTypeDB::bind_method(_MD("reset_smoothing"),&Camera2D::reset_smoothing);
+ ObjectTypeDB::bind_method(_MD("align"),&Camera2D::align);
ObjectTypeDB::bind_method(_MD("_set_old_smoothing","follow_smoothing"),&Camera2D::_set_old_smoothing);
diff --git a/scene/2d/camera_2d.h b/scene/2d/camera_2d.h
index 22e5bc382a..b3f55d798d 100644
--- a/scene/2d/camera_2d.h
+++ b/scene/2d/camera_2d.h
@@ -128,6 +128,8 @@ public:
Vector2 get_camera_pos() const;
void force_update_scroll();
+ void reset_smoothing();
+ void align();
Camera2D();
};
diff --git a/scene/2d/canvas_item.cpp b/scene/2d/canvas_item.cpp
index bc5bff3b8e..eb4f457975 100644
--- a/scene/2d/canvas_item.cpp
+++ b/scene/2d/canvas_item.cpp
@@ -948,6 +948,15 @@ Ref<CanvasItemMaterial> CanvasItem::get_material() const{
return material;
}
+Vector2 CanvasItem::make_canvas_pos_local(const Vector2& screen_point) const {
+
+ ERR_FAIL_COND_V(!is_inside_tree(),screen_point);
+
+ Matrix32 local_matrix = (get_canvas_transform() *
+ get_global_transform()).affine_inverse();
+
+ return local_matrix.xform(screen_point);
+}
InputEvent CanvasItem::make_input_local(const InputEvent& p_event) const {
@@ -1052,6 +1061,8 @@ void CanvasItem::_bind_methods() {
ObjectTypeDB::bind_method(_MD("set_use_parent_material","enable"),&CanvasItem::set_use_parent_material);
ObjectTypeDB::bind_method(_MD("get_use_parent_material"),&CanvasItem::get_use_parent_material);
+ ObjectTypeDB::bind_method(_MD("make_canvas_pos_local","screen_point"),
+ &CanvasItem::make_canvas_pos_local);
ObjectTypeDB::bind_method(_MD("make_input_local","event"),&CanvasItem::make_input_local);
BIND_VMETHOD(MethodInfo("_draw"));
diff --git a/scene/2d/canvas_item.h b/scene/2d/canvas_item.h
index 8a61b449fd..b894310ce2 100644
--- a/scene/2d/canvas_item.h
+++ b/scene/2d/canvas_item.h
@@ -263,6 +263,7 @@ public:
bool get_use_parent_material() const;
InputEvent make_input_local(const InputEvent& pevent) const;
+ Vector2 make_canvas_pos_local(const Vector2& screen_point) const;
Vector2 get_global_mouse_pos() const;
Vector2 get_local_mouse_pos() const;
diff --git a/scene/2d/navigation2d.cpp b/scene/2d/navigation2d.cpp
index b4332cc75d..82c1327a8f 100644
--- a/scene/2d/navigation2d.cpp
+++ b/scene/2d/navigation2d.cpp
@@ -552,7 +552,6 @@ debug path
if (p_optimize) {
//string pulling
- Polygon *apex_poly=end_poly;
Vector2 apex_point=end_point;
Vector2 portal_left=apex_point;
Vector2 portal_right=apex_point;
@@ -613,12 +612,9 @@ debug path
//print_line("***ADVANCE LEFT");
} else {
- //_clip_path(path,apex_poly,portal_right,right_poly);
-
apex_point=portal_right;
p=right_poly;
left_poly=p;
- apex_poly=p;
portal_left=apex_point;
portal_right=apex_point;
if (path[path.size()-1].distance_to(apex_point)>CMP_EPSILON)
@@ -637,12 +633,9 @@ debug path
//print_line("***ADVANCE RIGHT");
} else {
- //_clip_path(path,apex_poly,portal_left,left_poly);
-
apex_point=portal_left;
p=left_poly;
right_poly=p;
- apex_poly=p;
portal_right=apex_point;
portal_left=apex_point;
if (path[path.size()-1].distance_to(apex_point)>CMP_EPSILON)
diff --git a/scene/2d/tile_map.cpp b/scene/2d/tile_map.cpp
index 1f16b36466..1a4f88c30e 100644
--- a/scene/2d/tile_map.cpp
+++ b/scene/2d/tile_map.cpp
@@ -222,6 +222,10 @@ void TileMap::_fix_cell_transform(Matrix32& xform,const Cell& p_cell, const Vect
Size2 s=p_sc;
Vector2 offset = p_offset;
+
+ if (tile_origin==TILE_ORIGIN_BOTTOM_LEFT)
+ offset.y+=cell_size.y;
+
if (s.y > s.x) {
if ((p_cell.flip_h && (p_cell.flip_v || p_cell.transpose)) || (p_cell.flip_v && !p_cell.transpose))
@@ -240,7 +244,7 @@ void TileMap::_fix_cell_transform(Matrix32& xform,const Cell& p_cell, const Vect
if (p_cell.flip_h) {
xform.elements[0].x=-xform.elements[0].x;
xform.elements[1].x=-xform.elements[1].x;
- if (tile_origin==TILE_ORIGIN_TOP_LEFT)
+ if (tile_origin==TILE_ORIGIN_TOP_LEFT || tile_origin==TILE_ORIGIN_BOTTOM_LEFT)
offset.x=s.x-offset.x;
}
if (p_cell.flip_v) {
@@ -248,6 +252,12 @@ void TileMap::_fix_cell_transform(Matrix32& xform,const Cell& p_cell, const Vect
xform.elements[1].y=-xform.elements[1].y;
if (tile_origin==TILE_ORIGIN_TOP_LEFT)
offset.y=s.y-offset.y;
+ else if (tile_origin==TILE_ORIGIN_BOTTOM_LEFT) {
+ if(p_cell.transpose)
+ offset.y+=s.y;
+ else
+ offset.y-=s.y;
+ }
}
xform.elements[2].x+=offset.x;
xform.elements[2].y+=offset.y;
@@ -411,6 +421,24 @@ void TileMap::_update_dirty_quadrants() {
if (tile_origin==TILE_ORIGIN_TOP_LEFT) {
rect.pos+=tile_ofs;
+
+ } else if (tile_origin==TILE_ORIGIN_BOTTOM_LEFT) {
+
+ rect.pos+=tile_ofs;
+
+ if(c.transpose)
+ {
+ if(c.flip_h)
+ rect.pos.x-=cell_size.x;
+ else
+ rect.pos.x+=cell_size.x;
+ } else {
+ if(c.flip_v)
+ rect.pos.y-=cell_size.y;
+ else
+ rect.pos.y+=cell_size.y;
+ }
+
} else if (tile_origin==TILE_ORIGIN_CENTER) {
rect.pos+=tcenter;
@@ -584,6 +612,9 @@ Map<TileMap::PosKey,TileMap::Quadrant>::Element *TileMap::_create_quadrant(const
q.pos+=get_cell_draw_offset();
if (tile_origin==TILE_ORIGIN_CENTER)
q.pos+=cell_size/2;
+ else if (tile_origin==TILE_ORIGIN_BOTTOM_LEFT)
+ q.pos.y+=cell_size.y;
+
xform.set_origin( q.pos );
// q.canvas_item = VisualServer::get_singleton()->canvas_item_create();
@@ -1242,7 +1273,7 @@ void TileMap::_bind_methods() {
ADD_PROPERTY( PropertyInfo(Variant::INT,"cell/quadrant_size",PROPERTY_HINT_RANGE,"1,128,1"),_SCS("set_quadrant_size"),_SCS("get_quadrant_size"));
ADD_PROPERTY( PropertyInfo(Variant::MATRIX32,"cell/custom_transform"),_SCS("set_custom_transform"),_SCS("get_custom_transform"));
ADD_PROPERTY( PropertyInfo(Variant::INT,"cell/half_offset",PROPERTY_HINT_ENUM,"Offset X,Offset Y,Disabled"),_SCS("set_half_offset"),_SCS("get_half_offset"));
- ADD_PROPERTY( PropertyInfo(Variant::INT,"cell/tile_origin",PROPERTY_HINT_ENUM,"Top Left,Center"),_SCS("set_tile_origin"),_SCS("get_tile_origin"));
+ ADD_PROPERTY( PropertyInfo(Variant::INT,"cell/tile_origin",PROPERTY_HINT_ENUM,"Top Left,Center,Bottom Left"),_SCS("set_tile_origin"),_SCS("get_tile_origin"));
ADD_PROPERTY( PropertyInfo(Variant::BOOL,"cell/y_sort"),_SCS("set_y_sort_mode"),_SCS("is_y_sort_mode_enabled"));
ADD_PROPERTY( PropertyInfo(Variant::BOOL,"collision/use_kinematic",PROPERTY_HINT_NONE,""),_SCS("set_collision_use_kinematic"),_SCS("get_collision_use_kinematic"));
ADD_PROPERTY( PropertyInfo(Variant::REAL,"collision/friction",PROPERTY_HINT_RANGE,"0,1,0.01"),_SCS("set_collision_friction"),_SCS("get_collision_friction"));
@@ -1264,6 +1295,7 @@ void TileMap::_bind_methods() {
BIND_CONSTANT( HALF_OFFSET_DISABLED );
BIND_CONSTANT( TILE_ORIGIN_TOP_LEFT );
BIND_CONSTANT( TILE_ORIGIN_CENTER );
+ BIND_CONSTANT( TILE_ORIGIN_BOTTOM_LEFT );
}
diff --git a/scene/2d/tile_map.h b/scene/2d/tile_map.h
index cec5ac0a1b..b48fdde43f 100644
--- a/scene/2d/tile_map.h
+++ b/scene/2d/tile_map.h
@@ -54,7 +54,8 @@ public:
enum TileOrigin {
TILE_ORIGIN_TOP_LEFT,
- TILE_ORIGIN_CENTER
+ TILE_ORIGIN_CENTER,
+ TILE_ORIGIN_BOTTOM_LEFT
};
diff --git a/scene/2d/visibility_notifier_2d.cpp b/scene/2d/visibility_notifier_2d.cpp
index 12524a2192..5411950976 100644
--- a/scene/2d/visibility_notifier_2d.cpp
+++ b/scene/2d/visibility_notifier_2d.cpp
@@ -270,9 +270,6 @@ void VisibilityEnabler2D::_notification(int p_what){
return;
- Node *from = this;
- //find where current scene starts
-
for (Map<Node*,Variant>::Element *E=nodes.front();E;E=E->next()) {
if (!visible)
@@ -293,14 +290,7 @@ void VisibilityEnabler2D::_change_node_state(Node* p_node,bool p_enabled) {
RigidBody2D *rb = p_node->cast_to<RigidBody2D>();
if (rb) {
- if (p_enabled) {
- RigidBody2D::Mode mode = RigidBody2D::Mode(nodes[p_node].operator int());
- //rb->set_mode(mode);
- rb->set_sleeping(false);
- } else {
- //rb->set_mode(RigidBody2D::MODE_STATIC);
- rb->set_sleeping(true);
- }
+ rb->set_sleeping(!p_enabled);
}
}
diff --git a/scene/3d/physics_joint.cpp b/scene/3d/physics_joint.cpp
index 3f03b2aab3..084d96975f 100644
--- a/scene/3d/physics_joint.cpp
+++ b/scene/3d/physics_joint.cpp
@@ -369,9 +369,6 @@ RID HingeJoint::_configure_joint(PhysicsBody *body_a,PhysicsBody *body_b) {
Transform gt = get_global_transform();
- Vector3 hingepos = gt.origin;
- Vector3 hingedir = gt.basis.get_axis(2);
-
Transform ainv = body_a->get_global_transform().affine_inverse();
Transform local_a = ainv * gt;
@@ -532,9 +529,6 @@ RID SliderJoint::_configure_joint(PhysicsBody *body_a,PhysicsBody *body_b) {
Transform gt = get_global_transform();
- Vector3 sliderpos = gt.origin;
- Vector3 sliderdir = gt.basis.get_axis(2);
-
Transform ainv = body_a->get_global_transform().affine_inverse();
Transform local_a = ainv * gt;
diff --git a/scene/3d/vehicle_body.cpp b/scene/3d/vehicle_body.cpp
index 6ccf07db1e..7c7957640f 100644
--- a/scene/3d/vehicle_body.cpp
+++ b/scene/3d/vehicle_body.cpp
@@ -488,7 +488,6 @@ real_t VehicleBody::_ray_cast(int p_idx,PhysicsDirectBodyState *s) {
void VehicleBody::_update_suspension(PhysicsDirectBodyState *s)
{
- real_t deltaTime = s->get_step();
real_t chassisMass = mass;
for (int w_it=0; w_it<wheels.size(); w_it++)
@@ -596,21 +595,16 @@ void VehicleBody::_resolve_single_bilateral(PhysicsDirectBodyState *s, const Vec
b2invinertia,
b2invmass);
- real_t jacDiagAB = jac.getDiagonal();
- real_t jacDiagABInv = real_t(1.) / jacDiagAB;
-
real_t rel_vel = jac.getRelativeVelocity(
s->get_linear_velocity(),
s->get_transform().basis.transposed().xform(s->get_angular_velocity()),
b2lv,
b2trans.xform(b2av));
- real_t a;
- a=jacDiagABInv;
rel_vel = normal.dot(vel);
- //todo: move this into proper structure
+ //TODO: move this into proper structure
real_t contactDamping = real_t(0.4);
#define ONLY_USE_LINEAR_MASS
#ifdef ONLY_USE_LINEAR_MASS
@@ -642,16 +636,16 @@ VehicleBody::btVehicleWheelContactPoint::btVehicleWheelContactPoint(PhysicsDirec
denom0= s->get_inverse_mass() + frictionDirectionWorld.dot(vec);
}
+ /* TODO: Why is this code unused?
if (body1) {
Vector3 r0 = frictionPosWorld - body1->get_global_transform().origin;
Vector3 c0 = (r0).cross(frictionDirectionWorld);
Vector3 vec = s->get_inverse_inertia_tensor().xform_inv(c0).cross(r0);
//denom1= body1->get_inverse_mass() + frictionDirectionWorld.dot(vec);
- denom1=0;
}
-
+ */
real_t relaxation = 1.f;
m_jacDiagABInv = relaxation/(denom0+denom1);
diff --git a/scene/3d/visibility_notifier.cpp b/scene/3d/visibility_notifier.cpp
index 60097ad482..f3b5cde0eb 100644
--- a/scene/3d/visibility_notifier.cpp
+++ b/scene/3d/visibility_notifier.cpp
@@ -221,9 +221,6 @@ void VisibilityEnabler::_notification(int p_what){
return;
- Node *from = this;
- //find where current scene starts
-
for (Map<Node*,Variant>::Element *E=nodes.front();E;E=E->next()) {
if (!visible)
@@ -242,17 +239,9 @@ void VisibilityEnabler::_change_node_state(Node* p_node,bool p_enabled) {
{
RigidBody *rb = p_node->cast_to<RigidBody>();
- if (rb) {
-
- if (p_enabled) {
- RigidBody::Mode mode = RigidBody::Mode(nodes[p_node].operator int());
- //rb->set_mode(mode);
- rb->set_sleeping(false);
- } else {
- //rb->set_mode(RigidBody::MODE_STATIC);
- rb->set_sleeping(true);
- }
- }
+ if (rb)
+
+ rb->set_sleeping(!p_enabled);
}
{
diff --git a/scene/animation/animation_tree_player.cpp b/scene/animation/animation_tree_player.cpp
index 628edf09de..9488ae37a8 100644
--- a/scene/animation/animation_tree_player.cpp
+++ b/scene/animation/animation_tree_player.cpp
@@ -445,8 +445,44 @@ void AnimationTreePlayer::_notification(int p_what) {
}
+void AnimationTreePlayer::_compute_weights(float *p_fallback_weight, HashMap<NodePath,float> *p_weights, float p_coeff, const HashMap<NodePath,bool> *p_filter, float p_filtered_coeff) {
-float AnimationTreePlayer::_process_node(const StringName& p_node,AnimationNode **r_prev_anim,float p_weight, float p_time, bool p_seek,const HashMap<NodePath,bool> *p_filter, float p_reverse_weight) {
+ if (p_filter != NULL) {
+
+ List<NodePath> key_list;
+ p_filter->get_key_list(&key_list);
+
+ for (List<NodePath>::Element *E = key_list.front();E; E=E->next()) {
+
+ if ((*p_filter)[E->get()]) {
+
+ if (p_weights->has(E->get())) {
+ (*p_weights)[E->get()] *= p_filtered_coeff;
+ } else {
+ p_weights->set(E->get(), *p_fallback_weight * p_filtered_coeff);
+ }
+
+ } else if (p_weights->has(E->get())) {
+ (*p_weights)[E->get()] *= p_coeff;
+ }
+ }
+ }
+
+ List<NodePath> key_list;
+ p_weights->get_key_list(&key_list);
+
+ for (List<NodePath>::Element *E = key_list.front();E;E=E->next()) {
+ if (p_filter == NULL || !p_filter->has(E->get())) {
+ (*p_weights)[E->get()] *= p_coeff;
+ }
+ }
+
+ *p_fallback_weight *= p_coeff;
+
+}
+
+
+float AnimationTreePlayer::_process_node(const StringName& p_node,AnimationNode **r_prev_anim, float p_time, bool p_seek, float p_fallback_weight, HashMap<NodePath,float>* p_weights) {
ERR_FAIL_COND_V(!node_map.has(p_node), 0);
NodeBase *nb=node_map[p_node];
@@ -458,7 +494,16 @@ float AnimationTreePlayer::_process_node(const StringName& p_node,AnimationNode
case NODE_OUTPUT: {
NodeOut *on = static_cast<NodeOut*>(nb);
- return _process_node(on->inputs[0].node,r_prev_anim,p_weight,p_time,p_seek);
+
+ for(TrackMap::Element *E=track_map.front();E;E=E->next()) {
+ E->get().total_weight = 0;
+ }
+
+ HashMap<NodePath, float> weights;
+
+
+
+ return _process_node(on->inputs[0].node,r_prev_anim,p_time,p_seek, p_fallback_weight, &weights);
} break;
case NODE_ANIMATION: {
@@ -494,15 +539,21 @@ float AnimationTreePlayer::_process_node(const StringName& p_node,AnimationNode
}
an->skip=true;
+
for (List<AnimationNode::TrackRef>::Element *E=an->tref.front();E;E=E->next()) {
NodePath track_path = an->animation->track_get_path(E->get().local_track);
- if (p_filter && p_filter->has(track_path)) {
- E->get().weight = MAX(0, p_reverse_weight);
- } else if(an->filter.has(track_path)) {
+ if (an->filter.has(track_path) && an->filter[track_path]) {
E->get().weight = 0;
- E->get().track->skip = true;
+ E->get().track->total_weight += p_fallback_weight;
} else {
- E->get().weight=p_weight;
+ if (p_weights->has(track_path)) {
+ float weight = (*p_weights)[track_path];
+ E->get().weight = weight;
+ E->get().track->total_weight += weight;
+ } else {
+ E->get().weight = p_fallback_weight;
+ E->get().track->total_weight += p_fallback_weight;
+ }
}
if (E->get().weight>CMP_EPSILON)
an->skip=false;
@@ -531,7 +582,7 @@ float AnimationTreePlayer::_process_node(const StringName& p_node,AnimationNode
if (!osn->active) {
//make it as if this node doesn't exist, pass input 0 by.
- return _process_node(osn->inputs[0].node,r_prev_anim,p_weight,p_time,p_seek,p_filter,p_reverse_weight);
+ return _process_node(osn->inputs[0].node,r_prev_anim,p_time,p_seek, p_fallback_weight, p_weights);
}
float os_seek = p_seek;
@@ -563,16 +614,14 @@ float AnimationTreePlayer::_process_node(const StringName& p_node,AnimationNode
float main_rem;
float os_rem;
- float os_reverse_weight = p_reverse_weight;
- if (!osn->filter.empty()) {
- p_filter = &osn->filter;
- p_reverse_weight = p_weight;
- os_reverse_weight = -1;
- }
+ HashMap<NodePath, float> os_weights(*p_weights);
+ float os_fallback_weight = p_fallback_weight;
+ _compute_weights(&p_fallback_weight, p_weights, osn->mix?1.0 : 1.0 - blend, &osn->filter, 1.0);
+ _compute_weights(&os_fallback_weight, &os_weights, blend, &osn->filter, 0.0);
- main_rem = _process_node(osn->inputs[0].node,r_prev_anim,(osn->mix?p_weight:p_weight*(1.0-blend)),p_time,p_seek,p_filter,p_reverse_weight);
- os_rem = _process_node(osn->inputs[1].node,r_prev_anim,p_weight*blend,p_time,os_seek,p_filter,os_reverse_weight);
+ main_rem = _process_node(osn->inputs[0].node,r_prev_anim,p_time,p_seek, p_fallback_weight, p_weights);
+ os_rem = _process_node(osn->inputs[1].node,r_prev_anim,p_time,os_seek, os_fallback_weight, &os_weights);
if (osn->start) {
osn->remaining=os_rem;
@@ -591,9 +640,11 @@ float AnimationTreePlayer::_process_node(const StringName& p_node,AnimationNode
case NODE_MIX: {
MixNode *mn = static_cast<MixNode*>(nb);
-
- float rem = _process_node(mn->inputs[0].node,r_prev_anim,p_weight,p_time,p_seek,p_filter,p_reverse_weight);
- _process_node(mn->inputs[1].node,r_prev_anim,p_weight*mn->amount,p_time,p_seek,p_filter,p_reverse_weight);
+ HashMap<NodePath, float> mn_weights(*p_weights);
+ float mn_fallback_weight = p_fallback_weight;
+ _compute_weights(&mn_fallback_weight, &mn_weights, mn->amount);
+ float rem = _process_node(mn->inputs[0].node,r_prev_anim, p_time,p_seek,p_fallback_weight,p_weights);
+ _process_node(mn->inputs[1].node,r_prev_anim,p_time,p_seek,mn_fallback_weight,&mn_weights);
return rem;
} break;
@@ -601,16 +652,12 @@ float AnimationTreePlayer::_process_node(const StringName& p_node,AnimationNode
Blend2Node *bn = static_cast<Blend2Node*>(nb);
- float rem;
- if (!bn->filter.empty()) {
-
- rem = _process_node(bn->inputs[0].node,r_prev_anim,p_weight*(1.0-bn->value),p_time,p_seek,&bn->filter,p_weight);
- _process_node(bn->inputs[1].node,r_prev_anim,p_weight*bn->value,p_time,p_seek,&bn->filter,-1);
-
- } else {
- rem = _process_node(bn->inputs[0].node,r_prev_anim,p_weight*(1.0-bn->value),p_time,p_seek,p_filter,p_reverse_weight*(1.0-bn->value));
- _process_node(bn->inputs[1].node,r_prev_anim,p_weight*bn->value,p_time,p_seek,p_filter,p_reverse_weight*bn->value);
- }
+ HashMap<NodePath, float> bn_weights(*p_weights);
+ float bn_fallback_weight = p_fallback_weight;
+ _compute_weights(&p_fallback_weight,p_weights, 1.0 - bn->value, &bn->filter, 1.0);
+ _compute_weights(&bn_fallback_weight,&bn_weights, bn->value, &bn->filter, 0.0);
+ float rem = _process_node(bn->inputs[0].node,r_prev_anim,p_time,p_seek,p_fallback_weight,p_weights);
+ _process_node(bn->inputs[1].node,r_prev_anim,p_time,p_seek,bn_fallback_weight,&bn_weights);
return rem;
} break;
@@ -629,19 +676,39 @@ float AnimationTreePlayer::_process_node(const StringName& p_node,AnimationNode
upper_blend = bn->value;
}
- rem = _process_node(bn->inputs[1].node,r_prev_anim,p_weight*blend,p_time,p_seek,p_filter,p_reverse_weight*blend);
- _process_node(bn->inputs[2].node,r_prev_anim,p_weight*upper_blend,p_time,p_seek,p_filter,p_reverse_weight*upper_blend);
- _process_node(bn->inputs[0].node,r_prev_anim,p_weight*lower_blend,p_time,p_seek,p_filter,p_reverse_weight*lower_blend);
+ HashMap<NodePath, float> upper_weights(*p_weights);
+ float upper_fallback_weight = p_fallback_weight;
+ HashMap<NodePath, float> lower_weights(*p_weights);
+ float lower_fallback_weight = p_fallback_weight;
+ _compute_weights(&upper_fallback_weight,&upper_weights, upper_blend);
+ _compute_weights(&p_fallback_weight,p_weights, blend);
+ _compute_weights(&lower_fallback_weight,&lower_weights, lower_blend);
+
+ rem = _process_node(bn->inputs[1].node,r_prev_anim,p_time,p_seek,p_fallback_weight,p_weights);
+ _process_node(bn->inputs[0].node,r_prev_anim,p_time,p_seek,lower_fallback_weight,&lower_weights);
+ _process_node(bn->inputs[2].node,r_prev_anim,p_time,p_seek,upper_fallback_weight,&upper_weights);
return rem;
} break;
case NODE_BLEND4: {
Blend4Node *bn = static_cast<Blend4Node*>(nb);
- float rem = _process_node(bn->inputs[0].node,r_prev_anim,p_weight*(1.0-bn->value.x),p_time,p_seek,p_filter,p_reverse_weight*(1.0-bn->value.x));
- _process_node(bn->inputs[1].node,r_prev_anim,p_weight*bn->value.x,p_time,p_seek,p_filter,p_reverse_weight*bn->value.x);
- float rem2 = _process_node(bn->inputs[2].node,r_prev_anim,p_weight*(1.0-bn->value.y),p_time,p_seek,p_filter,p_reverse_weight*(1.0-bn->value.y));
- _process_node(bn->inputs[3].node,r_prev_anim,p_weight*bn->value.y,p_time,p_seek,p_filter,p_reverse_weight*bn->value.y);
+ HashMap<NodePath, float> weights1(*p_weights);
+ float fallback_weight1 = p_fallback_weight;
+ HashMap<NodePath, float> weights2(*p_weights);
+ float fallback_weight2 = p_fallback_weight;
+ HashMap<NodePath, float> weights3(*p_weights);
+ float fallback_weight3 = p_fallback_weight;
+
+ _compute_weights(&p_fallback_weight,p_weights, 1.0-bn->value.x);
+ _compute_weights(&fallback_weight1,&weights1, bn->value.x);
+ _compute_weights(&fallback_weight2,&weights2, 1.0-bn->value.y);
+ _compute_weights(&fallback_weight3,&weights3, bn->value.y);
+
+ float rem = _process_node(bn->inputs[0].node,r_prev_anim,p_time,p_seek,p_fallback_weight,p_weights);
+ _process_node(bn->inputs[1].node,r_prev_anim,p_time,p_seek,fallback_weight1,&weights1);
+ float rem2 = _process_node(bn->inputs[2].node,r_prev_anim,p_time,p_seek,fallback_weight2,&weights2);
+ _process_node(bn->inputs[3].node,r_prev_anim,p_time,p_seek,fallback_weight3,&weights3);
return MAX(rem,rem2);
@@ -650,9 +717,9 @@ float AnimationTreePlayer::_process_node(const StringName& p_node,AnimationNode
TimeScaleNode *tsn = static_cast<TimeScaleNode*>(nb);
float rem;
if (p_seek)
- rem = _process_node(tsn->inputs[0].node,r_prev_anim,p_weight,p_time,true,p_filter,p_reverse_weight);
+ rem = _process_node(tsn->inputs[0].node,r_prev_anim,p_time,true,p_fallback_weight,p_weights);
else
- rem = _process_node(tsn->inputs[0].node,r_prev_anim,p_weight,p_time*tsn->scale,false,p_filter,p_reverse_weight);
+ rem = _process_node(tsn->inputs[0].node,r_prev_anim,p_time*tsn->scale,false,p_fallback_weight,p_weights);
if (tsn->scale == 0)
return INFINITY;
else
@@ -669,16 +736,18 @@ float AnimationTreePlayer::_process_node(const StringName& p_node,AnimationNode
}
tsn->seek_pos=-1;
- return _process_node(tsn->inputs[0].node,r_prev_anim,p_weight,p_time,p_seek, p_filter, p_reverse_weight);
+ return _process_node(tsn->inputs[0].node,r_prev_anim,p_time,p_seek,p_fallback_weight,p_weights);
} break;
case NODE_TRANSITION: {
TransitionNode *tn = static_cast<TransitionNode*>(nb);
+ HashMap<NodePath, float> prev_weights(*p_weights);
+ float prev_fallback_weight = p_fallback_weight;
if (tn->prev<0) { // process current animation, check for transition
- float rem = _process_node(tn->inputs[tn->current].node,r_prev_anim,p_weight,p_time,p_seek,p_filter,p_reverse_weight);
+ float rem = _process_node(tn->inputs[tn->current].node,r_prev_anim,p_time,p_seek,p_fallback_weight,p_weights);
if (p_seek)
tn->time=p_time;
else
@@ -698,22 +767,25 @@ float AnimationTreePlayer::_process_node(const StringName& p_node,AnimationNode
float rem;
+ _compute_weights(&p_fallback_weight,p_weights, 1.0-blend);
+ _compute_weights(&prev_fallback_weight,&prev_weights, blend);
+
if (!p_seek && tn->switched) { //just switched, seek to start of current
- rem = _process_node(tn->inputs[tn->current].node,r_prev_anim,p_weight*(1.0-blend),0,true,p_filter,p_reverse_weight*(1.0-blend));
+ rem = _process_node(tn->inputs[tn->current].node,r_prev_anim,0,true,p_fallback_weight,p_weights);
} else {
- rem = _process_node(tn->inputs[tn->current].node,r_prev_anim,p_weight*(1.0-blend),p_time,p_seek,p_filter,p_reverse_weight*(1.0-blend));
+ rem = _process_node(tn->inputs[tn->current].node,r_prev_anim,p_time,p_seek,p_fallback_weight,p_weights);
}
tn->switched=false;
if (p_seek) { // don't seek prev animation
- _process_node(tn->inputs[tn->prev].node,r_prev_anim,p_weight*blend,0,false,p_filter,p_reverse_weight*blend);
+ _process_node(tn->inputs[tn->prev].node,r_prev_anim,0,false,prev_fallback_weight,&prev_weights);
tn->time=p_time;
} else {
- _process_node(tn->inputs[tn->prev].node,r_prev_anim,p_weight*blend,p_time,false,p_filter,p_reverse_weight*blend);
+ _process_node(tn->inputs[tn->prev].node,r_prev_anim,p_time,false,prev_fallback_weight,&prev_weights);
tn->time+=p_time;
tn->prev_xfading-=p_time;
if (tn->prev_xfading<0) {
@@ -750,10 +822,11 @@ void AnimationTreePlayer::_process_animation(float p_delta) {
AnimationNode *prev=NULL;
if (reset_request) {
- _process_node(out_name,&prev, 1.0, 0, true);
+
+ _process_node(out_name,&prev, 0, true);
reset_request=false;
} else
- _process_node(out_name,&prev, 1.0, p_delta);
+ _process_node(out_name,&prev, p_delta);
if (dirty_caches) {
//some animation changed.. ignore this pass
@@ -802,7 +875,7 @@ void AnimationTreePlayer::_process_animation(float p_delta) {
if (tr.track==NULL || tr.local_track<0 || tr.weight < CMP_EPSILON)
continue;
- float blend=tr.weight;
+ float blend=tr.weight / tr.track->total_weight;
switch(a->track_get_type(tr.local_track)) {
case Animation::TYPE_TRANSFORM: { ///< Transform a node or a bone.
@@ -1904,6 +1977,3 @@ AnimationTreePlayer::~AnimationTreePlayer() {
node_map.erase( node_map.front() );
}
}
-
-
-
diff --git a/scene/animation/animation_tree_player.h b/scene/animation/animation_tree_player.h
index dae891b5ce..6b5350e9ee 100644
--- a/scene/animation/animation_tree_player.h
+++ b/scene/animation/animation_tree_player.h
@@ -111,6 +111,7 @@ private:
Variant value;
bool skip;
+ float total_weight;
};
@@ -273,7 +274,7 @@ private:
Map<StringName,NodeBase*> node_map;
// return time left to finish animation
- float _process_node(const StringName& p_node,AnimationNode **r_prev_anim, float p_weight,float p_step, bool p_seek=false,const HashMap<NodePath,bool> *p_filter=NULL, float p_reverse_weight=0);
+ float _process_node(const StringName& p_node,AnimationNode **r_prev_anim,float p_step, bool p_seek=false, float p_fallback_weight = 1.0, HashMap<NodePath,float>* p_weights = NULL);
void _process_animation(float p_delta);
bool reset_request;
@@ -283,6 +284,8 @@ private:
void _recompute_caches();
void _recompute_caches(const StringName& p_node);
DVector<String> _get_node_list();
+
+ void _compute_weights(float *p_fallback_weight, HashMap<NodePath,float> *p_weights, float p_coeff, const HashMap<NodePath,bool> *p_filter = NULL, float p_filtered_coeff = 0);
protected:
diff --git a/scene/gui/label.cpp b/scene/gui/label.cpp
index 778d24cc35..0431d824fa 100644
--- a/scene/gui/label.cpp
+++ b/scene/gui/label.cpp
@@ -535,7 +535,9 @@ void Label::set_text(const String& p_string) {
if (percent_visible<1)
visible_chars=get_total_character_count()*percent_visible;
update();
- minimum_size_changed();
+ if (!autowrap) {
+ minimum_size_changed();
+ }
}
diff --git a/scene/gui/line_edit.cpp b/scene/gui/line_edit.cpp
index d6c018ae8e..6c47072b33 100644
--- a/scene/gui/line_edit.cpp
+++ b/scene/gui/line_edit.cpp
@@ -31,6 +31,7 @@
#include "os/os.h"
#include "print_string.h"
#include "label.h"
+#include "translation.h"
#ifdef TOOLS_ENABLED
#include "tools/editor/editor_settings.h"
#endif
@@ -947,7 +948,7 @@ String LineEdit::get_text() const {
void LineEdit::set_placeholder(String p_text) {
- placeholder = p_text;
+ placeholder = XL_MESSAGE(p_text);
update();
}
diff --git a/scene/gui/rich_text_label.cpp b/scene/gui/rich_text_label.cpp
index 31cef85aa0..b4fa463cde 100644
--- a/scene/gui/rich_text_label.cpp
+++ b/scene/gui/rich_text_label.cpp
@@ -662,8 +662,7 @@ void RichTextLabel::_notification(int p_what) {
} break;
case NOTIFICATION_ENTER_TREE: {
- if (use_bbcode)
- parse_bbcode(bbcode);
+ set_bbcode(bbcode);
main->first_invalid_line=0; //invalidate ALL
update();
@@ -1440,7 +1439,6 @@ bool RichTextLabel::is_scroll_following() const {
Error RichTextLabel::parse_bbcode(const String& p_bbcode) {
-
clear();
return append_bbcode(p_bbcode);
}
@@ -1858,6 +1856,10 @@ void RichTextLabel::set_bbcode(const String& p_bbcode) {
bbcode=p_bbcode;
if (is_inside_tree() && use_bbcode)
parse_bbcode(p_bbcode);
+ else { // raw text
+ clear();
+ add_text(p_bbcode);
+ }
}
String RichTextLabel::get_bbcode() const {
@@ -1869,19 +1871,37 @@ void RichTextLabel::set_use_bbcode(bool p_enable) {
if (use_bbcode==p_enable)
return;
use_bbcode=p_enable;
- if (is_inside_tree() && use_bbcode)
- parse_bbcode(bbcode);
+ set_bbcode(bbcode);
}
bool RichTextLabel::is_using_bbcode() const {
return use_bbcode;
}
+
+String RichTextLabel::get_text() {
+ String text = "";
+ Item *it = main;
+ while (it) {
+ if (it->type == ITEM_TEXT) {
+ ItemText *t = static_cast<ItemText*>(it);
+ text += t->text;
+ } else if (it->type == ITEM_NEWLINE) {
+ text += "\n";
+ } else if (it->type == ITEM_INDENT) {
+ text += "\t";
+ }
+ it=_get_next_item(it,true);
+ }
+ return text;
+}
+
void RichTextLabel::_bind_methods() {
ObjectTypeDB::bind_method(_MD("_input_event"),&RichTextLabel::_input_event);
ObjectTypeDB::bind_method(_MD("_scroll_changed"),&RichTextLabel::_scroll_changed);
+ ObjectTypeDB::bind_method(_MD("get_text"),&RichTextLabel::get_text);
ObjectTypeDB::bind_method(_MD("add_text","text"),&RichTextLabel::add_text);
ObjectTypeDB::bind_method(_MD("add_image","image:Texture"),&RichTextLabel::add_image);
ObjectTypeDB::bind_method(_MD("newline"),&RichTextLabel::add_newline);
diff --git a/scene/gui/rich_text_label.h b/scene/gui/rich_text_label.h
index 635fe87ad4..5147905a0e 100644
--- a/scene/gui/rich_text_label.h
+++ b/scene/gui/rich_text_label.h
@@ -280,6 +280,7 @@ protected:
public:
+ String get_text();
void add_text(const String& p_text);
void add_image(const Ref<Texture>& p_image);
void add_newline();
diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp
index 55e1a2cc52..a680d5d873 100644
--- a/scene/gui/text_edit.cpp
+++ b/scene/gui/text_edit.cpp
@@ -965,6 +965,12 @@ void TextEdit::_notification(int p_what) {
}
bool in_highlighted_word = (j >= highlighted_text_col && j < highlighted_text_col+highlighted_text.length());
+
+ /* if this is the original highlighted text we don't want to highlight it again */
+ if (cursor.line==line && (cursor.column >= highlighted_text_col && cursor.column <= highlighted_text_col+highlighted_text.length())) {
+ in_highlighted_word = false;
+ }
+
if (in_highlighted_word) {
VisualServer::get_singleton()->canvas_item_add_rect(ci,Rect2(Point2i( char_ofs+char_margin, ofs_y ), Size2i(char_w, get_row_height())),cache.word_highlighted_color);
}
@@ -1105,7 +1111,7 @@ void TextEdit::_notification(int p_what) {
int l = line_from + i;
ERR_CONTINUE( l < 0 || l>= completion_options.size());
- Color text_color = cache.font_color;
+ Color text_color = cache.completion_font_color;
for(int j=0;j<color_regions.size();j++) {
if (completion_options[l].begins_with(color_regions[j].begin_key)) {
text_color=color_regions[j].color;
@@ -3306,6 +3312,7 @@ void TextEdit::_update_caches() {
cache.completion_background_color=get_color("completion_background_color");
cache.completion_selected_color=get_color("completion_selected_color");
cache.completion_existing_color=get_color("completion_existing_color");
+ cache.completion_font_color=get_color("completion_font_color");
cache.font=get_font("font");
cache.caret_color=get_color("caret_color");
cache.line_number_color=get_color("line_number_color");
@@ -3603,6 +3610,10 @@ void TextEdit::set_highlight_all_occurrences(const bool p_enabled) {
update();
}
+bool TextEdit::is_highlight_all_occurrences_enabled() const {
+ return highlight_all_occurrences;
+}
+
int TextEdit::_get_column_pos_of_word(const String &p_key, const String &p_search, uint32_t p_search_flags, int p_from_column) {
int col = -1;
@@ -4312,6 +4323,10 @@ void TextEdit::set_show_line_numbers(bool p_show) {
update();
}
+bool TextEdit::is_show_line_numbers_enabled() const {
+ return line_numbers;
+}
+
void TextEdit::set_draw_breakpoint_gutter(bool p_draw) {
draw_breakpoint_gutter = p_draw;
update();
@@ -4426,6 +4441,12 @@ void TextEdit::_bind_methods() {
ObjectTypeDB::bind_method(_MD("redo"),&TextEdit::redo);
ObjectTypeDB::bind_method(_MD("clear_undo_history"),&TextEdit::clear_undo_history);
+ ObjectTypeDB::bind_method(_MD("set_show_line_numbers", "enable"), &TextEdit::set_show_line_numbers);
+ ObjectTypeDB::bind_method(_MD("is_show_line_numbers_enabled"), &TextEdit::is_show_line_numbers_enabled);
+
+ ObjectTypeDB::bind_method(_MD("set_highlight_all_occurrences", "enable"), &TextEdit::set_highlight_all_occurrences);
+ ObjectTypeDB::bind_method(_MD("is_highlight_all_occurrences_enabled"), &TextEdit::is_highlight_all_occurrences_enabled);
+
ObjectTypeDB::bind_method(_MD("set_syntax_coloring","enable"),&TextEdit::set_syntax_coloring);
ObjectTypeDB::bind_method(_MD("is_syntax_coloring_enabled"),&TextEdit::is_syntax_coloring_enabled);
@@ -4438,7 +4459,10 @@ void TextEdit::_bind_methods() {
ObjectTypeDB::bind_method(_MD("menu_option"),&TextEdit::menu_option);
ObjectTypeDB::bind_method(_MD("get_menu:PopupMenu"),&TextEdit::get_menu);
- ADD_PROPERTY(PropertyInfo(Variant::BOOL, "caret/caret_blink"), _SCS("cursor_set_blink_enabled"), _SCS("cursor_get_blink_enabled"));;
+ ADD_PROPERTY(PropertyInfo(Variant::BOOL, "show_line_numbers"), _SCS("set_show_line_numbers"), _SCS("is_show_line_numbers_enabled"));
+ ADD_PROPERTY(PropertyInfo(Variant::BOOL, "highlight_all_occurrences"), _SCS("set_highlight_all_occurrences"), _SCS("is_highlight_all_occurrences_enabled"));
+
+ ADD_PROPERTY(PropertyInfo(Variant::BOOL, "caret/caret_blink"), _SCS("cursor_set_blink_enabled"), _SCS("cursor_get_blink_enabled"));
ADD_PROPERTYNZ(PropertyInfo(Variant::REAL, "caret/caret_blink_speed",PROPERTY_HINT_RANGE,"0.1,10,0.1"), _SCS("cursor_set_blink_speed"),_SCS("cursor_get_blink_speed") );
ADD_SIGNAL(MethodInfo("cursor_changed"));
diff --git a/scene/gui/text_edit.h b/scene/gui/text_edit.h
index acac687b59..270a1723b1 100644
--- a/scene/gui/text_edit.h
+++ b/scene/gui/text_edit.h
@@ -77,6 +77,7 @@ class TextEdit : public Control {
Color completion_background_color;
Color completion_selected_color;
Color completion_existing_color;
+ Color completion_font_color;
Color caret_color;
Color line_number_color;
Color font_color;
@@ -427,6 +428,7 @@ public:
void set_current_search_result(int line, int col);
void set_highlight_all_occurrences(const bool p_enabled);
+ bool is_highlight_all_occurrences_enabled() const;
bool is_selection_active() const;
int get_selection_from_line() const;
int get_selection_from_column() const;
@@ -468,6 +470,7 @@ public:
void menu_option(int p_option);
void set_show_line_numbers(bool p_show);
+ bool is_show_line_numbers_enabled() const;
void set_draw_breakpoint_gutter(bool p_draw);
bool is_drawing_breakpoint_gutter() const;
diff --git a/scene/gui/tree.cpp b/scene/gui/tree.cpp
index f30b1979ef..305a3920da 100644
--- a/scene/gui/tree.cpp
+++ b/scene/gui/tree.cpp
@@ -1030,7 +1030,7 @@ int Tree::draw_item(const Point2i& p_pos,const Point2& p_draw_ofs, const Size2&
Point2i o = Point2i( ofs+w-s.width, p_pos.y )-cache.offset+p_draw_ofs;
- if (cache.click_type==Cache::CLICK_BUTTON && cache.click_item==p_item && cache.click_column==i && !p_item->cells[i].buttons[j].disabled) {
+ if (cache.click_type==Cache::CLICK_BUTTON && cache.click_item==p_item && cache.click_column==i && cache.click_index==j && !p_item->cells[i].buttons[j].disabled) {
//being pressed
cache.button_pressed->draw(get_canvas_item(),Rect2(o,s));
}
@@ -1335,7 +1335,7 @@ int Tree::_count_selected_items(TreeItem* p_from) const {
return count;
}
-void Tree::select_single_item(TreeItem *p_selected,TreeItem *p_current,int p_col,TreeItem *p_prev,bool *r_in_range) {
+void Tree::select_single_item(TreeItem *p_selected, TreeItem *p_current, int p_col, TreeItem *p_prev, bool *r_in_range, bool p_force_deselect) {
TreeItem::Cell &selected_cell=p_selected->cells[p_col];
@@ -1409,7 +1409,7 @@ void Tree::select_single_item(TreeItem *p_selected,TreeItem *p_current,int p_col
} else {
- if (r_in_range && *r_in_range) {
+ if (r_in_range && *r_in_range && !p_force_deselect) {
if (!c.selected && c.selectable) {
@@ -1417,7 +1417,7 @@ void Tree::select_single_item(TreeItem *p_selected,TreeItem *p_current,int p_col
emit_signal("multi_selected",p_current,i,true);
}
- } else if (!r_in_range){
+ } else if (!r_in_range || p_force_deselect){
if (select_mode==SELECT_MULTI && c.selected)
emit_signal("multi_selected",p_current,i,false);
c.selected=false;
@@ -1436,7 +1436,7 @@ void Tree::select_single_item(TreeItem *p_selected,TreeItem *p_current,int p_col
while (c) {
- select_single_item(p_selected,c,p_col,p_prev,r_in_range);
+ select_single_item(p_selected,c,p_col,p_prev,r_in_range,p_current->is_collapsed() || p_force_deselect);
c=c->next;
}
diff --git a/scene/gui/tree.h b/scene/gui/tree.h
index 0172546c1d..f5100ab5b6 100644
--- a/scene/gui/tree.h
+++ b/scene/gui/tree.h
@@ -331,7 +331,7 @@ friend class TreeItem;
// void draw_item_text(String p_text,const Ref<Texture>& p_icon,int p_icon_max_w,bool p_tool,Rect2i p_rect,const Color& p_color);
void draw_item_rect(const TreeItem::Cell& p_cell,const Rect2i& p_rect,const Color& p_color);
int draw_item(const Point2i& p_pos,const Point2& p_draw_ofs, const Size2& p_draw_size,TreeItem *p_item);
- void select_single_item(TreeItem *p_selected,TreeItem *p_current,int p_col,TreeItem *p_prev=NULL,bool *r_in_range=NULL);
+ void select_single_item(TreeItem *p_selected,TreeItem *p_current,int p_col,TreeItem *p_prev=NULL,bool *r_in_range=NULL,bool p_force_deselect=false);
int propagate_mouse_event(const Point2i &p_pos,int x_ofs,int y_ofs,bool p_doubleclick,TreeItem *p_item,int p_button,const InputModifierState& p_mod);
void text_editor_enter(String p_text);
void _text_editor_modal_close();
diff --git a/scene/main/viewport.cpp b/scene/main/viewport.cpp
index c6a32d5568..bb6e6e289b 100644
--- a/scene/main/viewport.cpp
+++ b/scene/main/viewport.cpp
@@ -1083,7 +1083,7 @@ void Viewport::_propagate_exit_world(Node *p_node) {
Spatial *s = p_node->cast_to<Spatial>();
if (s) {
- s->notification(Spatial::NOTIFICATION_EXIT_WORLD,false);
+ s->notification(Spatial::NOTIFICATION_EXIT_WORLD, true);
} else {
Viewport *v = p_node->cast_to<Viewport>();
if (v) {
diff --git a/scene/resources/animation.cpp b/scene/resources/animation.cpp
index 098801bcf5..1d15b6f2bc 100644
--- a/scene/resources/animation.cpp
+++ b/scene/resources/animation.cpp
@@ -1997,9 +1997,6 @@ void Animation::_transform_track_optimize(int p_idx,float p_alowed_linear_err,fl
void Animation::optimize(float p_allowed_linear_err,float p_allowed_angular_err,float p_angle_max) {
-
- int total_tt=0;
-
for(int i=0;i<tracks.size();i++) {
if (tracks[i]->type==TYPE_TRANSFORM)
diff --git a/scene/resources/default_theme/default_theme.cpp b/scene/resources/default_theme/default_theme.cpp
index 7ed83f50f8..182bc5dabc 100644
--- a/scene/resources/default_theme/default_theme.cpp
+++ b/scene/resources/default_theme/default_theme.cpp
@@ -473,6 +473,7 @@ void fill_default_theme(Ref<Theme>& t,const Ref<Font> & default_font,const Ref<F
t->set_color("completion_selected_color", "TextEdit",Color::html("434244"));
t->set_color("completion_existing_color", "TextEdit",Color::html("21dfdfdf"));
t->set_color("completion_scroll_color","TextEdit", control_font_color_pressed );
+ t->set_color("completion_font_color","TextEdit", Color::html("aaaaaa"));
t->set_color("font_color","TextEdit", control_font_color );
t->set_color("font_color_selected","TextEdit", Color(0,0,0) );
t->set_color("selection_color","TextEdit", font_color_selection );
@@ -482,6 +483,11 @@ void fill_default_theme(Ref<Theme>& t,const Ref<Font> & default_font,const Ref<F
t->set_color("caret_color","TextEdit", control_font_color );
t->set_color("symbol_color","TextEdit", control_font_color_hover );
t->set_color("brace_mismatch_color","TextEdit", Color(1,0.2,0.2) );
+ t->set_color("line_number_color","TextEdit",Color::html("66aaaaaa"));
+ t->set_color("function_color","TextEdit",Color::html("66a2ce"));
+ t->set_color("member_variable_color","TextEdit",Color::html("e64e59"));
+ t->set_color("number_color","TextEdit",Color::html("EB9532"));
+ t->set_color("word_highlighted_color","TextEdit",Color(0.8,0.9,0.9,0.15));
t->set_constant("completion_lines","TextEdit", 7 );
t->set_constant("completion_max_width","TextEdit", 50 );
diff --git a/scene/resources/dynamic_font.cpp b/scene/resources/dynamic_font.cpp
index c3b40f7add..67587a8f8b 100644
--- a/scene/resources/dynamic_font.cpp
+++ b/scene/resources/dynamic_font.cpp
@@ -434,7 +434,7 @@ void DynamicFontAtSize::_update_char(CharType p_char) {
int w = slot->bitmap.width;
int h = slot->bitmap.rows;
- int p = slot->bitmap.pitch;
+ //int p = slot->bitmap.pitch;
int yofs=slot->bitmap_top;
int xofs=slot->bitmap_left;
int advance=slot->advance.x>>6;
diff --git a/scene/resources/material.cpp b/scene/resources/material.cpp
index e56314c1f8..f6213f74e8 100644
--- a/scene/resources/material.cpp
+++ b/scene/resources/material.cpp
@@ -406,10 +406,10 @@ void FixedMaterial::_bind_methods() {
BIND_CONSTANT( PARAM_SHADE_PARAM );
BIND_CONSTANT( PARAM_MAX );
- BIND_CONSTANT( TEXCOORD_SPHERE );
BIND_CONSTANT( TEXCOORD_UV );
BIND_CONSTANT( TEXCOORD_UV_TRANSFORM );
BIND_CONSTANT( TEXCOORD_UV2 );
+ BIND_CONSTANT( TEXCOORD_SPHERE );
BIND_CONSTANT( FLAG_USE_ALPHA );
BIND_CONSTANT( FLAG_USE_COLOR_ARRAY );
diff --git a/scene/resources/mesh.cpp b/scene/resources/mesh.cpp
index a1a1f0a935..921466585d 100644
--- a/scene/resources/mesh.cpp
+++ b/scene/resources/mesh.cpp
@@ -30,7 +30,8 @@
#include "scene/resources/concave_polygon_shape.h"
#include "scene/resources/convex_polygon_shape.h"
#include "surface_tool.h"
-static const char*_array_name[]={
+
+static const char* _array_name[]={
"vertex_array",
"normal_array",
"tangent_array",
@@ -847,7 +848,6 @@ Ref<Mesh> Mesh::create_outline(float p_margin) const {
}
{
- int tc=0;
DVector<int>::Write ir;
DVector<int> indices =arrays[ARRAY_INDEX];
bool has_indices=false;
diff --git a/scene/resources/packed_scene.cpp b/scene/resources/packed_scene.cpp
index 4f5eed8796..c36480420b 100644
--- a/scene/resources/packed_scene.cpp
+++ b/scene/resources/packed_scene.cpp
@@ -471,7 +471,6 @@ Error SceneState::_parse_node(Node *p_owner,Node *p_node,int p_parent_idx, Map<S
}
}
#endif
- int subscene_prop_search_from=0;
// all setup, we then proceed to check all properties for the node
// and save the ones that are worth saving
@@ -479,8 +478,6 @@ Error SceneState::_parse_node(Node *p_owner,Node *p_node,int p_parent_idx, Map<S
List<PropertyInfo> plist;
p_node->get_property_list(&plist);
- bool saved_script=false;
-
for (List<PropertyInfo>::Element *E=plist.front();E;E=E->next()) {
@@ -528,23 +525,7 @@ Error SceneState::_parse_node(Node *p_owner,Node *p_node,int p_parent_idx, Map<S
break;
}
}
-#if 0
-// this workaround ended up causing problems:
-https://github.com/godotengine/godot/issues/3127
- if (saved_script && exists && p_node->get_script_instance()) {
- //if this is an overriden value by another script, save it anyway
- //as the script change will erase it
- //https://github.com/godotengine/godot/issues/2958
-
- bool valid=false;
- p_node->get_script_instance()->get_property_type(name,&valid);
- if (valid) {
- exists=false;
- isdefault=false;
- }
- }
-#endif
if (exists) {
@@ -577,9 +558,6 @@ https://github.com/godotengine/godot/issues/3127
}
}
- if (name=="script/script")
- saved_script=true;
-
NodeData::Property prop;
prop.name=_nm_get_string( name,name_map);
prop.value=_vm_get_variant( value, variant_map);
diff --git a/scene/resources/sample_library.cpp b/scene/resources/sample_library.cpp
index 73517b180e..67481f267d 100644
--- a/scene/resources/sample_library.cpp
+++ b/scene/resources/sample_library.cpp
@@ -106,9 +106,9 @@ void SampleLibrary::remove_sample(const StringName& p_name) {
sample_map.erase(p_name);
}
-void SampleLibrary::get_sample_list(List<StringName> *p_samples) {
+void SampleLibrary::get_sample_list(List<StringName> *p_samples) const {
- for(Map<StringName,SampleData >::Element *E=sample_map.front();E;E=E->next()) {
+ for(const Map<StringName,SampleData >::Element *E=sample_map.front();E;E=E->next()) {
p_samples->push_back(E->key());
}
@@ -177,7 +177,20 @@ float SampleLibrary::sample_get_pitch_scale(const StringName& p_name) const{
return sample_map[p_name].pitch_scale;
}
+Array SampleLibrary::_get_sample_list() const {
+ List<StringName> snames;
+ get_sample_list(&snames);
+
+ snames.sort_custom<StringName::AlphCompare>();
+
+ Array ret;
+ for (List<StringName>::Element *E=snames.front();E;E=E->next()) {
+ ret.push_back(E->get());
+ }
+
+ return ret;
+}
void SampleLibrary::_bind_methods() {
@@ -186,6 +199,8 @@ void SampleLibrary::_bind_methods() {
ObjectTypeDB::bind_method(_MD("has_sample","name"),&SampleLibrary::has_sample );
ObjectTypeDB::bind_method(_MD("remove_sample","name"),&SampleLibrary::remove_sample );
+ ObjectTypeDB::bind_method(_MD("get_sample_list"),&SampleLibrary::_get_sample_list );
+
ObjectTypeDB::bind_method(_MD("sample_set_volume_db","name","db"),&SampleLibrary::sample_set_volume_db );
ObjectTypeDB::bind_method(_MD("sample_get_volume_db","name"),&SampleLibrary::sample_get_volume_db );
diff --git a/scene/resources/sample_library.h b/scene/resources/sample_library.h
index 8377967106..e572aa215a 100644
--- a/scene/resources/sample_library.h
+++ b/scene/resources/sample_library.h
@@ -47,6 +47,8 @@ class SampleLibrary : public Resource {
};
Map<StringName,SampleData > sample_map;
+
+ Array _get_sample_list() const;
protected:
bool _set(const StringName& p_name, const Variant& p_value);
@@ -66,7 +68,7 @@ public:
void sample_set_pitch_scale(const StringName& p_name, float p_pitch);
float sample_get_pitch_scale(const StringName& p_name) const;
Ref<Sample> get_sample(const StringName& p_name) const;
- void get_sample_list(List<StringName> *p_samples);
+ void get_sample_list(List<StringName> *p_samples) const;
void remove_sample(const StringName& p_name);
StringName get_sample_idx(int p_idx) const;
diff --git a/servers/audio/audio_mixer_sw.cpp b/servers/audio/audio_mixer_sw.cpp
index 64369182b1..17f8c36c9a 100644
--- a/servers/audio/audio_mixer_sw.cpp
+++ b/servers/audio/audio_mixer_sw.cpp
@@ -75,7 +75,7 @@ void AudioMixerSW::do_resample(const Depth* p_src, int32_t *p_dst, ResamplerStat
for(int i=0;i<(is_stereo?2:1);i++) {
- int16_t nibble,signed_nibble,diff,step;
+ int16_t nibble,diff,step;
p_state->ima_adpcm[i].last_nibble++;
const uint8_t *src_ptr=p_state->ima_adpcm[i].ptr;
@@ -92,10 +92,6 @@ void AudioMixerSW::do_resample(const Depth* p_src, int32_t *p_dst, ResamplerStat
if (p_state->ima_adpcm[i].step_index>88)
p_state->ima_adpcm[i].step_index=88;
- /*
- signed_nibble = (nibble&7) * ((nibble&8)?-1:1);
- diff = (2 * signed_nibble + 1) * step / 4; */
-
diff = step >> 3 ;
if (nibble & 1)
diff += step >> 2 ;
diff --git a/servers/physics/body_pair_sw.cpp b/servers/physics/body_pair_sw.cpp
index 40e906c36c..3202e52abb 100644
--- a/servers/physics/body_pair_sw.cpp
+++ b/servers/physics/body_pair_sw.cpp
@@ -307,10 +307,6 @@ bool BodyPairSW::setup(float p_step) {
}
#endif
-
- int gather_A = A->can_report_contacts();
- int gather_B = B->can_report_contacts();
-
c.rA = global_A;
c.rB = global_B-offset_B;
diff --git a/servers/physics/collision_solver_sat.cpp b/servers/physics/collision_solver_sat.cpp
index 8789663f63..3e7719e5eb 100644
--- a/servers/physics/collision_solver_sat.cpp
+++ b/servers/physics/collision_solver_sat.cpp
@@ -1230,7 +1230,6 @@ static void _collision_capsule_convex_polygon(const ShapeSW *p_a,const Transform
const Geometry::MeshData::Edge *edges = mesh.edges.ptr();
int edge_count = mesh.edges.size();
const Vector3 *vertices = mesh.vertices.ptr();
- int vertex_count = mesh.vertices.size();
// faces of B
for (int i=0;i<face_count;i++) {
diff --git a/servers/physics/shape_sw.cpp b/servers/physics/shape_sw.cpp
index 5923f89120..1d4914c945 100644
--- a/servers/physics/shape_sw.cpp
+++ b/servers/physics/shape_sw.cpp
@@ -766,7 +766,6 @@ bool ConvexPolygonShapeSW::intersect_segment(const Vector3& p_begin,const Vector
int fc = mesh.faces.size();
const Vector3 *vertices = mesh.vertices.ptr();
- int vc = mesh.vertices.size();
Vector3 n = p_end-p_begin;
float min = 1e20;
@@ -873,14 +872,11 @@ void FaceShapeSW::project_range(const Vector3& p_normal, const Transform& p_tran
Vector3 FaceShapeSW::get_support(const Vector3& p_normal) const {
- Vector3 n=p_normal;
-
int vert_support_idx=-1;
float support_max;
for (int i=0;i<3;i++) {
- //float d=n.dot(vertex[i]);
float d=p_normal.dot(vertex[i]);
if (i==0 || d > support_max) {
diff --git a/servers/physics/space_sw.cpp b/servers/physics/space_sw.cpp
index 1e6f42aa02..7077146420 100644
--- a/servers/physics/space_sw.cpp
+++ b/servers/physics/space_sw.cpp
@@ -150,7 +150,6 @@ int PhysicsDirectSpaceStateSW::intersect_shape(const RID& p_shape, const Transfo
int amount = space->broadphase->cull_aabb(aabb,space->intersection_query_results,SpaceSW::INTERSECTION_QUERY_MAX,space->intersection_query_subindex_results);
- bool collided=false;
int cc=0;
//Transform ai = p_xform.affine_inverse();
@@ -269,7 +268,6 @@ bool PhysicsDirectSpaceStateSW::cast_motion(const RID& p_shape, const Transform&
for(int i=0;i<8;i++) { //steps should be customizable..
- Transform xfa = p_xform;
float ofs = (low+hi)*0.5;
Vector3 sep=mnormal; //important optimization for this to work fast enough
@@ -337,7 +335,6 @@ bool PhysicsDirectSpaceStateSW::collide_shape(RID p_shape, const Transform& p_sh
int amount = space->broadphase->cull_aabb(aabb,space->intersection_query_results,SpaceSW::INTERSECTION_QUERY_MAX,space->intersection_query_subindex_results);
bool collided=false;
- int cc=0;
r_result_count=0;
PhysicsServerSW::CollCbkData cbk;
@@ -457,7 +454,6 @@ bool PhysicsDirectSpaceStateSW::rest_info(RID p_shape, const Transform& p_shape_
if (rcd.best_object->get_type()==CollisionObjectSW::TYPE_BODY) {
const BodySW *body = static_cast<const BodySW*>(rcd.best_object);
- Vector3 rel_vec = r_info->point-body->get_transform().get_origin();
r_info->linear_velocity = body->get_linear_velocity() +
(body->get_angular_velocity()).cross(body->get_transform().origin-rcd.best_contact);// * mPos);
diff --git a/servers/physics_2d/shape_2d_sw.cpp b/servers/physics_2d/shape_2d_sw.cpp
index 8b583dd3c6..9291aa6c17 100644
--- a/servers/physics_2d/shape_2d_sw.cpp
+++ b/servers/physics_2d/shape_2d_sw.cpp
@@ -243,7 +243,6 @@ bool SegmentShape2DSW::intersect_segment(const Vector2& p_begin,const Vector2& p
if (!Geometry::segment_intersects_segment_2d(p_begin,p_end,a,b,&r_point))
return false;
- Vector2 d = p_end-p_begin;
if (n.dot(p_begin) > n.dot(a)) {
r_normal=n;
} else {
@@ -825,7 +824,6 @@ bool ConcavePolygonShape2DSW::intersect_segment(const Vector2& p_begin,const Vec
const Segment *segmentptr=&segments[0];
const Vector2 *pointptr=&points[0];
const BVH *bvhptr = &bvh[0];
- int pos=bvh.size()-1;
stack[0]=0;
@@ -1088,7 +1086,6 @@ void ConcavePolygonShape2DSW::cull(const Rect2& p_local_aabb,Callback p_callback
const Segment *segmentptr=&segments[0];
const Vector2 *pointptr=&points[0];
const BVH *bvhptr = &bvh[0];
- int pos=bvh.size()-1;
stack[0]=0;
diff --git a/servers/physics_2d/space_2d_sw.cpp b/servers/physics_2d/space_2d_sw.cpp
index ddef5fc86b..5fde6f567b 100644
--- a/servers/physics_2d/space_2d_sw.cpp
+++ b/servers/physics_2d/space_2d_sw.cpp
@@ -200,7 +200,6 @@ int Physics2DDirectSpaceStateSW::intersect_shape(const RID& p_shape, const Matri
int amount = space->broadphase->cull_aabb(aabb,space->intersection_query_results,p_result_max,space->intersection_query_subindex_results);
- bool collided=false;
int cc=0;
for(int i=0;i<amount;i++) {
@@ -307,7 +306,6 @@ bool Physics2DDirectSpaceStateSW::cast_motion(const RID& p_shape, const Matrix32
for(int i=0;i<8;i++) { //steps should be customizable..
- Matrix32 xfa = p_xform;
float ofs = (low+hi)*0.5;
Vector2 sep=mnormal; //important optimization for this to work fast enough
@@ -377,7 +375,6 @@ bool Physics2DDirectSpaceStateSW::collide_shape(RID p_shape, const Matrix32& p_s
int amount = space->broadphase->cull_aabb(aabb,space->intersection_query_results,Space2DSW::INTERSECTION_QUERY_MAX,space->intersection_query_subindex_results);
bool collided=false;
- int cc=0;
r_result_count=0;
Physics2DServerSW::CollCbkData cbk;
@@ -768,7 +765,6 @@ bool Space2DSW::test_body_motion(Body2DSW *p_body,const Vector2&p_motion,float p
for(int i=0;i<8;i++) { //steps should be customizable..
- //Matrix32 xfa = p_xform;
float ofs = (low+hi)*0.5;
Vector2 sep=mnormal; //important optimization for this to work fast enough
diff --git a/servers/spatial_sound_2d/spatial_sound_2d_server_sw.cpp b/servers/spatial_sound_2d/spatial_sound_2d_server_sw.cpp
index d27b322c21..6c42c2f527 100644
--- a/servers/spatial_sound_2d/spatial_sound_2d_server_sw.cpp
+++ b/servers/spatial_sound_2d/spatial_sound_2d_server_sw.cpp
@@ -851,23 +851,6 @@ void SpatialSound2DServerSW::update(float p_delta) {
//this could be optimized at some point... am not sure
Space *space=space_owner.get(source->space);
Room *room=room_owner.get(space->default_room);
- int max_level=-0x80000000;
- /*
- int rooms_culled = space->octree.cull_point(source->transform.origin,cull_rooms,MAX_CULL_ROOMS);
- for(int i=0;i<rooms_culled;i++) {
-
- Room *r=cull_rooms[i];
- ERR_CONTINUE( r->bounds.is_empty() ); // how did this happen??
- if (r->level<=max_level) //ignore optimization (level too low)
- continue;
- Vector2 local_point = r->inverse_transform.xform(source->transform.origin);
- if (!r->bounds.point_is_inside(local_point))
- continue;
- room=r;
- max_level=r->level;
-
- }
- */
//compute mixing weights (support for multiple listeners in the same output)
float total_distance=0;
diff --git a/servers/visual/shader_language.cpp b/servers/visual/shader_language.cpp
index 0b2a282c04..09b3ada509 100644
--- a/servers/visual/shader_language.cpp
+++ b/servers/visual/shader_language.cpp
@@ -2539,8 +2539,6 @@ Error ShaderLanguage::parse_block(Parser& parser,BlockNode *p_block) {
Error ShaderLanguage::parse(const Vector<Token>& p_tokens,ShaderType p_type,CompileFunc p_compile_func,void *p_userdata,String *r_error,int *r_err_line,int *r_err_column) {
- uint64_t t = OS::get_singleton()->get_ticks_usec();
-
Parser parser(p_tokens);
parser.program = parser.create_node<ProgramNode>(NULL);
parser.program->body = parser.create_node<BlockNode>(parser.program);
@@ -2605,18 +2603,10 @@ Error ShaderLanguage::parse(const Vector<Token>& p_tokens,ShaderType p_type,Comp
return err;
}
- double tf = (OS::get_singleton()->get_ticks_usec()-t)/1000.0;
- //print_line("parse time: "+rtos(tf));
-
- t = OS::get_singleton()->get_ticks_usec();
-
if (p_compile_func) {
err = p_compile_func(p_userdata,parser.program);
}
- tf = (OS::get_singleton()->get_ticks_usec()-t)/1000.0;
- //print_line("compile time: "+rtos(tf));
-
//clean up nodes created
while(parser.nodegc.size()) {
@@ -2633,22 +2623,16 @@ Error ShaderLanguage::compile(const String& p_code,ShaderType p_type,CompileFunc
*r_err_column=0;
Vector<Token> tokens;
- uint64_t t = OS::get_singleton()->get_ticks_usec();
-
Error err = tokenize(p_code,&tokens,r_error,r_err_line,r_err_column);
if (err!=OK) {
print_line("tokenizer error!");
}
- double tf = (OS::get_singleton()->get_ticks_usec()-t)/1000.0;
- //print_line("tokenize time: "+rtos(tf));
-
if (err!=OK) {
return err;
}
err = parse(tokens,p_type,p_compile_func,p_userdata,r_error,r_err_line,r_err_column);
if (err!=OK) {
- //print_line("LDEBUG: "+lex_debug(p_code));
return err;
}
return OK;
diff --git a/servers/visual/visual_server_raster.cpp b/servers/visual/visual_server_raster.cpp
index 532247d94c..d89ea887fa 100644
--- a/servers/visual/visual_server_raster.cpp
+++ b/servers/visual/visual_server_raster.cpp
@@ -4448,12 +4448,13 @@ void VisualServerRaster::cursor_set_rotation(float p_rotation, int p_cursor) {
cursors[p_cursor].rot = p_rotation;
};
-void VisualServerRaster::cursor_set_texture(RID p_texture, const Point2 &p_center_offset, int p_cursor) {
+void VisualServerRaster::cursor_set_texture(RID p_texture, const Point2 &p_center_offset, int p_cursor, const Rect2 &p_region) {
VS_CHANGED;
ERR_FAIL_INDEX(p_cursor, MAX_CURSORS);
cursors[p_cursor].texture = p_texture;
cursors[p_cursor].center = p_center_offset;
+ cursors[p_cursor].region = p_region;
};
void VisualServerRaster::cursor_set_visible(bool p_visible, int p_cursor) {
@@ -4843,11 +4844,6 @@ void VisualServerRaster::_instance_draw(Instance *p_instance) {
switch(p_instance->base_type) {
case INSTANCE_MESH: {
- const float *morphs = NULL;
- if (!p_instance->data.morph_values.empty()) {
- morphs=&p_instance->data.morph_values[0];
- }
-
rasterizer->add_mesh(p_instance->base_rid, &p_instance->data);
} break;
case INSTANCE_MULTIMESH: {
@@ -5227,8 +5223,6 @@ void VisualServerRaster::_light_instance_update_lispsm_shadow(Instance *p_light,
Vector3 light_vec = -p_light->data.transform.basis.get_axis(2);
Vector3 view_vec = -p_camera->transform.basis.get_axis(2);
- float viewdot = light_vec.normalized().dot(view_vec.normalized());
-
float near_dist=1;
@@ -6466,7 +6460,6 @@ void VisualServerRaster::_render_no_camera(Viewport *p_viewport,Camera *p_camera
void VisualServerRaster::_render_camera(Viewport *p_viewport,Camera *p_camera, Scenario *p_scenario) {
- uint64_t t = OS::get_singleton()->get_ticks_usec();
render_pass++;
uint32_t camera_layer_mask=p_camera->visible_layers;
@@ -7538,8 +7531,13 @@ void VisualServerRaster::_draw_cursors_and_margins() {
RID tex = cursors[i].texture?cursors[i].texture:default_cursor_texture;
ERR_CONTINUE( !tex );
- Point2 size(texture_get_width(tex), texture_get_height(tex));
- rasterizer->canvas_draw_rect(Rect2(cursors[i].pos, size), 0, Rect2(), tex, Color(1, 1, 1, 1));
+ if (cursors[i].region.has_no_area()) {
+ Point2 size(texture_get_width(tex), texture_get_height(tex));
+ rasterizer->canvas_draw_rect(Rect2(cursors[i].pos, size), 0, Rect2(), tex, Color(1, 1, 1, 1));
+ } else {
+ Point2 size = cursors[i].region.size;
+ rasterizer->canvas_draw_rect(Rect2(cursors[i].pos, size), Rasterizer::CANVAS_RECT_REGION, cursors[i].region, tex, Color(1, 1, 1, 1));
+ }
};
diff --git a/servers/visual/visual_server_raster.h b/servers/visual/visual_server_raster.h
index 0480d9f5cb..228a4a7c44 100644
--- a/servers/visual/visual_server_raster.h
+++ b/servers/visual/visual_server_raster.h
@@ -544,10 +544,12 @@ class VisualServerRaster : public VisualServer {
RID texture;
Point2 center;
bool visible;
+ Rect2 region;
Cursor() {
rot = 0;
visible = false;
+ region = Rect2();
};
};
@@ -1240,7 +1242,7 @@ public:
/* CURSOR */
virtual void cursor_set_rotation(float p_rotation, int p_cursor = 0); // radians
- virtual void cursor_set_texture(RID p_texture, const Point2 &p_center_offset, int p_cursor=0);
+ virtual void cursor_set_texture(RID p_texture, const Point2 &p_center_offset, int p_cursor=0, const Rect2 &p_region=Rect2());
virtual void cursor_set_visible(bool p_visible, int p_cursor = 0);
virtual void cursor_set_pos(const Point2& p_pos, int p_cursor = 0);
diff --git a/servers/visual/visual_server_wrap_mt.h b/servers/visual/visual_server_wrap_mt.h
index a97b232c03..8c39b0bea1 100644
--- a/servers/visual/visual_server_wrap_mt.h
+++ b/servers/visual/visual_server_wrap_mt.h
@@ -680,7 +680,7 @@ public:
/* CURSOR */
FUNC2(cursor_set_rotation,float , int ); // radians
- FUNC3(cursor_set_texture,RID , const Point2 &, int );
+ FUNC4(cursor_set_texture,RID , const Point2 &, int, const Rect2 &);
FUNC2(cursor_set_visible,bool , int );
FUNC2(cursor_set_pos,const Point2& , int );
diff --git a/servers/visual_server.cpp b/servers/visual_server.cpp
index fafc09f554..9ec02f5071 100644
--- a/servers/visual_server.cpp
+++ b/servers/visual_server.cpp
@@ -757,7 +757,6 @@ void VisualServer::mesh_add_surface_from_mesh_data( RID p_mesh, const Geometry::
}
}
- int s = mesh_get_surface_count(p_mesh);
Array d;
d.resize(VS::ARRAY_MAX);
d[ARRAY_VERTEX]=vertices;
diff --git a/servers/visual_server.h b/servers/visual_server.h
index f330a6faee..64318dfd72 100644
--- a/servers/visual_server.h
+++ b/servers/visual_server.h
@@ -1110,7 +1110,7 @@ public:
/* CURSOR */
virtual void cursor_set_rotation(float p_rotation, int p_cursor = 0)=0; // radians
- virtual void cursor_set_texture(RID p_texture, const Point2 &p_center_offset = Point2(0, 0), int p_cursor=0)=0;
+ virtual void cursor_set_texture(RID p_texture, const Point2 &p_center_offset = Point2(0, 0), int p_cursor=0, const Rect2 &p_region=Rect2())=0;
virtual void cursor_set_visible(bool p_visible, int p_cursor = 0)=0;
virtual void cursor_set_pos(const Point2& p_pos, int p_cursor = 0)=0;
diff --git a/tools/doc/doc_data.cpp b/tools/doc/doc_data.cpp
index 14b937be38..398267937b 100644
--- a/tools/doc/doc_data.cpp
+++ b/tools/doc/doc_data.cpp
@@ -940,11 +940,11 @@ Error DocData::save(const String& p_path) {
_write_string(f,0,header);
_write_string(f,1,"<brief_description>");
if (c.brief_description!="")
- _write_string(f,1,c.brief_description.xml_escape());
+ _write_string(f,2,c.brief_description.xml_escape());
_write_string(f,1,"</brief_description>");
_write_string(f,1,"<description>");
if (c.description!="")
- _write_string(f,1,c.description.xml_escape());
+ _write_string(f,2,c.description.xml_escape());
_write_string(f,1,"</description>");
_write_string(f,1,"<methods>");
@@ -980,7 +980,7 @@ Error DocData::save(const String& p_path) {
_write_string(f,3,"<description>");
if (m.description!="")
- _write_string(f,3,m.description.xml_escape());
+ _write_string(f,4,m.description.xml_escape());
_write_string(f,3,"</description>");
_write_string(f,2,"</method>");
@@ -1026,7 +1026,7 @@ Error DocData::save(const String& p_path) {
_write_string(f,3,"<description>");
if (m.description!="")
- _write_string(f,3,m.description.xml_escape());
+ _write_string(f,4,m.description.xml_escape());
_write_string(f,3,"</description>");
_write_string(f,2,"</signal>");
diff --git a/tools/editor/animation_editor.cpp b/tools/editor/animation_editor.cpp
index c7b78b980f..9eb6b4013f 100644
--- a/tools/editor/animation_editor.cpp
+++ b/tools/editor/animation_editor.cpp
@@ -693,11 +693,103 @@ void AnimationKeyEditor::_menu_add_track(int p_type) {
}
}
+void AnimationKeyEditor::_anim_duplicate_keys(bool transpose) {
+ //duplicait!
+ if (selection.size() && animation.is_valid() && selected_track>=0 && selected_track<animation->get_track_count()) {
+
+ int top_track=0x7FFFFFFF;
+ float top_time = 1e10;
+ for(Map<SelectedKey,KeyInfo>::Element *E=selection.back();E;E=E->prev()) {
+
+ const SelectedKey &sk = E->key();
+
+ float t = animation->track_get_key_time(sk.track,sk.key);
+ if (t<top_time)
+ top_time=t;
+ if (sk.track<top_track)
+ top_track=sk.track;
+
+ }
+ ERR_FAIL_COND( top_track == 0x7FFFFFFF || top_time==1e10 );
+
+ //
+
+ int start_track = transpose ? selected_track : top_track;
+
+ undo_redo->create_action(TTR("Anim Duplicate Keys"));
+
+ List<Pair<int,float> > new_selection_values;
+
+ for(Map<SelectedKey,KeyInfo>::Element *E=selection.back();E;E=E->prev()) {
+
+ const SelectedKey &sk = E->key();
+
+ float t = animation->track_get_key_time(sk.track,sk.key);
+
+ float dst_time = t+(timeline_pos - top_time);
+ int dst_track = sk.track + (start_track - top_track);
+
+ if (dst_track < 0 || dst_track>= animation->get_track_count())
+ continue;
+
+ if (animation->track_get_type(dst_track) != animation->track_get_type(sk.track))
+ continue;
+
+ int existing_idx = animation->track_find_key(dst_track,dst_time,true);
+
+ undo_redo->add_do_method(animation.ptr(),"track_insert_key",dst_track,dst_time,animation->track_get_key_value(E->key().track,E->key().key),animation->track_get_key_transition(E->key().track,E->key().key));
+ undo_redo->add_undo_method(animation.ptr(),"track_remove_key_at_pos",dst_track,dst_time);
+
+ Pair<int,float> p;
+ p.first=dst_track;
+ p.second=dst_time;
+ new_selection_values.push_back( p );
+
+ if (existing_idx!=-1) {
+
+ undo_redo->add_undo_method(animation.ptr(),"track_insert_key",dst_track,dst_time,animation->track_get_key_value(dst_track,existing_idx),animation->track_get_key_transition(dst_track,existing_idx));
+
+ }
+
+ }
+
+ undo_redo->commit_action();
+
+ //reselect duplicated
+
+ Map<SelectedKey,KeyInfo> new_selection;
+ for (List<Pair<int,float> >::Element *E=new_selection_values.front();E;E=E->next()) {
+
+ int track=E->get().first;
+ float time = E->get().second;
+
+ int existing_idx = animation->track_find_key(track,time,true);
+
+ if (existing_idx==-1)
+ continue;
+ SelectedKey sk2;
+ sk2.track=track;
+ sk2.key=existing_idx;
+
+ KeyInfo ki;
+ ki.pos=time;
+
+ new_selection[sk2]=ki;
+
+ }
+
+
+ selection=new_selection;
+ track_editor->update();
+ _edit_if_single_selection();
+
+ }
+}
+
void AnimationKeyEditor::_menu_track(int p_type) {
ERR_FAIL_COND(!animation.is_valid());
-
last_menu_track_opt=p_type;
switch(p_type) {
@@ -765,108 +857,7 @@ void AnimationKeyEditor::_menu_track(int p_type) {
case TRACK_MENU_DUPLICATE:
case TRACK_MENU_DUPLICATE_TRANSPOSE: {
-
- //duplicait!
- if (selection.size() && animation.is_valid() && selected_track>=0 && selected_track<animation->get_track_count()) {
-
-
- int top_track=0x7FFFFFFF;
- float top_time = 1e10;
- for(Map<SelectedKey,KeyInfo>::Element *E=selection.back();E;E=E->prev()) {
-
- const SelectedKey &sk = E->key();
-
- float t = animation->track_get_key_time(sk.track,sk.key);
- if (t<top_time)
- top_time=t;
- if (sk.track<top_track)
- top_track=sk.track;
-
-
- }
- ERR_FAIL_COND( top_track == 0x7FFFFFFF || top_time==1e10 );
-
- //
-
- int start_track = p_type==TRACK_MENU_DUPLICATE_TRANSPOSE ? selected_track : top_track;
-
-
- undo_redo->create_action(TTR("Anim Duplicate Keys"));
-
- List<Pair<int,float> > new_selection_values;
-
- for(Map<SelectedKey,KeyInfo>::Element *E=selection.back();E;E=E->prev()) {
-
- const SelectedKey &sk = E->key();
-
- float t = animation->track_get_key_time(sk.track,sk.key);
-
- float dst_time = t+(timeline_pos - top_time);
- int dst_track = sk.track + (start_track - top_track);
-
- if (dst_track < 0 || dst_track>= animation->get_track_count())
- continue;
-
- if (animation->track_get_type(dst_track) != animation->track_get_type(sk.track))
- continue;
-
- int existing_idx = animation->track_find_key(dst_track,dst_time,true);
-
- undo_redo->add_do_method(animation.ptr(),"track_insert_key",dst_track,dst_time,animation->track_get_key_value(E->key().track,E->key().key),animation->track_get_key_transition(E->key().track,E->key().key));
- undo_redo->add_undo_method(animation.ptr(),"track_remove_key_at_pos",dst_track,dst_time);
-
- Pair<int,float> p;
- p.first=dst_track;
- p.second=dst_time;
- new_selection_values.push_back( p );
-
- if (existing_idx!=-1) {
-
- undo_redo->add_undo_method(animation.ptr(),"track_insert_key",dst_track,dst_time,animation->track_get_key_value(dst_track,existing_idx),animation->track_get_key_transition(dst_track,existing_idx));
-
- }
-
-
-
- }
-
- undo_redo->commit_action();
-
- //reselect duplicated
-
- Map<SelectedKey,KeyInfo> new_selection;
- for (List<Pair<int,float> >::Element *E=new_selection_values.front();E;E=E->next()) {
-
-
- int track=E->get().first;
- float time = E->get().second;
-
- int existing_idx = animation->track_find_key(track,time,true);
-
- if (existing_idx==-1)
- continue;
- SelectedKey sk2;
- sk2.track=track;
- sk2.key=existing_idx;
-
- KeyInfo ki;
- ki.pos=time;
-
-
- new_selection[sk2]=ki;
-
-
- }
-
-
- selection=new_selection;
- track_editor->update();
- _edit_if_single_selection();
-
-
- }
-
-
+ _anim_duplicate_keys(p_type==TRACK_MENU_DUPLICATE_TRANSPOSE);
} break;
case TRACK_MENU_SET_ALL_TRANS_LINEAR:
case TRACK_MENU_SET_ALL_TRANS_CONSTANT:
@@ -1618,9 +1609,7 @@ void AnimationKeyEditor::_track_menu_selected(int p_idx) {
undo_redo->add_do_method(animation.ptr(),"track_set_interpolation_type",interp_editing,p_idx);
undo_redo->add_undo_method(animation.ptr(),"track_set_interpolation_type",interp_editing,animation->track_get_interpolation_type(interp_editing));
undo_redo->commit_action();
- }
-
- if (cont_editing!=-1) {
+ } else if (cont_editing!=-1) {
ERR_FAIL_INDEX(cont_editing,animation->get_track_count());
@@ -1628,6 +1617,16 @@ void AnimationKeyEditor::_track_menu_selected(int p_idx) {
undo_redo->add_do_method(animation.ptr(),"value_track_set_update_mode",cont_editing,p_idx);
undo_redo->add_undo_method(animation.ptr(),"value_track_set_update_mode",cont_editing,animation->value_track_get_update_mode(cont_editing));
undo_redo->commit_action();
+ } else {
+ switch (p_idx) {
+
+ case RIGHT_MENU_DUPLICATE:
+ _anim_duplicate_keys(); break;
+ case RIGHT_MENU_DUPLICATE_TRANSPOSE:
+ _anim_duplicate_keys(true); break;
+ case RIGHT_MENU_REMOVE:
+ _anim_delete_keys(); break;
+ }
}
}
@@ -1789,6 +1788,25 @@ bool AnimationKeyEditor::_edit_if_single_selection() {
}
+void AnimationKeyEditor::_anim_delete_keys() {
+ if (selection.size()) {
+ undo_redo->create_action(TTR("Anim Delete Keys"));
+
+ for(Map<SelectedKey,KeyInfo>::Element *E=selection.back();E;E=E->prev()) {
+
+ undo_redo->add_do_method(animation.ptr(),"track_remove_key",E->key().track,E->key().key);
+ undo_redo->add_undo_method(animation.ptr(),"track_insert_key",E->key().track,E->get().pos,animation->track_get_key_value(E->key().track,E->key().key),animation->track_get_key_transition(E->key().track,E->key().key));
+
+ }
+ undo_redo->add_do_method(this,"_clear_selection_for_anim",animation);
+ undo_redo->add_undo_method(this,"_clear_selection_for_anim",animation);
+ undo_redo->commit_action();
+ //selection.clear();
+ accept_event();
+ _edit_if_single_selection();
+ }
+}
+
void AnimationKeyEditor::_track_editor_input_event(const InputEvent& p_input) {
Control *te=track_editor;
@@ -1859,22 +1877,7 @@ void AnimationKeyEditor::_track_editor_input_event(const InputEvent& p_input) {
} else if (p_input.key.scancode==KEY_DELETE && p_input.key.pressed && click.click==ClickOver::CLICK_NONE) {
- if (selection.size()) {
- undo_redo->create_action(TTR("Anim Delete Keys"));
-
- for(Map<SelectedKey,KeyInfo>::Element *E=selection.back();E;E=E->prev()) {
-
- undo_redo->add_do_method(animation.ptr(),"track_remove_key",E->key().track,E->key().key);
- undo_redo->add_undo_method(animation.ptr(),"track_insert_key",E->key().track,E->get().pos,animation->track_get_key_value(E->key().track,E->key().key),animation->track_get_key_transition(E->key().track,E->key().key));
-
- }
- undo_redo->add_do_method(this,"_clear_selection_for_anim",animation);
- undo_redo->add_undo_method(this,"_clear_selection_for_anim",animation);
- undo_redo->commit_action();
- //selection.clear();
- accept_event();
- _edit_if_single_selection();
- }
+ _anim_delete_keys();
} else if (animation.is_valid() && animation->get_track_count()>0) {
if (p_input.is_pressed() && (p_input.is_action("ui_up") || p_input.is_action("ui_page_up"))) {
@@ -1934,6 +1937,116 @@ void AnimationKeyEditor::_track_editor_input_event(const InputEvent& p_input) {
v_scroll->set_val( v_scroll->get_val() + v_scroll->get_page() / 8 );
}
+ if (mb.button_index==BUTTON_RIGHT && mb.pressed) {
+
+ Point2 mpos = Point2(mb.x,mb.y)-ofs;
+
+ if (selection.size() == 0) {
+ // Auto-select on right-click if nothing is selected
+ // Note: This code is pretty much duplicated from the left click code,
+ // both codes could be moved into a function to avoid the duplicated code.
+ Point2 mpos = Point2(mb.x,mb.y)-ofs;
+
+ if (mpos.y < h ) {
+ return;
+ }
+
+ mpos.y -= h;
+
+ int idx = mpos.y / h;
+ idx+=v_scroll->get_val();
+ if (idx <0 || idx>=animation->get_track_count())
+ break;
+
+ if (mpos.x < name_limit) {
+ } else if (mpos.x < settings_limit) {
+ float pos = mpos.x - name_limit;
+ pos/=_get_zoom_scale();
+ pos+=h_scroll->get_val();
+ float w_time = (type_icon[0]->get_width() / _get_zoom_scale())/2.0;
+
+ int kidx = animation->track_find_key(idx,pos);
+ int kidx_n = kidx+1;
+ int key=-1;
+
+ if (kidx>=0 && kidx<animation->track_get_key_count(idx)) {
+
+ float kpos = animation->track_get_key_time(idx,kidx);
+ if (ABS(pos-kpos)<=w_time) {
+
+ key=kidx;
+ }
+ }
+
+ if (key==-1 && kidx_n>=0 && kidx_n<animation->track_get_key_count(idx)) {
+
+ float kpos = animation->track_get_key_time(idx,kidx_n);
+ if (ABS(pos-kpos)<=w_time) {
+
+ key=kidx_n;
+ }
+ }
+
+ if (key==-1) {
+
+ click.click=ClickOver::CLICK_SELECT_KEYS;
+ click.at=Point2(mb.x,mb.y);
+ click.to=click.at;
+ click.shift=mb.mod.shift;
+ selected_track=idx;
+ track_editor->update();
+ //drag select region
+ return;
+
+ }
+
+
+
+ SelectedKey sk;
+ sk.track=idx;
+ sk.key=key;
+ KeyInfo ki;
+ ki.pos= animation->track_get_key_time(idx,key);
+ click.shift=mb.mod.shift;
+ click.selk=sk;
+
+
+ if (!mb.mod.shift && !selection.has(sk))
+ _clear_selection();
+
+ selection.insert(sk,ki);
+
+ click.click=ClickOver::CLICK_MOVE_KEYS;
+ click.at=Point2(mb.x,mb.y);
+ click.to=click.at;
+ update();
+ selected_track=idx;
+ track_editor->update();
+
+ if (_edit_if_single_selection() && mb.mod.command) {
+ edit_button->set_pressed(true);
+ key_editor_tab->show();
+ }
+ }
+ }
+
+ if (selection.size()) {
+ // User has right clicked and we have a selection, show a popup menu with options
+ track_menu->clear();
+ track_menu->set_size(Point2(1,1));
+ track_menu->add_item(TTR("Duplicate Selection"), RIGHT_MENU_DUPLICATE);
+ track_menu->add_item(TTR("Duplicate Transposed"), RIGHT_MENU_DUPLICATE_TRANSPOSE);
+ track_menu->add_item(TTR("Remove Selection"), RIGHT_MENU_REMOVE);
+
+ track_menu->set_pos(te->get_global_pos()+mpos);
+
+ interp_editing=-1;
+ cont_editing=-1;
+
+ track_menu->popup();
+ }
+ }
+
if (mb.button_index==BUTTON_LEFT && !(mb.button_mask&~BUTTON_MASK_LEFT)) {
diff --git a/tools/editor/animation_editor.h b/tools/editor/animation_editor.h
index 413c73b4b9..131100a205 100644
--- a/tools/editor/animation_editor.h
+++ b/tools/editor/animation_editor.h
@@ -99,6 +99,12 @@ class AnimationKeyEditor : public VBoxContainer {
CURVE_SET_CONSTANT
};
+ enum {
+ RIGHT_MENU_DUPLICATE,
+ RIGHT_MENU_DUPLICATE_TRANSPOSE,
+ RIGHT_MENU_REMOVE
+ };
+
struct MouseOver {
enum Over {
@@ -313,6 +319,9 @@ class AnimationKeyEditor : public VBoxContainer {
void _add_call_track(const NodePath& p_base);
+ void _anim_duplicate_keys(bool transpose = false);
+ void _anim_delete_keys();
+
void _root_removed();
protected:
diff --git a/tools/editor/asset_library_editor_plugin.cpp b/tools/editor/asset_library_editor_plugin.cpp
index ee535310bc..4f685badfb 100644
--- a/tools/editor/asset_library_editor_plugin.cpp
+++ b/tools/editor/asset_library_editor_plugin.cpp
@@ -444,6 +444,13 @@ void EditorAssetLibraryItemDownload::_close() {
void EditorAssetLibraryItemDownload::_install() {
String file = download->get_download_file();
+
+ if (external_install) {
+ emit_signal("install_asset",file,title->get_text());
+ return;
+ }
+
+
asset_installer->open(file,1);
}
@@ -465,6 +472,8 @@ void EditorAssetLibraryItemDownload::_bind_methods() {
ObjectTypeDB::bind_method("_close",&EditorAssetLibraryItemDownload::_close);
ObjectTypeDB::bind_method("_make_request",&EditorAssetLibraryItemDownload::_make_request);
+ ADD_SIGNAL(MethodInfo("install_asset",PropertyInfo(Variant::STRING,"zip_path"),PropertyInfo(Variant::STRING,"name")));
+
}
EditorAssetLibraryItemDownload::EditorAssetLibraryItemDownload() {
@@ -530,6 +539,8 @@ EditorAssetLibraryItemDownload::EditorAssetLibraryItemDownload() {
prev_status=-1;
+ external_install=false;
+
}
@@ -600,7 +611,8 @@ void EditorAssetLibrary::_install_asset() {
EditorAssetLibraryItemDownload *d = downloads_hb->get_child(i)->cast_to<EditorAssetLibraryItemDownload>();
if (d && d->get_asset_id() == description->get_asset_id()) {
- EditorNode::get_singleton()->show_warning("Download for this asset is already in progress!");
+ if (EditorNode::get_singleton() != NULL)
+ EditorNode::get_singleton()->show_warning("Download for this asset is already in progress!");
return;
}
}
@@ -610,6 +622,11 @@ void EditorAssetLibrary::_install_asset() {
downloads_hb->add_child(download);
download->configure(description->get_title(),description->get_asset_id(),description->get_preview_icon(),description->get_download_url(),description->get_sha256());
+ if (templates_only) {
+ download->set_external_install(true);
+ download->connect("install_asset",this,"_install_external_asset");
+ }
+
}
const char* EditorAssetLibrary::sort_key[SORT_MAX]={
@@ -1258,6 +1275,11 @@ void EditorAssetLibrary::_manage_plugins() {
+void EditorAssetLibrary::_install_external_asset(String p_zip_path,String p_title) {
+
+ emit_signal("install_asset",p_zip_path,p_title);
+}
+
void EditorAssetLibrary::_bind_methods() {
ObjectTypeDB::bind_method("_http_request_completed",&EditorAssetLibrary::_http_request_completed);
@@ -1273,6 +1295,11 @@ void EditorAssetLibrary::_bind_methods() {
ObjectTypeDB::bind_method("_repository_changed",&EditorAssetLibrary::_repository_changed);
ObjectTypeDB::bind_method("_support_toggled",&EditorAssetLibrary::_support_toggled);
ObjectTypeDB::bind_method("_rerun_search",&EditorAssetLibrary::_rerun_search);
+ ObjectTypeDB::bind_method("_install_external_asset",&EditorAssetLibrary::_install_external_asset);
+
+
+
+ ADD_SIGNAL(MethodInfo("install_asset",PropertyInfo(Variant::STRING,"zip_path"),PropertyInfo(Variant::STRING,"name")));
}
diff --git a/tools/editor/asset_library_editor_plugin.h b/tools/editor/asset_library_editor_plugin.h
index 89663aa00b..fe40255af9 100644
--- a/tools/editor/asset_library_editor_plugin.h
+++ b/tools/editor/asset_library_editor_plugin.h
@@ -155,6 +155,8 @@ class EditorAssetLibraryItemDownload : public PanelContainer {
int asset_id;
+ bool external_install;
+
EditorAssetInstaller *asset_installer;
void _close();
@@ -168,6 +170,7 @@ protected:
static void _bind_methods();
public:
+ void set_external_install(bool p_enable) { external_install=p_enable; }
int get_asset_id() { return asset_id; }
void configure(const String& p_title,int p_asset_id,const Ref<Texture>& p_preview, const String& p_download_url, const String& p_sha256_hash);
EditorAssetLibraryItemDownload();
@@ -301,6 +304,8 @@ class EditorAssetLibrary : public PanelContainer {
void _repository_changed(int p_repository_id);
void _support_toggled(int p_support);
+ void _install_external_asset(String p_zip_path,String p_title);
+
friend class EditorAssetLibraryItemDescription;
friend class EditorAssetLibraryItem;
protected:
diff --git a/tools/editor/code_editor.cpp b/tools/editor/code_editor.cpp
index 644478923c..21de122cee 100644
--- a/tools/editor/code_editor.cpp
+++ b/tools/editor/code_editor.cpp
@@ -32,6 +32,7 @@
#include "scene/gui/separator.h"
#include "scene/resources/dynamic_font.h"
#include "os/keyboard.h"
+#include "tools/editor/editor_scale.h"
void GotoLineDialog::popup_find_line(TextEdit *p_edit) {
@@ -1198,6 +1199,10 @@ CodeTextEditor::CodeTextEditor() {
line_col = memnew( Label );
status_bar->add_child(line_col);
line_col->set_valign(Label::VALIGN_CENTER);
+ line_col->set_autowrap(true);
+ line_col->set_v_size_flags(SIZE_FILL);
+ line_col->set_custom_minimum_size(Size2(100,1)*EDSCALE);
+ status_bar->add_child( memnew( Label ) ); //to keep the height if the other labels are not visible
text_editor->connect("input_event", this,"_text_editor_input_event");
diff --git a/tools/editor/create_dialog.cpp b/tools/editor/create_dialog.cpp
index 5275e1beeb..210b799f3d 100644
--- a/tools/editor/create_dialog.cpp
+++ b/tools/editor/create_dialog.cpp
@@ -42,12 +42,13 @@
void CreateDialog::popup(bool p_dontclear) {
- popup_centered_ratio(0.6);
+ popup_centered_ratio();
if (p_dontclear)
search_box->select_all();
else
search_box->clear();
search_box->grab_focus();
+
_update_search();
@@ -165,9 +166,10 @@ void CreateDialog::_update_search() {
if (!ObjectTypeDB::can_instance(type))
continue; // cant create what can't be instanced
- if (search_box->get_text()=="")
+
+ if (search_box->get_text()=="") {
add_type(type,types,root,&to_select);
- else {
+ } else {
bool found=false;
String type=I->get();
@@ -186,7 +188,7 @@ void CreateDialog::_update_search() {
add_type(I->get(),types,root,&to_select);
}
- if (EditorNode::get_editor_data().get_custom_types().has(type)) {
+ if (EditorNode::get_editor_data().get_custom_types().has(type) && ObjectTypeDB::is_type(type, base_type)) {
//there are custom types based on this... cool.
//print_line("there are custom types");
@@ -198,6 +200,7 @@ void CreateDialog::_update_search() {
if (!show)
continue;
+
if (!types.has(type))
add_type(type,types,root,&to_select);
@@ -216,7 +219,7 @@ void CreateDialog::_update_search() {
}
- if (!to_select && (search_box->get_text()=="" || ct[i].name.findn(search_box->get_text())!=-1)) {
+ if (!to_select) {
to_select=item;
}
@@ -246,7 +249,6 @@ void CreateDialog::_notification(int p_what) {
if (p_what==NOTIFICATION_ENTER_TREE) {
connect("confirmed",this,"_confirmed");
- _update_search();
}
if (p_what==NOTIFICATION_EXIT_TREE) {
diff --git a/tools/editor/dependency_editor.cpp b/tools/editor/dependency_editor.cpp
index ef667b75e1..049bcefc75 100644
--- a/tools/editor/dependency_editor.cpp
+++ b/tools/editor/dependency_editor.cpp
@@ -418,6 +418,7 @@ void DependencyRemoveDialog::show(const Vector<String> &to_erase) {
exist=false;
owners->clear();
files.clear();
+ owners->create_item(); // root
for(int i=0;i<to_erase.size();i++) {
files[to_erase[i]]=NULL;
}
diff --git a/tools/editor/editor_asset_installer.cpp b/tools/editor/editor_asset_installer.cpp
index ec36773d8d..b6051886c0 100644
--- a/tools/editor/editor_asset_installer.cpp
+++ b/tools/editor/editor_asset_installer.cpp
@@ -317,9 +317,11 @@ void EditorAssetInstaller::ok_pressed() {
}
msg+=failed_files[i];
}
- EditorNode::get_singleton()->show_warning(msg);
+ if (EditorNode::get_singleton() != NULL)
+ EditorNode::get_singleton()->show_warning(msg);
} else {
- EditorNode::get_singleton()->show_warning("Package Installed Successfully!","Success!");
+ if (EditorNode::get_singleton() != NULL)
+ EditorNode::get_singleton()->show_warning("Package Installed Successfully!","Success!");
}
diff --git a/tools/editor/editor_autoload_settings.cpp b/tools/editor/editor_autoload_settings.cpp
new file mode 100644
index 0000000000..1cf0090e7e
--- /dev/null
+++ b/tools/editor/editor_autoload_settings.cpp
@@ -0,0 +1,618 @@
+/*************************************************************************/
+/* editor_autoload_settings.cpp */
+/*************************************************************************/
+/* This file is part of: */
+/* GODOT ENGINE */
+/* http://www.godotengine.org */
+/*************************************************************************/
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* */
+/* Permission is hereby granted, free of charge, to any person obtaining */
+/* a copy of this software and associated documentation files (the */
+/* "Software"), to deal in the Software without restriction, including */
+/* without limitation the rights to use, copy, modify, merge, publish, */
+/* distribute, sublicense, and/or sell copies of the Software, and to */
+/* permit persons to whom the Software is furnished to do so, subject to */
+/* the following conditions: */
+/* */
+/* The above copyright notice and this permission notice shall be */
+/* included in all copies or substantial portions of the Software. */
+/* */
+/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
+/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
+/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
+/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
+/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
+/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
+/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
+/*************************************************************************/
+
+#include "editor_autoload_settings.h"
+
+#include "globals.h"
+#include "global_constants.h"
+
+#include "editor_node.h"
+
+#define PREVIEW_LIST_MAX_SIZE 10
+
+StringName EditorAutoloadSettings::autoload_changed = StringName();
+
+void EditorAutoloadSettings::_notification(int p_what) {
+
+ if (p_what == NOTIFICATION_ENTER_TREE) {
+
+ List<String> afn;
+ ResourceLoader::get_recognized_extensions_for_type("Script", &afn);
+ ResourceLoader::get_recognized_extensions_for_type("PackedScene", &afn);
+
+ EditorFileDialog *file_dialog = autoload_add_path->get_file_dialog();
+
+ for (List<String>::Element *E = afn.front(); E; E = E->next()) {
+
+ file_dialog->add_filter("*." + E->get());
+ }
+ }
+}
+
+bool EditorAutoloadSettings::_autoload_name_is_valid(const String& p_name, String* r_error) {
+
+ if (!p_name.is_valid_identifier()) {
+ if (r_error)
+ *r_error = TTR("Invalid name.") + "\n" + TTR("Valid characters:")+" a-z, A-Z, 0-9 or _";
+
+ return false;
+ }
+
+ if (ObjectTypeDB::type_exists(p_name)) {
+ if (r_error)
+ *r_error = TTR("Invalid name. Must not collide with an existing engine class name.");
+
+ return false;
+ }
+
+ for (int i = 0; i < Variant::VARIANT_MAX; i++) {
+ if (Variant::get_type_name( Variant::Type(i) ) == p_name) {
+ if (r_error)
+ *r_error = TTR("Invalid name. Must not collide with an existing buit-in type name.");
+
+ return false;
+ }
+ }
+
+ for (int i = 0; i < GlobalConstants::get_global_constant_count(); i++) {
+ if (GlobalConstants::get_global_constant_name(i) == p_name) {
+ if (r_error)
+ *r_error = TTR("Invalid name. Must not collide with an existing global constant name.");
+
+ return false;
+ }
+ }
+
+ return true;
+}
+
+void EditorAutoloadSettings::_autoload_add() {
+
+ String name = autoload_add_name->get_text();
+
+ String error;
+ if (!_autoload_name_is_valid(name, &error)) {
+ EditorNode::get_singleton()->show_warning(error);
+ return;
+ }
+
+ String path = autoload_add_path->get_line_edit()->get_text();
+ if (!FileAccess::exists(path)) {
+ EditorNode::get_singleton()->show_warning(TTR("Invalid Path.") + "\n" + TTR("File does not exist."));
+ return;
+ }
+
+ if (!path.begins_with("res://")) {
+ EditorNode::get_singleton()->show_warning(TTR("Invalid Path.") + "\n"+ TTR("Not in resource path."));
+ return;
+ }
+
+ name = "autoload/" + name;
+
+ UndoRedo* undo_redo = EditorNode::get_singleton()->get_undo_redo();
+
+ undo_redo->create_action(TTR("Add AutoLoad"));
+ undo_redo->add_do_property(Globals::get_singleton(), name, "*" + path);
+ undo_redo->add_do_method(Globals::get_singleton(), "set_persisting", name, true);
+
+ if (Globals::get_singleton()->has(name)) {
+ undo_redo->add_undo_property(Globals::get_singleton(), name, Globals::get_singleton()->get(name));
+ } else {
+ undo_redo->add_undo_property(Globals::get_singleton(), name, Variant());
+ }
+
+ undo_redo->add_do_method(this, "update_autoload");
+ undo_redo->add_undo_method(this, "update_autoload");
+
+ undo_redo->add_do_method(this, "emit_signal", autoload_changed);
+ undo_redo->add_undo_method(this, "emit_signal", autoload_changed);
+
+ undo_redo->commit_action();
+
+ autoload_add_path->get_line_edit()->set_text("");
+ autoload_add_name->set_text("");
+}
+
+void EditorAutoloadSettings::_autoload_selected() {
+
+ TreeItem *ti = tree->get_selected();
+
+ if (!ti)
+ return;
+
+ selected_autoload = "autoload/" + ti->get_text(0);
+}
+
+void EditorAutoloadSettings::_autoload_edited() {
+
+ if (updating_autoload)
+ return;
+
+ TreeItem *ti = tree->get_edited();
+ int column = tree->get_edited_column();
+
+ UndoRedo *undo_redo = EditorNode::get_undo_redo();
+
+ if (column == 0) {
+ String name = ti->get_text(0);
+ String old_name = selected_autoload.get_slice("/", 1);
+
+ if (name == old_name)
+ return;
+
+ String error;
+ if (!_autoload_name_is_valid(name, &error)) {
+ ti->set_text(0, old_name);
+ EditorNode::get_singleton()->show_warning(error);
+ return;
+ }
+
+ if (Globals::get_singleton()->has("autoload/" + name)) {
+ ti->set_text(0, old_name);
+ EditorNode::get_singleton()->show_warning(vformat(TTR("Autoload '%s' already exists!"), name));
+ return;
+ }
+
+ updating_autoload = true;
+
+ name = "autoload/" + name;
+
+ bool persisting = Globals::get_singleton()->get(selected_autoload);
+ int order = Globals::get_singleton()->get(selected_autoload);
+ String path = Globals::get_singleton()->get(selected_autoload);
+
+ undo_redo->create_action(TTR("Rename Autoload"));
+
+ undo_redo->add_do_property(Globals::get_singleton(), name, path);
+ undo_redo->add_do_method(Globals::get_singleton(), "set_persisting", name, persisting);
+ undo_redo->add_do_method(Globals::get_singleton(), "set_order", name, order);
+ undo_redo->add_do_method(Globals::get_singleton(), "clear", selected_autoload);
+
+ undo_redo->add_undo_property(Globals::get_singleton(), selected_autoload, path);
+ undo_redo->add_undo_method(Globals::get_singleton(), "set_persisting", selected_autoload, persisting);
+ undo_redo->add_undo_method(Globals::get_singleton(), "set_order", selected_autoload, order);
+ undo_redo->add_undo_method(Globals::get_singleton(), "clear", name);
+
+ undo_redo->add_do_method(this, "update_autoload");
+ undo_redo->add_undo_method(this, "update_autoload");
+
+ undo_redo->add_do_method(this, "emit_signal", autoload_changed);
+ undo_redo->add_undo_method(this, "emit_signal", autoload_changed);
+
+ undo_redo->commit_action();
+
+ selected_autoload = name;
+ } else if (column == 2) {
+ updating_autoload = true;
+
+ bool checked = ti->is_checked(2);
+ String base = "autoload/" + ti->get_text(0);
+
+ int order = Globals::get_singleton()->get_order(base);
+ String path = Globals::get_singleton()->get(base);
+
+ if (path.begins_with("*"))
+ path = path.substr(1, path.length());
+
+ if (checked)
+ path = "*" + path;
+
+ undo_redo->create_action(TTR("Toggle AutoLoad Globals"));
+
+ undo_redo->add_do_property(Globals::get_singleton(), base, path);
+ undo_redo->add_undo_property(Globals::get_singleton(), base, Globals::get_singleton()->get(base));
+
+ undo_redo->add_do_method(Globals::get_singleton(),"set_order", base, order);
+ undo_redo->add_undo_method(Globals::get_singleton(),"set_order", base, order);
+
+ undo_redo->add_do_method(this, "update_autoload");
+ undo_redo->add_undo_method(this, "update_autoload");
+
+ undo_redo->add_do_method(this, "emit_signal", autoload_changed);
+ undo_redo->add_undo_method(this, "emit_signal", autoload_changed);
+
+ undo_redo->commit_action();
+ }
+
+ updating_autoload = false;
+}
+
+void EditorAutoloadSettings::_autoload_button_pressed(Object *p_item, int p_column, int p_button) {
+
+ TreeItem *ti = p_item->cast_to<TreeItem>();
+
+ String name = "autoload/" + ti->get_text(0);
+
+ UndoRedo *undo_redo = EditorNode::get_undo_redo();
+
+ switch (p_button) {
+
+ case BUTTON_MOVE_UP:
+ case BUTTON_MOVE_DOWN: {
+
+ TreeItem *swap = NULL;
+
+ if (p_button == BUTTON_MOVE_UP) {
+ swap = ti->get_prev();
+ } else {
+ swap = ti->get_next();
+ }
+
+ if (!swap)
+ return;
+
+ String swap_name = "autoload/" + swap->get_text(0);
+
+ int order = Globals::get_singleton()->get_order(name);
+ int swap_order = Globals::get_singleton()->get_order(swap_name);
+
+ undo_redo->create_action(TTR("Move Autoload"));
+
+ undo_redo->add_do_method(Globals::get_singleton(), "set_order", name, swap_order);
+ undo_redo->add_undo_method(Globals::get_singleton(), "set_order", name, order);
+
+ undo_redo->add_do_method(Globals::get_singleton(), "set_order", swap_name, order);
+ undo_redo->add_undo_method(Globals::get_singleton(), "set_order", swap_name, swap_order);
+
+ undo_redo->add_do_method(this, "update_autoload");
+ undo_redo->add_undo_method(this, "update_autoload");
+
+ undo_redo->add_do_method(this, "emit_signal", autoload_changed);
+ undo_redo->add_undo_method(this, "emit_signal", autoload_changed);
+
+ undo_redo->commit_action();
+ } break;
+ case BUTTON_DELETE: {
+
+ int order = Globals::get_singleton()->get_order(name);
+
+ undo_redo->create_action(TTR("Remove Autoload"));
+
+ undo_redo->add_do_property(Globals::get_singleton(), name, Variant());
+
+ undo_redo->add_undo_property(Globals::get_singleton(), name, Globals::get_singleton()->get(name));
+ undo_redo->add_undo_method(Globals::get_singleton(), "set_persisting", name, true);
+ undo_redo->add_undo_method(Globals::get_singleton(), "set_order", order);
+
+ undo_redo->add_do_method(this, "update_autoload");
+ undo_redo->add_undo_method(this, "update_autoload");
+
+ undo_redo->add_do_method(this, "emit_signal", autoload_changed);
+ undo_redo->add_undo_method(this, "emit_signal", autoload_changed);
+
+ undo_redo->commit_action();
+ } break;
+ }
+}
+
+void EditorAutoloadSettings::_autoload_file_callback(const String& p_path) {
+
+ autoload_add_name->set_text(p_path.get_file().basename());
+}
+
+void EditorAutoloadSettings::update_autoload() {
+
+ if (updating_autoload)
+ return;
+
+ updating_autoload = true;
+
+ autoload_cache.clear();
+
+ tree->clear();
+ TreeItem *root = tree->create_item();
+
+ List<PropertyInfo> props;
+ Globals::get_singleton()->get_property_list(&props);
+
+ for (List<PropertyInfo>::Element *E = props.front(); E; E = E->next()) {
+
+ const PropertyInfo &pi = E->get();
+
+ if (!pi.name.begins_with("autoload/"))
+ continue;
+
+ String name = pi.name.get_slice("/", 1);
+ String path = Globals::get_singleton()->get(pi.name);
+
+ if (name.empty())
+ continue;
+
+ AutoLoadInfo info;
+ info.name = pi.name;
+ info.order = Globals::get_singleton()->get_order(pi.name);
+
+ autoload_cache.push_back(info);
+
+ bool global = false;
+
+ if (path.begins_with("*")) {
+ global = true;
+ path = path.substr(1, path.length());
+ }
+
+ TreeItem *item = tree->create_item(root);
+ item->set_text(0, name);
+ item->set_editable(0, true);
+
+ item->set_text(1, path);
+ item->set_selectable(1, false);
+
+ item->set_cell_mode(2, TreeItem::CELL_MODE_CHECK);
+ item->set_editable(2, true);
+ item->set_text(2, TTR("Enable"));
+ item->set_checked(2, global);
+
+ item->add_button(3, get_icon("MoveUp","EditorIcons"), BUTTON_MOVE_UP);
+ item->add_button(3, get_icon("MoveDown","EditorIcons"), BUTTON_MOVE_DOWN);
+ item->add_button(3, get_icon("Del","EditorIcons"), BUTTON_DELETE);
+ item->set_selectable(3, false);
+ }
+
+ updating_autoload = false;
+}
+
+Variant EditorAutoloadSettings::get_drag_data_fw(const Point2& p_point, Control *p_control) {
+
+ if (autoload_cache.size() <= 1)
+ return false;
+
+ StringArray autoloads;
+
+ TreeItem *next = tree->get_next_selected(NULL);
+
+ while (next) {
+ autoloads.push_back(next->get_text(0));
+ next = tree->get_next_selected(next);
+ }
+
+ if (autoloads.size() == 0 || autoloads.size() == autoload_cache.size())
+ return Variant();
+
+ VBoxContainer *preview = memnew( VBoxContainer );
+
+ int max_size = MIN(PREVIEW_LIST_MAX_SIZE, autoloads.size());
+
+ for (int i = 0; i < max_size; i++) {
+ Label *label = memnew( Label(autoloads[i]) );
+ label->set_self_opacity(Math::lerp(1, 0, float(i)/PREVIEW_LIST_MAX_SIZE));
+
+ preview->add_child(label);
+ }
+
+ tree->set_drop_mode_flags(Tree::DROP_MODE_INBETWEEN);
+ tree->set_drag_preview(preview);
+
+ Dictionary drop_data;
+ drop_data["type"] = "autoload";
+ drop_data["autoloads"] = autoloads;
+
+ return drop_data;
+}
+
+bool EditorAutoloadSettings::can_drop_data_fw(const Point2& p_point, const Variant& p_data, Control *p_control) const {
+ if (updating_autoload)
+ return false;
+
+ Dictionary drop_data = p_data;
+
+ if (!drop_data.has("type"))
+ return false;
+
+ if (drop_data.has("type")) {
+ TreeItem *ti = tree->get_item_at_pos(p_point);
+
+ if (!ti)
+ return false;
+
+ int section = tree->get_drop_section_at_pos(p_point);
+
+ if (section < -1)
+ return false;
+
+ return true;
+ }
+
+ return false;
+}
+
+void EditorAutoloadSettings::drop_data_fw(const Point2& p_point, const Variant& p_data, Control *p_control) {
+
+ TreeItem *ti = tree->get_item_at_pos(p_point);
+
+ if (!ti)
+ return;
+
+ int section = tree->get_drop_section_at_pos(p_point);
+
+ if (section < -1)
+ return;
+
+ String name;
+ bool move_to_back = false;
+
+ if (section < 0) {
+ name = ti->get_text(0);
+ } else if (ti->get_next()) {
+ name = ti->get_next()->get_text(0);
+ } else {
+ name = ti->get_text(0);
+ move_to_back = true;
+ }
+
+ int order = Globals::get_singleton()->get_order("autoload/" + name);
+
+ AutoLoadInfo aux;
+ List<AutoLoadInfo>::Element *E = NULL;
+
+ if (!move_to_back) {
+ aux.order = order;
+ E = autoload_cache.find(aux);
+ }
+
+ Dictionary drop_data = p_data;
+ StringArray autoloads = drop_data["autoloads"];
+
+ Vector<int> orders;
+ orders.resize(autoload_cache.size());
+
+ for (int i = 0; i < autoloads.size(); i++) {
+ aux.order = Globals::get_singleton()->get_order("autoload/" + autoloads[i]);
+
+ List<AutoLoadInfo>::Element *I = autoload_cache.find(aux);
+
+ if (move_to_back) {
+ autoload_cache.move_to_back(I);
+ } else if (E != I) {
+ autoload_cache.move_before(I, E);
+ } else if (E->next()) {
+ E = E->next();
+ } else {
+ break;
+ }
+ }
+
+ int i = 0;
+
+ for (List<AutoLoadInfo>::Element *E = autoload_cache.front(); E; E = E->next()) {
+ orders[i++] = E->get().order;
+ }
+
+ orders.sort();
+
+ UndoRedo *undo_redo = EditorNode::get_undo_redo();
+
+ undo_redo->create_action(TTR("Rearrange Autoloads"));
+
+ i = 0;
+
+ for (List<AutoLoadInfo>::Element *E = autoload_cache.front(); E; E = E->next()) {
+ undo_redo->add_do_method(Globals::get_singleton(), "set_order", E->get().name, orders[i++]);
+ undo_redo->add_undo_method(Globals::get_singleton(), "set_order", E->get().name, E->get().order);
+ }
+
+ orders.clear();
+
+ undo_redo->add_do_method(this, "update_autoload");
+ undo_redo->add_undo_method(this, "update_autoload");
+
+ undo_redo->add_do_method(this, "emit_signal", autoload_changed);
+ undo_redo->add_undo_method(this, "emit_signal", autoload_changed);
+
+ undo_redo->commit_action();
+}
+
+void EditorAutoloadSettings::_bind_methods() {
+
+ ObjectTypeDB::bind_method("_autoload_add", &EditorAutoloadSettings::_autoload_add);
+ ObjectTypeDB::bind_method("_autoload_selected", &EditorAutoloadSettings::_autoload_selected);
+ ObjectTypeDB::bind_method("_autoload_edited", &EditorAutoloadSettings::_autoload_edited);
+ ObjectTypeDB::bind_method("_autoload_button_pressed", &EditorAutoloadSettings::_autoload_button_pressed);
+ ObjectTypeDB::bind_method("_autoload_file_callback", &EditorAutoloadSettings::_autoload_file_callback);
+
+ ObjectTypeDB::bind_method("get_drag_data_fw", &EditorAutoloadSettings::get_drag_data_fw);
+ ObjectTypeDB::bind_method("can_drop_data_fw", &EditorAutoloadSettings::can_drop_data_fw);
+ ObjectTypeDB::bind_method("drop_data_fw", &EditorAutoloadSettings::drop_data_fw);
+
+ ObjectTypeDB::bind_method("update_autoload", &EditorAutoloadSettings::update_autoload);
+
+ ADD_SIGNAL(MethodInfo("autoload_changed"));
+}
+
+EditorAutoloadSettings::EditorAutoloadSettings() {
+
+ autoload_changed = "autoload_changed";
+
+ updating_autoload = false;
+ selected_autoload = "";
+
+ HBoxContainer *hbc = memnew( HBoxContainer );
+ add_child(hbc);
+
+ VBoxContainer *vbc_path = memnew( VBoxContainer );
+ vbc_path->set_h_size_flags(SIZE_EXPAND_FILL);
+
+ autoload_add_path = memnew( EditorLineEditFileChooser );
+ autoload_add_path->set_h_size_flags(SIZE_EXPAND_FILL);
+
+ autoload_add_path->get_file_dialog()->set_mode(EditorFileDialog::MODE_OPEN_FILE);
+ autoload_add_path->get_file_dialog()->connect("file_selected", this, "_autoload_file_callback");
+
+ vbc_path->add_margin_child(TTR("Path:"), autoload_add_path);
+ hbc->add_child(vbc_path);
+
+ VBoxContainer *vbc_name = memnew( VBoxContainer );
+ vbc_name->set_h_size_flags(SIZE_EXPAND_FILL);
+
+ HBoxContainer *hbc_name = memnew( HBoxContainer );
+
+ autoload_add_name = memnew( LineEdit );
+ autoload_add_name->set_h_size_flags(SIZE_EXPAND_FILL);
+ hbc_name->add_child(autoload_add_name);
+
+ Button *add_autoload = memnew( Button );
+ add_autoload->set_text(TTR("Add"));
+ hbc_name->add_child(add_autoload);
+ add_autoload->connect("pressed", this, "_autoload_add");
+
+ vbc_name->add_margin_child(TTR("Node Name:"), hbc_name);
+ hbc->add_child(vbc_name);
+
+ tree = memnew( Tree );
+ tree->set_hide_root(true);
+ tree->set_select_mode(Tree::SELECT_MULTI);
+ tree->set_single_select_cell_editing_only_when_already_selected(true);
+
+ tree->set_drag_forwarding(this);
+
+ tree->set_columns(4);
+ tree->set_column_titles_visible(true);
+
+ tree->set_column_title(0,TTR("Name"));
+ tree->set_column_expand(0,true);
+ tree->set_column_min_width(0,100);
+
+ tree->set_column_title(1,TTR("Path"));
+ tree->set_column_expand(1,true);
+ tree->set_column_min_width(1,100);
+
+ tree->set_column_title(2,TTR("Singleton"));
+ tree->set_column_expand(2,false);
+ tree->set_column_min_width(2,80);
+
+ tree->set_column_expand(3,false);
+ tree->set_column_min_width(3,80);
+
+ tree->connect("cell_selected", this, "_autoload_selected");
+ tree->connect("item_edited", this, "_autoload_edited");
+ tree->connect("button_pressed", this, "_autoload_button_pressed");
+
+ add_margin_child(TTR("List:"), tree, true);
+}
+
diff --git a/tools/editor/import_settings.h b/tools/editor/editor_autoload_settings.h
index 5a383a1a1a..b8825f807c 100644
--- a/tools/editor/import_settings.h
+++ b/tools/editor/editor_autoload_settings.h
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* import_settings.h */
+/* editor_autoload_settings.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -26,57 +26,69 @@
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#ifndef IMPORT_SETTINGS_H
-#define IMPORT_SETTINGS_H
-#include "object.h"
-#include "scene/gui/dialogs.h"
+#ifndef EDITOR_AUTOLOAD_SETTINGS_H
+#define EDITOR_AUTOLOAD_SETTINGS_H
+
#include "scene/gui/tree.h"
-#include "scene/gui/label.h"
-#include "scene/gui/option_button.h"
-#include "scene/gui/line_edit.h"
-#include "scene/gui/file_dialog.h"
-#include "scene/gui/progress_bar.h"
-#include "scene/gui/slider.h"
-#include "scene/gui/spin_box.h"
-#include "scene/resources/mesh.h"
-#include "editor_import_export.h"
-#include "editor_file_system.h"
-#include "editor_dir_dialog.h"
-class EditorNode;
-
-
-class ImportSettingsDialog : public ConfirmationDialog {
-
- OBJ_TYPE(ImportSettingsDialog,ConfirmationDialog);
-
- TreeItem *edited;
- EditorNode *editor;
+
+#include "editor_file_dialog.h"
+
+class EditorAutoloadSettings : public VBoxContainer {
+
+ OBJ_TYPE( EditorAutoloadSettings, VBoxContainer );
+
+ enum {
+ BUTTON_MOVE_UP,
+ BUTTON_MOVE_DOWN,
+ BUTTON_DELETE
+ };
+
+ static StringName autoload_changed;
+
+ struct AutoLoadInfo {
+ String name;
+ int order;
+
+ bool operator==(const AutoLoadInfo& p_info) {
+ return order == p_info.order;
+ }
+ };
+
+ List<AutoLoadInfo> autoload_cache;
+
+ bool updating_autoload;
+ int number_of_autoloads;
+ String selected_autoload;
+
Tree *tree;
- bool updating;
+ EditorLineEditFileChooser *autoload_add_path;
+ LineEdit *autoload_add_name;
- void _button_pressed(Object *p_button, int p_col, int p_id);
- void _item_pressed(int p_idx);
- bool _generate_fs(TreeItem *p_parent,EditorFileSystemDirectory *p_dir);
+ bool _autoload_name_is_valid(const String& p_string, String *r_error = NULL);
- String texformat;
+ void _autoload_add();
+ void _autoload_selected();
+ void _autoload_edited();
+ void _autoload_button_pressed(Object *p_item, int p_column, int p_button);
+ void _autoload_file_callback(const String& p_path);
- void _item_edited();
- virtual void ok_pressed();
+ Variant get_drag_data_fw(const Point2& p_point, Control *p_from);
+ bool can_drop_data_fw(const Point2& p_point, const Variant& p_data, Control *p_from) const;
+ void drop_data_fw(const Point2& p_point, const Variant& p_data, Control *p_from);
protected:
-
void _notification(int p_what);
static void _bind_methods();
-public:
- void update_tree();
+public:
+ void update_autoload();
- void popup_import_settings();
- ImportSettingsDialog(EditorNode *p_editor);
+ EditorAutoloadSettings();
};
-#endif // IMPORT_SETTINGS_H
+#endif
+
diff --git a/tools/editor/editor_data.cpp b/tools/editor/editor_data.cpp
index 0f10041034..8d3fd6c9c2 100644
--- a/tools/editor/editor_data.cpp
+++ b/tools/editor/editor_data.cpp
@@ -326,6 +326,13 @@ Dictionary EditorData::get_editor_states() const {
}
+Dictionary EditorData::get_scene_editor_states(int p_idx) const
+{
+ ERR_FAIL_INDEX_V(p_idx,edited_scene.size(),Dictionary());
+ EditedScene es = edited_scene[p_idx];
+ return es.editor_states;
+}
+
void EditorData::set_editor_states(const Dictionary& p_states) {
List<Variant> keys;
@@ -613,11 +620,14 @@ void EditorData::set_edited_scene(int p_idx){
current_edited_scene=p_idx;
//swap
}
-Node* EditorData::get_edited_scene_root(){
-
- ERR_FAIL_INDEX_V(current_edited_scene,edited_scene.size(),NULL);
-
- return edited_scene[current_edited_scene].root;
+Node* EditorData::get_edited_scene_root(int p_idx){
+ if (p_idx < 0) {
+ ERR_FAIL_INDEX_V(current_edited_scene,edited_scene.size(),NULL);
+ return edited_scene[current_edited_scene].root;
+ } else {
+ ERR_FAIL_INDEX_V(p_idx,edited_scene.size(),NULL);
+ return edited_scene[p_idx].root;
+ }
}
void EditorData::set_edited_scene_root(Node* p_root) {
@@ -630,9 +640,14 @@ int EditorData::get_edited_scene_count() const {
return edited_scene.size();
}
-void EditorData::set_edited_scene_version(uint64_t version) {
+void EditorData::set_edited_scene_version(uint64_t version, int scene_idx) {
ERR_FAIL_INDEX(current_edited_scene,edited_scene.size());
- edited_scene[current_edited_scene].version=version;
+ if (scene_idx < 0) {
+ edited_scene[current_edited_scene].version=version;
+ } else {
+ ERR_FAIL_INDEX(scene_idx,edited_scene.size());
+ edited_scene[scene_idx].version=version;
+ }
}
@@ -758,10 +773,15 @@ void EditorData::set_edited_scene_import_metadata(Ref<ResourceImportMetadata> p_
}
-Ref<ResourceImportMetadata> EditorData::get_edited_scene_import_metadata() const{
+Ref<ResourceImportMetadata> EditorData::get_edited_scene_import_metadata(int idx) const{
ERR_FAIL_INDEX_V(current_edited_scene,edited_scene.size(),Ref<ResourceImportMetadata>());
- return edited_scene[current_edited_scene].medatata;
+ if(idx<0) {
+ return edited_scene[current_edited_scene].medatata;
+ } else {
+ ERR_FAIL_INDEX_V(idx,edited_scene.size(),Ref<ResourceImportMetadata>());
+ return edited_scene[idx].medatata;
+ }
}
diff --git a/tools/editor/editor_data.h b/tools/editor/editor_data.h
index 319155655d..a0b716f560 100644
--- a/tools/editor/editor_data.h
+++ b/tools/editor/editor_data.h
@@ -156,6 +156,7 @@ public:
void paste_object_params(Object *p_object);
Dictionary get_editor_states() const;
+ Dictionary get_scene_editor_states(int p_idx) const;
void set_editor_states(const Dictionary& p_states);
void get_editor_breakpoints(List<String> *p_breakpoints);
void clear_editor_states();
@@ -184,15 +185,15 @@ public:
void set_edited_scene(int p_idx);
void set_edited_scene_root(Node* p_root);
void set_edited_scene_import_metadata(Ref<ResourceImportMetadata> p_mdata);
- Ref<ResourceImportMetadata> get_edited_scene_import_metadata() const;
+ Ref<ResourceImportMetadata> get_edited_scene_import_metadata(int p_idx = -1) const;
int get_edited_scene() const;
- Node* get_edited_scene_root();
+ Node* get_edited_scene_root(int p_idx = -1);
int get_edited_scene_count() const;
String get_scene_title(int p_idx) const;
String get_scene_path(int p_idx) const;
String get_scene_type(int p_idx) const;
Ref<Script> get_scene_root_script(int p_idx) const;
- void set_edited_scene_version(uint64_t version);
+ void set_edited_scene_version(uint64_t version, int p_scene_idx = -1);
uint64_t get_edited_scene_version() const;
uint64_t get_scene_version(int p_idx) const;
void clear_edited_scenes();
diff --git a/tools/editor/editor_help.cpp b/tools/editor/editor_help.cpp
index 0b60db5ee3..1fc157098c 100644
--- a/tools/editor/editor_help.cpp
+++ b/tools/editor/editor_help.cpp
@@ -332,7 +332,7 @@ EditorHelpSearch::EditorHelpSearch() {
register_text_enter(search_box);
set_hide_on_ok(false);
search_options->connect("item_activated",this,"_confirmed");
- set_title(TTR("Search Classes"));
+ set_title(TTR("Search Help"));
// search_options->set_hide_root(true);
@@ -526,6 +526,7 @@ EditorHelpIndex::EditorHelpIndex() {
class_list->connect("item_activated",this,"_tree_item_selected");
get_ok()->set_text(TTR("Open"));
+ set_title(TTR("Search Classes"));
}
diff --git a/tools/editor/editor_node.cpp b/tools/editor/editor_node.cpp
index 0233b6e9d6..81f9927b92 100644
--- a/tools/editor/editor_node.cpp
+++ b/tools/editor/editor_node.cpp
@@ -508,8 +508,6 @@ void EditorNode::_rebuild_import_menu()
for (int i = 0; i < editor_import_export->get_import_plugin_count(); i++) {
p->add_item(editor_import_export->get_import_plugin(i)->get_visible_name(), IMPORT_PLUGIN_BASE + i);
}
- //p->add_separator();
- //p->add_item(TTR("Re-Import.."), SETTINGS_IMPORT);
}
void EditorNode::_node_renamed() {
@@ -727,9 +725,9 @@ void EditorNode::_get_scene_metadata(const String& p_file) {
}
-void EditorNode::_set_scene_metadata(const String& p_file) {
+void EditorNode::_set_scene_metadata(const String& p_file, int p_idx) {
- Node *scene = editor_data.get_edited_scene_root();
+ Node *scene = editor_data.get_edited_scene_root(p_idx);
if (!scene)
return;
@@ -742,7 +740,7 @@ void EditorNode::_set_scene_metadata(const String& p_file) {
Ref<ConfigFile> cf;
cf.instance();
- Dictionary md = editor_data.get_editor_states();
+ Dictionary md = editor_data.get_edited_scene()==p_idx?editor_data.get_editor_states():editor_data.get_scene_editor_states(p_idx);
List<Variant> keys;
md.get_key_list(&keys);
@@ -956,9 +954,9 @@ void EditorNode::_save_scene_with_preview(String p_file) {
}
-void EditorNode::_save_scene(String p_file) {
+void EditorNode::_save_scene(String p_file, int idx) {
- Node *scene = editor_data.get_edited_scene_root();
+ Node *scene = editor_data.get_edited_scene_root(idx);
if (!scene) {
@@ -972,7 +970,7 @@ void EditorNode::_save_scene(String p_file) {
editor_data.apply_changes_in_editors();
- _set_scene_metadata(p_file);
+ _set_scene_metadata(p_file,idx);
Ref<PackedScene> sdata;
@@ -1003,7 +1001,7 @@ void EditorNode::_save_scene(String p_file) {
return;
}
- sdata->set_import_metadata(editor_data.get_edited_scene_import_metadata());
+ sdata->set_import_metadata(editor_data.get_edited_scene_import_metadata(idx));
int flg=0;
if (EditorSettings::get_singleton()->get("on_save/compress_binary_resources"))
flg|=ResourceSaver::FLAG_COMPRESS;
@@ -1019,7 +1017,10 @@ void EditorNode::_save_scene(String p_file) {
if (err==OK) {
scene->set_filename( Globals::get_singleton()->localize_path(p_file) );
//EditorFileSystem::get_singleton()->update_file(p_file,sdata->get_type());
- set_current_version(editor_data.get_undo_redo().get_version());
+ if (idx < 0 || idx == editor_data.get_edited_scene())
+ set_current_version(editor_data.get_undo_redo().get_version());
+ else
+ editor_data.set_edited_scene_version(0,idx);
_update_title();
_update_scene_tabs();
} else {
@@ -1613,6 +1614,7 @@ void EditorNode::_edit_current() {
object_menu->set_disabled(true);
bool is_resource = current_obj->is_type("Resource");
+ bool is_node = current_obj->is_type("Node");
resource_save_button->set_disabled(!is_resource);
if (is_resource) {
@@ -1629,7 +1631,7 @@ void EditorNode::_edit_current() {
//top_pallete->set_current_tab(1);
- } else if (current_obj->is_type("Node")) {
+ } else if (is_node) {
Node * current_node = current_obj->cast_to<Node>();
ERR_FAIL_COND(!current_node);
@@ -1725,10 +1727,14 @@ void EditorNode::_edit_current() {
p->add_shortcut(ED_SHORTCUT("property_editor/copy_resource",TTR("Copy Resource")),RESOURCE_COPY);
p->add_shortcut(ED_SHORTCUT("property_editor/unref_resource",TTR("Make Built-In")),RESOURCE_UNREF);
}
- p->add_separator();
- p->add_shortcut(ED_SHORTCUT("property_editor/make_subresources_unique",TTR("Make Sub-Resources Unique")),OBJECT_UNIQUE_RESOURCES);
- p->add_separator();
- p->add_icon_shortcut(gui_base->get_icon("Help","EditorIcons"),ED_SHORTCUT("property_editor/open_help",TTR("Open in Help")),OBJECT_REQUEST_HELP);
+
+ if (is_resource || is_node) {
+ p->add_separator();
+ p->add_shortcut(ED_SHORTCUT("property_editor/make_subresources_unique",TTR("Make Sub-Resources Unique")),OBJECT_UNIQUE_RESOURCES);
+ p->add_separator();
+ p->add_icon_shortcut(gui_base->get_icon("Help","EditorIcons"),ED_SHORTCUT("property_editor/open_help",TTR("Open in Help")),OBJECT_REQUEST_HELP);
+ }
+
List<MethodInfo> methods;
current_obj->get_method_list(&methods);
@@ -1807,7 +1813,6 @@ void EditorNode::_run(bool p_current,const String& p_custom) {
String args;
-
if (p_current || (editor_data.get_edited_scene_root() && p_custom==editor_data.get_edited_scene_root()->get_filename())) {
Node *scene = editor_data.get_edited_scene_root();
@@ -1830,12 +1835,7 @@ void EditorNode::_run(bool p_current,const String& p_custom) {
}
- bool autosave = EDITOR_DEF("run/auto_save_before_running",true);
-
- if (autosave) {
- _menu_option(FILE_SAVE_SCENE);
- }
if (run_settings_dialog->get_run_mode()==RunSettingsDialog::RUN_LOCAL_SCENE) {
@@ -1908,7 +1908,7 @@ void EditorNode::_run(bool p_current,const String& p_custom) {
_save_scene_with_preview(scene->get_filename());
}
}
-
+ _menu_option(FILE_SAVE_ALL_SCENES);
editor_data.save_editor_external_data();
}
@@ -2164,6 +2164,19 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) {
} break;
+ case FILE_SAVE_ALL_SCENES: {
+ for (int i = 0; i < editor_data.get_edited_scene_count(); i++) {
+ Node *scene = editor_data.get_edited_scene_root(i);
+ if (scene && scene->get_filename()!="") {
+ // save in background if in the script editor
+ if (i != editor_data.get_edited_scene() || _get_current_main_editor() == EDITOR_SCRIPT) {
+ _save_scene(scene->get_filename(), i);
+ } else {
+ _save_scene_with_preview(scene->get_filename());
+ }
+ }// else: ignore new scenes
+ }
+ } break;
case FILE_SAVE_BEFORE_RUN: {
if (!p_confirmed) {
accept->get_ok()->set_text(TTR("Yes"));
@@ -2491,7 +2504,7 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) {
#endif
case RESOURCE_NEW: {
- create_dialog->popup_centered_ratio();
+ create_dialog->popup(true);
} break;
case RESOURCE_LOAD: {
@@ -2662,11 +2675,16 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) {
} break;
case RUN_PLAY_NATIVE: {
- _menu_option_confirm(RUN_STOP,true);
- emit_signal("play_pressed");
- editor_run.run_native_notify();
-
-
+
+ bool autosave = EDITOR_DEF("run/auto_save_before_running",true);
+ if (autosave) {
+ _menu_option_confirm(FILE_SAVE_ALL_SCENES, false);
+ }
+ if (run_native->is_deploy_debug_remote_enabled()){
+ _menu_option_confirm(RUN_STOP,true);
+ emit_signal("play_pressed");
+ editor_run.run_native_notify();
+ }
} break;
case RUN_SCENE_SETTINGS: {
@@ -2779,10 +2797,6 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) {
settings_config_dialog->popup_edit_settings();
} break;
- case SETTINGS_IMPORT: {
-
- import_settings->popup_import_settings();
- } break;
case SETTINGS_OPTIMIZED_PRESETS: {
//optimized_presets->popup_centered_ratio();
@@ -5649,6 +5663,7 @@ EditorNode::EditorNode() {
p->add_separator();
p->add_shortcut(ED_SHORTCUT("editor/save_scene",TTR("Save Scene"),KEY_MASK_CMD+KEY_S),FILE_SAVE_SCENE);
p->add_shortcut(ED_SHORTCUT("editor/save_scene_as",TTR("Save Scene As.."),KEY_MASK_SHIFT+KEY_MASK_CMD+KEY_S),FILE_SAVE_AS_SCENE);
+ p->add_shortcut(ED_SHORTCUT("editor/save_all_scenes",TTR("Save all Scenes"),KEY_MASK_ALT+KEY_MASK_SHIFT+KEY_MASK_CMD+KEY_S),FILE_SAVE_ALL_SCENES);
p->add_separator();
p->add_shortcut(ED_SHORTCUT("editor/close_scene",TTR("Close Scene"),KEY_MASK_SHIFT+KEY_MASK_CTRL+KEY_W),FILE_CLOSE);
p->add_separator();
@@ -5841,7 +5856,8 @@ EditorNode::EditorNode() {
play_custom_scene_button->set_focus_mode(Control::FOCUS_NONE);
play_custom_scene_button->set_icon(gui_base->get_icon("PlayCustom","EditorIcons"));
play_custom_scene_button->connect("pressed", this,"_menu_option",make_binds(RUN_PLAY_CUSTOM_SCENE));
- play_custom_scene_button->set_tooltip(TTR("Play custom scene")+" ("+keycode_get_string(KEY_MASK_CMD|KEY_MASK_SHIFT|KEY_F5)+").");
+ play_custom_scene_button->set_tooltip(TTR("Play custom scene"));
+ play_custom_scene_button->set_shortcut(ED_SHORTCUT("editor/play_custom_scene",TTR("Play Custom Scene"),KEY_MASK_CMD|KEY_MASK_SHIFT|KEY_F5));
debug_button = memnew( MenuButton );
debug_button->set_flat(true);
@@ -6289,8 +6305,6 @@ EditorNode::EditorNode() {
open_recent_confirmation->connect("confirmed",this,"_open_recent_scene_confirm");
- import_settings= memnew(ImportSettingsDialog(this));
- gui_base->add_child(import_settings);
run_settings_dialog = memnew( RunSettingsDialog );
gui_base->add_child( run_settings_dialog );
diff --git a/tools/editor/editor_node.h b/tools/editor/editor_node.h
index f694c65db8..d18de1c531 100644
--- a/tools/editor/editor_node.h
+++ b/tools/editor/editor_node.h
@@ -74,7 +74,6 @@
#include "tools/editor/editor_sub_scene.h"
#include "editor_import_export.h"
#include "editor_reimport_dialog.h"
-#include "import_settings.h"
#include "tools/editor/editor_plugin.h"
#include "tools/editor/editor_name_dialog.h"
@@ -125,6 +124,7 @@ private:
FILE_OPEN_SCENE,
FILE_SAVE_SCENE,
FILE_SAVE_AS_SCENE,
+ FILE_SAVE_ALL_SCENES,
FILE_SAVE_BEFORE_RUN,
FILE_SAVE_AND_RUN,
FILE_IMPORT_SUBSCENE,
@@ -177,7 +177,6 @@ private:
RUN_RELOAD_SCRIPTS,
SETTINGS_UPDATE_ALWAYS,
SETTINGS_UPDATE_CHANGES,
- SETTINGS_IMPORT,
SETTINGS_EXPORT_PREFERENCES,
SETTINGS_PREFERENCES,
SETTINGS_OPTIMIZED_PRESETS,
@@ -338,7 +337,6 @@ private:
Vector<EditorPlugin*> editor_table;
EditorReImportDialog *reimport_dialog;
- ImportSettingsDialog *import_settings;
ProgressDialog *progress_dialog;
BackgroundProgress *progress_hb;
@@ -441,7 +439,7 @@ private:
void _node_renamed();
void _editor_select(int p_which);
- void _set_scene_metadata(const String &p_file);
+ void _set_scene_metadata(const String &p_file, int p_idx=-1);
void _get_scene_metadata(const String& p_file);
void _update_title();
void _update_scene_tabs();
@@ -451,7 +449,7 @@ private:
void _rebuild_import_menu();
- void _save_scene(String p_file);
+ void _save_scene(String p_file, int idx = -1);
void _instance_request(const String& p_path);
diff --git a/tools/editor/editor_resource_preview.cpp b/tools/editor/editor_resource_preview.cpp
index 6e38d6460b..a02fe2a531 100644
--- a/tools/editor/editor_resource_preview.cpp
+++ b/tools/editor/editor_resource_preview.cpp
@@ -33,6 +33,7 @@
#include "io/resource_saver.h"
#include "globals.h"
#include "editor_scale.h"
+#include "message_queue.h"
Ref<Texture> EditorResourcePreviewGenerator::generate_from_path(const String& p_path) {
@@ -83,12 +84,10 @@ void EditorResourcePreview::_preview_ready(const String& p_str,const Ref<Texture
cache[path]=item;
- Object *recv = ObjectDB::get_instance(id);
- if (recv) {
- recv->call_deferred(p_func,path,p_texture,p_ud);
- }
-
preview_mutex->unlock();
+
+ MessageQueue::get_singleton()->push_call(id,p_func,path,p_texture,p_ud);
+
}
Ref<Texture> EditorResourcePreview::_generate_preview(const QueueItem& p_item,const String& cache_base) {
@@ -107,6 +106,7 @@ Ref<Texture> EditorResourcePreview::_generate_preview(const QueueItem& p_item,co
Ref<Texture> generated;
for(int i=0;i<preview_generators.size();i++) {
+
if (!preview_generators[i]->handles(type))
continue;
if (p_item.resource.is_valid()) {
@@ -157,99 +157,107 @@ void EditorResourcePreview::_thread() {
QueueItem item = queue.front()->get();
queue.pop_front();
- preview_mutex->unlock();
-
- Ref<Texture> texture;
-
- //print_line("pop from queue "+item.path);
-
- int thumbnail_size = EditorSettings::get_singleton()->get("file_dialog/thumbnail_size");
- thumbnail_size*=EDSCALE;
if (cache.has(item.path)) {
//already has it because someone loaded it, just let it know it's ready
if (item.resource.is_valid()) {
item.path+=":"+itos(cache[item.path].last_hash); //keep last hash (see description of what this is in condition below)
}
- call_deferred("_preview_ready",item.path,cache[item.path].preview,item.id,item.function,item.userdata);
-
- } else if (item.resource.is_valid()){
- texture=_generate_preview(item,String());
- //adding hash to the end of path (should be ID:<objid>:<hash>) because of 5 argument limit to call_deferred
- call_deferred("_preview_ready",item.path+":"+itos(item.resource->hash_edited_version()),texture,item.id,item.function,item.userdata);
+ _preview_ready(item.path,cache[item.path].preview,item.id,item.function,item.userdata);
+ preview_mutex->unlock();
} else {
+ preview_mutex->unlock();
+
+ Ref<Texture> texture;
- String temp_path=EditorSettings::get_singleton()->get_settings_path().plus_file("tmp");
- String cache_base = Globals::get_singleton()->globalize_path(item.path).md5_text();
- cache_base = temp_path.plus_file("resthumb-"+cache_base);
+ //print_line("pop from queue "+item.path);
- //does not have it, try to load a cached thumbnail
+ int thumbnail_size = EditorSettings::get_singleton()->get("file_dialog/thumbnail_size");
+ thumbnail_size*=EDSCALE;
- String file = cache_base+".txt";
- //print_line("cachetxt at "+file);
- FileAccess *f=FileAccess::open(file,FileAccess::READ);
- if (!f) {
- //print_line("generate because not cached");
+ if (item.resource.is_valid()){
+
+ texture=_generate_preview(item,String());
+ //adding hash to the end of path (should be ID:<objid>:<hash>) because of 5 argument limit to call_deferred
+ _preview_ready(item.path+":"+itos(item.resource->hash_edited_version()),texture,item.id,item.function,item.userdata);
- //generate
- texture=_generate_preview(item,cache_base);
} else {
- uint64_t modtime = FileAccess::get_modified_time(item.path);
- int tsize = f->get_line().to_int64();
- uint64_t last_modtime = f->get_line().to_int64();
- bool cache_valid = true;
+ String temp_path=EditorSettings::get_singleton()->get_settings_path().plus_file("tmp");
+ String cache_base = Globals::get_singleton()->globalize_path(item.path).md5_text();
+ cache_base = temp_path.plus_file("resthumb-"+cache_base);
+
+ //does not have it, try to load a cached thumbnail
- if (tsize!=thumbnail_size) {
- cache_valid=false;
- memdelete(f);
- } else if (last_modtime!=modtime) {
+ String file = cache_base+".txt";
+ //print_line("cachetxt at "+file);
+ FileAccess *f=FileAccess::open(file,FileAccess::READ);
+ if (!f) {
+
+ //print_line("generate because not cached");
+
+ //generate
+ texture=_generate_preview(item,cache_base);
+ } else {
- String last_md5 = f->get_line();
- String md5 = FileAccess::get_md5(item.path);
- memdelete(f);
+ uint64_t modtime = FileAccess::get_modified_time(item.path);
+ int tsize = f->get_line().to_int64();
+ uint64_t last_modtime = f->get_line().to_int64();
- if (last_md5!=md5) {
+ bool cache_valid = true;
+ if (tsize!=thumbnail_size) {
cache_valid=false;
- } else {
- //update modified time
+ memdelete(f);
+ } else if (last_modtime!=modtime) {
- f=FileAccess::open(file,FileAccess::WRITE);
- f->store_line(itos(modtime));
- f->store_line(md5);
+ String last_md5 = f->get_line();
+ String md5 = FileAccess::get_md5(item.path);
+ memdelete(f);
+
+ if (last_md5!=md5) {
+
+ cache_valid=false;
+ } else {
+ //update modified time
+
+ f=FileAccess::open(file,FileAccess::WRITE);
+ f->store_line(itos(modtime));
+ f->store_line(md5);
+ memdelete(f);
+ }
+ } else {
memdelete(f);
}
- } else {
- memdelete(f);
- }
- if (cache_valid) {
+ if (cache_valid) {
- texture = ResourceLoader::load(cache_base+".png","ImageTexture",true);
- if (!texture.is_valid()) {
- //well fuck
- cache_valid=false;
+ texture = ResourceLoader::load(cache_base+".png","ImageTexture",true);
+ if (!texture.is_valid()) {
+ //well fuck
+ cache_valid=false;
+ }
}
- }
- if (!cache_valid) {
+ if (!cache_valid) {
- texture=_generate_preview(item,cache_base);
- }
+ texture=_generate_preview(item,cache_base);
+ }
- }
+ }
- //print_line("notify of preview ready");
- call_deferred("_preview_ready",item.path,texture,item.id,item.function,item.userdata);
+ //print_line("notify of preview ready");
+ _preview_ready(item.path,texture,item.id,item.function,item.userdata);
+ }
}
+
} else {
preview_mutex->unlock();
}
diff --git a/tools/editor/editor_run_native.cpp b/tools/editor/editor_run_native.cpp
index 234dd03087..edbcc71284 100644
--- a/tools/editor/editor_run_native.cpp
+++ b/tools/editor/editor_run_native.cpp
@@ -101,10 +101,8 @@ void EditorRunNative::_run_native(int p_idx,const String& p_platform) {
Ref<EditorExportPlatform> eep = EditorImportExport::get_singleton()->get_export_platform(p_platform);
ERR_FAIL_COND(eep.is_null());
- if (deploy_debug_remote) {
- emit_signal("native_run");
+ emit_signal("native_run");
- }
int flags=0;
if (deploy_debug_remote)
flags|=EditorExportPlatform::EXPORT_REMOTE_DEBUG;
diff --git a/tools/editor/editor_settings.cpp b/tools/editor/editor_settings.cpp
index 2ce9502293..7f496d0e22 100644
--- a/tools/editor/editor_settings.cpp
+++ b/tools/editor/editor_settings.cpp
@@ -115,7 +115,6 @@ bool EditorSettings::_get(const StringName& p_name,Variant &r_ret) const {
continue; //not changed from default, don't save
}
- print_line("SAVING: "+E->key());
arr.push_back(E->key());
arr.push_back(sc->get_shortcut());
}
@@ -683,6 +682,8 @@ void EditorSettings::_load_default_text_editor_theme() {
set("text_editor/completion_background_color", Color::html("2C2A32"));
set("text_editor/completion_selected_color", Color::html("434244"));
set("text_editor/completion_existing_color", Color::html("21dfdfdf"));
+ set("text_editor/completion_scroll_color", Color::html("ffffff"));
+ set("text_editor/completion_font_color", Color::html("aaaaaa"));
set("text_editor/caret_color",Color::html("aaaaaa"));
set("text_editor/line_number_color",Color::html("66aaaaaa"));
set("text_editor/text_color",Color::html("aaaaaa"));
@@ -918,6 +919,8 @@ bool EditorSettings::_save_text_editor_theme(String p_file) {
cf->set_value(theme_section, "completion_background_color", ((Color)get("text_editor/completion_background_color")).to_html());
cf->set_value(theme_section, "completion_selected_color", ((Color)get("text_editor/completion_selected_color")).to_html());
cf->set_value(theme_section, "completion_existing_color", ((Color)get("text_editor/completion_existing_color")).to_html());
+ cf->set_value(theme_section, "completion_scroll_color", ((Color)get("text_editor/completion_scroll_color")).to_html());
+ cf->set_value(theme_section, "completion_font_color", ((Color)get("text_editor/completion_font_color")).to_html());
cf->set_value(theme_section, "caret_color", ((Color)get("text_editor/caret_color")).to_html());
cf->set_value(theme_section, "line_number_color", ((Color)get("text_editor/line_number_color")).to_html());
cf->set_value(theme_section, "text_color", ((Color)get("text_editor/text_color")).to_html());
diff --git a/tools/editor/import_settings.cpp b/tools/editor/import_settings.cpp
deleted file mode 100644
index 53bbd2a878..0000000000
--- a/tools/editor/import_settings.cpp
+++ /dev/null
@@ -1,220 +0,0 @@
-/*************************************************************************/
-/* import_settings.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* http://www.godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
-#include "import_settings.h"
-#include "os/os.h"
-#include "editor_node.h"
-
-void ImportSettingsDialog::_item_pressed(int p_idx) {
-
- if (!edited)
- return;
-
- String p=edited->get_metadata(0);
-}
-
-void ImportSettingsDialog::_item_edited() {
-
- if (updating)
- return;
- TreeItem *it=tree->get_selected();
-
- String p=it->get_metadata(0);
-}
-
-
-void ImportSettingsDialog::_button_pressed(Object *p_button, int p_col, int p_id) {
-
- TreeItem *ti=p_button->cast_to<TreeItem>();
- if (!ti)
- return;
- String path = ti->get_metadata(0);
- print_line("PATH: "+path);
- Ref<ResourceImportMetadata> rimd = ResourceLoader::load_import_metadata(path);
- ERR_FAIL_COND(rimd.is_null());
- Ref<EditorImportPlugin> rimp = EditorImportExport::get_singleton()->get_import_plugin_by_name(rimd->get_editor());
- ERR_FAIL_COND(!rimp.is_valid());
- rimp->import_dialog(path);
- hide();
-}
-
-bool ImportSettingsDialog::_generate_fs(TreeItem *p_parent,EditorFileSystemDirectory *p_dir) {
-
- bool valid=false;
-
-
- for(int i=0;i<p_dir->get_subdir_count();i++) {
-
- EditorFileSystemDirectory *sd=p_dir->get_subdir(i);
- TreeItem *ti = tree->create_item(p_parent);
- ti->set_text(0,sd->get_name()+"/");
- ti->set_icon(0,get_icon("Folder","EditorIcons"));
-
- if (!_generate_fs(ti,sd)) {
- memdelete(ti);
- } else {
- valid=true;
- }
- }
-
-
- for(int i=0;i<p_dir->get_file_count();i++) {
-
- String path=p_dir->get_file_path(i);
- if (!p_dir->get_file_meta(i))
- continue;
-
- valid=true;
-
- String f = p_dir->get_file(i);
- TreeItem *ti = tree->create_item(p_parent);
- String type = p_dir->get_file_type(i);
- Ref<Texture> t;
- if (has_icon(type,"EditorIcons"))
- t = get_icon(type,"EditorIcons");
- else
- t = get_icon("Object","EditorIcons");
-
-
- ti->set_icon(0,t);
- ti->set_text(0,f);
-// ti->add_button(0,get_icon("Reload","EditorIcons"));
- ti->set_metadata(0,p_dir->get_file_path(i));
- String tt = p_dir->get_file_path(i);
-
- if (p_dir->is_missing_sources(i)) {
- ti->set_icon(1,get_icon("ImportFail","EditorIcons"));
- Vector<String> missing = p_dir->get_missing_sources(i);
- for(int j=0;j<missing.size();j++) {
- tt+="\nmissing: "+missing[j];
- }
-
- } else
- ti->set_icon(1,get_icon("ImportCheck","EditorIcons"));
-
- ti->set_tooltip(0,tt);
- ti->set_tooltip(1,tt);
-
- }
-
- return valid;
-}
-
-void ImportSettingsDialog::update_tree() {
-
- updating=true;
- tree->clear();
- edited=NULL;
-
-
- TreeItem *root = tree->create_item();
- EditorFileSystemDirectory *fs = EditorFileSystem::get_singleton()->get_filesystem();
-
- _generate_fs(root,fs);
- updating=false;
-
-
-}
-
-void ImportSettingsDialog::_notification(int p_what) {
-
- if (p_what==NOTIFICATION_ENTER_TREE) {
-
- EditorFileSystem::get_singleton()->connect("filesystem_changed",this,"update_tree");
- }
-}
-
-
-void ImportSettingsDialog::_bind_methods() {
-
- ObjectTypeDB::bind_method("update_tree",&ImportSettingsDialog::update_tree);
- ObjectTypeDB::bind_method("_item_edited",&ImportSettingsDialog::_item_edited);
- ObjectTypeDB::bind_method("_item_pressed",&ImportSettingsDialog::_item_pressed);
- ObjectTypeDB::bind_method("_button_pressed",&ImportSettingsDialog::_button_pressed);
-
-
-}
-
-
-void ImportSettingsDialog::popup_import_settings() {
-
- update_tree();
- popup_centered_ratio();
-}
-
-void ImportSettingsDialog::ok_pressed() {
-
-
- TreeItem *ti = tree->get_selected();
- if (!ti)
- return;
-
- String path = ti->get_metadata(0);
- print_line("PATH: "+path);
- Ref<ResourceImportMetadata> rimd = ResourceLoader::load_import_metadata(path);
- ERR_FAIL_COND(rimd.is_null());
- Ref<EditorImportPlugin> rimp = EditorImportExport::get_singleton()->get_import_plugin_by_name(rimd->get_editor());
- ERR_FAIL_COND(!rimp.is_valid());
- rimp->import_dialog(path);
- hide();
-
-
-}
-
-ImportSettingsDialog::ImportSettingsDialog(EditorNode *p_editor) {
-
- editor=p_editor;
-
- get_ok()->set_text(TTR("Close"));
-
- tree = memnew( Tree );
- add_child(tree);
- set_child_rect(tree);
- set_title(TTR("Imported Resources"));
-
-// texformat="Keep,None,Disk,VRAM";
-
- tree->set_hide_root(true);
- tree->set_columns(2);
- tree->set_column_expand(1,false);
- tree->set_column_min_width(1,20);
-
- tree->connect("item_edited",this,"_item_edited");
- tree->connect("button_pressed",this,"_button_pressed");
-
-// add_button("Re-Import","reimport");
- get_ok()->set_text(TTR("Re-Import"));
- get_cancel()->set_text(TTR("Close"));
-
- updating=false;
- edited=NULL;
- set_hide_on_ok(false);
-
-
-}
-
diff --git a/tools/editor/io_plugins/editor_import_collada.cpp b/tools/editor/io_plugins/editor_import_collada.cpp
index fc45b51a98..1130e2be30 100644
--- a/tools/editor/io_plugins/editor_import_collada.cpp
+++ b/tools/editor/io_plugins/editor_import_collada.cpp
@@ -2375,7 +2375,6 @@ Node* EditorSceneImporterCollada::import_scene(const String& p_path, uint32_t p_
state.create_animations(p_flags&IMPORT_ANIMATION_FORCE_ALL_TRACKS_IN_ALL_CLIPS);
AnimationPlayer *ap = memnew( AnimationPlayer );
- ap->set_name("animations");
for(int i=0;i<state.animations.size();i++) {
String name;
if (state.animations[i]->get_name()=="")
diff --git a/tools/editor/io_plugins/editor_mesh_import_plugin.cpp b/tools/editor/io_plugins/editor_mesh_import_plugin.cpp
index 095c56a373..2c3ed2afd6 100644
--- a/tools/editor/io_plugins/editor_mesh_import_plugin.cpp
+++ b/tools/editor/io_plugins/editor_mesh_import_plugin.cpp
@@ -520,7 +520,7 @@ Error EditorMeshImportPlugin::import(const String& p_path, const Ref<ResourceImp
//new object/surface
if (generate_normals || force_smooth)
surf_tool->generate_normals();
- if (uvs.size() && (normals.size() || generate_normals))
+ if (uvs.size() && (normals.size() || generate_normals) && generate_tangents)
surf_tool->generate_tangents();
surf_tool->index();
diff --git a/tools/editor/plugins/collision_polygon_editor_plugin.cpp b/tools/editor/plugins/collision_polygon_editor_plugin.cpp
index 55e38cebcc..0b06b3ba21 100644
--- a/tools/editor/plugins/collision_polygon_editor_plugin.cpp
+++ b/tools/editor/plugins/collision_polygon_editor_plugin.cpp
@@ -584,7 +584,7 @@ CollisionPolygonEditor::CollisionPolygonEditor(EditorNode *p_editor) {
handle_material->set_parameter(FixedMaterial::PARAM_DIFFUSE,Color(1,1,1));
handle_material->set_fixed_flag(FixedMaterial::FLAG_USE_ALPHA, true);
handle_material->set_fixed_flag(FixedMaterial::FLAG_USE_COLOR_ARRAY, false);
- Ref<Texture> handle= SpatialEditor::get_singleton()->get_icon("Editor3DHandle","EditorIcons");
+ Ref<Texture> handle=editor->get_gui_base()->get_icon("Editor3DHandle","EditorIcons");
handle_material->set_point_size(handle->get_width());
handle_material->set_texture(FixedMaterial::PARAM_DIFFUSE,handle);
diff --git a/tools/editor/plugins/script_editor_plugin.cpp b/tools/editor/plugins/script_editor_plugin.cpp
index d7d495ff5d..fc5f552723 100644
--- a/tools/editor/plugins/script_editor_plugin.cpp
+++ b/tools/editor/plugins/script_editor_plugin.cpp
@@ -312,6 +312,8 @@ void ScriptTextEditor::_load_theme_settings() {
get_text_edit()->add_color_override("completion_background_color", EDITOR_DEF("text_editor/completion_background_color", Color(0,0,0,0)));
get_text_edit()->add_color_override("completion_selected_color", EDITOR_DEF("text_editor/completion_selected_color", Color::html("434244")));
get_text_edit()->add_color_override("completion_existing_color", EDITOR_DEF("text_editor/completion_existing_color", Color::html("21dfdfdf")));
+ get_text_edit()->add_color_override("completion_scroll_color", EDITOR_DEF("text_editor/completion_scroll_color", Color::html("ffffff")));
+ get_text_edit()->add_color_override("completion_font_color", EDITOR_DEF("text_editor/completion_font_color", Color::html("aaaaaa")));
get_text_edit()->add_color_override("font_color",EDITOR_DEF("text_editor/text_color",Color(0,0,0)));
get_text_edit()->add_color_override("line_number_color",EDITOR_DEF("text_editor/line_number_color",Color(0,0,0)));
get_text_edit()->add_color_override("caret_color",EDITOR_DEF("text_editor/caret_color",Color(0,0,0)));
@@ -874,6 +876,15 @@ void ScriptEditor::_reload_scripts(){
}
+ uint64_t last_date = script->get_last_modified_time();
+ uint64_t date = FileAccess::get_modified_time(script->get_path());
+
+ //printf("last date: %lli vs date: %lli\n",last_date,date);
+ if (last_date==date) {
+ continue;
+ }
+
+
Ref<Script> rel_script = ResourceLoader::load(script->get_path(),script->get_type(),true);
ERR_CONTINUE(!rel_script.is_valid());
script->set_source_code( rel_script->get_source_code() );
diff --git a/tools/editor/plugins/shader_editor_plugin.cpp b/tools/editor/plugins/shader_editor_plugin.cpp
index 864df42b6e..9ef84af260 100644
--- a/tools/editor/plugins/shader_editor_plugin.cpp
+++ b/tools/editor/plugins/shader_editor_plugin.cpp
@@ -81,6 +81,8 @@ void ShaderTextEditor::_load_theme_settings() {
get_text_edit()->add_color_override("completion_background_color", EDITOR_DEF("text_editor/completion_background_color", Color(0,0,0,0)));
get_text_edit()->add_color_override("completion_selected_color", EDITOR_DEF("text_editor/completion_selected_color", Color::html("434244")));
get_text_edit()->add_color_override("completion_existing_color", EDITOR_DEF("text_editor/completion_existing_color", Color::html("21dfdfdf")));
+ get_text_edit()->add_color_override("completion_scroll_color", EDITOR_DEF("text_editor/completion_scroll_color", Color::html("ffffff")));
+ get_text_edit()->add_color_override("completion_font_color", EDITOR_DEF("text_editor/completion_font_color", Color::html("aaaaaa")));
get_text_edit()->add_color_override("font_color",EDITOR_DEF("text_editor/text_color",Color(0,0,0)));
get_text_edit()->add_color_override("line_number_color",EDITOR_DEF("text_editor/line_number_color",Color(0,0,0)));
get_text_edit()->add_color_override("caret_color",EDITOR_DEF("text_editor/caret_color",Color(0,0,0)));
diff --git a/tools/editor/plugins/spatial_editor_plugin.cpp b/tools/editor/plugins/spatial_editor_plugin.cpp
index 91a347c69b..a70df78697 100644
--- a/tools/editor/plugins/spatial_editor_plugin.cpp
+++ b/tools/editor/plugins/spatial_editor_plugin.cpp
@@ -77,21 +77,30 @@ void SpatialEditorViewport::_update_camera() {
String SpatialEditorGizmo::get_handle_name(int p_idx) const {
+ if (get_script_instance() && get_script_instance()->has_method("get_handle_name"))
+ return get_script_instance()->call("get_handle_name", p_idx);
+
return "";
}
Variant SpatialEditorGizmo::get_handle_value(int p_idx) const{
+ if (get_script_instance() && get_script_instance()->has_method("get_handle_value"))
+ return get_script_instance()->call("get_handle_value", p_idx);
+
return Variant();
}
void SpatialEditorGizmo::set_handle(int p_idx,Camera *p_camera, const Point2& p_point) {
+ if (get_script_instance() && get_script_instance()->has_method("set_handle"))
+ get_script_instance()->call("set_handle", p_idx, p_camera, p_point);
}
void SpatialEditorGizmo::commit_handle(int p_idx,const Variant& p_restore,bool p_cancel){
-
+ if (get_script_instance() && get_script_instance()->has_method("commit_handle"))
+ get_script_instance()->call("commit_handle", p_idx, p_restore, p_cancel);
}
bool SpatialEditorGizmo::intersect_frustum(const Camera *p_camera,const Vector<Plane> &p_frustum) {
diff --git a/tools/editor/plugins/tile_map_editor_plugin.cpp b/tools/editor/plugins/tile_map_editor_plugin.cpp
index 9d27ac8aa3..d686c37d1a 100644
--- a/tools/editor/plugins/tile_map_editor_plugin.cpp
+++ b/tools/editor/plugins/tile_map_editor_plugin.cpp
@@ -412,6 +412,24 @@ void TileMapEditor::_draw_cell(int p_cell, const Point2i& p_point, bool p_flip_h
if (node->get_tile_origin()==TileMap::TILE_ORIGIN_TOP_LEFT) {
rect.pos+=tile_ofs;
+ } else if (node->get_tile_origin()==TileMap::TILE_ORIGIN_BOTTOM_LEFT) {
+ Size2 cell_size = node->get_cell_size();
+
+ rect.pos+=tile_ofs;
+
+ if(p_transpose)
+ {
+ if(p_flip_h)
+ rect.pos.x-=cell_size.x;
+ else
+ rect.pos.x+=cell_size.x;
+ } else {
+ if(p_flip_v)
+ rect.pos.y-=cell_size.y;
+ else
+ rect.pos.y+=cell_size.y;
+ }
+
} else if (node->get_tile_origin()==TileMap::TILE_ORIGIN_CENTER) {
rect.pos+=node->get_cell_size()/2;
Vector2 s = r.size;
diff --git a/tools/editor/plugins/tile_set_editor_plugin.cpp b/tools/editor/plugins/tile_set_editor_plugin.cpp
index a2c7147bf3..39a15189e7 100644
--- a/tools/editor/plugins/tile_set_editor_plugin.cpp
+++ b/tools/editor/plugins/tile_set_editor_plugin.cpp
@@ -73,24 +73,24 @@ void TileSetEditor::_import_scene(Node *scene, Ref<TileSet> p_library, bool p_me
p_library->tile_set_name(id,mi->get_name());
}
-
-
p_library->tile_set_texture(id,texture);
p_library->tile_set_material(id,material);
Vector2 phys_offset;
+ Size2 s;
- if (mi->is_centered()) {
- Size2 s;
- if (mi->is_region()) {
- s=mi->get_region_rect().size;
- } else {
- s=texture->get_size();
- }
- phys_offset+=-s/2;
- }
if (mi->is_region()) {
+ s=mi->get_region_rect().size;
p_library->tile_set_region(id,mi->get_region_rect());
+ } else {
+ const int frame = mi->get_frame();
+ const int hframes = mi->get_hframes();
+ s=texture->get_size()/Size2(hframes,mi->get_vframes());
+ p_library->tile_set_region(id,Rect2(Vector2(frame%hframes,frame/hframes)*s,s));
+ }
+
+ if (mi->is_centered()) {
+ phys_offset+=-s/2;
}
Vector<Ref<Shape2D> >collisions;
diff --git a/tools/editor/project_manager.cpp b/tools/editor/project_manager.cpp
index 52f6d1dd9c..d00a22837c 100644
--- a/tools/editor/project_manager.cpp
+++ b/tools/editor/project_manager.cpp
@@ -49,17 +49,30 @@
#include "editor_initialize_ssl.h"
#include "editor_scale.h"
+#include "io/zip_io.h"
+
class NewProjectDialog : public ConfirmationDialog {
OBJ_TYPE(NewProjectDialog,ConfirmationDialog);
+public:
+
+ enum Mode {
+ MODE_NEW,
+ MODE_IMPORT,
+ MODE_INSTALL
+ };
+private:
- bool import_mode;
+ Mode mode;
Label *pp,*pn;
Label *error;
LineEdit *project_path;
LineEdit *project_name;
FileDialog *fdialog;
+ String zip_path;
+ String zip_title;
+ AcceptDialog *dialog_error;
bool _test_path() {
@@ -72,7 +85,7 @@ class NewProjectDialog : public ConfirmationDialog {
return false;
}
- if (!import_mode) {
+ if (mode!=MODE_IMPORT) {
if (d->file_exists("engine.cfg")) {
@@ -109,7 +122,7 @@ class NewProjectDialog : public ConfirmationDialog {
if (lidx!=-1) {
sp=sp.substr(lidx+1,sp.length());
}
- if (sp=="" && import_mode )
+ if (sp=="" && mode==MODE_IMPORT )
sp=TTR("Imported Project");
project_name->set_text(sp);
@@ -119,7 +132,7 @@ class NewProjectDialog : public ConfirmationDialog {
void _file_selected(const String& p_path) {
String p = p_path;
- if (import_mode) {
+ if (mode==MODE_IMPORT) {
if (p.ends_with("engine.cfg")) {
p=p.get_base_dir();
@@ -141,7 +154,7 @@ class NewProjectDialog : public ConfirmationDialog {
void _browse_path() {
- if (import_mode) {
+ if (mode==MODE_IMPORT) {
fdialog->set_mode(FileDialog::MODE_OPEN_FILE);
fdialog->clear_filters();
@@ -163,7 +176,7 @@ class NewProjectDialog : public ConfirmationDialog {
String dir;
- if (import_mode) {
+ if (mode==MODE_IMPORT) {
dir=project_path->get_text();
@@ -179,26 +192,130 @@ class NewProjectDialog : public ConfirmationDialog {
dir=d->get_current_dir();
memdelete(d);
- FileAccess *f = FileAccess::open(dir.plus_file("/engine.cfg"),FileAccess::WRITE);
- if (!f) {
- error->set_text(TTR("Couldn't create engine.cfg in project path."));
- } else {
+ if (mode==MODE_NEW) {
+
+
+
+
+ FileAccess *f = FileAccess::open(dir.plus_file("/engine.cfg"),FileAccess::WRITE);
+ if (!f) {
+ error->set_text(TTR("Couldn't create engine.cfg in project path."));
+ } else {
+
+ f->store_line("; Engine configuration file.");
+ f->store_line("; It's best to edit using the editor UI, not directly,");
+ f->store_line("; becausethe parameters that go here are not obvious.");
+ f->store_line("; ");
+ f->store_line("; Format: ");
+ f->store_line("; [section] ; section goes between []");
+ f->store_line("; param=value ; assign values to parameters");
+ f->store_line("\n");
+ f->store_line("[application]");
+ f->store_line("name=\""+project_name->get_text()+"\"");
+ f->store_line("icon=\"res://icon.png\"");
+
+ memdelete(f);
+
+ ResourceSaver::save(dir.plus_file("/icon.png"),get_icon("DefaultProjectIcon","EditorIcons"));
+ }
+
+ } else if (mode==MODE_INSTALL) {
+
+
+ FileAccess *src_f=NULL;
+ zlib_filefunc_def io = zipio_create_io_from_file(&src_f);
+
+ unzFile pkg = unzOpen2(zip_path.utf8().get_data(), &io);
+ if (!pkg) {
+
+ dialog_error->set_text("Error opening package file, not in zip format.");
+ return;
+ }
+
+ int ret = unzGoToFirstFile(pkg);
+
+ Vector<String> failed_files;
+
+ int idx=0;
+ while(ret==UNZ_OK) {
+
+ //get filename
+ unz_file_info info;
+ char fname[16384];
+ ret = unzGetCurrentFileInfo(pkg,&info,fname,16384,NULL,0,NULL,0);
+
+ String path=fname;
+
+ int depth=1; //stuff from github comes with tag
+ bool skip=false;
+ while(depth>0) {
+ int pp = path.find("/");
+ if (pp==-1) {
+ skip=true;
+ break;
+ }
+ path=path.substr(pp+1,path.length());
+ depth--;
+ }
+
+
+ if (skip || path==String()) {
+ //
+ } else if (path.ends_with("/")) { // a dir
+
+ path=path.substr(0,path.length()-1);
+
+ DirAccess *da = DirAccess::create(DirAccess::ACCESS_FILESYSTEM);
+ da->make_dir(dir.plus_file(path));
+ memdelete(da);
+
+ } else {
+
+ Vector<uint8_t> data;
+ data.resize(info.uncompressed_size);
+
+ //read
+ unzOpenCurrentFile(pkg);
+ unzReadCurrentFile(pkg,data.ptr(),data.size());
+ unzCloseCurrentFile(pkg);
+
+ FileAccess *f=FileAccess::open(dir.plus_file(path),FileAccess::WRITE);
+
+ if (f) {
+ f->store_buffer(data.ptr(),data.size());
+ memdelete(f);
+ } else {
+ failed_files.push_back(path);
+ }
+
+
+ }
+
+ idx++;
+ ret = unzGoToNextFile(pkg);
+ }
+
+ unzClose(pkg);
+
+ if (failed_files.size()) {
+ String msg=TTR("The following files failed extraction from package:")+"\n\n";
+ for(int i=0;i<failed_files.size();i++) {
+
+ if (i>15) {
+ msg+="\nAnd "+itos(failed_files.size()-i)+" more files.";
+ break;
+ }
+ msg+=failed_files[i]+"\n";
+ }
+
+ dialog_error->set_text(msg);
+ dialog_error->popup_centered_minsize();
+
+ } else {
+ dialog_error->set_text(TTR("Package Installed Successfully!"));
+ dialog_error->popup_centered_minsize();
+ }
- f->store_line("; Engine configuration file.");
- f->store_line("; It's best to edit using the editor UI, not directly,");
- f->store_line("; becausethe parameters that go here are not obvious.");
- f->store_line("; ");
- f->store_line("; Format: ");
- f->store_line("; [section] ; section goes between []");
- f->store_line("; param=value ; assign values to parameters");
- f->store_line("\n");
- f->store_line("[application]");
- f->store_line("name=\""+project_name->get_text()+"\"");
- f->store_line("icon=\"res://icon.png\"");
-
- memdelete(f);
-
- ResourceSaver::save(dir.plus_file("/icon.png"),get_icon("DefaultProjectIcon","EditorIcons"));
}
@@ -233,10 +350,16 @@ protected:
public:
+ void set_zip_path(const String& p_path) {
+ zip_path=p_path;
+ }
+ void set_zip_title(const String& p_title) {
+ zip_title=p_title;
+ }
- void set_import_mode(bool p_import ) {
+ void set_mode(Mode p_mode) {
- import_mode=p_import;
+ mode=p_mode;
}
void show_dialog() {
@@ -245,7 +368,7 @@ public:
project_path->clear();
project_name->clear();
- if (import_mode) {
+ if (mode==MODE_IMPORT) {
set_title(TTR("Import Existing Project"));
get_ok()->set_text(TTR("Import"));
pp->set_text(TTR("Project Path (Must Exist):"));
@@ -253,9 +376,10 @@ public:
pn->hide();
project_name->hide();
- popup_centered(Size2(500,125));
+ popup_centered(Size2(500,125)*EDSCALE);
+
+ } else if (mode==MODE_NEW){
- } else {
set_title(TTR("Create New Project"));
get_ok()->set_text(TTR("Create"));
pp->set_text(TTR("Project Path:"));
@@ -263,7 +387,16 @@ public:
pn->show();
project_name->show();
- popup_centered(Size2(500,145));
+ popup_centered(Size2(500,145)*EDSCALE);
+ } else if (mode==MODE_INSTALL){
+
+ set_title(TTR("Install Project: ")+zip_title);
+ get_ok()->set_text(TTR("Install"));
+ pp->set_text(TTR("Project Path:"));
+ pn->hide();
+ project_name->hide();
+
+ popup_centered(Size2(500,125)*EDSCALE);
}
@@ -329,7 +462,10 @@ public:
fdialog->connect("dir_selected", this,"_path_selected");
fdialog->connect("file_selected", this,"_file_selected");
set_hide_on_ok(false);
- import_mode=false;
+ mode=MODE_NEW;
+
+ dialog_error = memnew( AcceptDialog );
+ add_child(dialog_error);
}
@@ -616,6 +752,8 @@ void ProjectManager::_load_recent_projects() {
run_btn->set_disabled(selected_list.size()<1 || (selected_list.size()==1 && single_selected_main==""));
EditorSettings::get_singleton()->save();
+
+ tabs->set_current_tab(0);
}
void ProjectManager::_open_project_confirm() {
@@ -755,14 +893,14 @@ void ProjectManager::_scan_projects() {
void ProjectManager::_new_project() {
- npdialog->set_import_mode(false);
+ npdialog->set_mode(NewProjectDialog::MODE_NEW);
npdialog->show_dialog();
}
void ProjectManager::_import_project() {
- npdialog->set_import_mode(true);
+ npdialog->set_mode(NewProjectDialog::MODE_IMPORT);
npdialog->show_dialog();
}
@@ -800,6 +938,15 @@ void ProjectManager::_exit_dialog() {
get_tree()->quit();
}
+
+void ProjectManager::_install_project(const String& p_zip_path,const String& p_title) {
+
+ npdialog->set_mode(NewProjectDialog::MODE_INSTALL);
+ npdialog->set_zip_path(p_zip_path);
+ npdialog->set_zip_title(p_title);
+ npdialog->show_dialog();
+}
+
void ProjectManager::_bind_methods() {
ObjectTypeDB::bind_method("_open_project",&ProjectManager::_open_project);
@@ -817,6 +964,7 @@ void ProjectManager::_bind_methods() {
ObjectTypeDB::bind_method("_panel_draw",&ProjectManager::_panel_draw);
ObjectTypeDB::bind_method("_panel_input",&ProjectManager::_panel_input);
ObjectTypeDB::bind_method("_favorite_pressed",&ProjectManager::_favorite_pressed);
+ ObjectTypeDB::bind_method("_install_project",&ProjectManager::_install_project);
}
@@ -978,10 +1126,10 @@ ProjectManager::ProjectManager() {
if (StreamPeerSSL::is_available()) {
-
asset_library = memnew( EditorAssetLibrary(true) );
asset_library->set_name("Templates");
tabs->add_child(asset_library);
+ asset_library->connect("install_asset",this,"_install_project");
} else {
WARN_PRINT("Asset Library not available, as it requires SSL to work.");
}
@@ -1015,8 +1163,6 @@ ProjectManager::ProjectManager() {
gui_base->add_child(multi_run_ask);
-
-
OS::get_singleton()->set_low_processor_usage_mode(true);
npdialog = memnew( NewProjectDialog );
diff --git a/tools/editor/project_manager.h b/tools/editor/project_manager.h
index 2db1bb839e..69467f50e7 100644
--- a/tools/editor/project_manager.h
+++ b/tools/editor/project_manager.h
@@ -88,6 +88,8 @@ class ProjectManager : public Control {
void _load_recent_projects();
void _scan_dir(DirAccess *da,float pos, float total,List<String> *r_projects);
+ void _install_project(const String& p_zip_path,const String& p_title);
+
void _panel_draw(Node *p_hb);
void _panel_input(const InputEvent& p_ev,Node *p_hb);
void _favorite_pressed(Node *p_hb);
diff --git a/tools/editor/project_settings.cpp b/tools/editor/project_settings.cpp
index 6822e50b73..6be1abf52f 100644
--- a/tools/editor/project_settings.cpp
+++ b/tools/editor/project_settings.cpp
@@ -100,16 +100,6 @@ void ProjectSettings::_notification(int p_what) {
translation_res_file_open->add_filter("*."+E->get());
translation_res_option_file_open->add_filter("*."+E->get());
}
-
- List<String> afn;
- ResourceLoader::get_recognized_extensions_for_type("Script",&afn);
- ResourceLoader::get_recognized_extensions_for_type("PackedScene",&afn);
-
- for (List<String>::Element *E=afn.front();E;E=E->next()) {
-
- autoload_file_open->add_filter("*."+E->get());
- }
-
}
}
@@ -564,7 +554,7 @@ void ProjectSettings::popup_project_settings() {
popup_centered_ratio();
globals_editor->update_category_list();
_update_translations();
- _update_autoload();
+ autoload_settings->update_autoload();
plugin_settings->update_plugins();
}
@@ -616,10 +606,26 @@ void ProjectSettings::_item_add() {
String name = catname!="" ? catname+"/"+propname : propname;
- Globals::get_singleton()->set(name,value);
+ undo_redo->create_action("Add Global Property");
+
+ undo_redo->add_do_property(Globals::get_singleton(), name, value);
+ undo_redo->add_do_method(Globals::get_singleton(), "set_persisting", name, true);
+
+ if (Globals::get_singleton()->has(name)) {
+ undo_redo->add_undo_property(Globals::get_singleton(), name, Globals::get_singleton()->get(name));
+ } else {
+ undo_redo->add_undo_property(Globals::get_singleton(), name, Variant());
+ }
+
+ undo_redo->add_do_method(globals_editor, "update_category_list");
+ undo_redo->add_undo_method(globals_editor, "update_category_list");
+
+ undo_redo->add_do_method(this, "_settings_changed");
+ undo_redo->add_undo_method(this, "_settings_changed");
+
+ undo_redo->commit_action();
globals_editor->set_current_section(catname);
- globals_editor->update_category_list();
_settings_changed();
}
@@ -633,10 +639,20 @@ void ProjectSettings::_item_del() {
String name = catname!="" ? catname+"/"+propname : propname;
- Globals::get_singleton()->set(name,Variant());
+ undo_redo->create_action("Delete Global Property");
- globals_editor->set_current_section(catname);
- globals_editor->update_category_list();
+ undo_redo->add_do_property(Globals::get_singleton(), name, Variant());
+
+ undo_redo->add_undo_property(Globals::get_singleton(), name, Globals::get_singleton()->get(name));
+ undo_redo->add_undo_method(Globals::get_singleton(), "set_persisting", name, Globals::get_singleton()->is_persisting(name));
+
+ undo_redo->add_do_method(globals_editor, "update_category_list");
+ undo_redo->add_undo_method(globals_editor, "update_category_list");
+
+ undo_redo->add_do_method(this, "_settings_changed");
+ undo_redo->add_undo_method(this, "_settings_changed");
+
+ undo_redo->commit_action();
_settings_changed();
}
@@ -811,263 +827,6 @@ void ProjectSettings::_translation_file_open() {
translation_file_open->popup_centered_ratio();
}
-
-void ProjectSettings::_autoload_file_callback(const String& p_path) {
-
- autoload_add_path->set_text(p_path);
- //if (autoload_add_name->get_text().strip_edges()==String()) {
-
- autoload_add_name->set_text( p_path.get_file().basename() );
- //}
-
- //_translation_add(p_translation);
-}
-
-void ProjectSettings::_autoload_file_open() {
-
- autoload_file_open->popup_centered_ratio();
-}
-
-void ProjectSettings::_autoload_edited() {
-
- if (updating_autoload)
- return;
-
- TreeItem *ti = autoload_list->get_edited();
- int column = autoload_list->get_edited_column();
-
- if (!ti || (column != 0 && column != 2))
- return;
-
- if (column == 0) {
- String name = ti->get_text(0);
- String old_name = selected_autoload.substr(selected_autoload.find("/")+1,selected_autoload.length());
-
- if (!name.is_valid_identifier()) {
- ti->set_text(0,old_name);
- message->set_text(TTR("Invalid name.")+"\n"+TTR("Valid characters:")+" a-z, A-Z, 0-9 or _");
- message->popup_centered(Size2(300,100));
- return;
- }
-
- if (ObjectTypeDB::type_exists(name)) {
- ti->set_text(0,old_name);
- message->set_text(TTR("Invalid name. Must not collide with an existing engine class name."));
- message->popup_centered(Size2(400,100));
- return;
- }
-
- for(int i=0;i<Variant::VARIANT_MAX;i++) {
- if (Variant::get_type_name(Variant::Type(i))==name) {
- ti->set_text(0,old_name);
- message->set_text(TTR("Invalid name. Must not collide with an existing buit-in type name."));
- message->popup_centered(Size2(400,100));
- return;
- }
- }
-
- for(int i=0;i<GlobalConstants::get_global_constant_count();i++) {
- if (GlobalConstants::get_global_constant_name(i)==name) {
- ti->set_text(0,old_name);
- message->set_text(TTR("Invalid name. Must not collide with an existing global constant name."));
- message->popup_centered(Size2(400,100));
- return;
- }
- }
-
- if (Globals::get_singleton()->has("autoload/"+name)) {
- ti->set_text(0,old_name);
- message->set_text(vformat(TTR("Autoload '%s' already exists!"),name));
- message->popup_centered(Size2(300,100));
- return;
- }
-
- updating_autoload = true;
-
- name = "autoload/"+name;
- String path = Globals::get_singleton()->get(selected_autoload);
- bool is_persisting = Globals::get_singleton()->is_persisting(selected_autoload);
- int order = Globals::get_singleton()->get_order(selected_autoload);
-
- undo_redo->create_action(TTR("Rename Autoload"));
- undo_redo->add_do_property(Globals::get_singleton(),name,path);
- undo_redo->add_do_method(Globals::get_singleton(),"set_persisting",name,is_persisting);
- undo_redo->add_do_method(Globals::get_singleton(),"set_order",name,order);
- undo_redo->add_do_method(Globals::get_singleton(),"clear",selected_autoload);
- undo_redo->add_undo_property(Globals::get_singleton(),selected_autoload,path);
- undo_redo->add_undo_method(Globals::get_singleton(),"set_persisting",selected_autoload,is_persisting);
- undo_redo->add_undo_method(Globals::get_singleton(),"set_order",selected_autoload,order);
- undo_redo->add_undo_method(Globals::get_singleton(),"clear",name);
- undo_redo->add_do_method(this,"_update_autoload");
- undo_redo->add_undo_method(this,"_update_autoload");
- undo_redo->add_do_method(this,"_settings_changed");
- undo_redo->add_undo_method(this,"_settings_changed");
- undo_redo->commit_action();
-
- selected_autoload = name;
- } else if (column == 2) {
- updating_autoload = true;
-
- bool checked = ti->is_checked(2);
- String base = "autoload/"+ti->get_text(0);
- String path = Globals::get_singleton()->get(base);
- int order = Globals::get_singleton()->get_order(base);
-
- if (path.begins_with("*"))
- path = path.substr(1,path.length());
-
- if (checked)
- path = "*" + path;
-
- undo_redo->create_action(TTR("Toggle AutoLoad Globals"));
- undo_redo->add_do_property(Globals::get_singleton(),base,path);
- undo_redo->add_undo_property(Globals::get_singleton(),base,Globals::get_singleton()->get(base));
- undo_redo->add_do_method(Globals::get_singleton(),"set_order",base,order); // keep order, as config order matters for these
- undo_redo->add_undo_method(Globals::get_singleton(),"set_order",base,order);
- undo_redo->add_do_method(this,"_update_autoload");
- undo_redo->add_undo_method(this,"_update_autoload");
- undo_redo->add_do_method(this,"_settings_changed");
- undo_redo->add_undo_method(this,"_settings_changed");
- undo_redo->commit_action();
- }
-
- updating_autoload = false;
-}
-
-void ProjectSettings::_autoload_add() {
-
- String name = autoload_add_name->get_text();
- if (!name.is_valid_identifier()) {
- message->set_text(TTR("Invalid name.")+"\n"+TTR("Valid characters:")+" a-z, A-Z, 0-9 or _");
- message->popup_centered(Size2(300,100));
- return;
-
- }
-
- if (ObjectTypeDB::type_exists(name)) {
-
- message->set_text(TTR("Invalid name. Must not collide with an existing engine class name."));
- message->popup_centered(Size2(300,100));
- return;
-
- }
-
- for(int i=0;i<Variant::VARIANT_MAX;i++) {
- if (Variant::get_type_name(Variant::Type(i))==name) {
-
- message->set_text(TTR("Invalid name. Must not collide with an existing buit-in type name."));
- message->popup_centered(Size2(300,100));
- return;
-
- }
- }
-
- for(int i=0;i<GlobalConstants::get_global_constant_count();i++) {
-
- if (GlobalConstants::get_global_constant_name(i)==name) {
-
- message->set_text(TTR("Invalid name. Must not collide with an existing global constant name."));
- message->popup_centered(Size2(300,100));
- return;
- }
-
- }
-
- String path = autoload_add_path->get_text();
- if (!FileAccess::exists(path)) {
- message->set_text("Invalid Path.\nFile does not exist.");
- message->popup_centered(Size2(300,100));
- return;
-
- }
- if (!path.begins_with("res://")) {
- message->set_text("Invalid Path.\nNot in resource path.");
- message->popup_centered(Size2(300,100));
- return;
-
- }
-
- undo_redo->create_action(TTR("Add Autoload"));
- name = "autoload/"+name;
- undo_redo->add_do_property(Globals::get_singleton(),name,"*"+path);
- if (Globals::get_singleton()->has(name))
- undo_redo->add_undo_property(Globals::get_singleton(),name,Globals::get_singleton()->get(name));
- else
- undo_redo->add_undo_property(Globals::get_singleton(),name,Variant());
-
- undo_redo->add_do_method(Globals::get_singleton(),"set_persisting",name,true);
- undo_redo->add_do_method(this,"_update_autoload");
- undo_redo->add_undo_method(this,"_update_autoload");
- undo_redo->add_do_method(this,"_settings_changed");
- undo_redo->add_undo_method(this,"_settings_changed");
- undo_redo->commit_action();
-
- autoload_add_path->set_text("");
- autoload_add_name->set_text("");
-
- //autoload_file_open->popup_centered_ratio();
-}
-
-void ProjectSettings::_autoload_delete(Object *p_item,int p_column, int p_button) {
-
-
- TreeItem *ti=p_item->cast_to<TreeItem>();
- String name = "autoload/"+ti->get_text(0);
-
- if (p_button==0) {
- //delete
- int order = Globals::get_singleton()->get_order(name);
- undo_redo->create_action(TTR("Remove Autoload"));
- undo_redo->add_do_property(Globals::get_singleton(),name,Variant());
- undo_redo->add_undo_property(Globals::get_singleton(),name,Globals::get_singleton()->get(name));
- undo_redo->add_undo_method(Globals::get_singleton(),"set_persisting",name,true);
- undo_redo->add_undo_method(Globals::get_singleton(),"set_order",name,order);
- undo_redo->add_do_method(this,"_update_autoload");
- undo_redo->add_undo_method(this,"_update_autoload");
- undo_redo->add_do_method(this,"_settings_changed");
- undo_redo->add_undo_method(this,"_settings_changed");
- undo_redo->commit_action();
- } else {
-
- TreeItem *swap = NULL;
-
- if (p_button==1) {
- swap=ti->get_prev();
- } else if (p_button==2) {
- swap=ti->get_next();
- }
- if (!swap)
- return;
-
- String swap_name= "autoload/"+swap->get_text(0);
-
- int order = Globals::get_singleton()->get_order(name);
- int swap_order = Globals::get_singleton()->get_order(swap_name);
-
- undo_redo->create_action(TTR("Move Autoload"));
- undo_redo->add_do_method(Globals::get_singleton(),"set_order",swap_name,order);
- undo_redo->add_do_method(Globals::get_singleton(),"set_order",name,swap_order);
- undo_redo->add_undo_method(Globals::get_singleton(),"set_order",swap_name,swap_order);
- undo_redo->add_undo_method(Globals::get_singleton(),"set_order",name,order);
- undo_redo->add_do_method(this,"_update_autoload");
- undo_redo->add_undo_method(this,"_update_autoload");
- undo_redo->add_do_method(this,"_settings_changed");
- undo_redo->add_undo_method(this,"_settings_changed");
- undo_redo->commit_action();
-
- }
-
-}
-
-void ProjectSettings::_autoload_selected() {
- TreeItem *ti = autoload_list->get_selected();
-
- if (!ti)
- return;
-
- selected_autoload = "autoload/"+ti->get_text(0);
-}
-
void ProjectSettings::_translation_delete(Object *p_item,int p_column, int p_button) {
TreeItem *ti = p_item->cast_to<TreeItem>();
@@ -1393,55 +1152,6 @@ void ProjectSettings::_update_translations() {
}
-void ProjectSettings::_update_autoload() {
-
- if (updating_autoload)
- return;
-
- updating_autoload=true;
-
- autoload_list->clear();
- TreeItem *root = autoload_list->create_item();
- autoload_list->set_hide_root(true);
-
- List<PropertyInfo> props;
- Globals::get_singleton()->get_property_list(&props);
-
- for(List<PropertyInfo>::Element *E=props.front();E;E=E->next()) {
-
- const PropertyInfo &pi=E->get();
- if (!pi.name.begins_with("autoload/"))
- continue;
-
- String name = pi.name.get_slice("/",1);
- String path = Globals::get_singleton()->get(pi.name);
-
- if (name=="")
- continue;
- bool global=false;
- if (path.begins_with("*")) {
- path=path.substr(1,path.length());
- global=true;
- }
- TreeItem *t = autoload_list->create_item(root);
- t->set_text(0,name);
- t->set_editable(0,true);
- t->set_text(1,path);
- t->set_cell_mode(2,TreeItem::CELL_MODE_CHECK);
- t->set_editable(2,true);
- t->set_text(2,TTR("Enable"));
- t->set_checked(2,global);
- t->add_button(3,get_icon("MoveUp","EditorIcons"),1);
- t->add_button(3,get_icon("MoveDown","EditorIcons"),2);
- t->add_button(3,get_icon("Del","EditorIcons"),0);
-
-
- }
-
- updating_autoload=false;
-
-}
-
void ProjectSettings::_toggle_search_bar(bool p_pressed) {
globals_editor->get_property_editor()->set_use_filter(p_pressed);
@@ -1508,14 +1218,6 @@ void ProjectSettings::_bind_methods() {
ObjectTypeDB::bind_method(_MD("_translation_res_delete"),&ProjectSettings::_translation_res_delete);
ObjectTypeDB::bind_method(_MD("_translation_res_option_delete"),&ProjectSettings::_translation_res_option_delete);
- ObjectTypeDB::bind_method(_MD("_autoload_add"),&ProjectSettings::_autoload_add);
- ObjectTypeDB::bind_method(_MD("_autoload_file_open"),&ProjectSettings::_autoload_file_open);
- ObjectTypeDB::bind_method(_MD("_autoload_file_callback"),&ProjectSettings::_autoload_file_callback);
- ObjectTypeDB::bind_method(_MD("_update_autoload"),&ProjectSettings::_update_autoload);
- ObjectTypeDB::bind_method(_MD("_autoload_delete"),&ProjectSettings::_autoload_delete);
- ObjectTypeDB::bind_method(_MD("_autoload_edited"),&ProjectSettings::_autoload_edited);
- ObjectTypeDB::bind_method(_MD("_autoload_selected"),&ProjectSettings::_autoload_selected);
-
ObjectTypeDB::bind_method(_MD("_clear_search_box"),&ProjectSettings::_clear_search_box);
ObjectTypeDB::bind_method(_MD("_toggle_search_bar"),&ProjectSettings::_toggle_search_bar);
@@ -1858,69 +1560,10 @@ ProjectSettings::ProjectSettings(EditorData *p_data) {
{
- VBoxContainer *avb = memnew( VBoxContainer );
- tab_container->add_child(avb);
- avb->set_name(TTR("AutoLoad"));
- HBoxContainer *ahb = memnew( HBoxContainer);
- avb->add_child(ahb);
-
-
- VBoxContainer *avb_path = memnew( VBoxContainer );
- avb_path->set_h_size_flags(SIZE_EXPAND_FILL);
- HBoxContainer *ahb_path = memnew( HBoxContainer );
- autoload_add_path = memnew(LineEdit);
- autoload_add_path->set_h_size_flags(SIZE_EXPAND_FILL);
- ahb_path->add_child(autoload_add_path);
- Button *browseaa = memnew( Button("..") );
- ahb_path->add_child(browseaa);
- browseaa->connect("pressed",this,"_autoload_file_open");
-
- avb_path->add_margin_child(TTR("Path:"),ahb_path);
- ahb->add_child(avb_path);
-
- VBoxContainer *avb_name = memnew( VBoxContainer );
- avb_name->set_h_size_flags(SIZE_EXPAND_FILL);
-
- HBoxContainer *ahb_name = memnew( HBoxContainer );
- autoload_add_name = memnew(LineEdit);
- autoload_add_name->set_h_size_flags(SIZE_EXPAND_FILL);
- ahb_name->add_child(autoload_add_name);
- avb_name->add_margin_child(TTR("Node Name:"),ahb_name);
- Button *addaa = memnew( Button(TTR("Add")) );
- ahb_name->add_child(addaa);
- addaa->connect("pressed",this,"_autoload_add");
-
- ahb->add_child(avb_name);
-
- autoload_list = memnew( Tree );
- autoload_list->set_v_size_flags(SIZE_EXPAND_FILL);
- avb->add_margin_child(TTR("List:"),autoload_list,true);
-
- autoload_file_open=memnew( EditorFileDialog );
- add_child(autoload_file_open);
- autoload_file_open->set_mode(EditorFileDialog::MODE_OPEN_FILE);
- autoload_file_open->connect("file_selected",this,"_autoload_file_callback");
-
- autoload_list->set_columns(4);
- autoload_list->set_column_titles_visible(true);
- autoload_list->set_column_title(0,TTR("Name"));
- autoload_list->set_column_expand(0,true);
- autoload_list->set_column_min_width(0,100);
- autoload_list->set_column_title(1,TTR("Path"));
- autoload_list->set_column_expand(1,true);
- autoload_list->set_column_min_width(1,100);
- autoload_list->set_column_title(2,TTR("Singleton"));
- autoload_list->set_column_expand(2,false);
- autoload_list->set_column_min_width(2,80);
- autoload_list->set_column_expand(3,false);
- autoload_list->set_column_min_width(3,80);
-
- autoload_list->connect("button_pressed",this,"_autoload_delete");
- autoload_list->connect("item_edited",this,"_autoload_edited");
- autoload_list->connect("cell_selected", this, "_autoload_selected");
-
- updating_autoload=false;
-
+ autoload_settings = memnew( EditorAutoloadSettings );
+ autoload_settings->set_name(TTR("AutoLoad"));
+ tab_container->add_child(autoload_settings);
+ autoload_settings->connect("autoload_changed", this, "_settings_changed");
}
{
diff --git a/tools/editor/project_settings.h b/tools/editor/project_settings.h
index 79e1acf75e..46e98f69ad 100644
--- a/tools/editor/project_settings.h
+++ b/tools/editor/project_settings.h
@@ -34,6 +34,7 @@
#include "undo_redo.h"
#include "editor_data.h"
#include "scene/gui/tab_container.h"
+#include "editor_autoload_settings.h"
#include "editor_plugin_settings.h"
//#include "project_export_settings.h"
@@ -88,26 +89,10 @@ class ProjectSettings : public AcceptDialog {
Tree *translation_remap;
Tree *translation_remap_options;
-
- Tree *autoload_list;
- String selected_autoload;
- EditorFileDialog *autoload_file_open;
- LineEdit *autoload_add_name;
- LineEdit *autoload_add_path;
-
+ EditorAutoloadSettings *autoload_settings;
EditorPluginSettings *plugin_settings;
- void _update_autoload();
- void _autoload_file_callback(const String& p_path);
- void _autoload_add();
- void _autoload_edited();
- void _autoload_file_open();
- void _autoload_delete(Object *p_item,int p_column, int p_button);
- void _autoload_selected();
- bool updating_autoload;
-
-
void _item_selected();
void _item_adds(String);
void _item_add();
diff --git a/tools/editor/property_editor.cpp b/tools/editor/property_editor.cpp
index 7816dd9bc7..ceb62d5ff0 100644
--- a/tools/editor/property_editor.cpp
+++ b/tools/editor/property_editor.cpp
@@ -4187,6 +4187,8 @@ public:
void SectionedPropertyEditor::_bind_methods() {
ObjectTypeDB::bind_method("_section_selected",&SectionedPropertyEditor::_section_selected);
+
+ ObjectTypeDB::bind_method("update_category_list", &SectionedPropertyEditor::update_category_list);
}
void SectionedPropertyEditor::_section_selected(int p_which) {
diff --git a/tools/editor/scene_tree_dock.cpp b/tools/editor/scene_tree_dock.cpp
index 4526fa26aa..2e7d65eadc 100644
--- a/tools/editor/scene_tree_dock.cpp
+++ b/tools/editor/scene_tree_dock.cpp
@@ -243,7 +243,7 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
//if (!_validate_no_foreign())
// break;
- create_dialog->popup_centered_ratio();
+ create_dialog->popup(true);
} break;
case TOOL_INSTANCE: {
@@ -281,7 +281,7 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
} break;
case TOOL_REPLACE: {
- create_dialog->popup_centered_ratio();
+ create_dialog->popup(false);
} break;
case TOOL_CONNECT: {
diff --git a/tools/editor/spatial_editor_gizmos.cpp b/tools/editor/spatial_editor_gizmos.cpp
index edc2fc513d..480d33fd0a 100644
--- a/tools/editor/spatial_editor_gizmos.cpp
+++ b/tools/editor/spatial_editor_gizmos.cpp
@@ -623,12 +623,11 @@ void EditorSpatialGizmo::_bind_methods() {
ObjectTypeDB::bind_method(_MD("add_unscaled_billboard","material:Material","default_scale"),&EditorSpatialGizmo::add_unscaled_billboard,DEFVAL(1));
ObjectTypeDB::bind_method(_MD("add_handles","handles","billboard","secondary"),&EditorSpatialGizmo::add_handles,DEFVAL(false),DEFVAL(false));
ObjectTypeDB::bind_method(_MD("set_spatial_node","node:Spatial"),&EditorSpatialGizmo::_set_spatial_node);
+ ObjectTypeDB::bind_method(_MD("clear"),&EditorSpatialGizmo::clear);
BIND_VMETHOD( MethodInfo("redraw"));
BIND_VMETHOD( MethodInfo(Variant::STRING,"get_handle_name",PropertyInfo(Variant::INT,"index")));
- {
- BIND_VMETHOD( MethodInfo("get_handle_value:Variant",PropertyInfo(Variant::INT,"index")));
- }
+ BIND_VMETHOD( MethodInfo("get_handle_value:Variant",PropertyInfo(Variant::INT,"index")));
BIND_VMETHOD( MethodInfo("set_handle",PropertyInfo(Variant::INT,"index"),PropertyInfo(Variant::OBJECT,"camera:Camera"),PropertyInfo(Variant::VECTOR2,"point")));
MethodInfo cm = MethodInfo("commit_handle",PropertyInfo(Variant::INT,"index"),PropertyInfo(Variant::NIL,"restore:Variant"),PropertyInfo(Variant::BOOL,"cancel"));
cm.default_arguments.push_back(false);
diff --git a/tools/export/blender25/godot_export_manager.py b/tools/export/blender25/godot_export_manager.py
deleted file mode 100644
index a249611c71..0000000000
--- a/tools/export/blender25/godot_export_manager.py
+++ /dev/null
@@ -1,472 +0,0 @@
-# ##### BEGIN GPL LICENSE BLOCK #####
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; either version 2
-# of the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# ##### END GPL LICENSE BLOCK #####
-
-# Script copyright (c) Andreas Esau
-
-bl_info = {
- "name": "Godot Export Manager",
- "author": "Andreas Esau",
- "version": (1, 0),
- "blender": (2, 7, 0),
- "location": "Scene Properties > Godot Export Manager",
- "description": "Godot Export Manager uses the Better Collada Exporter to manage Export Groups and automatically export the objects groups to Collada Files.",
- "warning": "",
- "wiki_url": ("http://www.godotengine.org"),
- "tracker_url": "",
- "category": "Import-Export"}
-
-import bpy
-from bpy.props import StringProperty, BoolProperty, EnumProperty, FloatProperty, FloatVectorProperty, IntProperty, CollectionProperty, PointerProperty
-import os
-from bpy.app.handlers import persistent
-from mathutils import Vector, Matrix
-
-class godot_export_manager(bpy.types.Panel):
- bl_label = "Godot Export Manager"
- bl_space_type = 'PROPERTIES'
- bl_region_type = 'WINDOW'
- bl_context = "scene"
-
- bpy.types.Scene.godot_export_on_save = BoolProperty(default=False)
-
- ### draw function for all ui elements
- def draw(self, context):
- layout = self.layout
- split = self.layout.split()
- scene = bpy.data.scenes[0]
- ob = context.object
- scene = context.scene
-
- row = layout.row()
- col = row.column()
- col.prop(scene,"godot_export_on_save",text="Export Groups on save")
-
- row = layout.row()
- col = row.column(align=True)
- op = col.operator("scene.godot_add_objects_to_group",text="Add selected objects to Group",icon="COPYDOWN")
-
- op = col.operator("scene.godot_delete_objects_from_group",text="Delete selected objects from Group",icon="PASTEDOWN")
-
-
-
- row = layout.row()
- col = row.column()
- col.label(text="Export Groups:")
-
-
- row = layout.row()
- col = row.column()
-
- col.template_list("UI_List_Godot","dummy",scene, "godot_export_groups", scene, "godot_export_groups_index",rows=1,maxrows=10,type='DEFAULT')
-
- col = row.column(align=True)
- col.operator("scene.godot_add_export_group",text="",icon="ZOOMIN")
- col.operator("scene.godot_delete_export_group",text="",icon="ZOOMOUT")
- col.operator("scene.godot_export_all_groups",text="",icon="EXPORT")
-
- if len(scene.godot_export_groups) > 0:
- row = layout.row()
- col = row.column()
- group = scene.godot_export_groups[scene.godot_export_groups_index]
- col.prop(group,"name",text="Group Name")
- col.prop(group,"export_name",text="Export Name")
- col.prop(group,"export_path",text="Export Filepath")
-
- row = layout.row()
- col = row.column()
- row = layout.row()
- col = row.column()
- col.label(text="Export Settings:")
-
- col = col.row(align=True)
- col.prop(group,"apply_loc",toggle=True,icon="MAN_TRANS")
- col.prop(group,"apply_rot",toggle=True,icon="MAN_ROT")
- col.prop(group,"apply_scale",toggle=True,icon="MAN_SCALE")
-
- row = layout.row()
- col = row.column()
-
- col.prop(group,"use_include_particle_duplicates")
- col.prop(group,"use_mesh_modifiers")
- col.prop(group,"use_tangent_arrays")
- col.prop(group,"use_triangles")
- col.prop(group,"use_copy_images")
- col.prop(group,"use_active_layers")
- col.prop(group,"use_anim")
- col.prop(group,"use_anim_action_all")
- col.prop(group,"use_anim_skip_noexp")
- col.prop(group,"use_anim_optimize")
- col.prop(group,"anim_optimize_precision")
- col.prop(group,"use_metadata")
-
-### Custom template_list look
-class UI_List_Godot(bpy.types.UIList):
- def draw_item(self, context, layout, data, item, icon, active_data, active_propname, index):
- ob = data
- slot = item
- col = layout.row(align=True)
-
- col.label(text=item.name,icon="GROUP")
- col.prop(item,"active",text="")
-
- op = col.operator("scene.godot_select_group_objects",text="",emboss=False,icon="RESTRICT_SELECT_OFF")
- op.idx = index
- op = col.operator("scene.godot_export_group",text="",emboss=False,icon="EXPORT")
- op.idx = index
-
-class add_objects_to_group(bpy.types.Operator):
- bl_idname = "scene.godot_add_objects_to_group"
- bl_label = "Add Objects to Group"
- bl_description = "Adds the selected Objects to the active group below."
-
- undo = BoolProperty(default=True)
-
- def execute(self,context):
- scene = context.scene
-
- objects_str = ""
- if len(scene.godot_export_groups) > 0:
- for i,object in enumerate(context.selected_objects):
- if object.name not in scene.godot_export_groups[scene.godot_export_groups_index].nodes:
- node = scene.godot_export_groups[scene.godot_export_groups_index].nodes.add()
- node.name = object.name
- if i == 0:
- objects_str += object.name
- else:
- objects_str += ", "+object.name
-
-
- self.report({'INFO'}, objects_str + " added to group." )
- if self.undo:
- bpy.ops.ed.undo_push(message="Objects added to group")
- else:
- self.report({'WARNING'}, "Create a group first." )
- return{'FINISHED'}
-
-class del_objects_from_group(bpy.types.Operator):
- bl_idname = "scene.godot_delete_objects_from_group"
- bl_label = "Delete Objects from Group"
- bl_description = "Delets the selected Objects from the active group below."
-
- def execute(self,context):
- scene = context.scene
-
- if len(scene.godot_export_groups) > 0:
-
- selected_objects = []
- for object in context.selected_objects:
- selected_objects.append(object.name)
-
- objects_str = ""
- j = 0
- for i,node in enumerate(scene.godot_export_groups[scene.godot_export_groups_index].nodes):
- if node.name in selected_objects:
- scene.godot_export_groups[scene.godot_export_groups_index].nodes.remove(i)
-
-
- if j == 0:
- objects_str += object.name
- else:
- objects_str += ", "+object.name
- j+=1
-
-
- self.report({'INFO'}, objects_str + " deleted from group." )
- bpy.ops.ed.undo_push(message="Objects deleted from group")
- else:
- self.report({'WARNING'}, "There is no group to delete from." )
- return{'FINISHED'}
-
-class select_group_objects(bpy.types.Operator):
- bl_idname = "scene.godot_select_group_objects"
- bl_label = "Select Group Objects"
- bl_description = "Will select all group Objects in the scene."
-
- idx = IntProperty()
-
- def execute(self,context):
- scene = context.scene
- for object in context.scene.objects:
- object.select = False
- for node in scene.godot_export_groups[self.idx].nodes:
- if node.name in bpy.data.objects:
- bpy.data.objects[node.name].select = True
- context.scene.objects.active = bpy.data.objects[node.name]
- return{'FINISHED'}
-
-class export_groups_autosave(bpy.types.Operator):
- bl_idname = "scene.godot_export_groups_autosave"
- bl_label = "Export All Groups"
- bl_description = "Exports all groups to Collada."
-
- def execute(self,context):
- scene = context.scene
- if scene.godot_export_on_save:
- for i in range(len(scene.godot_export_groups)):
- if scene.godot_export_groups[i].active:
- bpy.ops.scene.godot_export_group(idx=i)
- self.report({'INFO'}, "All Groups exported." )
- bpy.ops.ed.undo_push(message="Export all Groups")
- return{'FINISHED'}
-
-class export_all_groups(bpy.types.Operator):
- bl_idname = "scene.godot_export_all_groups"
- bl_label = "Export All Groups"
- bl_description = "Exports all groups to Collada."
-
- def execute(self,context):
- scene = context.scene
-
- for i in range(0,len(scene.godot_export_groups)):
- bpy.ops.scene.godot_export_group(idx=i,export_all=True)
-
- self.report({'INFO'}, "All Groups exported." )
- return{'FINISHED'}
-
-
-class export_group(bpy.types.Operator):
- bl_idname = "scene.godot_export_group"
- bl_label = "Export Group"
- bl_description = "Exports the active group to destination folder as Collada file."
-
- idx = IntProperty(default=0)
- export_all = BoolProperty(default=False)
-
-
- def copy_object_recursive(self,ob,parent,single_user = True):
- new_ob = bpy.data.objects[ob.name].copy()
- if single_user or ob.type=="ARMATURE":
- new_mesh_data = new_ob.data.copy()
- new_ob.data = new_mesh_data
- bpy.context.scene.objects.link(new_ob)
-
- if ob != parent:
- new_ob.parent = parent
- else:
- new_ob.parent = None
-
- for child in ob.children:
- self.copy_object_recursive(child,new_ob,single_user)
- new_ob.select = True
- return new_ob
-
- def delete_object(self,ob):
- if ob != None:
- for child in ob.children:
- self.delete_object(child)
- bpy.context.scene.objects.unlink(ob)
- bpy.data.objects.remove(ob)
-
- def convert_group_to_node(self,group):
- if group.dupli_group != None:
- for object in group.dupli_group.objects:
- if object.parent == None:
- object = self.copy_object_recursive(object,object,True)
- matrix = Matrix(object.matrix_local)
- object.matrix_local = Matrix()
- object.matrix_local *= group.matrix_local
- object.matrix_local *= matrix
-
- self.delete_object(group)
-
- def execute(self,context):
-
- scene = context.scene
- group = context.scene.godot_export_groups
-
- if not group[self.idx].active and self.export_all:
- return{'FINISHED'}
-
- for i,object in enumerate(group[self.idx].nodes):
- if object.name in bpy.data.objects:
- pass
- else:
- group[self.idx].nodes.remove(i)
- bpy.ops.ed.undo_push(message="Clear not existent Group Nodes.")
-
- path = group[self.idx].export_path
- if (path.find("//")==0 or path.find("\\\\")==0):
- #if relative, convert to absolute
- path = bpy.path.abspath(path)
- path = path.replace("\\","/")
-
- ### if path exists and group export name is set the group will be exported
- if os.path.exists(path) and group[self.idx].export_name != "":
-
- context.scene.layers = [True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True]
-
-
- if group[self.idx].export_name.endswith(".dae"):
- path = os.path.join(path,group[self.idx].export_name)
- else:
- path = os.path.join(path,group[self.idx].export_name+".dae")
-
- hide_select = []
- for object in context.scene.objects:
- hide_select.append(object.hide_select)
- object.hide_select = False
- object.select = False
- context.scene.objects.active = None
-
- ### make particle duplicates, parent and select them
- nodes_to_be_added = []
- if group[self.idx].use_include_particle_duplicates:
- for i,object in enumerate(group[self.idx].nodes):
- if bpy.data.objects[object.name].type != "EMPTY":
- context.scene.objects.active = bpy.data.objects[object.name]
- bpy.data.objects[object.name].select = True
- bpy.ops.object.duplicates_make_real()
- for object in context.selected_objects:
- nodes_to_be_added.append(object)
- bpy.ops.object.parent_set(type="OBJECT", keep_transform=False)
-
- for object in context.selected_objects:
- object.select = False
- bpy.data.objects[object.name].select = False
- context.scene.objects.active = None
- for object in nodes_to_be_added:
- object.select = True
-
- ### select all other nodes from the group
- for i,object in enumerate(group[self.idx].nodes):
- if bpy.data.objects[object.name].type == "EMPTY":
- self.convert_group_to_node(bpy.data.objects[object.name])
- else:
- bpy.data.objects[object.name].select = True
-
- bpy.ops.object.transform_apply(location=group[self.idx].apply_loc, rotation=group[self.idx].apply_rot, scale=group[self.idx].apply_scale)
- bpy.ops.export_scene.dae(check_existing=True, filepath=path, filter_glob="*.dae", object_types=group[self.idx].object_types, use_export_selected=group[self.idx].use_export_selected, use_mesh_modifiers=group[self.idx].use_mesh_modifiers, use_tangent_arrays=group[self.idx].use_tangent_arrays, use_triangles=group[self.idx].use_triangles, use_copy_images=group[self.idx].use_copy_images, use_active_layers=group[self.idx].use_active_layers, use_anim=group[self.idx].use_anim, use_anim_action_all=group[self.idx].use_anim_action_all, use_anim_skip_noexp=group[self.idx].use_anim_skip_noexp, use_anim_optimize=group[self.idx].use_anim_optimize, anim_optimize_precision=group[self.idx].anim_optimize_precision, use_metadata=group[self.idx].use_metadata)
-
- self.report({'INFO'}, '"'+group[self.idx].name+'"' + " Group exported." )
- msg = "Export Group "+group[self.idx].name
-
- bpy.ops.ed.undo_push(message="")
- bpy.ops.ed.undo()
- bpy.ops.ed.undo_push(message=msg)
-
- else:
- self.report({'INFO'}, "Define Export Name and Export Path." )
- return{'FINISHED'}
-
-class add_export_group(bpy.types.Operator):
- bl_idname = "scene.godot_add_export_group"
- bl_label = "Adds a new export Group"
- bl_description = "Creates a new Export Group with the selected Objects assigned to it."
-
- def execute(self,context):
- scene = context.scene
-
- item = scene.godot_export_groups.add()
- item.name = "New Group"
- for object in context.selected_objects:
- node = item.nodes.add()
- node.name = object.name
- scene.godot_export_groups_index = len(scene.godot_export_groups)-1
- bpy.ops.ed.undo_push(message="Create New Export Group")
- return{'FINISHED'}
-
-class del_export_group(bpy.types.Operator):
- bl_idname = "scene.godot_delete_export_group"
- bl_label = "Delets the selected export Group"
- bl_description = "Delets the active Export Group."
-
- def invoke(self, context, event):
- wm = context.window_manager
- return wm.invoke_confirm(self,event)
-
- def execute(self,context):
- scene = context.scene
-
- scene.godot_export_groups.remove(scene.godot_export_groups_index)
- if scene.godot_export_groups_index > 0:
- scene.godot_export_groups_index -= 1
- bpy.ops.ed.undo_push(message="Delete Export Group")
- return{'FINISHED'}
-
-class godot_node_list(bpy.types.PropertyGroup):
- name = StringProperty()
-
-class godot_export_groups(bpy.types.PropertyGroup):
- name = StringProperty(name="Group Name")
- export_name = StringProperty(name="scene_name")
- nodes = CollectionProperty(type=godot_node_list)
- export_path = StringProperty(subtype="DIR_PATH")
- active = BoolProperty(default=True,description="Export Group")
-
- object_types = EnumProperty(name="Object Types",options={'ENUM_FLAG'},items=(('EMPTY', "Empty", ""),('CAMERA', "Camera", ""),('LAMP', "Lamp", ""),('ARMATURE', "Armature", ""),('MESH', "Mesh", ""),('CURVE', "Curve", ""),),default={'EMPTY', 'CAMERA', 'LAMP', 'ARMATURE', 'MESH','CURVE'})
-
- apply_scale = BoolProperty(name="Apply Scale",description="Apply Scale before export.",default=False)
- apply_rot = BoolProperty(name="Apply Rotation",description="Apply Rotation before export.",default=False)
- apply_loc = BoolProperty(name="Apply Location",description="Apply Location before export.",default=False)
-
- use_export_selected = BoolProperty(name="Selected Objects",description="Export only selected objects (and visible in active layers if that applies).",default=True)
- use_mesh_modifiers = BoolProperty(name="Apply Modifiers",description="Apply modifiers to mesh objects (on a copy!).",default=True)
- use_tangent_arrays = BoolProperty(name="Tangent Arrays",description="Export Tangent and Binormal arrays (for normalmapping).",default=False)
- use_triangles = BoolProperty(name="Triangulate",description="Export Triangles instead of Polygons.",default=False)
-
- use_copy_images = BoolProperty(name="Copy Images",description="Copy Images (create images/ subfolder)",default=False)
- use_active_layers = BoolProperty(name="Active Layers",description="Export only objects on the active layers.",default=True)
- use_anim = BoolProperty(name="Export Animation",description="Export keyframe animation",default=False)
- use_anim_action_all = BoolProperty(name="All Actions",description=("Export all actions for the first armature found in separate DAE files"),default=False)
- use_anim_skip_noexp = BoolProperty(name="Skip (-noexp) Actions",description="Skip exporting of actions whose name end in (-noexp). Useful to skip control animations.",default=True)
- use_anim_optimize = BoolProperty(name="Optimize Keyframes",description="Remove double keyframes",default=True)
-
- anim_optimize_precision = FloatProperty(name="Precision",description=("Tolerence for comparing double keyframes (higher for greater accuracy)"),min=1, max=16,soft_min=1, soft_max=16,default=6.0)
-
- use_metadata = BoolProperty(name="Use Metadata",default=True,options={'HIDDEN'})
- use_include_particle_duplicates = BoolProperty(name="Include Particle Duplicates",default=True)
-
-def register():
- bpy.utils.register_class(godot_export_manager)
- bpy.utils.register_class(godot_node_list)
- bpy.utils.register_class(godot_export_groups)
- bpy.utils.register_class(add_export_group)
- bpy.utils.register_class(del_export_group)
- bpy.utils.register_class(export_all_groups)
- bpy.utils.register_class(export_groups_autosave)
- bpy.utils.register_class(export_group)
- bpy.utils.register_class(add_objects_to_group)
- bpy.utils.register_class(del_objects_from_group)
- bpy.utils.register_class(select_group_objects)
- bpy.utils.register_class(UI_List_Godot)
-
- bpy.types.Scene.godot_export_groups = CollectionProperty(type=godot_export_groups)
- bpy.types.Scene.godot_export_groups_index = IntProperty(default=0,min=0)
-
-def unregister():
- bpy.utils.unregister_class(godot_export_manager)
- bpy.utils.unregister_class(godot_node_list)
- bpy.utils.unregister_class(godot_export_groups)
- bpy.utils.unregister_class(export_groups_autosave)
- bpy.utils.unregister_class(add_export_group)
- bpy.utils.unregister_class(del_export_group)
- bpy.utils.unregister_class(export_all_groups)
- bpy.utils.unregister_class(export_group)
- bpy.utils.unregister_class(add_objects_to_group)
- bpy.utils.unregister_class(del_objects_from_group)
- bpy.utils.unregister_class(select_group_objects)
- bpy.utils.unregister_class(UI_List_Godot)
-
-@persistent
-def auto_export(dummy):
- bpy.ops.scene.godot_export_groups_autosave()
-
-bpy.app.handlers.save_post.append(auto_export)
-
-if __name__ == "__main__":
- register()
diff --git a/tools/export/blender25/install.txt b/tools/export/blender25/install.txt
deleted file mode 100644
index 049af8848e..0000000000
--- a/tools/export/blender25/install.txt
+++ /dev/null
@@ -1,11 +0,0 @@
-Godot Author's Own Collada Exporter
------------------------------------
-
-1) Copy the "io_scene_dae" directory to wherever blender stores the
- scripts/addons folder (You will see many other io_scene_blahblah like
- folders). Copy the entire dir, not just the contents, make it just like
- the others.
-2) Go to Blender settings and enable the "Better Collada" plugin
-3) Enjoy proper Collada export.
-4) If it's broken, contact us.
- \ No newline at end of file
diff --git a/tools/export/blender25/io_scene_dae/__init__.py b/tools/export/blender25/io_scene_dae/__init__.py
deleted file mode 100644
index a1a0eabbbe..0000000000
--- a/tools/export/blender25/io_scene_dae/__init__.py
+++ /dev/null
@@ -1,193 +0,0 @@
-# ##### BEGIN GPL LICENSE BLOCK #####
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; either version 2
-# of the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# ##### END GPL LICENSE BLOCK #####
-
-# <pep8-80 compliant>
-
-bl_info = {
- "name": "Better Collada Exporter",
- "author": "Juan Linietsky",
- "blender": (2, 5, 8),
- "api": 38691,
- "location": "File > Import-Export",
- "description": ("Export DAE Scenes, This plugin actually works better! otherwise contact me."),
- "warning": "",
- "wiki_url": ("http://www.godotengine.org"),
- "tracker_url": "",
- "support": 'OFFICIAL',
- "category": "Import-Export"}
-
-
-if "bpy" in locals():
- import imp
- if "export_dae" in locals():
- imp.reload(export_dae)
-
-
-import bpy
-from bpy.props import StringProperty, BoolProperty, FloatProperty, EnumProperty
-
-from bpy_extras.io_utils import (ExportHelper,
- path_reference_mode,
- axis_conversion,
- )
-
-
-class ExportDAE(bpy.types.Operator, ExportHelper):
- '''Selection to DAE'''
- bl_idname = "export_scene.dae"
- bl_label = "Export DAE"
- bl_options = {'PRESET'}
-
- filename_ext = ".dae"
- filter_glob = StringProperty(default="*.dae", options={'HIDDEN'})
-
- # List of operator properties, the attributes will be assigned
- # to the class instance from the operator settings before calling.
-
-
- object_types = EnumProperty(
- name="Object Types",
- options={'ENUM_FLAG'},
- items=(('EMPTY', "Empty", ""),
- ('CAMERA', "Camera", ""),
- ('LAMP', "Lamp", ""),
- ('ARMATURE', "Armature", ""),
- ('MESH', "Mesh", ""),
- ('CURVE', "Curve", ""),
- ),
- default={'EMPTY', 'CAMERA', 'LAMP', 'ARMATURE', 'MESH','CURVE'},
- )
-
- use_export_selected = BoolProperty(
- name="Selected Objects",
- description="Export only selected objects (and visible in active layers if that applies).",
- default=False,
- )
- use_mesh_modifiers = BoolProperty(
- name="Apply Modifiers",
- description="Apply modifiers to mesh objects (on a copy!).",
- default=False,
- )
- use_tangent_arrays = BoolProperty(
- name="Tangent Arrays",
- description="Export Tangent and Binormal arrays (for normalmapping).",
- default=False,
- )
- use_triangles = BoolProperty(
- name="Triangulate",
- description="Export Triangles instead of Polygons.",
- default=False,
- )
-
- use_copy_images = BoolProperty(
- name="Copy Images",
- description="Copy Images (create images/ subfolder)",
- default=False,
- )
- use_active_layers = BoolProperty(
- name="Active Layers",
- description="Export only objects on the active layers.",
- default=True,
- )
- use_anim = BoolProperty(
- name="Export Animation",
- description="Export keyframe animation",
- default=False,
- )
- use_anim_action_all = BoolProperty(
- name="All Actions",
- description=("Export all actions for the first armature found in separate DAE files"),
- default=False,
- )
- use_anim_skip_noexp = BoolProperty(
- name="Skip (-noexp) Actions",
- description="Skip exporting of actions whose name end in (-noexp). Useful to skip control animations.",
- default=True,
- )
- use_anim_optimize = BoolProperty(
- name="Optimize Keyframes",
- description="Remove double keyframes",
- default=True,
- )
-
- anim_optimize_precision = FloatProperty(
- name="Precision",
- description=("Tolerence for comparing double keyframes "
- "(higher for greater accuracy)"),
- min=1, max=16,
- soft_min=1, soft_max=16,
- default=6.0,
- )
-
- use_metadata = BoolProperty(
- name="Use Metadata",
- default=True,
- options={'HIDDEN'},
- )
-
- @property
- def check_extension(self):
- return True#return self.batch_mode == 'OFF'
-
- def check(self, context):
- return True
- """
- isretur_def_change = super().check(context)
- return (is_xna_change or is_def_change)
- """
-
- def execute(self, context):
- if not self.filepath:
- raise Exception("filepath not set")
-
- """ global_matrix = Matrix()
-
- global_matrix[0][0] = \
- global_matrix[1][1] = \
- global_matrix[2][2] = self.global_scale
- """
-
- keywords = self.as_keywords(ignore=("axis_forward",
- "axis_up",
- "global_scale",
- "check_existing",
- "filter_glob",
- "xna_validate",
- ))
-
- from . import export_dae
- return export_dae.save(self, context, **keywords)
-
-
-def menu_func(self, context):
- self.layout.operator(ExportDAE.bl_idname, text="Better Collada (.dae)")
-
-
-def register():
- bpy.utils.register_module(__name__)
-
- bpy.types.INFO_MT_file_export.append(menu_func)
-
-
-def unregister():
- bpy.utils.unregister_module(__name__)
-
- bpy.types.INFO_MT_file_export.remove(menu_func)
-
-if __name__ == "__main__":
- register()
diff --git a/tools/export/blender25/io_scene_dae/export_dae.py b/tools/export/blender25/io_scene_dae/export_dae.py
deleted file mode 100644
index 2f7d1ddd86..0000000000
--- a/tools/export/blender25/io_scene_dae/export_dae.py
+++ /dev/null
@@ -1,1724 +0,0 @@
-# ##### BEGIN GPL LICENSE BLOCK #####
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; either version 2
-# of the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# ##### END GPL LICENSE BLOCK #####
-
-# <pep8 compliant>
-
-# Script copyright (C) Juan Linietsky
-# Contact Info: juan@codenix.com
-
-"""
-This script is an exporter to the Khronos Collada file format.
-
-http://www.khronos.org/collada/
-"""
-
-# TODO:
-# Materials & Textures
-# Optionally export Vertex Colors
-# Morph Targets
-# Control bone removal
-# Copy textures
-# Export Keyframe Optimization
-# --
-# Morph Targets
-# Blender native material? (?)
-
-import os
-import time
-import math # math.pi
-import shutil
-import bpy
-import bmesh
-from mathutils import Vector, Matrix
-
-#according to collada spec, order matters
-S_ASSET=0
-S_IMGS=1
-S_FX=2
-S_MATS=3
-S_GEOM=4
-S_MORPH=5
-S_SKIN=6
-S_CONT=7
-S_CAMS=8
-S_LAMPS=9
-S_ANIM_CLIPS=10
-S_NODES=11
-S_ANIM=12
-
-CMP_EPSILON=0.0001
-
-def snap_tup(tup):
- ret=()
- for x in tup:
- ret+=( x-math.fmod(x,0.0001), )
-
- return tup
-
-
-def strmtx(mtx):
- s=" "
- for x in range(4):
- for y in range(4):
- s+=str(mtx[x][y])
- s+=" "
- s+=" "
- return s
-
-def numarr(a,mult=1.0):
- s=" "
- for x in a:
- s+=" "+str(x*mult)
- s+=" "
- return s
-
-def numarr_alpha(a,mult=1.0):
- s=" "
- for x in a:
- s+=" "+str(x*mult)
- if len(a) == 3:
- s+=" 1.0"
- s+=" "
- return s
-
-def strarr(arr):
- s=" "
- for x in arr:
- s+=" "+str(x)
- s+=" "
- return s
-
-class DaeExporter:
-
- def validate_id(self,d):
- if (d.find("id-")==0):
- return "z"+d
- return d
-
-
- def new_id(self,t):
- self.last_id+=1
- return "id-"+t+"-"+str(self.last_id)
-
- class Vertex:
-
- def close_to(v):
- if ( (self.vertex-v.vertex).length() > CMP_EPSILON ):
- return False
- if ( (self.normal-v.normal).length() > CMP_EPSILON ):
- return False
- if ( (self.uv-v.uv).length() > CMP_EPSILON ):
- return False
- if ( (self.uv2-v.uv2).length() > CMP_EPSILON ):
- return False
-
- return True
-
- def get_tup(self):
- tup = (self.vertex.x,self.vertex.y,self.vertex.z,self.normal.x,self.normal.y,self.normal.z)
- for t in self.uv:
- tup = tup + (t.x,t.y)
- if (self.color!=None):
- tup = tup + (self.color.x,self.color.y,self.color.z)
- if (self.tangent!=None):
- tup = tup + (self.tangent.x,self.tangent.y,self.tangent.z)
- if (self.bitangent!=None):
- tup = tup + (self.bitangent.x,self.bitangent.y,self.bitangent.z)
- for t in self.bones:
- tup = tup + (float(t),)
- for t in self.weights:
- tup = tup + (float(t),)
-
- return tup
-
- def __init__(self):
- self.vertex = Vector( (0.0,0.0,0.0) )
- self.normal = Vector( (0.0,0.0,0.0) )
- self.tangent = None
- self.bitangent = None
- self.color = None
- self.uv = []
- self.uv2 = Vector( (0.0,0.0) )
- self.bones=[]
- self.weights=[]
-
-
- def writel(self,section,indent,text):
- if (not (section in self.sections)):
- self.sections[section]=[]
- line=""
- for x in range(indent):
- line+="\t"
- line+=text
- self.sections[section].append(line)
-
-
- def export_image(self,image):
- if (image in self.image_cache):
- return self.image_cache[image]
-
- imgpath = image.filepath
- if (imgpath.find("//")==0 or imgpath.find("\\\\")==0):
- #if relative, convert to absolute
- imgpath = bpy.path.abspath(imgpath)
-
- #path is absolute, now do something!
-
- if (self.config["use_copy_images"]):
- #copy image
- basedir = os.path.dirname(self.path)+"/images"
- if (not os.path.isdir(basedir)):
- os.makedirs(basedir)
-
- if os.path.isfile(imgpath):
- dstfile=basedir+"/"+os.path.basename(imgpath)
-
- if (not os.path.isfile(dstfile)):
- shutil.copy(imgpath,dstfile)
- imgpath="images/"+os.path.basename(imgpath)
- else:
- ### if file is not found save it as png file in the destination folder
- img_tmp_path = image.filepath
- if img_tmp_path.endswith((".bmp",".rgb",".png",".jpeg",".jpg",".jp2",".tga",".cin",".dpx",".exr",".hdr",".tif")):
- image.filepath = basedir+"/"+os.path.basename(img_tmp_path)
- else:
- image.filepath = basedir+"/"+image.name+".png"
-
- dstfile=basedir+"/"+os.path.basename(image.filepath)
-
- if (not os.path.isfile(dstfile)):
-
- image.save()
- imgpath="images/"+os.path.basename(image.filepath)
- image.filepath = img_tmp_path
-
- else:
- #export relative, always, no one wants absolute paths.
- try:
- imgpath = os.path.relpath(imgpath,os.path.dirname(self.path)).replace("\\","/") # export unix compatible always
-
- except:
- pass #fails sometimes, not sure why
-
-
- imgid = self.new_id("image")
-
- print("FOR: "+imgpath)
-
-# if (not os.path.isfile(imgpath)):
-# print("NOT FILE?")
-# if imgpath.endswith((".bmp",".rgb",".png",".jpeg",".jpg",".jp2",".tga",".cin",".dpx",".exr",".hdr",".tif")):
-# imgpath="images/"+os.path.basename(imgpath)
-# else:
-# imgpath="images/"+image.name+".png"
-
- self.writel(S_IMGS,1,'<image id="'+imgid+'" name="'+image.name+'">')
- self.writel(S_IMGS,2,'<init_from>'+imgpath+'</init_from>')
- self.writel(S_IMGS,1,'</image>')
- self.image_cache[image]=imgid
- return imgid
-
- def export_material(self,material,double_sided_hint=True):
-
- if (material in self.material_cache):
- return self.material_cache[material]
-
- fxid = self.new_id("fx")
- self.writel(S_FX,1,'<effect id="'+fxid+'" name="'+material.name+'-fx">')
- self.writel(S_FX,2,'<profile_COMMON>')
-
- #Find and fetch the textures and create sources
- sampler_table={}
- diffuse_tex=None
- specular_tex=None
- emission_tex=None
- normal_tex=None
- for i in range(len(material.texture_slots)):
- ts=material.texture_slots[i]
- if (not ts):
- continue
- if (not ts.use):
- continue
- if (not ts.texture):
- continue
- if (ts.texture.type!="IMAGE"):
- continue
-
- if (ts.texture.image==None):
- continue
-
- #image
- imgid = self.export_image(ts.texture.image)
-
- #surface
- surface_sid = self.new_id("fx_surf")
- self.writel(S_FX,3,'<newparam sid="'+surface_sid+'">')
- self.writel(S_FX,4,'<surface type="2D">')
- self.writel(S_FX,5,'<init_from>'+imgid+'</init_from>') #this is sooo weird
- self.writel(S_FX,5,'<format>A8R8G8B8</format>')
- self.writel(S_FX,4,'</surface>')
- self.writel(S_FX,3,'</newparam>')
- #sampler, collada sure likes it difficult
- sampler_sid = self.new_id("fx_sampler")
- self.writel(S_FX,3,'<newparam sid="'+sampler_sid+'">')
- self.writel(S_FX,4,'<sampler2D>')
- self.writel(S_FX,5,'<source>'+surface_sid+'</source>')
- self.writel(S_FX,4,'</sampler2D>')
- self.writel(S_FX,3,'</newparam>')
- sampler_table[i]=sampler_sid
-
- if (ts.use_map_color_diffuse and diffuse_tex==None):
- diffuse_tex=sampler_sid
- if (ts.use_map_color_spec and specular_tex==None):
- specular_tex=sampler_sid
- if (ts.use_map_emit and emission_tex==None):
- emission_tex=sampler_sid
- if (ts.use_map_normal and normal_tex==None):
- normal_tex=sampler_sid
-
- self.writel(S_FX,3,'<technique sid="common">')
- shtype="blinn"
- self.writel(S_FX,4,'<'+shtype+'>')
- #ambient? from where?
-
- self.writel(S_FX,5,'<emission>')
- if (emission_tex!=None):
- self.writel(S_FX,6,'<texture texture="'+emission_tex+'" texcoord="CHANNEL1"/>')
- else:
- self.writel(S_FX,6,'<color>'+numarr_alpha(material.diffuse_color,material.emit)+' </color>') # not totally right but good enough
- self.writel(S_FX,5,'</emission>')
-
- self.writel(S_FX,5,'<ambient>')
- self.writel(S_FX,6,'<color>'+numarr_alpha(self.scene.world.ambient_color,material.ambient)+' </color>')
- self.writel(S_FX,5,'</ambient>')
-
- self.writel(S_FX,5,'<diffuse>')
- if (diffuse_tex!=None):
- self.writel(S_FX,6,'<texture texture="'+diffuse_tex+'" texcoord="CHANNEL1"/>')
- else:
- self.writel(S_FX,6,'<color>'+numarr_alpha(material.diffuse_color,material.diffuse_intensity)+'</color>')
- self.writel(S_FX,5,'</diffuse>')
-
- self.writel(S_FX,5,'<specular>')
- if (specular_tex!=None):
- self.writel(S_FX,6,'<texture texture="'+specular_tex+'" texcoord="CHANNEL1"/>')
- else:
- self.writel(S_FX,6,'<color>'+numarr_alpha(material.specular_color,material.specular_intensity)+'</color>')
- self.writel(S_FX,5,'</specular>')
-
- self.writel(S_FX,5,'<shininess>')
- self.writel(S_FX,6,'<float>'+str(material.specular_hardness)+'</float>')
- self.writel(S_FX,5,'</shininess>')
-
- self.writel(S_FX,5,'<reflective>')
- self.writel(S_FX,6,'<color>'+numarr_alpha(material.mirror_color)+'</color>')
- self.writel(S_FX,5,'</reflective>')
-
- if (material.use_transparency):
- self.writel(S_FX,5,'<transparency>')
- self.writel(S_FX,6,'<float>'+str(material.alpha)+'</float>')
- self.writel(S_FX,5,'</transparency>')
-
- self.writel(S_FX,5,'<index_of_refraction>')
- self.writel(S_FX,6,'<float>'+str(material.specular_ior)+'</float>')
- self.writel(S_FX,5,'</index_of_refraction>')
-
- self.writel(S_FX,4,'</'+shtype+'>')
-
- self.writel(S_FX,4,'<extra>')
- self.writel(S_FX,5,'<technique profile="FCOLLADA">')
- if (normal_tex):
- self.writel(S_FX,6,'<bump bumptype="NORMALMAP">')
- self.writel(S_FX,7,'<texture texture="'+normal_tex+'" texcoord="CHANNEL1"/>')
- self.writel(S_FX,6,'</bump>')
-
- self.writel(S_FX,5,'</technique>')
- self.writel(S_FX,5,'<technique profile="GOOGLEEARTH">')
- self.writel(S_FX,6,'<double_sided>'+["0","1"][double_sided_hint]+"</double_sided>")
- self.writel(S_FX,5,'</technique>')
-
- if (material.use_shadeless):
- self.writel(S_FX,5,'<technique profile="GODOT">')
- self.writel(S_FX,6,'<unshaded>1</unshaded>')
- self.writel(S_FX,5,'</technique>')
-
- self.writel(S_FX,4,'</extra>')
-
- self.writel(S_FX,3,'</technique>')
- self.writel(S_FX,2,'</profile_COMMON>')
- self.writel(S_FX,1,'</effect>')
-
- # Also export blender material in all it's glory (if set as active)
-
-
- #Material
- matid = self.new_id("material")
- self.writel(S_MATS,1,'<material id="'+matid+'" name="'+material.name+'">')
- self.writel(S_MATS,2,'<instance_effect url="#'+fxid+'"/>')
- self.writel(S_MATS,1,'</material>')
-
- self.material_cache[material]=matid
- return matid
-
-
- def export_mesh(self,node,armature=None,skeyindex=-1,skel_source=None,custom_name=None):
-
- mesh = node.data
-
-
- if (node.data in self.mesh_cache):
- return self.mesh_cache[mesh]
-
- if (skeyindex==-1 and mesh.shape_keys!=None and len(mesh.shape_keys.key_blocks)):
- values=[]
- morph_targets=[]
- md=None
- for k in range(0,len(mesh.shape_keys.key_blocks)):
- shape = node.data.shape_keys.key_blocks[k]
- values+=[shape.value] #save value
- shape.value=0
-
- mid = self.new_id("morph")
-
- for k in range(0,len(mesh.shape_keys.key_blocks)):
-
- shape = node.data.shape_keys.key_blocks[k]
- node.show_only_shape_key=True
- node.active_shape_key_index = k
- shape.value = 1.0
- mesh.update()
- """
- oldval = shape.value
- shape.value = 1.0
-
- """
- p = node.data
- v = node.to_mesh(bpy.context.scene, True, "RENDER")
- node.data = v
-# self.export_node(node,il,shape.name)
- node.data.update()
- if (armature and k==0):
- md=self.export_mesh(node,armature,k,mid,shape.name)
- else:
- md=self.export_mesh(node,None,k,None,shape.name)
-
- node.data = p
- node.data.update()
- shape.value = 0.0
- morph_targets.append(md)
-
- """
- shape.value = oldval
- """
- node.show_only_shape_key=False
- node.active_shape_key_index = 0
-
-
- self.writel(S_MORPH,1,'<controller id="'+mid+'" name="">')
- #if ("skin_id" in morph_targets[0]):
- # self.writel(S_MORPH,2,'<morph source="#'+morph_targets[0]["skin_id"]+'" method="NORMALIZED">')
- #else:
- self.writel(S_MORPH,2,'<morph source="#'+morph_targets[0]["id"]+'" method="NORMALIZED">')
-
- self.writel(S_MORPH,3,'<source id="'+mid+'-morph-targets">')
- self.writel(S_MORPH,4,'<IDREF_array id="'+mid+'-morph-targets-array" count="'+str(len(morph_targets)-1)+'">')
- marr=""
- warr=""
- for i in range(len(morph_targets)):
- if (i==0):
- continue
- elif (i>1):
- marr+=" "
-
- if ("skin_id" in morph_targets[i]):
- marr+=morph_targets[i]["skin_id"]
- else:
- marr+=morph_targets[i]["id"]
-
- warr+=" 0"
-
- self.writel(S_MORPH,5,marr)
- self.writel(S_MORPH,4,'</IDREF_array>')
- self.writel(S_MORPH,4,'<technique_common>')
- self.writel(S_MORPH,5,'<accessor source="#'+mid+'-morph-targets-array" count="'+str(len(morph_targets)-1)+'" stride="1">')
- self.writel(S_MORPH,6,'<param name="MORPH_TARGET" type="IDREF"/>')
- self.writel(S_MORPH,5,'</accessor>')
- self.writel(S_MORPH,4,'</technique_common>')
- self.writel(S_MORPH,3,'</source>')
-
- self.writel(S_MORPH,3,'<source id="'+mid+'-morph-weights">')
- self.writel(S_MORPH,4,'<float_array id="'+mid+'-morph-weights-array" count="'+str(len(morph_targets)-1)+'" >')
- self.writel(S_MORPH,5,warr)
- self.writel(S_MORPH,4,'</float_array>')
- self.writel(S_MORPH,4,'<technique_common>')
- self.writel(S_MORPH,5,'<accessor source="#'+mid+'-morph-weights-array" count="'+str(len(morph_targets)-1)+'" stride="1">')
- self.writel(S_MORPH,6,'<param name="MORPH_WEIGHT" type="float"/>')
- self.writel(S_MORPH,5,'</accessor>')
- self.writel(S_MORPH,4,'</technique_common>')
- self.writel(S_MORPH,3,'</source>')
-
- self.writel(S_MORPH,3,'<targets>')
- self.writel(S_MORPH,4,'<input semantic="MORPH_TARGET" source="#'+mid+'-morph-targets"/>')
- self.writel(S_MORPH,4,'<input semantic="MORPH_WEIGHT" source="#'+mid+'-morph-weights"/>')
- self.writel(S_MORPH,3,'</targets>')
- self.writel(S_MORPH,2,'</morph>')
- self.writel(S_MORPH,1,'</controller>')
- if (armature!=None):
-
- self.armature_for_morph[node]=armature
-
- meshdata={}
- if (armature):
- meshdata = morph_targets[0]
- meshdata["morph_id"]=mid
- else:
- meshdata["id"]=morph_targets[0]["id"]
- meshdata["morph_id"]=mid
- meshdata["material_assign"]=morph_targets[0]["material_assign"]
-
-
-
- self.mesh_cache[node.data]=meshdata
- return meshdata
-
- apply_modifiers = len(node.modifiers) and self.config["use_mesh_modifiers"]
-
- name_to_use = mesh.name
- #print("name to use: "+mesh.name)
- if (custom_name!=None and custom_name!=""):
- name_to_use=custom_name
-
- mesh=node.to_mesh(self.scene,apply_modifiers,"RENDER") #is this allright?
-
- triangulate=self.config["use_triangles"]
- if (triangulate):
- bm = bmesh.new()
- bm.from_mesh(mesh)
- bmesh.ops.triangulate(bm, faces=bm.faces)
- bm.to_mesh(mesh)
- bm.free()
-
-
- mesh.update(calc_tessface=True)
- vertices=[]
- vertex_map={}
- surface_indices={}
- materials={}
-
- materials={}
-
- si=None
- if (armature!=None):
- si=self.skeleton_info[armature]
-
- has_uv=False
- has_uv2=False
- has_weights=armature!=None
- has_tangents=self.config["use_tangent_arrays"] # could detect..
- has_colors=len(mesh.vertex_colors)
- mat_assign=[]
-
- uv_layer_count=len(mesh.uv_textures)
- if (has_tangents and len(mesh.uv_textures)):
- try:
- mesh.calc_tangents()
- except:
- self.operator.report({'WARNING'},'CalcTangets failed for mesh "'+mesh.name+'", no tangets will be exported.')
- #uv_layer_count=0
- mesh.calc_normals_split()
- has_tangents=False
-
- else:
- mesh.calc_normals_split()
- has_tangents=False
-
-
- for fi in range(len(mesh.polygons)):
- f=mesh.polygons[fi]
-
- if (not (f.material_index in surface_indices)):
- surface_indices[f.material_index]=[]
- #print("Type: "+str(type(f.material_index)))
- #print("IDX: "+str(f.material_index)+"/"+str(len(mesh.materials)))
-
- try:
- #Bizarre blender behavior i don't understand, so catching exception
- mat = mesh.materials[f.material_index]
- except:
- mat= None
-
- if (mat!=None):
- materials[f.material_index]=self.export_material( mat,mesh.show_double_sided )
- else:
- materials[f.material_index]=None #weird, has no material?
-
- indices = surface_indices[f.material_index]
- vi=[]
- #vertices always 3
- """
- if (len(f.vertices)==3):
- vi.append(0)
- vi.append(1)
- vi.append(2)
- elif (len(f.vertices)==4):
- #todo, should use shortest path
- vi.append(0)
- vi.append(1)
- vi.append(2)
- vi.append(0)
- vi.append(2)
- vi.append(3)
- """
-
- for lt in range(f.loop_total):
- loop_index = f.loop_start + lt
- ml = mesh.loops[loop_index]
- mv = mesh.vertices[ml.vertex_index]
-
- v = self.Vertex()
- v.vertex = Vector( mv.co )
-
- for xt in mesh.uv_layers:
- v.uv.append( Vector( xt.data[loop_index].uv ) )
-
- if (has_colors):
- v.color = Vector( mesh.vertex_colors[0].data[loop_index].color )
-
- v.normal = Vector( ml.normal )
-
- if (has_tangents):
- v.tangent = Vector( ml.tangent )
- v.bitangent = Vector( ml.bitangent )
-
-
- # if (armature):
- # v.vertex = node.matrix_world * v.vertex
-
- #v.color=Vertex(mv. ???
-
- if (armature!=None):
- wsum=0.0
- zero_bones=[]
-
- for vg in mv.groups:
- if vg.group >= len(node.vertex_groups):
- continue;
- name = node.vertex_groups[vg.group].name
-
- if (name in si["bone_index"]):
- #could still put the weight as 0.0001 maybe
- if (vg.weight>0.001): #blender has a lot of zero weight stuff
- v.bones.append(si["bone_index"][name])
- v.weights.append(vg.weight)
- wsum+=vg.weight
- if (wsum==0.0):
- if not self.wrongvtx_report:
- self.operator.report({'WARNING'},'Mesh for object "'+node.name+'" has unassigned weights. This may look wrong in exported model.')
- self.wrongvtx_report=True
-
- #blender can have bones assigned that weight zero so they remain local
- #this is the best it can be done?
- v.bones.append(0)
- v.weights.append(1)
-
-
-
-
- tup = v.get_tup()
- idx = 0
- if (skeyindex==-1 and tup in vertex_map): #do not optmize if using shapekeys
- idx = vertex_map[tup]
- else:
- idx = len(vertices)
- vertices.append(v)
- vertex_map[tup]=idx
-
- vi.append(idx)
-
- if (len(vi)>2):
- #only triangles and above
- indices.append(vi)
-
-
- meshid = self.new_id("mesh")
- self.writel(S_GEOM,1,'<geometry id="'+meshid+'" name="'+name_to_use+'">')
-
- self.writel(S_GEOM,2,'<mesh>')
-
-
- # Vertex Array
- self.writel(S_GEOM,3,'<source id="'+meshid+'-positions">')
- float_values=""
- for v in vertices:
- float_values+=" "+str(v.vertex.x)+" "+str(v.vertex.y)+" "+str(v.vertex.z)
- self.writel(S_GEOM,4,'<float_array id="'+meshid+'-positions-array" count="'+str(len(vertices)*3)+'">'+float_values+'</float_array>')
- self.writel(S_GEOM,4,'<technique_common>')
- self.writel(S_GEOM,4,'<accessor source="#'+meshid+'-positions-array" count="'+str(len(vertices))+'" stride="3">')
- self.writel(S_GEOM,5,'<param name="X" type="float"/>')
- self.writel(S_GEOM,5,'<param name="Y" type="float"/>')
- self.writel(S_GEOM,5,'<param name="Z" type="float"/>')
- self.writel(S_GEOM,4,'</accessor>')
- self.writel(S_GEOM,4,'</technique_common>')
- self.writel(S_GEOM,3,'</source>')
-
- # Normal Array
-
- self.writel(S_GEOM,3,'<source id="'+meshid+'-normals">')
- float_values=""
- for v in vertices:
- float_values+=" "+str(v.normal.x)+" "+str(v.normal.y)+" "+str(v.normal.z)
- self.writel(S_GEOM,4,'<float_array id="'+meshid+'-normals-array" count="'+str(len(vertices)*3)+'">'+float_values+'</float_array>')
- self.writel(S_GEOM,4,'<technique_common>')
- self.writel(S_GEOM,4,'<accessor source="#'+meshid+'-normals-array" count="'+str(len(vertices))+'" stride="3">')
- self.writel(S_GEOM,5,'<param name="X" type="float"/>')
- self.writel(S_GEOM,5,'<param name="Y" type="float"/>')
- self.writel(S_GEOM,5,'<param name="Z" type="float"/>')
- self.writel(S_GEOM,4,'</accessor>')
- self.writel(S_GEOM,4,'</technique_common>')
- self.writel(S_GEOM,3,'</source>')
-
- if (has_tangents):
- self.writel(S_GEOM,3,'<source id="'+meshid+'-tangents">')
- float_values=""
- for v in vertices:
- float_values+=" "+str(v.tangent.x)+" "+str(v.tangent.y)+" "+str(v.tangent.z)
- self.writel(S_GEOM,4,'<float_array id="'+meshid+'-tangents-array" count="'+str(len(vertices)*3)+'">'+float_values+'</float_array>')
- self.writel(S_GEOM,4,'<technique_common>')
- self.writel(S_GEOM,4,'<accessor source="#'+meshid+'-tangents-array" count="'+str(len(vertices))+'" stride="3">')
- self.writel(S_GEOM,5,'<param name="X" type="float"/>')
- self.writel(S_GEOM,5,'<param name="Y" type="float"/>')
- self.writel(S_GEOM,5,'<param name="Z" type="float"/>')
- self.writel(S_GEOM,4,'</accessor>')
- self.writel(S_GEOM,4,'</technique_common>')
- self.writel(S_GEOM,3,'</source>')
-
- self.writel(S_GEOM,3,'<source id="'+meshid+'-bitangents">')
- float_values=""
- for v in vertices:
- float_values+=" "+str(v.bitangent.x)+" "+str(v.bitangent.y)+" "+str(v.bitangent.z)
- self.writel(S_GEOM,4,'<float_array id="'+meshid+'-bitangents-array" count="'+str(len(vertices)*3)+'">'+float_values+'</float_array>')
- self.writel(S_GEOM,4,'<technique_common>')
- self.writel(S_GEOM,4,'<accessor source="#'+meshid+'-bitangents-array" count="'+str(len(vertices))+'" stride="3">')
- self.writel(S_GEOM,5,'<param name="X" type="float"/>')
- self.writel(S_GEOM,5,'<param name="Y" type="float"/>')
- self.writel(S_GEOM,5,'<param name="Z" type="float"/>')
- self.writel(S_GEOM,4,'</accessor>')
- self.writel(S_GEOM,4,'</technique_common>')
- self.writel(S_GEOM,3,'</source>')
-
-
-
- # UV Arrays
-
- for uvi in range(uv_layer_count):
-
- self.writel(S_GEOM,3,'<source id="'+meshid+'-texcoord-'+str(uvi)+'">')
- float_values=""
- for v in vertices:
- try:
- float_values+=" "+str(v.uv[uvi].x)+" "+str(v.uv[uvi].y)
- except:
- # I don't understand this weird multi-uv-layer API, but with this it seems to works
- float_values+=" 0 0 "
-
- self.writel(S_GEOM,4,'<float_array id="'+meshid+'-texcoord-'+str(uvi)+'-array" count="'+str(len(vertices)*2)+'">'+float_values+'</float_array>')
- self.writel(S_GEOM,4,'<technique_common>')
- self.writel(S_GEOM,4,'<accessor source="#'+meshid+'-texcoord-'+str(uvi)+'-array" count="'+str(len(vertices))+'" stride="2">')
- self.writel(S_GEOM,5,'<param name="S" type="float"/>')
- self.writel(S_GEOM,5,'<param name="T" type="float"/>')
- self.writel(S_GEOM,4,'</accessor>')
- self.writel(S_GEOM,4,'</technique_common>')
- self.writel(S_GEOM,3,'</source>')
-
- # Color Arrays
-
- if (has_colors):
- self.writel(S_GEOM,3,'<source id="'+meshid+'-colors">')
- float_values=""
- for v in vertices:
- float_values+=" "+str(v.color.x)+" "+str(v.color.y)+" "+str(v.color.z)
- self.writel(S_GEOM,4,'<float_array id="'+meshid+'-colors-array" count="'+str(len(vertices)*3)+'">'+float_values+'</float_array>')
- self.writel(S_GEOM,4,'<technique_common>')
- self.writel(S_GEOM,4,'<accessor source="#'+meshid+'-colors-array" count="'+str(len(vertices))+'" stride="3">')
- self.writel(S_GEOM,5,'<param name="X" type="float"/>')
- self.writel(S_GEOM,5,'<param name="Y" type="float"/>')
- self.writel(S_GEOM,5,'<param name="Z" type="float"/>')
- self.writel(S_GEOM,4,'</accessor>')
- self.writel(S_GEOM,4,'</technique_common>')
- self.writel(S_GEOM,3,'</source>')
-
- # Triangle Lists
- self.writel(S_GEOM,3,'<vertices id="'+meshid+'-vertices">')
- self.writel(S_GEOM,4,'<input semantic="POSITION" source="#'+meshid+'-positions"/>')
- self.writel(S_GEOM,3,'</vertices>')
-
- prim_type=""
- if (triangulate):
- prim_type="triangles"
- else:
- prim_type="polygons"
-
-
- for m in surface_indices:
- indices = surface_indices[m]
- mat = materials[m]
-
- if (mat!=None):
- matref = self.new_id("trimat")
- self.writel(S_GEOM,3,'<'+prim_type+' count="'+str(int(len(indices)))+'" material="'+matref+'">') # todo material
- mat_assign.append( (mat,matref) )
- else:
- self.writel(S_GEOM,3,'<'+prim_type+' count="'+str(int(len(indices)))+'">') # todo material
-
-
- self.writel(S_GEOM,4,'<input semantic="VERTEX" source="#'+meshid+'-vertices" offset="0"/>')
- self.writel(S_GEOM,4,'<input semantic="NORMAL" source="#'+meshid+'-normals" offset="0"/>')
-
- for uvi in range(uv_layer_count):
- self.writel(S_GEOM,4,'<input semantic="TEXCOORD" source="#'+meshid+'-texcoord-'+str(uvi)+'" offset="0" set="'+str(uvi)+'"/>')
-
- if (has_colors):
- self.writel(S_GEOM,4,'<input semantic="COLOR" source="#'+meshid+'-colors" offset="0"/>')
- if (has_tangents):
- self.writel(S_GEOM,4,'<input semantic="TEXTANGENT" source="#'+meshid+'-tangents" offset="0"/>')
- self.writel(S_GEOM,4,'<input semantic="TEXBINORMAL" source="#'+meshid+'-bitangents" offset="0"/>')
-
- if (triangulate):
- int_values="<p>"
- for p in indices:
- for i in p:
- int_values+=" "+str(i)
- int_values+=" </p>"
- self.writel(S_GEOM,4,int_values)
- else:
- for p in indices:
- int_values="<p>"
- for i in p:
- int_values+=" "+str(i)
- int_values+=" </p>"
- self.writel(S_GEOM,4,int_values)
-
- self.writel(S_GEOM,3,'</'+prim_type+'>')
-
-
- self.writel(S_GEOM,2,'</mesh>')
- self.writel(S_GEOM,1,'</geometry>')
-
-
- meshdata={}
- meshdata["id"]=meshid
- meshdata["material_assign"]=mat_assign
- if (skeyindex==-1):
- self.mesh_cache[node.data]=meshdata
-
-
- # Export armature data (if armature exists)
-
- if (armature!=None and (skel_source!=None or skeyindex==-1)):
-
- contid = self.new_id("controller")
-
- self.writel(S_SKIN,1,'<controller id="'+contid+'">')
- if (skel_source!=None):
- self.writel(S_SKIN,2,'<skin source="#'+skel_source+'">')
- else:
- self.writel(S_SKIN,2,'<skin source="#'+meshid+'">')
-
- self.writel(S_SKIN,3,'<bind_shape_matrix>'+strmtx(node.matrix_world)+'</bind_shape_matrix>')
- #Joint Names
- self.writel(S_SKIN,3,'<source id="'+contid+'-joints">')
- name_values=""
- for v in si["bone_names"]:
- name_values+=" "+v
-
- self.writel(S_SKIN,4,'<Name_array id="'+contid+'-joints-array" count="'+str(len(si["bone_names"]))+'">'+name_values+'</Name_array>')
- self.writel(S_SKIN,4,'<technique_common>')
- self.writel(S_SKIN,4,'<accessor source="#'+contid+'-joints-array" count="'+str(len(si["bone_names"]))+'" stride="1">')
- self.writel(S_SKIN,5,'<param name="JOINT" type="Name"/>')
- self.writel(S_SKIN,4,'</accessor>')
- self.writel(S_SKIN,4,'</technique_common>')
- self.writel(S_SKIN,3,'</source>')
- #Pose Matrices!
- self.writel(S_SKIN,3,'<source id="'+contid+'-bind_poses">')
- pose_values=""
- for v in si["bone_bind_poses"]:
- pose_values+=" "+strmtx(v)
-
- self.writel(S_SKIN,4,'<float_array id="'+contid+'-bind_poses-array" count="'+str(len(si["bone_bind_poses"])*16)+'">'+pose_values+'</float_array>')
- self.writel(S_SKIN,4,'<technique_common>')
- self.writel(S_SKIN,4,'<accessor source="#'+contid+'-bind_poses-array" count="'+str(len(si["bone_bind_poses"]))+'" stride="16">')
- self.writel(S_SKIN,5,'<param name="TRANSFORM" type="float4x4"/>')
- self.writel(S_SKIN,4,'</accessor>')
- self.writel(S_SKIN,4,'</technique_common>')
- self.writel(S_SKIN,3,'</source>')
- #Skin Weights!
- self.writel(S_SKIN,3,'<source id="'+contid+'-skin_weights">')
- skin_weights=""
- skin_weights_total=0
- for v in vertices:
- skin_weights_total+=len(v.weights)
- for w in v.weights:
- skin_weights+=" "+str(w)
-
- self.writel(S_SKIN,4,'<float_array id="'+contid+'-skin_weights-array" count="'+str(skin_weights_total)+'">'+skin_weights+'</float_array>')
- self.writel(S_SKIN,4,'<technique_common>')
- self.writel(S_SKIN,4,'<accessor source="#'+contid+'-skin_weights-array" count="'+str(skin_weights_total)+'" stride="1">')
- self.writel(S_SKIN,5,'<param name="WEIGHT" type="float"/>')
- self.writel(S_SKIN,4,'</accessor>')
- self.writel(S_SKIN,4,'</technique_common>')
- self.writel(S_SKIN,3,'</source>')
-
-
- self.writel(S_SKIN,3,'<joints>')
- self.writel(S_SKIN,4,'<input semantic="JOINT" source="#'+contid+'-joints"/>')
- self.writel(S_SKIN,4,'<input semantic="INV_BIND_MATRIX" source="#'+contid+'-bind_poses"/>')
- self.writel(S_SKIN,3,'</joints>')
- self.writel(S_SKIN,3,'<vertex_weights count="'+str(len(vertices))+'">')
- self.writel(S_SKIN,4,'<input semantic="JOINT" source="#'+contid+'-joints" offset="0"/>')
- self.writel(S_SKIN,4,'<input semantic="WEIGHT" source="#'+contid+'-skin_weights" offset="1"/>')
- vcounts=""
- vs=""
- vcount=0
- for v in vertices:
- vcounts+=" "+str(len(v.weights))
- for b in v.bones:
- vs+=" "+str(b)
- vs+=" "+str(vcount)
- vcount+=1
- self.writel(S_SKIN,4,'<vcount>'+vcounts+'</vcount>')
- self.writel(S_SKIN,4,'<v>'+vs+'</v>')
- self.writel(S_SKIN,3,'</vertex_weights>')
-
-
- self.writel(S_SKIN,2,'</skin>')
- self.writel(S_SKIN,1,'</controller>')
- meshdata["skin_id"]=contid
-
-
- return meshdata
-
-
- def export_mesh_node(self,node,il):
-
- if (node.data==None):
- return
- armature=None
- armcount=0
- for n in node.modifiers:
- if (n.type=="ARMATURE"):
- armcount+=1
-
- if (node.parent!=None):
- if (node.parent.type=="ARMATURE"):
- armature=node.parent
- if (armcount>1):
- self.operator.report({'WARNING'},'Object "'+node.name+'" refers to more than one armature! This is unsupported.')
- if (armcount==0):
- self.operator.report({'WARNING'},'Object "'+node.name+'" is child of an armature, but has no armature modifier.')
-
-
- if (armcount>0 and not armature):
- self.operator.report({'WARNING'},'Object "'+node.name+'" has armature modifier, but is not a child of an armature. This is unsupported.')
-
-
- if (node.data.shape_keys!=None):
- sk = node.data.shape_keys
- if (sk.animation_data):
- #print("HAS ANIM")
- #print("DRIVERS: "+str(len(sk.animation_data.drivers)))
- for d in sk.animation_data.drivers:
- if (d.driver):
- for v in d.driver.variables:
- for t in v.targets:
- if (t.id!=None and t.id.name in self.scene.objects):
- #print("LINKING "+str(node)+" WITH "+str(t.id.name))
- self.armature_for_morph[node]=self.scene.objects[t.id.name]
-
-
- meshdata = self.export_mesh(node,armature)
- close_controller=False
-
- if ("skin_id" in meshdata):
- close_controller=True
- self.writel(S_NODES,il,'<instance_controller url="#'+meshdata["skin_id"]+'">')
- for sn in self.skeleton_info[armature]["skeleton_nodes"]:
- self.writel(S_NODES,il+1,'<skeleton>#'+sn+'</skeleton>')
- elif ("morph_id" in meshdata):
- self.writel(S_NODES,il,'<instance_controller url="#'+meshdata["morph_id"]+'">')
- close_controller=True
- elif (armature==None):
- self.writel(S_NODES,il,'<instance_geometry url="#'+meshdata["id"]+'">')
-
-
- if (len(meshdata["material_assign"])>0):
-
- self.writel(S_NODES,il+1,'<bind_material>')
- self.writel(S_NODES,il+2,'<technique_common>')
- for m in meshdata["material_assign"]:
- self.writel(S_NODES,il+3,'<instance_material symbol="'+m[1]+'" target="#'+m[0]+'"/>')
-
- self.writel(S_NODES,il+2,'</technique_common>')
- self.writel(S_NODES,il+1,'</bind_material>')
-
- if (close_controller):
- self.writel(S_NODES,il,'</instance_controller>')
- else:
- self.writel(S_NODES,il,'</instance_geometry>')
-
-
- def export_armature_bone(self,bone,il,si):
- boneid = self.new_id("bone")
- boneidx = si["bone_count"]
- si["bone_count"]+=1
- bonesid = si["id"]+"-"+str(boneidx)
- if (bone.name in self.used_bones):
- if (self.config["use_anim_action_all"]):
- self.operator.report({'WARNING'},'Bone name "'+bone.name+'" used in more than one skeleton. Actions might export wrong.')
- else:
- self.used_bones.append(bone.name)
-
- si["bone_index"][bone.name]=boneidx
- si["bone_ids"][bone]=boneid
- si["bone_names"].append(bonesid)
- self.writel(S_NODES,il,'<node id="'+boneid+'" sid="'+bonesid+'" name="'+bone.name+'" type="JOINT">')
- il+=1
- xform = bone.matrix_local
- si["bone_bind_poses"].append((si["armature_xform"] * xform).inverted())
-
- if (bone.parent!=None):
- xform = bone.parent.matrix_local.inverted() * xform
- else:
- si["skeleton_nodes"].append(boneid)
-
- self.writel(S_NODES,il,'<matrix sid="transform">'+strmtx(xform)+'</matrix>')
- for c in bone.children:
- self.export_armature_bone(c,il,si)
- il-=1
- self.writel(S_NODES,il,'</node>')
-
-
- def export_armature_node(self,node,il):
-
- if (node.data==None):
- return
-
- self.skeletons.append(node)
-
- armature = node.data
- self.skeleton_info[node]={ "bone_count":0, "id":self.new_id("skelbones"),"name":node.name, "bone_index":{},"bone_ids":{},"bone_names":[],"bone_bind_poses":[],"skeleton_nodes":[],"armature_xform":node.matrix_world }
-
-
-
- for b in armature.bones:
- if (b.parent!=None):
- continue
- self.export_armature_bone(b,il,self.skeleton_info[node])
-
- if (node.pose):
- for b in node.pose.bones:
- for x in b.constraints:
- if (x.type=='ACTION'):
- self.action_constraints.append(x.action)
-
-
- def export_camera_node(self,node,il):
-
- if (node.data==None):
- return
-
- camera=node.data
- camid=self.new_id("camera")
- self.writel(S_CAMS,1,'<camera id="'+camid+'" name="'+camera.name+'">')
- self.writel(S_CAMS,2,'<optics>')
- self.writel(S_CAMS,3,'<technique_common>')
- if (camera.type=="PERSP"):
- self.writel(S_CAMS,4,'<perspective>')
- self.writel(S_CAMS,5,'<yfov> '+str(math.degrees(camera.angle))+' </yfov>') # I think?
- self.writel(S_CAMS,5,'<aspect_ratio> '+str(self.scene.render.resolution_x / self.scene.render.resolution_y)+' </aspect_ratio>')
- self.writel(S_CAMS,5,'<znear> '+str(camera.clip_start)+' </znear>')
- self.writel(S_CAMS,5,'<zfar> '+str(camera.clip_end)+' </zfar>')
- self.writel(S_CAMS,4,'</perspective>')
- else:
- self.writel(S_CAMS,4,'<orthographic>')
- self.writel(S_CAMS,5,'<xmag> '+str(camera.ortho_scale*0.5)+' </xmag>') # I think?
- self.writel(S_CAMS,5,'<aspect_ratio> '+str(self.scene.render.resolution_x / self.scene.render.resolution_y)+' </aspect_ratio>')
- self.writel(S_CAMS,5,'<znear> '+str(camera.clip_start)+' </znear>')
- self.writel(S_CAMS,5,'<zfar> '+str(camera.clip_end)+' </zfar>')
- self.writel(S_CAMS,4,'</orthographic>')
-
- self.writel(S_CAMS,3,'</technique_common>')
- self.writel(S_CAMS,2,'</optics>')
- self.writel(S_CAMS,1,'</camera>')
-
-
- self.writel(S_NODES,il,'<instance_camera url="#'+camid+'"/>')
-
- def export_lamp_node(self,node,il):
-
- if (node.data==None):
- return
-
- light=node.data
- lightid=self.new_id("light")
- self.writel(S_LAMPS,1,'<light id="'+lightid+'" name="'+light.name+'">')
- #self.writel(S_LAMPS,2,'<optics>')
- self.writel(S_LAMPS,3,'<technique_common>')
-
- if (light.type=="POINT"):
- self.writel(S_LAMPS,4,'<point>')
- self.writel(S_LAMPS,5,'<color>'+strarr(light.color)+'</color>')
- att_by_distance = 2.0 / light.distance # convert to linear attenuation
- self.writel(S_LAMPS,5,'<linear_attenuation>'+str(att_by_distance)+'</linear_attenuation>')
- if (light.use_sphere):
- self.writel(S_LAMPS,5,'<zfar>'+str(light.distance)+'</zfar>')
-
- self.writel(S_LAMPS,4,'</point>')
- elif (light.type=="SPOT"):
- self.writel(S_LAMPS,4,'<spot>')
- self.writel(S_LAMPS,5,'<color>'+strarr(light.color)+'</color>')
- att_by_distance = 2.0 / light.distance # convert to linear attenuation
- self.writel(S_LAMPS,5,'<linear_attenuation>'+str(att_by_distance)+'</linear_attenuation>')
- self.writel(S_LAMPS,5,'<falloff_angle>'+str(math.degrees(light.spot_size/2))+'</falloff_angle>')
- self.writel(S_LAMPS,4,'</spot>')
-
-
- else: #write a sun lamp for everything else (not supported)
- self.writel(S_LAMPS,4,'<directional>')
- self.writel(S_LAMPS,5,'<color>'+strarr(light.color)+'</color>')
- self.writel(S_LAMPS,4,'</directional>')
-
-
- self.writel(S_LAMPS,3,'</technique_common>')
- #self.writel(S_LAMPS,2,'</optics>')
- self.writel(S_LAMPS,1,'</light>')
-
-
- self.writel(S_NODES,il,'<instance_light url="#'+lightid+'"/>')
-
- def export_empty_node(self,node,il):
-
- self.writel(S_NODES,4,'<extra>')
- self.writel(S_NODES,5,'<technique profile="GODOT">')
- self.writel(S_NODES,6,'<empty_draw_type>'+node.empty_draw_type+'</empty_draw_type>')
- self.writel(S_NODES,5,'</technique>')
- self.writel(S_NODES,4,'</extra>')
-
-
- def export_curve(self,curve):
-
- splineid = self.new_id("spline")
-
- self.writel(S_GEOM,1,'<geometry id="'+splineid+'" name="'+curve.name+'">')
- self.writel(S_GEOM,2,'<spline closed="0">')
-
- points=[]
- interps=[]
- handles_in=[]
- handles_out=[]
- tilts=[]
-
- for cs in curve.splines:
-
- if (cs.type=="BEZIER"):
- for s in cs.bezier_points:
- points.append(s.co[0])
- points.append(s.co[1])
- points.append(s.co[2])
-
-
- handles_in.append(s.handle_left[0])
- handles_in.append(s.handle_left[1])
- handles_in.append(s.handle_left[2])
-
- handles_out.append(s.handle_right[0])
- handles_out.append(s.handle_right[1])
- handles_out.append(s.handle_right[2])
-
-
- tilts.append(s.tilt)
- interps.append("BEZIER")
- else:
-
- for s in cs.points:
- points.append(s.co[0])
- points.append(s.co[1])
- points.append(s.co[2])
- handles_in.append(s.co[0])
- handles_in.append(s.co[1])
- handles_in.append(s.co[2])
- handles_out.append(s.co[0])
- handles_out.append(s.co[1])
- handles_out.append(s.co[2])
- tilts.append(s.tilt)
- interps.append("LINEAR")
-
-
-
-
- self.writel(S_GEOM,3,'<source id="'+splineid+'-positions">')
- position_values=""
- for x in points:
- position_values+=" "+str(x)
- self.writel(S_GEOM,4,'<float_array id="'+splineid+'-positions-array" count="'+str(len(points))+'">'+position_values+'</float_array>')
- self.writel(S_GEOM,4,'<technique_common>')
- self.writel(S_GEOM,4,'<accessor source="#'+splineid+'-positions-array" count="'+str(len(points)/3)+'" stride="3">')
- self.writel(S_GEOM,5,'<param name="X" type="float"/>')
- self.writel(S_GEOM,5,'<param name="Y" type="float"/>')
- self.writel(S_GEOM,5,'<param name="Z" type="float"/>')
- self.writel(S_GEOM,4,'</accessor>')
- self.writel(S_GEOM,3,'</source>')
-
- self.writel(S_GEOM,3,'<source id="'+splineid+'-intangents">')
- intangent_values=""
- for x in handles_in:
- intangent_values+=" "+str(x)
- self.writel(S_GEOM,4,'<float_array id="'+splineid+'-intangents-array" count="'+str(len(points))+'">'+intangent_values+'</float_array>')
- self.writel(S_GEOM,4,'<technique_common>')
- self.writel(S_GEOM,4,'<accessor source="#'+splineid+'-intangents-array" count="'+str(len(points)/3)+'" stride="3">')
- self.writel(S_GEOM,5,'<param name="X" type="float"/>')
- self.writel(S_GEOM,5,'<param name="Y" type="float"/>')
- self.writel(S_GEOM,5,'<param name="Z" type="float"/>')
- self.writel(S_GEOM,4,'</accessor>')
- self.writel(S_GEOM,3,'</source>')
-
- self.writel(S_GEOM,3,'<source id="'+splineid+'-outtangents">')
- outtangent_values=""
- for x in handles_out:
- outtangent_values+=" "+str(x)
- self.writel(S_GEOM,4,'<float_array id="'+splineid+'-outtangents-array" count="'+str(len(points))+'">'+outtangent_values+'</float_array>')
- self.writel(S_GEOM,4,'<technique_common>')
- self.writel(S_GEOM,4,'<accessor source="#'+splineid+'-outtangents-array" count="'+str(len(points)/3)+'" stride="3">')
- self.writel(S_GEOM,5,'<param name="X" type="float"/>')
- self.writel(S_GEOM,5,'<param name="Y" type="float"/>')
- self.writel(S_GEOM,5,'<param name="Z" type="float"/>')
- self.writel(S_GEOM,4,'</accessor>')
- self.writel(S_GEOM,3,'</source>')
-
- self.writel(S_GEOM,3,'<source id="'+splineid+'-interpolations">')
- interpolation_values=""
- for x in interps:
- interpolation_values+=" "+x
- self.writel(S_GEOM,4,'<Name_array id="'+splineid+'-interpolations-array" count="'+str(len(interps))+'">'+interpolation_values+'</Name_array>')
- self.writel(S_GEOM,4,'<technique_common>')
- self.writel(S_GEOM,4,'<accessor source="#'+splineid+'-interpolations-array" count="'+str(len(interps))+'" stride="1">')
- self.writel(S_GEOM,5,'<param name="INTERPOLATION" type="name"/>')
- self.writel(S_GEOM,4,'</accessor>')
- self.writel(S_GEOM,3,'</source>')
-
-
- self.writel(S_GEOM,3,'<source id="'+splineid+'-tilts">')
- tilt_values=""
- for x in tilts:
- tilt_values+=" "+str(x)
- self.writel(S_GEOM,4,'<float_array id="'+splineid+'-tilts-array" count="'+str(len(tilts))+'">'+tilt_values+'</float_array>')
- self.writel(S_GEOM,4,'<technique_common>')
- self.writel(S_GEOM,4,'<accessor source="#'+splineid+'-tilts-array" count="'+str(len(tilts))+'" stride="1">')
- self.writel(S_GEOM,5,'<param name="TILT" type="float"/>')
- self.writel(S_GEOM,4,'</accessor>')
- self.writel(S_GEOM,3,'</source>')
-
- self.writel(S_GEOM,3,'<control_vertices>')
- self.writel(S_GEOM,4,'<input semantic="POSITION" source="#'+splineid+'-positions"/>')
- self.writel(S_GEOM,4,'<input semantic="IN_TANGENT" source="#'+splineid+'-intangents"/>')
- self.writel(S_GEOM,4,'<input semantic="OUT_TANGENT" source="#'+splineid+'-outtangents"/>')
- self.writel(S_GEOM,4,'<input semantic="INTERPOLATION" source="#'+splineid+'-interpolations"/>')
- self.writel(S_GEOM,4,'<input semantic="TILT" source="#'+splineid+'-tilts"/>')
- self.writel(S_GEOM,3,'</control_vertices>')
-
-
- self.writel(S_GEOM,2,'</spline>')
- self.writel(S_GEOM,1,'</geometry>')
-
- return splineid
-
- def export_curve_node(self,node,il):
-
- if (node.data==None):
- return
- curveid = self.export_curve(node.data)
-
- self.writel(S_NODES,il,'<instance_geometry url="#'+curveid+'">')
- self.writel(S_NODES,il,'</instance_geometry>')
-
-
-
- def export_node(self,node,il):
- if (not node in self.valid_nodes):
- return
- prev_node = bpy.context.scene.objects.active
- bpy.context.scene.objects.active = node
-
- self.writel(S_NODES,il,'<node id="'+self.validate_id(node.name)+'" name="'+node.name+'" type="NODE">')
- il+=1
-
- self.writel(S_NODES,il,'<matrix sid="transform">'+strmtx(node.matrix_local)+'</matrix>')
- #print("NODE TYPE: "+node.type+" NAME: "+node.name)
- if (node.type=="MESH"):
- self.export_mesh_node(node,il)
- elif (node.type=="CURVE"):
- self.export_curve_node(node,il)
- elif (node.type=="ARMATURE"):
- self.export_armature_node(node,il)
- elif (node.type=="CAMERA"):
- self.export_camera_node(node,il)
- elif (node.type=="LAMP"):
- self.export_lamp_node(node,il)
- elif (node.type=="EMPTY"):
- self.export_empty_node(node,il)
-
- for x in node.children:
- self.export_node(x,il)
-
- il-=1
- self.writel(S_NODES,il,'</node>')
- bpy.context.scene.objects.active = prev_node #make previous node active again
-
- def is_node_valid(self,node):
- if (not node.type in self.config["object_types"]):
- return False
- if (self.config["use_active_layers"]):
- valid=False
- #print("NAME: "+node.name)
- for i in range(20):
- if (node.layers[i] and self.scene.layers[i]):
- valid=True
- break
- if (not valid):
- return False
-
- if (self.config["use_export_selected"] and not node.select):
- return False
-
- return True
-
-
- def export_scene(self):
-
-
- self.writel(S_NODES,0,'<library_visual_scenes>')
- self.writel(S_NODES,1,'<visual_scene id="'+self.scene_name+'" name="scene">')
-
- #validate nodes
- for obj in self.scene.objects:
- if (obj in self.valid_nodes):
- continue
- if (self.is_node_valid(obj)):
- n = obj
- while (n!=None):
- if (not n in self.valid_nodes):
- self.valid_nodes.append(n)
- n=n.parent
-
-
-
- for obj in self.scene.objects:
- if (obj in self.valid_nodes and obj.parent==None):
- self.export_node(obj,2)
-
- self.writel(S_NODES,1,'</visual_scene>')
- self.writel(S_NODES,0,'</library_visual_scenes>')
-
- def export_asset(self):
-
-
- self.writel(S_ASSET,0,'<asset>')
- # Why is this time stuff mandatory?, no one could care less...
- self.writel(S_ASSET,1,'<contributor>')
- self.writel(S_ASSET,2,'<author> Anonymous </author>') #Who made Collada, the FBI ?
- self.writel(S_ASSET,2,'<authoring_tool> Collada Exporter for Blender 2.6+, by Juan Linietsky (juan@codenix.com) </authoring_tool>') #Who made Collada, the FBI ?
- self.writel(S_ASSET,1,'</contributor>')
- self.writel(S_ASSET,1,'<created>'+time.strftime("%Y-%m-%dT%H:%M:%SZ ")+'</created>')
- self.writel(S_ASSET,1,'<modified>'+time.strftime("%Y-%m-%dT%H:%M:%SZ")+'</modified>')
- self.writel(S_ASSET,1,'<unit meter="1.0" name="meter"/>')
- self.writel(S_ASSET,1,'<up_axis>Z_UP</up_axis>')
- self.writel(S_ASSET,0,'</asset>')
-
-
- def export_animation_transform_channel(self,target,keys,matrices=True):
-
- frame_total=len(keys)
- anim_id=self.new_id("anim")
- self.writel(S_ANIM,1,'<animation id="'+anim_id+'">')
- source_frames = ""
- source_transforms = ""
- source_interps = ""
-
- for k in keys:
- source_frames += " "+str(k[0])
- if (matrices):
- source_transforms += " "+strmtx(k[1])
- else:
- source_transforms += " "+str(k[1])
-
- source_interps +=" LINEAR"
-
-
- # Time Source
- self.writel(S_ANIM,2,'<source id="'+anim_id+'-input">')
- self.writel(S_ANIM,3,'<float_array id="'+anim_id+'-input-array" count="'+str(frame_total)+'">'+source_frames+'</float_array>')
- self.writel(S_ANIM,3,'<technique_common>')
- self.writel(S_ANIM,4,'<accessor source="#'+anim_id+'-input-array" count="'+str(frame_total)+'" stride="1">')
- self.writel(S_ANIM,5,'<param name="TIME" type="float"/>')
- self.writel(S_ANIM,4,'</accessor>')
- self.writel(S_ANIM,3,'</technique_common>')
- self.writel(S_ANIM,2,'</source>')
-
- if (matrices):
- # Transform Source
- self.writel(S_ANIM,2,'<source id="'+anim_id+'-transform-output">')
- self.writel(S_ANIM,3,'<float_array id="'+anim_id+'-transform-output-array" count="'+str(frame_total*16)+'">'+source_transforms+'</float_array>')
- self.writel(S_ANIM,3,'<technique_common>')
- self.writel(S_ANIM,4,'<accessor source="#'+anim_id+'-transform-output-array" count="'+str(frame_total)+'" stride="16">')
- self.writel(S_ANIM,5,'<param name="TRANSFORM" type="float4x4"/>')
- self.writel(S_ANIM,4,'</accessor>')
- self.writel(S_ANIM,3,'</technique_common>')
- self.writel(S_ANIM,2,'</source>')
- else:
- # Value Source
- self.writel(S_ANIM,2,'<source id="'+anim_id+'-transform-output">')
- self.writel(S_ANIM,3,'<float_array id="'+anim_id+'-transform-output-array" count="'+str(frame_total)+'">'+source_transforms+'</float_array>')
- self.writel(S_ANIM,3,'<technique_common>')
- self.writel(S_ANIM,4,'<accessor source="#'+anim_id+'-transform-output-array" count="'+str(frame_total)+'" stride="1">')
- self.writel(S_ANIM,5,'<param name="X" type="float"/>')
- self.writel(S_ANIM,4,'</accessor>')
- self.writel(S_ANIM,3,'</technique_common>')
- self.writel(S_ANIM,2,'</source>')
-
- # Interpolation Source
- self.writel(S_ANIM,2,'<source id="'+anim_id+'-interpolation-output">')
- self.writel(S_ANIM,3,'<Name_array id="'+anim_id+'-interpolation-output-array" count="'+str(frame_total)+'">'+source_interps+'</Name_array>')
- self.writel(S_ANIM,3,'<technique_common>')
- self.writel(S_ANIM,4,'<accessor source="#'+anim_id+'-interpolation-output-array" count="'+str(frame_total)+'" stride="1">')
- self.writel(S_ANIM,5,'<param name="INTERPOLATION" type="Name"/>')
- self.writel(S_ANIM,4,'</accessor>')
- self.writel(S_ANIM,3,'</technique_common>')
- self.writel(S_ANIM,2,'</source>')
-
- self.writel(S_ANIM,2,'<sampler id="'+anim_id+'-sampler">')
- self.writel(S_ANIM,3,'<input semantic="INPUT" source="#'+anim_id+'-input"/>')
- self.writel(S_ANIM,3,'<input semantic="OUTPUT" source="#'+anim_id+'-transform-output"/>')
- self.writel(S_ANIM,3,'<input semantic="INTERPOLATION" source="#'+anim_id+'-interpolation-output"/>')
- self.writel(S_ANIM,2,'</sampler>')
- if (matrices):
- self.writel(S_ANIM,2,'<channel source="#'+anim_id+'-sampler" target="'+target+'/transform"/>')
- else:
- self.writel(S_ANIM,2,'<channel source="#'+anim_id+'-sampler" target="'+target+'"/>')
- self.writel(S_ANIM,1,'</animation>')
-
- return [anim_id]
-
-
- def export_animation(self,start,end,allowed=None):
-
- #Blender -> Collada frames needs a little work
- #Collada starts from 0, blender usually from 1
- #The last frame must be included also
-
- frame_orig = self.scene.frame_current
-
- frame_len = 1.0 / self.scene.render.fps
- frame_total = end - start + 1
- frame_sub = 0
- if (start>0):
- frame_sub=start*frame_len
-
- tcn = []
- xform_cache={}
- blend_cache={}
- # Change frames first, export objects last
- # This improves performance enormously
-
- #print("anim from: "+str(start)+" to "+str(end)+" allowed: "+str(allowed))
- for t in range(start,end+1):
- self.scene.frame_set(t)
- key = t * frame_len - frame_sub
-# print("Export Anim Frame "+str(t)+"/"+str(self.scene.frame_end+1))
-
- for node in self.scene.objects:
-
- if (not node in self.valid_nodes):
- continue
- if (allowed!=None and not (node in allowed)):
- if (node.type=="MESH" and node.data!=None and (node in self.armature_for_morph) and (self.armature_for_morph[node] in allowed)):
- pass #all good you pass with flying colors for morphs inside of action
- else:
- #print("fail "+str((node in self.armature_for_morph)))
- continue
- if (node.type=="MESH" and node.data!=None and node.data.shape_keys!=None and (node.data in self.mesh_cache) and len(node.data.shape_keys.key_blocks)):
- target = self.mesh_cache[node.data]["morph_id"]
- for i in range(len(node.data.shape_keys.key_blocks)):
-
- if (i==0):
- continue
-
- name=target+"-morph-weights("+str(i-1)+")"
- if (not (name in blend_cache)):
- blend_cache[name]=[]
-
- blend_cache[name].append( (key,node.data.shape_keys.key_blocks[i].value) )
-
-
- if (node.type=="MESH" and node.parent and node.parent.type=="ARMATURE"):
-
- continue #In Collada, nodes that have skin modifier must not export animation, animate the skin instead.
-
- if (len(node.constraints)>0 or node.animation_data!=None):
- #If the node has constraints, or animation data, then export a sampled animation track
- name=self.validate_id(node.name)
- if (not (name in xform_cache)):
- xform_cache[name]=[]
-
- mtx = node.matrix_world.copy()
- if (node.parent):
- mtx = node.parent.matrix_world.inverted() * mtx
-
- xform_cache[name].append( (key,mtx) )
-
- if (node.type=="ARMATURE"):
- #All bones exported for now
-
- for bone in node.data.bones:
-
- bone_name=self.skeleton_info[node]["bone_ids"][bone]
-
- if (not (bone_name in xform_cache)):
- #print("has bone: "+bone_name)
- xform_cache[bone_name]=[]
-
- posebone = node.pose.bones[bone.name]
- parent_posebone=None
-
- mtx = posebone.matrix.copy()
- if (bone.parent):
- parent_posebone=node.pose.bones[bone.parent.name]
- parent_invisible=False
-
- for i in range(3):
- if (parent_posebone.scale[i]==0.0):
- parent_invisible=True
-
- if (not parent_invisible):
- mtx = parent_posebone.matrix.inverted() * mtx
-
-
- xform_cache[bone_name].append( (key,mtx) )
-
- self.scene.frame_set(frame_orig)
-
- #export animation xml
- for nid in xform_cache:
- tcn+=self.export_animation_transform_channel(nid,xform_cache[nid],True)
- for nid in blend_cache:
- tcn+=self.export_animation_transform_channel(nid,blend_cache[nid],False)
-
- return tcn
-
- def export_animations(self):
- tmp_mat = []
- for s in self.skeletons:
- tmp_bone_mat = []
- for bone in s.pose.bones:
- tmp_bone_mat.append(Matrix(bone.matrix_basis))
- bone.matrix_basis = Matrix()
- tmp_mat.append([Matrix(s.matrix_local),tmp_bone_mat])
-
- self.writel(S_ANIM,0,'<library_animations>')
-
-
- if (self.config["use_anim_action_all"] and len(self.skeletons)):
-
- cached_actions = {}
-
- for s in self.skeletons:
- if s.animation_data and s.animation_data.action:
- cached_actions[s] = s.animation_data.action.name
-
-
- self.writel(S_ANIM_CLIPS,0,'<library_animation_clips>')
-
- for x in bpy.data.actions[:]:
- if x.users==0 or x in self.action_constraints:
- continue
- if (self.config["use_anim_skip_noexp"] and x.name.endswith("-noexp")):
- continue
-
- bones=[]
- #find bones used
- for p in x.fcurves:
- dp = str(p.data_path)
- base = "pose.bones[\""
- if (dp.find(base)==0):
- dp=dp[len(base):]
- if (dp.find('"')!=-1):
- dp=dp[:dp.find('"')]
- if (not dp in bones):
- bones.append(dp)
-
- allowed_skeletons=[]
- for i,y in enumerate(self.skeletons):
- if (y.animation_data):
- for z in y.pose.bones:
- if (z.bone.name in bones):
- if (not y in allowed_skeletons):
- allowed_skeletons.append(y)
- y.animation_data.action=x;
-
- y.matrix_local = tmp_mat[i][0]
- for j,bone in enumerate(s.pose.bones):
- bone.matrix_basis = Matrix()
-
-
- #print("allowed skeletons "+str(allowed_skeletons))
-
- #print(str(x))
-
- tcn = self.export_animation(int(x.frame_range[0]),int(x.frame_range[1]+0.5),allowed_skeletons)
- framelen=(1.0/self.scene.render.fps)
- start = x.frame_range[0]*framelen
- end = x.frame_range[1]*framelen
- #print("Export anim: "+x.name)
- self.writel(S_ANIM_CLIPS,1,'<animation_clip name="'+x.name+'" start="'+str(start)+'" end="'+str(end)+'">')
- for z in tcn:
- self.writel(S_ANIM_CLIPS,2,'<instance_animation url="#'+z+'"/>')
- self.writel(S_ANIM_CLIPS,1,'</animation_clip>')
- if (len(tcn)==0):
- self.operator.report({'WARNING'},'Animation clip "'+x.name+'" contains no tracks.')
-
-
-
- self.writel(S_ANIM_CLIPS,0,'</library_animation_clips>')
-
-
- for i,s in enumerate(self.skeletons):
- if (s.animation_data==None):
- continue
- if s in cached_actions:
- s.animation_data.action = bpy.data.actions[cached_actions[s]]
- else:
- s.animation_data.action = None
- for j,bone in enumerate(s.pose.bones):
- bone.matrix_basis = tmp_mat[i][1][j]
-
- else:
- self.export_animation(self.scene.frame_start,self.scene.frame_end)
-
-
-
- self.writel(S_ANIM,0,'</library_animations>')
-
- def export(self):
-
- self.writel(S_GEOM,0,'<library_geometries>')
- self.writel(S_CONT,0,'<library_controllers>')
- self.writel(S_CAMS,0,'<library_cameras>')
- self.writel(S_LAMPS,0,'<library_lights>')
- self.writel(S_IMGS,0,'<library_images>')
- self.writel(S_MATS,0,'<library_materials>')
- self.writel(S_FX,0,'<library_effects>')
-
-
- self.skeletons=[]
- self.action_constraints=[]
- self.export_asset()
- self.export_scene()
-
- self.writel(S_GEOM,0,'</library_geometries>')
-
- #morphs always go before skin controllers
- if S_MORPH in self.sections:
- for l in self.sections[S_MORPH]:
- self.writel(S_CONT,0,l)
- del self.sections[S_MORPH]
-
- #morphs always go before skin controllers
- if S_SKIN in self.sections:
- for l in self.sections[S_SKIN]:
- self.writel(S_CONT,0,l)
- del self.sections[S_SKIN]
-
- self.writel(S_CONT,0,'</library_controllers>')
- self.writel(S_CAMS,0,'</library_cameras>')
- self.writel(S_LAMPS,0,'</library_lights>')
- self.writel(S_IMGS,0,'</library_images>')
- self.writel(S_MATS,0,'</library_materials>')
- self.writel(S_FX,0,'</library_effects>')
-
- if (self.config["use_anim"]):
- self.export_animations()
-
- try:
- f = open(self.path,"wb")
- except:
- return False
-
- f.write(bytes('<?xml version="1.0" encoding="utf-8"?>\n',"UTF-8"))
- f.write(bytes('<COLLADA xmlns="http://www.collada.org/2005/11/COLLADASchema" version="1.4.1">\n',"UTF-8"))
-
-
- s=[]
- for x in self.sections.keys():
- s.append(x)
- s.sort()
- for x in s:
- for l in self.sections[x]:
- f.write(bytes(l+"\n","UTF-8"))
-
- f.write(bytes('<scene>\n',"UTF-8"))
- f.write(bytes('\t<instance_visual_scene url="#'+self.scene_name+'" />\n',"UTF-8"))
- f.write(bytes('</scene>\n',"UTF-8"))
- f.write(bytes('</COLLADA>\n',"UTF-8"))
- return True
-
- def __init__(self,path,kwargs,operator):
- self.operator=operator
- self.scene=bpy.context.scene
- self.last_id=0
- self.scene_name=self.new_id("scene")
- self.sections={}
- self.path=path
- self.mesh_cache={}
- self.curve_cache={}
- self.material_cache={}
- self.image_cache={}
- self.skeleton_info={}
- self.config=kwargs
- self.valid_nodes=[]
- self.armature_for_morph={}
- self.used_bones=[]
- self.wrongvtx_report=False
-
-
-
-
-
-
-
-def save(operator, context,
- filepath="",
- use_selection=False,
- **kwargs
- ):
-
- exp = DaeExporter(filepath,kwargs,operator)
- exp.export()
-
-
-
- return {'FINISHED'} # so the script wont run after we have batch exported.
-
-
diff --git a/version.py b/version.py
index 7d64e70985..dd80ca1b19 100644
--- a/version.py
+++ b/version.py
@@ -2,4 +2,4 @@ short_name="godot"
name="Godot Engine"
major=2
minor=1
-status="alpha"
+status="beta"